evo360-types 1.3.140 → 1.3.143

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.
@@ -437,3 +437,237 @@ export declare const zChatbeeContactHistorySchema: z.ZodObject<{
437
437
  } | undefined;
438
438
  status_name?: string | undefined;
439
439
  }>;
440
+ /**
441
+ * Schema para variável de template
442
+ */
443
+ export declare const zTemplateVariableSchema: z.ZodObject<{
444
+ parameter_name: z.ZodString;
445
+ value: z.ZodString;
446
+ }, "strip", z.ZodTypeAny, {
447
+ value: string;
448
+ parameter_name: string;
449
+ }, {
450
+ value: string;
451
+ parameter_name: string;
452
+ }>;
453
+ /**
454
+ * Schema para payload de botão QUICK_REPLY
455
+ */
456
+ export declare const zTemplateButtonPayloadSchema: z.ZodObject<{
457
+ index: z.ZodNumber;
458
+ payload: z.ZodString;
459
+ }, "strip", z.ZodTypeAny, {
460
+ index: number;
461
+ payload: string;
462
+ }, {
463
+ index: number;
464
+ payload: string;
465
+ }>;
466
+ /**
467
+ * Schema para requisição de envio de mensagem de texto
468
+ */
469
+ export declare const zSendTextMessageRequestSchema: z.ZodObject<{
470
+ type: z.ZodLiteral<"text">;
471
+ contact_address: z.ZodString;
472
+ contact_custom_name: z.ZodOptional<z.ZodString>;
473
+ department_id: z.ZodString;
474
+ channel_id: z.ZodString;
475
+ tenant: z.ZodString;
476
+ text: z.ZodString;
477
+ }, "strip", z.ZodTypeAny, {
478
+ tenant: string;
479
+ type: "text";
480
+ text: string;
481
+ channel_id: string;
482
+ contact_address: string;
483
+ department_id: string;
484
+ contact_custom_name?: string | undefined;
485
+ }, {
486
+ tenant: string;
487
+ type: "text";
488
+ text: string;
489
+ channel_id: string;
490
+ contact_address: string;
491
+ department_id: string;
492
+ contact_custom_name?: string | undefined;
493
+ }>;
494
+ /**
495
+ * Schema para requisição de envio de mensagem HSM (template)
496
+ */
497
+ export declare const zSendTemplateMessageRequestSchema: z.ZodObject<{
498
+ type: z.ZodLiteral<"template">;
499
+ contact_address: z.ZodString;
500
+ contact_custom_name: z.ZodOptional<z.ZodString>;
501
+ department_id: z.ZodString;
502
+ channel_id: z.ZodString;
503
+ tenant: z.ZodString;
504
+ template_name: z.ZodString;
505
+ template_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
506
+ waba_id: z.ZodOptional<z.ZodString>;
507
+ variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
508
+ parameter_name: z.ZodString;
509
+ value: z.ZodString;
510
+ }, "strip", z.ZodTypeAny, {
511
+ value: string;
512
+ parameter_name: string;
513
+ }, {
514
+ value: string;
515
+ parameter_name: string;
516
+ }>, "many">>;
517
+ button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
518
+ index: z.ZodNumber;
519
+ payload: z.ZodString;
520
+ }, "strip", z.ZodTypeAny, {
521
+ index: number;
522
+ payload: string;
523
+ }, {
524
+ index: number;
525
+ payload: string;
526
+ }>, "many">>;
527
+ }, "strip", z.ZodTypeAny, {
528
+ tenant: string;
529
+ type: "template";
530
+ channel_id: string;
531
+ contact_address: string;
532
+ department_id: string;
533
+ template_name: string;
534
+ template_language: string;
535
+ contact_custom_name?: string | undefined;
536
+ waba_id?: string | undefined;
537
+ variables?: {
538
+ value: string;
539
+ parameter_name: string;
540
+ }[] | undefined;
541
+ button_payloads?: {
542
+ index: number;
543
+ payload: string;
544
+ }[] | undefined;
545
+ }, {
546
+ tenant: string;
547
+ type: "template";
548
+ channel_id: string;
549
+ contact_address: string;
550
+ department_id: string;
551
+ template_name: string;
552
+ contact_custom_name?: string | undefined;
553
+ template_language?: string | undefined;
554
+ waba_id?: string | undefined;
555
+ variables?: {
556
+ value: string;
557
+ parameter_name: string;
558
+ }[] | undefined;
559
+ button_payloads?: {
560
+ index: number;
561
+ payload: string;
562
+ }[] | undefined;
563
+ }>;
564
+ /**
565
+ * Schema union para requisição de envio de mensagem
566
+ */
567
+ export declare const zSendMessageRequestSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
568
+ type: z.ZodLiteral<"text">;
569
+ contact_address: z.ZodString;
570
+ contact_custom_name: z.ZodOptional<z.ZodString>;
571
+ department_id: z.ZodString;
572
+ channel_id: z.ZodString;
573
+ tenant: z.ZodString;
574
+ text: z.ZodString;
575
+ }, "strip", z.ZodTypeAny, {
576
+ tenant: string;
577
+ type: "text";
578
+ text: string;
579
+ channel_id: string;
580
+ contact_address: string;
581
+ department_id: string;
582
+ contact_custom_name?: string | undefined;
583
+ }, {
584
+ tenant: string;
585
+ type: "text";
586
+ text: string;
587
+ channel_id: string;
588
+ contact_address: string;
589
+ department_id: string;
590
+ contact_custom_name?: string | undefined;
591
+ }>, z.ZodObject<{
592
+ type: z.ZodLiteral<"template">;
593
+ contact_address: z.ZodString;
594
+ contact_custom_name: z.ZodOptional<z.ZodString>;
595
+ department_id: z.ZodString;
596
+ channel_id: z.ZodString;
597
+ tenant: z.ZodString;
598
+ template_name: z.ZodString;
599
+ template_language: z.ZodDefault<z.ZodOptional<z.ZodString>>;
600
+ waba_id: z.ZodOptional<z.ZodString>;
601
+ variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
602
+ parameter_name: z.ZodString;
603
+ value: z.ZodString;
604
+ }, "strip", z.ZodTypeAny, {
605
+ value: string;
606
+ parameter_name: string;
607
+ }, {
608
+ value: string;
609
+ parameter_name: string;
610
+ }>, "many">>;
611
+ button_payloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
612
+ index: z.ZodNumber;
613
+ payload: z.ZodString;
614
+ }, "strip", z.ZodTypeAny, {
615
+ index: number;
616
+ payload: string;
617
+ }, {
618
+ index: number;
619
+ payload: string;
620
+ }>, "many">>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ tenant: string;
623
+ type: "template";
624
+ channel_id: string;
625
+ contact_address: string;
626
+ department_id: string;
627
+ template_name: string;
628
+ template_language: string;
629
+ contact_custom_name?: string | undefined;
630
+ waba_id?: string | undefined;
631
+ variables?: {
632
+ value: string;
633
+ parameter_name: string;
634
+ }[] | undefined;
635
+ button_payloads?: {
636
+ index: number;
637
+ payload: string;
638
+ }[] | undefined;
639
+ }, {
640
+ tenant: string;
641
+ type: "template";
642
+ channel_id: string;
643
+ contact_address: string;
644
+ department_id: string;
645
+ template_name: string;
646
+ contact_custom_name?: string | undefined;
647
+ template_language?: string | undefined;
648
+ waba_id?: string | undefined;
649
+ variables?: {
650
+ value: string;
651
+ parameter_name: string;
652
+ }[] | undefined;
653
+ button_payloads?: {
654
+ index: number;
655
+ payload: string;
656
+ }[] | undefined;
657
+ }>]>;
658
+ /**
659
+ * Schema para resposta do serviço de envio de mensagem
660
+ */
661
+ export declare const zSendMessageResponseSchema: z.ZodObject<{
662
+ success: z.ZodBoolean;
663
+ message_id: z.ZodOptional<z.ZodString>;
664
+ data: z.ZodOptional<z.ZodAny>;
665
+ }, "strip", z.ZodTypeAny, {
666
+ success: boolean;
667
+ message_id?: string | undefined;
668
+ data?: any;
669
+ }, {
670
+ success: boolean;
671
+ message_id?: string | undefined;
672
+ data?: any;
673
+ }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zChatbeeContactHistorySchema = exports.zChatbeeContactHistoryPayloadClosedSchema = exports.zChatbeeContactHistoryPayloadCreatedSchema = exports.zChatbeeContactSchema = exports.zChatbeeStatusSchema = exports.zChatbeeDepartmentSchema = exports.zChatbeeChannelSchema = exports.zChatBeeChannelConfigSchema = void 0;
3
+ exports.zSendMessageResponseSchema = exports.zSendMessageRequestSchema = exports.zSendTemplateMessageRequestSchema = exports.zSendTextMessageRequestSchema = exports.zTemplateButtonPayloadSchema = exports.zTemplateVariableSchema = exports.zChatbeeContactHistorySchema = exports.zChatbeeContactHistoryPayloadClosedSchema = exports.zChatbeeContactHistoryPayloadCreatedSchema = exports.zChatbeeContactSchema = exports.zChatbeeStatusSchema = exports.zChatbeeDepartmentSchema = exports.zChatbeeChannelSchema = exports.zChatBeeChannelConfigSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  const zod_schemas_2 = require("../../evo-hub-ia/channel/zod-schemas");
@@ -76,3 +76,61 @@ exports.zChatbeeContactHistorySchema = zod_1.z.object({
76
76
  status_name: zod_1.z.string().optional(),
77
77
  updated_at: zod_1.z.any().optional(),
78
78
  });
