/** * @typedef {Object} TinyPushAction * @property {string} action - Identifier echoed back on `notificationclick`. * @property {string} title - Human readable label. * @property {string} [icon] - Absolute URL of the action icon. * @property {string} [url] - URL opened when the action is clicked. * @property {boolean} [dismiss] - When `true`, the action only closes the notification. */ export type TinyPushAction = { /** * - Identifier echoed back on `notificationclick`. */ action: string; /** * - Human readable label. */ title: string; /** * - Absolute URL of the action icon. */ icon?: string; /** * - URL opened when the action is clicked. */ url?: string; /** * - When `true`, the action only closes the notification. */ dismiss?: boolean; }; export type TinyPushNotification = { /** * - Notification title. */ title: string; /** * - Notification body. */ body?: string; /** * - Absolute URL of the icon. */ icon?: string; /** * - Absolute URL of the badge. */ badge?: string; /** * - Absolute URL of the hero image. */ image?: string; /** * - Collapse key. Notifications with the same tag replace each other. */ tag?: string; /** * - BCP 47 language tag. */ lang?: string; /** * - Text direction: `ltr` or `rtl`. */ dir?: string; /** * - URL opened when the notification body is clicked. */ url?: string; /** * - Whether to vibrate on replacement. */ renotify?: boolean; /** * - Whether the notification stays until dismissed. */ requireInteraction?: boolean; /** * - Whether to suppress vibration and sound. */ silent?: boolean; /** * - Creation time in milliseconds since the epoch. */ timestamp?: number; /** * - Vibration pattern in milliseconds. */ vibrate?: number[]; /** * - Action buttons. */ actions?: TinyPushAction[]; /** * - Opaque data echoed back on click. */ data?: Record; }; export type TinyPushMessage = { /** * - Contract version. */ v: number; /** * - Routing key, see {@link PUSH_TYPE}. */ type: string; /** * - Idempotency identifier. */ id?: string; /** * - Time to live in seconds. */ ttl?: number; /** * - Collapse key at the transport level. */ topic?: string; /** * - Absolute expiration time in milliseconds since the epoch. */ expiresAt?: number; /** * - Notification descriptor. */ notification?: TinyPushNotification; /** * - Arbitrary payload for custom handlers. */ data?: Record; }; /** * @typedef {Object} TinyPushNotification * @property {string} title - Notification title. * @property {string} [body] - Notification body. * @property {string} [icon] - Absolute URL of the icon. * @property {string} [badge] - Absolute URL of the badge. * @property {string} [image] - Absolute URL of the hero image. * @property {string} [tag] - Collapse key. Notifications with the same tag replace each other. * @property {string} [lang] - BCP 47 language tag. * @property {string} [dir] - Text direction: `ltr` or `rtl`. * @property {string} [url] - URL opened when the notification body is clicked. * @property {boolean} [renotify] - Whether to vibrate on replacement. * @property {boolean} [requireInteraction] - Whether the notification stays until dismissed. * @property {boolean} [silent] - Whether to suppress vibration and sound. * @property {number} [timestamp] - Creation time in milliseconds since the epoch. * @property {number[]} [vibrate] - Vibration pattern in milliseconds. * @property {TinyPushAction[]} [actions] - Action buttons. * @property {Record} [data] - Opaque data echoed back on click. */ /** * @typedef {Object} TinyPushMessage * @property {number} v - Contract version. * @property {string} type - Routing key, see {@link PUSH_TYPE}. * @property {string} [id] - Idempotency identifier. * @property {number} [ttl] - Time to live in seconds. * @property {string} [topic] - Collapse key at the transport level. * @property {number} [expiresAt] - Absolute expiration time in milliseconds since the epoch. * @property {TinyPushNotification} [notification] - Notification descriptor. * @property {Record} [data] - Arbitrary payload for custom handlers. */ /** * Discriminator used by the router to pick a handler. * @readonly * @enum {string} */ export declare const PUSH_TYPE: Readonly<{ NOTIFICATION: "notification"; DATA: "data"; SYNC: "sync"; COMMAND: "command"; UNKNOWN: "unknown"; }>; //# sourceMappingURL=utils.d.mts.map