tychat-contracts 1.0.29 → 1.0.30

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.
@@ -1,7 +1,5 @@
1
- export declare const PAYMENT_METHODS: readonly ["PIX", "CREDIT_CARD", "DEBIT_CARD", "VOUCHER", "CASH"];
2
- export type PaymentMethodDto = (typeof PAYMENT_METHODS)[number];
3
- export declare const PAYMENT_STATUSES: readonly ["PENDING", "PAYED", "REFUNDED", "CANCELED", "OVERDUE"];
4
- export type PaymentStatusDto = (typeof PAYMENT_STATUSES)[number];
1
+ import { PaymentMethodDto } from './payment-method.dto';
2
+ import { PaymentStatusDto } from './payment-status.dto';
5
3
  export declare class CreatePaymentDto {
6
4
  method: PaymentMethodDto;
7
5
  value: number;
@@ -1 +1 @@
1
- {"version":3,"file":"create-payment.dto.d.ts","sourceRoot":"","sources":["../../src/payments/create-payment.dto.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe,kEAMlB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,kEAMnB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,qBAAa,gBAAgB;IAQ3B,MAAM,EAAE,gBAAgB,CAAC;IASzB,KAAK,EAAE,MAAM,CAAC;IAQd,SAAS,EAAE,MAAM,CAAC;IAQlB,aAAa,EAAE,MAAM,CAAC;IAQtB,OAAO,CAAC,EAAE,MAAM,CAAC;IASjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAQ1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"create-payment.dto.d.ts","sourceRoot":"","sources":["../../src/payments/create-payment.dto.ts"],"names":[],"mappings":"AAUA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,qBAAa,gBAAgB;IAQ3B,MAAM,EAAE,gBAAgB,CAAC;IASzB,KAAK,EAAE,MAAM,CAAC;IAQd,SAAS,EAAE,MAAM,CAAC;IAQlB,aAAa,EAAE,MAAM,CAAC;IAQtB,OAAO,CAAC,EAAE,MAAM,CAAC;IASjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAQ1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -9,23 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreatePaymentDto = exports.PAYMENT_STATUSES = exports.PAYMENT_METHODS = void 0;
12
+ exports.CreatePaymentDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const class_validator_1 = require("class-validator");
15
- exports.PAYMENT_METHODS = [
16
- 'PIX',
17
- 'CREDIT_CARD',
18
- 'DEBIT_CARD',
19
- 'VOUCHER',
20
- 'CASH',
21
- ];
22
- exports.PAYMENT_STATUSES = [
23
- 'PENDING',
24
- 'PAYED',
25
- 'REFUNDED',
26
- 'CANCELED',
27
- 'OVERDUE',
28
- ];
15
+ const payment_method_dto_1 = require("./payment-method.dto");
16
+ const payment_status_dto_1 = require("./payment-status.dto");
29
17
  class CreatePaymentDto {
30
18
  method;
31
19
  value;
@@ -39,10 +27,10 @@ exports.CreatePaymentDto = CreatePaymentDto;
39
27
  __decorate([
40
28
  (0, swagger_1.ApiProperty)({
41
29
  description: 'Payment method',
42
- enum: exports.PAYMENT_METHODS,
30
+ enum: payment_method_dto_1.PAYMENT_METHODS,
43
31
  example: 'PIX',
44
32
  }),
45
- (0, class_validator_1.IsEnum)(exports.PAYMENT_METHODS),
33
+ (0, class_validator_1.IsEnum)(payment_method_dto_1.PAYMENT_METHODS),
46
34
  (0, class_validator_1.IsNotEmpty)(),
47
35
  __metadata("design:type", String)
48
36
  ], CreatePaymentDto.prototype, "method", void 0);
@@ -86,11 +74,11 @@ __decorate([
86
74
  __decorate([
87
75
  (0, swagger_1.ApiPropertyOptional)({
88
76
  description: 'Payment status. Defaults to PENDING if not provided.',
89
- enum: exports.PAYMENT_STATUSES,
77
+ enum: payment_status_dto_1.PAYMENT_STATUSES,
90
78
  default: 'PENDING',
91
79
  }),
92
80
  (0, class_validator_1.IsOptional)(),
93
- (0, class_validator_1.IsEnum)(exports.PAYMENT_STATUSES),
81
+ (0, class_validator_1.IsEnum)(payment_status_dto_1.PAYMENT_STATUSES),
94
82
  __metadata("design:type", String)
95
83
  ], CreatePaymentDto.prototype, "status", void 0);
96
84
  __decorate([
@@ -2,4 +2,7 @@ export * from './create-payment.dto';
2
2
  export * from './update-payment.dto';
3
3
  export * from './list-payments-query.dto';
4
4
  export * from './payment-response.dto';
5
+ export * from './payment.dto';
6
+ export * from './payment-method.dto';
7
+ export * from './payment-status.dto';
5
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payments/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payments/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -18,3 +18,6 @@ __exportStar(require("./create-payment.dto"), exports);
18
18
  __exportStar(require("./update-payment.dto"), exports);
19
19
  __exportStar(require("./list-payments-query.dto"), exports);
20
20
  __exportStar(require("./payment-response.dto"), exports);
21
+ __exportStar(require("./payment.dto"), exports);
22
+ __exportStar(require("./payment-method.dto"), exports);
23
+ __exportStar(require("./payment-status.dto"), exports);
@@ -0,0 +1,3 @@
1
+ export declare const PAYMENT_METHODS: readonly ["PIX", "CREDIT_CARD", "DEBIT_CARD", "VOUCHER", "CASH"];
2
+ export type PaymentMethodDto = (typeof PAYMENT_METHODS)[number];
3
+ //# sourceMappingURL=payment-method.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-method.dto.d.ts","sourceRoot":"","sources":["../../src/payments/payment-method.dto.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,eAAe,kEAMlB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAYMENT_METHODS = void 0;
4
+ exports.PAYMENT_METHODS = [
5
+ 'PIX',
6
+ 'CREDIT_CARD',
7
+ 'DEBIT_CARD',
8
+ 'VOUCHER',
9
+ 'CASH',
10
+ ];
@@ -1,4 +1,5 @@
1
- import { PaymentMethodDto, PaymentStatusDto } from './create-payment.dto';
1
+ import { PaymentMethodDto } from './payment-method.dto';
2
+ import { PaymentStatusDto } from './payment-status.dto';
2
3
  export declare class PaymentResponseDto {
3
4
  id: string;
4
5
  method: PaymentMethodDto;
@@ -1 +1 @@
1
- {"version":3,"file":"payment-response.dto.d.ts","sourceRoot":"","sources":["../../src/payments/payment-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,kBAAkB;IAK7B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,gBAAgB,CAAC;IAOzB,MAAM,EAAE,gBAAgB,CAAC;IAMzB,KAAK,EAAE,MAAM,CAAC;IAMd,OAAO,EAAE,MAAM,CAAC;IAMhB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAMxB,SAAS,EAAE,MAAM,CAAC;IAMlB,SAAS,EAAE,MAAM,CAAC;IAMlB,SAAS,EAAE,MAAM,CAAC;IAMlB,aAAa,EAAE,MAAM,CAAC;CACvB"}
1
+ {"version":3,"file":"payment-response.dto.d.ts","sourceRoot":"","sources":["../../src/payments/payment-response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAoB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,qBAAa,kBAAkB;IAK7B,EAAE,EAAE,MAAM,CAAC;IAOX,MAAM,EAAE,gBAAgB,CAAC;IAOzB,MAAM,EAAE,gBAAgB,CAAC;IAMzB,KAAK,EAAE,MAAM,CAAC;IAMd,OAAO,EAAE,MAAM,CAAC;IAMhB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAMxB,SAAS,EAAE,MAAM,CAAC;IAMlB,SAAS,EAAE,MAAM,CAAC;IAMlB,SAAS,EAAE,MAAM,CAAC;IAMlB,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -11,7 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PaymentResponseDto = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
- const create_payment_dto_1 = require("./create-payment.dto");
14
+ const payment_method_dto_1 = require("./payment-method.dto");
15
+ const payment_status_dto_1 = require("./payment-status.dto");
15
16
  class PaymentResponseDto {
16
17
  id;
17
18
  method;
@@ -35,7 +36,7 @@ __decorate([
35
36
  __decorate([
36
37
  (0, swagger_1.ApiProperty)({
37
38
  description: 'Payment method',
38
- enum: create_payment_dto_1.PAYMENT_METHODS,
39
+ enum: payment_method_dto_1.PAYMENT_METHODS,
39
40
  example: 'PIX',
40
41
  }),
41
42
  __metadata("design:type", String)
@@ -43,7 +44,7 @@ __decorate([
43
44
  __decorate([
44
45
  (0, swagger_1.ApiProperty)({
45
46
  description: 'Payment status',
46
- enum: create_payment_dto_1.PAYMENT_STATUSES,
47
+ enum: payment_status_dto_1.PAYMENT_STATUSES,
47
48
  example: 'PENDING',
48
49
  }),
49
50
  __metadata("design:type", String)
@@ -0,0 +1,3 @@
1
+ export declare const PAYMENT_STATUSES: readonly ["PENDING", "PAYED", "REFUNDED", "CANCELED", "OVERDUE"];
2
+ export type PaymentStatusDto = (typeof PAYMENT_STATUSES)[number];
3
+ //# sourceMappingURL=payment-status.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-status.dto.d.ts","sourceRoot":"","sources":["../../src/payments/payment-status.dto.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,kEAMnB,CAAC;AACX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PAYMENT_STATUSES = void 0;
4
+ exports.PAYMENT_STATUSES = [
5
+ 'PENDING',
6
+ 'PAYED',
7
+ 'REFUNDED',
8
+ 'CANCELED',
9
+ 'OVERDUE',
10
+ ];
@@ -0,0 +1,15 @@
1
+ import { PaymentMethodDto } from "./payment-method.dto";
2
+ import { PaymentStatusDto } from "./payment-status.dto";
3
+ export interface PaymentDto {
4
+ id: string;
5
+ method: PaymentMethodDto;
6
+ status: PaymentStatusDto;
7
+ value: number;
8
+ dueDate: string;
9
+ payedAt: string | null;
10
+ createdAt: string;
11
+ updatedAt: string;
12
+ patientId: string;
13
+ appointmentId: string;
14
+ }
15
+ //# sourceMappingURL=payment.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment.dto.d.ts","sourceRoot":"","sources":["../../src/payments/payment.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tychat-contracts",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
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",
@@ -8,24 +8,8 @@ import {
8
8
  IsUUID,
9
9
  Min,
10
10
  } from 'class-validator';
11
-
12
- export const PAYMENT_METHODS = [
13
- 'PIX',
14
- 'CREDIT_CARD',
15
- 'DEBIT_CARD',
16
- 'VOUCHER',
17
- 'CASH',
18
- ] as const;
19
- export type PaymentMethodDto = (typeof PAYMENT_METHODS)[number];
20
-
21
- export const PAYMENT_STATUSES = [
22
- 'PENDING',
23
- 'PAYED',
24
- 'REFUNDED',
25
- 'CANCELED',
26
- 'OVERDUE',
27
- ] as const;
28
- export type PaymentStatusDto = (typeof PAYMENT_STATUSES)[number];
11
+ import { PAYMENT_METHODS, PaymentMethodDto } from './payment-method.dto';
12
+ import { PAYMENT_STATUSES, PaymentStatusDto } from './payment-status.dto';
29
13
 
30
14
  export class CreatePaymentDto {
31
15
  @ApiProperty({
@@ -2,3 +2,6 @@ export * from './create-payment.dto';
2
2
  export * from './update-payment.dto';
3
3
  export * from './list-payments-query.dto';
4
4
  export * from './payment-response.dto';
5
+ export * from './payment.dto';
6
+ export * from './payment-method.dto';
7
+ export * from './payment-status.dto';
@@ -0,0 +1,9 @@
1
+
2
+ export const PAYMENT_METHODS = [
3
+ 'PIX',
4
+ 'CREDIT_CARD',
5
+ 'DEBIT_CARD',
6
+ 'VOUCHER',
7
+ 'CASH',
8
+ ] as const;
9
+ export type PaymentMethodDto = (typeof PAYMENT_METHODS)[number];
@@ -1,10 +1,6 @@
1
1
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
- import {
3
- PAYMENT_METHODS,
4
- PAYMENT_STATUSES,
5
- PaymentMethodDto,
6
- PaymentStatusDto,
7
- } from './create-payment.dto';
2
+ import { PAYMENT_METHODS, PaymentMethodDto } from './payment-method.dto';
3
+ import { PAYMENT_STATUSES, PaymentStatusDto } from './payment-status.dto';
8
4
 
9
5
  export class PaymentResponseDto {
10
6
  @ApiProperty({
@@ -0,0 +1,9 @@
1
+
2
+ export const PAYMENT_STATUSES = [
3
+ 'PENDING',
4
+ 'PAYED',
5
+ 'REFUNDED',
6
+ 'CANCELED',
7
+ 'OVERDUE',
8
+ ] as const;
9
+ export type PaymentStatusDto = (typeof PAYMENT_STATUSES)[number];
@@ -0,0 +1,15 @@
1
+ import { PaymentMethodDto } from "./payment-method.dto";
2
+ import { PaymentStatusDto } from "./payment-status.dto";
3
+
4
+ export interface PaymentDto {
5
+ id: string;
6
+ method: PaymentMethodDto;
7
+ status: PaymentStatusDto;
8
+ value: number;
9
+ dueDate: string;
10
+ payedAt: string | null;
11
+ createdAt: string;
12
+ updatedAt: string;
13
+ patientId: string;
14
+ appointmentId: string;
15
+ }