@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: mongoose.Types.ObjectId;
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: 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"]}
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"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.3.284
25
+ Version: 1.3.285
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.3.284",
3
+ "version": "1.3.285",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.3.284",
3
+ "version": "1.3.285",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",