@kolektor/nucleus-notifications 0.0.12-pre.7931 → 0.1.130-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/esm2022/index.mjs +4 -0
- package/esm2022/kolektor-nucleus-notifications.mjs +5 -0
- package/esm2022/lib/models.mjs +23 -0
- package/esm2022/lib/nucleus-notifications.module.mjs +23 -0
- package/esm2022/lib/nucleus-notifications.service.mjs +387 -0
- package/{fesm2020 → fesm2022}/kolektor-nucleus-notifications.mjs +414 -389
- package/fesm2022/kolektor-nucleus-notifications.mjs.map +1 -0
- package/index.d.ts +3 -5
- package/lib/models.d.ts +65 -65
- package/lib/nucleus-notifications.module.d.ts +9 -9
- package/lib/nucleus-notifications.service.d.ts +56 -56
- package/package.json +25 -31
- package/esm2020/kolektor-nucleus-notifications.mjs +0 -5
- package/esm2020/lib/models.mjs +0 -23
- package/esm2020/lib/nucleus-notifications.module.mjs +0 -25
- package/esm2020/lib/nucleus-notifications.service.mjs +0 -356
- package/esm2020/public-api.mjs +0 -7
- package/fesm2015/kolektor-nucleus-notifications.mjs +0 -412
- package/fesm2015/kolektor-nucleus-notifications.mjs.map +0 -1
- package/fesm2020/kolektor-nucleus-notifications.mjs.map +0 -1
- package/public-api.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kolektor-nucleus-notifications.mjs","sources":["../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/models.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/nucleus-notifications.service.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/lib/nucleus-notifications.module.ts","../../../../../../libs/ng/nucleus/nucleus-notifications/src/kolektor-nucleus-notifications.ts"],"sourcesContent":["export class Notification {\n public id: string;\n public sender: Identity;\n public data: NotificationData;\n public isRead: boolean;\n public dateCreated: Date;\n public expirationDate: Date;\n}\n\nexport class Identity {\n public subject: string;\n public name: string;\n public pictureUrl: string;\n}\n\nexport class Recipient {\n public attributeName: string;\n public directoryName: string;\n public attributeValue: string;\n}\n\nexport class NotificationData {\n title: string;\n message: string;\n htmlMessage: string;\n preventDismissal: boolean;\n deepLink: string;\n}\n\nexport class WebKey {\n publicKey: string;\n}\n\nexport class Registration {\n id: string;\n token: string;\n platform: PlatformValue;\n}\n\nexport class RegistrationResult {\n id: string;\n}\n\nexport class PayloadData {\n notificationId: string;\n eventType: NotificationEventType;\n}\n\nexport class NucleusNotificationsConfig {\n serverApiUrl: string;\n}\n\nexport class NotificationClick {\n id: string;\n type: NotificationType;\n routerLink?: string;\n}\n\nexport type NotificationEventType =\n | 'new'\n | 'updated'\n | 'deleted'\n | 'deletedAll'\n | 'updatedAll'\n | 'newSilent';\n\nexport type PlatformValue = 'ios' | 'android' | 'web' | 'none';\n\nexport type NotificationType = 'default' | 'deeplink';\n\nexport interface ChannelId {\n senderId: string;\n channelId: string;\n}\n\nexport class UserChannelConfig {\n channelId: string;\n displayName: string;\n isSubscribed: boolean;\n subscriptionType: ChannelSubscriptionType;\n methods: NotifyMethod[];\n allowedMethods: NotifyMethod[];\n}\n\nexport type ChannelSubscriptionType = 'invariant' | 'optIn' | 'optOut';\n\nexport type NotifyMethod = 'push' | 'email' | 'sms';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { SwPush } from '@angular/service-worker';\nimport {\n PushNotifications,\n PushNotificationSchema,\n} from '@capacitor/push-notifications';\nimport { NucleusAppService } from '@kolektor/nucleus-common';\nimport { Observable, of, Subject } from 'rxjs';\nimport {\n ChannelId,\n Notification,\n NotificationClick,\n NotificationEventType,\n NotificationType,\n NucleusNotificationsConfig,\n PayloadData,\n PlatformValue,\n Registration,\n RegistrationResult,\n UserChannelConfig,\n WebKey,\n} from './models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NucleusNotificationsService {\n constructor(\n private http: HttpClient,\n private swPush: SwPush,\n private appService: NucleusAppService,\n config: NucleusNotificationsConfig\n ) {\n let url = config.serverApiUrl;\n if (!url.endsWith('/')) {\n url += '/';\n }\n this.apiUrl = url;\n }\n\n private apiUrl: string;\n private readonly registrationStorageKey =\n 'NucleusNotificationsRegistrationId';\n private readonly notificationsStorageKey = 'NucleusNotificationsLocalCache';\n private _platform: PlatformValue;\n private _isInitialized = false;\n private _newNotifications = new Subject<Notification>();\n private _clicksSubject = new Subject<NotificationClick>();\n private _stateChangesSubject = new Subject<void>();\n\n public notifications: Notification[] = [];\n\n public get unreadCount() {\n return this.notifications.filter((x) => !x.isRead).length;\n }\n\n public get newNotifications() {\n return this._newNotifications.asObservable();\n }\n\n public get clicks() {\n return this._clicksSubject.asObservable();\n }\n public get stateChanges() {\n return this._stateChangesSubject.asObservable();\n }\n\n public get isInitialized() {\n return this._isInitialized;\n }\n\n public async initialize() {\n // make sure app service has finished initializing\n await this.appService.init();\n\n this.loadFromStorage();\n\n if (this.appService.isNative) {\n this._platform = this.appService.deviceInfo.platform as PlatformValue;\n await this.registerCapacitorEvents();\n } else if (this.swPush.isEnabled) {\n this._platform = 'web';\n this.registerWebPushEvents();\n } else {\n console.warn(\n 'Nucleus.Notifications: There is no push capability, timer will be used to update notifications'\n );\n setInterval(() => {\n console.log('Updating notifications...');\n this.refresh(true);\n }, 5 * 60 * 1000);\n }\n this._isInitialized = true;\n this.refresh();\n }\n\n public register(): Promise<any> {\n return new Promise((_resolve, _reject) => {\n this.getRegistrationInfo()\n .then((info) => {\n this.http\n .post<RegistrationResult>(this.apiUrl + 'registration', info)\n .subscribe(\n (regResult) => {\n window.localStorage.setItem(\n this.registrationStorageKey,\n regResult.id\n );\n _resolve(null);\n },\n (error) => {\n console.log(\n 'Nucleus.Notifications: Failed to send notification registration to server.',\n error\n );\n _reject(error);\n }\n );\n })\n .catch((error) => _reject(error));\n });\n }\n\n public unregister(): Promise<any> {\n return new Promise((_resolve, _reject) => {\n this.getRegistrationInfo()\n .then((info) => {\n this.http\n .request<any>('DELETE', this.apiUrl + 'registration', {\n body: info,\n })\n .subscribe(\n () => {\n window.localStorage.removeItem(this.registrationStorageKey);\n _resolve(null);\n },\n (error) => {\n console.log(\n 'Nucleus.Notifications: Failed to remove registration from server.',\n error\n );\n _reject(error);\n }\n );\n })\n .catch((error) => _reject(error));\n });\n }\n\n public refresh(notifyAboutNew = false) {\n this.http\n .get<Notification[]>(this.apiUrl + 'notifications')\n .subscribe((res) => {\n this.updateNotifications(res, notifyAboutNew);\n });\n }\n\n public getNotification(id: string): Observable<Notification> {\n const localNotification = this.notifications.find((x) => x.id === id);\n if (localNotification) {\n return of(localNotification);\n }\n return this.http.get<Notification>(this.apiUrl + 'notifications/' + id);\n }\n\n public readNotification(id: string) {\n const n = this.notifications.find((x) => x.id === id);\n if (n && !n.isRead) {\n n.isRead = true;\n this.notifyStateChanged();\n }\n this.http.get(this.apiUrl + 'notifications/read/' + id).subscribe();\n }\n\n public dismissNotification(id: string) {\n this.deleteNotificaton(id);\n this.http.delete(this.apiUrl + 'notifications/' + id).subscribe();\n this.removeDeliveredNotification(id);\n }\n\n public dismissAll() {\n this.notifications.splice(0);\n this.notifyStateChanged();\n this.http.delete(this.apiUrl + 'notifications/all').subscribe();\n if (this._platform === 'ios' || this._platform === 'android') {\n PushNotifications.removeAllDeliveredNotifications();\n } else if (this._platform === 'web') {\n // TODO: remove all web push notifications\n }\n }\n\n public readAll() {\n for (const n of this.notifications) {\n n.isRead = true;\n }\n this.notifyStateChanged();\n this.http.get(this.apiUrl + 'notifications/read/all').subscribe();\n }\n\n public getChannelConfig(\n senderId: string,\n channelId: string,\n language?: string\n ) {\n return this.http.get<UserChannelConfig>(\n this.apiUrl +\n `settings/channel/${senderId}/${channelId}?language=${language}`\n );\n }\n\n public getChannelConfigsForSender(\n senderId: string,\n channelIds: string[],\n language?: string\n ) {\n const idsStr = channelIds.map((x) => senderId + ',' + x).join(';');\n return this.getChannelConfigsInternal(idsStr, language);\n }\n\n public getChannelConfigs(ids: ChannelId[], language?: string) {\n const idsStr = ids.map((x) => x.senderId + ',' + x.channelId).join(';');\n return this.getChannelConfigsInternal(idsStr, language);\n }\n\n public setChannelConfig(senderId: string, config: UserChannelConfig) {\n return this.http.post<void>(\n `${this.apiUrl}settings/channel/${senderId}`,\n config\n );\n }\n\n public setChannelConfigs(configs: UserChannelConfig[]) {\n return this.http.post<void>(`${this.apiUrl}settings/channels`, configs);\n }\n\n private getChannelConfigsInternal(ids: string, language?: string) {\n return this.http.get<UserChannelConfig[]>(\n `${this.apiUrl}settings/channels?ids=${ids}&language=${language}`\n );\n }\n\n private updateNotifications(\n newNotifications: Notification[],\n notifyAboutNew = false\n ) {\n let stateChanged = false;\n for (const n of newNotifications) {\n const existing = this.notifications.find((x) => x.id === n.id);\n if (existing) {\n if (existing.isRead !== n.isRead) {\n existing.isRead = n.isRead;\n stateChanged = true;\n }\n } else {\n let i = 0;\n while (\n i < this.notifications.length &&\n n.dateCreated < this.notifications[i].dateCreated\n ) {\n i++;\n }\n this.notifications.splice(i, 0, n);\n stateChanged = true;\n if (notifyAboutNew) {\n this._newNotifications.next(n);\n }\n }\n }\n\n const now = Date.now();\n for (let i = this.notifications.length - 1; i >= 0; i--) {\n const n = this.notifications[i];\n if (\n new Date(n.expirationDate).getTime() < now ||\n !newNotifications.find((x) => x.id === n.id)\n ) {\n this.notifications.splice(i, 1);\n stateChanged = true;\n }\n }\n\n if (stateChanged) {\n this.notifyStateChanged();\n }\n }\n\n private saveToStorage() {\n const str = JSON.stringify(this.notifications);\n window.localStorage.setItem(this.notificationsStorageKey, str);\n }\n\n private loadFromStorage() {\n try {\n const str = window.localStorage.getItem(this.notificationsStorageKey);\n if (str) {\n const notifications = JSON.parse(str) as Notification[];\n this.notifications = notifications.filter((x) => !!x);\n // precaution for notification.isRead of undefined error\n this.notifyStateChanged(false);\n }\n } catch {\n /* empty */\n }\n }\n\n private handleNotificationEvent(\n id: string,\n eventType: NotificationEventType\n ) {\n if (eventType.startsWith('new') || eventType === 'updated') {\n // we are handling new and newSilent\n this.getNotification(id).subscribe((n) => {\n if (eventType.startsWith('new') && !n.isRead) {\n this._newNotifications.next(n);\n }\n const existing = this.notifications.find((x) => x.id === n.id);\n if (existing) {\n existing.isRead = n.isRead;\n } else {\n this.notifications.splice(0, 0, n);\n }\n this.notifyStateChanged();\n });\n } else if (eventType === 'deleted') {\n this.deleteNotificaton(id);\n } else {\n this.refresh();\n }\n }\n\n private deleteNotificaton(id: string) {\n const i = this.notifications.findIndex((x) => x.id === id);\n if (i >= 0) {\n this.notifications.splice(i, 1);\n this.notifyStateChanged();\n }\n }\n\n private notifyStateChanged(persistState = true) {\n if (persistState) {\n this.saveToStorage();\n }\n this._stateChangesSubject.next();\n }\n\n private handleNotificationAction(notificationAction: string | undefined) {\n if (!notificationAction) {\n throw new Error('Notification action is empty!');\n }\n\n const arr = notificationAction.split(':');\n const notificationClick: NotificationClick = {\n id: arr[0],\n type: arr[1] as NotificationType,\n routerLink: arr[2],\n };\n\n const validNotificationClickTypes = ['default', 'deeplink'];\n if (validNotificationClickTypes.includes(notificationClick.type)) {\n this._clicksSubject.next(notificationClick);\n } else {\n console.error(\n `Nucleus.Notifications: Unknown notification action: '${notificationAction}'.`\n );\n }\n }\n\n private removeDeliveredNotification(id: string) {\n if (this._platform === 'ios' || this._platform === 'android') {\n PushNotifications.getDeliveredNotifications().then((list) => {\n const toRemove = list.notifications.filter((n) => {\n const data = this.getNotificationPayloadData(n);\n return data.notificationId === id;\n });\n\n // TODO: On Android this does not currently work because notificationID is not set.\n // This my solve the issue: https://github.com/ionic-team/capacitor/pull/3523\n PushNotifications.removeDeliveredNotifications({\n notifications: toRemove,\n });\n });\n } else if (this._platform === 'web') {\n // TODO: remove web push notification\n }\n }\n\n private getNotificationPayloadData(\n pushNotification: PushNotificationSchema\n ): PayloadData {\n return this._platform === 'ios'\n ? pushNotification.data.data\n : pushNotification.data;\n }\n\n private async registerCapacitorEvents() {\n await PushNotifications.addListener('pushNotificationReceived', (n) => {\n const data = this.getNotificationPayloadData(n);\n console.log(\n 'Nucleus.Notifications: Received capacitor push event: ' +\n data.eventType,\n n\n );\n this.handleNotificationEvent(data.notificationId, data.eventType);\n });\n\n await PushNotifications.addListener(\n 'pushNotificationActionPerformed',\n (a) => {\n let action = (a as any).notification.data.notificationAction;\n if (this._platform === 'ios') {\n action = (a as any).notification.data.data.notificationAction;\n }\n console.log(\n 'Nucleus.Notifications: Received capacitor action event',\n action\n );\n this.handleNotificationAction(action);\n }\n );\n }\n\n private registerWebPushEvents() {\n this.swPush.messages.subscribe((n) => {\n const data: PayloadData = (n as any).data;\n console.log(\n 'Nucleus.Notifications: Received WebPush event: ' + data.eventType,\n n\n );\n this.handleNotificationEvent(data.notificationId, data.eventType);\n });\n\n this.swPush.notificationClicks.subscribe((action) => {\n console.log(\n 'Nucleus.Notifications: Received WebPush action event',\n action\n );\n const tag = action.notification.tag;\n this.handleNotificationAction(tag);\n });\n }\n\n private getRegistrationInfo(): Promise<Registration> {\n return new Promise((_resolve, _reject) => {\n const registrationId = window.localStorage.getItem(\n this.registrationStorageKey\n ) as string;\n if (this._platform === 'android' || this._platform === 'ios') {\n // capacitor platform\n const listener = PushNotifications.addListener(\n 'registration',\n (token) => {\n listener.remove();\n _resolve({\n id: registrationId,\n token: token.value,\n platform: this._platform,\n });\n }\n );\n PushNotifications.register().catch((error) =>\n _reject('Could not register for notifications:' + error)\n );\n } else if (this._platform === 'web') {\n // Web Push API\n this.http.get<WebKey>(this.apiUrl + 'registration/webkey').subscribe(\n (key) => {\n this.getWebPushSubscription(key.publicKey).then((subscription) => {\n const t = JSON.stringify(subscription.toJSON());\n _resolve({ id: registrationId, token: t, platform: 'web' });\n });\n },\n (error) => _reject(error)\n );\n } else {\n _reject(`Nucleus.Notifications: Platform is not supported`);\n }\n });\n }\n\n private getWebPushSubscription(publicKey: string): Promise<PushSubscription> {\n return new Promise((_resolve, _reject) => {\n this.swPush.subscription.subscribe(\n (subscription) => {\n if (subscription != null) {\n _resolve(subscription);\n } else {\n this.swPush\n .requestSubscription({ serverPublicKey: publicKey })\n .then((s) => _resolve(s))\n .catch((e) => _reject(e));\n }\n },\n (error) => {\n console.error(\n 'Nucleus.Notifications: Cannot get web push subscription',\n error\n );\n _reject(error);\n }\n );\n });\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { NucleusNotificationsConfig } from './models';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n})\nexport class NucleusNotificationsModule {\n static forRoot(\n config: NucleusNotificationsConfig\n ): ModuleWithProviders<NucleusNotificationsModule> {\n return {\n ngModule: NucleusNotificationsModule,\n providers: [{ provide: NucleusNotificationsConfig, useValue: config }],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.NucleusNotificationsConfig"],"mappings":";;;;;;;;MAAa,YAAY,CAAA;AAOxB,CAAA;MAEY,QAAQ,CAAA;AAIpB,CAAA;MAEY,SAAS,CAAA;AAIrB,CAAA;MAEY,gBAAgB,CAAA;AAM5B,CAAA;MAEY,MAAM,CAAA;AAElB,CAAA;MAEY,YAAY,CAAA;AAIxB,CAAA;MAEY,kBAAkB,CAAA;AAE9B,CAAA;MAEY,WAAW,CAAA;AAGvB,CAAA;MAEY,0BAA0B,CAAA;AAEtC,CAAA;MAEY,iBAAiB,CAAA;AAI7B,CAAA;MAmBY,iBAAiB,CAAA;AAO7B;;AClFD;MA4Ba,2BAA2B,CAAA;AACtC,IAAA,WAAA,CACU,IAAgB,EAChB,MAAc,EACd,UAA6B,EACrC,MAAkC,EAAA;QAH1B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAU,CAAA,UAAA,GAAV,UAAU,CAAmB;QAWtB,IAAsB,CAAA,sBAAA,GACrC,oCAAoC,CAAC;QACtB,IAAuB,CAAA,uBAAA,GAAG,gCAAgC,CAAC;QAEpE,IAAc,CAAA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A,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cAF1B,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAEP,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAHvC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCnBY,0BAA0B,CAAA;IACrC,OAAO,OAAO,CACZ,MAAkC,EAAA;QAElC,OAAO;AACL,YAAA,QAAQ,EAAE,0BAA0B;YACpC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;SACvE,CAAC;KACH;+GARU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAA1B,0BAA0B,EAAA,CAAA,CAAA,EAAA;gHAA1B,0BAA0B,EAAA,CAAA,CAAA,EAAA;;4FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
/// <amd-module name="@kolektor/nucleus-notifications" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
export * from './lib/nucleus-notifications.service';
|
|
2
|
+
export * from './lib/nucleus-notifications.module';
|
|
3
|
+
export * from './lib/models';
|
package/lib/models.d.ts
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
export declare class Notification {
|
|
2
|
-
id: string;
|
|
3
|
-
sender: Identity;
|
|
4
|
-
data: NotificationData;
|
|
5
|
-
isRead: boolean;
|
|
6
|
-
dateCreated: Date;
|
|
7
|
-
expirationDate: Date;
|
|
8
|
-
}
|
|
9
|
-
export declare class Identity {
|
|
10
|
-
subject: string;
|
|
11
|
-
name: string;
|
|
12
|
-
pictureUrl: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class Recipient {
|
|
15
|
-
attributeName: string;
|
|
16
|
-
directoryName: string;
|
|
17
|
-
attributeValue: string;
|
|
18
|
-
}
|
|
19
|
-
export declare class NotificationData {
|
|
20
|
-
title: string;
|
|
21
|
-
message: string;
|
|
22
|
-
htmlMessage: string;
|
|
23
|
-
preventDismissal: boolean;
|
|
24
|
-
deepLink: string;
|
|
25
|
-
}
|
|
26
|
-
export declare class WebKey {
|
|
27
|
-
publicKey: string;
|
|
28
|
-
}
|
|
29
|
-
export declare class Registration {
|
|
30
|
-
id: string;
|
|
31
|
-
token: string;
|
|
32
|
-
platform: PlatformValue;
|
|
33
|
-
}
|
|
34
|
-
export declare class RegistrationResult {
|
|
35
|
-
id: string;
|
|
36
|
-
}
|
|
37
|
-
export declare class PayloadData {
|
|
38
|
-
notificationId: string;
|
|
39
|
-
eventType: NotificationEventType;
|
|
40
|
-
}
|
|
41
|
-
export declare class NucleusNotificationsConfig {
|
|
42
|
-
serverApiUrl: string;
|
|
43
|
-
}
|
|
44
|
-
export declare class NotificationClick {
|
|
45
|
-
id: string;
|
|
46
|
-
type: NotificationType;
|
|
47
|
-
routerLink?: string;
|
|
48
|
-
}
|
|
49
|
-
export type NotificationEventType = 'new' | 'updated' | 'deleted' | 'deletedAll' | 'updatedAll' | 'newSilent';
|
|
50
|
-
export type PlatformValue = 'ios' | 'android' | 'web' | 'none';
|
|
51
|
-
export type NotificationType = 'default' | 'deeplink';
|
|
52
|
-
export interface ChannelId {
|
|
53
|
-
senderId: string;
|
|
54
|
-
channelId: string;
|
|
55
|
-
}
|
|
56
|
-
export declare class UserChannelConfig {
|
|
57
|
-
channelId: string;
|
|
58
|
-
displayName: string;
|
|
59
|
-
isSubscribed: boolean;
|
|
60
|
-
subscriptionType: ChannelSubscriptionType;
|
|
61
|
-
methods: NotifyMethod[];
|
|
62
|
-
allowedMethods: NotifyMethod[];
|
|
63
|
-
}
|
|
64
|
-
export type ChannelSubscriptionType = 'invariant' | 'optIn' | 'optOut';
|
|
65
|
-
export type NotifyMethod = 'push' | 'email' | 'sms';
|
|
1
|
+
export declare class Notification {
|
|
2
|
+
id: string;
|
|
3
|
+
sender: Identity;
|
|
4
|
+
data: NotificationData;
|
|
5
|
+
isRead: boolean;
|
|
6
|
+
dateCreated: Date;
|
|
7
|
+
expirationDate: Date;
|
|
8
|
+
}
|
|
9
|
+
export declare class Identity {
|
|
10
|
+
subject: string;
|
|
11
|
+
name: string;
|
|
12
|
+
pictureUrl: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class Recipient {
|
|
15
|
+
attributeName: string;
|
|
16
|
+
directoryName: string;
|
|
17
|
+
attributeValue: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class NotificationData {
|
|
20
|
+
title: string;
|
|
21
|
+
message: string;
|
|
22
|
+
htmlMessage: string;
|
|
23
|
+
preventDismissal: boolean;
|
|
24
|
+
deepLink: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class WebKey {
|
|
27
|
+
publicKey: string;
|
|
28
|
+
}
|
|
29
|
+
export declare class Registration {
|
|
30
|
+
id: string;
|
|
31
|
+
token: string;
|
|
32
|
+
platform: PlatformValue;
|
|
33
|
+
}
|
|
34
|
+
export declare class RegistrationResult {
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class PayloadData {
|
|
38
|
+
notificationId: string;
|
|
39
|
+
eventType: NotificationEventType;
|
|
40
|
+
}
|
|
41
|
+
export declare class NucleusNotificationsConfig {
|
|
42
|
+
serverApiUrl: string;
|
|
43
|
+
}
|
|
44
|
+
export declare class NotificationClick {
|
|
45
|
+
id: string;
|
|
46
|
+
type: NotificationType;
|
|
47
|
+
routerLink?: string;
|
|
48
|
+
}
|
|
49
|
+
export type NotificationEventType = 'new' | 'updated' | 'deleted' | 'deletedAll' | 'updatedAll' | 'newSilent';
|
|
50
|
+
export type PlatformValue = 'ios' | 'android' | 'web' | 'none';
|
|
51
|
+
export type NotificationType = 'default' | 'deeplink';
|
|
52
|
+
export interface ChannelId {
|
|
53
|
+
senderId: string;
|
|
54
|
+
channelId: string;
|
|
55
|
+
}
|
|
56
|
+
export declare class UserChannelConfig {
|
|
57
|
+
channelId: string;
|
|
58
|
+
displayName: string;
|
|
59
|
+
isSubscribed: boolean;
|
|
60
|
+
subscriptionType: ChannelSubscriptionType;
|
|
61
|
+
methods: NotifyMethod[];
|
|
62
|
+
allowedMethods: NotifyMethod[];
|
|
63
|
+
}
|
|
64
|
+
export type ChannelSubscriptionType = 'invariant' | 'optIn' | 'optOut';
|
|
65
|
+
export type NotifyMethod = 'push' | 'email' | 'sms';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { NucleusNotificationsConfig } from './models';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NucleusNotificationsModule {
|
|
5
|
-
static forRoot(config: NucleusNotificationsConfig): ModuleWithProviders<NucleusNotificationsModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NucleusNotificationsModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NucleusNotificationsModule, never, never, never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NucleusNotificationsModule>;
|
|
9
|
-
}
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { NucleusNotificationsConfig } from './models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NucleusNotificationsModule {
|
|
5
|
+
static forRoot(config: NucleusNotificationsConfig): ModuleWithProviders<NucleusNotificationsModule>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NucleusNotificationsModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NucleusNotificationsModule, never, never, never>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NucleusNotificationsModule>;
|
|
9
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { SwPush } from '@angular/service-worker';
|
|
3
|
-
import { NucleusAppService } from '@kolektor/nucleus-common';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { ChannelId, Notification, NotificationClick, NucleusNotificationsConfig, UserChannelConfig } from './models';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class NucleusNotificationsService {
|
|
8
|
-
private http;
|
|
9
|
-
private swPush;
|
|
10
|
-
private appService;
|
|
11
|
-
constructor(http: HttpClient, swPush: SwPush, appService: NucleusAppService, config: NucleusNotificationsConfig);
|
|
12
|
-
private apiUrl;
|
|
13
|
-
private readonly registrationStorageKey;
|
|
14
|
-
private readonly notificationsStorageKey;
|
|
15
|
-
private _platform;
|
|
16
|
-
private _isInitialized;
|
|
17
|
-
private _newNotifications;
|
|
18
|
-
private _clicksSubject;
|
|
19
|
-
private _stateChangesSubject;
|
|
20
|
-
notifications: Notification[];
|
|
21
|
-
get unreadCount(): number;
|
|
22
|
-
get newNotifications(): Observable<Notification>;
|
|
23
|
-
get clicks(): Observable<NotificationClick>;
|
|
24
|
-
get stateChanges(): Observable<void>;
|
|
25
|
-
get isInitialized(): boolean;
|
|
26
|
-
initialize(): Promise<void>;
|
|
27
|
-
register(): Promise<any>;
|
|
28
|
-
unregister(): Promise<any>;
|
|
29
|
-
refresh(notifyAboutNew?: boolean): void;
|
|
30
|
-
getNotification(id: string): Observable<Notification>;
|
|
31
|
-
readNotification(id: string): void;
|
|
32
|
-
dismissNotification(id: string): void;
|
|
33
|
-
dismissAll(): void;
|
|
34
|
-
readAll(): void;
|
|
35
|
-
getChannelConfig(senderId: string, channelId: string, language?: string): Observable<UserChannelConfig>;
|
|
36
|
-
getChannelConfigsForSender(senderId: string, channelIds: string[], language?: string): Observable<UserChannelConfig[]>;
|
|
37
|
-
getChannelConfigs(ids: ChannelId[], language?: string): Observable<UserChannelConfig[]>;
|
|
38
|
-
setChannelConfig(senderId: string, config: UserChannelConfig): Observable<void>;
|
|
39
|
-
setChannelConfigs(configs: UserChannelConfig[]): Observable<void>;
|
|
40
|
-
private getChannelConfigsInternal;
|
|
41
|
-
private updateNotifications;
|
|
42
|
-
private saveToStorage;
|
|
43
|
-
private loadFromStorage;
|
|
44
|
-
private handleNotificationEvent;
|
|
45
|
-
private deleteNotificaton;
|
|
46
|
-
private notifyStateChanged;
|
|
47
|
-
private handleNotificationAction;
|
|
48
|
-
private removeDeliveredNotification;
|
|
49
|
-
private getNotificationPayloadData;
|
|
50
|
-
private registerCapacitorEvents;
|
|
51
|
-
private registerWebPushEvents;
|
|
52
|
-
private getRegistrationInfo;
|
|
53
|
-
private getWebPushSubscription;
|
|
54
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NucleusNotificationsService, never>;
|
|
55
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NucleusNotificationsService>;
|
|
56
|
-
}
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { SwPush } from '@angular/service-worker';
|
|
3
|
+
import { NucleusAppService } from '@kolektor/nucleus-common';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { ChannelId, Notification, NotificationClick, NucleusNotificationsConfig, UserChannelConfig } from './models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NucleusNotificationsService {
|
|
8
|
+
private http;
|
|
9
|
+
private swPush;
|
|
10
|
+
private appService;
|
|
11
|
+
constructor(http: HttpClient, swPush: SwPush, appService: NucleusAppService, config: NucleusNotificationsConfig);
|
|
12
|
+
private apiUrl;
|
|
13
|
+
private readonly registrationStorageKey;
|
|
14
|
+
private readonly notificationsStorageKey;
|
|
15
|
+
private _platform;
|
|
16
|
+
private _isInitialized;
|
|
17
|
+
private _newNotifications;
|
|
18
|
+
private _clicksSubject;
|
|
19
|
+
private _stateChangesSubject;
|
|
20
|
+
notifications: Notification[];
|
|
21
|
+
get unreadCount(): number;
|
|
22
|
+
get newNotifications(): Observable<Notification>;
|
|
23
|
+
get clicks(): Observable<NotificationClick>;
|
|
24
|
+
get stateChanges(): Observable<void>;
|
|
25
|
+
get isInitialized(): boolean;
|
|
26
|
+
initialize(): Promise<void>;
|
|
27
|
+
register(): Promise<any>;
|
|
28
|
+
unregister(): Promise<any>;
|
|
29
|
+
refresh(notifyAboutNew?: boolean): void;
|
|
30
|
+
getNotification(id: string): Observable<Notification>;
|
|
31
|
+
readNotification(id: string): void;
|
|
32
|
+
dismissNotification(id: string): void;
|
|
33
|
+
dismissAll(): void;
|
|
34
|
+
readAll(): void;
|
|
35
|
+
getChannelConfig(senderId: string, channelId: string, language?: string): Observable<UserChannelConfig>;
|
|
36
|
+
getChannelConfigsForSender(senderId: string, channelIds: string[], language?: string): Observable<UserChannelConfig[]>;
|
|
37
|
+
getChannelConfigs(ids: ChannelId[], language?: string): Observable<UserChannelConfig[]>;
|
|
38
|
+
setChannelConfig(senderId: string, config: UserChannelConfig): Observable<void>;
|
|
39
|
+
setChannelConfigs(configs: UserChannelConfig[]): Observable<void>;
|
|
40
|
+
private getChannelConfigsInternal;
|
|
41
|
+
private updateNotifications;
|
|
42
|
+
private saveToStorage;
|
|
43
|
+
private loadFromStorage;
|
|
44
|
+
private handleNotificationEvent;
|
|
45
|
+
private deleteNotificaton;
|
|
46
|
+
private notifyStateChanged;
|
|
47
|
+
private handleNotificationAction;
|
|
48
|
+
private removeDeliveredNotification;
|
|
49
|
+
private getNotificationPayloadData;
|
|
50
|
+
private registerCapacitorEvents;
|
|
51
|
+
private registerWebPushEvents;
|
|
52
|
+
private getRegistrationInfo;
|
|
53
|
+
private getWebPushSubscription;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NucleusNotificationsService, never>;
|
|
55
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NucleusNotificationsService>;
|
|
56
|
+
}
|
package/package.json
CHANGED
|
@@ -1,35 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"@kolektor/nucleus-common": "^0.0.12-pre",
|
|
12
|
-
"@capacitor/core": "^5.0.0",
|
|
13
|
-
"@capacitor/push-notifications": "^5.0.0"
|
|
14
|
-
},
|
|
15
|
-
"module": "fesm2015/kolektor-nucleus-notifications.mjs",
|
|
16
|
-
"es2020": "fesm2020/kolektor-nucleus-notifications.mjs",
|
|
17
|
-
"esm2020": "esm2020/kolektor-nucleus-notifications.mjs",
|
|
18
|
-
"fesm2020": "fesm2020/kolektor-nucleus-notifications.mjs",
|
|
19
|
-
"fesm2015": "fesm2015/kolektor-nucleus-notifications.mjs",
|
|
20
|
-
"typings": "index.d.ts",
|
|
21
|
-
"exports": {
|
|
22
|
-
"./package.json": {
|
|
23
|
-
"default": "./package.json"
|
|
2
|
+
"name": "@kolektor/nucleus-notifications",
|
|
3
|
+
"version": "0.1.130-pre.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.2.0",
|
|
6
|
+
"@angular/core": "^16.2.0",
|
|
7
|
+
"@angular/service-worker": "^16.2.0",
|
|
8
|
+
"@kolektor/nucleus-common": "^0.0.12-pre",
|
|
9
|
+
"@capacitor/push-notifications": "^5.0.0",
|
|
10
|
+
"rxjs": "~7.8.0"
|
|
24
11
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/kolektor-nucleus-notifications.mjs",
|
|
14
|
+
"typings": "index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./index.d.ts",
|
|
21
|
+
"esm2022": "./esm2022/kolektor-nucleus-notifications.mjs",
|
|
22
|
+
"esm": "./esm2022/kolektor-nucleus-notifications.mjs",
|
|
23
|
+
"default": "./fesm2022/kolektor-nucleus-notifications.mjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"tslib": "^2.3.0"
|
|
32
28
|
}
|
|
33
|
-
},
|
|
34
|
-
"sideEffects": false
|
|
35
29
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia29sZWt0b3ItbnVjbGV1cy1ub3RpZmljYXRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvbnVjbGV1cy1ub3RpZmljYXRpb25zL3NyYy9rb2xla3Rvci1udWNsZXVzLW5vdGlmaWNhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
package/esm2020/lib/models.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export class Notification {
|
|
2
|
-
}
|
|
3
|
-
export class Identity {
|
|
4
|
-
}
|
|
5
|
-
export class Recipient {
|
|
6
|
-
}
|
|
7
|
-
export class NotificationData {
|
|
8
|
-
}
|
|
9
|
-
export class WebKey {
|
|
10
|
-
}
|
|
11
|
-
export class Registration {
|
|
12
|
-
}
|
|
13
|
-
export class RegistrationResult {
|
|
14
|
-
}
|
|
15
|
-
export class PayloadData {
|
|
16
|
-
}
|
|
17
|
-
export class NucleusNotificationsConfig {
|
|
18
|
-
}
|
|
19
|
-
export class NotificationClick {
|
|
20
|
-
}
|
|
21
|
-
export class UserChannelConfig {
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbnVjbGV1cy1ub3RpZmljYXRpb25zL3NyYy9saWIvbW9kZWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBTyxZQUFZO0NBT3hCO0FBRUQsTUFBTSxPQUFPLFFBQVE7Q0FJcEI7QUFFRCxNQUFNLE9BQU8sU0FBUztDQUlyQjtBQUVELE1BQU0sT0FBTyxnQkFBZ0I7Q0FNNUI7QUFFRCxNQUFNLE9BQU8sTUFBTTtDQUVsQjtBQUVELE1BQU0sT0FBTyxZQUFZO0NBSXhCO0FBRUQsTUFBTSxPQUFPLGtCQUFrQjtDQUU5QjtBQUVELE1BQU0sT0FBTyxXQUFXO0NBR3ZCO0FBRUQsTUFBTSxPQUFPLDBCQUEwQjtDQUV0QztBQUVELE1BQU0sT0FBTyxpQkFBaUI7Q0FJN0I7QUFhRCxNQUFNLE9BQU8saUJBQWlCO0NBTzdCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNsYXNzIE5vdGlmaWNhdGlvbiB7XHJcbiAgcHVibGljIGlkOiBzdHJpbm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eXBlO1xyXG4gIG1ldGhvZHM6IE5vdGlmeU1ldGhvZFtdO1xyXG4gIGFsbG93ZWRNZXRob2RzOiBOb3RpZnlNZXRob2RbXTtcclxufVxyXG5cclxuZXhwb3J0IHR5cGUgQ2hhbm5lbFN1YnNjcmlwdGlvblR5cGUgPSAnaW52YXJpYW50JyB8ICdvcHRJbicgfCAnb3B0T3V0JztcclxuXHJcbmV4cG9ydCB0eXBlIE5vdGlmeU1ldGhvZCA9ICdwdXNoJyB8ICdlbWFpbCcgfCAnc21zJztcclxuIl19
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { NucleusNotificationsConfig } from './models';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class NucleusNotificationsModule {
|
|
5
|
-
static forRoot(config) {
|
|
6
|
-
return {
|
|
7
|
-
ngModule: NucleusNotificationsModule,
|
|
8
|
-
providers: [
|
|
9
|
-
{ provide: NucleusNotificationsConfig, useValue: config }
|
|
10
|
-
]
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
NucleusNotificationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucleusNotificationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15
|
-
NucleusNotificationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: NucleusNotificationsModule });
|
|
16
|
-
NucleusNotificationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucleusNotificationsModule });
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: NucleusNotificationsModule, decorators: [{
|
|
18
|
-
type: NgModule,
|
|
19
|
-
args: [{
|
|
20
|
-
declarations: [],
|
|
21
|
-
imports: [],
|
|
22
|
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