expo-backend-types 0.10.0-EXPO-247-EB-Evento.6 → 0.11.0-EXPO-249-EB-Modelo.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/event/exports.d.ts +0 -5
- package/dist/src/event/exports.js +0 -5
- package/dist/src/event-folder/dto/event-folder.dto.js +1 -3
- package/dist/src/event-folder/dto/get-all-event-folder.dto.d.ts +6 -6
- package/dist/src/event-folder/dto/get-all-event-folder.dto.js +1 -1
- package/dist/src/exports.d.ts +1 -0
- package/dist/src/exports.js +1 -0
- package/dist/src/i18n/es.d.ts +8 -31
- package/dist/src/i18n/es.js +8 -31
- package/dist/src/i18n/es.js.map +1 -1
- package/dist/src/message/dto/message.dto.d.ts +173 -0
- package/dist/src/message/dto/message.dto.js +38 -0
- package/dist/src/message/exports.d.ts +1 -0
- package/dist/src/message/exports.js +18 -0
- package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +728 -0
- package/dist/src/profile/dto/find-with-active-chat.dto.js +26 -0
- package/dist/src/profile/exports.d.ts +1 -0
- package/dist/src/profile/exports.js +1 -0
- package/dist/types/prisma-schema/edge.js +2 -2
- package/dist/types/prisma-schema/index.js +2 -2
- package/dist/types/prisma-schema/package.json +1 -1
- package/dist/types/prisma-schema/schema.prisma +1 -1
- package/dist/types/schema.d.ts +56 -324
- package/package.json +2 -1
- package/dist/src/event/dto/create-event.dto.d.ts +0 -166
- package/dist/src/event/dto/create-event.dto.js +0 -33
- package/dist/src/event/dto/delete-event.dto.d.ts +0 -71
- package/dist/src/event/dto/delete-event.dto.js +0 -10
- package/dist/src/event/dto/get-all-event.dto.d.ts +0 -1113
- package/dist/src/event/dto/get-all-event.dto.js +0 -26
- package/dist/src/event/dto/get-by-id-event.dto.d.ts +0 -548
- package/dist/src/event/dto/get-by-id-event.dto.js +0 -25
- package/dist/src/event/dto/update-event.dto.d.ts +0 -373
- package/dist/src/event/dto/update-event.dto.js +0 -41
@@ -14,10 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./dto/create-event.dto"), exports);
|
18
|
-
__exportStar(require("./dto/delete-event.dto"), exports);
|
19
17
|
__exportStar(require("./dto/event.dto"), exports);
|
20
|
-
__exportStar(require("./dto/get-all-event.dto"), exports);
|
21
|
-
__exportStar(require("./dto/get-by-id-event.dto"), exports);
|
22
|
-
__exportStar(require("./dto/update-event.dto"), exports);
|
23
18
|
//# sourceMappingURL=exports.js.map
|
@@ -10,9 +10,7 @@ exports.eventFolderSchema = zod_1.default.object({
|
|
10
10
|
id: zod_1.default.string().uuid({
|
11
11
|
message: (0, translate_1.translate)('model.event-folder.id.uuid'),
|
12
12
|
}),
|
13
|
-
name: zod_1.default.string().min(1,
|
14
|
-
message: (0, translate_1.translate)('model.event-folder.name.min'),
|
15
|
-
}),
|
13
|
+
name: zod_1.default.string().min(1),
|
16
14
|
color: zod_1.default
|
17
15
|
.string()
|
18
16
|
.length(7)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import z from 'zod';
|
2
2
|
export declare const getAllEventFolderResponseSchema: z.ZodObject<{
|
3
|
-
|
3
|
+
eventFolders: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
4
4
|
id: z.ZodString;
|
5
5
|
name: z.ZodString;
|
6
6
|
color: z.ZodString;
|
@@ -79,7 +79,7 @@ export declare const getAllEventFolderResponseSchema: z.ZodObject<{
|
|
79
79
|
}[];
|
80
80
|
}>, "many">;
|
81
81
|
}, "strip", z.ZodTypeAny, {
|
82
|
-
|
82
|
+
eventFolders: {
|
83
83
|
id: string;
|
84
84
|
name: string;
|
85
85
|
color: string;
|
@@ -99,7 +99,7 @@ export declare const getAllEventFolderResponseSchema: z.ZodObject<{
|
|
99
99
|
}[];
|
100
100
|
}[];
|
101
101
|
}, {
|
102
|
-
|
102
|
+
eventFolders: {
|
103
103
|
id: string;
|
104
104
|
name: string;
|
105
105
|
color: string;
|
@@ -120,7 +120,7 @@ export declare const getAllEventFolderResponseSchema: z.ZodObject<{
|
|
120
120
|
}[];
|
121
121
|
}>;
|
122
122
|
declare const GetAllEventFolderResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
|
123
|
-
|
123
|
+
eventFolders: z.ZodArray<z.ZodObject<{
|
124
124
|
id: z.ZodString;
|
125
125
|
name: z.ZodString;
|
126
126
|
color: z.ZodString;
|
@@ -198,7 +198,7 @@ declare const GetAllEventFolderResponseDto_base: import("@anatine/zod-nestjs").Z
|
|
198
198
|
}[];
|
199
199
|
}>, "many">;
|
200
200
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
201
|
-
|
201
|
+
eventFolders: {
|
202
202
|
id: string;
|
203
203
|
name: string;
|
204
204
|
color: string;
|
@@ -218,7 +218,7 @@ declare const GetAllEventFolderResponseDto_base: import("@anatine/zod-nestjs").Z
|
|
218
218
|
}[];
|
219
219
|
}[];
|
220
220
|
}, {
|
221
|
-
|
221
|
+
eventFolders: {
|
222
222
|
id: string;
|
223
223
|
name: string;
|
224
224
|
color: string;
|
@@ -9,7 +9,7 @@ const create_zod_dto_without_date_1 = require("../../shared/dto-modification/cre
|
|
9
9
|
const zod_1 = __importDefault(require("zod"));
|
10
10
|
const event_folder_dto_1 = require("./event-folder.dto");
|
11
11
|
exports.getAllEventFolderResponseSchema = zod_1.default.object({
|
12
|
-
|
12
|
+
eventFolders: zod_1.default.array(event_folder_dto_1.eventFolderSchema.merge(zod_1.default.object({
|
13
13
|
events: zod_1.default.array(event_dto_1.eventSchema),
|
14
14
|
}))),
|
15
15
|
});
|
package/dist/src/exports.d.ts
CHANGED
@@ -5,6 +5,7 @@ export * from './comment/exports';
|
|
5
5
|
export * from './event-folder/exports';
|
6
6
|
export * from './event/exports';
|
7
7
|
export * from './location/exports';
|
8
|
+
export * from './message/exports';
|
8
9
|
export * from './profile/exports';
|
9
10
|
export * from './tag-group/exports';
|
10
11
|
export * from './tag/exports';
|
package/dist/src/exports.js
CHANGED
@@ -21,6 +21,7 @@ __exportStar(require("./comment/exports"), exports);
|
|
21
21
|
__exportStar(require("./event-folder/exports"), exports);
|
22
22
|
__exportStar(require("./event/exports"), exports);
|
23
23
|
__exportStar(require("./location/exports"), exports);
|
24
|
+
__exportStar(require("./message/exports"), exports);
|
24
25
|
__exportStar(require("./profile/exports"), exports);
|
25
26
|
__exportStar(require("./tag-group/exports"), exports);
|
26
27
|
__exportStar(require("./tag/exports"), exports);
|
package/dist/src/i18n/es.d.ts
CHANGED
@@ -12,10 +12,6 @@ declare const _default: {
|
|
12
12
|
readonly cannedResponse: "Respuesta enlatada";
|
13
13
|
readonly message: "Mensaje";
|
14
14
|
};
|
15
|
-
readonly tag: {
|
16
|
-
readonly assisted: "Asistió";
|
17
|
-
readonly confirmed: "Confirmó asistencia";
|
18
|
-
};
|
19
15
|
readonly conflict: "Ya existe un registro con el campo {{field}} '{{value}}' en la tabla de {{model}}";
|
20
16
|
readonly 'not-found': "No se encontró un registro con el campo {{field}} '{{value}}' en la tabla de {{model}}";
|
21
17
|
};
|
@@ -94,9 +90,6 @@ declare const _default: {
|
|
94
90
|
readonly id: {
|
95
91
|
readonly uuid: "El ID debe ser un UUID";
|
96
92
|
};
|
97
|
-
readonly name: {
|
98
|
-
readonly min: "El nombre debe tener al menos 1 caracter";
|
99
|
-
};
|
100
93
|
readonly color: {
|
101
94
|
readonly invalid: "El color debe tener el formato hexadecimal (#ABCDEF)";
|
102
95
|
};
|
@@ -143,6 +136,11 @@ declare const _default: {
|
|
143
136
|
readonly min: "El contenido debe tener al menos 1 caracter";
|
144
137
|
};
|
145
138
|
};
|
139
|
+
readonly message: {
|
140
|
+
readonly id: {
|
141
|
+
readonly uuid: "El ID debe ser un UUID";
|
142
|
+
};
|
143
|
+
};
|
146
144
|
};
|
147
145
|
readonly route: {
|
148
146
|
readonly auth: {
|
@@ -296,30 +294,6 @@ declare const _default: {
|
|
296
294
|
readonly 'not-found': "Carpeta de evento no encontrada";
|
297
295
|
};
|
298
296
|
};
|
299
|
-
readonly event: {
|
300
|
-
readonly create: {
|
301
|
-
readonly success: "Evento creado con éxito";
|
302
|
-
readonly conflict: "Error en la creación del evento";
|
303
|
-
readonly 'folder-not-found': "Carpeta de evento no encontrada";
|
304
|
-
};
|
305
|
-
readonly 'get-all': {
|
306
|
-
readonly success: "Eventos obtenidos con éxito";
|
307
|
-
readonly 'not-found': "No se encontraron eventos";
|
308
|
-
};
|
309
|
-
readonly 'get-by-id': {
|
310
|
-
readonly success: "Evento obtenido con éxito";
|
311
|
-
readonly 'not-found': "Evento no encontrado";
|
312
|
-
};
|
313
|
-
readonly update: {
|
314
|
-
readonly success: "Evento actualizado con éxito";
|
315
|
-
readonly 'not-found': "Evento no encontrado";
|
316
|
-
readonly 'subevent-not-found': "Subevento no encontrado";
|
317
|
-
};
|
318
|
-
readonly delete: {
|
319
|
-
readonly success: "Evento eliminado con éxito";
|
320
|
-
readonly 'not-found': "Evento no encontrado";
|
321
|
-
};
|
322
|
-
};
|
323
297
|
readonly profile: {
|
324
298
|
readonly 'find-all': {
|
325
299
|
readonly success: "Perfiles obtenidos";
|
@@ -366,6 +340,9 @@ declare const _default: {
|
|
366
340
|
readonly 'find-trash': {
|
367
341
|
readonly success: "Perfiles obtenidos";
|
368
342
|
};
|
343
|
+
readonly 'find-all-with-active-chat': {
|
344
|
+
readonly success: "Perfiles obtenido";
|
345
|
+
};
|
369
346
|
};
|
370
347
|
};
|
371
348
|
};
|
package/dist/src/i18n/es.js
CHANGED
@@ -14,10 +14,6 @@ exports.default = {
|
|
14
14
|
cannedResponse: 'Respuesta enlatada',
|
15
15
|
message: 'Mensaje',
|
16
16
|
},
|
17
|
-
tag: {
|
18
|
-
assisted: 'Asistió',
|
19
|
-
confirmed: 'Confirmó asistencia',
|
20
|
-
},
|
21
17
|
conflict: `Ya existe un registro con el campo \{\{field\}\} '\{\{value\}\}' en la tabla de \{\{model\}\}`,
|
22
18
|
'not-found': `No se encontró un registro con el campo \{\{field\}\} '\{\{value\}\}' en la tabla de \{\{model\}\}`,
|
23
19
|
},
|
@@ -96,9 +92,6 @@ exports.default = {
|
|
96
92
|
id: {
|
97
93
|
uuid: 'El ID debe ser un UUID',
|
98
94
|
},
|
99
|
-
name: {
|
100
|
-
min: 'El nombre debe tener al menos 1 caracter',
|
101
|
-
},
|
102
95
|
color: {
|
103
96
|
invalid: 'El color debe tener el formato hexadecimal (#ABCDEF)',
|
104
97
|
},
|
@@ -145,6 +138,11 @@ exports.default = {
|
|
145
138
|
min: 'El contenido debe tener al menos 1 caracter',
|
146
139
|
},
|
147
140
|
},
|
141
|
+
message: {
|
142
|
+
id: {
|
143
|
+
uuid: 'El ID debe ser un UUID',
|
144
|
+
},
|
145
|
+
},
|
148
146
|
},
|
149
147
|
route: {
|
150
148
|
auth: {
|
@@ -298,30 +296,6 @@ exports.default = {
|
|
298
296
|
'not-found': 'Carpeta de evento no encontrada',
|
299
297
|
},
|
300
298
|
},
|
301
|
-
event: {
|
302
|
-
create: {
|
303
|
-
success: 'Evento creado con éxito',
|
304
|
-
conflict: 'Error en la creación del evento',
|
305
|
-
'folder-not-found': 'Carpeta de evento no encontrada',
|
306
|
-
},
|
307
|
-
'get-all': {
|
308
|
-
success: 'Eventos obtenidos con éxito',
|
309
|
-
'not-found': 'No se encontraron eventos',
|
310
|
-
},
|
311
|
-
'get-by-id': {
|
312
|
-
success: 'Evento obtenido con éxito',
|
313
|
-
'not-found': 'Evento no encontrado',
|
314
|
-
},
|
315
|
-
update: {
|
316
|
-
success: 'Evento actualizado con éxito',
|
317
|
-
'not-found': 'Evento no encontrado',
|
318
|
-
'subevent-not-found': 'Subevento no encontrado',
|
319
|
-
},
|
320
|
-
delete: {
|
321
|
-
success: 'Evento eliminado con éxito',
|
322
|
-
'not-found': 'Evento no encontrado',
|
323
|
-
},
|
324
|
-
},
|
325
299
|
profile: {
|
326
300
|
'find-all': {
|
327
301
|
success: 'Perfiles obtenidos',
|
@@ -368,6 +342,9 @@ exports.default = {
|
|
368
342
|
'find-trash': {
|
369
343
|
success: 'Perfiles obtenidos',
|
370
344
|
},
|
345
|
+
'find-all-with-active-chat': {
|
346
|
+
success: 'Perfiles obtenido',
|
347
|
+
},
|
371
348
|
},
|
372
349
|
},
|
373
350
|
};
|
package/dist/src/i18n/es.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/i18n/es.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,MAAM,EAAE;QACN,KAAK,EAAE;YACL,OAAO,EAAE,QAAQ;YACjB,GAAG,EAAE,UAAU;YACf,QAAQ,EAAE,oBAAoB;YAC9B,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,oBAAoB;YACjC,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,QAAQ;YACjB,QAAQ,EAAE,WAAW;YACrB,cAAc,EAAE,oBAAoB;YACpC,OAAO,EAAE,SAAS;SACnB;QACD,
|
1
|
+
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/i18n/es.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,MAAM,EAAE;QACN,KAAK,EAAE;YACL,OAAO,EAAE,QAAQ;YACjB,GAAG,EAAE,UAAU;YACf,QAAQ,EAAE,oBAAoB;YAC9B,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,oBAAoB;YACjC,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,QAAQ;YACjB,QAAQ,EAAE,WAAW;YACrB,cAAc,EAAE,oBAAoB;YACpC,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE,+FAA+F;QACzG,WAAW,EAAE,oGAAoG;KAClH;IACD,KAAK,EAAE;QACL,OAAO,EAAE;YACP,EAAE,EAAE;gBACF,IAAI,EAAE,wBAAwB;aAC/B;YACD,OAAO,EAAE;gBACP,GAAG,EAAE,6CA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,WAAW,EAAE,sBAAsB;gBACnC,OAAO,EAAE,iBAAiB;aAC3B;YACD,aAAa,EAAE;gBACb,WAAW,EAAE,sBAAsB;gBACnC,gBAAgB,EAAE,mCAAmC;gBACrD,OAAO,EAAE,oBAAoB;aAC9B;YACD,oBAAoB,EAAE;gBACpB,WAAW,EAAE,sBAAsB;gBACnC,sBAAsB,EAAE,6CAA6C;gBACrE,OAAO,EAAE,oBAAoB;aAC9B;YACD,MAAM,EAAE;gBACN,2BAA2B,EACzB,4CAA4C;gBAC9C,OAAO,EAAE,yBAAyB;gBAClC,oBAAoB,EAAE,iCAAiC;gBACvD,6BAA6B,EAAE,sCAAsC;gBACrE,uCAAuC,EACrC,iDAAiD;gBACnD,QAAQ,EAAE,iCAAiC;aAC5C;YACD,MAAM,EAAE;gBACN,OAAO,EAAE,4BAA4B;gBACrC,WAAW,EAAE,sBAAsB;aACpC;YACD,MAAM,EAAE;gBACN,OAAO,EAAE,8BAA8B;gBACvC,WAAW,EAAE,sBAAsB;gBACnC,QAAQ,EAAE,sCAAsC;aACjD;YACD,oBAAoB,EAAE;gBACpB,OAAO,EAAE,oBAAoB;gBAC7B,cAAc,EAAE,gBAAgB;aACjC;YACD,sBAAsB,EAAE;gBACtB,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,sBAAsB;aACpC;YACD,YAAY,EAAE;gBACZ,OAAO,EAAE,oBAAoB;aAC9B;YACD,2BAA2B,EAAE;gBAC3B,OAAO,EAAE,mBAAmB;aAC7B;SACF;KACF;CACO,CAAC"}
|
@@ -0,0 +1,173 @@
|
|
1
|
+
import z from 'zod';
|
2
|
+
export declare const jsonMessage: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
3
|
+
id: z.ZodString;
|
4
|
+
from: z.ZodOptional<z.ZodString>;
|
5
|
+
to: z.ZodOptional<z.ZodString>;
|
6
|
+
timestamp: z.ZodNumber;
|
7
|
+
}, {
|
8
|
+
text: z.ZodObject<{
|
9
|
+
body: z.ZodString;
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
11
|
+
body: string;
|
12
|
+
}, {
|
13
|
+
body: string;
|
14
|
+
}>;
|
15
|
+
}>, {
|
16
|
+
type: z.ZodLiteral<"text">;
|
17
|
+
}>, "strip", z.ZodTypeAny, {
|
18
|
+
id: string;
|
19
|
+
type: "text";
|
20
|
+
timestamp: number;
|
21
|
+
text: {
|
22
|
+
body: string;
|
23
|
+
};
|
24
|
+
from?: string | undefined;
|
25
|
+
to?: string | undefined;
|
26
|
+
}, {
|
27
|
+
id: string;
|
28
|
+
type: "text";
|
29
|
+
timestamp: number;
|
30
|
+
text: {
|
31
|
+
body: string;
|
32
|
+
};
|
33
|
+
from?: string | undefined;
|
34
|
+
to?: string | undefined;
|
35
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
36
|
+
id: z.ZodString;
|
37
|
+
from: z.ZodOptional<z.ZodString>;
|
38
|
+
to: z.ZodOptional<z.ZodString>;
|
39
|
+
timestamp: z.ZodNumber;
|
40
|
+
}, {
|
41
|
+
templateName: z.ZodString;
|
42
|
+
}>, {
|
43
|
+
type: z.ZodLiteral<"template">;
|
44
|
+
}>, "strip", z.ZodTypeAny, {
|
45
|
+
id: string;
|
46
|
+
type: "template";
|
47
|
+
timestamp: number;
|
48
|
+
templateName: string;
|
49
|
+
from?: string | undefined;
|
50
|
+
to?: string | undefined;
|
51
|
+
}, {
|
52
|
+
id: string;
|
53
|
+
type: "template";
|
54
|
+
timestamp: number;
|
55
|
+
templateName: string;
|
56
|
+
from?: string | undefined;
|
57
|
+
to?: string | undefined;
|
58
|
+
}>]>;
|
59
|
+
export type JsonMessage = z.infer<typeof jsonMessage>;
|
60
|
+
export declare const messageSchema: z.ZodObject<{
|
61
|
+
id: z.ZodString;
|
62
|
+
wamId: z.ZodString;
|
63
|
+
message: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
64
|
+
id: z.ZodString;
|
65
|
+
from: z.ZodOptional<z.ZodString>;
|
66
|
+
to: z.ZodOptional<z.ZodString>;
|
67
|
+
timestamp: z.ZodNumber;
|
68
|
+
}, {
|
69
|
+
text: z.ZodObject<{
|
70
|
+
body: z.ZodString;
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
72
|
+
body: string;
|
73
|
+
}, {
|
74
|
+
body: string;
|
75
|
+
}>;
|
76
|
+
}>, {
|
77
|
+
type: z.ZodLiteral<"text">;
|
78
|
+
}>, "strip", z.ZodTypeAny, {
|
79
|
+
id: string;
|
80
|
+
type: "text";
|
81
|
+
timestamp: number;
|
82
|
+
text: {
|
83
|
+
body: string;
|
84
|
+
};
|
85
|
+
from?: string | undefined;
|
86
|
+
to?: string | undefined;
|
87
|
+
}, {
|
88
|
+
id: string;
|
89
|
+
type: "text";
|
90
|
+
timestamp: number;
|
91
|
+
text: {
|
92
|
+
body: string;
|
93
|
+
};
|
94
|
+
from?: string | undefined;
|
95
|
+
to?: string | undefined;
|
96
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
97
|
+
id: z.ZodString;
|
98
|
+
from: z.ZodOptional<z.ZodString>;
|
99
|
+
to: z.ZodOptional<z.ZodString>;
|
100
|
+
timestamp: z.ZodNumber;
|
101
|
+
}, {
|
102
|
+
templateName: z.ZodString;
|
103
|
+
}>, {
|
104
|
+
type: z.ZodLiteral<"template">;
|
105
|
+
}>, "strip", z.ZodTypeAny, {
|
106
|
+
id: string;
|
107
|
+
type: "template";
|
108
|
+
timestamp: number;
|
109
|
+
templateName: string;
|
110
|
+
from?: string | undefined;
|
111
|
+
to?: string | undefined;
|
112
|
+
}, {
|
113
|
+
id: string;
|
114
|
+
type: "template";
|
115
|
+
timestamp: number;
|
116
|
+
templateName: string;
|
117
|
+
from?: string | undefined;
|
118
|
+
to?: string | undefined;
|
119
|
+
}>]>;
|
120
|
+
state: z.ZodNativeEnum<{
|
121
|
+
SENT: "SENT";
|
122
|
+
RECEIVED: "RECEIVED";
|
123
|
+
SEEN: "SEEN";
|
124
|
+
}>;
|
125
|
+
created_at: z.ZodDate;
|
126
|
+
updated_at: z.ZodDate;
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
128
|
+
message: {
|
129
|
+
id: string;
|
130
|
+
type: "text";
|
131
|
+
timestamp: number;
|
132
|
+
text: {
|
133
|
+
body: string;
|
134
|
+
};
|
135
|
+
from?: string | undefined;
|
136
|
+
to?: string | undefined;
|
137
|
+
} | {
|
138
|
+
id: string;
|
139
|
+
type: "template";
|
140
|
+
timestamp: number;
|
141
|
+
templateName: string;
|
142
|
+
from?: string | undefined;
|
143
|
+
to?: string | undefined;
|
144
|
+
};
|
145
|
+
id: string;
|
146
|
+
created_at: Date;
|
147
|
+
updated_at: Date;
|
148
|
+
state: "SENT" | "RECEIVED" | "SEEN";
|
149
|
+
wamId: string;
|
150
|
+
}, {
|
151
|
+
message: {
|
152
|
+
id: string;
|
153
|
+
type: "text";
|
154
|
+
timestamp: number;
|
155
|
+
text: {
|
156
|
+
body: string;
|
157
|
+
};
|
158
|
+
from?: string | undefined;
|
159
|
+
to?: string | undefined;
|
160
|
+
} | {
|
161
|
+
id: string;
|
162
|
+
type: "template";
|
163
|
+
timestamp: number;
|
164
|
+
templateName: string;
|
165
|
+
from?: string | undefined;
|
166
|
+
to?: string | undefined;
|
167
|
+
};
|
168
|
+
id: string;
|
169
|
+
created_at: Date;
|
170
|
+
updated_at: Date;
|
171
|
+
state: "SENT" | "RECEIVED" | "SEEN";
|
172
|
+
wamId: string;
|
173
|
+
}>;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.messageSchema = exports.jsonMessage = void 0;
|
7
|
+
const translate_1 = require("../../i18n/translate");
|
8
|
+
const zod_1 = __importDefault(require("zod"));
|
9
|
+
const prisma_schema_1 = require("../../../types/prisma-schema/index.js");
|
10
|
+
const whatsappMessageSchema = zod_1.default.object({
|
11
|
+
id: zod_1.default.string(),
|
12
|
+
from: zod_1.default.string().optional(),
|
13
|
+
to: zod_1.default.string().optional(),
|
14
|
+
timestamp: zod_1.default.coerce.number(),
|
15
|
+
});
|
16
|
+
const textMessageSchema = whatsappMessageSchema.merge(zod_1.default.object({
|
17
|
+
text: zod_1.default.object({
|
18
|
+
body: zod_1.default.string(),
|
19
|
+
}),
|
20
|
+
}));
|
21
|
+
const templateMessageSchema = whatsappMessageSchema.merge(zod_1.default.object({
|
22
|
+
templateName: zod_1.default.string(),
|
23
|
+
}));
|
24
|
+
exports.jsonMessage = zod_1.default.discriminatedUnion('type', [
|
25
|
+
textMessageSchema.extend({ type: zod_1.default.literal('text') }),
|
26
|
+
templateMessageSchema.extend({ type: zod_1.default.literal('template') }),
|
27
|
+
]);
|
28
|
+
exports.messageSchema = zod_1.default.object({
|
29
|
+
id: zod_1.default.string().uuid({
|
30
|
+
message: (0, translate_1.translate)('model.message.id.uuid'),
|
31
|
+
}),
|
32
|
+
wamId: zod_1.default.string(),
|
33
|
+
message: exports.jsonMessage,
|
34
|
+
state: zod_1.default.nativeEnum(prisma_schema_1.MessageState),
|
35
|
+
created_at: zod_1.default.date(),
|
36
|
+
updated_at: zod_1.default.date(),
|
37
|
+
});
|
38
|
+
//# sourceMappingURL=message.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './dto/message.dto';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./dto/message.dto"), exports);
|
18
|
+
//# sourceMappingURL=exports.js.map
|