scriptable-testlab
Version:
A lightweight, efficient tool designed to manage and update scripts for Scriptable.
48 lines (46 loc) • 1.58 kB
TypeScript
/**
* Notification related type definitions
*/
type NotificationSound = 'default' | 'accept' | 'alert' | 'complete' | 'event' | 'failure' | 'piano_error' | 'piano_success' | 'popup';
interface NotificationOptions {
readonly identifier?: string;
readonly title?: string;
readonly subtitle?: string;
readonly body?: string;
readonly threadIdentifier?: string;
readonly badge?: number;
readonly sound?: NotificationSound | boolean;
readonly openURL?: string;
readonly scriptName?: string;
readonly scriptWithArguments?: Readonly<{
name: string;
args: Readonly<Record<string, unknown>>;
}>;
readonly deliveryDate?: Date;
}
interface NotificationAction {
readonly title: string;
readonly url: string;
}
interface NotificationSchedule {
readonly identifier: string;
readonly notification: Notification;
readonly deliveryDate: Date;
}
interface NotificationMockState {
readonly identifier: string;
readonly title: string;
readonly subtitle: string;
readonly body: string;
readonly threadIdentifier: string;
readonly preferredContentHeight: number;
readonly badge: number;
readonly userInfo: Readonly<Record<string, unknown>>;
readonly sound: NotificationSound;
readonly openURL: string;
readonly deliveryDate: Date;
readonly nextTriggerDate: Date;
readonly scriptName: string;
readonly actions: Readonly<NotificationAction>;
}
export type { NotificationAction, NotificationMockState, NotificationOptions, NotificationSchedule, NotificationSound };