export type PincaseYesNo = 'yes' | 'no'; export type PincaseOpenMode = 'menu' | 'personal_unread' | 'personal_recent' | 'personal_tag' | 'public_popular' | 'public_recent' | 'public_japanese' | 'public_wikipedia' | 'public_fandom' | 'public_favorite_stream' | 'public_tag' | 'public_username'; export type PincaseOpenTagMode = 'personal_tag' | 'public_tag'; export interface PincaseXCallbackPayload { /** * The x-success callback URL. */ xSuccess?: string; /** * The x-error callback URL. */ xError?: string; /** * The x-cancel callback URL. */ xCancel?: string; } /** * Pincase add bookmark payload definition. */ export type PincaseAddBookmarkPayload = PincaseXCallbackPayload & { /** * URL to bookmark. * * @example 'https://www.example.com/' */ url: string; /** * Title for the URL. * * @example 'Protocol Launcher' */ title?: string; /** * Whether the bookmark should be private or public. * * @example 'yes' */ private?: PincaseYesNo; /** * Whether the bookmark is unread or not. * * @example 'yes' */ toread?: PincaseYesNo; /** * Whether composer UI should be skipped. * * @example 'yes' */ noui?: PincaseYesNo; /** * The unread flag used by Pincase's official add-bookmark example. * * @example 'yes' */ later?: PincaseYesNo; }; /** * Pincase open payload definition. */ export interface PincaseOpenPayload { /** * Official Pincase open mode. * * @example 'personal_unread' */ mode?: PincaseOpenMode; /** * Tag name used by tag modes. * * @example 'iOS' */ tag?: string; /** * Username used by username mode. * * @example 'exampleuser' */ username?: string; } /** * Pincase open tag payload definition. */ export interface PincaseOpenTagPayload { /** * Official Pincase tag mode. * * @example 'public_tag' */ mode: PincaseOpenTagMode; /** * Tag name. * * @example 'iOS' */ tag: string; } export declare function pincaseXCallbackParams(payload: PincaseXCallbackPayload): { 'x-cancel'?: string | undefined; 'x-error'?: string | undefined; 'x-success'?: string | undefined; }; export declare function pincaseActionUrl(action: 'add' | 'open', params?: Record): string; export declare function pincaseAddBookmarkUrl(payload: PincaseAddBookmarkPayload): string; export declare function pincaseOpenUrl(payload?: PincaseOpenPayload): string;