@postpaybr/protos 1.1.0
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/package.json +28 -0
- package/src/account-entry.proto +86 -0
- package/src/address.proto +64 -0
- package/src/admin-card-verification.proto +90 -0
- package/src/administrator.proto +192 -0
- package/src/anticipation.proto +86 -0
- package/src/asset.proto +44 -0
- package/src/auth.proto +29 -0
- package/src/bank-account.proto +62 -0
- package/src/card-vault.proto +36 -0
- package/src/card-verification.proto +30 -0
- package/src/card.proto +138 -0
- package/src/charge-schedule.proto +22 -0
- package/src/charge.proto +610 -0
- package/src/context.proto +174 -0
- package/src/customer.proto +234 -0
- package/src/daily-balance.proto +32 -0
- package/src/document-verification.proto +111 -0
- package/src/email.proto +76 -0
- package/src/expo-push.proto +27 -0
- package/src/fee.proto +65 -0
- package/src/location.proto +40 -0
- package/src/notification.proto +207 -0
- package/src/order.proto +189 -0
- package/src/payable.proto +246 -0
- package/src/payer.proto +24 -0
- package/src/payment-calculator.proto +165 -0
- package/src/payment-card.proto +217 -0
- package/src/payment-gateway.proto +94 -0
- package/src/payment-pix.proto +115 -0
- package/src/receipt.proto +212 -0
- package/src/recipient-payment-gateway.proto +101 -0
- package/src/recipient.proto +237 -0
- package/src/role.proto +57 -0
- package/src/sms.proto +36 -0
- package/src/tax.proto +323 -0
- package/src/transfer.proto +206 -0
- package/src/two-factor.proto +67 -0
- package/src/typescript/account-entry.ts +177 -0
- package/src/typescript/address.ts +133 -0
- package/src/typescript/admin-card-verification.ts +181 -0
- package/src/typescript/administrator.ts +375 -0
- package/src/typescript/anticipation.ts +187 -0
- package/src/typescript/asset.ts +123 -0
- package/src/typescript/auth.ts +84 -0
- package/src/typescript/bank-account.ts +157 -0
- package/src/typescript/card-vault.ts +92 -0
- package/src/typescript/card-verification.ts +93 -0
- package/src/typescript/card.ts +283 -0
- package/src/typescript/charge-schedule.ts +86 -0
- package/src/typescript/charge.ts +930 -0
- package/src/typescript/context.ts +296 -0
- package/src/typescript/customer.ts +425 -0
- package/src/typescript/daily-balance.ts +94 -0
- package/src/typescript/document-verification.ts +219 -0
- package/src/typescript/email.ts +183 -0
- package/src/typescript/expo-push.ts +75 -0
- package/src/typescript/fee.ts +131 -0
- package/src/typescript/location.ts +96 -0
- package/src/typescript/notification.ts +372 -0
- package/src/typescript/order.ts +311 -0
- package/src/typescript/payable.ts +414 -0
- package/src/typescript/payer.ts +68 -0
- package/src/typescript/payment-calculator.ts +252 -0
- package/src/typescript/payment-card.ts +290 -0
- package/src/typescript/payment-gateway.ts +209 -0
- package/src/typescript/payment-pix.ts +170 -0
- package/src/typescript/receipt.ts +344 -0
- package/src/typescript/recipient-payment-gateway.ts +209 -0
- package/src/typescript/recipient.ts +413 -0
- package/src/typescript/role.ts +144 -0
- package/src/typescript/sms.ts +96 -0
- package/src/typescript/tax.ts +463 -0
- package/src/typescript/transfer.ts +260 -0
- package/src/typescript/two-factor.ts +177 -0
- package/src/typescript/user.ts +413 -0
- package/src/typescript/wallet.ts +63 -0
- package/src/user.proto +214 -0
- package/src/wallet.proto +18 -0
|
@@ -0,0 +1,209 @@
|
|
|
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.1
|
|
5
|
+
// source: recipient-payment-gateway.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import {
|
|
9
|
+
GatewayIdentification,
|
|
10
|
+
PaymentGatewayType,
|
|
11
|
+
PaymentMethods,
|
|
12
|
+
} from '@postpaybr/contracts/types';
|
|
13
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
14
|
+
import { Observable } from 'rxjs';
|
|
15
|
+
|
|
16
|
+
export const protobufPackage = 'recipientPaymentGateway';
|
|
17
|
+
|
|
18
|
+
export interface RecipientPaymentGateway {
|
|
19
|
+
id: string;
|
|
20
|
+
paymentGatewayId: string;
|
|
21
|
+
gatewayId: GatewayIdentification;
|
|
22
|
+
type: PaymentGatewayType;
|
|
23
|
+
isPixEnabled: boolean;
|
|
24
|
+
isCreditCardEnabled: boolean;
|
|
25
|
+
isDebitCardEnabled: boolean;
|
|
26
|
+
isAutomaticAnticipationEnabled: boolean;
|
|
27
|
+
isManualAnticipationEnabled: boolean;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface PaymentGateway {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
gatewayId: string;
|
|
36
|
+
supportsPix: boolean;
|
|
37
|
+
supportsCreditCard: boolean;
|
|
38
|
+
supportsDebitCard: boolean;
|
|
39
|
+
supportsAutomaticAnticipation: boolean;
|
|
40
|
+
supportsManualAnticipation: boolean;
|
|
41
|
+
isActive: boolean;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface RecipientPaymentGatewayResponse {
|
|
47
|
+
recipientPaymentGateway: RecipientPaymentGateway | undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface RecipientPaymentGatewayListResponse {
|
|
51
|
+
recipientPaymentGateways: RecipientPaymentGateway[] | undefined;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface PaymentGatewayListResponse {
|
|
55
|
+
gateways: PaymentGateway[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface GatewayIdentificationListResponse {
|
|
59
|
+
gateways: string[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface CreateRecipientPaymentGatewayRequest {
|
|
63
|
+
recipientId: string;
|
|
64
|
+
paymentGatewayId: string;
|
|
65
|
+
type: PaymentGatewayType;
|
|
66
|
+
isPixEnabled: boolean;
|
|
67
|
+
isCreditCardEnabled: boolean;
|
|
68
|
+
isDebitCardEnabled: boolean;
|
|
69
|
+
isAutomaticAnticipationEnabled: boolean;
|
|
70
|
+
isManualAnticipationEnabled: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface DeleteRecipientPaymentGatewayRequest {
|
|
74
|
+
id: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface GetGatewayByRecipientAndTypeRequest {
|
|
78
|
+
recipientId: string;
|
|
79
|
+
method: PaymentMethods;
|
|
80
|
+
type: PaymentGatewayType;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface GetAvailableGatewaysRequest {
|
|
84
|
+
method: PaymentMethods;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Void {}
|
|
88
|
+
|
|
89
|
+
export interface TableFilterParams {
|
|
90
|
+
pageIndex?: number | undefined;
|
|
91
|
+
pageSize?: number | undefined;
|
|
92
|
+
status?: string[];
|
|
93
|
+
globalFilter?: string | undefined;
|
|
94
|
+
startDate?: Date | undefined;
|
|
95
|
+
endDate?: Date | undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface GetRecipientPaymentGatewaysByRecipientIdRequest {
|
|
99
|
+
recipientId: string;
|
|
100
|
+
filter: TableFilterParams | undefined;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const RECIPIENT_PAYMENT_GATEWAY_PACKAGE_NAME = 'recipientPaymentGateway';
|
|
104
|
+
|
|
105
|
+
export interface RecipientPaymentGatewayServiceClient {
|
|
106
|
+
createRecipientPaymentGateway(
|
|
107
|
+
request: CreateRecipientPaymentGatewayRequest,
|
|
108
|
+
): Observable<RecipientPaymentGatewayResponse>;
|
|
109
|
+
|
|
110
|
+
deleteRecipientPaymentGateway(
|
|
111
|
+
request: DeleteRecipientPaymentGatewayRequest,
|
|
112
|
+
): Observable<Void>;
|
|
113
|
+
|
|
114
|
+
getGatewayByRecipientAndType(
|
|
115
|
+
request: GetGatewayByRecipientAndTypeRequest,
|
|
116
|
+
): Observable<RecipientPaymentGatewayResponse>;
|
|
117
|
+
|
|
118
|
+
getAvailableGateways(
|
|
119
|
+
request: GetAvailableGatewaysRequest,
|
|
120
|
+
): Observable<PaymentGatewayListResponse>;
|
|
121
|
+
|
|
122
|
+
listGatewayIdentifications(
|
|
123
|
+
request: Void,
|
|
124
|
+
): Observable<GatewayIdentificationListResponse>;
|
|
125
|
+
|
|
126
|
+
getRecipientPaymentGatewaysByRecipientId(
|
|
127
|
+
request: GetRecipientPaymentGatewaysByRecipientIdRequest,
|
|
128
|
+
): Observable<RecipientPaymentGatewayListResponse>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface RecipientPaymentGatewayServiceController {
|
|
132
|
+
createRecipientPaymentGateway(
|
|
133
|
+
request: CreateRecipientPaymentGatewayRequest,
|
|
134
|
+
):
|
|
135
|
+
| Promise<RecipientPaymentGatewayResponse>
|
|
136
|
+
| Observable<RecipientPaymentGatewayResponse>
|
|
137
|
+
| RecipientPaymentGatewayResponse;
|
|
138
|
+
|
|
139
|
+
deleteRecipientPaymentGateway(
|
|
140
|
+
request: DeleteRecipientPaymentGatewayRequest,
|
|
141
|
+
): Promise<Void> | Observable<Void> | Void;
|
|
142
|
+
|
|
143
|
+
getGatewayByRecipientAndType(
|
|
144
|
+
request: GetGatewayByRecipientAndTypeRequest,
|
|
145
|
+
):
|
|
146
|
+
| Promise<RecipientPaymentGatewayResponse>
|
|
147
|
+
| Observable<RecipientPaymentGatewayResponse>
|
|
148
|
+
| RecipientPaymentGatewayResponse;
|
|
149
|
+
|
|
150
|
+
getAvailableGateways(
|
|
151
|
+
request: GetAvailableGatewaysRequest,
|
|
152
|
+
):
|
|
153
|
+
| Promise<PaymentGatewayListResponse>
|
|
154
|
+
| Observable<PaymentGatewayListResponse>
|
|
155
|
+
| PaymentGatewayListResponse;
|
|
156
|
+
|
|
157
|
+
listGatewayIdentifications(
|
|
158
|
+
request: Void,
|
|
159
|
+
):
|
|
160
|
+
| Promise<GatewayIdentificationListResponse>
|
|
161
|
+
| Observable<GatewayIdentificationListResponse>
|
|
162
|
+
| GatewayIdentificationListResponse;
|
|
163
|
+
|
|
164
|
+
getRecipientPaymentGatewaysByRecipientId(
|
|
165
|
+
request: GetRecipientPaymentGatewaysByRecipientIdRequest,
|
|
166
|
+
):
|
|
167
|
+
| Promise<RecipientPaymentGatewayListResponse>
|
|
168
|
+
| Observable<RecipientPaymentGatewayListResponse>
|
|
169
|
+
| RecipientPaymentGatewayListResponse;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function RecipientPaymentGatewayServiceControllerMethods() {
|
|
173
|
+
return function (constructor: Function) {
|
|
174
|
+
const grpcMethods: string[] = [
|
|
175
|
+
'createRecipientPaymentGateway',
|
|
176
|
+
'deleteRecipientPaymentGateway',
|
|
177
|
+
'getGatewayByRecipientAndType',
|
|
178
|
+
'getAvailableGateways',
|
|
179
|
+
'listGatewayIdentifications',
|
|
180
|
+
'getRecipientPaymentGatewaysByRecipientId',
|
|
181
|
+
];
|
|
182
|
+
for (const method of grpcMethods) {
|
|
183
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
184
|
+
constructor.prototype,
|
|
185
|
+
method,
|
|
186
|
+
);
|
|
187
|
+
GrpcMethod('RecipientPaymentGatewayService', method)(
|
|
188
|
+
constructor.prototype[method],
|
|
189
|
+
method,
|
|
190
|
+
descriptor,
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
const grpcStreamMethods: string[] = [];
|
|
194
|
+
for (const method of grpcStreamMethods) {
|
|
195
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
196
|
+
constructor.prototype,
|
|
197
|
+
method,
|
|
198
|
+
);
|
|
199
|
+
GrpcStreamMethod('RecipientPaymentGatewayService', method)(
|
|
200
|
+
constructor.prototype[method],
|
|
201
|
+
method,
|
|
202
|
+
descriptor,
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export const RECIPIENT_PAYMENT_GATEWAY_SERVICE_NAME =
|
|
209
|
+
'RecipientPaymentGatewayService';
|
|
@@ -0,0 +1,413 @@
|
|
|
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.1
|
|
5
|
+
// source: recipient.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import {
|
|
9
|
+
BankAccountType,
|
|
10
|
+
HolderType,
|
|
11
|
+
RecipientLegalType,
|
|
12
|
+
} from '@postpaybr/contracts/enums';
|
|
13
|
+
import { GatewayIdentification } from '@postpaybr/contracts/types';
|
|
14
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
15
|
+
import { Observable } from 'rxjs';
|
|
16
|
+
|
|
17
|
+
export const protobufPackage = 'recipient';
|
|
18
|
+
|
|
19
|
+
export interface Recipient {
|
|
20
|
+
id: string;
|
|
21
|
+
code: string;
|
|
22
|
+
commercialName: string;
|
|
23
|
+
socialReason: string;
|
|
24
|
+
holderType: HolderType;
|
|
25
|
+
document: string;
|
|
26
|
+
cnaeId: string;
|
|
27
|
+
avatarUrl: string;
|
|
28
|
+
legalType: RecipientLegalType;
|
|
29
|
+
foundation: string;
|
|
30
|
+
contactName: string;
|
|
31
|
+
contactEmail: string;
|
|
32
|
+
contactPhone: string;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
updatedAt: Date;
|
|
35
|
+
addressId: string;
|
|
36
|
+
isActive: boolean;
|
|
37
|
+
providerStatus: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface RecipientResponse {
|
|
41
|
+
recipient: Recipient | undefined;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GetRecipientByIdRequest {
|
|
45
|
+
id: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface GetRecipientByCodeRequest {
|
|
49
|
+
code: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface GetRecipientNameByIdRequest {
|
|
53
|
+
id: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface RecipientNameResponse {
|
|
57
|
+
name: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Void {}
|
|
61
|
+
|
|
62
|
+
export interface GetAllRecipientsResponse {
|
|
63
|
+
recipients: Recipient[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface GetRecipientFeesRequest {
|
|
67
|
+
id: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface Fee {
|
|
71
|
+
id: string;
|
|
72
|
+
method: string;
|
|
73
|
+
type: string;
|
|
74
|
+
base: number;
|
|
75
|
+
percentage: number;
|
|
76
|
+
promotionalBase: number;
|
|
77
|
+
promotionalPercentage: number;
|
|
78
|
+
description: string;
|
|
79
|
+
installment: number;
|
|
80
|
+
isDefault: boolean;
|
|
81
|
+
brand: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface RecipientFeesResponse {
|
|
85
|
+
fees: Fee[];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface GetRecipientGatewaysRequest {
|
|
89
|
+
id: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface RecipientGateway {
|
|
93
|
+
id: string;
|
|
94
|
+
type: string;
|
|
95
|
+
isAutomaticAnticipationEnabled: boolean;
|
|
96
|
+
isManualAnticipationEnabled: boolean;
|
|
97
|
+
isPixEnabled: boolean;
|
|
98
|
+
isCreditCardEnabled: boolean;
|
|
99
|
+
isDebitCardEnabled: boolean;
|
|
100
|
+
createdAt: Date;
|
|
101
|
+
updatedAt: Date;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface RecipientGatewaysResponse {
|
|
105
|
+
gateways: RecipientGateway[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface ImageData {
|
|
109
|
+
mimetype: string;
|
|
110
|
+
buffer: Uint8Array;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface UpdateRecipientAvatarRequest {
|
|
114
|
+
id: string;
|
|
115
|
+
avatar: ImageData | undefined;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface GetRecipientDetailsByIdRequest {
|
|
119
|
+
id: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface Address {
|
|
123
|
+
id: string;
|
|
124
|
+
zipCode: string;
|
|
125
|
+
street: string;
|
|
126
|
+
number: string;
|
|
127
|
+
complement: string;
|
|
128
|
+
neighborhood: string;
|
|
129
|
+
city: string;
|
|
130
|
+
state: string;
|
|
131
|
+
nickname: string;
|
|
132
|
+
reference: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface BankAccount {
|
|
136
|
+
id: string;
|
|
137
|
+
bankCompeCode: number;
|
|
138
|
+
agency: string;
|
|
139
|
+
account: string;
|
|
140
|
+
digitAccount: string;
|
|
141
|
+
balance: number;
|
|
142
|
+
pixKey?: string;
|
|
143
|
+
holderType: HolderType;
|
|
144
|
+
accountType: BankAccountType;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface Representative {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
email: string;
|
|
151
|
+
phone: string;
|
|
152
|
+
document: string;
|
|
153
|
+
birthDate: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface RecipientDetailsResponse {
|
|
157
|
+
recipient: Recipient | undefined;
|
|
158
|
+
address: Address | undefined;
|
|
159
|
+
bankAccount: BankAccount | undefined;
|
|
160
|
+
representative: Representative | undefined;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface CreateRecipientRequest {
|
|
164
|
+
code: string;
|
|
165
|
+
commercialName: string;
|
|
166
|
+
socialReason: string;
|
|
167
|
+
holderType: HolderType;
|
|
168
|
+
document: string;
|
|
169
|
+
cnaeId: string;
|
|
170
|
+
legalType: RecipientLegalType;
|
|
171
|
+
contactName: string;
|
|
172
|
+
contactEmail: string;
|
|
173
|
+
contactPhone: string;
|
|
174
|
+
foundation: string;
|
|
175
|
+
address: CreateAddressDto | undefined;
|
|
176
|
+
bankAccount: CreateBankAccountDto | undefined;
|
|
177
|
+
representative: CreateRepresentativeDto | undefined;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface CreateAddressDto {
|
|
181
|
+
state: string;
|
|
182
|
+
city: string;
|
|
183
|
+
zipCode: string;
|
|
184
|
+
neighborhood: string;
|
|
185
|
+
street: string;
|
|
186
|
+
number: string;
|
|
187
|
+
nickname?: string | undefined;
|
|
188
|
+
complement?: string | undefined;
|
|
189
|
+
recipientId?: string | undefined;
|
|
190
|
+
reference?: string | undefined;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface CreateBankAccountDto {
|
|
194
|
+
bankCompeCode: number;
|
|
195
|
+
holderType: HolderType;
|
|
196
|
+
agency: string;
|
|
197
|
+
account: string;
|
|
198
|
+
digitAccount: string;
|
|
199
|
+
accountType: BankAccountType;
|
|
200
|
+
pixKey?: string | undefined;
|
|
201
|
+
balance?: number;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface CreateRepresentativeDto {
|
|
205
|
+
name: string;
|
|
206
|
+
email: string;
|
|
207
|
+
phone: string;
|
|
208
|
+
document: string;
|
|
209
|
+
birthDate: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface UpdateRecipientRequest {
|
|
213
|
+
id: string;
|
|
214
|
+
data: CreateRecipientRequest | undefined;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface IsAutomaticAnticipationEnabledRequest {
|
|
218
|
+
recipientId: string;
|
|
219
|
+
gatewayId: GatewayIdentification;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface IsAutomaticAnticipationEnabledResponse {
|
|
223
|
+
isEnabled: boolean;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface GetExternalRecipientIdRequest {
|
|
227
|
+
recipientId: string;
|
|
228
|
+
gatewayId: GatewayIdentification;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface GetExternalRecipientIdResponse {
|
|
232
|
+
externalRecipientId: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export const RECIPIENT_PACKAGE_NAME = 'recipient';
|
|
236
|
+
|
|
237
|
+
export interface RecipientServiceClient {
|
|
238
|
+
createRecipient(
|
|
239
|
+
request: CreateRecipientRequest,
|
|
240
|
+
): Observable<RecipientResponse>;
|
|
241
|
+
|
|
242
|
+
updateRecipient(
|
|
243
|
+
request: UpdateRecipientRequest,
|
|
244
|
+
): Observable<RecipientResponse>;
|
|
245
|
+
|
|
246
|
+
getRecipientById(
|
|
247
|
+
request: GetRecipientByIdRequest,
|
|
248
|
+
): Observable<RecipientResponse>;
|
|
249
|
+
|
|
250
|
+
getRecipientByCode(
|
|
251
|
+
request: GetRecipientByCodeRequest,
|
|
252
|
+
): Observable<RecipientResponse>;
|
|
253
|
+
|
|
254
|
+
getRecipientNameById(
|
|
255
|
+
request: GetRecipientNameByIdRequest,
|
|
256
|
+
): Observable<RecipientNameResponse>;
|
|
257
|
+
|
|
258
|
+
getAllRecipients(request: Void): Observable<GetAllRecipientsResponse>;
|
|
259
|
+
|
|
260
|
+
getRecipientFees(
|
|
261
|
+
request: GetRecipientFeesRequest,
|
|
262
|
+
): Observable<RecipientFeesResponse>;
|
|
263
|
+
|
|
264
|
+
getRecipientGateways(
|
|
265
|
+
request: GetRecipientGatewaysRequest,
|
|
266
|
+
): Observable<RecipientGatewaysResponse>;
|
|
267
|
+
|
|
268
|
+
updateRecipientAvatar(
|
|
269
|
+
request: UpdateRecipientAvatarRequest,
|
|
270
|
+
): Observable<RecipientResponse>;
|
|
271
|
+
|
|
272
|
+
getRecipientDetailsById(
|
|
273
|
+
request: GetRecipientDetailsByIdRequest,
|
|
274
|
+
): Observable<RecipientDetailsResponse>;
|
|
275
|
+
|
|
276
|
+
isAutomaticAnticipationEnabled(
|
|
277
|
+
request: IsAutomaticAnticipationEnabledRequest,
|
|
278
|
+
): Observable<IsAutomaticAnticipationEnabledResponse>;
|
|
279
|
+
|
|
280
|
+
getExternalRecipientId(
|
|
281
|
+
request: GetExternalRecipientIdRequest,
|
|
282
|
+
): Observable<GetExternalRecipientIdResponse>;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface RecipientServiceController {
|
|
286
|
+
createRecipient(
|
|
287
|
+
request: CreateRecipientRequest,
|
|
288
|
+
):
|
|
289
|
+
| Promise<RecipientResponse>
|
|
290
|
+
| Observable<RecipientResponse>
|
|
291
|
+
| RecipientResponse;
|
|
292
|
+
|
|
293
|
+
updateRecipient(
|
|
294
|
+
request: UpdateRecipientRequest,
|
|
295
|
+
):
|
|
296
|
+
| Promise<RecipientResponse>
|
|
297
|
+
| Observable<RecipientResponse>
|
|
298
|
+
| RecipientResponse;
|
|
299
|
+
|
|
300
|
+
getRecipientById(
|
|
301
|
+
request: GetRecipientByIdRequest,
|
|
302
|
+
):
|
|
303
|
+
| Promise<RecipientResponse>
|
|
304
|
+
| Observable<RecipientResponse>
|
|
305
|
+
| RecipientResponse;
|
|
306
|
+
|
|
307
|
+
getRecipientByCode(
|
|
308
|
+
request: GetRecipientByCodeRequest,
|
|
309
|
+
):
|
|
310
|
+
| Promise<RecipientResponse>
|
|
311
|
+
| Observable<RecipientResponse>
|
|
312
|
+
| RecipientResponse;
|
|
313
|
+
|
|
314
|
+
getRecipientNameById(
|
|
315
|
+
request: GetRecipientNameByIdRequest,
|
|
316
|
+
):
|
|
317
|
+
| Promise<RecipientNameResponse>
|
|
318
|
+
| Observable<RecipientNameResponse>
|
|
319
|
+
| RecipientNameResponse;
|
|
320
|
+
|
|
321
|
+
getAllRecipients(
|
|
322
|
+
request: Void,
|
|
323
|
+
):
|
|
324
|
+
| Promise<GetAllRecipientsResponse>
|
|
325
|
+
| Observable<GetAllRecipientsResponse>
|
|
326
|
+
| GetAllRecipientsResponse;
|
|
327
|
+
|
|
328
|
+
getRecipientFees(
|
|
329
|
+
request: GetRecipientFeesRequest,
|
|
330
|
+
):
|
|
331
|
+
| Promise<RecipientFeesResponse>
|
|
332
|
+
| Observable<RecipientFeesResponse>
|
|
333
|
+
| RecipientFeesResponse;
|
|
334
|
+
|
|
335
|
+
getRecipientGateways(
|
|
336
|
+
request: GetRecipientGatewaysRequest,
|
|
337
|
+
):
|
|
338
|
+
| Promise<RecipientGatewaysResponse>
|
|
339
|
+
| Observable<RecipientGatewaysResponse>
|
|
340
|
+
| RecipientGatewaysResponse;
|
|
341
|
+
|
|
342
|
+
updateRecipientAvatar(
|
|
343
|
+
request: UpdateRecipientAvatarRequest,
|
|
344
|
+
):
|
|
345
|
+
| Promise<RecipientResponse>
|
|
346
|
+
| Observable<RecipientResponse>
|
|
347
|
+
| RecipientResponse;
|
|
348
|
+
|
|
349
|
+
getRecipientDetailsById(
|
|
350
|
+
request: GetRecipientDetailsByIdRequest,
|
|
351
|
+
):
|
|
352
|
+
| Promise<RecipientDetailsResponse>
|
|
353
|
+
| Observable<RecipientDetailsResponse>
|
|
354
|
+
| RecipientDetailsResponse;
|
|
355
|
+
|
|
356
|
+
isAutomaticAnticipationEnabled(
|
|
357
|
+
request: IsAutomaticAnticipationEnabledRequest,
|
|
358
|
+
):
|
|
359
|
+
| Promise<IsAutomaticAnticipationEnabledResponse>
|
|
360
|
+
| Observable<IsAutomaticAnticipationEnabledResponse>
|
|
361
|
+
| IsAutomaticAnticipationEnabledResponse;
|
|
362
|
+
|
|
363
|
+
getExternalRecipientId(
|
|
364
|
+
request: GetExternalRecipientIdRequest,
|
|
365
|
+
):
|
|
366
|
+
| Promise<GetExternalRecipientIdResponse>
|
|
367
|
+
| Observable<GetExternalRecipientIdResponse>
|
|
368
|
+
| GetExternalRecipientIdResponse;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export function RecipientServiceControllerMethods() {
|
|
372
|
+
return function (constructor: Function) {
|
|
373
|
+
const grpcMethods: string[] = [
|
|
374
|
+
'createRecipient',
|
|
375
|
+
'updateRecipient',
|
|
376
|
+
'getRecipientById',
|
|
377
|
+
'getRecipientByCode',
|
|
378
|
+
'getRecipientNameById',
|
|
379
|
+
'getAllRecipients',
|
|
380
|
+
'getRecipientFees',
|
|
381
|
+
'getRecipientGateways',
|
|
382
|
+
'updateRecipientAvatar',
|
|
383
|
+
'getRecipientDetailsById',
|
|
384
|
+
'isAutomaticAnticipationEnabled',
|
|
385
|
+
'getExternalRecipientId',
|
|
386
|
+
];
|
|
387
|
+
for (const method of grpcMethods) {
|
|
388
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
389
|
+
constructor.prototype,
|
|
390
|
+
method,
|
|
391
|
+
);
|
|
392
|
+
GrpcMethod('RecipientService', method)(
|
|
393
|
+
constructor.prototype[method],
|
|
394
|
+
method,
|
|
395
|
+
descriptor,
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
const grpcStreamMethods: string[] = [];
|
|
399
|
+
for (const method of grpcStreamMethods) {
|
|
400
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
401
|
+
constructor.prototype,
|
|
402
|
+
method,
|
|
403
|
+
);
|
|
404
|
+
GrpcStreamMethod('RecipientService', method)(
|
|
405
|
+
constructor.prototype[method],
|
|
406
|
+
method,
|
|
407
|
+
descriptor,
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export const RECIPIENT_SERVICE_NAME = 'RecipientService';
|