expo-backend-types 0.22.0-EXPO-251-EB-Whatsapp.3 → 0.22.0-EXPO-288-EB-Imagenes.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/README.md +1 -1
  2. package/dist/src/event/dto/event.dto.js +1 -1
  3. package/dist/src/event/dto/get-all-event.dto.d.ts +160 -160
  4. package/dist/src/event/dto/get-by-id-event.dto.d.ts +48 -48
  5. package/dist/src/event/dto/update-event.dto.d.ts +20 -20
  6. package/dist/src/i18n/es.d.ts +18 -44
  7. package/dist/src/i18n/es.js +18 -44
  8. package/dist/src/i18n/es.js.map +1 -1
  9. package/dist/src/image/dto/delete-image.dto.d.ts +18 -0
  10. package/dist/src/image/dto/delete-image.dto.js +12 -0
  11. package/dist/src/image/dto/image.dto.d.ts +24 -0
  12. package/dist/src/image/dto/image.dto.js +18 -0
  13. package/dist/src/image/dto/update-image.dto.d.ts +18 -0
  14. package/dist/src/image/dto/update-image.dto.js +15 -0
  15. package/dist/src/image/exports.d.ts +3 -0
  16. package/dist/src/{csv → image}/exports.js +3 -3
  17. package/dist/src/location/dto/find-all-location.dto.d.ts +16 -16
  18. package/dist/src/message/dto/message.dto.d.ts +2 -2
  19. package/dist/src/message/exports.d.ts +0 -4
  20. package/dist/src/message/exports.js +0 -4
  21. package/dist/src/profile/dto/find-all-profile.dto.d.ts +86 -86
  22. package/dist/src/profile/dto/find-by-date-range-profile.dto.d.ts +124 -124
  23. package/dist/src/profile/dto/find-by-id-profile.dto.d.ts +52 -52
  24. package/dist/src/profile/dto/find-by-tag-groups-profile.dto.d.ts +64 -64
  25. package/dist/src/profile/dto/find-by-tags-profile.dto.d.ts +84 -84
  26. package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +72 -72
  27. package/dist/src/profile/dto/update-profile.dto.d.ts +4 -4
  28. package/dist/types/prisma-schema/default.d.ts +1 -1
  29. package/dist/types/prisma-schema/edge.d.ts +1 -1
  30. package/dist/types/prisma-schema/edge.js +11 -7
  31. package/dist/types/prisma-schema/index-browser.js +7 -4
  32. package/dist/types/prisma-schema/index.d.ts +803 -1034
  33. package/dist/types/prisma-schema/index.js +11 -7
  34. package/dist/types/prisma-schema/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
  35. package/dist/types/prisma-schema/package.json +14 -1
  36. package/dist/types/prisma-schema/runtime/edge-esm.js +21 -18
  37. package/dist/types/prisma-schema/runtime/edge.js +21 -18
  38. package/dist/types/prisma-schema/runtime/index-browser.js +1 -1
  39. package/dist/types/prisma-schema/runtime/library.d.ts +297 -87
  40. package/dist/types/prisma-schema/runtime/library.js +64 -61
  41. package/dist/types/prisma-schema/runtime/react-native.js +31 -28
  42. package/dist/types/prisma-schema/runtime/wasm.js +22 -19
  43. package/dist/types/prisma-schema/wasm.d.ts +1 -1
  44. package/dist/types/prisma-schema/wasm.js +7 -4
  45. package/dist/types/schema.d.ts +30 -145
  46. package/package.json +5 -7
  47. package/dist/src/csv/dto/csv.dto.d.ts +0 -18
  48. package/dist/src/csv/dto/csv.dto.js +0 -17
  49. package/dist/src/csv/dto/download-all-tables.dto.d.ts +0 -23
  50. package/dist/src/csv/dto/download-all-tables.dto.js +0 -19
  51. package/dist/src/csv/dto/download-profiles.dto.d.ts +0 -18
  52. package/dist/src/csv/dto/download-profiles.dto.js +0 -15
  53. package/dist/src/csv/exports.d.ts +0 -3
  54. package/dist/src/message/dto/create-template.dto.d.ts +0 -93
  55. package/dist/src/message/dto/create-template.dto.js +0 -24
  56. package/dist/src/message/dto/find-template-by-id.dto.d.ts +0 -245
  57. package/dist/src/message/dto/find-template-by-id.dto.js +0 -23
  58. package/dist/src/message/dto/find-templates.dto.d.ts +0 -109
  59. package/dist/src/message/dto/find-templates.dto.js +0 -20
  60. package/dist/src/message/dto/template.dto.d.ts +0 -154
  61. package/dist/src/message/dto/template.dto.js +0 -63
