@lyxa.ai/core 1.1.63 → 1.1.64

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.
@@ -28,11 +28,11 @@ export declare const REGISTRY: {
28
28
  type: import("../../../utilities/enum").UserRef;
29
29
  id: import("mongoose").Types.ObjectId;
30
30
  }>;
31
- content: import("zod").ZodString | import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
31
+ content: import("zod").ZodOptional<import("zod").ZodString> | import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>>;
32
+ imageUrl: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString | import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>, "many">>;
32
33
  chatroomId: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
33
34
  createdAt: import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodDate, Date, Date>, Date, Date>;
34
35
  }, "strip", import("zod").ZodTypeAny, {
35
- content: string;
36
36
  _id: import("mongoose").Types.ObjectId;
37
37
  createdAt: Date;
38
38
  sender: {
@@ -41,9 +41,10 @@ export declare const REGISTRY: {
41
41
  };
42
42
  senderType: import("../../../utilities/enum").UserRef;
43
43
  senderId: import("mongoose").Types.ObjectId;
44
+ content?: string | undefined;
44
45
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
46
+ imageUrl?: string[] | undefined;
45
47
  }, {
46
- content: string;
47
48
  _id: import("mongoose").Types.ObjectId;
48
49
  createdAt: Date;
49
50
  sender: {
@@ -52,7 +53,9 @@ export declare const REGISTRY: {
52
53
  };
53
54
  senderType: import("../../../utilities/enum").UserRef;
54
55
  senderId: import("mongoose").Types.ObjectId;
56
+ content?: string | undefined;
55
57
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
58
+ imageUrl?: string[] | undefined;
56
59
  }>;
57
60
  };
58
61
  readonly identifier: typeof ChatroomMessageSendSocketEvent.identifier;
@@ -24,11 +24,11 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
24
24
  type: UserRef;
25
25
  id: import("mongoose").Types.ObjectId;
26
26
  }>;
27
- content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
27
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
28
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
28
29
  chatroomId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
29
30
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
30
31
  }, "strip", z.ZodTypeAny, {
31
- content: string;
32
32
  _id: import("mongoose").Types.ObjectId;
33
33
  createdAt: Date;
34
34
  sender: {
@@ -37,9 +37,10 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
37
37
  };
38
38
  senderType: UserRef;
39
39
  senderId: import("mongoose").Types.ObjectId;
40
+ content?: string | undefined;
40
41
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
42
+ imageUrl?: string[] | undefined;
41
43
  }, {
42
- content: string;
43
44
  _id: import("mongoose").Types.ObjectId;
44
45
  createdAt: Date;
45
46
  sender: {
@@ -48,7 +49,9 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
48
49
  };
49
50
  senderType: UserRef;
50
51
  senderId: import("mongoose").Types.ObjectId;
52
+ content?: string | undefined;
51
53
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
54
+ imageUrl?: string[] | undefined;
52
55
  }>;
53
56
  export type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;
54
57
  export type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;
@@ -75,11 +78,11 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
75
78
  type: UserRef;
76
79
  id: import("mongoose").Types.ObjectId;
77
80
  }>;
78
- content: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
81
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
82
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
79
83
  chatroomId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
80
84
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
81
85
  }, "strip", z.ZodTypeAny, {
82
- content: string;
83
86
  _id: import("mongoose").Types.ObjectId;
84
87
  createdAt: Date;
85
88
  sender: {
@@ -88,9 +91,10 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
88
91
  };
89
92
  senderType: UserRef;
90
93
  senderId: import("mongoose").Types.ObjectId;
94
+ content?: string | undefined;
91
95
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
96
+ imageUrl?: string[] | undefined;
92
97
  }, {
93
- content: string;
94
98
  _id: import("mongoose").Types.ObjectId;
95
99
  createdAt: Date;
96
100
  sender: {
@@ -99,7 +103,9 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
99
103
  };
100
104
  senderType: UserRef;
101
105
  senderId: import("mongoose").Types.ObjectId;
106
+ content?: string | undefined;
102
107
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
108
+ imageUrl?: string[] | undefined;
103
109
  }>;
104
110
  };
105
111
  notification(): NotificationSocketEvent | null;
@@ -20,7 +20,8 @@ exports.ChatroomMessageSendOutputSchema = zod_1.default.object({
20
20
  id: validation_1.ZodValidation.coerce.objectId('sender.id'),
21
21
  type: validation_1.ZodValidation.enumType(enum_1.UserRef, 'sender.type'),
22
22
  }),
23
- content: validation_1.ZodValidation.string('content', { minLength: 1, maxLength: 1000 }),
23
+ content: validation_1.ZodValidation.string('content', { minLength: 1, maxLength: 1000 }).optional(),
24
+ imageUrl: zod_1.default.array(validation_1.ZodValidation.string('imageUrl')).optional(),
24
25
  chatroomId: validation_1.ZodValidation.coerce.objectId('chatroomId').optional(),
25
26
  createdAt: validation_1.ZodValidation.coerce.date(),
26
27
  });
@@ -1 +1 @@
1
- {"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAmE;AACnE,8DAA6E;AAC7E,wDAAqD;AACrD,2EAAsE;AAEzD,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,qBAAQ;CACpB,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;IACzC,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;IACnD,UAAU,EAAE,0BAAa,CAAC,QAAQ,CAAC,cAAO,EAAE,YAAY,CAAC;IACzD,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;QAChB,EAAE,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC9C,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,cAAO,EAAE,aAAa,CAAC;KACpD,CAAC;IACF,OAAO,EAAE,0BAAa,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAC3E,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;IAClE,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,EAAE;CACtC,CAAC,CAAC;AAKH,MAAa,8BAA+B,SAAQ,iCAGnD;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,4CAAoC;QAC3C,MAAM,EAAE,uCAA+B;KACvC,CAAC;IAEK,YAAY;QAClB,OAAO,IAAI,mDAAuB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAChE,CAAC;IAEM,gBAAgB;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YAAY,OAA2C;QACtD,KAAK,CAAC,sBAAe,CAAC,qBAAqB,EAAE,8BAA8B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/F,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAA2D;QAC5E,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;;AAvBF,wEAwBC","sourcesContent":["import z from 'zod';\nimport { SocketEventType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSocketEvent } from './notification.socket.event';\n\nexport const ChatroomMessageSendSocketInputSchema = z.object({\n\tchatroomId: IdSchema,\n});\n\nexport const ChatroomMessageSendOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId('_id'),\n\tsenderId: ZodValidation.coerce.objectId('senderId'), // DEPRECATED\n\tsenderType: ZodValidation.enumType(UserRef, 'senderType'), // DEPRECATED\n\tsender: z.object({\n\t\tid: ZodValidation.coerce.objectId('sender.id'),\n\t\ttype: ZodValidation.enumType(UserRef, 'sender.type'),\n\t}),\n\tcontent: ZodValidation.string('content', { minLength: 1, maxLength: 1000 }),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;\nexport type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;\n\nexport class ChatroomMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatroomMessageSendSocketInputSchema,\n\ttypeof ChatroomMessageSendOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t};\n\n\tpublic notification(): NotificationSocketEvent | null {\n\t\treturn new NotificationSocketEvent({ message: `New message` });\n\t}\n\n\tpublic pushNotification(): NotificationSocketEvent | null {\n\t\treturn null;\n\t}\n\n\tconstructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\tsuper(SocketEventType.CHATROOM_MESSAGE_SEND, ChatroomMessageSendSocketEvent.schemas, payload);\n\t}\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\n\t}\n}\n"]}
1
+ {"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAmE;AACnE,8DAA6E;AAC7E,wDAAqD;AACrD,2EAAsE;AAEzD,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,qBAAQ;CACpB,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;IACzC,QAAQ,EAAE,0BAAa,CAAC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["import z from 'zod';\nimport { SocketEventType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSocketEvent } from './notification.socket.event';\n\nexport const ChatroomMessageSendSocketInputSchema = z.object({\n\tchatroomId: IdSchema,\n});\n\nexport const ChatroomMessageSendOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId('_id'),\n\tsenderId: ZodValidation.coerce.objectId('senderId'), // DEPRECATED\n\tsenderType: ZodValidation.enumType(UserRef, 'senderType'), // DEPRECATED\n\tsender: z.object({\n\t\tid: ZodValidation.coerce.objectId('sender.id'),\n\t\ttype: ZodValidation.enumType(UserRef, 'sender.type'),\n\t}),\n\tcontent: ZodValidation.string('content', { minLength: 1, maxLength: 1000 }).optional(),\n\timageUrl: z.array(ZodValidation.string('imageUrl')).optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;\nexport type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;\n\nexport class ChatroomMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatroomMessageSendSocketInputSchema,\n\ttypeof ChatroomMessageSendOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t};\n\n\tpublic notification(): NotificationSocketEvent | null {\n\t\treturn new NotificationSocketEvent({ message: `New message` });\n\t}\n\n\tpublic pushNotification(): NotificationSocketEvent | null {\n\t\treturn null;\n\t}\n\n\tconstructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\tsuper(SocketEventType.CHATROOM_MESSAGE_SEND, ChatroomMessageSendSocketEvent.schemas, payload);\n\t}\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\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.1.63
25
+ Version: 1.1.64
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
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.1.63",
3
+ "version": "1.1.64",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",