@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.
- package/dist/typescript/account-entry.d.ts +5 -5
- package/dist/typescript/account-entry.js +9 -9
- package/dist/typescript/admin-card-verification.d.ts +15 -14
- package/dist/typescript/admin-card-verification.js +9 -9
- package/dist/typescript/administrator.d.ts +10 -8
- package/dist/typescript/administrator.js +18 -18
- package/dist/typescript/anticipation.d.ts +8 -7
- package/dist/typescript/anticipation.js +11 -11
- package/dist/typescript/bank-account.d.ts +3 -3
- package/dist/typescript/bank-account.js +10 -10
- package/dist/typescript/card.d.ts +6 -5
- package/dist/typescript/card.js +14 -14
- package/dist/typescript/charge-schedule.d.ts +1 -1
- package/dist/typescript/charge.d.ts +48 -70
- package/dist/typescript/charge.js +36 -36
- package/dist/typescript/common.d.ts +35 -18
- package/dist/typescript/common.js +2 -2
- package/dist/typescript/context.d.ts +9 -7
- package/dist/typescript/context.js +13 -14
- package/dist/typescript/customer.d.ts +8 -8
- package/dist/typescript/customer.js +19 -19
- package/dist/typescript/daily-balance.d.ts +5 -5
- package/dist/typescript/daily-balance.js +6 -6
- package/dist/typescript/document-verification.d.ts +21 -20
- package/dist/typescript/document-verification.js +11 -11
- package/dist/typescript/email.d.ts +2 -2
- package/dist/typescript/email.js +11 -11
- package/dist/typescript/fee.d.ts +6 -6
- package/dist/typescript/fee.js +9 -9
- package/dist/typescript/notification.d.ts +42 -40
- package/dist/typescript/notification.js +16 -16
- package/dist/typescript/order.d.ts +24 -23
- package/dist/typescript/order.js +15 -15
- package/dist/typescript/payable.d.ts +33 -35
- package/dist/typescript/payable.js +18 -18
- package/dist/typescript/payment-calculator.d.ts +6 -5
- package/dist/typescript/payment-calculator.js +10 -10
- package/dist/typescript/payment-card.d.ts +14 -16
- package/dist/typescript/payment-card.js +10 -6
- package/dist/typescript/payment-gateway.d.ts +11 -9
- package/dist/typescript/payment-gateway.js +12 -12
- package/dist/typescript/payment-pix.d.ts +4 -3
- package/dist/typescript/payment-pix.js +6 -6
- package/dist/typescript/receipt.d.ts +15 -29
- package/dist/typescript/receipt.js +14 -14
- package/dist/typescript/recipient-payment-gateway.d.ts +14 -12
- package/dist/typescript/recipient-payment-gateway.js +11 -11
- package/dist/typescript/recipient.d.ts +21 -19
- package/dist/typescript/recipient.js +17 -17
- package/dist/typescript/role.d.ts +5 -3
- package/dist/typescript/role.js +11 -11
- package/dist/typescript/tax.d.ts +33 -61
- package/dist/typescript/tax.js +17 -17
- package/dist/typescript/transfer.d.ts +21 -19
- package/dist/typescript/transfer.js +6 -7
- package/dist/typescript/two-factor.d.ts +8 -7
- package/dist/typescript/two-factor.js +11 -11
- package/dist/typescript/user.d.ts +13 -14
- package/dist/typescript/user.js +22 -22
- package/package.json +1 -1
- package/src/protos/charge.proto +4 -33
- package/src/protos/common.proto +12 -0
- package/src/protos/context.proto +1 -1
- package/src/protos/customer.proto +1 -1
- package/src/protos/payable.proto +5 -6
- package/src/protos/receipt.proto +7 -21
- package/src/protos/tax.proto +6 -40
- package/src/protos/user.proto +3 -4
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { DateFilter, PaginationFilter, Void } from
|
|
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:
|
|
8
|
+
orderType: OrderType;
|
|
8
9
|
}
|
|
9
10
|
export interface GetOrderByIdRequest {
|
|
10
11
|
id: string;
|
|
11
|
-
orderType?:
|
|
12
|
+
orderType?: OrderType | undefined;
|
|
12
13
|
}
|
|
13
14
|
export interface GetAllOrdersRequest {
|
|
14
15
|
recipientId?: string | undefined;
|
|
15
|
-
statuses
|
|
16
|
-
orderType?:
|
|
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:
|
|
28
|
+
orderType: OrderType;
|
|
28
29
|
}
|
|
29
30
|
export interface GetReceiptsByOrderIdRequest {
|
|
30
31
|
orderId: string;
|
|
31
|
-
orderType:
|
|
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:
|
|
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:
|
|
57
|
-
createdAt:
|
|
58
|
-
updatedAt:
|
|
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:
|
|
69
|
-
createdAt:
|
|
70
|
-
updatedAt:
|
|
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:
|
|
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:
|
|
98
|
+
orderType: OrderType;
|
|
98
99
|
}
|
|
99
100
|
export interface UpdateOrderAmountAndStatusRequest {
|
|
100
101
|
id: string;
|
|
101
|
-
orderType:
|
|
102
|
+
orderType: OrderType;
|
|
102
103
|
totalAmount: number;
|
|
103
|
-
status?:
|
|
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:
|
|
110
|
-
updatedAt:
|
|
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?:
|
|
119
|
-
paymentMethod?:
|
|
119
|
+
nextPaymentDate?: Date | undefined;
|
|
120
|
+
paymentMethod?: PaymentMethods | undefined;
|
|
120
121
|
customerName: string;
|
|
121
122
|
}
|
|
122
123
|
export interface DetailedTax {
|
package/dist/typescript/order.js
CHANGED
|
@@ -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 =
|
|
13
|
-
exports.ORDER_PACKAGE_NAME =
|
|
12
|
+
exports.protobufPackage = 'order';
|
|
13
|
+
exports.ORDER_PACKAGE_NAME = 'order';
|
|
14
14
|
function OrderServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
16
|
const grpcMethods = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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)(
|
|
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)(
|
|
35
|
+
(0, microservices_1.GrpcStreamMethod)('OrderService', method)(constructor.prototype[method], method, descriptor);
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
exports.ORDER_SERVICE_NAME =
|
|
39
|
+
exports.ORDER_SERVICE_NAME = 'OrderService';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Observable } from
|
|
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:
|
|
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:
|
|
26
|
+
status: PayableStatus;
|
|
25
27
|
dueAt: string;
|
|
26
|
-
createdAt:
|
|
28
|
+
createdAt: Date;
|
|
27
29
|
isAnticipated: boolean;
|
|
28
|
-
anticipation
|
|
30
|
+
anticipation?: Anticipation | undefined;
|
|
29
31
|
chargeId?: string | undefined;
|
|
30
32
|
recipientId?: string | undefined;
|
|
31
|
-
processedAt?:
|
|
33
|
+
processedAt?: Date | undefined;
|
|
32
34
|
}
|
|
33
35
|
export interface Anticipation {
|
|
34
36
|
id: string;
|
|
35
|
-
createdAt:
|
|
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?:
|
|
43
|
-
endDate?:
|
|
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:
|
|
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:
|
|
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
|
|
91
|
+
statuses?: PayableStatus[] | undefined;
|
|
90
92
|
isAnticipated?: boolean | undefined;
|
|
91
93
|
}
|
|
92
94
|
export interface PaginationFilter {
|
|
93
|
-
limit
|
|
94
|
-
offset
|
|
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?:
|
|
108
|
+
paymentMethod?: PaymentMethods | undefined;
|
|
111
109
|
amount: number;
|
|
112
110
|
fee?: number | undefined;
|
|
113
|
-
status:
|
|
111
|
+
status: PayableStatus;
|
|
114
112
|
isAnticipated: boolean;
|
|
115
|
-
createdAt:
|
|
116
|
-
processedAt?:
|
|
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:
|
|
125
|
-
createdAt:
|
|
122
|
+
status: ChargeStatus;
|
|
123
|
+
createdAt: Date;
|
|
126
124
|
}
|
|
127
125
|
export interface GetPayablesSummaryRequest {
|
|
128
126
|
recipientId: string;
|
|
129
|
-
startDate?:
|
|
130
|
-
endDate?:
|
|
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:
|
|
163
|
+
status: AnticipationStatus;
|
|
166
164
|
externalId: string;
|
|
167
|
-
createdAt:
|
|
168
|
-
updatedAt:
|
|
165
|
+
createdAt: Date;
|
|
166
|
+
updatedAt: Date;
|
|
169
167
|
}
|
|
170
168
|
export interface TransferDetails {
|
|
171
169
|
id: string;
|
|
172
170
|
amount: number;
|
|
173
|
-
status:
|
|
171
|
+
status: ChargeStatus;
|
|
174
172
|
description: string;
|
|
175
|
-
createdAt:
|
|
176
|
-
processedAt?:
|
|
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:
|
|
184
|
-
status:
|
|
185
|
-
createdAt:
|
|
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 =
|
|
13
|
-
exports.PAYABLE_PACKAGE_NAME =
|
|
12
|
+
exports.protobufPackage = 'payable';
|
|
13
|
+
exports.PAYABLE_PACKAGE_NAME = 'payable';
|
|
14
14
|
function PayableServiceControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
16
|
const grpcMethods = [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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)(
|
|
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)(
|
|
38
|
+
(0, microservices_1.GrpcStreamMethod)('PayableService', method)(constructor.prototype[method], method, descriptor);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
exports.PAYABLE_SERVICE_NAME =
|
|
42
|
+
exports.PAYABLE_SERVICE_NAME = 'PayableService';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { Location, Meta, Payer, PaymentDetails, PaymentSchedule, Tax } from
|
|
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:
|
|
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:
|
|
50
|
-
brand?:
|
|
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 =
|
|
13
|
-
exports.PAYMENT_CALCULATOR_PACKAGE_NAME =
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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)(
|
|
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)(
|
|
30
|
+
(0, microservices_1.GrpcStreamMethod)('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
exports.PAYMENT_CALCULATOR_SERVICE_NAME =
|
|
34
|
+
exports.PAYMENT_CALCULATOR_SERVICE_NAME = 'PaymentCalculatorService';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { PaymentDetails, Tax, TaxPayload } from
|
|
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:
|
|
42
|
-
status:
|
|
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:
|
|
56
|
-
gatewayId:
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
gatewayId: GatewayIdentification;
|
|
57
58
|
cardId: string;
|
|
58
59
|
orderId: string;
|
|
59
60
|
orderScheduleId: string;
|
|
60
61
|
payableIds: string[];
|
|
61
|
-
|
|
62
|
-
chargeSchedule: ChargeSchedule | undefined;
|
|
62
|
+
chargeSchedule?: ChargeSchedule | undefined;
|
|
63
63
|
endToEndId: string;
|
|
64
|
-
type:
|
|
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:
|
|
73
|
+
executionDate: Date;
|
|
76
74
|
isExecuted: boolean;
|
|
77
|
-
createdAt:
|
|
78
|
-
updatedAt:
|
|
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:
|
|
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 =
|
|
13
|
-
exports.PAYMENT_CARD_PACKAGE_NAME =
|
|
12
|
+
exports.protobufPackage = 'paymentCard';
|
|
13
|
+
exports.PAYMENT_CARD_PACKAGE_NAME = 'paymentCard';
|
|
14
14
|
function PaymentCardControllerMethods() {
|
|
15
15
|
return function (constructor) {
|
|
16
|
-
const grpcMethods = [
|
|
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)(
|
|
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)(
|
|
28
|
+
(0, microservices_1.GrpcStreamMethod)('PaymentCard', method)(constructor.prototype[method], method, descriptor);
|
|
25
29
|
}
|
|
26
30
|
};
|
|
27
31
|
}
|
|
28
|
-
exports.PAYMENT_CARD_SERVICE_NAME =
|
|
32
|
+
exports.PAYMENT_CARD_SERVICE_NAME = 'PaymentCard';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { TableFilterParams, Void } from
|
|
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:
|
|
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:
|
|
16
|
-
updatedAt:
|
|
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:
|
|
30
|
+
gatewayId: GatewayIdentification;
|
|
29
31
|
}
|
|
30
32
|
export interface GetGatewaysByMethodSupportRequest {
|
|
31
|
-
method:
|
|
33
|
+
method: PaymentMethods;
|
|
32
34
|
}
|
|
33
35
|
export interface CreateGatewayRequest {
|
|
34
36
|
name: string;
|
|
35
|
-
gatewayId:
|
|
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?:
|
|
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 =
|
|
13
|
-
exports.PAYMENT_GATEWAY_PACKAGE_NAME =
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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)(
|
|
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)(
|
|
32
|
+
(0, microservices_1.GrpcStreamMethod)('PaymentGatewayService', method)(constructor.prototype[method], method, descriptor);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
exports.PAYMENT_GATEWAY_SERVICE_NAME =
|
|
36
|
+
exports.PAYMENT_GATEWAY_SERVICE_NAME = 'PaymentGatewayService';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import { Order, PaymentDetails, TaxPayload } from
|
|
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:
|
|
16
|
+
orderType: OrderType;
|
|
16
17
|
chargeId: string;
|
|
17
18
|
}
|
|
18
19
|
export declare const PAYMENT_PIX_PACKAGE_NAME = "paymentPix";
|