tychat-contracts 1.6.42 → 1.6.43

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 (34) hide show
  1. package/dist/campaigns/campaign.dto.d.ts +0 -2
  2. package/dist/campaigns/campaign.dto.d.ts.map +1 -1
  3. package/dist/connections/index.d.ts +0 -1
  4. package/dist/connections/index.d.ts.map +1 -1
  5. package/dist/connections/index.js +0 -1
  6. package/dist/conversations/list-conversation-contacts-query.dto.d.ts +1 -1
  7. package/dist/conversations/list-conversation-contacts-query.dto.d.ts.map +1 -1
  8. package/dist/conversations/list-conversation-contacts-query.dto.js +1 -1
  9. package/dist/conversations/list-conversation-sessions-query.dto.d.ts +1 -1
  10. package/dist/conversations/list-conversation-sessions-query.dto.d.ts.map +1 -1
  11. package/dist/conversations/list-conversation-sessions-query.dto.js +1 -1
  12. package/dist/legal-terms/legal-term-preview.dto.js +1 -1
  13. package/dist/panel-rbac/dashboard-layout.dto.d.ts +1 -1
  14. package/dist/panel-rbac/dashboard-layout.dto.d.ts.map +1 -1
  15. package/dist/panel-rbac/dashboard-layout.dto.js +0 -3
  16. package/dist/panel-rbac/panel-permission-keys.d.ts +0 -1
  17. package/dist/panel-rbac/panel-permission-keys.d.ts.map +1 -1
  18. package/dist/panel-rbac/panel-permission-keys.js +0 -1
  19. package/dist/tenants/whatsapp-provider-kind.dto.d.ts +2 -5
  20. package/dist/tenants/whatsapp-provider-kind.dto.d.ts.map +1 -1
  21. package/dist/tenants/whatsapp-provider-kind.dto.js +2 -8
  22. package/package.json +30 -30
  23. package/src/campaigns/campaign.dto.ts +0 -2
  24. package/src/connections/index.ts +0 -1
  25. package/src/conversations/list-conversation-contacts-query.dto.ts +1 -1
  26. package/src/conversations/list-conversation-sessions-query.dto.ts +1 -1
  27. package/src/legal-terms/legal-term-preview.dto.ts +1 -1
  28. package/src/panel-rbac/dashboard-layout.dto.ts +0 -3
  29. package/src/panel-rbac/panel-permission-keys.ts +0 -1
  30. package/src/tenants/whatsapp-provider-kind.dto.ts +2 -8
  31. package/dist/connections/connections.dto.d.ts +0 -53
  32. package/dist/connections/connections.dto.d.ts.map +0 -1
  33. package/dist/connections/connections.dto.js +0 -376
  34. package/src/connections/connections.dto.ts +0 -297
