tychat-contracts 1.6.68 → 1.6.72

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.
Files changed (35) hide show
  1. package/dist/configurations/ai-tool-policy.enums.d.ts +1 -1
  2. package/dist/configurations/ai-tool-policy.enums.d.ts.map +1 -1
  3. package/dist/configurations/ai-tool-policy.enums.js +1 -0
  4. package/dist/connections/connections.dto.d.ts +53 -0
  5. package/dist/connections/connections.dto.d.ts.map +1 -0
  6. package/dist/connections/connections.dto.js +376 -0
  7. package/dist/connections/whatsapp-official.dto.d.ts +4 -0
  8. package/dist/connections/whatsapp-official.dto.d.ts.map +1 -1
  9. package/dist/connections/whatsapp-official.dto.js +12 -0
  10. package/dist/fiscal/enqueue-nfe.dto.d.ts +3 -0
  11. package/dist/fiscal/enqueue-nfe.dto.d.ts.map +1 -1
  12. package/dist/fiscal/enqueue-nfe.dto.js +14 -0
  13. package/dist/tenants/index.d.ts +1 -0
  14. package/dist/tenants/index.d.ts.map +1 -1
  15. package/dist/tenants/index.js +1 -0
  16. package/dist/tenants/tenant-fiscal-profile.dto.d.ts +27 -0
  17. package/dist/tenants/tenant-fiscal-profile.dto.d.ts.map +1 -0
  18. package/dist/tenants/tenant-fiscal-profile.dto.js +128 -0
  19. package/package.json +1 -1
  20. package/src/campaigns/campaign-template-header-media.dto.ts +25 -25
  21. package/src/campaigns/campaign-template.dto.ts +45 -45
  22. package/src/campaigns/create-campaign.dto.ts +80 -80
  23. package/src/configurations/ai-tool-policy.enums.ts +1 -0
  24. package/src/connections/whatsapp-official.dto.ts +11 -0
  25. package/src/fiscal/enqueue-nfe.dto.ts +22 -1
  26. package/src/tenants/anamnesis-public-frontend-url.spec.ts +45 -45
  27. package/src/tenants/anamnesis-public-frontend-url.ts +61 -61
  28. package/src/tenants/index.ts +1 -0
  29. package/src/tenants/tenant-fiscal-profile.dto.ts +85 -0
  30. package/dist/anamneses/normalize-anamnesis-access-token.d.ts +0 -9
  31. package/dist/anamneses/normalize-anamnesis-access-token.d.ts.map +0 -1
  32. package/dist/anamneses/normalize-anamnesis-access-token.js +0 -21
  33. package/dist/anamneses/normalize-anamnesis-access-token.spec.d.ts +0 -2
  34. package/dist/anamneses/normalize-anamnesis-access-token.spec.d.ts.map +0 -1
  35. package/dist/anamneses/normalize-anamnesis-access-token.spec.js +0 -18
@@ -1,4 +1,4 @@
1
- export declare const AI_TOOL_KEYS: readonly ["get_procedures_clinic", "get_clinic_opening_hours", "get_available_slots", "search_health_professionals", "update_patient", "search_patients_by_phone", "create_patient", "create_appointment", "add_appointment_procedures", "list_patient_appointments", "cancel_appointment", "submit_satisfaction"];
1
+ export declare const AI_TOOL_KEYS: readonly ["get_procedures_clinic", "get_clinic_opening_hours", "get_available_slots", "search_health_professionals", "update_patient", "search_patients_by_phone", "create_patient", "create_appointment", "add_appointment_procedures", "list_patient_appointments", "cancel_appointment", "reschedule_appointment", "submit_satisfaction"];
2
2
  export type AiToolKey = (typeof AI_TOOL_KEYS)[number];
3
3
  export declare const AI_TOOL_POLICY_LEVELS: readonly ["global", "plan", "tenant", "unit"];
4
4
  export type AiToolPolicyLevel = (typeof AI_TOOL_POLICY_LEVELS)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"ai-tool-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/ai-tool-policy.enums.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,oTAaf,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,eAAO,MAAM,qBAAqB,+CAAgD,CAAC;AACnF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,uDAGzB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"ai-tool-policy.enums.d.ts","sourceRoot":"","sources":["../../src/configurations/ai-tool-policy.enums.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,8UAcf,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,eAAO,MAAM,qBAAqB,+CAAgD,CAAC;AACnF,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,uDAGzB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -13,6 +13,7 @@ exports.AI_TOOL_KEYS = [
13
13
  'add_appointment_procedures',
14
14
  'list_patient_appointments',
15
15
  'cancel_appointment',
16
+ 'reschedule_appointment',
16
17
  'submit_satisfaction',
17
18
  ];
