evo360-types 1.3.146 → 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 +55 -10
- package/dist/apps/evo-chat/chatbee/zod-schemas.js +10 -6
- package/dist/apps/evo-chat/chatbee/zod-schemas.ts +10 -6
- package/dist/types/evo-chat/chatbee/index.d.ts +7 -3
- package/dist/types/evo-chat/chatbee/index.ts +8 -4
- 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,12 +523,22 @@ 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;
|
|
521
530
|
template_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
522
531
|
waba_id: z.ZodOptional<z.ZodString>;
|
|
532
|
+
header_variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
533
|
+
parameter_name: z.ZodString;
|
|
534
|
+
value: z.ZodString;
|
|
535
|
+
}, "strip", z.ZodTypeAny, {
|
|
536
|
+
value: string;
|
|
537
|
+
parameter_name: string;
|
|
538
|
+
}, {
|
|
539
|
+
value: string;
|
|
540
|
+
parameter_name: string;
|
|
541
|
+
}>, "many">>;
|
|
523
542
|
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
524
543
|
parameter_name: z.ZodString;
|
|
525
544
|
value: z.ZodString;
|
|
@@ -558,11 +577,15 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
558
577
|
type: "template";
|
|
559
578
|
channel_id: string;
|
|
560
579
|
contact_address: string;
|
|
561
|
-
department_id: string;
|
|
562
580
|
template_name: string;
|
|
563
581
|
template_language: string;
|
|
564
|
-
contact_custom_name?: string | undefined;
|
|
565
582
|
waba_id?: string | undefined;
|
|
583
|
+
department_id?: string | undefined;
|
|
584
|
+
contact_custom_name?: string | undefined;
|
|
585
|
+
header_variables?: {
|
|
586
|
+
value: string;
|
|
587
|
+
parameter_name: string;
|
|
588
|
+
}[] | undefined;
|
|
566
589
|
variables?: {
|
|
567
590
|
value: string;
|
|
568
591
|
parameter_name: string;
|
|
@@ -581,11 +604,15 @@ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
|
|
|
581
604
|
type: "template";
|
|
582
605
|
channel_id: string;
|
|
583
606
|
contact_address: string;
|
|
584
|
-
department_id: string;
|
|
585
607
|
template_name: string;
|
|
608
|
+
waba_id?: string | undefined;
|
|
609
|
+
department_id?: string | undefined;
|
|
586
610
|
contact_custom_name?: string | undefined;
|
|
587
611
|
template_language?: string | undefined;
|
|
588
|
-
|
|
612
|
+
header_variables?: {
|
|
613
|
+
value: string;
|
|
614
|
+
parameter_name: string;
|
|
615
|
+
}[] | undefined;
|
|
589
616
|
variables?: {
|
|
590
617
|
value: string;
|
|
591
618
|
parameter_name: string;
|
|
@@ -631,12 +658,22 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
631
658
|
type: z.ZodLiteral<"template">;
|
|
632
659
|
contact_address: z.ZodString;
|
|
633
660
|
contact_custom_name: z.ZodOptional<z.ZodString>;
|
|
634
|
-
department_id: z.ZodString
|
|
661
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
635
662
|
channel_id: z.ZodString;
|
|
636
663
|
tenant: z.ZodString;
|
|
637
664
|
template_name: z.ZodString;
|
|
638
665
|
template_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
639
666
|
waba_id: z.ZodOptional<z.ZodString>;
|
|
667
|
+
header_variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
668
|
+
parameter_name: z.ZodString;
|
|
669
|
+
value: z.ZodString;
|
|
670
|
+
}, "strip", z.ZodTypeAny, {
|
|
671
|
+
value: string;
|
|
672
|
+
parameter_name: string;
|
|
673
|
+
}, {
|
|
674
|
+
value: string;
|
|
675
|
+
parameter_name: string;
|
|
676
|
+
}>, "many">>;
|
|
640
677
|
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
641
678
|
parameter_name: z.ZodString;
|
|
642
679
|
value: z.ZodString;
|
|
@@ -675,11 +712,15 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
675
712
|
type: "template";
|
|
676
713
|
channel_id: string;
|
|
677
714
|
contact_address: string;
|
|
678
|
-
department_id: string;
|
|
679
715
|
template_name: string;
|
|
680
716
|
template_language: string;
|
|
681
|
-
contact_custom_name?: string | undefined;
|
|
682
717
|
waba_id?: string | undefined;
|
|
718
|
+
department_id?: string | undefined;
|
|
719
|
+
contact_custom_name?: string | undefined;
|
|
720
|
+
header_variables?: {
|
|
721
|
+
value: string;
|
|
722
|
+
parameter_name: string;
|
|
723
|
+
}[] | undefined;
|
|
683
724
|
variables?: {
|
|
684
725
|
value: string;
|
|
685
726
|
parameter_name: string;
|
|
@@ -698,11 +739,15 @@ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
698
739
|
type: "template";
|
|
699
740
|
channel_id: string;
|
|
700
741
|
contact_address: string;
|
|
701
|
-
department_id: string;
|
|
702
742
|
template_name: string;
|
|
743
|
+
waba_id?: string | undefined;
|
|
744
|
+
department_id?: string | undefined;
|
|
703
745
|
contact_custom_name?: string | undefined;
|
|
704
746
|
template_language?: string | undefined;
|
|
705
|
-
|
|
747
|
+
header_variables?: {
|
|
748
|
+
value: string;
|
|
749
|
+
parameter_name: string;
|
|
750
|
+
}[] | undefined;
|
|
706
751
|
variables?: {
|
|
707
752
|
value: string;
|
|
708
753
|
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,15 +118,16 @@ 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(),
|
|
130
|
+
header_variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
|
|
127
131
|
variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
|
|
128
132
|
header_media: exports.zTemplateHeaderMediaSchema.optional(),
|
|
129
133
|
button_payloads: zod_1.z.array(exports.zTemplateButtonPayloadSchema).optional(),
|
|
@@ -131,7 +135,7 @@ exports.zSendTemplateMessageRequestSchema = zod_1.z.object({
|
|
|
131
135
|
/**
|
|
132
136
|
* Schema union para requisição de envio de mensagem
|
|
133
137
|
*/
|
|
134
|
-
exports.zSendMessageRequestSchema = zod_1.z.discriminatedUnion(
|
|
138
|
+
exports.zSendMessageRequestSchema = zod_1.z.discriminatedUnion("type", [
|
|
135
139
|
exports.zSendTextMessageRequestSchema,
|
|
136
140
|
exports.zSendTemplateMessageRequestSchema,
|
|
137
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,15 +126,16 @@ 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(),
|
|
138
|
+
header_variables: z.array(zTemplateVariableSchema).optional(),
|
|
135
139
|
variables: z.array(zTemplateVariableSchema).optional(),
|
|
136
140
|
header_media: zTemplateHeaderMediaSchema.optional(),
|
|
137
141
|
button_payloads: z.array(zTemplateButtonPayloadSchema).optional(),
|
|
@@ -140,7 +144,7 @@ export const zSendTemplateMessageRequestSchema = z.object({
|
|
|
140
144
|
/**
|
|
141
145
|
* Schema union para requisição de envio de mensagem
|
|
142
146
|
*/
|
|
143
|
-
export const zSendMessageRequestSchema = z.discriminatedUnion(
|
|
147
|
+
export const zSendMessageRequestSchema = z.discriminatedUnion("type", [
|
|
144
148
|
zSendTextMessageRequestSchema,
|
|
145
149
|
zSendTemplateMessageRequestSchema,
|
|
146
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,12 +96,13 @@ 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;
|
|
100
103
|
template_language?: string;
|
|
101
104
|
waba_id?: string;
|
|
105
|
+
header_variables?: ITemplateVariable[];
|
|
102
106
|
variables?: ITemplateVariable[];
|
|
103
107
|
header_media?: ITemplateHeaderMedia;
|
|
104
108
|
button_payloads?: ITemplateButtonPayload[];
|
|
@@ -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,13 +119,14 @@ 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;
|
|
123
126
|
template_language?: string; // padrão: 'pt_BR'
|
|
124
127
|
waba_id?: string; // opcional, será obtido do canal se não fornecido
|
|
125
|
-
|
|
128
|
+
header_variables?: ITemplateVariable[]; // variáveis para o HEADER (se aplicável)
|
|
129
|
+
variables?: ITemplateVariable[]; // variáveis para o BODY
|
|
126
130
|
header_media?: ITemplateHeaderMedia; // mídia para o HEADER (imagem, vídeo ou documento)
|
|
127
131
|
button_payloads?: ITemplateButtonPayload[]; // payloads para botões QUICK_REPLY
|
|
128
132
|
}
|