tychat-contracts 1.0.55 → 1.0.57
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/procedures/index.d.ts +3 -0
- package/dist/procedures/index.d.ts.map +1 -1
- package/dist/procedures/index.js +3 -0
- package/dist/procedures/paginated-procedures-response.dto.d.ts +8 -0
- package/dist/procedures/paginated-procedures-response.dto.d.ts.map +1 -0
- package/dist/procedures/paginated-procedures-response.dto.js +37 -0
- package/dist/procedures/procedure-response.dto.d.ts +22 -0
- package/dist/procedures/procedure-response.dto.d.ts.map +1 -0
- package/dist/procedures/procedure-response.dto.js +97 -0
- package/dist/procedures/specialty-embed.dto.d.ts +10 -0
- package/dist/procedures/specialty-embed.dto.d.ts.map +1 -0
- package/dist/procedures/specialty-embed.dto.js +39 -0
- package/dist/tenants/get-tenant-by-address.query.dto.d.ts +7 -0
- package/dist/tenants/get-tenant-by-address.query.dto.d.ts.map +1 -0
- package/dist/tenants/get-tenant-by-address.query.dto.js +32 -0
- package/dist/tenants/index.d.ts +2 -0
- package/dist/tenants/index.d.ts.map +1 -1
- package/dist/tenants/index.js +2 -0
- package/dist/tenants/tenant-public-by-address-response.dto.d.ts +12 -0
- package/dist/tenants/tenant-public-by-address-response.dto.d.ts.map +1 -0
- package/dist/tenants/tenant-public-by-address-response.dto.js +55 -0
- package/package.json +1 -1
- package/src/procedures/index.ts +3 -0
- package/src/procedures/paginated-procedures-response.dto.ts +16 -0
- package/src/procedures/procedure-response.dto.ts +54 -0
- package/src/procedures/specialty-embed.dto.ts +18 -0
- package/src/tenants/get-tenant-by-address.query.dto.ts +17 -0
- package/src/tenants/index.ts +2 -0
- package/src/tenants/tenant-public-by-address-response.dto.ts +32 -0
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from './create-procedure.dto';
|
|
2
2
|
export * from './update-procedure.dto';
|
|
3
3
|
export * from './list-procedures-query.dto';
|
|
4
|
+
export * from './specialty-embed.dto';
|
|
5
|
+
export * from './procedure-response.dto';
|
|
6
|
+
export * from './paginated-procedures-response.dto';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qCAAqC,CAAC"}
|
package/dist/procedures/index.js
CHANGED
|
@@ -17,3 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./create-procedure.dto"), exports);
|
|
18
18
|
__exportStar(require("./update-procedure.dto"), exports);
|
|
19
19
|
__exportStar(require("./list-procedures-query.dto"), exports);
|
|
20
|
+
__exportStar(require("./specialty-embed.dto"), exports);
|
|
21
|
+
__exportStar(require("./procedure-response.dto"), exports);
|
|
22
|
+
__exportStar(require("./paginated-procedures-response.dto"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProcedureResponseDto } from './procedure-response.dto';
|
|
2
|
+
export declare class PaginatedProceduresResponseDto {
|
|
3
|
+
items: ProcedureResponseDto[];
|
|
4
|
+
total: number;
|
|
5
|
+
page: number;
|
|
6
|
+
limit: number;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=paginated-procedures-response.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginated-procedures-response.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/paginated-procedures-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAAa,8BAA8B;IAEzC,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAG9B,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.PaginatedProceduresResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const procedure_response_dto_1 = require("./procedure-response.dto");
|
|
15
|
+
class PaginatedProceduresResponseDto {
|
|
16
|
+
items;
|
|
17
|
+
total;
|
|
18
|
+
page;
|
|
19
|
+
limit;
|
|
20
|
+
}
|
|
21
|
+
exports.PaginatedProceduresResponseDto = PaginatedProceduresResponseDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({ type: [procedure_response_dto_1.ProcedureResponseDto] }),
|
|
24
|
+
__metadata("design:type", Array)
|
|
25
|
+
], PaginatedProceduresResponseDto.prototype, "items", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], PaginatedProceduresResponseDto.prototype, "total", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)(),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], PaginatedProceduresResponseDto.prototype, "page", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)(),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], PaginatedProceduresResponseDto.prototype, "limit", void 0);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SpecialtyEmbedDto } from './specialty-embed.dto';
|
|
2
|
+
/**
|
|
3
|
+
* Procedimento como retornado pela API (inclui especialidade carregada).
|
|
4
|
+
*/
|
|
5
|
+
export declare class ProcedureResponseDto {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
category: string | null;
|
|
9
|
+
description: string | null;
|
|
10
|
+
blockTime: number | null;
|
|
11
|
+
defaultValue: number | null;
|
|
12
|
+
returnDays: number | null;
|
|
13
|
+
value: number;
|
|
14
|
+
duration: number;
|
|
15
|
+
side_effects: string | null;
|
|
16
|
+
specialtyId?: string;
|
|
17
|
+
specialty: SpecialtyEmbedDto;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
20
|
+
deletedAt: Date | null;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=procedure-response.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedure-response.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/procedure-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D;;GAEG;AACH,qBAAa,oBAAoB;IAE/B,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,EAAE,MAAM,CAAC;IAGjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAK5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAE,iBAAiB,CAAC;IAG7B,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,CAAC;IAGhB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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.ProcedureResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const specialty_embed_dto_1 = require("./specialty-embed.dto");
|
|
15
|
+
/**
|
|
16
|
+
* Procedimento como retornado pela API (inclui especialidade carregada).
|
|
17
|
+
*/
|
|
18
|
+
class ProcedureResponseDto {
|
|
19
|
+
id;
|
|
20
|
+
name;
|
|
21
|
+
category;
|
|
22
|
+
description;
|
|
23
|
+
blockTime;
|
|
24
|
+
defaultValue;
|
|
25
|
+
returnDays;
|
|
26
|
+
value;
|
|
27
|
+
duration;
|
|
28
|
+
side_effects;
|
|
29
|
+
specialtyId;
|
|
30
|
+
specialty;
|
|
31
|
+
createdAt;
|
|
32
|
+
updatedAt;
|
|
33
|
+
deletedAt;
|
|
34
|
+
}
|
|
35
|
+
exports.ProcedureResponseDto = ProcedureResponseDto;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ format: 'uuid' }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], ProcedureResponseDto.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, swagger_1.ApiProperty)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ProcedureResponseDto.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], ProcedureResponseDto.prototype, "category", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], ProcedureResponseDto.prototype, "description", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], ProcedureResponseDto.prototype, "blockTime", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], ProcedureResponseDto.prototype, "defaultValue", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], ProcedureResponseDto.prototype, "returnDays", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, swagger_1.ApiProperty)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], ProcedureResponseDto.prototype, "value", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, swagger_1.ApiProperty)(),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], ProcedureResponseDto.prototype, "duration", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
74
|
+
__metadata("design:type", Object)
|
|
75
|
+
], ProcedureResponseDto.prototype, "side_effects", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
78
|
+
description: 'ID da especialidade (espelho de specialty.id quando carregado)',
|
|
79
|
+
}),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], ProcedureResponseDto.prototype, "specialtyId", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, swagger_1.ApiProperty)({ type: () => specialty_embed_dto_1.SpecialtyEmbedDto }),
|
|
84
|
+
__metadata("design:type", specialty_embed_dto_1.SpecialtyEmbedDto)
|
|
85
|
+
], ProcedureResponseDto.prototype, "specialty", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, swagger_1.ApiProperty)(),
|
|
88
|
+
__metadata("design:type", Date)
|
|
89
|
+
], ProcedureResponseDto.prototype, "createdAt", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, swagger_1.ApiProperty)(),
|
|
92
|
+
__metadata("design:type", Date)
|
|
93
|
+
], ProcedureResponseDto.prototype, "updatedAt", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], ProcedureResponseDto.prototype, "deletedAt", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Especialidade embutida na resposta de procedimento (relacionamento carregado).
|
|
3
|
+
*/
|
|
4
|
+
export declare class SpecialtyEmbedDto {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
createdAt?: Date;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=specialty-embed.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specialty-embed.dto.d.ts","sourceRoot":"","sources":["../../src/procedures/specialty-embed.dto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,iBAAiB;IAE5B,EAAE,EAAE,MAAM,CAAC;IAGX,IAAI,EAAE,MAAM,CAAC;IAGb,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.SpecialtyEmbedDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
/**
|
|
15
|
+
* Especialidade embutida na resposta de procedimento (relacionamento carregado).
|
|
16
|
+
*/
|
|
17
|
+
class SpecialtyEmbedDto {
|
|
18
|
+
id;
|
|
19
|
+
name;
|
|
20
|
+
createdAt;
|
|
21
|
+
updatedAt;
|
|
22
|
+
}
|
|
23
|
+
exports.SpecialtyEmbedDto = SpecialtyEmbedDto;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({ description: 'ID da especialidade (UUID)', format: 'uuid' }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], SpecialtyEmbedDto.prototype, "id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ description: 'Nome da especialidade', example: 'Cardiologia' }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], SpecialtyEmbedDto.prototype, "name", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
34
|
+
__metadata("design:type", Date)
|
|
35
|
+
], SpecialtyEmbedDto.prototype, "createdAt", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], SpecialtyEmbedDto.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-tenant-by-address.query.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/get-tenant-by-address.query.dto.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,0BAA0B;IASrC,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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.GetTenantByAddressQueryDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Query for GET /get-tenant — public lookup by frontend host/URL.
|
|
17
|
+
*/
|
|
18
|
+
class GetTenantByAddressQueryDto {
|
|
19
|
+
address;
|
|
20
|
+
}
|
|
21
|
+
exports.GetTenantByAddressQueryDto = GetTenantByAddressQueryDto;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, swagger_1.ApiProperty)({
|
|
24
|
+
description: 'Hostname or full URL of the tenant frontend (e.g. clinic.tychat.app or https://clinic.tychat.app/)',
|
|
25
|
+
example: 'https://acme.tychat.app',
|
|
26
|
+
maxLength: 2048,
|
|
27
|
+
}),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
+
(0, class_validator_1.MaxLength)(2048),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], GetTenantByAddressQueryDto.prototype, "address", void 0);
|
package/dist/tenants/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tenants/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC"}
|
package/dist/tenants/index.js
CHANGED
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./update-tenant-environment-url.dto"), exports);
|
|
18
|
+
__exportStar(require("./get-tenant-by-address.query.dto"), exports);
|
|
19
|
+
__exportStar(require("./tenant-public-by-address-response.dto"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public tenant payload returned by GET /get-tenant (no auth).
|
|
3
|
+
*/
|
|
4
|
+
export declare class TenantPublicByAddressResponseDto {
|
|
5
|
+
name: string;
|
|
6
|
+
cnpj: string;
|
|
7
|
+
location: string | null;
|
|
8
|
+
status: 'active' | 'inactive';
|
|
9
|
+
dokploy_frontend_host: string;
|
|
10
|
+
dokploy_backend_host: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=tenant-public-by-address-response.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-public-by-address-response.dto.d.ts","sourceRoot":"","sources":["../../src/tenants/tenant-public-by-address-response.dto.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,gCAAgC;IAE3C,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAO9B,qBAAqB,EAAE,MAAM,CAAC;IAO9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.TenantPublicByAddressResponseDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
/**
|
|
15
|
+
* Public tenant payload returned by GET /get-tenant (no auth).
|
|
16
|
+
*/
|
|
17
|
+
class TenantPublicByAddressResponseDto {
|
|
18
|
+
name;
|
|
19
|
+
cnpj;
|
|
20
|
+
location;
|
|
21
|
+
status;
|
|
22
|
+
dokploy_frontend_host;
|
|
23
|
+
dokploy_backend_host;
|
|
24
|
+
}
|
|
25
|
+
exports.TenantPublicByAddressResponseDto = TenantPublicByAddressResponseDto;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ example: 'Clínica Exemplo' }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], TenantPublicByAddressResponseDto.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, swagger_1.ApiProperty)({ example: '12345678000199' }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], TenantPublicByAddressResponseDto.prototype, "cnpj", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, description: 'Location / address summary' }),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], TenantPublicByAddressResponseDto.prototype, "location", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({ enum: ['active', 'inactive'] }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], TenantPublicByAddressResponseDto.prototype, "status", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({
|
|
44
|
+
description: 'Effective frontend hostname (custom dokploy_frontend_host or default slug.tychat.app)',
|
|
45
|
+
example: 'acme.tychat.app',
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], TenantPublicByAddressResponseDto.prototype, "dokploy_frontend_host", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, swagger_1.ApiProperty)({
|
|
51
|
+
description: 'Effective backend hostname (custom dokploy_backend_host or default slug-backend.tychat.app)',
|
|
52
|
+
example: 'acme-backend.tychat.app',
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], TenantPublicByAddressResponseDto.prototype, "dokploy_backend_host", void 0);
|
package/package.json
CHANGED
package/src/procedures/index.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { ProcedureResponseDto } from './procedure-response.dto';
|
|
3
|
+
|
|
4
|
+
export class PaginatedProceduresResponseDto {
|
|
5
|
+
@ApiProperty({ type: [ProcedureResponseDto] })
|
|
6
|
+
items: ProcedureResponseDto[];
|
|
7
|
+
|
|
8
|
+
@ApiProperty()
|
|
9
|
+
total: number;
|
|
10
|
+
|
|
11
|
+
@ApiProperty()
|
|
12
|
+
page: number;
|
|
13
|
+
|
|
14
|
+
@ApiProperty()
|
|
15
|
+
limit: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
import { SpecialtyEmbedDto } from './specialty-embed.dto';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Procedimento como retornado pela API (inclui especialidade carregada).
|
|
6
|
+
*/
|
|
7
|
+
export class ProcedureResponseDto {
|
|
8
|
+
@ApiProperty({ format: 'uuid' })
|
|
9
|
+
id: string;
|
|
10
|
+
|
|
11
|
+
@ApiProperty()
|
|
12
|
+
name: string;
|
|
13
|
+
|
|
14
|
+
@ApiPropertyOptional({ nullable: true })
|
|
15
|
+
category: string | null;
|
|
16
|
+
|
|
17
|
+
@ApiPropertyOptional({ nullable: true })
|
|
18
|
+
description: string | null;
|
|
19
|
+
|
|
20
|
+
@ApiPropertyOptional({ nullable: true })
|
|
21
|
+
blockTime: number | null;
|
|
22
|
+
|
|
23
|
+
@ApiPropertyOptional({ nullable: true })
|
|
24
|
+
defaultValue: number | null;
|
|
25
|
+
|
|
26
|
+
@ApiPropertyOptional({ nullable: true })
|
|
27
|
+
returnDays: number | null;
|
|
28
|
+
|
|
29
|
+
@ApiProperty()
|
|
30
|
+
value: number;
|
|
31
|
+
|
|
32
|
+
@ApiProperty()
|
|
33
|
+
duration: number;
|
|
34
|
+
|
|
35
|
+
@ApiPropertyOptional({ nullable: true })
|
|
36
|
+
side_effects: string | null;
|
|
37
|
+
|
|
38
|
+
@ApiPropertyOptional({
|
|
39
|
+
description: 'ID da especialidade (espelho de specialty.id quando carregado)',
|
|
40
|
+
})
|
|
41
|
+
specialtyId?: string;
|
|
42
|
+
|
|
43
|
+
@ApiProperty({ type: () => SpecialtyEmbedDto })
|
|
44
|
+
specialty: SpecialtyEmbedDto;
|
|
45
|
+
|
|
46
|
+
@ApiProperty()
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
|
|
49
|
+
@ApiProperty()
|
|
50
|
+
updatedAt: Date;
|
|
51
|
+
|
|
52
|
+
@ApiPropertyOptional({ nullable: true })
|
|
53
|
+
deletedAt: Date | null;
|
|
54
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Especialidade embutida na resposta de procedimento (relacionamento carregado).
|
|
5
|
+
*/
|
|
6
|
+
export class SpecialtyEmbedDto {
|
|
7
|
+
@ApiProperty({ description: 'ID da especialidade (UUID)', format: 'uuid' })
|
|
8
|
+
id: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty({ description: 'Nome da especialidade', example: 'Cardiologia' })
|
|
11
|
+
name: string;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
createdAt?: Date;
|
|
15
|
+
|
|
16
|
+
@ApiPropertyOptional()
|
|
17
|
+
updatedAt?: Date;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Query for GET /get-tenant — public lookup by frontend host/URL.
|
|
6
|
+
*/
|
|
7
|
+
export class GetTenantByAddressQueryDto {
|
|
8
|
+
@ApiProperty({
|
|
9
|
+
description: 'Hostname or full URL of the tenant frontend (e.g. clinic.tychat.app or https://clinic.tychat.app/)',
|
|
10
|
+
example: 'https://acme.tychat.app',
|
|
11
|
+
maxLength: 2048,
|
|
12
|
+
})
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsNotEmpty()
|
|
15
|
+
@MaxLength(2048)
|
|
16
|
+
address: string;
|
|
17
|
+
}
|
package/src/tenants/index.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public tenant payload returned by GET /get-tenant (no auth).
|
|
5
|
+
*/
|
|
6
|
+
export class TenantPublicByAddressResponseDto {
|
|
7
|
+
@ApiProperty({ example: 'Clínica Exemplo' })
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty({ example: '12345678000199' })
|
|
11
|
+
cnpj: string;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional({ nullable: true, description: 'Location / address summary' })
|
|
14
|
+
location: string | null;
|
|
15
|
+
|
|
16
|
+
@ApiProperty({ enum: ['active', 'inactive'] })
|
|
17
|
+
status: 'active' | 'inactive';
|
|
18
|
+
|
|
19
|
+
@ApiProperty({
|
|
20
|
+
description:
|
|
21
|
+
'Effective frontend hostname (custom dokploy_frontend_host or default slug.tychat.app)',
|
|
22
|
+
example: 'acme.tychat.app',
|
|
23
|
+
})
|
|
24
|
+
dokploy_frontend_host: string;
|
|
25
|
+
|
|
26
|
+
@ApiProperty({
|
|
27
|
+
description:
|
|
28
|
+
'Effective backend hostname (custom dokploy_backend_host or default slug-backend.tychat.app)',
|
|
29
|
+
example: 'acme-backend.tychat.app',
|
|
30
|
+
})
|
|
31
|
+
dokploy_backend_host: string;
|
|
32
|
+
}
|