Notification.ts 419 Bytes
Newer Older
1
export class Notification {
yogevbd's avatar
yogevbd committed
2
  identifier: string;
3 4
  private _data?: any;

yogevbd's avatar
yogevbd committed
5 6 7 8
  sound?: string;
  badge?: number;
  type?: string;
  thread?: string;
9

10 11 12 13
  constructor(payload: object) {
    this._data = payload;
    this.identifier = this._data.identifier;
  }
14

15 16 17
  get data(): any {
    return this._data;
  }
yogevbd's avatar
yogevbd committed
18

19 20 21
  get title(): string {
    return this._data.title;
  }
yogevbd's avatar
yogevbd committed
22

23 24 25
  get body(): string {
    return this._data.body;
  }
yogevbd's avatar
yogevbd committed
26
}