/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import { z } from 'zod'; /** Dot-separated segment key, e.g. `collections.docs.list`. */ export declare const preferenceScopeSchema: z.ZodString; /** * Sticky list-view keys. All optional — clients send only the keys the * interaction changed, and the repository merges per-key — but an empty * object is rejected (nothing to write). */ export declare const listViewPreferenceValueSchema: z.ZodObject<{ page_size: z.ZodOptional; order: z.ZodOptional; desc: z.ZodOptional; }, z.core.$strict>; /** * Sticky analytics-dashboard keys. The period list is sourced from * `@byline/analytics/config` rather than restated, so the stored value * can only ever be one the dashboard actually offers — adding a sixth * period there admits it here with no edit. * * Note the stored `period` is the *parsed* value (`30`, `'ytd'`), not * the `?period=30` URL string the route validates on the way in. */ export declare const analyticsViewPreferenceValueSchema: z.ZodObject<{ period: z.ZodUnion, z.ZodLiteral<30>, z.ZodLiteral<90>, z.ZodLiteral<"ytd">, z.ZodLiteral<"all">]>; }, z.core.$strict>; /** * The value schema a scope selects, or `undefined` when the scope * belongs to no registered family. Exported so callers (and tests) can * ask the same question the write path asks. */ export declare function resolvePreferenceValueSchema(scope: string): z.ZodType | undefined; export declare const getPreferenceRequestSchema: z.ZodObject<{ scope: z.ZodString; }, z.core.$strip>; export type GetPreferenceRequest = z.infer; export declare const setPreferenceRequestSchema: z.ZodObject<{ scope: z.ZodString; value: z.ZodRecord; }, z.core.$strip>; export type SetPreferenceRequest = z.infer; /** `value` is `null` when the user has no stored preference for the scope. */ export declare const preferenceResponseSchema: z.ZodObject<{ scope: z.ZodString; value: z.ZodNullable>; }, z.core.$strip>; export type PreferenceResponse = z.infer;