tychat-contracts 1.6.75 → 1.6.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/event-analytic.enum.d.ts +1 -1
- package/dist/analytics/event-analytic.enum.d.ts.map +1 -1
- package/dist/analytics/event-analytic.enum.js +4 -0
- package/dist/anamneses/normalize-anamnesis-access-token.d.ts +9 -0
- package/dist/anamneses/normalize-anamnesis-access-token.d.ts.map +1 -0
- package/dist/anamneses/normalize-anamnesis-access-token.js +21 -0
- package/dist/anamneses/normalize-anamnesis-access-token.spec.d.ts +2 -0
- package/dist/anamneses/normalize-anamnesis-access-token.spec.d.ts.map +1 -0
- package/dist/anamneses/normalize-anamnesis-access-token.spec.js +18 -0
- package/dist/appointments/appointment-status.dto.d.ts +1 -1
- package/dist/appointments/appointment-status.dto.d.ts.map +1 -1
- package/dist/appointments/appointment-status.dto.js +1 -0
- package/dist/appointments/index.d.ts +2 -0
- package/dist/appointments/index.d.ts.map +1 -1
- package/dist/appointments/index.js +2 -0
- package/dist/appointments/schedule-block-rmq-patterns.d.ts +7 -0
- package/dist/appointments/schedule-block-rmq-patterns.d.ts.map +1 -0
- package/dist/appointments/schedule-block-rmq-patterns.js +9 -0
- package/dist/appointments/schedule-block.dto.d.ts +54 -0
- package/dist/appointments/schedule-block.dto.d.ts.map +1 -0
- package/dist/appointments/schedule-block.dto.js +223 -0
- package/dist/fiscal/enqueue-nfe.dto.d.ts +0 -3
- package/dist/fiscal/enqueue-nfe.dto.d.ts.map +1 -1
- package/dist/fiscal/enqueue-nfe.dto.js +0 -14
- package/dist/fiscal/fiscal-rmq-patterns.d.ts +0 -1
- package/dist/fiscal/fiscal-rmq-patterns.d.ts.map +1 -1
- package/dist/fiscal/fiscal-rmq-patterns.js +1 -2
- package/dist/tenants/index.d.ts +0 -1
- package/dist/tenants/index.d.ts.map +1 -1
- package/dist/tenants/index.js +0 -1
- package/package.json +1 -1
- package/src/analytics/event-analytic.enum.ts +5 -0
- package/src/appointments/appointment-status.dto.ts +1 -0
- package/src/appointments/index.ts +3 -1
- package/src/appointments/schedule-block-rmq-patterns.ts +6 -0
- package/src/appointments/schedule-block.dto.ts +155 -0
- package/src/campaigns/campaign-template-header-media.dto.ts +25 -25
- package/src/campaigns/campaign-template.dto.ts +45 -45
- package/src/campaigns/create-campaign.dto.ts +80 -80
- package/src/fiscal/enqueue-nfe.dto.ts +1 -22
- package/src/fiscal/fiscal-rmq-patterns.ts +0 -1
- package/src/patients/index.ts +10 -10
- package/src/tenants/anamnesis-public-frontend-url.spec.ts +45 -45
- package/src/tenants/anamnesis-public-frontend-url.ts +61 -61
- package/src/tenants/index.ts +0 -1
- package/dist/connections/connections.dto.d.ts +0 -53
- package/dist/connections/connections.dto.d.ts.map +0 -1
- package/dist/connections/connections.dto.js +0 -376
- package/dist/tenants/tenant-fiscal-profile.dto.d.ts +0 -27
- package/dist/tenants/tenant-fiscal-profile.dto.d.ts.map +0 -1
- package/dist/tenants/tenant-fiscal-profile.dto.js +0 -128
- package/src/tenants/tenant-fiscal-profile.dto.ts +0 -85
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { slugToDomainSegment } from './tenant-slug.util';
|
|
2
|
-
|
|
3
|
-
const TYCHAT_APP_SUFFIX = '.tychat.app';
|
|
4
|
-
|
|
5
|
-
function normalizeFrontendBaseUrl(raw: string): string {
|
|
6
|
-
const trimmed = raw.trim().replace(/\/+$/, '');
|
|
7
|
-
if (!trimmed) return '';
|
|
8
|
-
if (/^https?:\/\//i.test(trimmed)) {
|
|
9
|
-
return trimmed;
|
|
10
|
-
}
|
|
11
|
-
return `https://${trimmed}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function firstHostnameLabel(hostname: string): string {
|
|
15
|
-
return hostname.toLowerCase().split('.').filter(Boolean)[0] ?? '';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/** True when the hostname's first label matches the tenant slug segment. */
|
|
19
|
-
export function hostnameMatchesTenantSlug(hostname: string, tenantSlug: string): boolean {
|
|
20
|
-
const segment = slugToDomainSegment(tenantSlug);
|
|
21
|
-
if (!segment || segment === 'default') return false;
|
|
22
|
-
return firstHostnameLabel(hostname) === segment;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Builds a frontend base URL that resolves to a single tenant on public routes.
|
|
27
|
-
*
|
|
28
|
-
* Shared hosts (e.g. `qa.tychat.app`) are scoped as `{slug}.qa.tychat.app`.
|
|
29
|
-
* Custom domains and tenant-specific `*.tychat.app` hosts are kept as configured.
|
|
30
|
-
*/
|
|
31
|
-
export function resolveTenantScopedFrontendBaseUrl(
|
|
32
|
-
tenantSlug: string,
|
|
33
|
-
configuredHostRaw: string | null | undefined,
|
|
34
|
-
): string {
|
|
35
|
-
const slug = tenantSlug?.trim();
|
|
36
|
-
if (!slug) return '';
|
|
37
|
-
|
|
38
|
-
const segment = slugToDomainSegment(slug);
|
|
39
|
-
const fallback = `${segment}${TYCHAT_APP_SUFFIX}`;
|
|
40
|
-
const configured = configuredHostRaw?.trim();
|
|
41
|
-
const base = normalizeFrontendBaseUrl(configured || fallback);
|
|
42
|
-
|
|
43
|
-
let url: URL;
|
|
44
|
-
try {
|
|
45
|
-
url = new URL(base);
|
|
46
|
-
} catch {
|
|
47
|
-
return normalizeFrontendBaseUrl(fallback);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const hostname = url.hostname.toLowerCase();
|
|
51
|
-
if (hostnameMatchesTenantSlug(hostname, slug)) {
|
|
52
|
-
return url.origin;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (hostname.endsWith(TYCHAT_APP_SUFFIX)) {
|
|
56
|
-
url.hostname = `${segment}.${hostname}`;
|
|
57
|
-
return url.origin;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return url.origin;
|
|
61
|
-
}
|
|
1
|
+
import { slugToDomainSegment } from './tenant-slug.util';
|
|
2
|
+
|
|
3
|
+
const TYCHAT_APP_SUFFIX = '.tychat.app';
|
|
4
|
+
|
|
5
|
+
function normalizeFrontendBaseUrl(raw: string): string {
|
|
6
|
+
const trimmed = raw.trim().replace(/\/+$/, '');
|
|
7
|
+
if (!trimmed) return '';
|
|
8
|
+
if (/^https?:\/\//i.test(trimmed)) {
|
|
9
|
+
return trimmed;
|
|
10
|
+
}
|
|
11
|
+
return `https://${trimmed}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function firstHostnameLabel(hostname: string): string {
|
|
15
|
+
return hostname.toLowerCase().split('.').filter(Boolean)[0] ?? '';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** True when the hostname's first label matches the tenant slug segment. */
|
|
19
|
+
export function hostnameMatchesTenantSlug(hostname: string, tenantSlug: string): boolean {
|
|
20
|
+
const segment = slugToDomainSegment(tenantSlug);
|
|
21
|
+
if (!segment || segment === 'default') return false;
|
|
22
|
+
return firstHostnameLabel(hostname) === segment;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Builds a frontend base URL that resolves to a single tenant on public routes.
|
|
27
|
+
*
|
|
28
|
+
* Shared hosts (e.g. `qa.tychat.app`) are scoped as `{slug}.qa.tychat.app`.
|
|
29
|
+
* Custom domains and tenant-specific `*.tychat.app` hosts are kept as configured.
|
|
30
|
+
*/
|
|
31
|
+
export function resolveTenantScopedFrontendBaseUrl(
|
|
32
|
+
tenantSlug: string,
|
|
33
|
+
configuredHostRaw: string | null | undefined,
|
|
34
|
+
): string {
|
|
35
|
+
const slug = tenantSlug?.trim();
|
|
36
|
+
if (!slug) return '';
|
|
37
|
+
|
|
38
|
+
const segment = slugToDomainSegment(slug);
|
|
39
|
+
const fallback = `${segment}${TYCHAT_APP_SUFFIX}`;
|
|
40
|
+
const configured = configuredHostRaw?.trim();
|
|
41
|
+
const base = normalizeFrontendBaseUrl(configured || fallback);
|
|
42
|
+
|
|
43
|
+
let url: URL;
|
|
44
|
+
try {
|
|
45
|
+
url = new URL(base);
|
|
46
|
+
} catch {
|
|
47
|
+
return normalizeFrontendBaseUrl(fallback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const hostname = url.hostname.toLowerCase();
|
|
51
|
+
if (hostnameMatchesTenantSlug(hostname, slug)) {
|
|
52
|
+
return url.origin;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (hostname.endsWith(TYCHAT_APP_SUFFIX)) {
|
|
56
|
+
url.hostname = `${segment}.${hostname}`;
|
|
57
|
+
return url.origin;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return url.origin;
|
|
61
|
+
}
|
package/src/tenants/index.ts
CHANGED
|
@@ -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,27 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|