18
19
  exports.AI_TOOL_POLICY_LEVELS = ['global', 'plan', 'tenant', 'unit'];
@@ -0,0 +1,53 @@
1
+ export declare class CreateConnectionInstanceDto {
2
+ token?: string;
3
+ qrcode?: boolean;
4
+ number?: string;
5
+ rejectCall?: boolean;
6
+ msgCall?: string;
7
+ groupsIgnore?: boolean;
8
+ alwaysOnline?: boolean;
9
+ readMessages?: boolean;
10
+ readStatus?: boolean;
11
+ syncFullHistory?: boolean;
12
+ }
13
+ export declare class ConnectionInstanceConnectQueryDto {
14
+ number?: string;
15
+ }
16
+ export declare class SetConnectionWebhookDto {
17
+ enabled: boolean;
18
+ url: string;
19
+ webhookByEvents: boolean;
20
+ webhookBase64: boolean;
21
+ events: string[];
22
+ }
23
+ export declare class SendConnectionTextDto {
24
+ number: string;
25
+ text: string;
26
+ delay?: number;
27
+ linkPreview?: boolean;
28
+ }
29
+ export declare class SendConnectionMediaDto {
30
+ number: string;
31
+ mediatype: string;
32
+ mimetype: string;
33
+ caption: string;
34
+ media: string;
35
+ fileName: string;
36
+ delay?: number;
37
+ }
38
+ export declare class SendConnectionWhatsAppAudioDto {
39
+ number: string;
40
+ audio: string;
41
+ delay?: number;
42
+ }
43
+ export declare class ConnectionMediaMessageKeyDto {
44
+ id: string;
45
+ }
46
+ export declare class ConnectionMediaMessageDto {
47
+ key: ConnectionMediaMessageKeyDto;
48
+ }
49
+ export declare class GetConnectionBase64Dto {
50
+ message: ConnectionMediaMessageDto;
51
+ convertToMp4: boolean;
52
+ }
53
+ //# sourceMappingURL=connections.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connections.dto.d.ts","sourceRoot":"","sources":["../../src/connections/connections.dto.ts"],"names":[],"mappings":"AAaA,qBAAa,2BAA2B;IAQtC,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,MAAM,CAAC,EAAE,OAAO,CAAC;IAQjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAQhB,UAAU,CAAC,EAAE,OAAO,CAAC;IAQrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAQjB,YAAY,CAAC,EAAE,OAAO,CAAC;IAQvB,YAAY,CAAC,EAAE,OAAO,CAAC;IAQvB,YAAY,CAAC,EAAE,OAAO,CAAC;IAQvB,UAAU,CAAC,EAAE,OAAO,CAAC;IAQrB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,iCAAiC;IAO5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,uBAAuB;IAMlC,OAAO,EAAG,OAAO,CAAC;IAQlB,GAAG,EAAG,MAAM,CAAC;IAOb,eAAe,EAAG,OAAO,CAAC;IAO1B,aAAa,EAAG,OAAO,CAAC;IASxB,MAAM,EAAG,MAAM,EAAE,CAAC;CACnB;AAED,qBAAa,qBAAqB;IAOhC,MAAM,EAAG,MAAM,CAAC;IAQhB,IAAI,EAAG,MAAM,CAAC;IASd,KAAK,CAAC,EAAE,MAAM,CAAC;IAQf,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBAAa,sBAAsB;IAOjC,MAAM,EAAG,MAAM,CAAC;IAQhB,SAAS,EAAG,MAAM,CAAC;IAQnB,QAAQ,EAAG,MAAM,CAAC;IAQlB,OAAO,EAAG,MAAM,CAAC;IAQjB,KAAK,EAAG,MAAM,CAAC;IAQf,QAAQ,EAAG,MAAM,CAAC;IASlB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,8BAA8B;IAOzC,MAAM,EAAG,MAAM,CAAC;IAQhB,KAAK,EAAG,MAAM,CAAC;IASf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,4BAA4B;IAOvC,EAAE,EAAG,MAAM,CAAC;CACb;AAED,qBAAa,yBAAyB;IAIpC,GAAG,EAAG,4BAA4B,CAAC;CACpC;AAED,qBAAa,sBAAsB;IAIjC,OAAO,EAAG,yBAAyB,CAAC;IAOpC,YAAY,EAAG,OAAO,CAAC;CACxB"}
@@ -0,0 +1,376 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.GetConnectionBase64Dto = exports.ConnectionMediaMessageDto = exports.ConnectionMediaMessageKeyDto = exports.SendConnectionWhatsAppAudioDto = exports.SendConnectionMediaDto = exports.SendConnectionTextDto = exports.SetConnectionWebhookDto = exports.ConnectionInstanceConnectQueryDto = exports.CreateConnectionInstanceDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ const class_transformer_1 = require("class-transformer");
16
+ class CreateConnectionInstanceDto {
17
+ token;
18
+ qrcode;
19
+ number;
20
+ rejectCall;
21
+ msgCall;
22
+ groupsIgnore;
23
+ alwaysOnline;
24
+ readMessages;
25
+ readStatus;
26
+ syncFullHistory;
27
+ }
28
+ exports.CreateConnectionInstanceDto = CreateConnectionInstanceDto;
29
+ __decorate([
30
+ (0, swagger_1.ApiPropertyOptional)({
31
+ description: 'Token da instância (se omitido, EvolutionAPI pode gerar dinamicamente)',
32
+ example: 'my-instance-token',
33
+ }),
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], CreateConnectionInstanceDto.prototype, "token", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiPropertyOptional)({
40
+ description: 'Cria QR Code automaticamente após criar a instância',
41
+ example: true,
42
+ }),
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsBoolean)(),
45
+ __metadata("design:type", Boolean)
46
+ ], CreateConnectionInstanceDto.prototype, "qrcode", void 0);
47
+ __decorate([
48
+ (0, swagger_1.ApiPropertyOptional)({
49
+ description: 'Número proprietário da instância com DDI (somente dígitos)',
50
+ example: '5511999999999',
51
+ }),
52
+ (0, class_validator_1.IsOptional)(),
53
+ (0, class_validator_1.IsString)(),
54
+ __metadata("design:type", String)
55
+ ], CreateConnectionInstanceDto.prototype, "number", void 0);
56
+ __decorate([
57
+ (0, swagger_1.ApiPropertyOptional)({
58
+ description: 'Rejeitar chamadas automaticamente',
59
+ example: true,
60
+ }),
61
+ (0, class_validator_1.IsOptional)(),
62
+ (0, class_validator_1.IsBoolean)(),
63
+ __metadata("design:type", Boolean)
64
+ ], CreateConnectionInstanceDto.prototype, "rejectCall", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiPropertyOptional)({
67
+ description: 'Mensagem enviada ao rejeitar chamada automaticamente',
68
+ example: 'Nao atendemos chamadas por este canal.',
69
+ }),
70
+ (0, class_validator_1.IsOptional)(),
71
+ (0, class_validator_1.IsString)(),
72
+ __metadata("design:type", String)
73
+ ], CreateConnectionInstanceDto.prototype, "msgCall", void 0);
74
+ __decorate([
75
+ (0, swagger_1.ApiPropertyOptional)({
76
+ description: 'Ignorar mensagens de grupos',
77
+ example: false,
78
+ }),
79
+ (0, class_validator_1.IsOptional)(),
80
+ (0, class_validator_1.IsBoolean)(),
81
+ __metadata("design:type", Boolean)
82
+ ], CreateConnectionInstanceDto.prototype, "groupsIgnore", void 0);
83
+ __decorate([
84
+ (0, swagger_1.ApiPropertyOptional)({
85
+ description: 'Manter sessao sempre online',
86
+ example: true,
87
+ }),
88
+ (0, class_validator_1.IsOptional)(),
89
+ (0, class_validator_1.IsBoolean)(),
90
+ __metadata("design:type", Boolean)
91
+ ], CreateConnectionInstanceDto.prototype, "alwaysOnline", void 0);
92
+ __decorate([
93
+ (0, swagger_1.ApiPropertyOptional)({
94
+ description: 'Marcar mensagens recebidas como lidas',
95
+ example: true,
96
+ }),
97
+ (0, class_validator_1.IsOptional)(),
98
+ (0, class_validator_1.IsBoolean)(),
99
+ __metadata("design:type", Boolean)
100
+ ], CreateConnectionInstanceDto.prototype, "readMessages", void 0);
101
+ __decorate([
102
+ (0, swagger_1.ApiPropertyOptional)({
103
+ description: 'Exibir status de leitura das mensagens enviadas',
104
+ example: true,
105
+ }),
106
+ (0, class_validator_1.IsOptional)(),
107
+ (0, class_validator_1.IsBoolean)(),
108
+ __metadata("design:type", Boolean)
109
+ ], CreateConnectionInstanceDto.prototype, "readStatus", void 0);
110
+ __decorate([
111
+ (0, swagger_1.ApiPropertyOptional)({
112
+ description: 'Sincronizar historico completo do WhatsApp',
113
+ example: false,
114
+ }),
115
+ (0, class_validator_1.IsOptional)(),
116
+ (0, class_validator_1.IsBoolean)(),
117
+ __metadata("design:type", Boolean)
118
+ ], CreateConnectionInstanceDto.prototype, "syncFullHistory", void 0);
119
+ class ConnectionInstanceConnectQueryDto {
120
+ number;
121
+ }
122
+ exports.ConnectionInstanceConnectQueryDto = ConnectionInstanceConnectQueryDto;
123
+ __decorate([
124
+ (0, swagger_1.ApiPropertyOptional)({
125
+ description: 'Numero com DDI para pareamento por codigo (opcional)',
126
+ example: '5511999999999',
127
+ }),
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_validator_1.IsString)(),
130
+ __metadata("design:type", String)
131
+ ], ConnectionInstanceConnectQueryDto.prototype, "number", void 0);
132
+ class SetConnectionWebhookDto {
133
+ enabled;
134
+ url;
135
+ webhookByEvents;
136
+ webhookBase64;
137
+ events;
138
+ }
139
+ exports.SetConnectionWebhookDto = SetConnectionWebhookDto;
140
+ __decorate([
141
+ (0, swagger_1.ApiProperty)({
142
+ description: 'Habilita webhook da instancia',
143
+ example: true,
144
+ }),
145
+ (0, class_validator_1.IsBoolean)(),
146
+ __metadata("design:type", Boolean)
147
+ ], SetConnectionWebhookDto.prototype, "enabled", void 0);
148
+ __decorate([
149
+ (0, swagger_1.ApiProperty)({
150
+ description: 'URL que recebera eventos',
151
+ example: 'https://api.seusistema.com/webhooks/whatsapp',
152
+ }),
153
+ (0, class_validator_1.IsString)(),
154
+ (0, class_validator_1.IsNotEmpty)(),
155
+ __metadata("design:type", String)
156
+ ], SetConnectionWebhookDto.prototype, "url", void 0);
157
+ __decorate([
158
+ (0, swagger_1.ApiProperty)({
159
+ description: 'Webhook por eventos especificos',
160
+ example: true,
161
+ }),
162
+ (0, class_validator_1.IsBoolean)(),
163
+ __metadata("design:type", Boolean)
164
+ ], SetConnectionWebhookDto.prototype, "webhookByEvents", void 0);
165
+ __decorate([
166
+ (0, swagger_1.ApiProperty)({
167
+ description: 'Incluir arquivos em base64 quando disponivel',
168
+ example: false,
169
+ }),
170
+ (0, class_validator_1.IsBoolean)(),
171
+ __metadata("design:type", Boolean)
172
+ ], SetConnectionWebhookDto.prototype, "webhookBase64", void 0);
173
+ __decorate([
174
+ (0, swagger_1.ApiProperty)({
175
+ description: 'Eventos permitidos pela Evolution API',
176
+ example: ['CONNECTION_UPDATE', 'MESSAGES_UPSERT'],
177
+ type: [String],
178
+ }),
179
+ (0, class_validator_1.IsArray)(),
180
+ (0, class_validator_1.IsString)({ each: true }),
181
+ __metadata("design:type", Array)
182
+ ], SetConnectionWebhookDto.prototype, "events", void 0);
183
+ class SendConnectionTextDto {
184
+ number;
185
+ text;
186
+ delay;
187
+ linkPreview;
188
+ }
189
+ exports.SendConnectionTextDto = SendConnectionTextDto;
190
+ __decorate([
191
+ (0, swagger_1.ApiProperty)({
192
+ description: 'Numero destino com DDI',
193
+ example: '5511999999999',
194
+ }),
195
+ (0, class_validator_1.IsString)(),
196
+ (0, class_validator_1.IsNotEmpty)(),
197
+ __metadata("design:type", String)
198
+ ], SendConnectionTextDto.prototype, "number", void 0);
199
+ __decorate([
200
+ (0, swagger_1.ApiProperty)({
201
+ description: 'Texto da mensagem',
202
+ example: 'Ola! Tudo bem?',
203
+ }),
204
+ (0, class_validator_1.IsString)(),
205
+ (0, class_validator_1.IsNotEmpty)(),
206
+ __metadata("design:type", String)
207
+ ], SendConnectionTextDto.prototype, "text", void 0);
208
+ __decorate([
209
+ (0, swagger_1.ApiPropertyOptional)({
210
+ description: 'Delay de presenca em ms antes do envio',
211
+ example: 1000,
212
+ }),
213
+ (0, class_validator_1.IsOptional)(),
214
+ (0, class_validator_1.IsInt)(),
215
+ (0, class_validator_1.Min)(0),
216
+ __metadata("design:type", Number)
217
+ ], SendConnectionTextDto.prototype, "delay", void 0);
218
+ __decorate([
219
+ (0, swagger_1.ApiPropertyOptional)({
220
+ description: 'Ativar preview de links',
221
+ example: true,
222
+ }),
223
+ (0, class_validator_1.IsOptional)(),
224
+ (0, class_validator_1.IsBoolean)(),
225
+ __metadata("design:type", Boolean)
226
+ ], SendConnectionTextDto.prototype, "linkPreview", void 0);
227
+ class SendConnectionMediaDto {
228
+ number;
229
+ mediatype;
230
+ mimetype;
231
+ caption;
232
+ media;
233
+ fileName;
234
+ delay;
235
+ }
236
+ exports.SendConnectionMediaDto = SendConnectionMediaDto;
237
+ __decorate([
238
+ (0, swagger_1.ApiProperty)({
239
+ description: 'Numero destino com DDI',
240
+ example: '5511999999999',
241
+ }),
242
+ (0, class_validator_1.IsString)(),
243
+ (0, class_validator_1.IsNotEmpty)(),
244
+ __metadata("design:type", String)
245
+ ], SendConnectionMediaDto.prototype, "number", void 0);
246
+ __decorate([
247
+ (0, swagger_1.ApiProperty)({
248
+ description: 'Tipo da midia',
249
+ example: 'image',
250
+ }),
251
+ (0, class_validator_1.IsString)(),
252
+ (0, class_validator_1.IsNotEmpty)(),
253
+ __metadata("design:type", String)
254
+ ], SendConnectionMediaDto.prototype, "mediatype", void 0);
255
+ __decorate([
256
+ (0, swagger_1.ApiProperty)({
257
+ description: 'MIME type da midia',
258
+ example: 'image/png',
259
+ }),
260
+ (0, class_validator_1.IsString)(),
261
+ (0, class_validator_1.IsNotEmpty)(),
262
+ __metadata("design:type", String)
263
+ ], SendConnectionMediaDto.prototype, "mimetype", void 0);
264
+ __decorate([
265
+ (0, swagger_1.ApiProperty)({
266
+ description: 'Legenda',
267
+ example: 'Imagem de teste',
268
+ }),
269
+ (0, class_validator_1.IsString)(),
270
+ (0, class_validator_1.IsNotEmpty)(),
271
+ __metadata("design:type", String)
272
+ ], SendConnectionMediaDto.prototype, "caption", void 0);
273
+ __decorate([
274
+ (0, swagger_1.ApiProperty)({
275
+ description: 'URL publica da midia ou conteudo base64',
276
+ example: 'https://cdn.seusistema.com/media/example.png',
277
+ }),
278
+ (0, class_validator_1.IsString)(),
279
+ (0, class_validator_1.IsNotEmpty)(),
280
+ __metadata("design:type", String)
281
+ ], SendConnectionMediaDto.prototype, "media", void 0);
282
+ __decorate([
283
+ (0, swagger_1.ApiProperty)({
284
+ description: 'Nome do arquivo',
285
+ example: 'example.png',
286
+ }),
287
+ (0, class_validator_1.IsString)(),
288
+ (0, class_validator_1.IsNotEmpty)(),
289
+ __metadata("design:type", String)
290
+ ], SendConnectionMediaDto.prototype, "fileName", void 0);
291
+ __decorate([
292
+ (0, swagger_1.ApiPropertyOptional)({
293
+ description: 'Delay de presenca em ms antes do envio',
294
+ example: 1000,
295
+ }),
296
+ (0, class_validator_1.IsOptional)(),
297
+ (0, class_validator_1.IsInt)(),
298
+ (0, class_validator_1.Min)(0),
299
+ __metadata("design:type", Number)
300
+ ], SendConnectionMediaDto.prototype, "delay", void 0);
301
+ class SendConnectionWhatsAppAudioDto {
302
+ number;
303
+ audio;
304
+ delay;
305
+ }
306
+ exports.SendConnectionWhatsAppAudioDto = SendConnectionWhatsAppAudioDto;
307
+ __decorate([
308
+ (0, swagger_1.ApiProperty)({
309
+ description: 'Numero destino com DDI',
310
+ example: '5511999999999',
311
+ }),
312
+ (0, class_validator_1.IsString)(),
313
+ (0, class_validator_1.IsNotEmpty)(),
314
+ __metadata("design:type", String)
315
+ ], SendConnectionWhatsAppAudioDto.prototype, "number", void 0);
316
+ __decorate([
317
+ (0, swagger_1.ApiProperty)({
318
+ description: 'URL publica do audio ou conteudo base64',
319
+ example: 'https://cdn.seusistema.com/media/audio.ogg',
320
+ }),
321
+ (0, class_validator_1.IsString)(),
322
+ (0, class_validator_1.IsNotEmpty)(),
323
+ __metadata("design:type", String)
324
+ ], SendConnectionWhatsAppAudioDto.prototype, "audio", void 0);
325
+ __decorate([
326
+ (0, swagger_1.ApiPropertyOptional)({
327
+ description: 'Delay de presenca em ms antes do envio',
328
+ example: 1000,
329
+ }),
330
+ (0, class_validator_1.IsOptional)(),
331
+ (0, class_validator_1.IsInt)(),
332
+ (0, class_validator_1.Min)(0),
333
+ __metadata("design:type", Number)
334
+ ], SendConnectionWhatsAppAudioDto.prototype, "delay", void 0);
335
+ class ConnectionMediaMessageKeyDto {
336
+ id;
337
+ }
338
+ exports.ConnectionMediaMessageKeyDto = ConnectionMediaMessageKeyDto;
339
+ __decorate([
340
+ (0, swagger_1.ApiProperty)({
341
+ description: 'ID da mensagem de midia no WhatsApp',
342
+ example: 'BAE594145F4C59B4',
343
+ }),
344
+ (0, class_validator_1.IsString)(),
345
+ (0, class_validator_1.IsNotEmpty)(),
346
+ __metadata("design:type", String)
347
+ ], ConnectionMediaMessageKeyDto.prototype, "id", void 0);
348
+ class ConnectionMediaMessageDto {
349
+ key;
350
+ }
351
+ exports.ConnectionMediaMessageDto = ConnectionMediaMessageDto;
352
+ __decorate([
353
+ (0, swagger_1.ApiProperty)({ type: ConnectionMediaMessageKeyDto }),
354
+ (0, class_validator_1.ValidateNested)(),
355
+ (0, class_transformer_1.Type)(() => ConnectionMediaMessageKeyDto),
356
+ __metadata("design:type", ConnectionMediaMessageKeyDto)
357
+ ], ConnectionMediaMessageDto.prototype, "key", void 0);
358
+ class GetConnectionBase64Dto {
359
+ message;
360
+ convertToMp4;
361
+ }
362
+ exports.GetConnectionBase64Dto = GetConnectionBase64Dto;
363
+ __decorate([
364
+ (0, swagger_1.ApiProperty)({ type: ConnectionMediaMessageDto }),
365
+ (0, class_validator_1.ValidateNested)(),
366
+ (0, class_transformer_1.Type)(() => ConnectionMediaMessageDto),
367
+ __metadata("design:type", ConnectionMediaMessageDto)
368
+ ], GetConnectionBase64Dto.prototype, "message", void 0);
369
+ __decorate([
370
+ (0, swagger_1.ApiProperty)({
371
+ description: 'Converter video para MP4 (valido para mensagens de video)',
372
+ example: false,
373
+ }),
374
+ (0, class_validator_1.IsBoolean)(),
375
+ __metadata("design:type", Boolean)
376
+ ], GetConnectionBase64Dto.prototype, "convertToMp4", void 0);
@@ -19,6 +19,10 @@ export declare class SendWhatsAppOfficialTemplateDto {
19
19
  languageCode: string;
20
20
  bodyParameters?: string[];
21
21
  headerParameters?: string[];
22
+ buttonParameters?: Array<{
23
+ index: number;
24
+ payload: string;
25
+ }>;
22
26
  }
