react-native-notifications
Version:
Advanced Push Notifications (Silent, interactive notifications) for iOS & Android
30 lines (26 loc) • 942 B
text/typescript
export class NotificationCategory {
identifier: string
actions?: NotificationAction[];
constructor(identifier: string, actions?: NotificationAction[]) {
this.identifier = identifier;
this.actions = actions;
}
}
export interface NotificationTextInput {
buttonTitle: string;
placeholder: string;
}
export class NotificationAction {
identifier: string;
activationMode: 'background' | 'foreground' | 'authenticationRequired' | 'destructive';
title: string;
authenticationRequired: boolean;
textInput?: NotificationTextInput;
constructor(identifier: string, activationMode: 'foreground' | 'authenticationRequired' | 'destructive', title: string, authenticationRequired: boolean, textInput?: NotificationTextInput) {
this.identifier = identifier;
this.activationMode = activationMode;
this.title = title;
this.authenticationRequired = authenticationRequired;
this.textInput = textInput;
}
}