type ToDashedKey = T extends `${infer FirstLetter}${infer Rest}` ? Rest extends `${Uppercase}${string}` ? `${Lowercase}-${Lowercase>}` : `${Lowercase}${ToDashedKey}` : Lowercase; export type ToDashed = { [K in keyof T as K extends string ? ToDashedKey : K]: T[K]; }; /** * Recursively freezes an object */ export declare function freeze(obj: T): T; export interface NotificationBody, AppPayload extends object = Record> { payload?: NotificationPayload; appData?: AppPayload; } export interface NotificationHeaders { expiration?: number; collapseID?: string; priority?: Priority; } export type PushType = "alert" | "background" | "controls" | "fileprovider" | "liveactivity" | "location" | "mdm" | "complication" | "voip" | "pushtotalk" | "widgets"; export interface APSBody { readonly aps: ToDashed | Record; } export interface Notification extends Omit, "payload" | "appData"> { readonly supportedConnectors: number; readonly pushType: PushType; readonly topic: string; readonly body: Body; } export type Sound = string | { critical?: 0 | 1; /** * The name of a sound file in your app’s main bundle or in the Library/Sounds folder of your app’s container directory. * Specify the string “default” to play the system sound. * For information about how to prepare sounds, see [UNNotificationSound](https://developer.apple.com/documentation/usernotifications/unnotificationsound). */ name: string; /** * The volume for the critical alert’s sound. * Set this to a value between 0 (silent) and 1 (full volume). */ volume?: number; }; export {};