tychat-contracts 1.6.21 → 1.6.23
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/README.md +33 -33
- package/dist/storage/delete-object-rpc.dto.d.ts +9 -0
- package/dist/storage/delete-object-rpc.dto.d.ts.map +1 -0
- package/dist/storage/delete-object-rpc.dto.js +48 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +1 -0
- package/dist/storage/storage-rmq-patterns.d.ts +2 -0
- package/dist/storage/storage-rmq-patterns.d.ts.map +1 -1
- package/dist/storage/storage-rmq-patterns.js +3 -1
- package/jest.config.ts +5 -5
- package/package.json +2 -1
- package/src/ai/ai-usage-response.dto.ts +47 -47
- package/src/ai/create-ai-usage.dto.ts +43 -43
- package/src/analytics/analytics-emitter.helper.ts +54 -54
- package/src/analytics/analytics-query.dto.ts +222 -222
- package/src/analytics/create-analytic-event.dto.ts +85 -85
- package/src/analytics/event-analytic.enum.ts +119 -119
- package/src/appointments/appointment-procedure.dto.ts +76 -76
- package/src/appointments/create-appointment.dto.ts +153 -153
- package/src/appointments/index.ts +10 -10
- package/src/appointments/list-appointments-query.dto.ts +157 -157
- package/src/appointments/update-appointment-procedure.dto.ts +10 -10
- package/src/appointments/update-appointment.dto.ts +4 -4
- package/src/auth/refresh-token.dto.ts +10 -10
- package/src/billing/billing-response.dto.ts +68 -68
- package/src/billing/create-billing.dto.ts +70 -70
- package/src/billing/index.ts +6 -6
- package/src/billing/list-billings-query.dto.ts +61 -61
- package/src/billing/update-billing.dto.ts +4 -4
- package/src/cashback/cashback-balance-response.dto.ts +33 -33
- package/src/cashback/cashback-config-response.dto.ts +43 -43
- package/src/cashback/cashback-enums.ts +33 -33
- package/src/cashback/cashback-kafka-payloads.ts +102 -102
- package/src/cashback/cashback-kafka-topics.ts +23 -23
- package/src/cashback/index.ts +7 -7
- package/src/cashback/referral-code-response.dto.ts +49 -49
- package/src/cashback/use-referral-code-response.dto.ts +15 -15
- package/src/configurations/clinic-configuration.dto.ts +39 -39
- package/src/configurations/opening-hours-slot.dto.ts +41 -41
- package/src/configurations/update-clinic-configuration.dto.ts +39 -39
- package/src/connections/whatsapp-official.dto.ts +113 -113
- package/src/conversations/conversation-contact-filters-query.validator.spec.ts +221 -221
- package/src/conversations/conversation-contact-filters-query.validator.ts +10 -10
- package/src/conversations/conversation-intention.dto.ts +24 -24
- package/src/conversations/conversation-response.dto.ts +69 -69
- package/src/conversations/conversation-session-response.dto.ts +65 -65
- package/src/conversations/conversation-type.dto.ts +15 -15
- package/src/conversations/create-conversation-session.dto.ts +28 -28
- package/src/conversations/create-conversation.dto.ts +69 -69
- package/src/conversations/followup-config-response.dto.ts +290 -290
- package/src/conversations/followup-log-response.dto.ts +58 -58
- package/src/conversations/followup-type.dto.ts +22 -22
- package/src/conversations/index.ts +17 -17
- package/src/conversations/list-conversation-contacts-filters.dto.ts +15 -15
- package/src/conversations/list-conversation-contacts-query.dto.ts +81 -81
- package/src/conversations/satisfaction-response.dto.ts +116 -116
- package/src/filters/index.ts +1 -1
- package/src/filters/parsed-filter.dto.ts +41 -41
- package/src/index.ts +23 -23
- package/src/patients/create-patient.dto.ts +122 -122
- package/src/patients/index.ts +10 -10
- package/src/patients/list-patients-filters.dto.ts +15 -15
- package/src/patients/list-patients-query.dto.ts +61 -61
- package/src/patients/patient-document-response.dto.ts +33 -33
- package/src/patients/patient-history-entry.dto.ts +22 -22
- package/src/patients/patient-status.dto.ts +9 -9
- package/src/patients/update-patient-document.dto.ts +10 -10
- package/src/patients/update-patient.dto.ts +15 -15
- package/src/payment-gateway/create-gateway-payment.dto.ts +123 -123
- package/src/payment-gateway/gateway-payment-response.dto.ts +65 -65
- package/src/payment-gateway/index.ts +12 -12
- package/src/payment-gateway/list-gateway-payments-query.dto.ts +63 -63
- package/src/payment-gateway/payment-gateway-kafka-topics.ts +25 -25
- package/src/payment-gateway/payment-gateway.enums.ts +34 -34
- package/src/payment-gateway/update-gateway-payment.dto.ts +7 -7
- package/src/payment-gateway/webhook-payload.dto.ts +32 -32
- package/src/payments/create-payment.dto.ts +73 -73
- package/src/payments/index.ts +6 -6
- package/src/payments/list-payments-query.dto.ts +44 -44
- package/src/payments/payment-response.dto.ts +67 -67
- package/src/payments/update-payment.dto.ts +4 -4
- package/src/procedures/create-procedure.dto.ts +104 -104
- package/src/procedures/index.ts +6 -6
- package/src/procedures/list-procedures-query.dto.ts +59 -59
- package/src/procedures/update-procedure.dto.ts +4 -4
- package/src/storage/delete-object-rpc.dto.ts +28 -0
- package/src/storage/index.ts +1 -0
- package/src/storage/storage-rmq-patterns.ts +3 -0
- package/src/tenants/index.ts +10 -10
- package/src/tenants/whatsapp-provider-kind.dto.ts +12 -12
- package/dist/analytics/should-skip-analytics-tenant-lookup.d.ts +0 -7
- package/dist/analytics/should-skip-analytics-tenant-lookup.d.ts.map +0 -1
- package/dist/analytics/should-skip-analytics-tenant-lookup.js +0 -13
- package/dist/appointments/opening-hours-slot.dto.d.ts +0 -6
- package/dist/appointments/opening-hours-slot.dto.d.ts.map +0 -1
- package/dist/appointments/opening-hours-slot.dto.js +0 -2
- package/dist/patients/patient-procedure.dto.d.ts +0 -9
- package/dist/patients/patient-procedure.dto.d.ts.map +0 -1
- package/dist/patients/patient-procedure.dto.js +0 -79
- package/dist/patients/update-patient-procedure.dto.d.ts +0 -6
- package/dist/patients/update-patient-procedure.dto.d.ts.map +0 -1
- package/dist/patients/update-patient-procedure.dto.js +0 -8
- package/dist/payments/payment.dto.d.ts +0 -15
- package/dist/payments/payment.dto.d.ts.map +0 -1
- package/dist/payments/payment.dto.js +0 -2
- package/dist/tenants/create-tenant.dto.d.ts +0 -10
- package/dist/tenants/create-tenant.dto.d.ts.map +0 -1
- package/dist/tenants/create-tenant.dto.js +0 -73
- package/dist/tenants/tenant-slug.util.spec.d.ts +0 -2
- package/dist/tenants/tenant-slug.util.spec.d.ts.map +0 -1
- package/dist/tenants/tenant-slug.util.spec.js +0 -102
- package/dist/tenants/update-tenant-payload.dto.d.ts +0 -6
- package/dist/tenants/update-tenant-payload.dto.d.ts.map +0 -1
- package/dist/tenants/update-tenant-payload.dto.js +0 -25
- package/dist/tenants/update-tenant.dto.d.ts +0 -10
- package/dist/tenants/update-tenant.dto.d.ts.map +0 -1
- package/dist/tenants/update-tenant.dto.js +0 -78
|
@@ -1,73 +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.CreateTenantDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
class CreateTenantDto {
|
|
16
|
-
slug;
|
|
17
|
-
dbHost;
|
|
18
|
-
dbPort;
|
|
19
|
-
dbName;
|
|
20
|
-
dbUser;
|
|
21
|
-
dbPassword;
|
|
22
|
-
status;
|
|
23
|
-
}
|
|
24
|
-
exports.CreateTenantDto = CreateTenantDto;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, swagger_1.ApiProperty)({ description: 'Identificador único do tenant na URL', example: 'acme', maxLength: 255 }),
|
|
27
|
-
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.MinLength)(1, { message: 'slug não pode ser vazio' }),
|
|
29
|
-
(0, class_validator_1.MaxLength)(255),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], CreateTenantDto.prototype, "slug", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, swagger_1.ApiProperty)({ description: 'Host do banco de dados do tenant', example: 'localhost', maxLength: 255 }),
|
|
34
|
-
(0, class_validator_1.IsString)(),
|
|
35
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbHost não pode ser vazio' }),
|
|
36
|
-
(0, class_validator_1.MaxLength)(255),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], CreateTenantDto.prototype, "dbHost", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Porta do banco de dados', example: 5432, minimum: 1, maximum: 65535, default: 5432 }),
|
|
41
|
-
(0, class_validator_1.IsOptional)(),
|
|
42
|
-
(0, class_validator_1.IsInt)(),
|
|
43
|
-
(0, class_validator_1.Min)(1),
|
|
44
|
-
(0, class_validator_1.Max)(65535),
|
|
45
|
-
__metadata("design:type", Number)
|
|
46
|
-
], CreateTenantDto.prototype, "dbPort", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, swagger_1.ApiProperty)({ description: 'Nome do banco de dados', example: 'tychat_acme', maxLength: 255 }),
|
|
49
|
-
(0, class_validator_1.IsString)(),
|
|
50
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbName não pode ser vazio' }),
|
|
51
|
-
(0, class_validator_1.MaxLength)(255),
|
|
52
|
-
__metadata("design:type", String)
|
|
53
|
-
], CreateTenantDto.prototype, "dbName", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, swagger_1.ApiProperty)({ description: 'Usuário do banco de dados', example: 'tychat_user', maxLength: 255 }),
|
|
56
|
-
(0, class_validator_1.IsString)(),
|
|
57
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbUser não pode ser vazio' }),
|
|
58
|
-
(0, class_validator_1.MaxLength)(255),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], CreateTenantDto.prototype, "dbUser", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, swagger_1.ApiProperty)({ description: 'Senha do banco de dados', example: 'secret', maxLength: 255 }),
|
|
63
|
-
(0, class_validator_1.IsString)(),
|
|
64
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbPassword não pode ser vazio' }),
|
|
65
|
-
(0, class_validator_1.MaxLength)(255),
|
|
66
|
-
__metadata("design:type", String)
|
|
67
|
-
], CreateTenantDto.prototype, "dbPassword", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Status do tenant', enum: ['active', 'inactive'], default: 'active' }),
|
|
70
|
-
(0, class_validator_1.IsOptional)(),
|
|
71
|
-
(0, class_validator_1.IsIn)(['active', 'inactive'], { message: 'status deve ser active ou inactive' }),
|
|
72
|
-
__metadata("design:type", String)
|
|
73
|
-
], CreateTenantDto.prototype, "status", void 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-slug.util.spec.d.ts","sourceRoot":"","sources":["../../src/tenants/tenant-slug.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tenant_slug_util_1 = require("./tenant-slug.util");
|
|
4
|
-
describe('slugToDomainSegment', () => {
|
|
5
|
-
it('converts underscores to hyphens', () => {
|
|
6
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('clinica_sampaio')).toBe('clinica-sampaio');
|
|
7
|
-
});
|
|
8
|
-
it('keeps single-word slugs unchanged', () => {
|
|
9
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('homolog')).toBe('homolog');
|
|
10
|
-
});
|
|
11
|
-
it('handles multiple underscores', () => {
|
|
12
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('my_big_clinic')).toBe('my-big-clinic');
|
|
13
|
-
});
|
|
14
|
-
it('lowercases the result', () => {
|
|
15
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('Homolog')).toBe('homolog');
|
|
16
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('Clinica_Sampaio')).toBe('clinica-sampaio');
|
|
17
|
-
});
|
|
18
|
-
it('returns default for empty string', () => {
|
|
19
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('')).toBe('default');
|
|
20
|
-
});
|
|
21
|
-
it('keeps numeric slugs unchanged', () => {
|
|
22
|
-
expect((0, tenant_slug_util_1.slugToDomainSegment)('tenant01')).toBe('tenant01');
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
describe('domainSegmentToSlug', () => {
|
|
26
|
-
it('converts hyphens to underscores', () => {
|
|
27
|
-
expect((0, tenant_slug_util_1.domainSegmentToSlug)('clinica-sampaio')).toBe('clinica_sampaio');
|
|
28
|
-
});
|
|
29
|
-
it('keeps single-word segments unchanged', () => {
|
|
30
|
-
expect((0, tenant_slug_util_1.domainSegmentToSlug)('homolog')).toBe('homolog');
|
|
31
|
-
});
|
|
32
|
-
it('handles multiple hyphens', () => {
|
|
33
|
-
expect((0, tenant_slug_util_1.domainSegmentToSlug)('my-big-clinic')).toBe('my_big_clinic');
|
|
34
|
-
});
|
|
35
|
-
it('lowercases the result', () => {
|
|
36
|
-
expect((0, tenant_slug_util_1.domainSegmentToSlug)('Homolog')).toBe('homolog');
|
|
37
|
-
});
|
|
38
|
-
it('returns default for empty string', () => {
|
|
39
|
-
expect((0, tenant_slug_util_1.domainSegmentToSlug)('')).toBe('default');
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
describe('round-trip slug <-> domain', () => {
|
|
43
|
-
const cases = ['homolog', 'clinica_sampaio', 'my_big_clinic', 'tenant01', 'a'];
|
|
44
|
-
it.each(cases)('slug "%s" survives round-trip', (slug) => {
|
|
45
|
-
const domain = (0, tenant_slug_util_1.slugToDomainSegment)(slug);
|
|
46
|
-
const back = (0, tenant_slug_util_1.domainSegmentToSlug)(domain);
|
|
47
|
-
expect(back).toBe(slug);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
describe('isValidTenantSlug', () => {
|
|
51
|
-
it('accepts single-word slugs', () => {
|
|
52
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('homolog')).toBe(true);
|
|
53
|
-
});
|
|
54
|
-
it('accepts underscore slugs', () => {
|
|
55
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('clinica_sampaio')).toBe(true);
|
|
56
|
-
});
|
|
57
|
-
it('accepts single char slug', () => {
|
|
58
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('a')).toBe(true);
|
|
59
|
-
});
|
|
60
|
-
it('accepts numeric slugs', () => {
|
|
61
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('tenant01')).toBe(true);
|
|
62
|
-
});
|
|
63
|
-
it('rejects hyphens', () => {
|
|
64
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('clinica-sampaio')).toBe(false);
|
|
65
|
-
});
|
|
66
|
-
it('rejects slugs starting with underscore', () => {
|
|
67
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('_invalid')).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
it('rejects slugs ending with underscore', () => {
|
|
70
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('invalid_')).toBe(false);
|
|
71
|
-
});
|
|
72
|
-
it('rejects empty string', () => {
|
|
73
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('')).toBe(false);
|
|
74
|
-
});
|
|
75
|
-
it('rejects special characters', () => {
|
|
76
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('my.clinic')).toBe(false);
|
|
77
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('my clinic')).toBe(false);
|
|
78
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)('my@clinic')).toBe(false);
|
|
79
|
-
});
|
|
80
|
-
it('rejects strings longer than 63 chars', () => {
|
|
81
|
-
const longSlug = 'a'.repeat(64);
|
|
82
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)(longSlug)).toBe(false);
|
|
83
|
-
});
|
|
84
|
-
it('accepts strings exactly 63 chars', () => {
|
|
85
|
-
const slug = 'a'.repeat(63);
|
|
86
|
-
expect((0, tenant_slug_util_1.isValidTenantSlug)(slug)).toBe(true);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
describe('TENANT_SLUG_REGEX', () => {
|
|
90
|
-
it('matches valid slugs', () => {
|
|
91
|
-
expect(tenant_slug_util_1.TENANT_SLUG_REGEX.test('homolog')).toBe(true);
|
|
92
|
-
expect(tenant_slug_util_1.TENANT_SLUG_REGEX.test('clinica_sampaio')).toBe(true);
|
|
93
|
-
expect(tenant_slug_util_1.TENANT_SLUG_REGEX.test('a1b2')).toBe(true);
|
|
94
|
-
});
|
|
95
|
-
it('does not match hyphens', () => {
|
|
96
|
-
expect(tenant_slug_util_1.TENANT_SLUG_REGEX.test('clinica-sampaio')).toBe(false);
|
|
97
|
-
});
|
|
98
|
-
it('does not match leading/trailing underscores', () => {
|
|
99
|
-
expect(tenant_slug_util_1.TENANT_SLUG_REGEX.test('_test')).toBe(false);
|
|
100
|
-
expect(tenant_slug_util_1.TENANT_SLUG_REGEX.test('test_')).toBe(false);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { UpdateTenantDto } from './update-tenant.dto';
|
|
2
|
-
/** Payload do Kafka para tenant.update: id + campos opcionais. */
|
|
3
|
-
export declare class UpdateTenantPayloadDto extends UpdateTenantDto {
|
|
4
|
-
id: number;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=update-tenant-payload.dto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-tenant-payload.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/update-tenant-payload.dto.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,kEAAkE;AAClE,qBAAa,sBAAuB,SAAQ,eAAe;IAGzD,EAAE,EAAE,MAAM,CAAC;CACZ"}
|
|
@@ -1,25 +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.UpdateTenantPayloadDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const update_tenant_dto_1 = require("./update-tenant.dto");
|
|
16
|
-
/** Payload do Kafka para tenant.update: id + campos opcionais. */
|
|
17
|
-
class UpdateTenantPayloadDto extends update_tenant_dto_1.UpdateTenantDto {
|
|
18
|
-
id;
|
|
19
|
-
}
|
|
20
|
-
exports.UpdateTenantPayloadDto = UpdateTenantPayloadDto;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, swagger_1.ApiProperty)({ description: 'ID do tenant a ser atualizado', example: 1 }),
|
|
23
|
-
(0, class_validator_1.IsInt)(),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], UpdateTenantPayloadDto.prototype, "id", void 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-tenant.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/update-tenant.dto.ts"],"names":[],"mappings":"AAYA,qBAAa,eAAe;IAM1B,IAAI,CAAC,EAAE,MAAM,CAAC;IAOd,MAAM,CAAC,EAAE,MAAM,CAAC;IAOhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAOhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAOhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAOhB,UAAU,CAAC,EAAE,MAAM,CAAC;IAKpB,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAChC"}
|
|
@@ -1,78 +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.UpdateTenantDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
class UpdateTenantDto {
|
|
16
|
-
slug;
|
|
17
|
-
dbHost;
|
|
18
|
-
dbPort;
|
|
19
|
-
dbName;
|
|
20
|
-
dbUser;
|
|
21
|
-
dbPassword;
|
|
22
|
-
status;
|
|
23
|
-
}
|
|
24
|
-
exports.UpdateTenantDto = UpdateTenantDto;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Identificador único do tenant na URL', example: 'acme', maxLength: 255 }),
|
|
27
|
-
(0, class_validator_1.IsOptional)(),
|
|
28
|
-
(0, class_validator_1.IsString)(),
|
|
29
|
-
(0, class_validator_1.MinLength)(1, { message: 'slug não pode ser vazio' }),
|
|
30
|
-
(0, class_validator_1.MaxLength)(255),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], UpdateTenantDto.prototype, "slug", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Host do banco de dados do tenant', example: 'localhost', maxLength: 255 }),
|
|
35
|
-
(0, class_validator_1.IsOptional)(),
|
|
36
|
-
(0, class_validator_1.IsString)(),
|
|
37
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbHost não pode ser vazio' }),
|
|
38
|
-
(0, class_validator_1.MaxLength)(255),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], UpdateTenantDto.prototype, "dbHost", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Porta do banco de dados', example: 5432, minimum: 1, maximum: 65535 }),
|
|
43
|
-
(0, class_validator_1.IsOptional)(),
|
|
44
|
-
(0, class_validator_1.IsInt)(),
|
|
45
|
-
(0, class_validator_1.Min)(1),
|
|
46
|
-
(0, class_validator_1.Max)(65535),
|
|
47
|
-
__metadata("design:type", Number)
|
|
48
|
-
], UpdateTenantDto.prototype, "dbPort", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Nome do banco de dados', example: 'tychat_acme', maxLength: 255 }),
|
|
51
|
-
(0, class_validator_1.IsOptional)(),
|
|
52
|
-
(0, class_validator_1.IsString)(),
|
|
53
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbName não pode ser vazio' }),
|
|
54
|
-
(0, class_validator_1.MaxLength)(255),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], UpdateTenantDto.prototype, "dbName", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Usuário do banco de dados', example: 'tychat_user', maxLength: 255 }),
|
|
59
|
-
(0, class_validator_1.IsOptional)(),
|
|
60
|
-
(0, class_validator_1.IsString)(),
|
|
61
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbUser não pode ser vazio' }),
|
|
62
|
-
(0, class_validator_1.MaxLength)(255),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], UpdateTenantDto.prototype, "dbUser", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Senha do banco de dados', example: 'secret', maxLength: 255 }),
|
|
67
|
-
(0, class_validator_1.IsOptional)(),
|
|
68
|
-
(0, class_validator_1.IsString)(),
|
|
69
|
-
(0, class_validator_1.MinLength)(1, { message: 'dbPassword não pode ser vazio' }),
|
|
70
|
-
(0, class_validator_1.MaxLength)(255),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], UpdateTenantDto.prototype, "dbPassword", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, swagger_1.ApiPropertyOptional)({ description: 'Status do tenant', enum: ['active', 'inactive'] }),
|
|
75
|
-
(0, class_validator_1.IsOptional)(),
|
|
76
|
-
(0, class_validator_1.IsIn)(['active', 'inactive'], { message: 'status deve ser active ou inactive' }),
|
|
77
|
-
__metadata("design:type", String)
|
|
78
|
-
], UpdateTenantDto.prototype, "status", void 0);
|