generator-zionapps
Version:
Angular 9 Code Generator
70 lines (59 loc) • 1.63 kB
text/typescript
/**
* PushNotificationMessage Domain
*/
import {EntityState} from '@ngrx/entity';
import {LastResult} from '../app-store.domain';
export enum EPushNotificationEnvironment {
Unknown = '',
Test = 'TEST',
Production = 'PROD',
}
export enum EPushNotificationType {
Unknown = 0,
General = 1,
AuditSubmission = 2,
Location = 3
}
export interface IPushNotificationSend {
AgentIds: number[];
All: boolean;
Heading: string;
Message: string;
PushNotificationType: EPushNotificationType;
TeamIds: number[];
Url: string;
}
export interface PushNotificationSend {
agentIds: number[];
all: boolean;
body: string;
heading: string;
launchURL: string;
pushNotificationType: EPushNotificationType;
teamIds: number[];
}
export interface PushNotificationTag {
key: string;
value: string;
}
export interface PushNotification {
body: string; // old message
fromProjectNumber: string;
id: string; // notificationID
launchURL: string;
lockScreenVisibility: number;
priority: number;
pushNotificationEnvironment: EPushNotificationEnvironment; // additionalData.push_environment
pushNotificationType: EPushNotificationType; // additionalData.push_type
sent: boolean;
timestamp: string; // rawPayload.google.sent_time: number (Android)
title: string;
}
export namespace PushNotificationsDomain {
export interface State extends EntityState<PushNotification> {
currentId: number | null;
lastResult: LastResult | null;
loaded: boolean;
}
export const storeName = 'pushNotificationMessages';
}