@postpaybr/protos 1.1.14 → 1.1.17

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.
Files changed (68) hide show
  1. package/dist/typescript/account-entry.d.ts +5 -5
  2. package/dist/typescript/account-entry.js +9 -9
  3. package/dist/typescript/admin-card-verification.d.ts +15 -14
  4. package/dist/typescript/admin-card-verification.js +9 -9
  5. package/dist/typescript/administrator.d.ts +10 -8
  6. package/dist/typescript/administrator.js +18 -18
  7. package/dist/typescript/anticipation.d.ts +8 -7
  8. package/dist/typescript/anticipation.js +11 -11
  9. package/dist/typescript/bank-account.d.ts +3 -3
  10. package/dist/typescript/bank-account.js +10 -10
  11. package/dist/typescript/card.d.ts +6 -5
  12. package/dist/typescript/card.js +14 -14
  13. package/dist/typescript/charge-schedule.d.ts +1 -1
  14. package/dist/typescript/charge.d.ts +48 -70
  15. package/dist/typescript/charge.js +36 -36
  16. package/dist/typescript/common.d.ts +35 -18
  17. package/dist/typescript/common.js +2 -2
  18. package/dist/typescript/context.d.ts +9 -7
  19. package/dist/typescript/context.js +13 -14
  20. package/dist/typescript/customer.d.ts +8 -8
  21. package/dist/typescript/customer.js +19 -19
  22. package/dist/typescript/daily-balance.d.ts +5 -5
  23. package/dist/typescript/daily-balance.js +6 -6
  24. package/dist/typescript/document-verification.d.ts +21 -20
  25. package/dist/typescript/document-verification.js +11 -11
  26. package/dist/typescript/email.d.ts +2 -2
  27. package/dist/typescript/email.js +11 -11
  28. package/dist/typescript/fee.d.ts +6 -6
  29. package/dist/typescript/fee.js +9 -9
  30. package/dist/typescript/notification.d.ts +42 -40
  31. package/dist/typescript/notification.js +16 -16
  32. package/dist/typescript/order.d.ts +24 -23
  33. package/dist/typescript/order.js +15 -15
  34. package/dist/typescript/payable.d.ts +33 -35
  35. package/dist/typescript/payable.js +18 -18
  36. package/dist/typescript/payment-calculator.d.ts +6 -5
  37. package/dist/typescript/payment-calculator.js +10 -10
  38. package/dist/typescript/payment-card.d.ts +14 -16
  39. package/dist/typescript/payment-card.js +10 -6
  40. package/dist/typescript/payment-gateway.d.ts +11 -9
  41. package/dist/typescript/payment-gateway.js +12 -12
  42. package/dist/typescript/payment-pix.d.ts +4 -3
  43. package/dist/typescript/payment-pix.js +6 -6
  44. package/dist/typescript/receipt.d.ts +15 -29
  45. package/dist/typescript/receipt.js +14 -14
  46. package/dist/typescript/recipient-payment-gateway.d.ts +14 -12
  47. package/dist/typescript/recipient-payment-gateway.js +11 -11
  48. package/dist/typescript/recipient.d.ts +21 -19
  49. package/dist/typescript/recipient.js +17 -17
  50. package/dist/typescript/role.d.ts +5 -3
  51. package/dist/typescript/role.js +11 -11
  52. package/dist/typescript/tax.d.ts +33 -61
  53. package/dist/typescript/tax.js +17 -17
  54. package/dist/typescript/transfer.d.ts +21 -19
  55. package/dist/typescript/transfer.js +6 -7
  56. package/dist/typescript/two-factor.d.ts +8 -7
  57. package/dist/typescript/two-factor.js +11 -11
  58. package/dist/typescript/user.d.ts +13 -14
  59. package/dist/typescript/user.js +22 -22
  60. package/package.json +1 -1
  61. package/src/protos/charge.proto +4 -33
  62. package/src/protos/common.proto +12 -0
  63. package/src/protos/context.proto +1 -1
  64. package/src/protos/customer.proto +1 -1
  65. package/src/protos/payable.proto +5 -6
  66. package/src/protos/receipt.proto +7 -21
  67. package/src/protos/tax.proto +6 -40
  68. package/src/protos/user.proto +3 -4
