@lyxa.ai/core 1.3.284 → 1.3.285
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.
|
@@ -4,7 +4,7 @@ import mongoose from 'mongoose';
|
|
|
4
4
|
import { FCMNotificationPayload } from '../firebase/fcmService';
|
|
5
5
|
export interface NotificationEventData {
|
|
6
6
|
accountType: NotificationAccountType;
|
|
7
|
-
recipientId
|
|
7
|
+
recipientId?: mongoose.Types.ObjectId;
|
|
8
8
|
isGlobal: boolean;
|
|
9
9
|
isClickable: boolean;
|
|
10
10
|
clickType?: ClickType | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/notification/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAqG;AACrG,kDAA+C;AAC/C,wDAAgC;AAmBhC,MAAa,iBAAkB,SAAQ,qBAAgC;IACtE,YAAY,OAAuC;QAClD,MAAM,WAAW,GAA0B;YAC1C,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,8BAAuB,CAAC,IAAI;YACzC,WAAW,EAAE,IAAI,kBAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE;SAC1C,CAAC;QACF,MAAM,YAAY,GAA0B;YAC3C,GAAG,OAAO;YACV,IAAI,EAAE;gBACL,GAAG,WAAW;gBACd,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;aACvB;SACD,CAAC;QAEF,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrC,CAAC;CACD;AAlBD,8CAkBC","sourcesContent":["import { ClickType, NotificationAccountType, PushNotificationEventType } from '../../utilities/enum';\nimport { BaseEvent } from '../event/BaseEvent';\nimport mongoose from 'mongoose';\nimport { FCMNotificationPayload } from '../firebase/fcmService';\n\nexport interface NotificationEventData {\n\taccountType: NotificationAccountType;\n\trecipientId
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/notification/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAqG;AACrG,kDAA+C;AAC/C,wDAAgC;AAmBhC,MAAa,iBAAkB,SAAQ,qBAAgC;IACtE,YAAY,OAAuC;QAClD,MAAM,WAAW,GAA0B;YAC1C,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,8BAAuB,CAAC,IAAI;YACzC,WAAW,EAAE,IAAI,kBAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE;SAC1C,CAAC;QACF,MAAM,YAAY,GAA0B;YAC3C,GAAG,OAAO;YACV,IAAI,EAAE;gBACL,GAAG,WAAW;gBACd,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;aACvB;SACD,CAAC;QAEF,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IACrC,CAAC;CACD;AAlBD,8CAkBC","sourcesContent":["import { ClickType, NotificationAccountType, PushNotificationEventType } from '../../utilities/enum';\nimport { BaseEvent } from '../event/BaseEvent';\nimport mongoose from 'mongoose';\nimport { FCMNotificationPayload } from '../firebase/fcmService';\n\nexport interface NotificationEventData {\n\taccountType: NotificationAccountType;\n\trecipientId?: mongoose.Types.ObjectId;\n\tisGlobal: boolean;\n\tisClickable: boolean;\n\tclickType?: ClickType | null;\n\tclickableUrl?: string | null;\n\tnotificationType?: PushNotificationEventType;\n\n\t[key: string]: any;\n}\n\nexport interface NotificationEventType extends Omit<FCMNotificationPayload, 'data'> {\n\tdata: NotificationEventData;\n}\n\nexport class NotificationEvent extends BaseEvent<NotificationEventType> {\n\tconstructor(payload: Partial<NotificationEventType>) {\n\t\tconst defaultData: NotificationEventData = {\n\t\t\tisClickable: false,\n\t\t\tisGlobal: false,\n\t\t\taccountType: NotificationAccountType.USER,\n\t\t\trecipientId: new mongoose.Types.ObjectId(),\n\t\t};\n\t\tconst finalPayload: NotificationEventType = {\n\t\t\t...payload,\n\t\t\tdata: {\n\t\t\t\t...defaultData,\n\t\t\t\t...(payload.data || {}),\n\t\t\t},\n\t\t};\n\n\t\tsuper('notification', finalPayload);\n\t}\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED