@lyxa.ai/core 1.3.17 → 1.3.19
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/dist/libraries/socket/core/socket-event-registry.map.d.ts +2 -1
- package/dist/libraries/socket/core/socket-event-registry.map.js +2 -1
- package/dist/libraries/socket/core/socket-event-registry.map.js.map +1 -1
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +15 -85
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.js +7 -9
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.js.map +1 -1
- package/dist/libraries/socket/events/index.d.ts +0 -1
- package/dist/libraries/socket/events/index.js +0 -1
- package/dist/libraries/socket/events/index.js.map +1 -1
- package/dist/libraries/socket/events/ticket-actions.socket.event.d.ts +19 -7
- package/dist/libraries/socket/events/ticket-actions.socket.event.js +8 -2
- package/dist/libraries/socket/events/ticket-actions.socket.event.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatlistMessageSendSocketEvent
|
|
1
|
+
import { ChatlistMessageSendSocketEvent } from '../events';
|
|
2
2
|
import { TicketAssignEvent } from '../events/ticket-assign.socket.event';
|
|
3
3
|
import { TicketUnassignEvent } from '../events/ticket-unassign.socket.event';
|
|
4
4
|
import { NotificationSocketEvent } from '../events/notification.socket.event';
|
|
@@ -7,6 +7,7 @@ import { RiderLocationUpdateSocketEvent } from '../events/rider-location-update.
|
|
|
7
7
|
import { TicketActionsSocketEvent } from '../events/ticket-actions.socket.event';
|
|
8
8
|
import type { ZodTypeAny } from 'zod';
|
|
9
9
|
import { OrderActionsSocketEvent } from '../events/order-actions.socket.event';
|
|
10
|
+
import { ChatroomMessageSendSocketEvent } from '../events/chatroom-message-send.socket.event';
|
|
10
11
|
export declare const REGISTRY: {
|
|
11
12
|
readonly CHATROOM_MESSAGE_SEND: typeof ChatroomMessageSendSocketEvent;
|
|
12
13
|
readonly CHATLIST_MESSAGE_RECEIVED: typeof ChatlistMessageSendSocketEvent;
|
|
@@ -12,8 +12,9 @@ const rider_connect_socket_event_1 = require("../events/rider-connect.socket.eve
|
|
|
12
12
|
const rider_location_update_socket_event_1 = require("../events/rider-location-update.socket.event");
|
|
13
13
|
const ticket_actions_socket_event_1 = require("../events/ticket-actions.socket.event");
|
|
14
14
|
const order_actions_socket_event_1 = require("../events/order-actions.socket.event");
|
|
15
|
+
const chatroom_message_send_socket_event_1 = require("../events/chatroom-message-send.socket.event");
|
|
15
16
|
exports.REGISTRY = {
|
|
16
|
-
[enum_1.SocketEventType.CHATROOM_MESSAGE_SEND]:
|
|
17
|
+
[enum_1.SocketEventType.CHATROOM_MESSAGE_SEND]: chatroom_message_send_socket_event_1.ChatroomMessageSendSocketEvent,
|
|
17
18
|
[enum_1.SocketEventType.CHATLIST_MESSAGE_RECEIVED]: events_1.ChatlistMessageSendSocketEvent,
|
|
18
19
|
[enum_1.SocketEventType.TICKET_ASSIGN]: ticket_assign_socket_event_1.TicketAssignEvent,
|
|
19
20
|
[enum_1.SocketEventType.TICKET_UNASSIGN]: ticket_unassign_socket_event_1.TicketUnassignEvent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-event-registry.map.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-registry.map.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"socket-event-registry.map.js","sourceRoot":"/","sources":["libraries/socket/core/socket-event-registry.map.ts"],"names":[],"mappings":";;;AAkCA,gCAEC;AAGD,sCAUC;AAjDD,kDAA0D;AAC1D,sCAA2D;AAC3D,qFAAyE;AACzE,yFAA6E;AAC7E,mFAA8E;AAC9E,qFAA+E;AAC/E,qGAA8F;AAC9F,uFAAiF;AAEjF,qFAA+E;AAC/E,qGAA8F;AAEjF,QAAA,QAAQ,GAAG;IACvB,CAAC,sBAAe,CAAC,qBAAqB,CAAC,EAAE,mEAA8B;IACvE,CAAC,sBAAe,CAAC,yBAAyB,CAAC,EAAE,uCAA8B;IAC3E,CAAC,sBAAe,CAAC,aAAa,CAAC,EAAE,8CAAiB;IAClD,CAAC,sBAAe,CAAC,eAAe,CAAC,EAAE,kDAAmB;IACtD,CAAC,sBAAe,CAAC,YAAY,CAAC,EAAE,mDAAuB;IACvD,CAAC,sBAAe,CAAC,aAAa,CAAC,EAAE,oDAAuB;IACxD,CAAC,sBAAe,CAAC,qBAAqB,CAAC,EAAE,mEAA8B;IACvE,CAAC,sBAAe,CAAC,cAAc,CAAC,EAAE,sDAAwB;IAC1D,CAAC,sBAAe,CAAC,aAAa,CAAC,EAAE,oDAAuB;CAC/C,CAAC;AAYX,SAAgB,UAAU,CAAsC,UAAa;IAC5E,OAAO,UAAU,CAAC,OAAO,CAAC;AAC3B,CAAC;AAGD,SAAgB,aAAa,CAC5B,UAAa;IAEb,MAAM,aAAa,GAClB,YAAY,IAAI,UAAU,IAAI,OAAQ,UAAqC,CAAC,UAAU,KAAK,UAAU,CAAC;IACvG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAE,UAAoC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAIxE,CAAC;AACd,CAAC","sourcesContent":["import { SocketEventType } from '../../../utilities/enum';\nimport { ChatlistMessageSendSocketEvent } from '../events';\nimport { TicketAssignEvent } from '../events/ticket-assign.socket.event';\nimport { TicketUnassignEvent } from '../events/ticket-unassign.socket.event';\nimport { NotificationSocketEvent } from '../events/notification.socket.event';\nimport { RiderConnectSocketEvent } from '../events/rider-connect.socket.event';\nimport { RiderLocationUpdateSocketEvent } from '../events/rider-location-update.socket.event';\nimport { TicketActionsSocketEvent } from '../events/ticket-actions.socket.event';\nimport type { ZodTypeAny } from 'zod';\nimport { OrderActionsSocketEvent } from '../events/order-actions.socket.event';\nimport { ChatroomMessageSendSocketEvent } from '../events/chatroom-message-send.socket.event';\n\nexport const REGISTRY = {\n\t[SocketEventType.CHATROOM_MESSAGE_SEND]: ChatroomMessageSendSocketEvent,\n\t[SocketEventType.CHATLIST_MESSAGE_RECEIVED]: ChatlistMessageSendSocketEvent,\n\t[SocketEventType.TICKET_ASSIGN]: TicketAssignEvent,\n\t[SocketEventType.TICKET_UNASSIGN]: TicketUnassignEvent,\n\t[SocketEventType.NOTIFICATION]: NotificationSocketEvent,\n\t[SocketEventType.RIDER_CONNECT]: RiderConnectSocketEvent,\n\t[SocketEventType.RIDER_LOCATION_UPDATE]: RiderLocationUpdateSocketEvent,\n\t[SocketEventType.TICKET_ACTIONS]: TicketActionsSocketEvent,\n\t[SocketEventType.ORDER_ACTIONS]: OrderActionsSocketEvent,\n} as const;\n\nexport type Registry = typeof REGISTRY;\n\n// Type-safe schema structure constraint\ntype EventSchemas = {\n\tinput: ZodTypeAny;\n\toutput: ZodTypeAny;\n\tpushNotificationOutput?: ZodTypeAny;\n};\n\n// Extract schemas from event class with full type inference\nexport function getSchemas<T extends { schemas: EventSchemas }>(eventClass: T): T['schemas'] {\n\treturn eventClass.schemas;\n}\n\n// Extract identifier function if present, otherwise undefined\nexport function getIdentifier<T extends object>(\n\teventClass: T\n): T extends { identifier: infer I } ? I : undefined {\n\tconst hasIdentifier =\n\t\t'identifier' in eventClass && typeof (eventClass as { identifier?: never }).identifier === 'function';\n\treturn (hasIdentifier ? (eventClass as { identifier: never }).identifier : undefined) as T extends {\n\t\tidentifier: infer I;\n\t}\n\t\t? I\n\t\t: undefined;\n}\n"]}
|
|
@@ -101,9 +101,20 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
|
|
|
101
101
|
content?: string | undefined;
|
|
102
102
|
chatroomId?: import("mongoose").Types.ObjectId | undefined;
|
|
103
103
|
}>;
|
|
104
|
+
export declare const ChatroomMessageSendPushOutputSchema: z.ZodObject<{
|
|
105
|
+
lastMessage: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
106
|
+
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>>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
lastMessage?: string | undefined;
|
|
109
|
+
chatroomId?: import("mongoose").Types.ObjectId | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
lastMessage?: string | undefined;
|
|
112
|
+
chatroomId?: import("mongoose").Types.ObjectId | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
export type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;
|
|
104
115
|
export type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;
|
|
105
116
|
export type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;
|
|
106
|
-
export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<typeof ChatroomMessageSendSocketInputSchema, typeof ChatroomMessageSendOutputSchema, typeof
|
|
117
|
+
export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<typeof ChatroomMessageSendSocketInputSchema, typeof ChatroomMessageSendOutputSchema, typeof ChatroomMessageSendPushOutputSchema> {
|
|
107
118
|
static readonly schemas: {
|
|
108
119
|
input: z.ZodObject<{
|
|
109
120
|
chatroomId: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
@@ -204,94 +215,13 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
|
|
|
204
215
|
chatroomId?: import("mongoose").Types.ObjectId | undefined;
|
|
205
216
|
}>;
|
|
206
217
|
pushNotificationOutput: z.ZodObject<{
|
|
207
|
-
|
|
208
|
-
senderId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
209
|
-
senderType: z.ZodNativeEnum<typeof UserRef>;
|
|
210
|
-
sender: z.ZodObject<{
|
|
211
|
-
id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
212
|
-
type: z.ZodNativeEnum<typeof UserRef>;
|
|
213
|
-
}, "strip", z.ZodTypeAny, {
|
|
214
|
-
type: UserRef;
|
|
215
|
-
id: import("mongoose").Types.ObjectId;
|
|
216
|
-
}, {
|
|
217
|
-
type: UserRef;
|
|
218
|
-
id: import("mongoose").Types.ObjectId;
|
|
219
|
-
}>;
|
|
220
|
-
content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
221
|
-
media: z.ZodArray<z.ZodObject<{
|
|
222
|
-
mimeType: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
223
|
-
mediaType: z.ZodNativeEnum<typeof MediaType>;
|
|
224
|
-
mediaUrl: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
225
|
-
thumbnailUrl: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
226
|
-
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
227
|
-
}, "strip", z.ZodTypeAny, {
|
|
228
|
-
mediaType: MediaType;
|
|
229
|
-
mediaUrl: string;
|
|
230
|
-
mimeType: string;
|
|
231
|
-
name?: string | undefined;
|
|
232
|
-
thumbnailUrl?: string | undefined;
|
|
233
|
-
}, {
|
|
234
|
-
mediaType: MediaType;
|
|
235
|
-
mediaUrl: string;
|
|
236
|
-
mimeType: string;
|
|
237
|
-
name?: string | undefined;
|
|
238
|
-
thumbnailUrl?: string | undefined;
|
|
239
|
-
}>, "many">;
|
|
240
|
-
location: z.ZodOptional<z.ZodObject<{
|
|
241
|
-
longitude: z.ZodOptional<z.ZodNumber>;
|
|
242
|
-
latitude: z.ZodOptional<z.ZodNumber>;
|
|
243
|
-
}, "strip", z.ZodTypeAny, {
|
|
244
|
-
latitude?: number | undefined;
|
|
245
|
-
longitude?: number | undefined;
|
|
246
|
-
}, {
|
|
247
|
-
latitude?: number | undefined;
|
|
248
|
-
longitude?: number | undefined;
|
|
249
|
-
}>>;
|
|
218
|
+
lastMessage: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
250
219
|
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>>;
|
|
251
|
-
createdAt: z.ZodEffects<z.ZodEffects<z.ZodDate, Date, Date>, Date, Date>;
|
|
252
220
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
|
|
254
|
-
mediaType: MediaType;
|
|
255
|
-
mediaUrl: string;
|
|
256
|
-
mimeType: string;
|
|
257
|
-
name?: string | undefined;
|
|
258
|
-
thumbnailUrl?: string | undefined;
|
|
259
|
-
}[];
|
|
260
|
-
_id: import("mongoose").Types.ObjectId;
|
|
261
|
-
createdAt: Date;
|
|
262
|
-
sender: {
|
|
263
|
-
type: UserRef;
|
|
264
|
-
id: import("mongoose").Types.ObjectId;
|
|
265
|
-
};
|
|
266
|
-
senderType: UserRef;
|
|
267
|
-
senderId: import("mongoose").Types.ObjectId;
|
|
268
|
-
location?: {
|
|
269
|
-
latitude?: number | undefined;
|
|
270
|
-
longitude?: number | undefined;
|
|
271
|
-
} | undefined;
|
|
272
|
-
content?: string | undefined;
|
|
221
|
+
lastMessage?: string | undefined;
|
|
273
222
|
chatroomId?: import("mongoose").Types.ObjectId | undefined;
|
|
274
223
|
}, {
|
|
275
|
-
|
|
276
|
-
mediaType: MediaType;
|
|
277
|
-
mediaUrl: string;
|
|
278
|
-
mimeType: string;
|
|
279
|
-
name?: string | undefined;
|
|
280
|
-
thumbnailUrl?: string | undefined;
|
|
281
|
-
}[];
|
|
282
|
-
_id: import("mongoose").Types.ObjectId;
|
|
283
|
-
createdAt: Date;
|
|
284
|
-
sender: {
|
|
285
|
-
type: UserRef;
|
|
286
|
-
id: import("mongoose").Types.ObjectId;
|
|
287
|
-
};
|
|
288
|
-
senderType: UserRef;
|
|
289
|
-
senderId: import("mongoose").Types.ObjectId;
|
|
290
|
-
location?: {
|
|
291
|
-
latitude?: number | undefined;
|
|
292
|
-
longitude?: number | undefined;
|
|
293
|
-
} | undefined;
|
|
294
|
-
content?: string | undefined;
|
|
224
|
+
lastMessage?: string | undefined;
|
|
295
225
|
chatroomId?: import("mongoose").Types.ObjectId | undefined;
|
|
296
226
|
}>;
|
|
297
227
|
};
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ChatroomMessageSendSocketEvent = exports.ChatroomMessageSendOutputSchema = exports.ChatroomMessageSendSocketInputSchema = void 0;
|
|
6
|
+
exports.ChatroomMessageSendSocketEvent = exports.ChatroomMessageSendPushOutputSchema = exports.ChatroomMessageSendOutputSchema = exports.ChatroomMessageSendSocketInputSchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
const enum_1 = require("../../../utilities/enum");
|
|
9
9
|
const validation_1 = require("../../../utilities/validation");
|
|
@@ -36,11 +36,15 @@ exports.ChatroomMessageSendOutputSchema = zod_1.default.object({
|
|
|
36
36
|
chatroomId: validation_1.ZodValidation.coerce.objectId('chatroomId').optional(),
|
|
37
37
|
createdAt: validation_1.ZodValidation.coerce.date(),
|
|
38
38
|
});
|
|
39
|
+
exports.ChatroomMessageSendPushOutputSchema = zod_1.default.object({
|
|
40
|
+
lastMessage: validation_1.ZodValidation.string('lastMessage').optional(),
|
|
41
|
+
chatroomId: validation_1.ZodValidation.coerce.objectId('chatroomId').optional(),
|
|
42
|
+
});
|
|
39
43
|
class ChatroomMessageSendSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
40
44
|
static schemas = {
|
|
41
45
|
input: exports.ChatroomMessageSendSocketInputSchema,
|
|
42
46
|
output: exports.ChatroomMessageSendOutputSchema,
|
|
43
|
-
pushNotificationOutput: exports.
|
|
47
|
+
pushNotificationOutput: exports.ChatroomMessageSendPushOutputSchema,
|
|
44
48
|
};
|
|
45
49
|
get notificationSettings() {
|
|
46
50
|
return {
|
|
@@ -51,13 +55,7 @@ class ChatroomMessageSendSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
51
55
|
}
|
|
52
56
|
constructor(payload) {
|
|
53
57
|
const pushPayload = {
|
|
54
|
-
|
|
55
|
-
sender: payload.sender,
|
|
56
|
-
content: payload.content,
|
|
57
|
-
createdAt: payload.createdAt,
|
|
58
|
-
senderId: payload.senderId,
|
|
59
|
-
senderType: payload.senderType,
|
|
60
|
-
media: [],
|
|
58
|
+
lastMessage: payload.content,
|
|
61
59
|
chatroomId: payload.chatroomId,
|
|
62
60
|
};
|
|
63
61
|
super(enum_1.SocketEventType.CHATROOM_MESSAGE_SEND, ChatroomMessageSendSocketEvent.schemas, payload, pushPayload);
|
|
@@ -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,kDAAyF;AACzF,8DAA6E;AAC7E,wDAAqD;AAGxC,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CA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AE;IACZ,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;
|
|
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,kDAAyF;AACzF,8DAA6E;AAC7E,wDAAqD;AAGxC,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,CAAC,CAAC,QAAQ,EAAE;IACnD,KAAK,EAAE,aAAC,CAAC,KAAK,CACb,aAAC,CAAC,MAAM,CAAC;QACR,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,UAAU,CAAC;QAC1C,SAAS,EAAE,0BAAa,CAAC,QAAQ,CAAC,gBAAS,EAAE,WAAW,CAAC;QACzD,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,KAAK,CAAC;QACrC,YAAY,EAAE,0BAAa,C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ACJ,sBAAe,CAAC,qBAAqB,EACrC,8BAA8B,CAAC,OAAO,EACtC,OAAO,EACP,WAAW,CACX,CAAC;IACH,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAA2D;QAC5E,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;IAES,aAAa;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,SAAS,CAAC;IACtD,CAAC;;AAvCF,wEAwCC","sourcesContent":["import z from 'zod';\nimport { ClickType, MediaType, SocketEventType, UserRef } from '../../../utilities/enum';\nimport { DTO, IdSchema, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\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').optional(),\n\tmedia: z.array(\n\t\tz.object({\n\t\t\tmimeType: ZodValidation.string('mimeType'),\n\t\t\tmediaType: ZodValidation.enumType(MediaType, 'mediaType'),\n\t\t\tmediaUrl: ZodValidation.string('url'),\n\t\t\tthumbnailUrl: ZodValidation.string('thumbnailUrl').optional(),\n\t\t\tname: ZodValidation.string('name').optional(),\n\t\t})\n\t),\n\tlocation: z\n\t\t.object({\n\t\t\tlongitude: ZodValidation.coerce.number('longitude').optional(),\n\t\t\tlatitude: ZodValidation.coerce.number('latitude').optional(),\n\t\t})\n\t\t.optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport const ChatroomMessageSendPushOutputSchema = z.object({\n\tlastMessage: ZodValidation.string('lastMessage').optional(),\n\tchatroomId: ZodValidation.coerce.objectId('chatroomId').optional(),\n});\n\nexport type ChatlistMessageSendPushOutputDTO = DTO<typeof ChatroomMessageSendPushOutputSchema>;\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\ttypeof ChatroomMessageSendPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t\tpushNotificationOutput: ChatroomMessageSendPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_MESSAGE,\n\t\t};\n\t}\n\n\tconstructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\tconst pushPayload: ChatlistMessageSendPushOutputDTO = {\n\t\t\tlastMessage: payload.content,\n\t\t\tchatroomId: payload.chatroomId,\n\t\t};\n\n\t\tsuper(\n\t\t\tSocketEventType.CHATROOM_MESSAGE_SEND,\n\t\t\tChatroomMessageSendSocketEvent.schemas,\n\t\t\tpayload,\n\t\t\tpushPayload\n\t\t);\n\t}\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn this.data.chatroomId?.toString() ?? 'default';\n\t}\n}\n"]}
|
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./chatlist-message-send.socket.event"), exports);
|
|
18
|
-
__exportStar(require("./chatroom-message-send.socket.event"), exports);
|
|
19
18
|
__exportStar(require("./notification.socket.event"), exports);
|
|
20
19
|
__exportStar(require("./rider-connect.socket.event"), exports);
|
|
21
20
|
__exportStar(require("./rider-location-update.socket.event"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/socket/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"/","sources":["libraries/socket/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD;AACrD,8DAA4C;AAC5C,+DAA6C;AAC7C,uEAAqD;AACrD,+DAA6C;AAC7C,iEAA+C;AAC/C,+DAA6C","sourcesContent":["export * from './chatlist-message-send.socket.event';\nexport * from './notification.socket.event';\nexport * from './rider-connect.socket.event';\nexport * from './rider-location-update.socket.event';\nexport * from './ticket-assign.socket.event';\nexport * from './ticket-unassign.socket.event';\nexport * from './order-actions.socket.event';"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import { TicketStatus } from '../../../utilities/enum';
|
|
2
|
+
import { TicketStatus, TicketType } from '../../../utilities/enum';
|
|
3
3
|
import { DTO } from '../../../utilities/validation';
|
|
4
4
|
import { BaseSocketEvent } from '../BaseSocketEvent';
|
|
5
5
|
import { NotificationSettings } from '../PushNotificationEvent';
|
|
@@ -7,22 +7,28 @@ export declare const TicketActionsSocketInputSchema: z.ZodUndefined;
|
|
|
7
7
|
export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
|
|
8
8
|
_id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
9
9
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
10
|
+
type: z.ZodNativeEnum<typeof TicketType>;
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
type: TicketType;
|
|
11
13
|
status: TicketStatus;
|
|
12
14
|
_id: import("mongoose").Types.ObjectId;
|
|
13
15
|
}, {
|
|
16
|
+
type: TicketType;
|
|
14
17
|
status: TicketStatus;
|
|
15
18
|
_id: import("mongoose").Types.ObjectId;
|
|
16
19
|
}>;
|
|
17
20
|
export declare const TicketActionsPushOutputSchema: z.ZodObject<{
|
|
18
|
-
|
|
21
|
+
ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
19
22
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
23
|
+
type: z.ZodNativeEnum<typeof TicketType>;
|
|
20
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
type: TicketType;
|
|
21
26
|
status: TicketStatus;
|
|
22
|
-
|
|
27
|
+
ticketId: import("mongoose").Types.ObjectId;
|
|
23
28
|
}, {
|
|
29
|
+
type: TicketType;
|
|
24
30
|
status: TicketStatus;
|
|
25
|
-
|
|
31
|
+
ticketId: import("mongoose").Types.ObjectId;
|
|
26
32
|
}>;
|
|
27
33
|
export type TicketActionsSocketOutputDTO = DTO<typeof TicketActionsSocketOutputSchema>;
|
|
28
34
|
export type TicketActionsPushOutputDTO = DTO<typeof TicketActionsPushOutputSchema>;
|
|
@@ -33,22 +39,28 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
|
|
|
33
39
|
output: z.ZodObject<{
|
|
34
40
|
_id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
35
41
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
42
|
+
type: z.ZodNativeEnum<typeof TicketType>;
|
|
36
43
|
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
type: TicketType;
|
|
37
45
|
status: TicketStatus;
|
|
38
46
|
_id: import("mongoose").Types.ObjectId;
|
|
39
47
|
}, {
|
|
48
|
+
type: TicketType;
|
|
40
49
|
status: TicketStatus;
|
|
41
50
|
_id: import("mongoose").Types.ObjectId;
|
|
42
51
|
}>;
|
|
43
52
|
pushNotificationOutput: z.ZodObject<{
|
|
44
|
-
|
|
53
|
+
ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
45
54
|
status: z.ZodNativeEnum<typeof TicketStatus>;
|
|
55
|
+
type: z.ZodNativeEnum<typeof TicketType>;
|
|
46
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
type: TicketType;
|
|
47
58
|
status: TicketStatus;
|
|
48
|
-
|
|
59
|
+
ticketId: import("mongoose").Types.ObjectId;
|
|
49
60
|
}, {
|
|
61
|
+
type: TicketType;
|
|
50
62
|
status: TicketStatus;
|
|
51
|
-
|
|
63
|
+
ticketId: import("mongoose").Types.ObjectId;
|
|
52
64
|
}>;
|
|
53
65
|
};
|
|
54
66
|
get notificationSettings(): NotificationSettings | undefined;
|
|
@@ -12,8 +12,13 @@ exports.TicketActionsSocketInputSchema = zod_1.default.undefined();
|
|
|
12
12
|
exports.TicketActionsSocketOutputSchema = zod_1.default.object({
|
|
13
13
|
_id: validation_1.ZodValidation.coerce.objectId(),
|
|
14
14
|
status: validation_1.ZodValidation.enumType(enum_1.TicketStatus, 'status'),
|
|
15
|
+
type: validation_1.ZodValidation.enumType(enum_1.TicketType, 'type'),
|
|
16
|
+
});
|
|
17
|
+
exports.TicketActionsPushOutputSchema = zod_1.default.object({
|
|
18
|
+
ticketId: validation_1.ZodValidation.coerce.objectId(),
|
|
19
|
+
status: validation_1.ZodValidation.enumType(enum_1.TicketStatus, 'status'),
|
|
20
|
+
type: validation_1.ZodValidation.enumType(enum_1.TicketType, 'type'),
|
|
15
21
|
});
|
|
16
|
-
exports.TicketActionsPushOutputSchema = exports.TicketActionsSocketOutputSchema;
|
|
17
22
|
class TicketActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
18
23
|
static schemas = {
|
|
19
24
|
input: exports.TicketActionsSocketInputSchema,
|
|
@@ -29,8 +34,9 @@ class TicketActionsSocketEvent extends BaseSocketEvent_1.BaseSocketEvent {
|
|
|
29
34
|
}
|
|
30
35
|
constructor(payload) {
|
|
31
36
|
const pushPayload = {
|
|
32
|
-
|
|
37
|
+
ticketId: payload._id,
|
|
33
38
|
status: payload.status,
|
|
39
|
+
type: payload.type,
|
|
34
40
|
};
|
|
35
41
|
super(enum_1.SocketEventType.TICKET_ACTIONS, TicketActionsSocketEvent.schemas, payload, pushPayload);
|
|
36
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-actions.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,
|
|
1
|
+
{"version":3,"file":"ticket-actions.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/ticket-actions.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAA+F;AAC/F,8DAAmE;AACnE,wDAAqD;AAGxC,QAAA,8BAA8B,GAAG,aAAC,CAAC,SAAS,EAAE,CAAC;AAC/C,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,GAAG,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;CAChD,CAAC,CAAC;AAEU,QAAA,6BAA6B,GAAG,aAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,0BAAa,CAAC,QAAQ,CAAC,mBAAY,EAAE,QAAQ,CAAC;IACtD,IAAI,EAAE,0BAAa,CAAC,QAAQ,CAAC,iBAAU,EAAE,MAAM,CAAC;CAChD,CAAC,CAAC;AAMH,MAAa,wBAAyB,SAAQ,iCAI7C;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,sCAA8B;QACrC,MAAM,EAAE,uCAA+B;QACvC,sBAAsB,EAAE,qCAA6B;KACrD,CAAC;IAEF,IAAW,oBAAoB;QAC9B,OAAO;YACN,kBAAkB,EAAE,IAAI;YACxB,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,gBAAS,CAAC,gBAAgB;SACrC,CAAC;IACH,CAAC;IAED,YAAY,OAAqC;QAChD,MAAM,WAAW,GAA+B;YAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG;YACrB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI;SAClB,CAAC;QAEF,KAAK,CAAC,sBAAe,CAAC,cAAc,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/F,CAAC;IAES,aAAa;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;;AA/BF,4DAgCC","sourcesContent":["import z from 'zod';\nimport { ClickType, SocketEventType, TicketStatus, TicketType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSettings } from '../PushNotificationEvent';\n\nexport const TicketActionsSocketInputSchema = z.undefined();\nexport const TicketActionsSocketOutputSchema = z.object({\n\t_id: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n});\n\nexport const TicketActionsPushOutputSchema = z.object({\n\tticketId: ZodValidation.coerce.objectId(),\n\tstatus: ZodValidation.enumType(TicketStatus, 'status'),\n\ttype: ZodValidation.enumType(TicketType, 'type'),\n});\n\nexport type TicketActionsSocketOutputDTO = DTO<typeof TicketActionsSocketOutputSchema>;\nexport type TicketActionsPushOutputDTO = DTO<typeof TicketActionsPushOutputSchema>;\nexport type TicketActionsSocketInputDTO = DTO<typeof TicketActionsSocketInputSchema>;\n\nexport class TicketActionsSocketEvent extends BaseSocketEvent<\n\ttypeof TicketActionsSocketInputSchema,\n\ttypeof TicketActionsSocketOutputSchema,\n\ttypeof TicketActionsPushOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: TicketActionsSocketInputSchema,\n\t\toutput: TicketActionsSocketOutputSchema,\n\t\tpushNotificationOutput: TicketActionsPushOutputSchema,\n\t};\n\n\tpublic get notificationSettings(): NotificationSettings | undefined {\n\t\treturn {\n\t\t\tisPushNotification: true,\n\t\t\tisClickable: true,\n\t\t\tclickType: ClickType.CLICKABLE_TICKET,\n\t\t};\n\t}\n\n\tconstructor(payload: TicketActionsSocketOutputDTO) {\n\t\tconst pushPayload: TicketActionsPushOutputDTO = {\n\t\t\tticketId: payload._id,\n\t\t\tstatus: payload.status,\n\t\t\ttype: payload.type,\n\t\t};\n\n\t\tsuper(SocketEventType.TICKET_ACTIONS, TicketActionsSocketEvent.schemas, payload, pushPayload);\n\t}\n\n\tprotected getIdentifier(): string {\n\t\treturn 'default';\n\t}\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED