tychat-contracts 1.6.46 → 1.6.47

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.
@@ -0,0 +1,4 @@
1
+ export declare class CancelNfeDto {
2
+ justificativa?: string;
3
+ }
4
+ //# sourceMappingURL=cancel-nfe.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-nfe.dto.d.ts","sourceRoot":"","sources":["../../src/fiscal/cancel-nfe.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IAGvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,22 @@
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.CancelNfeDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CancelNfeDto {
15
+ justificativa;
16
+ }
17
+ exports.CancelNfeDto = CancelNfeDto;
18
+ __decorate([
19
+ (0, class_validator_1.IsString)(),
20
+ (0, class_validator_1.IsOptional)(),
21
+ __metadata("design:type", String)
22
+ ], CancelNfeDto.prototype, "justificativa", void 0);
@@ -0,0 +1,5 @@
1
+ export declare class CreateCompanyDto {
2
+ cpfCnpj: string;
3
+ empresa: Record<string, unknown>;
4
+ }
5
+ //# sourceMappingURL=create-company.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-company.dto.d.ts","sourceRoot":"","sources":["../../src/fiscal/create-company.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAG3B,OAAO,EAAE,MAAM,CAAC;IAGhB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC"}
@@ -0,0 +1,27 @@
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.CreateCompanyDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateCompanyDto {
15
+ cpfCnpj;
16
+ empresa;
17
+ }
18
+ exports.CreateCompanyDto = CreateCompanyDto;
19
+ __decorate([
20
+ (0, class_validator_1.IsString)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ __metadata("design:type", String)
23
+ ], CreateCompanyDto.prototype, "cpfCnpj", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsObject)(),
26
+ __metadata("design:type", Object)
27
+ ], CreateCompanyDto.prototype, "empresa", void 0);
@@ -0,0 +1,9 @@
1
+ export declare const FISCAL_DOCUMENT_TYPES: readonly ["nfe", "nfce", "nfse"];
2
+ export type FiscalDocumentType = (typeof FISCAL_DOCUMENT_TYPES)[number];
3
+ export declare class EnqueueNfeDto {
4
+ documentType?: FiscalDocumentType;
5
+ companyCpfCnpj: string;
6
+ payload: Record<string, unknown>;
7
+ referenceId?: string;
8
+ }
9
+ //# sourceMappingURL=enqueue-nfe.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enqueue-nfe.dto.d.ts","sourceRoot":"","sources":["../../src/fiscal/enqueue-nfe.dto.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,kCAAmC,CAAC;AACtE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,qBAAa,aAAa;IAIxB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAIlC,cAAc,EAAE,MAAM,CAAC;IAGvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAIjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,41 @@
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.EnqueueNfeDto = exports.FISCAL_DOCUMENT_TYPES = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ exports.FISCAL_DOCUMENT_TYPES = ['nfe', 'nfce', 'nfse'];
15
+ class EnqueueNfeDto {
16
+ documentType;
17
+ companyCpfCnpj;
18
+ payload;
19
+ referenceId;
20
+ }
21
+ exports.EnqueueNfeDto = EnqueueNfeDto;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsIn)(exports.FISCAL_DOCUMENT_TYPES),
26
+ __metadata("design:type", String)
27
+ ], EnqueueNfeDto.prototype, "documentType", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsString)(),
30
+ (0, class_validator_1.IsNotEmpty)(),
31
+ __metadata("design:type", String)
32
+ ], EnqueueNfeDto.prototype, "companyCpfCnpj", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsObject)(),
35
+ __metadata("design:type", Object)
36
+ ], EnqueueNfeDto.prototype, "payload", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ (0, class_validator_1.IsOptional)(),
40
+ __metadata("design:type", String)
41
+ ], EnqueueNfeDto.prototype, "referenceId", void 0);
@@ -0,0 +1,5 @@
1
+ export * from './cancel-nfe.dto';
2
+ export * from './create-company.dto';
3
+ export * from './enqueue-nfe.dto';
4
+ export * from './upload-certificate.dto';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fiscal/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cancel-nfe.dto"), exports);
18
+ __exportStar(require("./create-company.dto"), exports);
19
+ __exportStar(require("./enqueue-nfe.dto"), exports);
20
+ __exportStar(require("./upload-certificate.dto"), exports);
@@ -0,0 +1,6 @@
1
+ export declare class UploadCertificateDto {
2
+ pfxBase64: string;
3
+ password: string;
4
+ fileName?: string;
5
+ }
6
+ //# sourceMappingURL=upload-certificate.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-certificate.dto.d.ts","sourceRoot":"","sources":["../../src/fiscal/upload-certificate.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,oBAAoB;IAG/B,SAAS,EAAE,MAAM,CAAC;IAIlB,QAAQ,EAAE,MAAM,CAAC;IAIjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,34 @@
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.UploadCertificateDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class UploadCertificateDto {
15
+ pfxBase64;
16
+ password;
17
+ fileName;
18
+ }
19
+ exports.UploadCertificateDto = UploadCertificateDto;
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.IsNotEmpty)(),
23
+ __metadata("design:type", String)
24
+ ], UploadCertificateDto.prototype, "pfxBase64", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsNotEmpty)(),
28
+ __metadata("design:type", String)
29
+ ], UploadCertificateDto.prototype, "password", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ (0, class_validator_1.IsOptional)(),
33
+ __metadata("design:type", String)
34
+ ], UploadCertificateDto.prototype, "fileName", void 0);
package/dist/index.d.ts CHANGED
@@ -22,4 +22,5 @@ export * from './anamneses';
22
22
  export * from './legal-terms';
23
23
  export * from './panel-rbac';
24
24
  export * from './campaigns';
25
+ export * from './fiscal';
25
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -38,3 +38,4 @@ __exportStar(require("./anamneses"), exports);
38
38
  __exportStar(require("./legal-terms"), exports);
39
39
  __exportStar(require("./panel-rbac"), exports);
40
40
  __exportStar(require("./campaigns"), exports);
41
+ __exportStar(require("./fiscal"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.6.46",
3
+ "version": "1.6.47",
4
4
  "description": "DTOs compartilhados com class-validator (API e microserviços)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,7 @@
1
+ import { IsOptional, IsString } from 'class-validator';
2
+
3
+ export class CancelNfeDto {
4
+ @IsString()
5
+ @IsOptional()
6
+ justificativa?: string;
7
+ }
@@ -0,0 +1,10 @@
1
+ import { IsNotEmpty, IsObject, IsString } from 'class-validator';
2
+
3
+ export class CreateCompanyDto {
4
+ @IsString()
5
+ @IsNotEmpty()
6
+ cpfCnpj: string;
7
+
8
+ @IsObject()
9
+ empresa: Record<string, unknown>;
10
+ }
@@ -0,0 +1,22 @@
1
+ import { IsIn, IsNotEmpty, IsObject, IsOptional, IsString } from 'class-validator';
2
+
3
+ export const FISCAL_DOCUMENT_TYPES = ['nfe', 'nfce', 'nfse'] as const;
4
+ export type FiscalDocumentType = (typeof FISCAL_DOCUMENT_TYPES)[number];
5
+
6
+ export class EnqueueNfeDto {
7
+ @IsString()
8
+ @IsOptional()
9
+ @IsIn(FISCAL_DOCUMENT_TYPES)
10
+ documentType?: FiscalDocumentType;
11
+
12
+ @IsString()
13
+ @IsNotEmpty()
14
+ companyCpfCnpj: string;
15
+
16
+ @IsObject()
17
+ payload: Record<string, unknown>;
18
+
19
+ @IsString()
20
+ @IsOptional()
21
+ referenceId?: string;
22
+ }
@@ -0,0 +1,4 @@
1
+ export * from './cancel-nfe.dto';
2
+ export * from './create-company.dto';
3
+ export * from './enqueue-nfe.dto';
4
+ export * from './upload-certificate.dto';
@@ -0,0 +1,15 @@
1
+ import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
2
+
3
+ export class UploadCertificateDto {
4
+ @IsString()
5
+ @IsNotEmpty()
6
+ pfxBase64: string;
7
+
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ password: string;
11
+
12
+ @IsString()
13
+ @IsOptional()
14
+ fileName?: string;
15
+ }
package/src/index.ts CHANGED
@@ -22,3 +22,4 @@ export * from './anamneses';
22
22
  export * from './legal-terms';
23
23
  export * from './panel-rbac';
24
24
  export * from './campaigns';
25
+ export * from './fiscal';