@@ -1,19 +1,20 @@
1
- import { Observable } from "rxjs";
2
- import { DateFilter, PaginationFilter, Void } from "./common";
1
+ import { Observable } from 'rxjs';
2
+ import { DateFilter, PaginationFilter, Void } from './common';
3
+ import { OrderStatus, OrderType, PaymentMethods } from '@postpaybr/contracts/types';
3
4
  export declare const protobufPackage = "order";
4
5
  export interface CreateOrderRequest {
5
6
  customerId: string;
6
7
  totalAmount: number;
7
- orderType: string;
8
+ orderType: OrderType;
8
9
  }
9
10
  export interface GetOrderByIdRequest {
10
11
  id: string;
11
- orderType?: string | undefined;
12
+ orderType?: OrderType | undefined;
12
13
  }
13
14
  export interface GetAllOrdersRequest {
14
15
  recipientId?: string | undefined;
15
- statuses: string[];
16
- orderType?: string | undefined;
16
+ statuses?: OrderStatus[] | undefined;
17
+ orderType?: OrderType | undefined;
17
18
  pagination: PaginationFilter | undefined;
18
19
  date: DateFilter | undefined;
19
20
  }
@@ -24,11 +25,11 @@ export interface GetAllOrdersResponse {
24
25
  export interface CreateOrderItemsRequest {
25
26
  order: Order | undefined;
26
27
  taxIds: string[];
27
- orderType: string;
28
+ orderType: OrderType;
28
29
  }
29
30
  export interface GetReceiptsByOrderIdRequest {
30
31
  orderId: string;
31
- orderType: string;
32
+ orderType: OrderType;
32
33
  }
33
34
  export interface GetReceiptsByOrderIdResponse {
34
35
  receipts: ReceiptEntity[];
@@ -36,7 +37,7 @@ export interface GetReceiptsByOrderIdResponse {
36
37
  export interface updateOrderStatusRequest {
37
38
  orderId: string;
38
39
  orderStatus: string;
39
- orderType: string;
40
+ orderType: OrderType;
40
41
  }
41
42
  export interface HealthCheckRequest {
42
43
  }
@@ -53,9 +54,9 @@ export interface HealthCheckResponse_DetailsEntry {
53
54
  export interface Order {
54
55
  id: string;
55
56
  totalAmount: number;
56
- status: string;
57
- createdAt: string;
58
- updatedAt: string;
57
+ status: OrderStatus;
58
+ createdAt: Date;
59
+ updatedAt: Date;
59
60
  chargeIds: string[];
60
61
  customerId: string;
61
62
  items: OrderItem[];
@@ -65,9 +66,9 @@ export interface Order {
65
66
  export interface OrderSchedule {
66
67
  id: string;
67
68
  totalAmount: number;
68
- status: string;
69
- createdAt: string;
70
- updatedAt: string;
69
+ status: OrderStatus;
70
+ createdAt: Date;
71
+ updatedAt: Date;
71
72
  chargeIds: string[];
72
73
  customerId: string;
73
74
  items: OrderItem[];
@@ -86,7 +87,7 @@ export interface ReceiptEntity {
86
87
  amount: number;
87
88
  protocol: string;
88
89
  txid?: string | undefined;
89
- createdAt: string;
90
+ createdAt: Date;
90
91
  }
91
92
  export interface GetOrderCustomerNameResponse {
92
93
  customerName: string;
@@ -94,20 +95,20 @@ export interface GetOrderCustomerNameResponse {
94
95
  export interface updateOrderWithChargeIdRequest {
95
96
  orderId: string;
96
97
  chargeId: string;
97
- orderType: string;
98
+ orderType: OrderType;
98
99
  }
99
100
  export interface UpdateOrderAmountAndStatusRequest {
100
101
  id: string;
101
- orderType: string;
102
+ orderType: OrderType;
102
103
  totalAmount: number;
103
- status?: string | undefined;
104
+ status?: OrderStatus | undefined;
104
105
  }
105
106
  export interface OrderDetail {
106
107
  id: string;
107
108
  totalAmount: number;
108
109
  status: string;
109
- createdAt: string;
110
- updatedAt: string;
110
+ createdAt: Date;
111
+ updatedAt: Date;
111
112
  chargeIds: string[];
112
113
  customerId: string;
113
114
  type: string;
@@ -115,8 +116,8 @@ export interface OrderDetail {
115
116
  export interface OrderPayments {
116
117
  totalPaid: number;
117
118
  totalPending: number;
118
- nextPaymentDate?: string | undefined;
119
- paymentMethod?: string | undefined;
119
+ nextPaymentDate?: Date | undefined;
120
+ paymentMethod?: PaymentMethods | undefined;
120
121
  customerName: string;
121
122
  }
122
123
  export interface DetailedTax {
@@ -9,31 +9,31 @@ exports.ORDER_SERVICE_NAME = exports.ORDER_PACKAGE_NAME = exports.protobufPackag
9
9
  exports.OrderServiceControllerMethods = OrderServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "order";
13
- exports.ORDER_PACKAGE_NAME = "order";
12
+ exports.protobufPackage = 'order';
13
+ exports.ORDER_PACKAGE_NAME = 'order';
14
14
  function OrderServiceControllerMethods() {
15
15
  return function (constructor) {
16
16
  const grpcMethods = [
17
- "createOrder",
18
- "getOrderById",
19
- "getAllOrders",
20
- "createOrderItems",
21
- "getReceiptsByOrderId",
22
- "updateOrderStatus",
23
- "getOrderCustomerName",
24
- "updateOrderWithChargeId",
25
- "updateOrderAmountAndStatus",
26
- "getDetailedOrder",
17
+ 'createOrder',
18
+ 'getOrderById',
19
+ 'getAllOrders',
20
+ 'createOrderItems',
21
+ 'getReceiptsByOrderId',
22
+ 'updateOrderStatus',
23
+ 'getOrderCustomerName',
24
+ 'updateOrderWithChargeId',
25
+ 'updateOrderAmountAndStatus',
26
+ 'getDetailedOrder',
27
27
  ];
28
28
  for (const method of grpcMethods) {
29
29
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
30
- (0, microservices_1.GrpcMethod)("OrderService", method)(constructor.prototype[method], method, descriptor);
30
+ (0, microservices_1.GrpcMethod)('OrderService', method)(constructor.prototype[method], method, descriptor);
31
31
  }
32
32
  const grpcStreamMethods = [];
33
33
  for (const method of grpcStreamMethods) {
34
34
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
35
- (0, microservices_1.GrpcStreamMethod)("OrderService", method)(constructor.prototype[method], method, descriptor);
35
+ (0, microservices_1.GrpcStreamMethod)('OrderService', method)(constructor.prototype[method], method, descriptor);
36
36
  }
37
37
  };
38
38
  }
39
- exports.ORDER_SERVICE_NAME = "OrderService";
39
+ exports.ORDER_SERVICE_NAME = 'OrderService';
@@ -1,4 +1,6 @@
1
- import { Observable } from "rxjs";
1
+ import { Observable } from 'rxjs';
2
+ import { DateFilter } from './common';
3
+ import { AnticipationStatus, ChargeStatus, PayableStatus, PaymentMethods } from '@postpaybr/contracts/types';
2
4
  export declare const protobufPackage = "payable";
3
5
  export interface CreatePayableRequest {
4
6
  amount: number;
@@ -6,7 +8,7 @@ export interface CreatePayableRequest {
6
8
  recipientId: string;
7
9
  installment: number;
8
10
  dueAt: string;
9
- status: string;
11
+ status: PayableStatus;
10
12
  }
11
13
  export interface PayableResponse {
12
14
  payable: Payable | undefined;
@@ -21,26 +23,26 @@ export interface Payable {
21
23
  id: string;
22
24
  amount: number;
23
25
  installment: number;
24
- status: string;
26
+ status: PayableStatus;
25
27
  dueAt: string;
26
- createdAt: string;
28
+ createdAt: Date;
27
29
  isAnticipated: boolean;
28
- anticipation: Anticipation | undefined;
30
+ anticipation?: Anticipation | undefined;
29
31
  chargeId?: string | undefined;
30
32
  recipientId?: string | undefined;
31
- processedAt?: string | undefined;
33
+ processedAt?: Date | undefined;
32
34
  }
33
35
  export interface Anticipation {
34
36
  id: string;
35
- createdAt: string;
37
+ createdAt: Date;
36
38
  }
37
39
  export interface GetPayableByIdRequest {
38
40
  payableId: string;
39
41
  }
40
42
  export interface GetPayablesByRecipientIdRequest {
41
43
  recipientId: string;
42
- startDate?: string | undefined;
43
- endDate?: string | undefined;
44
+ startDate?: Date | undefined;
45
+ endDate?: Date | undefined;
44
46
  }
45
47
  export interface GetPayablesByRecipientIdResponse {
46
48
  payables: RecipientPayable[];
@@ -50,7 +52,7 @@ export interface RecipientPayable {
50
52
  installment: number;
51
53
  installmentNumber: number;
52
54
  dueAt: string;
53
- paymentMethod: string;
55
+ paymentMethod: PaymentMethods;
54
56
  amount: number;
55
57
  fee: number;
56
58
  netAmount: number;
@@ -59,7 +61,7 @@ export interface RecipientPayable {
59
61
  }
60
62
  export interface UpdatePayablesStatusRequest {
61
63
  payableIds: string[];
62
- status: string;
64
+ status: PayableStatus;
63
65
  }
64
66
  export interface UpdatePayablesStatusResponse {
65
67
  affected: number;
@@ -86,16 +88,12 @@ export interface GetAllPayablesRequest {
86
88
  }
87
89
  export interface GetAllPayablesData {
88
90
  recipientId?: string | undefined;
89
- statuses: string[];
91
+ statuses?: PayableStatus[] | undefined;
90
92
  isAnticipated?: boolean | undefined;
91
93
  }
92
94
  export interface PaginationFilter {
93
- limit: number;
94
- offset: number;
95
- }
96
- export interface DateFilter {
97
- startDate?: string | undefined;
98
- endDate?: string | undefined;
95
+ limit?: number | undefined;
96
+ offset?: number | undefined;
99
97
  }
100
98
  export interface GetAllPayablesResponse {
101
99
  payables: PayableWithDetails[];
@@ -107,13 +105,13 @@ export interface PayableWithDetails {
107
105
  installment: number;
108
106
  totalInstallments?: number | undefined;
109
107
  dueDate: string;
110
- paymentMethod?: string | undefined;
108
+ paymentMethod?: PaymentMethods | undefined;
111
109
  amount: number;
112
110
  fee?: number | undefined;
113
- status: string;
111
+ status: PayableStatus;
114
112
  isAnticipated: boolean;
115
- createdAt: string;
116
- processedAt?: string | undefined;
113
+ createdAt: Date;
114
+ processedAt?: Date | undefined;
117
115
  anticipation?: Anticipation | undefined;
118
116
  transfer?: Transfer | undefined;
119
117
  chargeId: string;
@@ -121,13 +119,13 @@ export interface PayableWithDetails {
121
119
  }
122
120
  export interface Transfer {
123
121
  id: string;
124
- status: string;
125
- createdAt: string;
122
+ status: ChargeStatus;
123
+ createdAt: Date;
126
124
  }
127
125
  export interface GetPayablesSummaryRequest {
128
126
  recipientId: string;
129
- startDate?: string | undefined;
130
- endDate?: string | undefined;
127
+ startDate?: Date | undefined;
128
+ endDate?: Date | undefined;
131
129
  }
132
130
  export interface GetPayablesSummaryResponse {
133
131
  summary: PayablesSummary | undefined;
@@ -162,27 +160,27 @@ export interface AnticipationDetails {
162
160
  baseFee: number;
163
161
  feePercentage: number;
164
162
  anticipatedDays: number;
165
- status: string;
163
+ status: AnticipationStatus;
166
164
  externalId: string;
167
- createdAt: string;
168
- updatedAt: string;
165
+ createdAt: Date;
166
+ updatedAt: Date;
169
167
  }
170
168
  export interface TransferDetails {
171
169
  id: string;
172
170
  amount: number;
173
- status: string;
171
+ status: ChargeStatus;
174
172
  description: string;
175
- createdAt: string;
176
- processedAt?: string | undefined;
173
+ createdAt: Date;
174
+ processedAt?: Date | undefined;
177
175
  }
178
176
  export interface ChargeDetails {
179
177
  id: string;
180
178
  amount: number;
181
179
  fee: number;
182
180
  installmentNumber: number;
183
- paymentMethod: string;
184
- status: string;
185
- createdAt: string;
181
+ paymentMethod: PaymentMethods;
182
+ status: PayableStatus;
183
+ createdAt: Date;
186
184
  }
187
185
  export interface ForceTransferRequest {
188
186
  payableId: string;
@@ -9,34 +9,34 @@ exports.PAYABLE_SERVICE_NAME = exports.PAYABLE_PACKAGE_NAME = exports.protobufPa
9
9
  exports.PayableServiceControllerMethods = PayableServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "payable";
13
- exports.PAYABLE_PACKAGE_NAME = "payable";
12
+ exports.protobufPackage = 'payable';
13
+ exports.PAYABLE_PACKAGE_NAME = 'payable';
14
14
  function PayableServiceControllerMethods() {
15
15
  return function (constructor) {
16
16
  const grpcMethods = [
17
- "createPayable",
18
- "getPayablesByChargeId",
19
- "getPayableById",
20
- "getPayablesByRecipientId",
21
- "updatePayablesStatus",
22
- "getPayablesAvailableForAnticipation",
23
- "markPayableAsAnticipated",
24
- "deletePayable",
25
- "getAllPayables",
26
- "getPayablesSummary",
27
- "getPayableDetails",
28
- "forceTransfer",
29
- "forceAnticipation",
17
+ 'createPayable',
18
+ 'getPayablesByChargeId',
19
+ 'getPayableById',
20
+ 'getPayablesByRecipientId',
21
+ 'updatePayablesStatus',
22
+ 'getPayablesAvailableForAnticipation',
23
+ 'markPayableAsAnticipated',
24
+ 'deletePayable',
25
+ 'getAllPayables',
26
+ 'getPayablesSummary',
27
+ 'getPayableDetails',
28
+ 'forceTransfer',
29
+ 'forceAnticipation',
30
30
  ];
31
31
  for (const method of grpcMethods) {
32
32
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
33
- (0, microservices_1.GrpcMethod)("PayableService", method)(constructor.prototype[method], method, descriptor);
33
+ (0, microservices_1.GrpcMethod)('PayableService', method)(constructor.prototype[method], method, descriptor);
34
34
  }
35
35
  const grpcStreamMethods = [];
36
36
  for (const method of grpcStreamMethods) {
37
37
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
38
- (0, microservices_1.GrpcStreamMethod)("PayableService", method)(constructor.prototype[method], method, descriptor);
38
+ (0, microservices_1.GrpcStreamMethod)('PayableService', method)(constructor.prototype[method], method, descriptor);
39
39
  }
40
40
  };
41
41
  }
42
- exports.PAYABLE_SERVICE_NAME = "PayableService";
42
+ exports.PAYABLE_SERVICE_NAME = 'PayableService';
@@ -1,5 +1,6 @@
1
- import { Observable } from "rxjs";
2
- import { Location, Meta, Payer, PaymentDetails, PaymentSchedule, Tax } from "./common";
1
+ import { Observable } from 'rxjs';
2
+ import { Location, Meta, Payer, PaymentDetails, PaymentSchedule, Tax } from './common';
3
+ import { brandType, MetaType, PaymentMethods } from '@postpaybr/contracts/types';
3
4
  export declare const protobufPackage = "paymentCalculator";
4
5
  export interface CalculateInstallmentsRequest {
5
6
  customerId: string;
@@ -40,14 +41,14 @@ export interface TaxDetail {
40
41
  tax: Tax | undefined;
41
42
  payer: Payer | undefined;
42
43
  location: Location | undefined;
43
- metaType: string;
44
+ metaType: MetaType;
44
45
  meta: Meta | undefined;
45
46
  }
46
47
  export interface CalculateIndividualTaxFeesRequest {
47
48
  taxes: TaxDetail[];
48
49
  recipientId: string;
49
- method: string;
50
- brand?: string | undefined;
50
+ method: PaymentMethods;
51
+ brand?: brandType | undefined;
51
52
  installment: number;
52
53
  }
53
54
  export interface CalculateIndividualTaxFeesResponse {
@@ -9,26 +9,26 @@ exports.PAYMENT_CALCULATOR_SERVICE_NAME = exports.PAYMENT_CALCULATOR_PACKAGE_NAM
9
9
  exports.PaymentCalculatorServiceControllerMethods = PaymentCalculatorServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "paymentCalculator";
13
- exports.PAYMENT_CALCULATOR_PACKAGE_NAME = "paymentCalculator";
12
+ exports.protobufPackage = 'paymentCalculator';
13
+ exports.PAYMENT_CALCULATOR_PACKAGE_NAME = 'paymentCalculator';
14
14
  function PaymentCalculatorServiceControllerMethods() {
15
15
  return function (constructor) {
16
16
  const grpcMethods = [
17
- "calculateInstallments",
18
- "getPaymentMethods",
19
- "getPrincipalMethod",
20
- "calculatePostpayFee",
21
- "calculateIndividualTaxFees",
17
+ 'calculateInstallments',
18
+ 'getPaymentMethods',
19
+ 'getPrincipalMethod',
20
+ 'calculatePostpayFee',
21
+ 'calculateIndividualTaxFees',
22
22
  ];
23
23
  for (const method of grpcMethods) {
24
24
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
25
- (0, microservices_1.GrpcMethod)("PaymentCalculatorService", method)(constructor.prototype[method], method, descriptor);
25
+ (0, microservices_1.GrpcMethod)('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
26
26
  }
27
27
  const grpcStreamMethods = [];
28
28
  for (const method of grpcStreamMethods) {
29
29
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
30
- (0, microservices_1.GrpcStreamMethod)("PaymentCalculatorService", method)(constructor.prototype[method], method, descriptor);
30
+ (0, microservices_1.GrpcStreamMethod)('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
31
31
  }
32
32
  };
33
33
  }
34
- exports.PAYMENT_CALCULATOR_SERVICE_NAME = "PaymentCalculatorService";
34
+ exports.PAYMENT_CALCULATOR_SERVICE_NAME = 'PaymentCalculatorService';
@@ -1,5 +1,6 @@
1
- import { Observable } from "rxjs";
2
- import { PaymentDetails, Tax, TaxPayload } from "./common";
1
+ import { Observable } from 'rxjs';
2
+ import { PaymentDetails, Tax, TaxPayload } from './common';
3
+ import { ChargeMetadata, ChargeStatus, ChargeType, GatewayIdentification, PaymentMethods } from '@postpaybr/contracts/types';
3
4
  export declare const protobufPackage = "paymentCard";
4
5
  export interface CreatePaymentRequest {
5
6
  customerId: string;
@@ -38,8 +39,8 @@ export interface CreateVerificationPaymentResponse {
38
39
  export interface Charge {
39
40
  id: string;
40
41
  amount: number;
41
- paymentMethod: string;
42
- status: string;
42
+ paymentMethod: PaymentMethods;
43
+ status: ChargeStatus;
43
44
  dueAt: string;
44
45
  txid: string;
45
46
  brcode: string;
@@ -52,19 +53,16 @@ export interface Charge {
52
53
  isScheduled: boolean;
53
54
  discountPercentage: number;
54
55
  discountAmount: number;
55
- createdAt: string;
56
- gatewayId: string;
56
+ createdAt: Date;
57
+ gatewayId: GatewayIdentification;
57
58
  cardId: string;
58
59
  orderId: string;
59
60
  orderScheduleId: string;
60
61
  payableIds: string[];
61
- taxIds: string[];
62
- chargeSchedule: ChargeSchedule | undefined;
62
+ chargeSchedule?: ChargeSchedule | undefined;
63
63
  endToEndId: string;
64
- type: string;
65
- metadata: {
66
- [key: string]: string;
67
- };
64
+ type: ChargeType;
65
+ metadata: ChargeMetadata;
68
66
  }
69
67
  export interface Charge_MetadataEntry {
70
68
  key: string;
@@ -72,10 +70,10 @@ export interface Charge_MetadataEntry {
72
70
  }
73
71
  export interface ChargeSchedule {
74
72
  id: string;
75
- executionDate: string;
73
+ executionDate: Date;
76
74
  isExecuted: boolean;
77
- createdAt: string;
78
- updatedAt: string;
75
+ createdAt: Date;
76
+ updatedAt: Date;
79
77
  charge: Charge | undefined;
80
78
  }
81
79
  export interface Recipient {
@@ -98,7 +96,7 @@ export interface Order {
98
96
  id: string;
99
97
  totalAmount: number;
100
98
  status: string;
101
- createdAt: string;
99
+ createdAt: Date;
102
100
  items: OrderItemEntity[];
103
101
  charges: Charge[];
104
102
  customer: Customer | undefined;
@@ -9,20 +9,24 @@ exports.PAYMENT_CARD_SERVICE_NAME = exports.PAYMENT_CARD_PACKAGE_NAME = exports.
9
9
  exports.PaymentCardControllerMethods = PaymentCardControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "paymentCard";
13
- exports.PAYMENT_CARD_PACKAGE_NAME = "paymentCard";
12
+ exports.protobufPackage = 'paymentCard';
13
+ exports.PAYMENT_CARD_PACKAGE_NAME = 'paymentCard';
14
14
  function PaymentCardControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["createPayment", "processScheduledPayment", "createVerificationPayment"];
16
+ const grpcMethods = [
17
+ 'createPayment',
18
+ 'processScheduledPayment',
19
+ 'createVerificationPayment',
20
+ ];
17
21
  for (const method of grpcMethods) {
18
22
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
- (0, microservices_1.GrpcMethod)("PaymentCard", method)(constructor.prototype[method], method, descriptor);
23
+ (0, microservices_1.GrpcMethod)('PaymentCard', method)(constructor.prototype[method], method, descriptor);
20
24
  }
21
25
  const grpcStreamMethods = [];
22
26
  for (const method of grpcStreamMethods) {
23
27
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
- (0, microservices_1.GrpcStreamMethod)("PaymentCard", method)(constructor.prototype[method], method, descriptor);
28
+ (0, microservices_1.GrpcStreamMethod)('PaymentCard', method)(constructor.prototype[method], method, descriptor);
25
29
  }
26
30
  };
27
31
  }
28
- exports.PAYMENT_CARD_SERVICE_NAME = "PaymentCard";
32
+ exports.PAYMENT_CARD_SERVICE_NAME = 'PaymentCard';
@@ -1,10 +1,12 @@
1
- import { Observable } from "rxjs";
2
- import { TableFilterParams, Void } from "./common";
1
+ import { Observable } from 'rxjs';
2
+ import { TableFilterParams, Void } from './common';
3
+ import { GatewayIdentification, PaymentMethods } from '@postpaybr/contracts/types';
4
+ export { Void } from './common';
3
5
  export declare const protobufPackage = "paymentGateway";
4
6
  export interface PaymentGateway {
5
7
  id: string;
6
8
  name: string;
7
- gatewayId: string;
9
+ gatewayId: GatewayIdentification;
8
10
  supportsPix: boolean;
9
11
  supportsCreditCard: boolean;
10
12
  supportsDebitCard: boolean;
@@ -12,8 +14,8 @@ export interface PaymentGateway {
12
14
  supportsManualAnticipation: boolean;
13
15
  isActive: boolean;
14
16
  description: string;
15
- createdAt: string;
16
- updatedAt: string;
17
+ createdAt: Date;
18
+ updatedAt: Date;
17
19
  }
18
20
  export interface PaymentGatewayResponse {
19
21
  paymentGateway: PaymentGateway | undefined;
@@ -25,14 +27,14 @@ export interface GetByIdRequest {
25
27
  id: string;
26
28
  }
27
29
  export interface GetByGatewayIdRequest {
28
- gatewayId: string;
30
+ gatewayId: GatewayIdentification;
29
31
  }
30
32
  export interface GetGatewaysByMethodSupportRequest {
31
- method: string;
33
+ method: PaymentMethods;
32
34
  }
33
35
  export interface CreateGatewayRequest {
34
36
  name: string;
35
- gatewayId: string;
37
+ gatewayId: GatewayIdentification;
36
38
  supportsPix: boolean;
37
39
  supportsCreditCard: boolean;
38
40
  supportsDebitCard: boolean;
@@ -44,7 +46,7 @@ export interface CreateGatewayRequest {
44
46
  export interface UpdateGatewayRequest {
45
47
  id: string;
46
48
  name?: string | undefined;
47
- gatewayId?: string | undefined;
49
+ gatewayId?: GatewayIdentification | undefined;
48
50
  supportsPix?: boolean | undefined;
49
51
  supportsCreditCard?: boolean | undefined;
50
52
  supportsDebitCard?: boolean | undefined;
@@ -9,28 +9,28 @@ exports.PAYMENT_GATEWAY_SERVICE_NAME = exports.PAYMENT_GATEWAY_PACKAGE_NAME = ex
9
9
  exports.PaymentGatewayServiceControllerMethods = PaymentGatewayServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "paymentGateway";
13
- exports.PAYMENT_GATEWAY_PACKAGE_NAME = "paymentGateway";
12
+ exports.protobufPackage = 'paymentGateway';
13
+ exports.PAYMENT_GATEWAY_PACKAGE_NAME = 'paymentGateway';
14
14
  function PaymentGatewayServiceControllerMethods() {
15
15
  return function (constructor) {
16
16
  const grpcMethods = [
17
- "getById",
18
- "getByGatewayId",
19
- "getAllGateways",
20
- "getGatewaysByMethodSupport",
21
- "createGateway",
22
- "updateGateway",
23
- "deactivateGateway",
17
+ 'getById',
18
+ 'getByGatewayId',
19
+ 'getAllGateways',
20
+ 'getGatewaysByMethodSupport',
21
+ 'createGateway',
22
+ 'updateGateway',
23
+ 'deactivateGateway',
24
24
  ];
25
25
  for (const method of grpcMethods) {
26
26
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
27
- (0, microservices_1.GrpcMethod)("PaymentGatewayService", method)(constructor.prototype[method], method, descriptor);
27
+ (0, microservices_1.GrpcMethod)('PaymentGatewayService', method)(constructor.prototype[method], method, descriptor);
28
28
  }
29
29
  const grpcStreamMethods = [];
30
30
  for (const method of grpcStreamMethods) {
31
31
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
32
- (0, microservices_1.GrpcStreamMethod)("PaymentGatewayService", method)(constructor.prototype[method], method, descriptor);
32
+ (0, microservices_1.GrpcStreamMethod)('PaymentGatewayService', method)(constructor.prototype[method], method, descriptor);
33
33
  }
34
34
  };
35
35
  }
36
- exports.PAYMENT_GATEWAY_SERVICE_NAME = "PaymentGatewayService";
36
+ exports.PAYMENT_GATEWAY_SERVICE_NAME = 'PaymentGatewayService';
@@ -1,5 +1,6 @@
1
- import { Observable } from "rxjs";
2
- import { Order, PaymentDetails, TaxPayload } from "./common";
1
+ import { Observable } from 'rxjs';
2
+ import { Order, PaymentDetails, TaxPayload } from './common';
3
+ import { OrderType } from '@postpaybr/contracts/types';
3
4
  export declare const protobufPackage = "paymentPix";
4
5
  export interface CreatePaymentRequest {
5
6
  customerId: string;
@@ -12,7 +13,7 @@ export interface CreatePaymentRequest {
12
13
  }
13
14
  export interface CreatePaymentResponse {
14
15
  order: Order | undefined;
15
- orderType: string;
16
+ orderType: OrderType;
16
17
  chargeId: string;
17
18
  }
18
19
  export declare const PAYMENT_PIX_PACKAGE_NAME = "paymentPix";