@postpaybr/protos 1.1.2 → 1.1.7
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 +80 -0
- package/dist/typescript/account-entry.js +28 -0
- package/dist/typescript/address.d.ts +65 -0
- package/dist/typescript/address.js +29 -0
- package/dist/typescript/admin-card-verification.d.ts +86 -0
- package/dist/typescript/admin-card-verification.js +28 -0
- package/dist/typescript/administrator.d.ts +176 -0
- package/dist/typescript/administrator.js +37 -0
- package/dist/typescript/anticipation.d.ts +84 -0
- package/dist/typescript/anticipation.js +30 -0
- package/dist/typescript/asset.d.ts +43 -0
- package/dist/typescript/asset.js +29 -0
- package/dist/typescript/auth.d.ts +28 -0
- package/dist/typescript/auth.js +24 -0
- package/dist/typescript/bank-account.d.ts +63 -0
- package/dist/typescript/bank-account.js +29 -0
- package/dist/typescript/card-vault.d.ts +35 -0
- package/dist/typescript/card-vault.js +24 -0
- package/dist/typescript/card-verification.d.ts +29 -0
- package/dist/typescript/card-verification.js +27 -0
- package/dist/typescript/card.d.ts +147 -0
- package/dist/typescript/card.js +33 -0
- package/dist/typescript/charge-schedule.d.ts +35 -0
- package/dist/typescript/charge-schedule.js +24 -0
- package/dist/typescript/charge.d.ts +538 -0
- package/dist/typescript/charge.js +55 -0
- package/dist/typescript/context.d.ts +154 -0
- package/dist/typescript/context.js +32 -0
- package/dist/typescript/customer.d.ts +213 -0
- package/dist/typescript/customer.js +39 -0
- package/dist/typescript/daily-balance.d.ts +32 -0
- package/dist/typescript/daily-balance.js +24 -0
- package/dist/typescript/document-verification.d.ts +106 -0
- package/dist/typescript/document-verification.js +30 -0
- package/dist/typescript/email.d.ts +71 -0
- package/dist/typescript/email.js +31 -0
- package/dist/typescript/expo-push.d.ts +31 -0
- package/dist/typescript/expo-push.js +24 -0
- package/dist/typescript/fee.d.ts +66 -0
- package/dist/typescript/fee.js +28 -0
- package/dist/typescript/location.d.ts +38 -0
- package/dist/typescript/location.js +24 -0
- package/dist/typescript/notification.d.ts +198 -0
- package/dist/typescript/notification.js +35 -0
- package/dist/typescript/order.d.ts +173 -0
- package/dist/typescript/order.js +34 -0
- package/dist/typescript/payable.d.ts +226 -0
- package/dist/typescript/payable.js +37 -0
- package/dist/typescript/payer.d.ts +23 -0
- package/dist/typescript/payer.js +24 -0
- package/dist/typescript/payment-calculator.d.ts +135 -0
- package/dist/typescript/payment-calculator.js +29 -0
- package/dist/typescript/payment-card.d.ts +189 -0
- package/dist/typescript/payment-card.js +27 -0
- package/dist/typescript/payment-gateway.d.ts +92 -0
- package/dist/typescript/payment-gateway.js +31 -0
- package/dist/typescript/payment-pix.d.ts +101 -0
- package/dist/typescript/payment-pix.js +24 -0
- package/dist/typescript/receipt.d.ts +193 -0
- package/dist/typescript/receipt.js +33 -0
- package/dist/typescript/recipient-payment-gateway.d.ts +95 -0
- package/dist/typescript/recipient-payment-gateway.js +30 -0
- package/dist/typescript/recipient.d.ts +222 -0
- package/dist/typescript/recipient.js +36 -0
- package/dist/typescript/role.d.ts +57 -0
- package/dist/typescript/role.js +30 -0
- package/dist/typescript/sms.d.ts +34 -0
- package/dist/typescript/sms.js +24 -0
- package/dist/typescript/tax.d.ts +293 -0
- package/dist/typescript/tax.js +36 -0
- package/dist/typescript/transfer.d.ts +185 -0
- package/dist/typescript/transfer.js +23 -0
- package/dist/typescript/two-factor.d.ts +66 -0
- package/dist/typescript/two-factor.js +30 -0
- package/dist/typescript/user.d.ts +196 -0
- package/dist/typescript/user.js +41 -0
- package/dist/typescript/wallet.d.ts +18 -0
- package/dist/typescript/wallet.js +24 -0
- package/package.json +11 -9
- package/typescript/account-entry.ts +0 -177
- package/typescript/address.ts +0 -133
- package/typescript/admin-card-verification.ts +0 -181
- package/typescript/administrator.ts +0 -375
- package/typescript/anticipation.ts +0 -187
- package/typescript/asset.ts +0 -123
- package/typescript/auth.ts +0 -84
- package/typescript/bank-account.ts +0 -157
- package/typescript/card-vault.ts +0 -92
- package/typescript/card-verification.ts +0 -93
- package/typescript/card.ts +0 -283
- package/typescript/charge-schedule.ts +0 -86
- package/typescript/charge.ts +0 -930
- package/typescript/context.ts +0 -296
- package/typescript/customer.ts +0 -425
- package/typescript/daily-balance.ts +0 -94
- package/typescript/document-verification.ts +0 -219
- package/typescript/email.ts +0 -183
- package/typescript/expo-push.ts +0 -75
- package/typescript/fee.ts +0 -131
- package/typescript/location.ts +0 -96
- package/typescript/notification.ts +0 -372
- package/typescript/order.ts +0 -311
- package/typescript/payable.ts +0 -414
- package/typescript/payer.ts +0 -68
- package/typescript/payment-calculator.ts +0 -252
- package/typescript/payment-card.ts +0 -289
- package/typescript/payment-gateway.ts +0 -209
- package/typescript/payment-pix.ts +0 -170
- package/typescript/receipt.ts +0 -344
- package/typescript/recipient-payment-gateway.ts +0 -209
- package/typescript/recipient.ts +0 -413
- package/typescript/role.ts +0 -144
- package/typescript/sms.ts +0 -96
- package/typescript/tax.ts +0 -463
- package/typescript/transfer.ts +0 -260
- package/typescript/two-factor.ts +0 -177
- package/typescript/user.ts +0 -413
- package/typescript/wallet.ts +0 -63
- /package/{account-entry.proto → src/protos/account-entry.proto} +0 -0
- /package/{address.proto → src/protos/address.proto} +0 -0
- /package/{admin-card-verification.proto → src/protos/admin-card-verification.proto} +0 -0
- /package/{administrator.proto → src/protos/administrator.proto} +0 -0
- /package/{anticipation.proto → src/protos/anticipation.proto} +0 -0
- /package/{asset.proto → src/protos/asset.proto} +0 -0
- /package/{auth.proto → src/protos/auth.proto} +0 -0
- /package/{bank-account.proto → src/protos/bank-account.proto} +0 -0
- /package/{card-vault.proto → src/protos/card-vault.proto} +0 -0
- /package/{card-verification.proto → src/protos/card-verification.proto} +0 -0
- /package/{card.proto → src/protos/card.proto} +0 -0
- /package/{charge-schedule.proto → src/protos/charge-schedule.proto} +0 -0
- /package/{charge.proto → src/protos/charge.proto} +0 -0
- /package/{context.proto → src/protos/context.proto} +0 -0
- /package/{customer.proto → src/protos/customer.proto} +0 -0
- /package/{daily-balance.proto → src/protos/daily-balance.proto} +0 -0
- /package/{document-verification.proto → src/protos/document-verification.proto} +0 -0
- /package/{email.proto → src/protos/email.proto} +0 -0
- /package/{expo-push.proto → src/protos/expo-push.proto} +0 -0
- /package/{fee.proto → src/protos/fee.proto} +0 -0
- /package/{location.proto → src/protos/location.proto} +0 -0
- /package/{notification.proto → src/protos/notification.proto} +0 -0
- /package/{order.proto → src/protos/order.proto} +0 -0
- /package/{payable.proto → src/protos/payable.proto} +0 -0
- /package/{payer.proto → src/protos/payer.proto} +0 -0
- /package/{payment-calculator.proto → src/protos/payment-calculator.proto} +0 -0
- /package/{payment-card.proto → src/protos/payment-card.proto} +0 -0
- /package/{payment-gateway.proto → src/protos/payment-gateway.proto} +0 -0
- /package/{payment-pix.proto → src/protos/payment-pix.proto} +0 -0
- /package/{receipt.proto → src/protos/receipt.proto} +0 -0
- /package/{recipient-payment-gateway.proto → src/protos/recipient-payment-gateway.proto} +0 -0
- /package/{recipient.proto → src/protos/recipient.proto} +0 -0
- /package/{role.proto → src/protos/role.proto} +0 -0
- /package/{sms.proto → src/protos/sms.proto} +0 -0
- /package/{tax.proto → src/protos/tax.proto} +0 -0
- /package/{transfer.proto → src/protos/transfer.proto} +0 -0
- /package/{two-factor.proto → src/protos/two-factor.proto} +0 -0
- /package/{user.proto → src/protos/user.proto} +0 -0
- /package/{wallet.proto → src/protos/wallet.proto} +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { OrderStatus, OrderType, PaymentMethods } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "order";
|
|
4
|
+
export interface CreateOrderRequest {
|
|
5
|
+
customerId: string;
|
|
6
|
+
totalAmount: number;
|
|
7
|
+
orderType: OrderType;
|
|
8
|
+
}
|
|
9
|
+
export interface GetOrderByIdRequest {
|
|
10
|
+
id: string;
|
|
11
|
+
orderType?: OrderType;
|
|
12
|
+
}
|
|
13
|
+
export interface GetAllOrdersRequest {
|
|
14
|
+
recipientId?: string | undefined;
|
|
15
|
+
statuses?: OrderStatus[];
|
|
16
|
+
orderType?: OrderType | undefined;
|
|
17
|
+
pagination: PaginationFilter | undefined;
|
|
18
|
+
date: DateFilter | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface PaginationFilter {
|
|
21
|
+
limit?: number | undefined;
|
|
22
|
+
offset?: number | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface DateFilter {
|
|
25
|
+
startDate?: Date | undefined;
|
|
26
|
+
endDate?: Date | undefined;
|
|
27
|
+
}
|
|
28
|
+
export interface GetAllOrdersResponse {
|
|
29
|
+
orders: Order[];
|
|
30
|
+
count: number;
|
|
31
|
+
}
|
|
32
|
+
export interface CreateOrderItemsRequest {
|
|
33
|
+
order: Order | undefined;
|
|
34
|
+
taxIds: string[];
|
|
35
|
+
orderType: OrderType;
|
|
36
|
+
}
|
|
37
|
+
export interface GetReceiptsByOrderIdRequest {
|
|
38
|
+
orderId: string;
|
|
39
|
+
orderType: OrderType;
|
|
40
|
+
}
|
|
41
|
+
export interface GetReceiptsByOrderIdResponse {
|
|
42
|
+
receipts: ReceiptEntity[];
|
|
43
|
+
}
|
|
44
|
+
export interface updateOrderStatusRequest {
|
|
45
|
+
orderId: string;
|
|
46
|
+
orderStatus: OrderStatus;
|
|
47
|
+
orderType: OrderType;
|
|
48
|
+
}
|
|
49
|
+
export interface Void {
|
|
50
|
+
}
|
|
51
|
+
export interface Order {
|
|
52
|
+
id: string;
|
|
53
|
+
totalAmount: number;
|
|
54
|
+
status: OrderStatus;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
chargeIds: string[];
|
|
58
|
+
customerId: string;
|
|
59
|
+
items: OrderItem[];
|
|
60
|
+
orderSchedule: OrderSchedule | undefined;
|
|
61
|
+
type?: OrderType | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface OrderSchedule {
|
|
64
|
+
id: string;
|
|
65
|
+
totalAmount: number;
|
|
66
|
+
status: OrderStatus;
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
updatedAt: Date;
|
|
69
|
+
chargeIds: string[];
|
|
70
|
+
customerId: string;
|
|
71
|
+
items: OrderItem[];
|
|
72
|
+
order: Order | undefined;
|
|
73
|
+
}
|
|
74
|
+
export interface OrderItem {
|
|
75
|
+
id: string;
|
|
76
|
+
order: Order | undefined;
|
|
77
|
+
orderSchedule: OrderSchedule | undefined;
|
|
78
|
+
recipientId: string;
|
|
79
|
+
taxId: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ReceiptEntity {
|
|
82
|
+
id: string;
|
|
83
|
+
customerId: string;
|
|
84
|
+
amount: number;
|
|
85
|
+
protocol: string;
|
|
86
|
+
txid?: string | undefined;
|
|
87
|
+
createdAt: Date;
|
|
88
|
+
}
|
|
89
|
+
export interface GetOrderCustomerNameResponse {
|
|
90
|
+
customerName: string;
|
|
91
|
+
}
|
|
92
|
+
export interface updateOrderWithChargeIdRequest {
|
|
93
|
+
orderId: string;
|
|
94
|
+
chargeId: string;
|
|
95
|
+
orderType: OrderType;
|
|
96
|
+
}
|
|
97
|
+
export interface UpdateOrderAmountAndStatusRequest {
|
|
98
|
+
id: string;
|
|
99
|
+
orderType: OrderType;
|
|
100
|
+
totalAmount: number;
|
|
101
|
+
status?: OrderStatus;
|
|
102
|
+
}
|
|
103
|
+
export interface OrderDetail {
|
|
104
|
+
id: string;
|
|
105
|
+
totalAmount: number;
|
|
106
|
+
status: OrderStatus;
|
|
107
|
+
createdAt: Date;
|
|
108
|
+
updatedAt: Date;
|
|
109
|
+
chargeIds: string[];
|
|
110
|
+
customerId: string;
|
|
111
|
+
type: OrderType;
|
|
112
|
+
}
|
|
113
|
+
export interface OrderPayments {
|
|
114
|
+
totalPaid: number;
|
|
115
|
+
totalPending: number;
|
|
116
|
+
nextPaymentDate?: Date | undefined;
|
|
117
|
+
paymentMethod?: PaymentMethods | undefined;
|
|
118
|
+
customerName: string;
|
|
119
|
+
}
|
|
120
|
+
export interface DetailedTax {
|
|
121
|
+
id: string;
|
|
122
|
+
type: string;
|
|
123
|
+
description: string;
|
|
124
|
+
amount: number;
|
|
125
|
+
year: number;
|
|
126
|
+
documentId: string;
|
|
127
|
+
}
|
|
128
|
+
export interface DetailedRecipient {
|
|
129
|
+
id: string;
|
|
130
|
+
code: string;
|
|
131
|
+
commercialName: string;
|
|
132
|
+
socialReason: string;
|
|
133
|
+
}
|
|
134
|
+
export interface DetailedOrderItem {
|
|
135
|
+
id: string;
|
|
136
|
+
recipientId: string;
|
|
137
|
+
taxId: string;
|
|
138
|
+
taxDetails?: DetailedTax | undefined;
|
|
139
|
+
recipientDetails?: DetailedRecipient | undefined;
|
|
140
|
+
recipientName?: string | undefined;
|
|
141
|
+
}
|
|
142
|
+
export interface DetailedOrderResponse {
|
|
143
|
+
order: OrderDetail | undefined;
|
|
144
|
+
items: DetailedOrderItem[];
|
|
145
|
+
payments: OrderPayments | undefined;
|
|
146
|
+
}
|
|
147
|
+
export declare const ORDER_PACKAGE_NAME = "order";
|
|
148
|
+
export interface OrderServiceClient {
|
|
149
|
+
createOrder(request: CreateOrderRequest): Observable<Order>;
|
|
150
|
+
getOrderById(request: GetOrderByIdRequest): Observable<Order>;
|
|
151
|
+
getAllOrders(request: GetAllOrdersRequest): Observable<GetAllOrdersResponse>;
|
|
152
|
+
createOrderItems(request: CreateOrderItemsRequest): Observable<Void>;
|
|
153
|
+
getReceiptsByOrderId(request: GetReceiptsByOrderIdRequest): Observable<GetReceiptsByOrderIdResponse>;
|
|
154
|
+
updateOrderStatus(request: updateOrderStatusRequest): Observable<Order>;
|
|
155
|
+
getOrderCustomerName(request: GetOrderByIdRequest): Observable<GetOrderCustomerNameResponse>;
|
|
156
|
+
updateOrderWithChargeId(request: updateOrderWithChargeIdRequest): Observable<Void>;
|
|
157
|
+
updateOrderAmountAndStatus(request: UpdateOrderAmountAndStatusRequest): Observable<Order>;
|
|
158
|
+
getDetailedOrder(request: GetOrderByIdRequest): Observable<DetailedOrderResponse>;
|
|
159
|
+
}
|
|
160
|
+
export interface OrderServiceController {
|
|
161
|
+
createOrder(request: CreateOrderRequest): Promise<Order> | Observable<Order> | Order;
|
|
162
|
+
getOrderById(request: GetOrderByIdRequest): Promise<Order> | Observable<Order> | Order;
|
|
163
|
+
getAllOrders(request: GetAllOrdersRequest): Promise<GetAllOrdersResponse> | Observable<GetAllOrdersResponse> | GetAllOrdersResponse;
|
|
164
|
+
createOrderItems(request: CreateOrderItemsRequest): Promise<Void> | Observable<Void> | Void;
|
|
165
|
+
getReceiptsByOrderId(request: GetReceiptsByOrderIdRequest): Promise<GetReceiptsByOrderIdResponse> | Observable<GetReceiptsByOrderIdResponse> | GetReceiptsByOrderIdResponse;
|
|
166
|
+
updateOrderStatus(request: updateOrderStatusRequest): Promise<Order> | Observable<Order> | Order;
|
|
167
|
+
getOrderCustomerName(request: GetOrderByIdRequest): Promise<GetOrderCustomerNameResponse> | Observable<GetOrderCustomerNameResponse> | GetOrderCustomerNameResponse;
|
|
168
|
+
updateOrderWithChargeId(request: updateOrderWithChargeIdRequest): Promise<Void> | Observable<Void> | Void;
|
|
169
|
+
updateOrderAmountAndStatus(request: UpdateOrderAmountAndStatusRequest): Promise<Order> | Observable<Order> | Order;
|
|
170
|
+
getDetailedOrder(request: GetOrderByIdRequest): Promise<DetailedOrderResponse> | Observable<DetailedOrderResponse> | DetailedOrderResponse;
|
|
171
|
+
}
|
|
172
|
+
export declare function OrderServiceControllerMethods(): (constructor: Function) => void;
|
|
173
|
+
export declare const ORDER_SERVICE_NAME = "OrderService";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc v6.33.0
|
|
5
|
+
// source: order.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'order';
|
|
8
|
+
export const ORDER_PACKAGE_NAME = 'order';
|
|
9
|
+
export function OrderServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'createOrder',
|
|
13
|
+
'getOrderById',
|
|
14
|
+
'getAllOrders',
|
|
15
|
+
'createOrderItems',
|
|
16
|
+
'getReceiptsByOrderId',
|
|
17
|
+
'updateOrderStatus',
|
|
18
|
+
'getOrderCustomerName',
|
|
19
|
+
'updateOrderWithChargeId',
|
|
20
|
+
'updateOrderAmountAndStatus',
|
|
21
|
+
'getDetailedOrder',
|
|
22
|
+
];
|
|
23
|
+
for (const method of grpcMethods) {
|
|
24
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
25
|
+
GrpcMethod('OrderService', method)(constructor.prototype[method], method, descriptor);
|
|
26
|
+
}
|
|
27
|
+
const grpcStreamMethods = [];
|
|
28
|
+
for (const method of grpcStreamMethods) {
|
|
29
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
30
|
+
GrpcStreamMethod('OrderService', method)(constructor.prototype[method], method, descriptor);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export const ORDER_SERVICE_NAME = 'OrderService';
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { AnticipationStatus, ChargeStatus, PayableStatus, PaymentMethods } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "payable";
|
|
4
|
+
export interface CreatePayableRequest {
|
|
5
|
+
amount: number;
|
|
6
|
+
chargeId: string;
|
|
7
|
+
recipientId: string;
|
|
8
|
+
installment: number;
|
|
9
|
+
dueAt: string;
|
|
10
|
+
status: PayableStatus;
|
|
11
|
+
}
|
|
12
|
+
export interface PayableResponse {
|
|
13
|
+
payable: Payable | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface GetPayablesByChargeIdRequest {
|
|
16
|
+
chargeId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface GetPayablesByChargeIdResponse {
|
|
19
|
+
payables: Payable[];
|
|
20
|
+
}
|
|
21
|
+
export interface Payable {
|
|
22
|
+
id?: string;
|
|
23
|
+
amount?: number;
|
|
24
|
+
installment?: number;
|
|
25
|
+
status?: PayableStatus;
|
|
26
|
+
dueAt?: string;
|
|
27
|
+
createdAt?: Date;
|
|
28
|
+
isAnticipated?: boolean;
|
|
29
|
+
anticipation?: Anticipation | undefined;
|
|
30
|
+
chargeId?: string | undefined;
|
|
31
|
+
recipientId?: string | undefined;
|
|
32
|
+
processedAt?: Date | undefined;
|
|
33
|
+
}
|
|
34
|
+
export interface Anticipation {
|
|
35
|
+
id: string;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
}
|
|
38
|
+
export interface GetPayableByIdRequest {
|
|
39
|
+
payableId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface GetPayablesByRecipientIdRequest {
|
|
42
|
+
recipientId: string;
|
|
43
|
+
startDate?: Date;
|
|
44
|
+
endDate?: Date;
|
|
45
|
+
}
|
|
46
|
+
export interface GetPayablesByRecipientIdResponse {
|
|
47
|
+
payables: RecipientPayable[];
|
|
48
|
+
}
|
|
49
|
+
export interface RecipientPayable {
|
|
50
|
+
customer: string;
|
|
51
|
+
installment: number;
|
|
52
|
+
installmentNumber: number;
|
|
53
|
+
dueAt: string;
|
|
54
|
+
paymentMethod: PaymentMethods;
|
|
55
|
+
amount: number;
|
|
56
|
+
fee: number;
|
|
57
|
+
netAmount: number;
|
|
58
|
+
chargeId: string;
|
|
59
|
+
payableId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface UpdatePayablesStatusRequest {
|
|
62
|
+
payableIds: string[];
|
|
63
|
+
status: PayableStatus;
|
|
64
|
+
}
|
|
65
|
+
export interface UpdatePayablesStatusResponse {
|
|
66
|
+
affected: number;
|
|
67
|
+
}
|
|
68
|
+
export interface GetPayablesAvailableForAnticipationRequest {
|
|
69
|
+
recipientId: string;
|
|
70
|
+
}
|
|
71
|
+
export interface GetPayablesAvailableForAnticipationResponse {
|
|
72
|
+
payables: Payable[];
|
|
73
|
+
}
|
|
74
|
+
export interface MarkPayableAsAnticipatedRequest {
|
|
75
|
+
payableId: string;
|
|
76
|
+
}
|
|
77
|
+
export interface DeletePayableRequest {
|
|
78
|
+
id: string;
|
|
79
|
+
}
|
|
80
|
+
export interface DeletePayableResponse {
|
|
81
|
+
affected: number;
|
|
82
|
+
}
|
|
83
|
+
export interface GetAllPayablesRequest {
|
|
84
|
+
data?: GetAllPayablesData | undefined;
|
|
85
|
+
pagination: PaginationFilter | undefined;
|
|
86
|
+
date: DateFilter | undefined;
|
|
87
|
+
}
|
|
88
|
+
export interface GetAllPayablesData {
|
|
89
|
+
recipientId?: string | undefined;
|
|
90
|
+
statuses?: PayableStatus[];
|
|
91
|
+
isAnticipated?: boolean | undefined;
|
|
92
|
+
}
|
|
93
|
+
export interface PaginationFilter {
|
|
94
|
+
limit?: number;
|
|
95
|
+
offset?: number;
|
|
96
|
+
}
|
|
97
|
+
export interface DateFilter {
|
|
98
|
+
startDate?: Date | undefined;
|
|
99
|
+
endDate?: Date | undefined;
|
|
100
|
+
}
|
|
101
|
+
export interface GetAllPayablesResponse {
|
|
102
|
+
payables: PayableWithDetails[];
|
|
103
|
+
count: number;
|
|
104
|
+
}
|
|
105
|
+
export interface PayableWithDetails {
|
|
106
|
+
id: string;
|
|
107
|
+
customer?: string;
|
|
108
|
+
installment: number;
|
|
109
|
+
totalInstallments?: number;
|
|
110
|
+
dueDate: string;
|
|
111
|
+
paymentMethod?: PaymentMethods;
|
|
112
|
+
amount: number;
|
|
113
|
+
fee?: number;
|
|
114
|
+
status: PayableStatus;
|
|
115
|
+
isAnticipated: boolean;
|
|
116
|
+
createdAt: Date;
|
|
117
|
+
processedAt?: Date | undefined;
|
|
118
|
+
anticipation?: Anticipation | undefined;
|
|
119
|
+
transfer?: Transfer | undefined;
|
|
120
|
+
chargeId: string;
|
|
121
|
+
recipientId: string;
|
|
122
|
+
}
|
|
123
|
+
export interface Transfer {
|
|
124
|
+
id: string;
|
|
125
|
+
status: ChargeStatus;
|
|
126
|
+
createdAt: Date;
|
|
127
|
+
}
|
|
128
|
+
export interface GetPayablesSummaryRequest {
|
|
129
|
+
recipientId: string;
|
|
130
|
+
startDate?: Date | undefined;
|
|
131
|
+
endDate?: Date | undefined;
|
|
132
|
+
}
|
|
133
|
+
export interface GetPayablesSummaryResponse {
|
|
134
|
+
summary: PayablesSummary | undefined;
|
|
135
|
+
}
|
|
136
|
+
export interface PayablesSummary {
|
|
137
|
+
totalAmount: number;
|
|
138
|
+
pendingAmount: number;
|
|
139
|
+
transferredAmount: number;
|
|
140
|
+
anticipatedAmount: number;
|
|
141
|
+
payablesCount: number;
|
|
142
|
+
pendingCount: number;
|
|
143
|
+
transferredCount: number;
|
|
144
|
+
anticipatedCount: number;
|
|
145
|
+
}
|
|
146
|
+
export interface GetPayableDetailsRequest {
|
|
147
|
+
payableId: string;
|
|
148
|
+
}
|
|
149
|
+
export interface GetPayableDetailsResponse {
|
|
150
|
+
payableDetails: PayableDetails | undefined;
|
|
151
|
+
}
|
|
152
|
+
export interface PayableDetails {
|
|
153
|
+
payable: Payable | undefined;
|
|
154
|
+
anticipation?: AnticipationDetails | undefined;
|
|
155
|
+
transfer?: TransferDetails | undefined;
|
|
156
|
+
charge?: ChargeDetails | undefined;
|
|
157
|
+
customer?: string | undefined;
|
|
158
|
+
}
|
|
159
|
+
export interface AnticipationDetails {
|
|
160
|
+
id: string;
|
|
161
|
+
amount: number;
|
|
162
|
+
fee: number;
|
|
163
|
+
baseFee: number;
|
|
164
|
+
feePercentage: number;
|
|
165
|
+
anticipatedDays: number;
|
|
166
|
+
status: AnticipationStatus;
|
|
167
|
+
externalId: string;
|
|
168
|
+
createdAt: Date;
|
|
169
|
+
updatedAt: Date;
|
|
170
|
+
}
|
|
171
|
+
export interface TransferDetails {
|
|
172
|
+
id: string;
|
|
173
|
+
amount: number;
|
|
174
|
+
status: ChargeStatus;
|
|
175
|
+
description: string;
|
|
176
|
+
createdAt: Date;
|
|
177
|
+
processedAt?: Date | undefined;
|
|
178
|
+
}
|
|
179
|
+
export interface ChargeDetails {
|
|
180
|
+
id: string;
|
|
181
|
+
amount: number;
|
|
182
|
+
fee: number;
|
|
183
|
+
installmentNumber: number;
|
|
184
|
+
paymentMethod: string;
|
|
185
|
+
status: string;
|
|
186
|
+
createdAt: Date;
|
|
187
|
+
}
|
|
188
|
+
export interface ForceTransferRequest {
|
|
189
|
+
payableId: string;
|
|
190
|
+
}
|
|
191
|
+
export interface ForceAnticipationRequest {
|
|
192
|
+
payableId: string;
|
|
193
|
+
}
|
|
194
|
+
export declare const PAYABLE_PACKAGE_NAME = "payable";
|
|
195
|
+
export interface PayableServiceClient {
|
|
196
|
+
createPayable(request: CreatePayableRequest): Observable<PayableResponse>;
|
|
197
|
+
getPayablesByChargeId(request: GetPayablesByChargeIdRequest): Observable<GetPayablesByChargeIdResponse>;
|
|
198
|
+
getPayableById(request: GetPayableByIdRequest): Observable<PayableResponse>;
|
|
199
|
+
getPayablesByRecipientId(request: GetPayablesByRecipientIdRequest): Observable<GetPayablesByRecipientIdResponse>;
|
|
200
|
+
updatePayablesStatus(request: UpdatePayablesStatusRequest): Observable<UpdatePayablesStatusResponse>;
|
|
201
|
+
getPayablesAvailableForAnticipation(request: GetPayablesAvailableForAnticipationRequest): Observable<GetPayablesAvailableForAnticipationResponse>;
|
|
202
|
+
markPayableAsAnticipated(request: MarkPayableAsAnticipatedRequest): Observable<PayableResponse>;
|
|
203
|
+
deletePayable(request: DeletePayableRequest): Observable<DeletePayableResponse>;
|
|
204
|
+
getAllPayables(request: GetAllPayablesRequest): Observable<GetAllPayablesResponse>;
|
|
205
|
+
getPayablesSummary(request: GetPayablesSummaryRequest): Observable<GetPayablesSummaryResponse>;
|
|
206
|
+
getPayableDetails(request: GetPayableDetailsRequest): Observable<GetPayableDetailsResponse>;
|
|
207
|
+
forceTransfer(request: ForceTransferRequest): Observable<PayableResponse>;
|
|
208
|
+
forceAnticipation(request: ForceAnticipationRequest): Observable<PayableResponse>;
|
|
209
|
+
}
|
|
210
|
+
export interface PayableServiceController {
|
|
211
|
+
createPayable(request: CreatePayableRequest): Promise<PayableResponse> | Observable<PayableResponse> | PayableResponse;
|
|
212
|
+
getPayablesByChargeId(request: GetPayablesByChargeIdRequest): Promise<GetPayablesByChargeIdResponse> | Observable<GetPayablesByChargeIdResponse> | GetPayablesByChargeIdResponse;
|
|
213
|
+
getPayableById(request: GetPayableByIdRequest): Promise<PayableResponse> | Observable<PayableResponse> | PayableResponse;
|
|
214
|
+
getPayablesByRecipientId(request: GetPayablesByRecipientIdRequest): Promise<GetPayablesByRecipientIdResponse> | Observable<GetPayablesByRecipientIdResponse> | GetPayablesByRecipientIdResponse;
|
|
215
|
+
updatePayablesStatus(request: UpdatePayablesStatusRequest): Promise<UpdatePayablesStatusResponse> | Observable<UpdatePayablesStatusResponse> | UpdatePayablesStatusResponse;
|
|
216
|
+
getPayablesAvailableForAnticipation(request: GetPayablesAvailableForAnticipationRequest): Promise<GetPayablesAvailableForAnticipationResponse> | Observable<GetPayablesAvailableForAnticipationResponse> | GetPayablesAvailableForAnticipationResponse;
|
|
217
|
+
markPayableAsAnticipated(request: MarkPayableAsAnticipatedRequest): Promise<PayableResponse> | Observable<PayableResponse> | PayableResponse;
|
|
218
|
+
deletePayable(request: DeletePayableRequest): Promise<DeletePayableResponse> | Observable<DeletePayableResponse> | DeletePayableResponse;
|
|
219
|
+
getAllPayables(request: GetAllPayablesRequest): Promise<GetAllPayablesResponse> | Observable<GetAllPayablesResponse> | GetAllPayablesResponse;
|
|
220
|
+
getPayablesSummary(request: GetPayablesSummaryRequest): Promise<GetPayablesSummaryResponse> | Observable<GetPayablesSummaryResponse> | GetPayablesSummaryResponse;
|
|
221
|
+
getPayableDetails(request: GetPayableDetailsRequest): Promise<GetPayableDetailsResponse> | Observable<GetPayableDetailsResponse> | GetPayableDetailsResponse;
|
|
222
|
+
forceTransfer(request: ForceTransferRequest): Promise<PayableResponse> | Observable<PayableResponse> | PayableResponse;
|
|
223
|
+
forceAnticipation(request: ForceAnticipationRequest): Promise<PayableResponse> | Observable<PayableResponse> | PayableResponse;
|
|
224
|
+
}
|
|
225
|
+
export declare function PayableServiceControllerMethods(): (constructor: Function) => void;
|
|
226
|
+
export declare const PAYABLE_SERVICE_NAME = "PayableService";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc v6.33.0
|
|
5
|
+
// source: payable.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'payable';
|
|
8
|
+
export const PAYABLE_PACKAGE_NAME = 'payable';
|
|
9
|
+
export function PayableServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'createPayable',
|
|
13
|
+
'getPayablesByChargeId',
|
|
14
|
+
'getPayableById',
|
|
15
|
+
'getPayablesByRecipientId',
|
|
16
|
+
'updatePayablesStatus',
|
|
17
|
+
'getPayablesAvailableForAnticipation',
|
|
18
|
+
'markPayableAsAnticipated',
|
|
19
|
+
'deletePayable',
|
|
20
|
+
'getAllPayables',
|
|
21
|
+
'getPayablesSummary',
|
|
22
|
+
'getPayableDetails',
|
|
23
|
+
'forceTransfer',
|
|
24
|
+
'forceAnticipation',
|
|
25
|
+
];
|
|
26
|
+
for (const method of grpcMethods) {
|
|
27
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
28
|
+
GrpcMethod('PayableService', method)(constructor.prototype[method], method, descriptor);
|
|
29
|
+
}
|
|
30
|
+
const grpcStreamMethods = [];
|
|
31
|
+
for (const method of grpcStreamMethods) {
|
|
32
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
33
|
+
GrpcStreamMethod('PayableService', method)(constructor.prototype[method], method, descriptor);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export const PAYABLE_SERVICE_NAME = 'PayableService';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare const protobufPackage = "payer";
|
|
3
|
+
export interface PayerDto {
|
|
4
|
+
id?: string | undefined;
|
|
5
|
+
name: string;
|
|
6
|
+
document: string;
|
|
7
|
+
phone?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface Payer {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
document: string;
|
|
13
|
+
phone: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const PAYER_PACKAGE_NAME = "payer";
|
|
16
|
+
export interface PayerServiceClient {
|
|
17
|
+
findOrCreatePayer(request: PayerDto): Observable<Payer>;
|
|
18
|
+
}
|
|
19
|
+
export interface PayerServiceController {
|
|
20
|
+
findOrCreatePayer(request: PayerDto): Promise<Payer> | Observable<Payer> | Payer;
|
|
21
|
+
}
|
|
22
|
+
export declare function PayerServiceControllerMethods(): (constructor: Function) => void;
|
|
23
|
+
export declare const PAYER_SERVICE_NAME = "PayerService";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.0
|
|
4
|
+
// protoc v3.20.3
|
|
5
|
+
// source: payer.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
8
|
+
export const protobufPackage = 'payer';
|
|
9
|
+
export const PAYER_PACKAGE_NAME = 'payer';
|
|
10
|
+
export function PayerServiceControllerMethods() {
|
|
11
|
+
return function (constructor) {
|
|
12
|
+
const grpcMethods = ['findOrCreatePayer'];
|
|
13
|
+
for (const method of grpcMethods) {
|
|
14
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
15
|
+
GrpcMethod('PayerService', method)(constructor.prototype[method], method, descriptor);
|
|
16
|
+
}
|
|
17
|
+
const grpcStreamMethods = [];
|
|
18
|
+
for (const method of grpcStreamMethods) {
|
|
19
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
20
|
+
GrpcStreamMethod('PayerService', method)(constructor.prototype[method], method, descriptor);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export const PAYER_SERVICE_NAME = 'PayerService';
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { brandType, MetaType, PaymentMethods, PaymentScheduleType, taxMeta, TaxStatus, TaxTypes } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "paymentCalculator";
|
|
4
|
+
export interface CalculateInstallmentsRequest {
|
|
5
|
+
customerId: string;
|
|
6
|
+
count: number;
|
|
7
|
+
}
|
|
8
|
+
export interface CalculateInstallmentsResponse {
|
|
9
|
+
installments: Installment[];
|
|
10
|
+
}
|
|
11
|
+
export interface Installment {
|
|
12
|
+
installment: number;
|
|
13
|
+
amount: number;
|
|
14
|
+
fee: number;
|
|
15
|
+
totalAmount: number;
|
|
16
|
+
baseAmount: number;
|
|
17
|
+
}
|
|
18
|
+
export interface GetPaymentMethodsRequest {
|
|
19
|
+
customerId: string;
|
|
20
|
+
paymentSchedule: PaymentSchedule | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface GetPaymentMethodsResponse {
|
|
23
|
+
methods: PaymentDetails[];
|
|
24
|
+
}
|
|
25
|
+
export interface PaymentDetails {
|
|
26
|
+
method: PaymentMethods;
|
|
27
|
+
amount: number;
|
|
28
|
+
fee: number;
|
|
29
|
+
discountPercentage?: number | undefined;
|
|
30
|
+
discountAmount?: number | undefined;
|
|
31
|
+
card?: CardDetails | undefined;
|
|
32
|
+
paymentSchedule: PaymentSchedule | undefined;
|
|
33
|
+
baseFee: number;
|
|
34
|
+
feePercentage: number;
|
|
35
|
+
chargeId?: string | undefined;
|
|
36
|
+
isRetry?: boolean | undefined;
|
|
37
|
+
orderId?: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface CardDetails {
|
|
40
|
+
id: string;
|
|
41
|
+
shadowNumber: string;
|
|
42
|
+
brand: brandType;
|
|
43
|
+
installments?: number | undefined;
|
|
44
|
+
installmentValue?: number | undefined;
|
|
45
|
+
nickname?: string | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface GetPrincipalMethodRequest {
|
|
48
|
+
customerId: string;
|
|
49
|
+
paymentSchedule: PaymentSchedule | undefined;
|
|
50
|
+
}
|
|
51
|
+
export interface GetPrincipalMethodResponse {
|
|
52
|
+
principalMethod: PaymentDetails | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface CalculatePostpayFeeRequest {
|
|
55
|
+
taxes: TaxDetail[];
|
|
56
|
+
paymentDetails: PaymentDetails | undefined;
|
|
57
|
+
}
|
|
58
|
+
export interface CalculatePostpayFeeResponse {
|
|
59
|
+
totalPostpayFee: number;
|
|
60
|
+
}
|
|
61
|
+
export interface TaxDetail {
|
|
62
|
+
tax: Tax | undefined;
|
|
63
|
+
payer: Payer | undefined;
|
|
64
|
+
location: LocationInfo | undefined;
|
|
65
|
+
metaType: MetaType;
|
|
66
|
+
meta: taxMeta | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface Tax {
|
|
69
|
+
id: string;
|
|
70
|
+
type: TaxTypes;
|
|
71
|
+
status: TaxStatus;
|
|
72
|
+
description: string;
|
|
73
|
+
amount: number;
|
|
74
|
+
year: number;
|
|
75
|
+
dueAt: string;
|
|
76
|
+
documentId: string;
|
|
77
|
+
code: string;
|
|
78
|
+
isSingleQuota: boolean;
|
|
79
|
+
quota?: number | undefined;
|
|
80
|
+
fee: number;
|
|
81
|
+
fine: number;
|
|
82
|
+
discountAmount: number;
|
|
83
|
+
}
|
|
84
|
+
export interface LocationInfo {
|
|
85
|
+
state: number;
|
|
86
|
+
city: number;
|
|
87
|
+
recipientId: string;
|
|
88
|
+
}
|
|
89
|
+
export interface Payer {
|
|
90
|
+
id?: string | undefined;
|
|
91
|
+
name: string;
|
|
92
|
+
document: string;
|
|
93
|
+
phone?: string | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface PaymentSchedule {
|
|
96
|
+
type: PaymentScheduleType;
|
|
97
|
+
date?: string | undefined;
|
|
98
|
+
}
|
|
99
|
+
export interface CalculateIndividualTaxFeesRequest {
|
|
100
|
+
taxes: TaxDetail[];
|
|
101
|
+
recipientId: string;
|
|
102
|
+
method: PaymentMethods;
|
|
103
|
+
brand?: brandType | undefined;
|
|
104
|
+
installment: number;
|
|
105
|
+
}
|
|
106
|
+
export interface CalculateIndividualTaxFeesResponse {
|
|
107
|
+
feesPerTax: IndividualFeePerTax[];
|
|
108
|
+
totalFee: number;
|
|
109
|
+
totalAmount: number;
|
|
110
|
+
baseFee: number;
|
|
111
|
+
feePercentage: number;
|
|
112
|
+
}
|
|
113
|
+
export interface IndividualFeePerTax {
|
|
114
|
+
taxId: string;
|
|
115
|
+
amount: number;
|
|
116
|
+
fee: number;
|
|
117
|
+
totalAmount: number;
|
|
118
|
+
}
|
|
119
|
+
export declare const PAYMENT_CALCULATOR_PACKAGE_NAME = "paymentCalculator";
|
|
120
|
+
export interface PaymentCalculatorServiceClient {
|
|
121
|
+
calculateInstallments(request: CalculateInstallmentsRequest): Observable<CalculateInstallmentsResponse>;
|
|
122
|
+
getPaymentMethods(request: GetPaymentMethodsRequest): Observable<GetPaymentMethodsResponse>;
|
|
123
|
+
getPrincipalMethod(request: GetPrincipalMethodRequest): Observable<GetPrincipalMethodResponse>;
|
|
124
|
+
calculatePostpayFee(request: CalculatePostpayFeeRequest): Observable<CalculatePostpayFeeResponse>;
|
|
125
|
+
calculateIndividualTaxFees(request: CalculateIndividualTaxFeesRequest): Observable<CalculateIndividualTaxFeesResponse>;
|
|
126
|
+
}
|
|
127
|
+
export interface PaymentCalculatorServiceController {
|
|
128
|
+
calculateInstallments(request: CalculateInstallmentsRequest): Promise<CalculateInstallmentsResponse> | Observable<CalculateInstallmentsResponse> | CalculateInstallmentsResponse;
|
|
129
|
+
getPaymentMethods(request: GetPaymentMethodsRequest): Promise<GetPaymentMethodsResponse> | Observable<GetPaymentMethodsResponse> | GetPaymentMethodsResponse;
|
|
130
|
+
getPrincipalMethod(request: GetPrincipalMethodRequest): Promise<GetPrincipalMethodResponse> | Observable<GetPrincipalMethodResponse> | GetPrincipalMethodResponse;
|
|
131
|
+
calculatePostpayFee(request: CalculatePostpayFeeRequest): Promise<CalculatePostpayFeeResponse> | Observable<CalculatePostpayFeeResponse> | CalculatePostpayFeeResponse;
|
|
132
|
+
calculateIndividualTaxFees(request: CalculateIndividualTaxFeesRequest): Promise<CalculateIndividualTaxFeesResponse> | Observable<CalculateIndividualTaxFeesResponse> | CalculateIndividualTaxFeesResponse;
|
|
133
|
+
}
|
|
134
|
+
export declare function PaymentCalculatorServiceControllerMethods(): (constructor: Function) => void;
|
|
135
|
+
export declare const PAYMENT_CALCULATOR_SERVICE_NAME = "PaymentCalculatorService";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.0
|
|
4
|
+
// protoc v6.32.0
|
|
5
|
+
// source: payment-calculator.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'paymentCalculator';
|
|
8
|
+
export const PAYMENT_CALCULATOR_PACKAGE_NAME = 'paymentCalculator';
|
|
9
|
+
export function PaymentCalculatorServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'calculateInstallments',
|
|
13
|
+
'getPaymentMethods',
|
|
14
|
+
'getPrincipalMethod',
|
|
15
|
+
'calculatePostpayFee',
|
|
16
|
+
'calculateIndividualTaxFees',
|
|
17
|
+
];
|
|
18
|
+
for (const method of grpcMethods) {
|
|
19
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
20
|
+
GrpcMethod('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
|
|
21
|
+
}
|
|
22
|
+
const grpcStreamMethods = [];
|
|
23
|
+
for (const method of grpcStreamMethods) {
|
|
24
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
25
|
+
GrpcStreamMethod('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export const PAYMENT_CALCULATOR_SERVICE_NAME = 'PaymentCalculatorService';
|