@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.
Files changed (157) hide show
  1. package/dist/typescript/account-entry.d.ts +80 -0
  2. package/dist/typescript/account-entry.js +28 -0
  3. package/dist/typescript/address.d.ts +65 -0
  4. package/dist/typescript/address.js +29 -0
  5. package/dist/typescript/admin-card-verification.d.ts +86 -0
  6. package/dist/typescript/admin-card-verification.js +28 -0
  7. package/dist/typescript/administrator.d.ts +176 -0
  8. package/dist/typescript/administrator.js +37 -0
  9. package/dist/typescript/anticipation.d.ts +84 -0
  10. package/dist/typescript/anticipation.js +30 -0
  11. package/dist/typescript/asset.d.ts +43 -0
  12. package/dist/typescript/asset.js +29 -0
  13. package/dist/typescript/auth.d.ts +28 -0
  14. package/dist/typescript/auth.js +24 -0
  15. package/dist/typescript/bank-account.d.ts +63 -0
  16. package/dist/typescript/bank-account.js +29 -0
  17. package/dist/typescript/card-vault.d.ts +35 -0
  18. package/dist/typescript/card-vault.js +24 -0
  19. package/dist/typescript/card-verification.d.ts +29 -0
  20. package/dist/typescript/card-verification.js +27 -0
  21. package/dist/typescript/card.d.ts +147 -0
  22. package/dist/typescript/card.js +33 -0
  23. package/dist/typescript/charge-schedule.d.ts +35 -0
  24. package/dist/typescript/charge-schedule.js +24 -0
  25. package/dist/typescript/charge.d.ts +538 -0
  26. package/dist/typescript/charge.js +55 -0
  27. package/dist/typescript/context.d.ts +154 -0
  28. package/dist/typescript/context.js +32 -0
  29. package/dist/typescript/customer.d.ts +213 -0
  30. package/dist/typescript/customer.js +39 -0
  31. package/dist/typescript/daily-balance.d.ts +32 -0
  32. package/dist/typescript/daily-balance.js +24 -0
  33. package/dist/typescript/document-verification.d.ts +106 -0
  34. package/dist/typescript/document-verification.js +30 -0
  35. package/dist/typescript/email.d.ts +71 -0
  36. package/dist/typescript/email.js +31 -0
  37. package/dist/typescript/expo-push.d.ts +31 -0
  38. package/dist/typescript/expo-push.js +24 -0
  39. package/dist/typescript/fee.d.ts +66 -0
  40. package/dist/typescript/fee.js +28 -0
  41. package/dist/typescript/location.d.ts +38 -0
  42. package/dist/typescript/location.js +24 -0
  43. package/dist/typescript/notification.d.ts +198 -0
  44. package/dist/typescript/notification.js +35 -0
  45. package/dist/typescript/order.d.ts +173 -0
  46. package/dist/typescript/order.js +34 -0
  47. package/dist/typescript/payable.d.ts +226 -0
  48. package/dist/typescript/payable.js +37 -0
  49. package/dist/typescript/payer.d.ts +23 -0
  50. package/dist/typescript/payer.js +24 -0
  51. package/dist/typescript/payment-calculator.d.ts +135 -0
  52. package/dist/typescript/payment-calculator.js +29 -0
  53. package/dist/typescript/payment-card.d.ts +189 -0
  54. package/dist/typescript/payment-card.js +27 -0
  55. package/dist/typescript/payment-gateway.d.ts +92 -0
  56. package/dist/typescript/payment-gateway.js +31 -0
  57. package/dist/typescript/payment-pix.d.ts +101 -0
  58. package/dist/typescript/payment-pix.js +24 -0
  59. package/dist/typescript/receipt.d.ts +193 -0
  60. package/dist/typescript/receipt.js +33 -0
  61. package/dist/typescript/recipient-payment-gateway.d.ts +95 -0
  62. package/dist/typescript/recipient-payment-gateway.js +30 -0
  63. package/dist/typescript/recipient.d.ts +222 -0
  64. package/dist/typescript/recipient.js +36 -0
  65. package/dist/typescript/role.d.ts +57 -0
  66. package/dist/typescript/role.js +30 -0
  67. package/dist/typescript/sms.d.ts +34 -0
  68. package/dist/typescript/sms.js +24 -0
  69. package/dist/typescript/tax.d.ts +293 -0
  70. package/dist/typescript/tax.js +36 -0
  71. package/dist/typescript/transfer.d.ts +185 -0
  72. package/dist/typescript/transfer.js +23 -0
  73. package/dist/typescript/two-factor.d.ts +66 -0
  74. package/dist/typescript/two-factor.js +30 -0
  75. package/dist/typescript/user.d.ts +196 -0
  76. package/dist/typescript/user.js +41 -0
  77. package/dist/typescript/wallet.d.ts +18 -0
  78. package/dist/typescript/wallet.js +24 -0
  79. package/package.json +11 -9
  80. package/typescript/account-entry.ts +0 -177
  81. package/typescript/address.ts +0 -133
  82. package/typescript/admin-card-verification.ts +0 -181
  83. package/typescript/administrator.ts +0 -375
  84. package/typescript/anticipation.ts +0 -187
  85. package/typescript/asset.ts +0 -123
  86. package/typescript/auth.ts +0 -84
  87. package/typescript/bank-account.ts +0 -157
  88. package/typescript/card-vault.ts +0 -92
  89. package/typescript/card-verification.ts +0 -93
  90. package/typescript/card.ts +0 -283
  91. package/typescript/charge-schedule.ts +0 -86
  92. package/typescript/charge.ts +0 -930
  93. package/typescript/context.ts +0 -296
  94. package/typescript/customer.ts +0 -425
  95. package/typescript/daily-balance.ts +0 -94
  96. package/typescript/document-verification.ts +0 -219
  97. package/typescript/email.ts +0 -183
  98. package/typescript/expo-push.ts +0 -75
  99. package/typescript/fee.ts +0 -131
  100. package/typescript/location.ts +0 -96
  101. package/typescript/notification.ts +0 -372
  102. package/typescript/order.ts +0 -311
  103. package/typescript/payable.ts +0 -414
  104. package/typescript/payer.ts +0 -68
  105. package/typescript/payment-calculator.ts +0 -252
  106. package/typescript/payment-card.ts +0 -289
  107. package/typescript/payment-gateway.ts +0 -209
  108. package/typescript/payment-pix.ts +0 -170
  109. package/typescript/receipt.ts +0 -344
  110. package/typescript/recipient-payment-gateway.ts +0 -209
  111. package/typescript/recipient.ts +0 -413
  112. package/typescript/role.ts +0 -144
  113. package/typescript/sms.ts +0 -96
  114. package/typescript/tax.ts +0 -463
  115. package/typescript/transfer.ts +0 -260
  116. package/typescript/two-factor.ts +0 -177
  117. package/typescript/user.ts +0 -413
  118. package/typescript/wallet.ts +0 -63
  119. /package/{account-entry.proto → src/protos/account-entry.proto} +0 -0
  120. /package/{address.proto → src/protos/address.proto} +0 -0
  121. /package/{admin-card-verification.proto → src/protos/admin-card-verification.proto} +0 -0
  122. /package/{administrator.proto → src/protos/administrator.proto} +0 -0
  123. /package/{anticipation.proto → src/protos/anticipation.proto} +0 -0
  124. /package/{asset.proto → src/protos/asset.proto} +0 -0
  125. /package/{auth.proto → src/protos/auth.proto} +0 -0
  126. /package/{bank-account.proto → src/protos/bank-account.proto} +0 -0
  127. /package/{card-vault.proto → src/protos/card-vault.proto} +0 -0
  128. /package/{card-verification.proto → src/protos/card-verification.proto} +0 -0
  129. /package/{card.proto → src/protos/card.proto} +0 -0
  130. /package/{charge-schedule.proto → src/protos/charge-schedule.proto} +0 -0
  131. /package/{charge.proto → src/protos/charge.proto} +0 -0
  132. /package/{context.proto → src/protos/context.proto} +0 -0
  133. /package/{customer.proto → src/protos/customer.proto} +0 -0
  134. /package/{daily-balance.proto → src/protos/daily-balance.proto} +0 -0
  135. /package/{document-verification.proto → src/protos/document-verification.proto} +0 -0
  136. /package/{email.proto → src/protos/email.proto} +0 -0
  137. /package/{expo-push.proto → src/protos/expo-push.proto} +0 -0
  138. /package/{fee.proto → src/protos/fee.proto} +0 -0
  139. /package/{location.proto → src/protos/location.proto} +0 -0
  140. /package/{notification.proto → src/protos/notification.proto} +0 -0
  141. /package/{order.proto → src/protos/order.proto} +0 -0
  142. /package/{payable.proto → src/protos/payable.proto} +0 -0
  143. /package/{payer.proto → src/protos/payer.proto} +0 -0
  144. /package/{payment-calculator.proto → src/protos/payment-calculator.proto} +0 -0
  145. /package/{payment-card.proto → src/protos/payment-card.proto} +0 -0
  146. /package/{payment-gateway.proto → src/protos/payment-gateway.proto} +0 -0
  147. /package/{payment-pix.proto → src/protos/payment-pix.proto} +0 -0
  148. /package/{receipt.proto → src/protos/receipt.proto} +0 -0
  149. /package/{recipient-payment-gateway.proto → src/protos/recipient-payment-gateway.proto} +0 -0
  150. /package/{recipient.proto → src/protos/recipient.proto} +0 -0
  151. /package/{role.proto → src/protos/role.proto} +0 -0
  152. /package/{sms.proto → src/protos/sms.proto} +0 -0
  153. /package/{tax.proto → src/protos/tax.proto} +0 -0
  154. /package/{transfer.proto → src/protos/transfer.proto} +0 -0
  155. /package/{two-factor.proto → src/protos/two-factor.proto} +0 -0
  156. /package/{user.proto → src/protos/user.proto} +0 -0
  157. /package/{wallet.proto → src/protos/wallet.proto} +0 -0