@@ -1,245 +0,0 @@
1
- import z from 'zod';
2
- export declare const findTemplateByIdResponseSchema: z.ZodObject<{
3
- template: z.ZodObject<Pick<{
4
- name: z.ZodEffects<z.ZodString, string, string>;
5
- content: z.ZodString;
6
- buttons: z.ZodArray<z.ZodString, "many">;
7
- id: z.ZodString;
8
- status: z.ZodNativeEnum<{
9
- APRROVED: "APRROVED";
10
- PENDING: "PENDING";
11
- REJECTED: "REJECTED";
12
- }>;
13
- language: z.ZodString;
14
- components: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
15
- type: z.ZodLiteral<"BODY">;
16
- text: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- type: "BODY";
19
- text: string;
20
- }, {
21
- type: "BODY";
22
- text: string;
23
- }>, z.ZodObject<{
24
- type: z.ZodLiteral<"BUTTONS">;
25
- buttons: z.ZodArray<z.ZodObject<{
26
- text: z.ZodString;
27
- type: z.ZodLiteral<"QUICK_REPLY">;
28
- }, "strip", z.ZodTypeAny, {
29
- type: "QUICK_REPLY";
30
- text: string;
31
- }, {
32
- type: "QUICK_REPLY";
33
- text: string;
34
- }>, "many">;
35
- }, "strip", z.ZodTypeAny, {
36
- type: "BUTTONS";
37
- buttons: {
38
- type: "QUICK_REPLY";
39
- text: string;
40
- }[];
41
- }, {
42
- type: "BUTTONS";
43
- buttons: {
44
- type: "QUICK_REPLY";
45
- text: string;
46
- }[];
47
- }>]>, "many">;
48
- category: z.ZodNativeEnum<{
49
- MARKETING: "MARKETING";
50
- UTILITY: "UTILITY";
51
- AUTHENTICATION: "AUTHENTICATION";
52
- }>;
53
- allow_category_change: z.ZodBoolean;
54
- }, "id" | "name" | "status" | "category" | "language" | "components">, "strip", z.ZodTypeAny, {
55
- id: string;
56
- name: string;
57
- status: "APRROVED" | "PENDING" | "REJECTED";
58
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
59
- language: string;
60
- components: ({
61
- type: "BUTTONS";
62
- buttons: {
63
- type: "QUICK_REPLY";
64
- text: string;
65
- }[];
66
- } | {
67
- type: "BODY";
68
- text: string;
69
- })[];
70
- }, {
71
- id: string;
72
- name: string;
73
- status: "APRROVED" | "PENDING" | "REJECTED";
74
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
75
- language: string;
76
- components: ({
77
- type: "BUTTONS";
78
- buttons: {
79
- type: "QUICK_REPLY";
80
- text: string;
81
- }[];
82
- } | {
83
- type: "BODY";
84
- text: string;
85
- })[];
86
- }>;
87
- }, "strip", z.ZodTypeAny, {
88
- template: {
89
- id: string;
90
- name: string;
91
- status: "APRROVED" | "PENDING" | "REJECTED";
92
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
93
- language: string;
94
- components: ({
95
- type: "BUTTONS";
96
- buttons: {
97
- type: "QUICK_REPLY";
98
- text: string;
99
- }[];
100
- } | {
101
- type: "BODY";
102
- text: string;
103
- })[];
104
- };
105
- }, {
106
- template: {
107
- id: string;
108
- name: string;
109
- status: "APRROVED" | "PENDING" | "REJECTED";
110
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
111
- language: string;
112
- components: ({
113
- type: "BUTTONS";
114
- buttons: {
115
- type: "QUICK_REPLY";
116
- text: string;
117
- }[];
118
- } | {
119
- type: "BODY";
120
- text: string;
121
- })[];
122
- };
123
- }>;
124
- declare const FindTemplateByIdResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
125
- template: z.ZodObject<{
126
- id: z.ZodString;
127
- name: z.ZodEffects<z.ZodString, string, string>;
128
- status: z.ZodNativeEnum<{
129
- APRROVED: "APRROVED";
130
- PENDING: "PENDING";
131
- REJECTED: "REJECTED";
132
- }>;
133
- category: z.ZodNativeEnum<{
134
- MARKETING: "MARKETING";
135
- UTILITY: "UTILITY";
136
- AUTHENTICATION: "AUTHENTICATION";
137
- }>;
138
- language: z.ZodString;
139
- components: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
140
- type: z.ZodLiteral<"BODY">;
141
- text: z.ZodString;
142
- }, "strip", z.ZodTypeAny, {
143
- type: "BODY";
144
- text: string;
145
- }, {
146
- type: "BODY";
147
- text: string;
148
- }>, z.ZodObject<{
149
- type: z.ZodLiteral<"BUTTONS">;
150
- buttons: z.ZodArray<z.ZodObject<{
151
- text: z.ZodString;
152
- type: z.ZodLiteral<"QUICK_REPLY">;
153
- }, "strip", z.ZodTypeAny, {
154
- type: "QUICK_REPLY";
155
- text: string;
156
- }, {
157
- type: "QUICK_REPLY";
158
- text: string;
159
- }>, "many">;
160
- }, "strip", z.ZodTypeAny, {
161
- type: "BUTTONS";
162
- buttons: {
163
- type: "QUICK_REPLY";
164
- text: string;
165
- }[];
166
- }, {
167
- type: "BUTTONS";
168
- buttons: {
169
- type: "QUICK_REPLY";
170
- text: string;
171
- }[];
172
- }>]>, "many">;
173
- }, z.UnknownKeysParam, z.ZodTypeAny, {
174
- id: string;
175
- name: string;
176
- status: "APRROVED" | "PENDING" | "REJECTED";
177
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
178
- language: string;
179
- components: ({
180
- type: "BUTTONS";
181
- buttons: {
182
- type: "QUICK_REPLY";
183
- text: string;
184
- }[];
185
- } | {
186
- type: "BODY";
187
- text: string;
188
- })[];
189
- }, {
190
- id: string;
191
- name: string;
192
- status: "APRROVED" | "PENDING" | "REJECTED";
193
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
194
- language: string;
195
- components: ({
196
- type: "BUTTONS";
197
- buttons: {
198
- type: "QUICK_REPLY";
199
- text: string;
200
- }[];
201
- } | {
202
- type: "BODY";
203
- text: string;
204
- })[];
205
- }>;
206
- }, z.UnknownKeysParam, z.ZodTypeAny, {
207
- template: {
208
- id: string;
209
- name: string;
210
- status: "APRROVED" | "PENDING" | "REJECTED";
211
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
212
- language: string;
213
- components: ({
214
- type: "BUTTONS";
215
- buttons: {
216
- type: "QUICK_REPLY";
217
- text: string;
218
- }[];
219
- } | {
220
- type: "BODY";
221
- text: string;
222
- })[];
223
- };
224
- }, {
225
- template: {
226
- id: string;
227
- name: string;
228
- status: "APRROVED" | "PENDING" | "REJECTED";
229
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
230
- language: string;
231
- components: ({
232
- type: "BUTTONS";
233
- buttons: {
234
- type: "QUICK_REPLY";
235
- text: string;
236
- }[];
237
- } | {
238
- type: "BODY";
239
- text: string;
240
- })[];
241
- };
242
- }>>;
243
- export declare class FindTemplateByIdResponseDto extends FindTemplateByIdResponseDto_base {
244
- }
245
- export {};
@@ -1,23 +0,0 @@
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.FindTemplateByIdResponseDto = exports.findTemplateByIdResponseSchema = void 0;
7
- const template_dto_1 = require("./template.dto");
8
- const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
9
- const zod_1 = __importDefault(require("zod"));
10
- exports.findTemplateByIdResponseSchema = zod_1.default.object({
11
- template: template_dto_1.templateSchema.pick({
12
- name: true,
13
- language: true,
14
- status: true,
15
- id: true,
16
- category: true,
17
- components: true,
18
- }),
19
- });
20
- class FindTemplateByIdResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.findTemplateByIdResponseSchema) {
21
- }
22
- exports.FindTemplateByIdResponseDto = FindTemplateByIdResponseDto;
23
- //# sourceMappingURL=find-template-by-id.dto.js.map
@@ -1,109 +0,0 @@
1
- import z from 'zod';
2
- export declare const findTemplatesResponseSchema: z.ZodObject<{
3
- templates: z.ZodArray<z.ZodObject<Pick<{
4
- name: z.ZodEffects<z.ZodString, string, string>;
5
- content: z.ZodString;
6
- buttons: z.ZodArray<z.ZodString, "many">;
7
- id: z.ZodString;
8
- status: z.ZodNativeEnum<{
9
- APRROVED: "APRROVED";
10
- PENDING: "PENDING";
11
- REJECTED: "REJECTED";
12
- }>;
13
- language: z.ZodString;
14
- components: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
15
- type: z.ZodLiteral<"BODY">;
16
- text: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
18
- type: "BODY";
19
- text: string;
20
- }, {
21
- type: "BODY";
22
- text: string;
23
- }>, z.ZodObject<{
24
- type: z.ZodLiteral<"BUTTONS">;
25
- buttons: z.ZodArray<z.ZodObject<{
26
- text: z.ZodString;
27
- type: z.ZodLiteral<"QUICK_REPLY">;
28
- }, "strip", z.ZodTypeAny, {
29
- type: "QUICK_REPLY";
30
- text: string;
31
- }, {
32
- type: "QUICK_REPLY";
33
- text: string;
34
- }>, "many">;
35
- }, "strip", z.ZodTypeAny, {
36
- type: "BUTTONS";
37
- buttons: {
38
- type: "QUICK_REPLY";
39
- text: string;
40
- }[];
41
- }, {
42
- type: "BUTTONS";
43
- buttons: {
44
- type: "QUICK_REPLY";
45
- text: string;
46
- }[];
47
- }>]>, "many">;
48
- category: z.ZodNativeEnum<{
49
- MARKETING: "MARKETING";
50
- UTILITY: "UTILITY";
51
- AUTHENTICATION: "AUTHENTICATION";
52
- }>;
53
- allow_category_change: z.ZodBoolean;
54
- }, "id" | "name" | "status">, "strip", z.ZodTypeAny, {
55
- id: string;
56
- name: string;
57
- status: "APRROVED" | "PENDING" | "REJECTED";
58
- }, {
59
- id: string;
60
- name: string;
61
- status: "APRROVED" | "PENDING" | "REJECTED";
62
- }>, "many">;
63
- }, "strip", z.ZodTypeAny, {
64
- templates: {
65
- id: string;
66
- name: string;
67
- status: "APRROVED" | "PENDING" | "REJECTED";
68
- }[];
69
- }, {
70
- templates: {
71
- id: string;
72
- name: string;
73
- status: "APRROVED" | "PENDING" | "REJECTED";
74
- }[];
75
- }>;
76
- declare const FindTemplatesResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
77
- templates: z.ZodArray<z.ZodObject<{
78
- id: z.ZodString;
79
- name: z.ZodEffects<z.ZodString, string, string>;
80
- status: z.ZodNativeEnum<{
81
- APRROVED: "APRROVED";
82
- PENDING: "PENDING";
83
- REJECTED: "REJECTED";
84
- }>;
85
- }, z.UnknownKeysParam, z.ZodTypeAny, {
86
- id: string;
87
- name: string;
88
- status: "APRROVED" | "PENDING" | "REJECTED";
89
- }, {
90
- id: string;
91
- name: string;
92
- status: "APRROVED" | "PENDING" | "REJECTED";
93
- }>, "many">;
94
- }, z.UnknownKeysParam, z.ZodTypeAny, {
95
- templates: {
96
- id: string;
97
- name: string;
98
- status: "APRROVED" | "PENDING" | "REJECTED";
99
- }[];
100
- }, {
101
- templates: {
102
- id: string;
103
- name: string;
104
- status: "APRROVED" | "PENDING" | "REJECTED";
105
- }[];
106
- }>>;
107
- export declare class FindTemplatesResponseDto extends FindTemplatesResponseDto_base {
108
- }
109
- export {};
@@ -1,20 +0,0 @@
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.FindTemplatesResponseDto = exports.findTemplatesResponseSchema = void 0;
7
- const template_dto_1 = require("./template.dto");
8
- const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
9
- const zod_1 = __importDefault(require("zod"));
10
- exports.findTemplatesResponseSchema = zod_1.default.object({
11
- templates: zod_1.default.array(template_dto_1.templateSchema.pick({
12
- name: true,
13
- id: true,
14
- status: true,
15
- })),
16
- });
17
- class FindTemplatesResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.findTemplatesResponseSchema) {
18
- }
19
- exports.FindTemplatesResponseDto = FindTemplatesResponseDto;
20
- //# sourceMappingURL=find-templates.dto.js.map
@@ -1,154 +0,0 @@
1
- import z from 'zod';
2
- declare const buttonsSchema: z.ZodObject<{
3
- type: z.ZodLiteral<"BUTTONS">;
4
- buttons: z.ZodArray<z.ZodObject<{
5
- text: z.ZodString;
6
- type: z.ZodLiteral<"QUICK_REPLY">;
7
- }, "strip", z.ZodTypeAny, {
8
- type: "QUICK_REPLY";
9
- text: string;
10
- }, {
11
- type: "QUICK_REPLY";
12
- text: string;
13
- }>, "many">;
14
- }, "strip", z.ZodTypeAny, {
15
- type: "BUTTONS";
16
- buttons: {
17
- type: "QUICK_REPLY";
18
- text: string;
19
- }[];
20
- }, {
21
- type: "BUTTONS";
22
- buttons: {
23
- type: "QUICK_REPLY";
24
- text: string;
25
- }[];
26
- }>;
27
- declare const componentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
28
- type: z.ZodLiteral<"BODY">;
29
- text: z.ZodString;
30
- }, "strip", z.ZodTypeAny, {
31
- type: "BODY";
32
- text: string;
33
- }, {
34
- type: "BODY";
35
- text: string;
36
- }>, z.ZodObject<{
37
- type: z.ZodLiteral<"BUTTONS">;
38
- buttons: z.ZodArray<z.ZodObject<{
39
- text: z.ZodString;
40
- type: z.ZodLiteral<"QUICK_REPLY">;
41
- }, "strip", z.ZodTypeAny, {
42
- type: "QUICK_REPLY";
43
- text: string;
44
- }, {
45
- type: "QUICK_REPLY";
46
- text: string;
47
- }>, "many">;
48
- }, "strip", z.ZodTypeAny, {
49
- type: "BUTTONS";
50
- buttons: {
51
- type: "QUICK_REPLY";
52
- text: string;
53
- }[];
54
- }, {
55
- type: "BUTTONS";
56
- buttons: {
57
- type: "QUICK_REPLY";
58
- text: string;
59
- }[];
60
- }>]>;
61
- export declare const templateSchema: z.ZodObject<{
62
- name: z.ZodEffects<z.ZodString, string, string>;
63
- content: z.ZodString;
64
- buttons: z.ZodArray<z.ZodString, "many">;
65
- id: z.ZodString;
66
- status: z.ZodNativeEnum<{
67
- APRROVED: "APRROVED";
68
- PENDING: "PENDING";
69
- REJECTED: "REJECTED";
70
- }>;
71
- language: z.ZodString;
72
- components: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
73
- type: z.ZodLiteral<"BODY">;
74
- text: z.ZodString;
75
- }, "strip", z.ZodTypeAny, {
76
- type: "BODY";
77
- text: string;
78
- }, {
79
- type: "BODY";
80
- text: string;
81
- }>, z.ZodObject<{
82
- type: z.ZodLiteral<"BUTTONS">;
83
- buttons: z.ZodArray<z.ZodObject<{
84
- text: z.ZodString;
85
- type: z.ZodLiteral<"QUICK_REPLY">;
86
- }, "strip", z.ZodTypeAny, {
87
- type: "QUICK_REPLY";
88
- text: string;
89
- }, {
90
- type: "QUICK_REPLY";
91
- text: string;
92
- }>, "many">;
93
- }, "strip", z.ZodTypeAny, {
94
- type: "BUTTONS";
95
- buttons: {
96
- type: "QUICK_REPLY";
97
- text: string;
98
- }[];
99
- }, {
100
- type: "BUTTONS";
101
- buttons: {
102
- type: "QUICK_REPLY";
103
- text: string;
104
- }[];
105
- }>]>, "many">;
106
- category: z.ZodNativeEnum<{
107
- MARKETING: "MARKETING";
108
- UTILITY: "UTILITY";
109
- AUTHENTICATION: "AUTHENTICATION";
110
- }>;
111
- allow_category_change: z.ZodBoolean;
112
- }, "strip", z.ZodTypeAny, {
113
- id: string;
114
- name: string;
115
- content: string;
116
- buttons: string[];
117
- status: "APRROVED" | "PENDING" | "REJECTED";
118
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
119
- language: string;
120
- components: ({
121
- type: "BUTTONS";
122
- buttons: {
123
- type: "QUICK_REPLY";
124
- text: string;
125
- }[];
126
- } | {
127
- type: "BODY";
128
- text: string;
129
- })[];
130
- allow_category_change: boolean;
131
- }, {
132
- id: string;
133
- name: string;
134
- content: string;
135
- buttons: string[];
136
- status: "APRROVED" | "PENDING" | "REJECTED";
137
- category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
138
- language: string;
139
- components: ({
140
- type: "BUTTONS";
141
- buttons: {
142
- type: "QUICK_REPLY";
143
- text: string;
144
- }[];
145
- } | {
146
- type: "BODY";
147
- text: string;
148
- })[];
149
- allow_category_change: boolean;
150
- }>;
151
- export type Buttons = z.infer<typeof buttonsSchema>;
152
- export type TemplateType = z.infer<typeof templateSchema>;
153
- export type Components = z.infer<typeof componentSchema>;
154
- export {};
@@ -1,63 +0,0 @@
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.templateSchema = void 0;
7
- const translate_1 = require("../../i18n/translate");
8
- const zod_1 = __importDefault(require("zod"));
9
- const types_1 = require("../../../types");
10
- const buttonsSchema = zod_1.default.object({
11
- type: zod_1.default.literal('BUTTONS'),
12
- buttons: zod_1.default.array(zod_1.default.object({
13
- text: zod_1.default.string(),
14
- type: zod_1.default.literal('QUICK_REPLY'),
15
- })),
16
- });
17
- const bodySchema = zod_1.default.object({
18
- type: zod_1.default.literal('BODY'),
19
- text: zod_1.default.string(),
20
- });
21
- const componentSchema = zod_1.default.discriminatedUnion('type', [
22
- bodySchema,
23
- buttonsSchema,
24
- ]);
25
- exports.templateSchema = zod_1.default.object({
26
- name: zod_1.default
27
- .string()
28
- .min(1, {
29
- message: (0, translate_1.translate)('model.template.name.min'),
30
- })
31
- .max(512, {
32
- message: (0, translate_1.translate)('model.template.name.max'),
33
- })
34
- .toLowerCase()
35
- .trim()
36
- .refine((value) => {
37
- return /^[a-z_]*$/.test(value);
38
- }, {
39
- message: (0, translate_1.translate)('model.template.name.invalid'),
40
- }),
41
- content: zod_1.default
42
- .string()
43
- .max(768, {
44
- message: (0, translate_1.translate)('model.template.content.max'),
45
- })
46
- .min(1, {
47
- message: (0, translate_1.translate)('model.template.content.min'),
48
- }),
49
- buttons: zod_1.default
50
- .array(zod_1.default.string().max(25, {
51
- message: (0, translate_1.translate)('model.template.buttons.max-length'),
52
- }))
53
- .max(10, {
54
- message: (0, translate_1.translate)('model.template.buttons.max'),
55
- }),
56
- id: zod_1.default.string(),
57
- status: zod_1.default.nativeEnum(types_1.TemplateStatus),
58
- language: zod_1.default.string(),
59
- components: zod_1.default.array(componentSchema),
60
- category: zod_1.default.nativeEnum(types_1.TemplateCategory),
61
- allow_category_change: zod_1.default.boolean(),
62
- });
63
- //# sourceMappingURL=template.dto.js.map