23
27
  /**
24
28
  * Payload to send a free-form text message via WhatsApp Official (Meta Cloud API).
@@ -1 +1 @@
1
- {"version":3,"file":"whatsapp-official.dto.d.ts","sourceRoot":"","sources":["../../src/connections/whatsapp-official.dto.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,qBAAa,iCAAiC;IAO5C,WAAW,EAAE,MAAM,CAAC;IAQpB,aAAa,EAAE,MAAM,CAAC;IAQtB,MAAM,EAAE,MAAM,CAAC;IAQf,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,+BAA+B;IAO1C,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAQrB,YAAY,EAAE,MAAM,CAAC;IAWrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAS1B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,2BAA2B;IAOtC,EAAE,EAAE,MAAM,CAAC;IAQX,IAAI,EAAE,MAAM,CAAC;CACd"}
1
+ {"version":3,"file":"whatsapp-official.dto.d.ts","sourceRoot":"","sources":["../../src/connections/whatsapp-official.dto.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,qBAAa,iCAAiC;IAO5C,WAAW,EAAE,MAAM,CAAC;IAQpB,aAAa,EAAE,MAAM,CAAC;IAQtB,MAAM,EAAE,MAAM,CAAC;IAQf,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,+BAA+B;IAO1C,EAAE,EAAE,MAAM,CAAC;IAQX,YAAY,EAAE,MAAM,CAAC;IAQrB,YAAY,EAAE,MAAM,CAAC;IAWrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAS1B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAW5B,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9D;AAED;;;GAGG;AACH,qBAAa,2BAA2B;IAOtC,EAAE,EAAE,MAAM,CAAC;IAQX,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -70,6 +70,7 @@ class SendWhatsAppOfficialTemplateDto {
70
70
  languageCode;
71
71
  bodyParameters;
72
72
  headerParameters;
73
+ buttonParameters;
73
74
  }
74
75
  exports.SendWhatsAppOfficialTemplateDto = SendWhatsAppOfficialTemplateDto;
75
76
  __decorate([
@@ -120,6 +121,17 @@ __decorate([
120
121
  (0, class_validator_1.IsString)({ each: true }),
121
122
  __metadata("design:type", Array)
122
123
  ], SendWhatsAppOfficialTemplateDto.prototype, "headerParameters", void 0);
124
+ __decorate([
125
+ (0, swagger_1.ApiPropertyOptional)({
126
+ description: 'QUICK_REPLY button payloads (0-based index). Echoed by Meta webhook as button.payload.',
127
+ example: [
128
+ { index: 0, payload: 'confirm_presence' },
129
+ { index: 1, payload: 'reschedule' },
130
+ ],
131
+ }),
132
+ (0, class_validator_1.IsOptional)(),
133
+ __metadata("design:type", Array)
134
+ ], SendWhatsAppOfficialTemplateDto.prototype, "buttonParameters", void 0);
123
135
  /**
124
136
  * Payload to send a free-form text message via WhatsApp Official (Meta Cloud API).
125
137
  * Only works within the 24-hour customer service window.
@@ -7,11 +7,13 @@ export declare class EnqueueNfeDto {
7
7
  companyCpfCnpj: string;
8
8
  payload: Record<string, unknown>;
9
9
  referenceId?: string;
10
+ patientId?: string;
10
11
  }
11
12
  export declare class ListFiscalDocumentsQueryDto {
12
13
  documentType?: FiscalDocumentType;
13
14
  status?: FiscalDocumentStatusDto;
14
15
  referenceId?: string;
16
+ patientId?: string;
15
17
  acbrId?: string;
16
18
  createdFrom?: string;
17
19
  createdTo?: string;
@@ -23,6 +25,7 @@ export type FiscalDocumentListItemDto = {
23
25
  documentType: FiscalDocumentType;
24
26
  companyCpfCnpj: string;
25
27
  referenceId: string | null;
28
+ patientId: string | null;
26
29
  acbrId: string | null;
27
30
  status: FiscalDocumentStatusDto;
28
31
  lastError: string | null;
@@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MnB,IAAI,CAAC,EAAE,MAAM,CAAC;IAOd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,kBAAkB,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,uBAAuB,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,KAAK,EAAE,yBAAyB,EAAE,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,0BAA0B;IAIrC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -29,6 +29,7 @@ class EnqueueNfeDto {
29
29
  companyCpfCnpj;
30
30
  payload;
31
31
  referenceId;
32
+ patientId;
32
33
  }
33
34
  exports.EnqueueNfeDto = EnqueueNfeDto;
34
35
  __decorate([
@@ -51,10 +52,17 @@ __decorate([
51
52
  (0, class_validator_1.IsOptional)(),
52
53
  __metadata("design:type", String)
53
54
  ], EnqueueNfeDto.prototype, "referenceId", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Paciente vinculado (UUID)' }),
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsUUID)(),
59
+ __metadata("design:type", String)
60
+ ], EnqueueNfeDto.prototype, "patientId", void 0);
54
61
  class ListFiscalDocumentsQueryDto {
55
62
  documentType;
56
63
  status;
57
64
  referenceId;
65
+ patientId;
58
66
  acbrId;
59
67
  createdFrom;
60
68
  createdTo;
@@ -80,6 +88,12 @@ __decorate([
80
88
  (0, class_validator_1.IsString)(),
81
89
  __metadata("design:type", String)
82
90
  ], ListFiscalDocumentsQueryDto.prototype, "referenceId", void 0);
91
+ __decorate([
92
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Busca por paciente (UUID)' }),
93
+ (0, class_validator_1.IsOptional)(),
94
+ (0, class_validator_1.IsUUID)(),
95
+ __metadata("design:type", String)
96
+ ], ListFiscalDocumentsQueryDto.prototype, "patientId", void 0);
83
97
  __decorate([
84
98
  (0, swagger_1.ApiPropertyOptional)({ description: 'Busca por ACBR ID (parcial ou completo)' }),
85
99
  (0, class_validator_1.IsOptional)(),
@@ -9,4 +9,5 @@ export * from './consume-tenant-ai-tokens.dto';
9
9
  export * from './recharge-tenant-ai-tokens.dto';
10
10
  export * from './renew-tenant-ai-tokens.dto';
11
11
  export * from './tenant-storage-usage-apply-delta.dto';
12
+ export * from './tenant-fiscal-profile.dto';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC"}
@@ -25,3 +25,4 @@ __exportStar(require("./consume-tenant-ai-tokens.dto"), exports);
25
25
  __exportStar(require("./recharge-tenant-ai-tokens.dto"), exports);
26
26
  __exportStar(require("./renew-tenant-ai-tokens.dto"), exports);
27
27
  __exportStar(require("./tenant-storage-usage-apply-delta.dto"), exports);
28
+ __exportStar(require("./tenant-fiscal-profile.dto"), exports);
@@ -0,0 +1,27 @@
1
+ export declare const TENANT_FISCAL_PROFILE_GET = "tenant.fiscalProfile.get";
2
+ export declare const TENANT_FISCAL_PROFILE_UPSERT = "tenant.fiscalProfile.upsert";
3
+ export declare class TenantFiscalProfileCompanyDto {
4
+ cpfCnpj?: string;
5
+ razaoSocial?: string;
6
+ nomeFantasia?: string;
7
+ email?: string;
8
+ telefone?: string;
9
+ }
10
+ export declare class TenantFiscalProfileDto {
11
+ company?: TenantFiscalProfileCompanyDto;
12
+ acbrCompanyPayload?: Record<string, unknown>;
13
+ fiscalDefaults?: Record<string, unknown>;
14
+ }
15
+ export declare class GetTenantFiscalProfileDto {
16
+ tenantSlug: string;
17
+ }
18
+ export declare class UpsertTenantFiscalProfileDto {
19
+ tenantSlug: string;
20
+ profile?: TenantFiscalProfileDto;
21
+ }
22
+ export declare class TenantFiscalProfileResponseDto {
23
+ tenantId?: string;
24
+ tenantSlug?: string;
25
+ profile?: TenantFiscalProfileDto;
26
+ }
27
+ //# sourceMappingURL=tenant-fiscal-profile.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-fiscal-profile.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/tenant-fiscal-profile.dto.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AACpE,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAE1E,qBAAa,6BAA6B;IAIxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,sBAAsB;IAKjC,OAAO,CAAC,EAAE,6BAA6B,CAAC;IAKxC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAK7C,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED,qBAAa,yBAAyB;IAEpC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,4BAA4B;IAEvC,UAAU,EAAE,MAAM,CAAC;IAKnB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC;AAED,qBAAa,8BAA8B;IAIzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,UAAU,CAAC,EAAE,MAAM,CAAC;IAMpB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC"}