@@ -1,296 +0,0 @@
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.1
5
- // source: context.proto
6
-
7
- /* eslint-disable */
8
- import {
9
- brandType,
10
- GatewayIdentification,
11
- Meta,
12
- MetaType,
13
- OrderType,
14
- PaymentMethods,
15
- PaymentScheduleType,
16
- TaxStatus,
17
- TaxTypes,
18
- } from '@postpaybr/contracts/types';
19
- import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
20
- import { Observable } from 'rxjs';
21
-
22
- export const protobufPackage = 'context';
23
-
24
- export interface LocationDetails {
25
- document: string;
26
- state: number;
27
- city: number;
28
- year: number;
29
- }
30
-
31
- export interface Tax {
32
- id: string;
33
- type: TaxTypes;
34
- status: TaxStatus;
35
- description: string;
36
- amount: number;
37
- year: number;
38
- dueAt: string;
39
- documentId: string;
40
- code: string;
41
- isSingleQuota: boolean;
42
- quota?: number | undefined;
43
- fee: number;
44
- fine: number;
45
- discountAmount: number;
46
- }
47
-
48
- export interface Payer {
49
- id?: string | undefined;
50
- name: string;
51
- document: string;
52
- phone?: string | undefined;
53
- }
54
-
55
- export interface MetaAddress {
56
- street: string;
57
- complement: string;
58
- city: string;
59
- neighborhood: string;
60
- number: string;
61
- state: string;
62
- zipCode: string;
63
- }
64
-
65
- export interface TaxLocation {
66
- state: number;
67
- city: number;
68
- recipientId: string;
69
- }
70
-
71
- export interface TaxDetail {
72
- tax: Tax | undefined;
73
- payer: Payer | undefined;
74
- location: TaxLocation | undefined;
75
- metaType: MetaType;
76
- meta: Meta | undefined;
77
- }
78
-
79
- export interface PaymentDetails {
80
- method: PaymentMethods;
81
- amount: number;
82
- discountPercentage?: number | undefined;
83
- fee: number;
84
- discountAmount?: number | undefined;
85
- gatewayId?: GatewayIdentification | undefined;
86
- card?: Card | undefined;
87
- paymentSchedule: PaymentSchedule | undefined;
88
- baseFee: number;
89
- feePercentage: number;
90
- chargeId?: string | undefined;
91
- isRetry?: boolean | undefined;
92
- orderId?: string | undefined;
93
- keepData?: boolean | undefined;
94
- }
95
-
96
- export interface PaymentSchedule {
97
- type: PaymentScheduleType;
98
- date?: string | undefined;
99
- }
100
-
101
- export interface Card {
102
- id: string;
103
- shadowNumber: string;
104
- brand: brandType | undefined;
105
- installments?: number | undefined;
106
- installmentValue?: number | undefined;
107
- }
108
-
109
- export interface Context {
110
- taxes?: TaxDetail[];
111
- location?: LocationDetails | undefined;
112
- paymentDetails?: PaymentDetails | undefined;
113
- pushToken?: string | undefined;
114
- }
115
-
116
- export interface GetContextRequest {
117
- customerId: string;
118
- }
119
-
120
- export interface GetContextResponse {
121
- context: Context | undefined;
122
- }
123
-
124
- export interface ClearContextRequest {
125
- customerId: string;
126
- }
127
-
128
- export interface ClearContextResponse {
129
- success: boolean;
130
- }
131
-
132
- export interface PostLocationRequest {
133
- customerId: string;
134
- location: LocationDetails | undefined;
135
- }
136
-
137
- export interface PostTaxesRequest {
138
- customerId: string;
139
- taxes: TaxDetail[];
140
- }
141
-
142
- export interface PostPaymentDetailRequest {
143
- customerId: string;
144
- paymentDetails: PaymentDetails | undefined;
145
- }
146
-
147
- export interface PostPushTokenRequest {
148
- customerId: string;
149
- pushToken: string;
150
- }
151
-
152
- export interface CheckoutRequest {
153
- customerId: string;
154
- }
155
-
156
- export interface Order {
157
- id: string;
158
- totalAmount: number;
159
- status: string;
160
- createdAt: Date;
161
- }
162
-
163
- export interface CheckoutResponse {
164
- order: Order | undefined;
165
- orderType: OrderType;
166
- chargeId?: string | undefined;
167
- }
168
-
169
- export interface PostPaymentDateRequest {
170
- customerId: string;
171
- paymentSchedule: PaymentSchedule | undefined;
172
- }
173
-
174
- export const CONTEXT_PACKAGE_NAME = 'context';
175
-
176
- export interface ContextServiceClient {
177
- getContext(request: GetContextRequest): Observable<GetContextResponse>;
178
-
179
- clearContext(request: ClearContextRequest): Observable<ClearContextResponse>;
180
-
181
- postLocation(request: PostLocationRequest): Observable<ClearContextResponse>;
182
-
183
- postTaxes(request: PostTaxesRequest): Observable<ClearContextResponse>;
184
-
185
- postPaymentDetail(
186
- request: PostPaymentDetailRequest,
187
- ): Observable<ClearContextResponse>;
188
-
189
- postPushToken(
190
- request: PostPushTokenRequest,
191
- ): Observable<ClearContextResponse>;
192
-
193
- checkout(request: CheckoutRequest): Observable<CheckoutResponse>;
194
-
195
- postPaymentDate(
196
- request: PostPaymentDateRequest,
197
- ): Observable<ClearContextResponse>;
198
- }
199
-
200
- export interface ContextServiceController {
201
- getContext(
202
- request: GetContextRequest,
203
- ):
204
- | Promise<GetContextResponse>
205
- | Observable<GetContextResponse>
206
- | GetContextResponse;
207
-
208
- clearContext(
209
- request: ClearContextRequest,
210
- ):
211
- | Promise<ClearContextResponse>
212
- | Observable<ClearContextResponse>
213
- | ClearContextResponse;
214
-
215
- postLocation(
216
- request: PostLocationRequest,
217
- ):
218
- | Promise<ClearContextResponse>
219
- | Observable<ClearContextResponse>
220
- | ClearContextResponse;
221
-
222
- postTaxes(
223
- request: PostTaxesRequest,
224
- ):
225
- | Promise<ClearContextResponse>
226
- | Observable<ClearContextResponse>
227
- | ClearContextResponse;
228
-
229
- postPaymentDetail(
230
- request: PostPaymentDetailRequest,
231
- ):
232
- | Promise<ClearContextResponse>
233
- | Observable<ClearContextResponse>
234
- | ClearContextResponse;
235
-
236
- postPushToken(
237
- request: PostPushTokenRequest,
238
- ):
239
- | Promise<ClearContextResponse>
240
- | Observable<ClearContextResponse>
241
- | ClearContextResponse;
242
-
243
- checkout(
244
- request: CheckoutRequest,
245
- ):
246
- | Promise<CheckoutResponse>
247
- | Observable<CheckoutResponse>
248
- | CheckoutResponse;
249
-
250
- postPaymentDate(
251
- request: PostPaymentDateRequest,
252
- ):
253
- | Promise<ClearContextResponse>
254
- | Observable<ClearContextResponse>
255
- | ClearContextResponse;
256
- }
257
-
258
- export function ContextServiceControllerMethods() {
259
- return function (constructor: Function) {
260
- const grpcMethods: string[] = [
261
- 'getContext',
262
- 'clearContext',
263
- 'postLocation',
264
- 'postTaxes',
265
- 'postPaymentDetail',
266
- 'postPushToken',
267
- 'checkout',
268
- 'postPaymentDate',
269
- ];
270
- for (const method of grpcMethods) {
271
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
272
- constructor.prototype,
273
- method,
274
- );
275
- GrpcMethod('ContextService', method)(
276
- constructor.prototype[method],
277
- method,
278
- descriptor,
279
- );
280
- }
281
- const grpcStreamMethods: string[] = [];
282
- for (const method of grpcStreamMethods) {
283
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
284
- constructor.prototype,
285
- method,
286
- );
287
- GrpcStreamMethod('ContextService', method)(
288
- constructor.prototype[method],
289
- method,
290
- descriptor,
291
- );
292
- }
293
- };
294
- }
295
-
296
- export const CONTEXT_SERVICE_NAME = 'ContextService';
@@ -1,425 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.7.0
4
- // protoc v3.20.3
5
- // source: customer.proto
6
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
9
- import { Observable } from 'rxjs';
10
-
11
- export const protobufPackage = 'customer';
12
-
13
- export interface CreateCustomerRequest {
14
- customer: CustomerSignUp | undefined;
15
- user: UserSignUp | undefined;
16
- }
17
-
18
- export interface CreateCustomerResponse {
19
- success: boolean;
20
- }
21
-
22
- export interface CheckCustomerExistsRequest {
23
- document?: string | undefined;
24
- email?: string | undefined;
25
- phone?: string | undefined;
26
- throwError?: boolean | undefined;
27
- }
28
-
29
- export interface CheckCustomerExistsResponse {
30
- exists: boolean;
31
- }
32
-
33
- export interface GetCustomerByIdRequest {
34
- id: string;
35
- }
36
-
37
- export interface GetCustomerByIdResponse {
38
- customer: Customer | undefined;
39
- }
40
-
41
- export interface GetCustomerByEmailRequest {
42
- email: string;
43
- }
44
-
45
- export interface GetCustomerByEmailResponse {
46
- customer: Customer | undefined;
47
- }
48
-
49
- export interface GetVerifiedCustomerByDocumentRequest {
50
- document: string;
51
- }
52
-
53
- export interface GetVerifiedCustomerByDocumentResponse {
54
- customer: Customer | undefined;
55
- }
56
-
57
- export interface GetProfileRequest {
58
- customerId: string;
59
- }
60
-
61
- export interface GetProfileResponse {
62
- id: string;
63
- firstName: string;
64
- email: string;
65
- phone: string;
66
- document: string;
67
- }
68
-
69
- export interface UpdateCustomerRequest {
70
- customerId: string;
71
- phone?: string | undefined;
72
- firstName?: string | undefined;
73
- email?: string | undefined;
74
- }
75
-
76
- export interface UpdateCustomerResponse {
77
- firstName: string;
78
- phone: string;
79
- email: string;
80
- }
81
-
82
- export interface updateIsEmailVerifiedStatusRequest {
83
- customerId: string;
84
- verified: boolean;
85
- }
86
-
87
- export interface updateIsEmailVerifiedStatusResponse {}
88
-
89
- export interface ChangePinRequest {
90
- customerId: string;
91
- pin: string;
92
- }
93
-
94
- export interface ChangePinResponse {
95
- success: boolean;
96
- }
97
-
98
- export interface CheckIsValidPinRequest {
99
- customerId: string;
100
- pin: string;
101
- }
102
-
103
- export interface CheckIsValidPinResponse {
104
- isValid: boolean;
105
- }
106
-
107
- export interface ValidateAndRefreshTokenRequest {
108
- refreshToken: string;
109
- }
110
-
111
- export interface ValidateAndRefreshTokenResponse {
112
- accessToken: string;
113
- refreshToken: string;
114
- customer: ReducedCustomer | undefined;
115
- }
116
-
117
- export interface ValidateAndSignInRequest {
118
- document: string;
119
- password: string;
120
- }
121
-
122
- export interface ValidateAndSignInResponse {
123
- accessToken: string;
124
- refreshToken: string;
125
- customer: ReducedCustomer | undefined;
126
- }
127
-
128
- export interface ReducedCustomer {
129
- id: string;
130
- firstName: string;
131
- email: string;
132
- lastName: string;
133
- phone: string;
134
- document: string;
135
- }
136
-
137
- export interface Customer {
138
- id: string;
139
- firstName: string;
140
- lastName: string;
141
- document: string;
142
- email: string;
143
- isEmailVerified: boolean;
144
- phone: string;
145
- pin: string;
146
- pinAttempts: number;
147
- }
148
-
149
- export interface CustomerSignUp {
150
- firstName: string;
151
- lastName: string;
152
- document: string;
153
- email: string;
154
- isEmailVerified: boolean;
155
- phone: string;
156
- pin: string;
157
- }
158
-
159
- export interface User {
160
- id: string;
161
- password: string;
162
- role: Role | undefined;
163
- devices: Device[];
164
- }
165
-
166
- export interface UserSignUp {
167
- password: string;
168
- devices: Device[];
169
- }
170
-
171
- export interface Role {
172
- id: string;
173
- code: string;
174
- description: string;
175
- permissions: string[];
176
- }
177
-
178
- export interface Device {
179
- token?: string | undefined;
180
- expoPushToken: string;
181
- }
182
-
183
- export interface GetCustomersWithFiltersRequest {
184
- pageIndex?: number | undefined;
185
- pageSize?: number | undefined;
186
- statuses?: string[];
187
- globalFilter?: string | undefined;
188
- startDate?: Date | undefined;
189
- endDate?: Date | undefined;
190
- }
191
-
192
- export interface GetCustomersWithFiltersResponse {
193
- customers: CustomerWithStatus[];
194
- }
195
-
196
- export interface CustomerWithStatus {
197
- id: string;
198
- name: string;
199
- document: string;
200
- email: string;
201
- phone: string;
202
- userStatus: string;
203
- }
204
-
205
- export interface ImageData {
206
- mimetype: string;
207
- buffer: Uint8Array;
208
- }
209
-
210
- export interface InitiateDocumentVerificationRequest {
211
- customerId: string;
212
- documentFront: ImageData | undefined;
213
- selfieWithDocument: ImageData | undefined;
214
- }
215
-
216
- export interface DocumentVerificationResponse {
217
- id: string;
218
- documentFrontUrl: string;
219
- selfieWithDocumentUrl: string;
220
- reviewDeadline?: Date;
221
- rejectionReasons: string[];
222
- customRejectionReason: string;
223
- }
224
-
225
- export const CUSTOMER_PACKAGE_NAME = 'customer';
226
-
227
- export interface CustomerServiceClient {
228
- createCustomer(
229
- request: CreateCustomerRequest,
230
- ): Observable<CreateCustomerResponse>;
231
-
232
- checkCustomerExists(
233
- request: CheckCustomerExistsRequest,
234
- ): Observable<CheckCustomerExistsResponse>;
235
-
236
- getCustomerById(
237
- request: GetCustomerByIdRequest,
238
- ): Observable<GetCustomerByIdResponse>;
239
-
240
- getCustomerByEmail(
241
- request: GetCustomerByEmailRequest,
242
- ): Observable<GetCustomerByEmailResponse>;
243
-
244
- getVerifiedCustomerByDocument(
245
- request: GetVerifiedCustomerByDocumentRequest,
246
- ): Observable<GetVerifiedCustomerByDocumentResponse>;
247
-
248
- getProfile(request: GetProfileRequest): Observable<GetProfileResponse>;
249
-
250
- updateCustomer(
251
- request: UpdateCustomerRequest,
252
- ): Observable<UpdateCustomerResponse>;
253
-
254
- updateIsEmailVerifiedStatus(
255
- request: updateIsEmailVerifiedStatusRequest,
256
- ): Observable<updateIsEmailVerifiedStatusResponse>;
257
-
258
- changePin(request: ChangePinRequest): Observable<ChangePinResponse>;
259
-
260
- checkIsValidPin(
261
- request: CheckIsValidPinRequest,
262
- ): Observable<CheckIsValidPinResponse>;
263
-
264
- validateAndSignIn(
265
- request: ValidateAndSignInRequest,
266
- ): Observable<ValidateAndSignInResponse>;
267
-
268
- validateAndRefreshToken(
269
- request: ValidateAndRefreshTokenRequest,
270
- ): Observable<ValidateAndRefreshTokenResponse>;
271
-
272
- getCustomersWithFilters(
273
- request: GetCustomersWithFiltersRequest,
274
- ): Observable<GetCustomersWithFiltersResponse>;
275
-
276
- initiateDocumentVerification(
277
- request: InitiateDocumentVerificationRequest,
278
- ): Observable<DocumentVerificationResponse>;
279
- }
280
-
281
- export interface CustomerServiceController {
282
- createCustomer(
283
- request: CreateCustomerRequest,
284
- ):
285
- | Promise<CreateCustomerResponse>
286
- | Observable<CreateCustomerResponse>
287
- | CreateCustomerResponse;
288
-
289
- checkCustomerExists(
290
- request: CheckCustomerExistsRequest,
291
- ):
292
- | Promise<CheckCustomerExistsResponse>
293
- | Observable<CheckCustomerExistsResponse>
294
- | CheckCustomerExistsResponse;
295
-
296
- getCustomerById(
297
- request: GetCustomerByIdRequest,
298
- ):
299
- | Promise<GetCustomerByIdResponse>
300
- | Observable<GetCustomerByIdResponse>
301
- | GetCustomerByIdResponse;
302
-
303
- getCustomerByEmail(
304
- request: GetCustomerByEmailRequest,
305
- ):
306
- | Promise<GetCustomerByEmailResponse>
307
- | Observable<GetCustomerByEmailResponse>
308
- | GetCustomerByEmailResponse;
309
-
310
- getVerifiedCustomerByDocument(
311
- request: GetVerifiedCustomerByDocumentRequest,
312
- ):
313
- | Promise<GetVerifiedCustomerByDocumentResponse>
314
- | Observable<GetVerifiedCustomerByDocumentResponse>
315
- | GetVerifiedCustomerByDocumentResponse;
316
-
317
- getProfile(
318
- request: GetProfileRequest,
319
- ):
320
- | Promise<GetProfileResponse>
321
- | Observable<GetProfileResponse>
322
- | GetProfileResponse;
323
-
324
- updateCustomer(
325
- request: UpdateCustomerRequest,
326
- ):
327
- | Promise<UpdateCustomerResponse>
328
- | Observable<UpdateCustomerResponse>
329
- | UpdateCustomerResponse;
330
-
331
- updateIsEmailVerifiedStatus(
332
- request: updateIsEmailVerifiedStatusRequest,
333
- ):
334
- | Promise<updateIsEmailVerifiedStatusResponse>
335
- | Observable<updateIsEmailVerifiedStatusResponse>
336
- | updateIsEmailVerifiedStatusResponse;
337
-
338
- changePin(
339
- request: ChangePinRequest,
340
- ):
341
- | Promise<ChangePinResponse>
342
- | Observable<ChangePinResponse>
343
- | ChangePinResponse;
344
-
345
- checkIsValidPin(
346
- request: CheckIsValidPinRequest,
347
- ):
348
- | Promise<CheckIsValidPinResponse>
349
- | Observable<CheckIsValidPinResponse>
350
- | CheckIsValidPinResponse;
351
-
352
- validateAndSignIn(
353
- request: ValidateAndSignInRequest,
354
- ):
355
- | Promise<ValidateAndSignInResponse>
356
- | Observable<ValidateAndSignInResponse>
357
- | ValidateAndSignInResponse;
358
-
359
- validateAndRefreshToken(
360
- request: ValidateAndRefreshTokenRequest,
361
- ):
362
- | Promise<ValidateAndRefreshTokenResponse>
363
- | Observable<ValidateAndRefreshTokenResponse>
364
- | ValidateAndRefreshTokenResponse;
365
-
366
- getCustomersWithFilters(
367
- request: GetCustomersWithFiltersRequest,
368
- ):
369
- | Promise<GetCustomersWithFiltersResponse>
370
- | Observable<GetCustomersWithFiltersResponse>
371
- | GetCustomersWithFiltersResponse;
372
-
373
- initiateDocumentVerification(
374
- request: InitiateDocumentVerificationRequest,
375
- ):
376
- | Promise<DocumentVerificationResponse>
377
- | Observable<DocumentVerificationResponse>
378
- | DocumentVerificationResponse;
379
- }
380
-
381
- export function CustomerServiceControllerMethods() {
382
- return function (constructor: Function) {
383
- const grpcMethods: string[] = [
384
- 'createCustomer',
385
- 'checkCustomerExists',
386
- 'getCustomerById',
387
- 'getCustomerByEmail',
388
- 'getVerifiedCustomerByDocument',
389
- 'getProfile',
390
- 'updateCustomer',
391
- 'updateIsEmailVerifiedStatus',
392
- 'changePin',
393
- 'checkIsValidPin',
394
- 'validateAndSignIn',
395
- 'validateAndRefreshToken',
396
- 'getCustomersWithFilters',
397
- 'initiateDocumentVerification',
398
- ];
399
- for (const method of grpcMethods) {
400
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
401
- constructor.prototype,
402
- method,
403
- );
404
- GrpcMethod('CustomerService', method)(
405
- constructor.prototype[method],
406
- method,
407
- descriptor,
408
- );
409
- }
410
- const grpcStreamMethods: string[] = [];
411
- for (const method of grpcStreamMethods) {
412
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
413
- constructor.prototype,
414
- method,
415
- );
416
- GrpcStreamMethod('CustomerService', method)(
417
- constructor.prototype[method],
418
- method,
419
- descriptor,
420
- );
421
- }
422
- };
423
- }
424
-
425
- export const CUSTOMER_SERVICE_NAME = 'CustomerService';