export type Starred = 'yes'; export type Archive = 'pdf' | 'image' | 'webarchive'; type RequireAtLeastOne = Pick> & { [K in Keys]-?: Required> & Partial>>; }[Keys]; export type AnyboxTag = { /** * Tag name or tag identifier. */ tag?: string; /** * Multiple tag names or tag identifiers separated by comma. */ tags?: undefined; } | { /** * Tag name or tag identifier. */ tag?: undefined; /** * Multiple tag names or tag identifiers separated by comma. */ tags?: string; }; /** * Paste clipboard content payload definition. */ export type Paste = AnyboxTag & { /** * Star saved content. */ starred?: Starred; }; /** * Save text content payload definition. */ export type Save = AnyboxTag & RequireAtLeastOne<{ /** * Text content to save. */ text?: string; /** * Tag name or tag identifier. */ tag?: string; /** * Multiple tag names or tag identifiers separated by comma. */ tags?: string; /** * Star saved content. */ starred?: Starred; /** * Archive the link as PDF, screenshot image, or Web Archive on macOS. */ archive?: Archive; }>; /** * Download URL payload definition. */ export type Download = { /** * URL to download and save to Anybox. */ url: string; /** * Optional tag name. */ tag?: string; }; /** * Save current browser tab payload definition. */ export type SaveTab = { /** * Optional tag name. */ tag?: string; /** * Star saved content. */ starred?: Starred; /** * Archive the link as PDF, screenshot image, or Web Archive. */ archive?: Archive; }; /** * Quick Find payload definition. */ export type QuickFind = { tags?: undefined; filter?: undefined; q?: undefined; } | { /** * Tag identifiers separated by comma. */ tags: string; filter?: undefined; q?: undefined; } | { tags?: undefined; /** * Smart list identifier. */ filter: string; q?: undefined; } | { tags?: undefined; filter?: undefined; /** * Search keywords. */ q: string; }; /** * Anybox x-callback-url payload definition. */ export type XCallback = { /** * The x-success callback URL. */ xSuccess: string; /** * The x-error callback URL. */ xError: string; }; export type XCallbackSave = Save & XCallback; export type XCallbackPaste = Paste & XCallback; export declare function xCallbackParams(payload: XCallback): { 'x-success': string; 'x-error': string; }; export declare function anyboxUrl(path: string, params?: Record): string; export declare function saveParams(payload: Save): { archive?: Archive | undefined; starred?: "yes" | undefined; tags?: string | undefined; tag?: string | undefined; text: string | undefined; }; export declare function pasteParams(payload?: Paste): { starred?: "yes" | undefined; tags?: string | undefined; tag?: string | undefined; }; export {};