79
+ // ───────── ChatBee Send Message Types ─────────
80
+ /**
81
+ * Schema para variável de template
82
+ */
83
+ exports.zTemplateVariableSchema = zod_1.z.object({
84
+ parameter_name: zod_1.z.string(),
85
+ value: zod_1.z.string(),
86
+ });
87
+ /**
88
+ * Schema para payload de botão QUICK_REPLY
89
+ */
90
+ exports.zTemplateButtonPayloadSchema = zod_1.z.object({
91
+ index: zod_1.z.number().int().min(0),
92
+ payload: zod_1.z.string(),
93
+ });
94
+ /**
95
+ * Schema para requisição de envio de mensagem de texto
96
+ */
97
+ exports.zSendTextMessageRequestSchema = zod_1.z.object({
98
+ type: zod_1.z.literal('text'),
99
+ contact_address: zod_1.z.string().min(1),
100
+ contact_custom_name: zod_1.z.string().optional(),
101
+ department_id: zod_1.z.string().min(1),
102
+ channel_id: zod_1.z.string().min(1),
103
+ tenant: zod_1.z.string().min(1),
104
+ text: zod_1.z.string().min(1),
105
+ });
106
+ /**
107
+ * Schema para requisição de envio de mensagem HSM (template)
108
+ */
109
+ exports.zSendTemplateMessageRequestSchema = zod_1.z.object({
110
+ type: zod_1.z.literal('template'),
111
+ contact_address: zod_1.z.string().min(1),
112
+ contact_custom_name: zod_1.z.string().optional(),
113
+ department_id: zod_1.z.string().min(1),
114
+ channel_id: zod_1.z.string().min(1),
115
+ tenant: zod_1.z.string().min(1),
116
+ template_name: zod_1.z.string().min(1),
117
+ template_language: zod_1.z.string().optional().default('pt_BR'),
118
+ waba_id: zod_1.z.string().optional(),
119
+ variables: zod_1.z.array(exports.zTemplateVariableSchema).optional(),
120
+ button_payloads: zod_1.z.array(exports.zTemplateButtonPayloadSchema).optional(),
121
+ });
122
+ /**
123
+ * Schema union para requisição de envio de mensagem
124
+ */
125
+ exports.zSendMessageRequestSchema = zod_1.z.discriminatedUnion('type', [
126
+ exports.zSendTextMessageRequestSchema,
127
+ exports.zSendTemplateMessageRequestSchema,
128
+ ]);
129
+ /**
130
+ * Schema para resposta do serviço de envio de mensagem
131
+ */
132
+ exports.zSendMessageResponseSchema = zod_1.z.object({
133
+ success: zod_1.z.boolean(),
134
+ message_id: zod_1.z.string().optional(),
135
+ data: zod_1.z.any().optional(),
136
+ });
@@ -78,3 +78,68 @@ export const zChatbeeContactHistorySchema = z.object({
78
78
  status_name: z.string().optional(),
79
79
  updated_at: z.any().optional(),
80
80
  });
