Notification.ts 863 Bytes
Newer Older
yogevbd's avatar
yogevbd committed
1
export interface Notification {
yogevbd's avatar
yogevbd committed
2
  identifier: string;
yogevbd's avatar
yogevbd committed
3
  data: object;
yogevbd's avatar
yogevbd committed
4
  alert: string
yogevbd's avatar
yogevbd committed
5 6 7 8
  sound?: string;
  badge?: number;
  type?: string;
  thread?: string;
yogevbd's avatar
yogevbd committed
9
}
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34

export interface NotificationPermissions {
  badge: boolean;
  alert: boolean;
  sound: boolean;
}

export interface NotificationCategory {
  identifier: string
  actions: [NotificationAction?];
}


export interface NotificationTextInput {
  buttonTitle: string;
  placeholder: string;
}

export interface NotificationAction {
  identifier: string;
  activationMode: 'foreground' | 'authenticationRequired' | 'destructive';
  title: string;
  authenticationRequired: boolean;
  textInput: NotificationTextInput
}
yogevbd's avatar
yogevbd committed
35 36 37 38 39 40 41 42 43 44 45

export interface NotificationActionResponse {
  identifier: string;
  text: string;
}

export interface NotificationCompletion {
  badge?: boolean;
  alert?: boolean;
  sound?: boolean;
}