tychat-contracts 1.0.55 → 1.0.56
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/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/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
|
@@ -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
|
@@ -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
|
+
}
|