expo-backend-types 0.22.0 → 0.24.0-EXPO-251-EB-Whatsapp.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/dist/src/i18n/es.d.ts +51 -0
  2. package/dist/src/i18n/es.js +51 -0
  3. package/dist/src/i18n/es.js.map +1 -1
  4. package/dist/src/location/dto/arg-city.dto.d.ts +2 -2
  5. package/dist/src/message/dto/create-template.dto.d.ts +93 -0
  6. package/dist/src/message/dto/create-template.dto.js +24 -0
  7. package/dist/src/message/dto/delete-template.dto.d.ts +18 -0
  8. package/dist/src/message/dto/delete-template.dto.js +15 -0
  9. package/dist/src/message/dto/find-messages-by-phone.dto.d.ts +316 -0
  10. package/dist/src/message/dto/find-messages-by-phone.dto.js +24 -0
  11. package/dist/src/message/dto/find-template-by-id.dto.d.ts +245 -0
  12. package/dist/src/message/dto/find-template-by-id.dto.js +23 -0
  13. package/dist/src/message/dto/find-templates.dto.d.ts +109 -0
  14. package/dist/src/message/dto/find-templates.dto.js +20 -0
  15. package/dist/src/message/dto/message.dto.d.ts +46 -16
  16. package/dist/src/message/dto/message.dto.js +1 -1
  17. package/dist/src/message/dto/send-message-to-phone.dto.d.ts +40 -0
  18. package/dist/src/message/dto/send-message-to-phone.dto.js +23 -0
  19. package/dist/src/message/dto/send-template-to-tags.dto.d.ts +40 -0
  20. package/dist/src/message/dto/send-template-to-tags.dto.js +23 -0
  21. package/dist/src/message/dto/template.dto.d.ts +154 -0
  22. package/dist/src/message/dto/template.dto.js +63 -0
  23. package/dist/src/message/dto/update-template.dto.d.ts +88 -0
  24. package/dist/src/message/dto/update-template.dto.js +23 -0
  25. package/dist/src/message/exports.d.ts +9 -0
  26. package/dist/src/message/exports.js +9 -0
  27. package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +36 -36
  28. package/dist/types/schema.d.ts +401 -2
  29. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ import z from 'zod';