81
+
82
+ // ───────── ChatBee Send Message Types ─────────
83
+
84
+ /**
85
+ * Schema para variável de template
86
+ */
87
+ export const zTemplateVariableSchema = z.object({
88
+ parameter_name: z.string(),
89
+ value: z.string(),
90
+ });
91
+
92
+ /**
93
+ * Schema para payload de botão QUICK_REPLY
94
+ */
95
+ export const zTemplateButtonPayloadSchema = z.object({
96
+ index: z.number().int().min(0),
97
+ payload: z.string(),
98
+ });
99
+
100
+ /**
101
+ * Schema para requisição de envio de mensagem de texto
102
+ */
103
+ export const zSendTextMessageRequestSchema = z.object({
104
+ type: z.literal('text'),
105
+ contact_address: z.string().min(1),
106
+ contact_custom_name: z.string().optional(),
107
+ department_id: z.string().min(1),
108
+ channel_id: z.string().min(1),
109
+ tenant: z.string().min(1),
110
+ text: z.string().min(1),
111
+ });
112
+
113
+ /**
114
+ * Schema para requisição de envio de mensagem HSM (template)
115
+ */
116
+ export const zSendTemplateMessageRequestSchema = z.object({
117
+ type: z.literal('template'),
118
+ contact_address: z.string().min(1),
119
+ contact_custom_name: z.string().optional(),
120
+ department_id: z.string().min(1),
121
+ channel_id: z.string().min(1),
122
+ tenant: z.string().min(1),
123
+ template_name: z.string().min(1),
124
+ template_language: z.string().optional().default('pt_BR'),
125
+ waba_id: z.string().optional(),
126
+ variables: z.array(zTemplateVariableSchema).optional(),
127
+ button_payloads: z.array(zTemplateButtonPayloadSchema).optional(),
128
+ });
129
+
130
+ /**
131
+ * Schema union para requisição de envio de mensagem
132
+ */
133
+ export const zSendMessageRequestSchema = z.discriminatedUnion('type', [
134
+ zSendTextMessageRequestSchema,
135
+ zSendTemplateMessageRequestSchema,
136
+ ]);
137
+
138
+ /**
139
+ * Schema para resposta do serviço de envio de mensagem
140
+ */
141
+ export const zSendMessageResponseSchema = z.object({
142
+ success: z.boolean(),
143
+ message_id: z.string().optional(),
144
+ data: z.any().optional(),
145
+ });
@@ -196,6 +196,7 @@ export declare const zChatContactSchema: z.ZodObject<z.objectUtil.extendShape<{
196
196
  hub_ia_action: z.ZodOptional<z.ZodString>;
197
197
  hub_ia_status: z.ZodOptional<z.ZodString>;
198
198
  hub_ia_suggestion: z.ZodOptional<z.ZodString>;
199
+ hub_ia_suggestion_id: z.ZodOptional<z.ZodNumber>;
199
200
  hub_ia_action_suggestion: z.ZodOptional<z.ZodString>;
200
201
  hub_ia_raised_hand: z.ZodOptional<z.ZodBoolean>;
201
202
  hub_ia_mode: z.ZodOptional<z.ZodString>;
@@ -416,6 +417,7 @@ export declare const zChatContactSchema: z.ZodObject<z.objectUtil.extendShape<{
416
417
  hub_ia_action: z.ZodOptional<z.ZodString>;
417
418
  hub_ia_status: z.ZodOptional<z.ZodString>;
418
419
  hub_ia_suggestion: z.ZodOptional<z.ZodString>;
420
+ hub_ia_suggestion_id: z.ZodOptional<z.ZodNumber>;
419
421
  hub_ia_action_suggestion: z.ZodOptional<z.ZodString>;
420
422
  hub_ia_raised_hand: z.ZodOptional<z.ZodBoolean>;
421
423
  hub_ia_mode: z.ZodOptional<z.ZodString>;
@@ -636,6 +638,7 @@ export declare const zChatContactSchema: z.ZodObject<z.objectUtil.extendShape<{
636
638
  hub_ia_action: z.ZodOptional<z.ZodString>;
637
639
  hub_ia_status: z.ZodOptional<z.ZodString>;
638
640
  hub_ia_suggestion: z.ZodOptional<z.ZodString>;
641
+ hub_ia_suggestion_id: z.ZodOptional<z.ZodNumber>;
639
642
  hub_ia_action_suggestion: z.ZodOptional<z.ZodString>;
640
643
  hub_ia_raised_hand: z.ZodOptional<z.ZodBoolean>;
641
644
  hub_ia_mode: z.ZodOptional<z.ZodString>;
@@ -16,6 +16,7 @@ exports.zChatContactSchema = zod_schemas_1.zFireDocSchema
16
16
  hub_ia_action: zod_1.z.string().optional(), // Qual ação a IA está fazendo
17
17
  hub_ia_status: zod_1.z.string().optional(), // processing / done
18
18
  hub_ia_suggestion: zod_1.z.string().optional(), // Sugestão de resposta
19
+ hub_ia_suggestion_id: zod_1.z.number().optional(), // ID da sugestão de resposta
19
20
  hub_ia_action_suggestion: zod_1.z.string().optional(), // Sugestão de ação da IA
20
21
  hub_ia_raised_hand: zod_1.z.boolean().optional(), // IA levantou a mão - pede interação humana
21
22
  hub_ia_mode: zod_1.z.string().optional(), // reply, suggestion
@@ -18,6 +18,7 @@ export const zChatContactSchema = zFireDocSchema
18
18
  hub_ia_action: z.string().optional(), // Qual ação a IA está fazendo
19
19
  hub_ia_status: z.string().optional(), // processing / done
20
20
  hub_ia_suggestion: z.string().optional(), // Sugestão de resposta
21
+ hub_ia_suggestion_id: z.number().optional(), // ID da sugestão de resposta
21
22
  hub_ia_action_suggestion: z.string().optional(), // Sugestão de ação da IA
22
23
  hub_ia_raised_hand: z.boolean().optional(), // IA levantou a mão - pede interação humana
23
24
  hub_ia_mode: z.string().optional(), // reply, suggestion
@@ -11,13 +11,13 @@ exports.zLeadQualificationSchema = zod_1.z.object({
11
11
  name: zod_1.z.string().min(1).max(255),
12
12
  funnelLevel: zod_schemas_3.zQualificationFunnelLevelSchema,
13
13
  ref: zod_1.z.any(),
14
- updated_at: zod_1.z.date().nullable().optional(),
14
+ updated_at: zod_1.z.coerce.date().nullable().optional(),
15
15
  });
16
16
  exports.zLeadDistChannelSchema = zod_1.z.object({
17
17
  code: zod_1.z.string().min(1).max(20),
18
18
  name: zod_1.z.string().min(1).max(255),
19
19
  ref: zod_1.z.any(),
20
- updated_at: zod_1.z.date().nullable().optional(),
20
+ updated_at: zod_1.z.coerce.date().nullable().optional(),
21
21
  });
22
22
  exports.zLeadSchema = zod_schemas_2.zProfileSchema // Extend from ProfileSchema
23
23
  .extend({
@@ -14,14 +14,14 @@ export const zLeadQualificationSchema = z.object({
14
14
  name: z.string().min(1).max(255),
15
15
  funnelLevel: zQualificationFunnelLevelSchema,
16
16
  ref: z.any(),
17
- updated_at: z.date().nullable().optional(),
17
+ updated_at: z.coerce.date().nullable().optional(),
18
18
  });
19
19
 
20
20
  export const zLeadDistChannelSchema = z.object({
21
21
  code: z.string().min(1).max(20),
22
22
  name: z.string().min(1).max(255),
23
23
  ref: z.any(),
24
- updated_at: z.date().nullable().optional(),
24
+ updated_at: z.coerce.date().nullable().optional(),
25
25
  });
26
26
 
27
27
  export const zLeadSchema = zProfileSchema // Extend from ProfileSchema
@@ -39,7 +39,7 @@ exports.zProfessionalSchema = zod_schemas_3.zProfileSchema // Extend from Profil
39
39
  councils: zod_1.z.array(exports.zProfessionalCouncilSchema).nullable().optional(),
40
40
  specialties: zod_1.z.array(exports.zProfessionalSpecialtySchema).nullable().optional(),
41
41
  offices: zod_1.z.array(exports.zProfessionalOfficeSchema).nullable().optional(),
42
- date_joining: zod_1.z.date().nullable().optional(),
42
+ date_joining: zod_1.z.coerce.date().nullable().optional(),
43
43
  company_code: zod_1.z.string().min(1).max(20),
44
44
  company_name: zod_1.z.string().max(255).nullable().optional().default(""),
45
45
  companyRef: zod_1.z.any(),
@@ -72,7 +72,7 @@ exports.zPatientChronicConditionSchema = zod_1.z.object({
72
72
  code: zod_1.z.string().min(1).max(20),
73
73
  name: zod_1.z.string().min(1).max(255),
74
74
  ref: zod_1.z.any(),
75
- diagnosis_date: zod_1.z.date().nullable().optional(),
75
+ diagnosis_date: zod_1.z.coerce.date().nullable().optional(),
76
76
  severity: zod_schemas_1.zSeveritySchema.nullable().optional().default("Unknown"),
77
77
  controlled: zod_1.z.boolean().optional().default(false),
78
78
  medications: zod_1.z.array(zod_schemas_1.zMedicationSchema).nullable().optional(),
@@ -51,7 +51,7 @@ export const zProfessionalSchema = zProfileSchema // Extend from ProfileSchema
51
51
  councils: z.array(zProfessionalCouncilSchema).nullable().optional(),
52
52
  specialties: z.array(zProfessionalSpecialtySchema).nullable().optional(),
53
53
  offices: z.array(zProfessionalOfficeSchema).nullable().optional(),
54
- date_joining: z.date().nullable().optional(),
54
+ date_joining: z.coerce.date().nullable().optional(),
55
55
  company_code: z.string().min(1).max(20),
56
56
  company_name: z.string().max(255).nullable().optional().default(""),
57
57
  companyRef: z.any(),
@@ -88,7 +88,7 @@ export const zPatientChronicConditionSchema = z.object({
88
88
  code: z.string().min(1).max(20),
89
89
  name: z.string().min(1).max(255),
90
90
  ref: z.any(),
91
- diagnosis_date: z.date().nullable().optional(),
91
+ diagnosis_date: z.coerce.date().nullable().optional(),
92
92
  severity: zSeveritySchema.nullable().optional().default("Unknown"),
93
93
  controlled: z.boolean().optional().default(false),
94
94
  medications: z.array(zMedicationSchema).nullable().optional(),
@@ -52,3 +52,57 @@ export interface IChatbeeContactHistory {
52
52
  status_name?: string;
53
53
  updated_at?: any;
54
54
  }
55
+ /**
56
+ * Variável de template para substituição no BODY
57
+ */
58
+ export interface ITemplateVariable {
59
+ parameter_name: string;
60
+ value: string;
61
+ }
62
+ /**
63
+ * Payload para botão QUICK_REPLY
64
+ */
65
+ export interface ITemplateButtonPayload {
66
+ index: number;
67
+ payload: string;
68
+ }
69
+ /**
70
+ * Requisição para envio de mensagem de texto simples
71
+ */
72
+ export interface ISendTextMessageRequest {
73
+ type: "text";
74
+ contact_address: string;
75
+ contact_custom_name?: string;
76
+ department_id: string;
77
+ channel_id: string;
78
+ tenant: string;
79
+ text: string;
80
+ }
81
+ /**
82
+ * Requisição para envio de mensagem HSM (template)
83
+ */
84
+ export interface ISendTemplateMessageRequest {
85
+ type: "template";
86
+ contact_address: string;
87
+ contact_custom_name?: string;
88
+ department_id: string;
89
+ channel_id: string;
90
+ tenant: string;
91
+ template_name: string;
92
+ template_language?: string;
93
+ waba_id?: string;
94
+ variables?: ITemplateVariable[];
95
+ button_payloads?: ITemplateButtonPayload[];
96
+ }
97
+ /**
98
+ * Tipo union para requisição de envio de mensagem
99
+ */
100
+ export type ISendMessageRequest = ISendTextMessageRequest | ISendTemplateMessageRequest;
101
+ /**
102
+ * Resposta do serviço de envio de mensagem
103
+ */
104
+ export interface ISendMessageResponse {
105
+ success: boolean;
106
+ message_id?: string;
107
+ data?: any;
108
+ }
@@ -68,3 +68,67 @@ export interface IChatbeeContactHistory {
68
68
  status_name?: string;
69
69
  updated_at?: any;
70
70
  }
71
+
72
+ // ───────── ChatBee Send Message Types ─────────
73
+
74
+ /**
75
+ * Variável de template para substituição no BODY
76
+ */
77
+ export interface ITemplateVariable {
78
+ parameter_name: string;
79
+ value: string;
80
+ }
81
+
82
+ /**
83
+ * Payload para botão QUICK_REPLY
84
+ */
85
+ export interface ITemplateButtonPayload {
86
+ index: number;
87
+ payload: string;
88
+ }
89
+
90
+ /**
91
+ * Requisição para envio de mensagem de texto simples
92
+ */
93
+ export interface ISendTextMessageRequest {
94
+ type: "text";
95
+ contact_address: string;
96
+ contact_custom_name?: string;
97
+ department_id: string;
98
+ channel_id: string;
99
+ tenant: string;
100
+ text: string;
101
+ }
102
+
103
+ /**
104
+ * Requisição para envio de mensagem HSM (template)
105
+ */
106
+ export interface ISendTemplateMessageRequest {
107
+ type: "template";
108
+ contact_address: string;
109
+ contact_custom_name?: string;
110
+ department_id: string;
111
+ channel_id: string;
112
+ tenant: string;
113
+ template_name: string;
114
+ template_language?: string; // padrão: 'pt_BR'
115
+ waba_id?: string; // opcional, será obtido do canal se não fornecido
116
+ variables?: ITemplateVariable[]; // variáveis para o BODY
117
+ button_payloads?: ITemplateButtonPayload[]; // payloads para botões QUICK_REPLY
118
+ }
119
+
120
+ /**
121
+ * Tipo union para requisição de envio de mensagem
122
+ */
123
+ export type ISendMessageRequest =
124
+ | ISendTextMessageRequest
125
+ | ISendTemplateMessageRequest;
126
+
127
+ /**
128
+ * Resposta do serviço de envio de mensagem
129
+ */
130
+ export interface ISendMessageResponse {
131
+ success: boolean;
132
+ message_id?: string;
133
+ data?: any;
134
+ }
@@ -11,6 +11,7 @@ export interface IChatContact extends IFireDoc {
11
11
  hub_ia_action?: string;
12
12
  hub_ia_status?: string;
13
13
  hub_ia_suggestion?: string;
14
+ hub_ia_suggestion_id?: number;
14
15
  hub_ia_action_suggestion?: string;
15
16
  hub_ia_raised_hand?: boolean;
16
17
  hub_ia_mode?: string;
@@ -16,6 +16,7 @@ export interface IChatContact extends IFireDoc {
16
16
  hub_ia_action?: string; // Qual ação a IA está fazendo
17
17
  hub_ia_status?: string; // processing / done
18
18
  hub_ia_suggestion?: string; // Sugestão de resposta
19
+ hub_ia_suggestion_id?: number; // ID da sugestão de resposta
19
20
  hub_ia_action_suggestion?: string; // Sugestão de ação da IA
20
21
  hub_ia_raised_hand?: boolean; // IA levantou a mão - pede interação humana
21
22
  hub_ia_mode?: string; // reply, suggestion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.140",
3
+ "version": "1.3.143",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",