evo360-types 1.3.147 → 1.3.148
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/apps/evo-chat/chatbee/zod-schemas.d.ts +19 -10
- package/dist/apps/evo-chat/chatbee/zod-schemas.js +9 -6
- package/dist/apps/evo-chat/chatbee/zod-schemas.ts +9 -6
- package/dist/types/evo-chat/chatbee/index.d.ts +6 -3
- package/dist/types/evo-chat/chatbee/index.ts +6 -3
- package/package.json +1 -1
|
@@ -50,6 +50,9 @@ export declare const zChatBeeChannelConfigSchema: z.ZodObject<z.objectUtil.exten
|
|
|
50
50
|
transcribe_audio_when_ai_disabled?: boolean | undefined;
|
|
51
51
|
suggest_agenda_action?: boolean | undefined;
|
|
52
52
|
}>>;
|
|
53
|
+
company_id: z.ZodOptional<z.ZodString>;
|
|
54
|
+
default_department_id: z.ZodOptional<z.ZodString>;
|
|
55
|
+
waba_id: z.ZodOptional<z.ZodString>;
|
|
53
56
|
}>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
|
|
54
57
|
id: z.ZodString;
|
|
55
58
|
ref: z.ZodAny;
|
|
@@ -101,6 +104,9 @@ export declare const zChatBeeChannelConfigSchema: z.ZodObject<z.objectUtil.exten
|
|
|
101
104
|
transcribe_audio_when_ai_disabled?: boolean | undefined;
|
|
102
105
|
suggest_agenda_action?: boolean | undefined;
|
|
103
106
|
}>>;
|
|
107
|
+
company_id: z.ZodOptional<z.ZodString>;
|
|
108
|
+
default_department_id: z.ZodOptional<z.ZodString>;
|
|
109
|
+
waba_id: z.ZodOptional<z.ZodString>;
|
|
104
110
|
}>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
|
|
105
111
|
id: z.ZodString;
|
|
106
112
|
ref: z.ZodAny;
|
|
@@ -152,6 +158,9 @@ export declare const zChatBeeChannelConfigSchema: z.ZodObject<z.objectUtil.exten
|
|
|
152
158
|
transcribe_audio_when_ai_disabled?: boolean | undefined;
|
|
153
159
|
suggest_agenda_action?: boolean | undefined;
|
|
154
160
|
}>>;
|
|
161
|
+
company_id: z.ZodOptional<z.ZodString>;
|
|
162
|
+
default_department_id: z.ZodOptional<z.ZodString>;
|
|
163
|
+
waba_id: z.ZodOptional<z.ZodString>;
|
|
155
164
|
}>, z.ZodTypeAny, "passthrough">>;
|
|
156
165
|
export declare const zChatbeeChannelSchema: z.ZodObject<{
|
|
157
166
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -514,7 +523,7 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
514
523
|
type: z.ZodLiteral<"template">;
|
|
515
524
|
contact_address: z.ZodString;
|
|
516
525
|
contact_custom_name: z.ZodOptional<z.ZodString>;
|
|
517
|
-
department_id: z.ZodString
|
|
526
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
518
527
|
channel_id: z.ZodString;
|
|
519
528
|
tenant: z.ZodString;
|
|
520
529
|
template_name: z.ZodString;
|
|
@@ -568,11 +577,11 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
568
577
|
type: "template";
|
|
569
578
|
channel_id: string;
|
|
570
579
|
contact_address: string;
|
|
571
|
-
department_id: string;
|
|
572
580
|
template_name: string;
|
|
573
581
|
template_language: string;
|
|
574
|
-
contact_custom_name?: string | undefined;
|
|
575
582
|
waba_id?: string | undefined;
|
|
583
|
+
department_id?: string | undefined;
|
|
584
|
+
contact_custom_name?: string | undefined;
|
|
576
585
|
header_variables?: {
|
|
577
586
|
value: string;
|
|
578
587
|
parameter_name: string;
|
|
@@ -595,11 +604,11 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
595
604
|
type: "template";
|
|
596
605
|
channel_id: string;
|
|
597
606
|
contact_address: string;
|
|
598
|
-
department_id: string;
|
|
599
607
|
template_name: string;
|
|
608
|
+
waba_id?: string | undefined;
|
|
609
|
+
department_id?: string | undefined;
|
|
600
610
|
contact_custom_name?: string | undefined;
|
|
601
611
|
template_language?: string | undefined;
|
|
602
|
-
waba_id?: string | undefined;
|
|
603
612
|
header_variables?: {
|
|
604
613
|
value: string;
|
|
605
614
|
parameter_name: string;
|
|
@@ -649,7 +658,7 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
649
658
|
type: z.ZodLiteral<"template">;
|
|
650
659
|
contact_address: z.ZodString;
|
|
651
660
|
contact_custom_name: z.ZodOptional<z.ZodString>;
|
|
652
|
-
department_id: z.ZodString
|
|
661
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
653
662
|
channel_id: z.ZodString;
|
|
654
663
|
tenant: z.ZodString;
|
|
655
664
|
template_name: z.ZodString;
|
|
@@ -703,11 +712,11 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
703
712
|
type: "template";
|
|
704
713
|
channel_id: string;
|
|
705
714
|
contact_address: string;
|
|
706
|
-
department_id: string;
|
|
707
715
|
template_name: string;
|
|
708
716
|
template_language: string;
|
|
709
|
-
contact_custom_name?: string | undefined;
|
|
710
717
|
waba_id?: string | undefined;
|
|
718
|
+
department_id?: string | undefined;
|
|
719
|
+
contact_custom_name?: string | undefined;
|
|
711
720
|
header_variables?: {
|
|
712
721
|
value: string;
|
|
713
722
|
parameter_name: string;
|
|
@@ -730,11 +739,11 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
730
739
|
type: "template";
|
|
731
740
|
channel_id: string;
|
|
732
741
|
contact_address: string;
|
|
733
|
-
department_id: string;
|
|
734
742
|
template_name: string;
|
|
743
|
+
waba_id?: string | undefined;
|
|
744
|
+
department_id?: string | undefined;
|
|
735
745
|
contact_custom_name?: string | undefined;
|
|
736
746
|
template_language?: string | undefined;
|
|
737
|
-
waba_id?: string | undefined;
|
|
738
747
|
header_variables?: {
|
|
739
748
|
value: string;
|
|
740
749
|
parameter_name: string;
|
|
@@ -13,6 +13,9 @@ exports.zChatBeeChannelConfigSchema = zod_schemas_1.zFireDocSchema
|
|
|
13
13
|
type: zod_1.z.string().optional(), // Tipo do canal
|
|
14
14
|
channel_uuid: zod_1.z.string().optional(), // UUID do canal
|
|
15
15
|
hub_ia: zod_schemas_2.zHubIAConfigSchema.optional(), // Configurações da HubIA para este canal
|
|
16
|
+
company_id: zod_1.z.string().optional(), // ID da empresa para este canal
|
|
17
|
+
default_department_id: zod_1.z.string().optional(), // ID do departamento padrão para este canal
|
|
18
|
+
waba_id: zod_1.z.string().optional(), // ID do WABA para este canal
|
|
16
19
|
})
|
|
17
20
|
.passthrough();
|
|
18
21
|
// ───────── ChatBee Channel ─────────
|
|
@@ -95,7 +98,7 @@ exports.zTemplateButtonPayloadSchema = zod_1.z.object({
|
|
|
95
98
|
* Schema para mídia do HEADER
|
|
96
99
|
*/
|
|
97
100
|
exports.zTemplateHeaderMediaSchema = zod_1.z.object({
|
|
98
|
-
type: zod_1.z.enum([
|
|
101
|
+
type: zod_1.z.enum(["image", "video", "document"]),
|
|
99
102
|
link: zod_1.z.string().url(),
|
|
100
103
|
filename: zod_1.z.string().optional(), // obrigatório apenas para documentos
|
|
101
104
|
});
|
|
@@ -103,7 +106,7 @@ exports.zTemplateHeaderMediaSchema = zod_1.z.object({
|
|
|
103
106
|
* Schema para requisição de envio de mensagem de texto
|
|
104
107
|
*/
|
|
105
108
|
exports.zSendTextMessageRequestSchema = zod_1.z.object({
|
|
106
|
-
type: zod_1.z.literal(
|
|
109
|
+
type: zod_1.z.literal("text"),
|
|
107
110
|
contact_address: zod_1.z.string().min(1),
|
|
108
111
|
contact_custom_name: zod_1.z.string().optional(),
|
|
109
112
|
department_id: zod_1.z.string().min(1),
|
|
@@ -115,14 +118,14 @@ exports.zSendTextMessageRequestSchema = zod_1.z.object({
|
|
|
115
118
|
* Schema para requisição de envio de mensagem HSM (template)
|
|
116
119
|
*/
|
|
117
120
|
exports.zSendTemplateMessageRequestSchema = zod_1.z.object({
|
|
118
|
-
type: zod_1.z.literal(
|
|
121
|
+
type: zod_1.z.literal("template"),
|
|
119
122
|
contact_address: zod_1.z.string().min(1),
|
|
120
123
|
contact_custom_name: zod_1.z.string().optional(),
|
|
121
|
-
department_id: zod_1.z.string().min(1),
|
|
124
|
+
department_id: zod_1.z.string().min(1).optional(),
|
|
122
125
|
channel_id: zod_1.z.string().min(1),
|
|
123
126
|
tenant: zod_1.z.string().min(1),
|
|
124
127
|
template_name: zod_1.z.string().min(1),
|
|
125
|
-
template_language: zod_1.z.string().optional().default(
|
|
128
|
+
template_language: zod_1.z.string().optional().default("pt_BR"),
|
|
126
129
|
waba_id: zod_1.z.string().optional(),
|
|
127
130
|
header_variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
|
|
128
131
|
variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
|
|
@@ -132,7 +135,7 @@ exports.zSendTemplateMessageRequestSchema = zod_1.z.object({
|
|
|
132
135
|
/**
|
|
133
136
|
* Schema union para requisição de envio de mensagem
|
|
134
137
|
*/
|
|
135
|
-
exports.zSendMessageRequestSchema = zod_1.z.discriminatedUnion(
|
|
138
|
+
exports.zSendMessageRequestSchema = zod_1.z.discriminatedUnion("type", [
|
|
136
139
|
exports.zSendTextMessageRequestSchema,
|
|
137
140
|
exports.zSendTemplateMessageRequestSchema,
|
|
138
141
|
]);
|
|
@@ -11,6 +11,9 @@ export const zChatBeeChannelConfigSchema = zFireDocSchema
|
|
|
11
11
|
type: z.string().optional(), // Tipo do canal
|
|
12
12
|
channel_uuid: z.string().optional(), // UUID do canal
|
|
13
13
|
hub_ia: zHubIAConfigSchema.optional(), // Configurações da HubIA para este canal
|
|
14
|
+
company_id: z.string().optional(), // ID da empresa para este canal
|
|
15
|
+
default_department_id: z.string().optional(), // ID do departamento padrão para este canal
|
|
16
|
+
waba_id: z.string().optional(), // ID do WABA para este canal
|
|
14
17
|
})
|
|
15
18
|
.passthrough();
|
|
16
19
|
|
|
@@ -101,7 +104,7 @@ export const zTemplateButtonPayloadSchema = z.object({
|
|
|
101
104
|
* Schema para mídia do HEADER
|
|
102
105
|
*/
|
|
103
106
|
export const zTemplateHeaderMediaSchema = z.object({
|
|
104
|
-
type: z.enum([
|
|
107
|
+
type: z.enum(["image", "video", "document"]),
|
|
105
108
|
link: z.string().url(),
|
|
106
109
|
filename: z.string().optional(), // obrigatório apenas para documentos
|
|
107
110
|
});
|
|
@@ -110,7 +113,7 @@ export const zTemplateHeaderMediaSchema = z.object({
|
|
|
110
113
|
* Schema para requisição de envio de mensagem de texto
|
|
111
114
|
*/
|
|
112
115
|
export const zSendTextMessageRequestSchema = z.object({
|
|
113
|
-
type: z.literal(
|
|
116
|
+
type: z.literal("text"),
|
|
114
117
|
contact_address: z.string().min(1),
|
|
115
118
|
contact_custom_name: z.string().optional(),
|
|
116
119
|
department_id: z.string().min(1),
|
|
@@ -123,14 +126,14 @@ export const zSendTextMessageRequestSchema = z.object({
|
|
|
123
126
|
* Schema para requisição de envio de mensagem HSM (template)
|
|
124
127
|
*/
|
|
125
128
|
export const zSendTemplateMessageRequestSchema = z.object({
|
|
126
|
-
type: z.literal(
|
|
129
|
+
type: z.literal("template"),
|
|
127
130
|
contact_address: z.string().min(1),
|
|
128
131
|
contact_custom_name: z.string().optional(),
|
|
129
|
-
department_id: z.string().min(1),
|
|
132
|
+
department_id: z.string().min(1).optional(),
|
|
130
133
|
channel_id: z.string().min(1),
|
|
131
134
|
tenant: z.string().min(1),
|
|
132
135
|
template_name: z.string().min(1),
|
|
133
|
-
template_language: z.string().optional().default(
|
|
136
|
+
template_language: z.string().optional().default("pt_BR"),
|
|
134
137
|
waba_id: z.string().optional(),
|
|
135
138
|
header_variables: z.array(zTemplateVariableSchema).optional(),
|
|
136
139
|
variables: z.array(zTemplateVariableSchema).optional(),
|
|
@@ -141,7 +144,7 @@ export const zSendTemplateMessageRequestSchema = z.object({
|
|
|
141
144
|
/**
|
|
142
145
|
* Schema union para requisição de envio de mensagem
|
|
143
146
|
*/
|
|
144
|
-
export const zSendMessageRequestSchema = z.discriminatedUnion(
|
|
147
|
+
export const zSendMessageRequestSchema = z.discriminatedUnion("type", [
|
|
145
148
|
zSendTextMessageRequestSchema,
|
|
146
149
|
zSendTemplateMessageRequestSchema,
|
|
147
150
|
]);
|
|
@@ -7,6 +7,9 @@ export interface IChatBeeChannelConfig extends IFireDoc {
|
|
|
7
7
|
type?: string;
|
|
8
8
|
channel_uuid?: string;
|
|
9
9
|
hub_ia?: IHubIAConfig;
|
|
10
|
+
company_id?: string;
|
|
11
|
+
default_department_id?: string;
|
|
12
|
+
waba_id?: string;
|
|
10
13
|
[key: string]: unknown;
|
|
11
14
|
}
|
|
12
15
|
export interface IChatbeeChannel {
|
|
@@ -70,7 +73,7 @@ export interface ITemplateButtonPayload {
|
|
|
70
73
|
* Mídia para o HEADER do template (imagem, vídeo ou documento)
|
|
71
74
|
*/
|
|
72
75
|
export interface ITemplateHeaderMedia {
|
|
73
|
-
type:
|
|
76
|
+
type: "image" | "video" | "document";
|
|
74
77
|
link: string;
|
|
75
78
|
filename?: string;
|
|
76
79
|
}
|
|
@@ -81,7 +84,7 @@ export interface ISendTextMessageRequest {
|
|
|
81
84
|
type: "text";
|
|
82
85
|
contact_address: string;
|
|
83
86
|
contact_custom_name?: string;
|
|
84
|
-
department_id
|
|
87
|
+
department_id?: string;
|
|
85
88
|
channel_id: string;
|
|
86
89
|
tenant: string;
|
|
87
90
|
text: string;
|
|
@@ -93,7 +96,7 @@ export interface ISendTemplateMessageRequest {
|
|
|
93
96
|
type: "template";
|
|
94
97
|
contact_address: string;
|
|
95
98
|
contact_custom_name?: string;
|
|
96
|
-
department_id
|
|
99
|
+
department_id?: string;
|
|
97
100
|
channel_id: string;
|
|
98
101
|
tenant: string;
|
|
99
102
|
template_name: string;
|
|
@@ -9,6 +9,9 @@ export interface IChatBeeChannelConfig extends IFireDoc {
|
|
|
9
9
|
type?: string; // Tipo do canal
|
|
10
10
|
channel_uuid?: string; // UUID do canal
|
|
11
11
|
hub_ia?: IHubIAConfig; // Configurações da HubIA para este canal
|
|
12
|
+
company_id?: string; // ID da empresa para este canal
|
|
13
|
+
default_department_id?: string; // ID do departamento padrão para este canal
|
|
14
|
+
waba_id?: string; // ID do WABA para este canal
|
|
12
15
|
[key: string]: unknown; // index signature
|
|
13
16
|
}
|
|
14
17
|
|
|
@@ -91,7 +94,7 @@ export interface ITemplateButtonPayload {
|
|
|
91
94
|
* Mídia para o HEADER do template (imagem, vídeo ou documento)
|
|
92
95
|
*/
|
|
93
96
|
export interface ITemplateHeaderMedia {
|
|
94
|
-
type:
|
|
97
|
+
type: "image" | "video" | "document";
|
|
95
98
|
link: string;
|
|
96
99
|
filename?: string; // obrigatório apenas para documentos
|
|
97
100
|
}
|
|
@@ -103,7 +106,7 @@ export interface ISendTextMessageRequest {
|
|
|
103
106
|
type: "text";
|
|
104
107
|
contact_address: string;
|
|
105
108
|
contact_custom_name?: string;
|
|
106
|
-
department_id
|
|
109
|
+
department_id?: string; // opcional, será omitido na requisição se não fornecido
|
|
107
110
|
channel_id: string;
|
|
108
111
|
tenant: string;
|
|
109
112
|
text: string;
|
|
@@ -116,7 +119,7 @@ export interface ISendTemplateMessageRequest {
|
|
|
116
119
|
type: "template";
|
|
117
120
|
contact_address: string;
|
|
118
121
|
contact_custom_name?: string;
|
|
119
|
-
department_id
|
|
122
|
+
department_id?: string; // opcional, será omitido na requisição se não fornecido
|
|
120
123
|
channel_id: string;
|
|
121
124
|
tenant: string;
|
|
122
125
|
template_name: string;
|