2
+ export declare const sendTemplateToTagsSchema: z.ZodObject<{
3
+ tags: z.ZodArray<z.ZodString, "many">;
4
+ templateName: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ templateName: string;
7
+ tags: string[];
8
+ }, {
9
+ templateName: string;
10
+ tags: string[];
11
+ }>;
12
+ declare const SendTemplateToTagsDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
13
+ tags: z.ZodArray<z.ZodString, "many">;
14
+ templateName: z.ZodString;
15
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
16
+ templateName: string;
17
+ tags: string[];
18
+ }, {
19
+ templateName: string;
20
+ tags: string[];
21
+ }>>;
22
+ export declare class SendTemplateToTagsDto extends SendTemplateToTagsDto_base {
23
+ }
24
+ export declare const sendTemplateToTagsResponseSchema: z.ZodObject<{
25
+ success: z.ZodBoolean;
26
+ }, "strip", z.ZodTypeAny, {
27
+ success: boolean;
28
+ }, {
29
+ success: boolean;
30
+ }>;
31
+ declare const SendTemplateToTagsResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
32
+ success: z.ZodBoolean;
33
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
34
+ success: boolean;
35
+ }, {
36
+ success: boolean;
37
+ }>>;
38
+ export declare class SendTemplateToTagsResponseDto extends SendTemplateToTagsResponseDto_base {
39
+ }
40
+ export {};
@@ -0,0 +1,23 @@
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.SendTemplateToTagsResponseDto = exports.sendTemplateToTagsResponseSchema = exports.SendTemplateToTagsDto = exports.sendTemplateToTagsSchema = void 0;
7
+ const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
8
+ const tag_dto_1 = require("../../tag/dto/tag.dto");
9
+ const zod_1 = __importDefault(require("zod"));
10
+ exports.sendTemplateToTagsSchema = zod_1.default.object({
11
+ tags: zod_1.default.array(tag_dto_1.tagSchema.shape.id),
12
+ templateName: zod_1.default.string(),
13
+ });
14
+ class SendTemplateToTagsDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.sendTemplateToTagsSchema) {
15
+ }
16
+ exports.SendTemplateToTagsDto = SendTemplateToTagsDto;
17
+ exports.sendTemplateToTagsResponseSchema = zod_1.default.object({
18
+ success: zod_1.default.boolean(),
19
+ });
20
+ class SendTemplateToTagsResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.sendTemplateToTagsResponseSchema) {
21
+ }
22
+ exports.SendTemplateToTagsResponseDto = SendTemplateToTagsResponseDto;
23
+ //# sourceMappingURL=send-template-to-tags.dto.js.map
@@ -0,0 +1,154 @@
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
+ language: z.ZodString;
67
+ components: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
68
+ type: z.ZodLiteral<"BODY">;
69
+ text: z.ZodString;
70
+ }, "strip", z.ZodTypeAny, {
71
+ type: "BODY";
72
+ text: string;
73
+ }, {
74
+ type: "BODY";
75
+ text: string;
76
+ }>, z.ZodObject<{
77
+ type: z.ZodLiteral<"BUTTONS">;
78
+ buttons: z.ZodArray<z.ZodObject<{
79
+ text: z.ZodString;
80
+ type: z.ZodLiteral<"QUICK_REPLY">;
81
+ }, "strip", z.ZodTypeAny, {
82
+ type: "QUICK_REPLY";
83
+ text: string;
84
+ }, {
85
+ type: "QUICK_REPLY";
86
+ text: string;
87
+ }>, "many">;
88
+ }, "strip", z.ZodTypeAny, {
89
+ type: "BUTTONS";
90
+ buttons: {
91
+ type: "QUICK_REPLY";
92
+ text: string;
93
+ }[];
94
+ }, {
95
+ type: "BUTTONS";
96
+ buttons: {
97
+ type: "QUICK_REPLY";
98
+ text: string;
99
+ }[];
100
+ }>]>, "many">;
101
+ allow_category_change: z.ZodBoolean;
102
+ category: z.ZodNativeEnum<{
103
+ MARKETING: "MARKETING";
104
+ UTILITY: "UTILITY";
105
+ AUTHENTICATION: "AUTHENTICATION";
106
+ }>;
107
+ status: z.ZodNativeEnum<{
108
+ APRROVED: "APRROVED";
109
+ PENDING: "PENDING";
110
+ REJECTED: "REJECTED";
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ id: string;
114
+ name: string;
115
+ content: string;
116
+ buttons: string[];
117
+ status: "APRROVED" | "PENDING" | "REJECTED";
118
+ language: string;
119
+ components: ({
120
+ type: "BUTTONS";
121
+ buttons: {
122
+ type: "QUICK_REPLY";
123
+ text: string;
124
+ }[];
125
+ } | {
126
+ type: "BODY";
127
+ text: string;
128
+ })[];
129
+ allow_category_change: boolean;
130
+ category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
131
+ }, {
132
+ id: string;
133
+ name: string;
134
+ content: string;
135
+ buttons: string[];
136
+ status: "APRROVED" | "PENDING" | "REJECTED";
137
+ language: string;
138
+ components: ({
139
+ type: "BUTTONS";
140
+ buttons: {
141
+ type: "QUICK_REPLY";
142
+ text: string;
143
+ }[];
144
+ } | {
145
+ type: "BODY";
146
+ text: string;
147
+ })[];
148
+ allow_category_change: boolean;
149
+ category: "MARKETING" | "UTILITY" | "AUTHENTICATION";
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 {};
@@ -0,0 +1,63 @@
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 prisma_schema_1 = require("../../../types/prisma-schema/index.js");
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
+ language: zod_1.default.string(),
58
+ components: zod_1.default.array(componentSchema),
59
+ allow_category_change: zod_1.default.boolean(),
60
+ category: zod_1.default.nativeEnum(prisma_schema_1.TemplateCategory),
61
+ status: zod_1.default.nativeEnum(prisma_schema_1.TemplateStatus),
62
+ });
63
+ //# sourceMappingURL=template.dto.js.map
@@ -0,0 +1,88 @@
1
+ import z from 'zod';
2
+ export declare const updateTemplateSchema: z.ZodObject<Pick<{
3
+ name: z.ZodEffects<z.ZodString, string, string>;
4
+ content: z.ZodString;
5
+ buttons: z.ZodArray<z.ZodString, "many">;
6
+ id: z.ZodString;
7
+ language: z.ZodString;
8
+ components: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
9
+ type: z.ZodLiteral<"BODY">;
10
+ text: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: "BODY";
13
+ text: string;
14
+ }, {
15
+ type: "BODY";
16
+ text: string;
17
+ }>, z.ZodObject<{
18
+ type: z.ZodLiteral<"BUTTONS">;
19
+ buttons: z.ZodArray<z.ZodObject<{
20
+ text: z.ZodString;
21
+ type: z.ZodLiteral<"QUICK_REPLY">;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "QUICK_REPLY";
24
+ text: string;
25
+ }, {
26
+ type: "QUICK_REPLY";
27
+ text: string;
28
+ }>, "many">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: "BUTTONS";
31
+ buttons: {
32
+ type: "QUICK_REPLY";
33
+ text: string;
34
+ }[];
35
+ }, {
36
+ type: "BUTTONS";
37
+ buttons: {
38
+ type: "QUICK_REPLY";
39
+ text: string;
40
+ }[];
41
+ }>]>, "many">;
42
+ allow_category_change: z.ZodBoolean;
43
+ category: z.ZodNativeEnum<{
44
+ MARKETING: "MARKETING";
45
+ UTILITY: "UTILITY";
46
+ AUTHENTICATION: "AUTHENTICATION";
47
+ }>;
48
+ status: z.ZodNativeEnum<{
49
+ APRROVED: "APRROVED";
50
+ PENDING: "PENDING";
51
+ REJECTED: "REJECTED";
52
+ }>;
53
+ }, "content" | "buttons">, "strip", z.ZodTypeAny, {
54
+ content: string;
55
+ buttons: string[];
56
+ }, {
57
+ content: string;
58
+ buttons: string[];
59
+ }>;
60
+ declare const UpdateTemplateDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
61
+ content: z.ZodString;
62
+ buttons: z.ZodArray<z.ZodString, "many">;
63
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
64
+ content: string;
65
+ buttons: string[];
66
+ }, {
67
+ content: string;
68
+ buttons: string[];
69
+ }>>;
70
+ export declare class UpdateTemplateDto extends UpdateTemplateDto_base {
71
+ }
72
+ export declare const updateTemplateResponseSchema: z.ZodObject<{
73
+ success: z.ZodBoolean;
74
+ }, "strip", z.ZodTypeAny, {
75
+ success: boolean;
76
+ }, {
77
+ success: boolean;
78
+ }>;
79
+ declare const UpdateTemplateResponseDto_base: import("@anatine/zod-nestjs").ZodDtoStatic<z.ZodObject<{
80
+ success: z.ZodBoolean;
81
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
82
+ success: boolean;
83
+ }, {
84
+ success: boolean;
85
+ }>>;
86
+ export declare class UpdateTemplateResponseDto extends UpdateTemplateResponseDto_base {
87
+ }
88
+ export {};
@@ -0,0 +1,23 @@
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.UpdateTemplateResponseDto = exports.updateTemplateResponseSchema = exports.UpdateTemplateDto = exports.updateTemplateSchema = 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.updateTemplateSchema = template_dto_1.templateSchema.pick({
11
+ content: true,
12
+ buttons: true,
13
+ });
14
+ class UpdateTemplateDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.updateTemplateSchema) {
15
+ }
16
+ exports.UpdateTemplateDto = UpdateTemplateDto;
17
+ exports.updateTemplateResponseSchema = zod_1.default.object({
18
+ success: zod_1.default.boolean(),
19
+ });
20
+ class UpdateTemplateResponseDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.updateTemplateResponseSchema) {
21
+ }
22
+ exports.UpdateTemplateResponseDto = UpdateTemplateResponseDto;
23
+ //# sourceMappingURL=update-template.dto.js.map
@@ -1 +1,10 @@
1
+ export * from './dto/create-template.dto';
2
+ export * from './dto/delete-template.dto';
3
+ export * from './dto/find-messages-by-phone.dto';
4
+ export * from './dto/find-template-by-id.dto';
5
+ export * from './dto/find-templates.dto';
1
6
  export * from './dto/message.dto';
7
+ export * from './dto/send-message-to-phone.dto';
8
+ export * from './dto/send-template-to-tags.dto';
9
+ export * from './dto/template.dto';
10
+ export * from './dto/update-template.dto';
@@ -14,5 +14,14 @@ 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-template.dto"), exports);
18
+ __exportStar(require("./dto/delete-template.dto"), exports);
19
+ __exportStar(require("./dto/find-messages-by-phone.dto"), exports);
20
+ __exportStar(require("./dto/find-template-by-id.dto"), exports);
21
+ __exportStar(require("./dto/find-templates.dto"), exports);
17
22
  __exportStar(require("./dto/message.dto"), exports);
23
+ __exportStar(require("./dto/send-message-to-phone.dto"), exports);
24
+ __exportStar(require("./dto/send-template-to-tags.dto"), exports);
25
+ __exportStar(require("./dto/template.dto"), exports);
26
+ __exportStar(require("./dto/update-template.dto"), exports);
18
27
  //# sourceMappingURL=exports.js.map