@@ -54,8 +54,6 @@ export interface CampaignStatsDto {
54
54
  replied: number;
55
55
  /** Leituras com confirmação explícita do webhook da Meta. */
56
56
  readFromMeta?: number;
57
- /** Leituras confirmadas por webhook Evolution (quando disponível). */
58
- readFromEvolution?: number;
59
57
  /**
60
58
  * `read_at` preenchido sem origem de canal conhecida (legado ou provedor sem indicador).
61
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"campaign.dto.d.ts","sourceRoot":"","sources":["../../src/campaigns/campaign.dto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC7C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;IAClD,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC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AS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qFAAqF;AACrF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,uBAAuB,EAAE,MAAM,CAAC;IAChC,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC"}
@@ -1,3 +1,2 @@
1
- export * from './connections.dto';
2
1
  export * from './whatsapp-official.dto';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -14,5 +14,4 @@ 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("./connections.dto"), exports);
18
17
  __exportStar(require("./whatsapp-official.dto"), exports);
@@ -3,7 +3,7 @@ import type { ParsedFilterDto } from '../filters/parsed-filter.dto';
3
3
  * Allowed conversation session entity columns for filtering (camelCase API keys).
4
4
  * Microservice uses this whitelist to prevent access to non-existent columns.
5
5
  */
6
- export declare const CONVERSATION_CONTACT_LIST_FILTER_KEYS: readonly ["id", "sessionUuid", "patientId", "unitId", "tenantEvogoInstanceId", "conversationType", "intention", "unreadCount", "startedAt", "expiresAt"];
6
+ export declare const CONVERSATION_CONTACT_LIST_FILTER_KEYS: readonly ["id", "sessionUuid", "patientId", "unitId", "whatsappOfficialConfigId", "conversationType", "intention", "unreadCount", "startedAt", "expiresAt"];
7
7
  export type ConversationContactListFilterKeyDto = (typeof CONVERSATION_CONTACT_LIST_FILTER_KEYS)[number];
8
8
  export declare class ListConversationContactsQueryDto {
9
9
  page?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"list-conversation-contacts-query.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/list-conversation-contacts-query.dto.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,qCAAqC,0JAWxC,CAAC;AACX,MAAM,MAAM,mCAAmC,GAC7C,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,qBAAa,gCAAgC;IAU3C,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,MAAM,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC;IAWrC,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAW3B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
1
+ {"version":3,"file":"list-conversation-contacts-query.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/list-conversation-contacts-query.dto.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,qCAAqC,6JAWxC,CAAC;AACX,MAAM,MAAM,mCAAmC,GAC7C,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,qBAAa,gCAAgC;IAU3C,IAAI,CAAC,EAAE,MAAM,CAAC;IAad,KAAK,CAAC,EAAE,MAAM,CAAC;IAUf,MAAM,CAAC,EAAE,WAAW,GAAG,aAAa,CAAC;IAWrC,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAW3B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
@@ -22,7 +22,7 @@ exports.CONVERSATION_CONTACT_LIST_FILTER_KEYS = [
22
22
  'sessionUuid',
23
23
  'patientId',
24
24
  'unitId',
25
- 'tenantEvogoInstanceId',
25
+ 'whatsappOfficialConfigId',
26
26
  'conversationType',
27
27
  'intention',
28
28
  'unreadCount',
@@ -3,7 +3,7 @@ import type { ParsedFilterDto } from '../filters/parsed-filter.dto';
3
3
  * Allowed `conversation_sessions` columns for structured filters (camelCase).
4
4
  * Same whitelist as contact list session filters.
5
5
  */
6
- export declare const CONVERSATION_SESSION_LIST_FILTER_KEYS: readonly ["id", "sessionUuid", "patientId", "unitId", "tenantEvogoInstanceId", "conversationType", "intention", "unreadCount", "startedAt", "expiresAt"];
6
+ export declare const CONVERSATION_SESSION_LIST_FILTER_KEYS: readonly ["id", "sessionUuid", "patientId", "unitId", "whatsappOfficialConfigId", "conversationType", "intention", "unreadCount", "startedAt", "expiresAt"];
7
7
  export type ConversationSessionListFilterKeyDto = (typeof CONVERSATION_SESSION_LIST_FILTER_KEYS)[number];
8
8
  export declare class ListConversationSessionsQueryDto {
9
9
  page?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"list-conversation-sessions-query.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/list-conversation-sessions-query.dto.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,qCAAqC,0JAWxC,CAAC;AACX,MAAM,MAAM,mCAAmC,GAC7C,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,qBAAa,gCAAgC;IAM3C,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;IAWnB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
1
+ {"version":3,"file":"list-conversation-sessions-query.dto.d.ts","sourceRoot":"","sources":["../../src/conversations/list-conversation-sessions-query.dto.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,qCAAqC,6JAWxC,CAAC;AACX,MAAM,MAAM,mCAAmC,GAC7C,CAAC,OAAO,qCAAqC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,qBAAa,gCAAgC;IAM3C,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAKf,SAAS,CAAC,EAAE,MAAM,CAAC;IAWnB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
@@ -22,7 +22,7 @@ exports.CONVERSATION_SESSION_LIST_FILTER_KEYS = [
22
22
  'sessionUuid',
23
23
  'patientId',
24
24
  'unitId',
25
- 'tenantEvogoInstanceId',
25
+ 'whatsappOfficialConfigId',
26
26
  'conversationType',
27
27
  'intention',
28
28
  'unreadCount',
@@ -132,7 +132,7 @@ __decorate([
132
132
  ], LegalTermSendDto.prototype, "signerEmail", void 0);
133
133
  __decorate([
134
134
  (0, swagger_1.ApiPropertyOptional)({
135
- description: 'Instância Evolution (opcional). Se omitido, usa-se a da sessão ativa do paciente (igual a conversas).',
135
+ description: 'UUID da linha WhatsApp Official (whatsapp_official_configs). Se omitido, usa-se o da sessão ativa do paciente.',
136
136
  }),
137
137
  (0, class_validator_1.IsOptional)(),
138
138
  (0, class_validator_1.IsString)(),
@@ -5,7 +5,7 @@ export type DashboardChartType = (typeof DASHBOARD_CHART_TYPES)[number];
5
5
  * Módulos de dados agregados do dashboard (cada um mapeia a permissões e a fatia do summary).
6
6
  * Manter alinhado ao `Frontend/.../lib/dashboard-data-modules.ts`.
7
7
  */
8
- export declare const DASHBOARD_DATA_MODULE_KEYS: readonly ["overview.clients_total", "overview.clients_active_inactive", "overview.units_total", "overview.revenue_totals", "overview.revenue_growth", "overview.estimated_mrr", "overview.clients_per_plan", "overview.recent_signups", "overview.invoice_counts", "billing.revenue_by_status", "billing.invoice_status_breakdown", "billing.invoice_counts", "billing.recent_invoices", "billing.payment_links", "tenants.client_list", "tenants.plan_per_client", "tenants.legal_term_policy", "tenants.whatsapp_provider", "tenants.scheduled_deletion", "tenants.hostnames", "tenants.storage_usage", "infra.storage_overview", "infra.storage_by_tenant", "limits.per_client", "limits.session_policy", "limits.extra_storage", "plans.stats", "plans.list", "plans.active_inactive", "ia.tokens_per_tenant", "ia.agents_per_tenant", "ia.agents_summary", "ia.tool_policies", "ia.models_availability", "evolution.configs_summary", "evolution.instances_totals", "evolution.connection_state", "global.platform_config", "team.panel_admins", "audit.recent_events", "audit.outcome_counts", "security.device_sessions", "security.totp_status", "refunds.volume_by_month", "refunds.by_status", "refunds.top_tenants"];
8
+ export declare const DASHBOARD_DATA_MODULE_KEYS: readonly ["overview.clients_total", "overview.clients_active_inactive", "overview.units_total", "overview.revenue_totals", "overview.revenue_growth", "overview.estimated_mrr", "overview.clients_per_plan", "overview.recent_signups", "overview.invoice_counts", "billing.revenue_by_status", "billing.invoice_status_breakdown", "billing.invoice_counts", "billing.recent_invoices", "billing.payment_links", "tenants.client_list", "tenants.plan_per_client", "tenants.legal_term_policy", "tenants.whatsapp_provider", "tenants.scheduled_deletion", "tenants.hostnames", "tenants.storage_usage", "infra.storage_overview", "infra.storage_by_tenant", "limits.per_client", "limits.session_policy", "limits.extra_storage", "plans.stats", "plans.list", "plans.active_inactive", "ia.tokens_per_tenant", "ia.agents_per_tenant", "ia.agents_summary", "ia.tool_policies", "ia.models_availability", "global.platform_config", "team.panel_admins", "audit.recent_events", "audit.outcome_counts", "security.device_sessions", "security.totp_status", "refunds.volume_by_month", "refunds.by_status", "refunds.top_tenants"];
9
9
  export type DashboardDataModuleKey = (typeof DASHBOARD_DATA_MODULE_KEYS)[number];
10
10
  export declare function isDashboardDataModuleKey(v: string): v is DashboardDataModuleKey;
11
11
  /** Posição e tamanho no painel em percentagem (0–100) relativamente ao contentor do canvas. */
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-layout.dto.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/dashboard-layout.dto.ts"],"names":[],"mappings":"AAiBA,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,4EASxB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,iqCA+C7B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,sBAAsB,CAE/E;AAED,+FAA+F;AAC/F,qBAAa,sBAAsB;IAMjC,OAAO,EAAE,MAAM,CAAC;IAOhB,MAAM,EAAE,MAAM,CAAC;IAOf,QAAQ,EAAE,MAAM,CAAC;IAOjB,SAAS,EAAE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AKnC,SAAS,EAAE,kBAAkB,CAAC;IAE9B,0CAA0C;IAK1C,CAAC,EAAE,MAAM,CAAC;IAEV,iCAAiC;IAKjC,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IAOH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,2CAA2C;IAI3C,KAAK,EAAE,MAAM,CAAC;IAMd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,0HAA0H;IAK1H,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,qBAAa,kBAAkB;IAK7B,OAAO,EAAE,MAAM,CAAC;IAOhB,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B"}
@@ -64,9 +64,6 @@ exports.DASHBOARD_DATA_MODULE_KEYS = [
64
64
  'ia.agents_summary',
65
65
  'ia.tool_policies',
66
66
  'ia.models_availability',
67
- 'evolution.configs_summary',
68
- 'evolution.instances_totals',
69
- 'evolution.connection_state',
70
67
  'global.platform_config',
71
68
  'team.panel_admins',
72
69
  'audit.recent_events',
@@ -12,7 +12,6 @@ export declare const PANEL_RESOURCE_ACTIONS: {
12
12
  readonly audit_logs: readonly ["view"];
13
13
  readonly plans: readonly ["view", "create", "update"];
14
14
  readonly configurations: readonly ["view", "update"];
15
- readonly evogo_configs: readonly ["view", "create"];
16
15
  readonly app_modules: readonly ["view", "update"];
17
16
  readonly ai_tools: readonly ["view", "update"];
18
17
  readonly admin_notifications: readonly ["push"];
@@ -1 +1 @@
1
- {"version":3,"file":"panel-permission-keys.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/panel-permission-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;CA2BzB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAEhE,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,aAAa,IAC7C,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAS7C,eAAO,MAAM,qBAAqB,EAAW,SAAS,MAAM,EAAE,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,GACjC,kBAAkB,CAEpB"}
1
+ {"version":3,"file":"panel-permission-keys.d.ts","sourceRoot":"","sources":["../../src/panel-rbac/panel-permission-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;CA0BzB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAEhE,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,aAAa,IAC7C,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAS7C,eAAO,MAAM,qBAAqB,EAAW,SAAS,MAAM,EAAE,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,WAAW,CAAC,aAAa,CAAC,GACjC,kBAAkB,CAEpB"}
@@ -25,7 +25,6 @@ exports.PANEL_RESOURCE_ACTIONS = {
25
25
  audit_logs: ['view'],
26
26
  plans: ['view', 'create', 'update'],
27
27
  configurations: ['view', 'update'],
28
- evogo_configs: ['view', 'create'],
29
28
  app_modules: ['view', 'update'],
30
29
  ai_tools: ['view', 'update'],
31
30
  admin_notifications: ['push'],
@@ -1,9 +1,6 @@
1
1
  /**
2
- * Supported WhatsApp provider types for tenant instance provisioning.
3
- *
4
- * - `evolution_api`: Evolution API v2 (Baileys-based unofficial).
5
- * - `whatsapp_official`: Meta Cloud API (official WhatsApp Business).
2
+ * WhatsApp provider for tenant messaging (Meta Cloud API only).
6
3
  */
7
- export declare const WHATSAPP_PROVIDER_KINDS: readonly ["evolution_api", "whatsapp_official"];
4
+ export declare const WHATSAPP_PROVIDER_KINDS: readonly ["whatsapp_official"];
8
5
  export type WhatsAppProviderKindDto = (typeof WHATSAPP_PROVIDER_KINDS)[number];
9
6
  //# sourceMappingURL=whatsapp-provider-kind.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"whatsapp-provider-kind.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/whatsapp-provider-kind.dto.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,iDAG1B,CAAC;AAEX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"whatsapp-provider-kind.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/whatsapp-provider-kind.dto.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,uBAAuB,gCAAiC,CAAC;AAEtE,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -2,12 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WHATSAPP_PROVIDER_KINDS = void 0;
4
4
  /**
5
- * Supported WhatsApp provider types for tenant instance provisioning.
6
- *
7
- * - `evolution_api`: Evolution API v2 (Baileys-based unofficial).
8
- * - `whatsapp_official`: Meta Cloud API (official WhatsApp Business).
5
+ * WhatsApp provider for tenant messaging (Meta Cloud API only).
9
6
  */
10
- exports.WHATSAPP_PROVIDER_KINDS = [
11
- 'evolution_api',
12
- 'whatsapp_official',
13
- ];
7
+ exports.WHATSAPP_PROVIDER_KINDS = ['whatsapp_official'];
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "name": "tychat-contracts",
3
- "version": "1.6.42",
4
- "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "private": false,
8
- "scripts": {
9
- "build": "tsc",
10
- "release": "npm version patch && npm publish",
11
- "prepublishOnly": "npm run build"
12
- },
13
- "dependencies": {
14
- "class-transformer": "^0.5.1",
15
- "class-validator": "^0.14.1",
16
- "ioredis": "^5.10.0",
17
- "jest": "^30.3.0",
18
- "reflect-metadata": "*"
19
- },
20
- "devDependencies": {
21
- "@nestjs/swagger": "^11.2.6",
22
- "@types/jest": "^30.0.0",
23
- "ts-jest": "^29.4.9",
24
- "typescript": "^5.7.3"
25
- },
26
- "peerDependencies": {
27
- "@nestjs/swagger": "^11.2.6",
28
- "reflect-metadata": "*"
29
- }
30
- }
1
+ {
2
+ "name": "tychat-contracts",
3
+ "version": "1.6.43",
4
+ "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "private": false,
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "release": "npm version patch && npm publish",
11
+ "prepublishOnly": "npm run build"
12
+ },
13
+ "dependencies": {
14
+ "class-transformer": "^0.5.1",
15
+ "class-validator": "^0.14.1",
16
+ "ioredis": "^5.10.0",
17
+ "jest": "^30.3.0",
18
+ "reflect-metadata": "*"
19
+ },
20
+ "devDependencies": {
21
+ "@nestjs/swagger": "^11.2.6",
22
+ "@types/jest": "^30.0.0",
23
+ "ts-jest": "^29.4.9",
24
+ "typescript": "^5.7.3"
25
+ },
26
+ "peerDependencies": {
27
+ "@nestjs/swagger": "^11.2.6",
28
+ "reflect-metadata": "*"
29
+ }
30
+ }
@@ -58,8 +58,6 @@ export interface CampaignStatsDto {
58
58
  replied: number;
59
59
  /** Leituras com confirmação explícita do webhook da Meta. */
60
60
  readFromMeta?: number;
61
- /** Leituras confirmadas por webhook Evolution (quando disponível). */
62
- readFromEvolution?: number;
63
61
  /**
64
62
  * `read_at` preenchido sem origem de canal conhecida (legado ou provedor sem indicador).
65
63
  */
@@ -1,2 +1 @@
1
- export * from './connections.dto';
2
1
  export * from './whatsapp-official.dto';
@@ -12,7 +12,7 @@ export const CONVERSATION_CONTACT_LIST_FILTER_KEYS = [
12
12
  'sessionUuid',
13
13
  'patientId',
14
14
  'unitId',
15
- 'tenantEvogoInstanceId',
15
+ 'whatsappOfficialConfigId',
16
16
  'conversationType',
17
17
  'intention',
18
18
  'unreadCount',
@@ -12,7 +12,7 @@ export const CONVERSATION_SESSION_LIST_FILTER_KEYS = [
12
12
  'sessionUuid',
13
13
  'patientId',
14
14
  'unitId',
15
- 'tenantEvogoInstanceId',
15
+ 'whatsappOfficialConfigId',
16
16
  'conversationType',
17
17
  'intention',
18
18
  'unreadCount',
@@ -105,7 +105,7 @@ export class LegalTermSendDto {
105
105
 
106
106
  @ApiPropertyOptional({
107
107
  description:
108
- 'Instância Evolution (opcional). Se omitido, usa-se a da sessão ativa do paciente (igual a conversas).',
108
+ 'UUID da linha WhatsApp Official (whatsapp_official_configs). Se omitido, usa-se o da sessão ativa do paciente.',
109
109
  })
110
110
  @IsOptional()
111
111
  @IsString()
@@ -68,9 +68,6 @@ export const DASHBOARD_DATA_MODULE_KEYS = [
68
68
  'ia.agents_summary',
69
69
  'ia.tool_policies',
70
70
  'ia.models_availability',
71
- 'evolution.configs_summary',
72
- 'evolution.instances_totals',
73
- 'evolution.connection_state',
74
71
  'global.platform_config',
75
72
  'team.panel_admins',
76
73
  'audit.recent_events',
@@ -20,7 +20,6 @@ export const PANEL_RESOURCE_ACTIONS = {
20
20
  audit_logs: ['view'] as const,
21
21
  plans: ['view', 'create', 'update'] as const,
22
22
  configurations: ['view', 'update'] as const,
23
- evogo_configs: ['view', 'create'] as const,
24
23
  app_modules: ['view', 'update'] as const,
25
24
  ai_tools: ['view', 'update'] as const,
26
25
  admin_notifications: ['push'] as const,
@@ -1,12 +1,6 @@
1
1
  /**
2
- * Supported WhatsApp provider types for tenant instance provisioning.
3
- *
4
- * - `evolution_api`: Evolution API v2 (Baileys-based unofficial).
5
- * - `whatsapp_official`: Meta Cloud API (official WhatsApp Business).
2
+ * WhatsApp provider for tenant messaging (Meta Cloud API only).
6
3
  */
7
- export const WHATSAPP_PROVIDER_KINDS = [
8
- 'evolution_api',
9
- 'whatsapp_official',
10
- ] as const;
4
+ export const WHATSAPP_PROVIDER_KINDS = ['whatsapp_official'] as const;
11
5
 
12
6
  export type WhatsAppProviderKindDto = (typeof WHATSAPP_PROVIDER_KINDS)[number];
@@ -1,53 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,376 +0,0 @@
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);
@@ -1,297 +0,0 @@
1
- import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
- import {
3
- IsArray,
4
- IsBoolean,
5
- IsInt,
6
- IsNotEmpty,
7
- IsOptional,
8
- IsString,
9
- Min,
10
- ValidateNested,
11
- } from 'class-validator';
12
- import { Type } from 'class-transformer';
13
-
14
- export class CreateConnectionInstanceDto {
15
- @ApiPropertyOptional({
16
- description:
17
- 'Token da instância (se omitido, EvolutionAPI pode gerar dinamicamente)',
18
- example: 'my-instance-token',
19
- })
20
- @IsOptional()
21
- @IsString()
22
- token?: string;
23
-
24
- @ApiPropertyOptional({
25
- description: 'Cria QR Code automaticamente após criar a instância',
26
- example: true,
27
- })
28
- @IsOptional()
29
- @IsBoolean()
30
- qrcode?: boolean;
31
-
32
- @ApiPropertyOptional({
33
- description: 'Número proprietário da instância com DDI (somente dígitos)',
34
- example: '5511999999999',
35
- })
36
- @IsOptional()
37
- @IsString()
38
- number?: string;
39
-
40
- @ApiPropertyOptional({
41
- description: 'Rejeitar chamadas automaticamente',
42
- example: true,
43
- })
44
- @IsOptional()
45
- @IsBoolean()
46
- rejectCall?: boolean;
47
-
48
- @ApiPropertyOptional({
49
- description: 'Mensagem enviada ao rejeitar chamada automaticamente',
50
- example: 'Nao atendemos chamadas por este canal.',
51
- })
52
- @IsOptional()
53
- @IsString()
54
- msgCall?: string;
55
-
56
- @ApiPropertyOptional({
57
- description: 'Ignorar mensagens de grupos',
58
- example: false,
59
- })
60
- @IsOptional()
61
- @IsBoolean()
62
- groupsIgnore?: boolean;
63
-
64
- @ApiPropertyOptional({
65
- description: 'Manter sessao sempre online',
66
- example: true,
67
- })
68
- @IsOptional()
69
- @IsBoolean()
70
- alwaysOnline?: boolean;
71
-
72
- @ApiPropertyOptional({
73
- description: 'Marcar mensagens recebidas como lidas',
74
- example: true,
75
- })
76
- @IsOptional()
77
- @IsBoolean()
78
- readMessages?: boolean;
79
-
80
- @ApiPropertyOptional({
81
- description: 'Exibir status de leitura das mensagens enviadas',
82
- example: true,
83
- })
84
- @IsOptional()
85
- @IsBoolean()
86
- readStatus?: boolean;
87
-
88
- @ApiPropertyOptional({
89
- description: 'Sincronizar historico completo do WhatsApp',
90
- example: false,
91
- })
92
- @IsOptional()
93
- @IsBoolean()
94
- syncFullHistory?: boolean;
95
- }
96
-
97
- export class ConnectionInstanceConnectQueryDto {
98
- @ApiPropertyOptional({
99
- description: 'Numero com DDI para pareamento por codigo (opcional)',
100
- example: '5511999999999',
101
- })
102
- @IsOptional()
103
- @IsString()
104
- number?: string;
105
- }
106
-
107
- export class SetConnectionWebhookDto {
108
- @ApiProperty({
109
- description: 'Habilita webhook da instancia',
110
- example: true,
111
- })
112
- @IsBoolean()
113
- enabled!: boolean;
114
-
115
- @ApiProperty({
116
- description: 'URL que recebera eventos',
117
- example: 'https://api.seusistema.com/webhooks/whatsapp',
118
- })
119
- @IsString()
120
- @IsNotEmpty()
121
- url!: string;
122
-
123
- @ApiProperty({
124
- description: 'Webhook por eventos especificos',
125
- example: true,
126
- })
127
- @IsBoolean()
128
- webhookByEvents!: boolean;
129
-
130
- @ApiProperty({
131
- description: 'Incluir arquivos em base64 quando disponivel',
132
- example: false,
133
- })
134
- @IsBoolean()
135
- webhookBase64!: boolean;
136
-
137
- @ApiProperty({
138
- description: 'Eventos permitidos pela Evolution API',
139
- example: ['CONNECTION_UPDATE', 'MESSAGES_UPSERT'],
140
- type: [String],
141
- })
142
- @IsArray()
143
- @IsString({ each: true })
144
- events!: string[];
145
- }
146
-
147
- export class SendConnectionTextDto {
148
- @ApiProperty({
149
- description: 'Numero destino com DDI',
150
- example: '5511999999999',
151
- })
152
- @IsString()
153
- @IsNotEmpty()
154
- number!: string;
155
-
156
- @ApiProperty({
157
- description: 'Texto da mensagem',
158
- example: 'Ola! Tudo bem?',
159
- })
160
- @IsString()
161
- @IsNotEmpty()
162
- text!: string;
163
-
164
- @ApiPropertyOptional({
165
- description: 'Delay de presenca em ms antes do envio',
166
- example: 1000,
167
- })
168
- @IsOptional()
169
- @IsInt()
170
- @Min(0)
171
- delay?: number;
172
-
173
- @ApiPropertyOptional({
174
- description: 'Ativar preview de links',
175
- example: true,
176
- })
177
- @IsOptional()
178
- @IsBoolean()
179
- linkPreview?: boolean;
180
- }
181
-
182
- export class SendConnectionMediaDto {
183
- @ApiProperty({
184
- description: 'Numero destino com DDI',
185
- example: '5511999999999',
186
- })
187
- @IsString()
188
- @IsNotEmpty()
189
- number!: string;
190
-
191
- @ApiProperty({
192
- description: 'Tipo da midia',
193
- example: 'image',
194
- })
195
- @IsString()
196
- @IsNotEmpty()
197
- mediatype!: string;
198
-
199
- @ApiProperty({
200
- description: 'MIME type da midia',
201
- example: 'image/png',
202
- })
203
- @IsString()
204
- @IsNotEmpty()
205
- mimetype!: string;
206
-
207
- @ApiProperty({
208
- description: 'Legenda',
209
- example: 'Imagem de teste',
210
- })
211
- @IsString()
212
- @IsNotEmpty()
213
- caption!: string;
214
-
215
- @ApiProperty({
216
- description: 'URL publica da midia ou conteudo base64',
217
- example: 'https://cdn.seusistema.com/media/example.png',
218
- })
219
- @IsString()
220
- @IsNotEmpty()
221
- media!: string;
222
-
223
- @ApiProperty({
224
- description: 'Nome do arquivo',
225
- example: 'example.png',
226
- })
227
- @IsString()
228
- @IsNotEmpty()
229
- fileName!: string;
230
-
231
- @ApiPropertyOptional({
232
- description: 'Delay de presenca em ms antes do envio',
233
- example: 1000,
234
- })
235
- @IsOptional()
236
- @IsInt()
237
- @Min(0)
238
- delay?: number;
239
- }
240
-
241
- export class SendConnectionWhatsAppAudioDto {
242
- @ApiProperty({
243
- description: 'Numero destino com DDI',
244
- example: '5511999999999',
245
- })
246
- @IsString()
247
- @IsNotEmpty()
248
- number!: string;
249
-
250
- @ApiProperty({
251
- description: 'URL publica do audio ou conteudo base64',
252
- example: 'https://cdn.seusistema.com/media/audio.ogg',
253
- })
254
- @IsString()
255
- @IsNotEmpty()
256
- audio!: string;
257
-
258
- @ApiPropertyOptional({
259
- description: 'Delay de presenca em ms antes do envio',
260
- example: 1000,
261
- })
262
- @IsOptional()
263
- @IsInt()
264
- @Min(0)
265
- delay?: number;
266
- }
267
-
268
- export class ConnectionMediaMessageKeyDto {
269
- @ApiProperty({
270
- description: 'ID da mensagem de midia no WhatsApp',
271
- example: 'BAE594145F4C59B4',
272
- })
273
- @IsString()
274
- @IsNotEmpty()
275
- id!: string;
276
- }
277
-
278
- export class ConnectionMediaMessageDto {
279
- @ApiProperty({ type: ConnectionMediaMessageKeyDto })
280
- @ValidateNested()
281
- @Type(() => ConnectionMediaMessageKeyDto)
282
- key!: ConnectionMediaMessageKeyDto;
283
- }
284
-
285
- export class GetConnectionBase64Dto {
286
- @ApiProperty({ type: ConnectionMediaMessageDto })
287
- @ValidateNested()
288
- @Type(() => ConnectionMediaMessageDto)
289
- message!: ConnectionMediaMessageDto;
290
-
291
- @ApiProperty({
292
- description: 'Converter video para MP4 (valido para mensagens de video)',
293
- example: false,
294
- })
295
- @IsBoolean()
296
- convertToMp4!: boolean;
297
- }