scriptable-testlab
Version:
A lightweight, efficient tool designed to manage and update scripts for Scriptable.
60 lines (54 loc) • 1.45 kB
text/typescript
/**
* Notification related type definitions
*/
export type NotificationSound =
| 'default'
| 'accept'
| 'alert'
| 'complete'
| 'event'
| 'failure'
| 'piano_error'
| 'piano_success'
| 'popup';
export 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;
}
export interface NotificationAction {
readonly title: string;
readonly url: string;
}
export interface NotificationSchedule {
readonly identifier: string;
readonly notification: Notification;
readonly deliveryDate: Date;
}
export 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>;
}