@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,154 @@
|
|
|
1
|
+
import { brandType, GatewayIdentification, taxMeta, MetaType, OrderType, PaymentMethods, PaymentScheduleType, TaxStatus, TaxTypes } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "context";
|
|
4
|
+
export interface LocationDetails {
|
|
5
|
+
document: string;
|
|
6
|
+
state: number;
|
|
7
|
+
city: number;
|
|
8
|
+
year: number;
|
|
9
|
+
}
|
|
10
|
+
export interface Tax {
|
|
11
|
+
id: string;
|
|
12
|
+
type: TaxTypes;
|
|
13
|
+
status: TaxStatus;
|
|
14
|
+
description: string;
|
|
15
|
+
amount: number;
|
|
16
|
+
year: number;
|
|
17
|
+
dueAt: string;
|
|
18
|
+
documentId: string;
|
|
19
|
+
code: string;
|
|
20
|
+
isSingleQuota: boolean;
|
|
21
|
+
quota?: number | undefined;
|
|
22
|
+
fee: number;
|
|
23
|
+
fine: number;
|
|
24
|
+
discountAmount: number;
|
|
25
|
+
}
|
|
26
|
+
export interface Payer {
|
|
27
|
+
id?: string | undefined;
|
|
28
|
+
name: string;
|
|
29
|
+
document: string;
|
|
30
|
+
phone?: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface MetaAddress {
|
|
33
|
+
street: string;
|
|
34
|
+
complement: string;
|
|
35
|
+
city: string;
|
|
36
|
+
neighborhood: string;
|
|
37
|
+
number: string;
|
|
38
|
+
state: string;
|
|
39
|
+
zipCode: string;
|
|
40
|
+
}
|
|
41
|
+
export interface TaxLocation {
|
|
42
|
+
state: number;
|
|
43
|
+
city: number;
|
|
44
|
+
recipientId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface TaxDetail {
|
|
47
|
+
tax: Tax | undefined;
|
|
48
|
+
payer: Payer | undefined;
|
|
49
|
+
location: TaxLocation | undefined;
|
|
50
|
+
metaType: MetaType;
|
|
51
|
+
meta: taxMeta | undefined;
|
|
52
|
+
}
|
|
53
|
+
export interface PaymentDetails {
|
|
54
|
+
method: PaymentMethods;
|
|
55
|
+
amount: number;
|
|
56
|
+
discountPercentage?: number | undefined;
|
|
57
|
+
fee: number;
|
|
58
|
+
discountAmount?: number | undefined;
|
|
59
|
+
gatewayId?: GatewayIdentification | undefined;
|
|
60
|
+
card?: Card | undefined;
|
|
61
|
+
paymentSchedule: PaymentSchedule | undefined;
|
|
62
|
+
baseFee: number;
|
|
63
|
+
feePercentage: number;
|
|
64
|
+
chargeId?: string | undefined;
|
|
65
|
+
isRetry?: boolean | undefined;
|
|
66
|
+
orderId?: string | undefined;
|
|
67
|
+
keepData?: boolean | undefined;
|
|
68
|
+
}
|
|
69
|
+
export interface PaymentSchedule {
|
|
70
|
+
type: PaymentScheduleType;
|
|
71
|
+
date?: string | undefined;
|
|
72
|
+
}
|
|
73
|
+
export interface Card {
|
|
74
|
+
id: string;
|
|
75
|
+
shadowNumber: string;
|
|
76
|
+
brand: brandType | undefined;
|
|
77
|
+
installments?: number | undefined;
|
|
78
|
+
installmentValue?: number | undefined;
|
|
79
|
+
}
|
|
80
|
+
export interface Context {
|
|
81
|
+
taxes?: TaxDetail[];
|
|
82
|
+
location?: LocationDetails | undefined;
|
|
83
|
+
paymentDetails?: PaymentDetails | undefined;
|
|
84
|
+
pushToken?: string | undefined;
|
|
85
|
+
}
|
|
86
|
+
export interface GetContextRequest {
|
|
87
|
+
customerId: string;
|
|
88
|
+
}
|
|
89
|
+
export interface GetContextResponse {
|
|
90
|
+
context: Context | undefined;
|
|
91
|
+
}
|
|
92
|
+
export interface ClearContextRequest {
|
|
93
|
+
customerId: string;
|
|
94
|
+
}
|
|
95
|
+
export interface ClearContextResponse {
|
|
96
|
+
success: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface PostLocationRequest {
|
|
99
|
+
customerId: string;
|
|
100
|
+
location: LocationDetails | undefined;
|
|
101
|
+
}
|
|
102
|
+
export interface PostTaxesRequest {
|
|
103
|
+
customerId: string;
|
|
104
|
+
taxes: TaxDetail[];
|
|
105
|
+
}
|
|
106
|
+
export interface PostPaymentDetailRequest {
|
|
107
|
+
customerId: string;
|
|
108
|
+
paymentDetails: PaymentDetails | undefined;
|
|
109
|
+
}
|
|
110
|
+
export interface PostPushTokenRequest {
|
|
111
|
+
customerId: string;
|
|
112
|
+
pushToken: string;
|
|
113
|
+
}
|
|
114
|
+
export interface CheckoutRequest {
|
|
115
|
+
customerId: string;
|
|
116
|
+
}
|
|
117
|
+
export interface Order {
|
|
118
|
+
id: string;
|
|
119
|
+
totalAmount: number;
|
|
120
|
+
status: string;
|
|
121
|
+
createdAt: Date;
|
|
122
|
+
}
|
|
123
|
+
export interface CheckoutResponse {
|
|
124
|
+
order: Order | undefined;
|
|
125
|
+
orderType: OrderType;
|
|
126
|
+
chargeId?: string | undefined;
|
|
127
|
+
}
|
|
128
|
+
export interface PostPaymentDateRequest {
|
|
129
|
+
customerId: string;
|
|
130
|
+
paymentSchedule: PaymentSchedule | undefined;
|
|
131
|
+
}
|
|
132
|
+
export declare const CONTEXT_PACKAGE_NAME = "context";
|
|
133
|
+
export interface ContextServiceClient {
|
|
134
|
+
getContext(request: GetContextRequest): Observable<GetContextResponse>;
|
|
135
|
+
clearContext(request: ClearContextRequest): Observable<ClearContextResponse>;
|
|
136
|
+
postLocation(request: PostLocationRequest): Observable<ClearContextResponse>;
|
|
137
|
+
postTaxes(request: PostTaxesRequest): Observable<ClearContextResponse>;
|
|
138
|
+
postPaymentDetail(request: PostPaymentDetailRequest): Observable<ClearContextResponse>;
|
|
139
|
+
postPushToken(request: PostPushTokenRequest): Observable<ClearContextResponse>;
|
|
140
|
+
checkout(request: CheckoutRequest): Observable<CheckoutResponse>;
|
|
141
|
+
postPaymentDate(request: PostPaymentDateRequest): Observable<ClearContextResponse>;
|
|
142
|
+
}
|
|
143
|
+
export interface ContextServiceController {
|
|
144
|
+
getContext(request: GetContextRequest): Promise<GetContextResponse> | Observable<GetContextResponse> | GetContextResponse;
|
|
145
|
+
clearContext(request: ClearContextRequest): Promise<ClearContextResponse> | Observable<ClearContextResponse> | ClearContextResponse;
|
|
146
|
+
postLocation(request: PostLocationRequest): Promise<ClearContextResponse> | Observable<ClearContextResponse> | ClearContextResponse;
|
|
147
|
+
postTaxes(request: PostTaxesRequest): Promise<ClearContextResponse> | Observable<ClearContextResponse> | ClearContextResponse;
|
|
148
|
+
postPaymentDetail(request: PostPaymentDetailRequest): Promise<ClearContextResponse> | Observable<ClearContextResponse> | ClearContextResponse;
|
|
149
|
+
postPushToken(request: PostPushTokenRequest): Promise<ClearContextResponse> | Observable<ClearContextResponse> | ClearContextResponse;
|
|
150
|
+
checkout(request: CheckoutRequest): Promise<CheckoutResponse> | Observable<CheckoutResponse> | CheckoutResponse;
|
|
151
|
+
postPaymentDate(request: PostPaymentDateRequest): Promise<ClearContextResponse> | Observable<ClearContextResponse> | ClearContextResponse;
|
|
152
|
+
}
|
|
153
|
+
export declare function ContextServiceControllerMethods(): (constructor: Function) => void;
|
|
154
|
+
export declare const CONTEXT_SERVICE_NAME = "ContextService";
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'context';
|
|
8
|
+
export const CONTEXT_PACKAGE_NAME = 'context';
|
|
9
|
+
export function ContextServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'getContext',
|
|
13
|
+
'clearContext',
|
|
14
|
+
'postLocation',
|
|
15
|
+
'postTaxes',
|
|
16
|
+
'postPaymentDetail',
|
|
17
|
+
'postPushToken',
|
|
18
|
+
'checkout',
|
|
19
|
+
'postPaymentDate',
|
|
20
|
+
];
|
|
21
|
+
for (const method of grpcMethods) {
|
|
22
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
23
|
+
GrpcMethod('ContextService', method)(constructor.prototype[method], method, descriptor);
|
|
24
|
+
}
|
|
25
|
+
const grpcStreamMethods = [];
|
|
26
|
+
for (const method of grpcStreamMethods) {
|
|
27
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
28
|
+
GrpcStreamMethod('ContextService', method)(constructor.prototype[method], method, descriptor);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export const CONTEXT_SERVICE_NAME = 'ContextService';
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare const protobufPackage = "customer";
|
|
3
|
+
export interface CreateCustomerRequest {
|
|
4
|
+
customer: CustomerSignUp | undefined;
|
|
5
|
+
user: UserSignUp | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateCustomerResponse {
|
|
8
|
+
success: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface CheckCustomerExistsRequest {
|
|
11
|
+
document?: string | undefined;
|
|
12
|
+
email?: string | undefined;
|
|
13
|
+
phone?: string | undefined;
|
|
14
|
+
throwError?: boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface CheckCustomerExistsResponse {
|
|
17
|
+
exists: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface GetCustomerByIdRequest {
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetCustomerByIdResponse {
|
|
23
|
+
customer: Customer | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface GetCustomerByEmailRequest {
|
|
26
|
+
email: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GetCustomerByEmailResponse {
|
|
29
|
+
customer: Customer | undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface GetVerifiedCustomerByDocumentRequest {
|
|
32
|
+
document: string;
|
|
33
|
+
}
|
|
34
|
+
export interface GetVerifiedCustomerByDocumentResponse {
|
|
35
|
+
customer: Customer | undefined;
|
|
36
|
+
}
|
|
37
|
+
export interface GetProfileRequest {
|
|
38
|
+
customerId: string;
|
|
39
|
+
}
|
|
40
|
+
export interface GetProfileResponse {
|
|
41
|
+
id: string;
|
|
42
|
+
firstName: string;
|
|
43
|
+
email: string;
|
|
44
|
+
phone: string;
|
|
45
|
+
document: string;
|
|
46
|
+
}
|
|
47
|
+
export interface UpdateCustomerRequest {
|
|
48
|
+
customerId: string;
|
|
49
|
+
phone?: string | undefined;
|
|
50
|
+
firstName?: string | undefined;
|
|
51
|
+
email?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
export interface UpdateCustomerResponse {
|
|
54
|
+
firstName: string;
|
|
55
|
+
phone: string;
|
|
56
|
+
email: string;
|
|
57
|
+
}
|
|
58
|
+
export interface updateIsEmailVerifiedStatusRequest {
|
|
59
|
+
customerId: string;
|
|
60
|
+
verified: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface updateIsEmailVerifiedStatusResponse {
|
|
63
|
+
}
|
|
64
|
+
export interface ChangePinRequest {
|
|
65
|
+
customerId: string;
|
|
66
|
+
pin: string;
|
|
67
|
+
}
|
|
68
|
+
export interface ChangePinResponse {
|
|
69
|
+
success: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface CheckIsValidPinRequest {
|
|
72
|
+
customerId: string;
|
|
73
|
+
pin: string;
|
|
74
|
+
}
|
|
75
|
+
export interface CheckIsValidPinResponse {
|
|
76
|
+
isValid: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface ValidateAndRefreshTokenRequest {
|
|
79
|
+
refreshToken: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ValidateAndRefreshTokenResponse {
|
|
82
|
+
accessToken: string;
|
|
83
|
+
refreshToken: string;
|
|
84
|
+
customer: ReducedCustomer | undefined;
|
|
85
|
+
}
|
|
86
|
+
export interface ValidateAndSignInRequest {
|
|
87
|
+
document: string;
|
|
88
|
+
password: string;
|
|
89
|
+
}
|
|
90
|
+
export interface ValidateAndSignInResponse {
|
|
91
|
+
accessToken: string;
|
|
92
|
+
refreshToken: string;
|
|
93
|
+
customer: ReducedCustomer | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface ReducedCustomer {
|
|
96
|
+
id: string;
|
|
97
|
+
firstName: string;
|
|
98
|
+
email: string;
|
|
99
|
+
lastName: string;
|
|
100
|
+
phone: string;
|
|
101
|
+
document: string;
|
|
102
|
+
}
|
|
103
|
+
export interface Customer {
|
|
104
|
+
id: string;
|
|
105
|
+
firstName: string;
|
|
106
|
+
lastName: string;
|
|
107
|
+
document: string;
|
|
108
|
+
email: string;
|
|
109
|
+
isEmailVerified: boolean;
|
|
110
|
+
phone: string;
|
|
111
|
+
pin: string;
|
|
112
|
+
pinAttempts: number;
|
|
113
|
+
}
|
|
114
|
+
export interface CustomerSignUp {
|
|
115
|
+
firstName: string;
|
|
116
|
+
lastName: string;
|
|
117
|
+
document: string;
|
|
118
|
+
email: string;
|
|
119
|
+
isEmailVerified: boolean;
|
|
120
|
+
phone: string;
|
|
121
|
+
pin: string;
|
|
122
|
+
}
|
|
123
|
+
export interface User {
|
|
124
|
+
id: string;
|
|
125
|
+
password: string;
|
|
126
|
+
role: Role | undefined;
|
|
127
|
+
devices: Device[];
|
|
128
|
+
}
|
|
129
|
+
export interface UserSignUp {
|
|
130
|
+
password: string;
|
|
131
|
+
devices: Device[];
|
|
132
|
+
}
|
|
133
|
+
export interface Role {
|
|
134
|
+
id: string;
|
|
135
|
+
code: string;
|
|
136
|
+
description: string;
|
|
137
|
+
permissions: string[];
|
|
138
|
+
}
|
|
139
|
+
export interface Device {
|
|
140
|
+
token?: string | undefined;
|
|
141
|
+
expoPushToken: string;
|
|
142
|
+
}
|
|
143
|
+
export interface GetCustomersWithFiltersRequest {
|
|
144
|
+
pageIndex?: number | undefined;
|
|
145
|
+
pageSize?: number | undefined;
|
|
146
|
+
statuses?: string[];
|
|
147
|
+
globalFilter?: string | undefined;
|
|
148
|
+
startDate?: Date | undefined;
|
|
149
|
+
endDate?: Date | undefined;
|
|
150
|
+
}
|
|
151
|
+
export interface GetCustomersWithFiltersResponse {
|
|
152
|
+
customers: CustomerWithStatus[];
|
|
153
|
+
}
|
|
154
|
+
export interface CustomerWithStatus {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
document: string;
|
|
158
|
+
email: string;
|
|
159
|
+
phone: string;
|
|
160
|
+
userStatus: string;
|
|
161
|
+
}
|
|
162
|
+
export interface ImageData {
|
|
163
|
+
mimetype: string;
|
|
164
|
+
buffer: Uint8Array;
|
|
165
|
+
}
|
|
166
|
+
export interface InitiateDocumentVerificationRequest {
|
|
167
|
+
customerId: string;
|
|
168
|
+
documentFront: ImageData | undefined;
|
|
169
|
+
selfieWithDocument: ImageData | undefined;
|
|
170
|
+
}
|
|
171
|
+
export interface DocumentVerificationResponse {
|
|
172
|
+
id: string;
|
|
173
|
+
documentFrontUrl: string;
|
|
174
|
+
selfieWithDocumentUrl: string;
|
|
175
|
+
reviewDeadline?: Date;
|
|
176
|
+
rejectionReasons: string[];
|
|
177
|
+
customRejectionReason: string;
|
|
178
|
+
}
|
|
179
|
+
export declare const CUSTOMER_PACKAGE_NAME = "customer";
|
|
180
|
+
export interface CustomerServiceClient {
|
|
181
|
+
createCustomer(request: CreateCustomerRequest): Observable<CreateCustomerResponse>;
|
|
182
|
+
checkCustomerExists(request: CheckCustomerExistsRequest): Observable<CheckCustomerExistsResponse>;
|
|
183
|
+
getCustomerById(request: GetCustomerByIdRequest): Observable<GetCustomerByIdResponse>;
|
|
184
|
+
getCustomerByEmail(request: GetCustomerByEmailRequest): Observable<GetCustomerByEmailResponse>;
|
|
185
|
+
getVerifiedCustomerByDocument(request: GetVerifiedCustomerByDocumentRequest): Observable<GetVerifiedCustomerByDocumentResponse>;
|
|
186
|
+
getProfile(request: GetProfileRequest): Observable<GetProfileResponse>;
|
|
187
|
+
updateCustomer(request: UpdateCustomerRequest): Observable<UpdateCustomerResponse>;
|
|
188
|
+
updateIsEmailVerifiedStatus(request: updateIsEmailVerifiedStatusRequest): Observable<updateIsEmailVerifiedStatusResponse>;
|
|
189
|
+
changePin(request: ChangePinRequest): Observable<ChangePinResponse>;
|
|
190
|
+
checkIsValidPin(request: CheckIsValidPinRequest): Observable<CheckIsValidPinResponse>;
|
|
191
|
+
validateAndSignIn(request: ValidateAndSignInRequest): Observable<ValidateAndSignInResponse>;
|
|
192
|
+
validateAndRefreshToken(request: ValidateAndRefreshTokenRequest): Observable<ValidateAndRefreshTokenResponse>;
|
|
193
|
+
getCustomersWithFilters(request: GetCustomersWithFiltersRequest): Observable<GetCustomersWithFiltersResponse>;
|
|
194
|
+
initiateDocumentVerification(request: InitiateDocumentVerificationRequest): Observable<DocumentVerificationResponse>;
|
|
195
|
+
}
|
|
196
|
+
export interface CustomerServiceController {
|
|
197
|
+
createCustomer(request: CreateCustomerRequest): Promise<CreateCustomerResponse> | Observable<CreateCustomerResponse> | CreateCustomerResponse;
|
|
198
|
+
checkCustomerExists(request: CheckCustomerExistsRequest): Promise<CheckCustomerExistsResponse> | Observable<CheckCustomerExistsResponse> | CheckCustomerExistsResponse;
|
|
199
|
+
getCustomerById(request: GetCustomerByIdRequest): Promise<GetCustomerByIdResponse> | Observable<GetCustomerByIdResponse> | GetCustomerByIdResponse;
|
|
200
|
+
getCustomerByEmail(request: GetCustomerByEmailRequest): Promise<GetCustomerByEmailResponse> | Observable<GetCustomerByEmailResponse> | GetCustomerByEmailResponse;
|
|
201
|
+
getVerifiedCustomerByDocument(request: GetVerifiedCustomerByDocumentRequest): Promise<GetVerifiedCustomerByDocumentResponse> | Observable<GetVerifiedCustomerByDocumentResponse> | GetVerifiedCustomerByDocumentResponse;
|
|
202
|
+
getProfile(request: GetProfileRequest): Promise<GetProfileResponse> | Observable<GetProfileResponse> | GetProfileResponse;
|
|
203
|
+
updateCustomer(request: UpdateCustomerRequest): Promise<UpdateCustomerResponse> | Observable<UpdateCustomerResponse> | UpdateCustomerResponse;
|
|
204
|
+
updateIsEmailVerifiedStatus(request: updateIsEmailVerifiedStatusRequest): Promise<updateIsEmailVerifiedStatusResponse> | Observable<updateIsEmailVerifiedStatusResponse> | updateIsEmailVerifiedStatusResponse;
|
|
205
|
+
changePin(request: ChangePinRequest): Promise<ChangePinResponse> | Observable<ChangePinResponse> | ChangePinResponse;
|
|
206
|
+
checkIsValidPin(request: CheckIsValidPinRequest): Promise<CheckIsValidPinResponse> | Observable<CheckIsValidPinResponse> | CheckIsValidPinResponse;
|
|
207
|
+
validateAndSignIn(request: ValidateAndSignInRequest): Promise<ValidateAndSignInResponse> | Observable<ValidateAndSignInResponse> | ValidateAndSignInResponse;
|
|
208
|
+
validateAndRefreshToken(request: ValidateAndRefreshTokenRequest): Promise<ValidateAndRefreshTokenResponse> | Observable<ValidateAndRefreshTokenResponse> | ValidateAndRefreshTokenResponse;
|
|
209
|
+
getCustomersWithFilters(request: GetCustomersWithFiltersRequest): Promise<GetCustomersWithFiltersResponse> | Observable<GetCustomersWithFiltersResponse> | GetCustomersWithFiltersResponse;
|
|
210
|
+
initiateDocumentVerification(request: InitiateDocumentVerificationRequest): Promise<DocumentVerificationResponse> | Observable<DocumentVerificationResponse> | DocumentVerificationResponse;
|
|
211
|
+
}
|
|
212
|
+
export declare function CustomerServiceControllerMethods(): (constructor: Function) => void;
|
|
213
|
+
export declare const CUSTOMER_SERVICE_NAME = "CustomerService";
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/* eslint-disable */
|
|
7
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
8
|
+
export const protobufPackage = 'customer';
|
|
9
|
+
export const CUSTOMER_PACKAGE_NAME = 'customer';
|
|
10
|
+
export function CustomerServiceControllerMethods() {
|
|
11
|
+
return function (constructor) {
|
|
12
|
+
const grpcMethods = [
|
|
13
|
+
'createCustomer',
|
|
14
|
+
'checkCustomerExists',
|
|
15
|
+
'getCustomerById',
|
|
16
|
+
'getCustomerByEmail',
|
|
17
|
+
'getVerifiedCustomerByDocument',
|
|
18
|
+
'getProfile',
|
|
19
|
+
'updateCustomer',
|
|
20
|
+
'updateIsEmailVerifiedStatus',
|
|
21
|
+
'changePin',
|
|
22
|
+
'checkIsValidPin',
|
|
23
|
+
'validateAndSignIn',
|
|
24
|
+
'validateAndRefreshToken',
|
|
25
|
+
'getCustomersWithFilters',
|
|
26
|
+
'initiateDocumentVerification',
|
|
27
|
+
];
|
|
28
|
+
for (const method of grpcMethods) {
|
|
29
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
30
|
+
GrpcMethod('CustomerService', method)(constructor.prototype[method], method, descriptor);
|
|
31
|
+
}
|
|
32
|
+
const grpcStreamMethods = [];
|
|
33
|
+
for (const method of grpcStreamMethods) {
|
|
34
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
35
|
+
GrpcStreamMethod('CustomerService', method)(constructor.prototype[method], method, descriptor);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export const CUSTOMER_SERVICE_NAME = 'CustomerService';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare const protobufPackage = "dailyBalance";
|
|
3
|
+
export interface GetBalanceHistoryRequest {
|
|
4
|
+
recipientId: string;
|
|
5
|
+
startDate: Date;
|
|
6
|
+
endDate: Date;
|
|
7
|
+
}
|
|
8
|
+
export interface DailyBalance {
|
|
9
|
+
date: Date;
|
|
10
|
+
balance: number;
|
|
11
|
+
}
|
|
12
|
+
export interface GetBalanceHistoryResponse {
|
|
13
|
+
dailyBalances: DailyBalance[];
|
|
14
|
+
}
|
|
15
|
+
export interface getCurrentBalanceRequest {
|
|
16
|
+
recipientId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface getCurrentBalanceResponse {
|
|
19
|
+
balance: number;
|
|
20
|
+
lastUpdate: Date;
|
|
21
|
+
}
|
|
22
|
+
export declare const DAILY_BALANCE_PACKAGE_NAME = "dailyBalance";
|
|
23
|
+
export interface DailyBalanceServiceClient {
|
|
24
|
+
getBalanceHistory(request: GetBalanceHistoryRequest): Observable<GetBalanceHistoryResponse>;
|
|
25
|
+
getCurrentBalance(request: getCurrentBalanceRequest): Observable<getCurrentBalanceResponse>;
|
|
26
|
+
}
|
|
27
|
+
export interface DailyBalanceServiceController {
|
|
28
|
+
getBalanceHistory(request: GetBalanceHistoryRequest): Promise<GetBalanceHistoryResponse> | Observable<GetBalanceHistoryResponse> | GetBalanceHistoryResponse;
|
|
29
|
+
getCurrentBalance(request: getCurrentBalanceRequest): Promise<getCurrentBalanceResponse> | Observable<getCurrentBalanceResponse> | getCurrentBalanceResponse;
|
|
30
|
+
}
|
|
31
|
+
export declare function DailyBalanceServiceControllerMethods(): (constructor: Function) => void;
|
|
32
|
+
export declare const DAILY_BALANCE_SERVICE_NAME = "DailyBalanceService";
|
|
@@ -0,0 +1,24 @@
|
|
|
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: daily-balance.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
8
|
+
export const protobufPackage = 'dailyBalance';
|
|
9
|
+
export const DAILY_BALANCE_PACKAGE_NAME = 'dailyBalance';
|
|
10
|
+
export function DailyBalanceServiceControllerMethods() {
|
|
11
|
+
return function (constructor) {
|
|
12
|
+
const grpcMethods = ['getBalanceHistory', 'getCurrentBalance'];
|
|
13
|
+
for (const method of grpcMethods) {
|
|
14
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
15
|
+
GrpcMethod('DailyBalanceService', 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('DailyBalanceService', method)(constructor.prototype[method], method, descriptor);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export const DAILY_BALANCE_SERVICE_NAME = 'DailyBalanceService';
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { DocumentRejectionReason, VerificationStatus } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "documentVerification";
|
|
4
|
+
export interface UpdateDocumentVerificationStatusRequest {
|
|
5
|
+
id: string;
|
|
6
|
+
status: VerificationStatus;
|
|
7
|
+
rejectionReasons?: DocumentRejectionReason[];
|
|
8
|
+
customRejectionReason?: string | undefined;
|
|
9
|
+
reviewerId?: string | undefined;
|
|
10
|
+
actedById: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DocumentVerificationResponse {
|
|
13
|
+
id: string;
|
|
14
|
+
documentFrontUrl: string;
|
|
15
|
+
selfieWithDocumentUrl: string;
|
|
16
|
+
rejectionReasons: DocumentRejectionReason[];
|
|
17
|
+
customRejectionReason: string;
|
|
18
|
+
}
|
|
19
|
+
export interface GetVerificationsWithDetailsRequest {
|
|
20
|
+
status: VerificationStatus;
|
|
21
|
+
offset?: number | undefined;
|
|
22
|
+
limit?: number | undefined;
|
|
23
|
+
startDate?: Date | undefined;
|
|
24
|
+
endDate?: Date | undefined;
|
|
25
|
+
reviewerIds: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface GetDocumentVerificationsWithDetailsResponse {
|
|
28
|
+
data: DocumentVerificationWithDetails[];
|
|
29
|
+
total: number;
|
|
30
|
+
currentCount: number;
|
|
31
|
+
order: string;
|
|
32
|
+
}
|
|
33
|
+
export interface DocumentVerificationWithDetails {
|
|
34
|
+
id: string;
|
|
35
|
+
customerName: string;
|
|
36
|
+
document: string;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
reviewDeadline: string;
|
|
39
|
+
latestHistoryCreatedAt: Date;
|
|
40
|
+
status: VerificationStatus;
|
|
41
|
+
lastReviewer: Reviewer | undefined;
|
|
42
|
+
}
|
|
43
|
+
export interface GetVerificationDetailsByIdRequest {
|
|
44
|
+
id: string;
|
|
45
|
+
}
|
|
46
|
+
export interface DocumentVerificationDetailsResponse {
|
|
47
|
+
id: string;
|
|
48
|
+
document: string;
|
|
49
|
+
customerName: string;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
currentStatus: VerificationStatus;
|
|
52
|
+
documentFrontUrl?: string | undefined;
|
|
53
|
+
selfieWithDocumentUrl?: string | undefined;
|
|
54
|
+
elapsedBusinessTime?: string | undefined;
|
|
55
|
+
lastReviewer?: Reviewer | undefined;
|
|
56
|
+
histories?: VerificationHistoryWithDetails[];
|
|
57
|
+
rejectionReasons?: DocumentRejectionReason[];
|
|
58
|
+
customRejectionReason?: string | undefined;
|
|
59
|
+
finalDecisionAt?: Date | undefined;
|
|
60
|
+
}
|
|
61
|
+
export interface Reviewer {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
}
|
|
65
|
+
export interface VerificationHistoryWithDetails {
|
|
66
|
+
id: string;
|
|
67
|
+
status: VerificationStatus;
|
|
68
|
+
createdAt: Date;
|
|
69
|
+
reviewedBy: string;
|
|
70
|
+
actedBy: string;
|
|
71
|
+
}
|
|
72
|
+
export interface Empty {
|
|
73
|
+
}
|
|
74
|
+
export interface CountResponse {
|
|
75
|
+
count: number;
|
|
76
|
+
}
|
|
77
|
+
export interface Reviewers {
|
|
78
|
+
id: string;
|
|
79
|
+
name: string;
|
|
80
|
+
}
|
|
81
|
+
export interface GetDistinctReviewersResponse {
|
|
82
|
+
reviewers: Reviewers[];
|
|
83
|
+
}
|
|
84
|
+
export interface UndoLastStatusChangeRequest {
|
|
85
|
+
verificationId: string;
|
|
86
|
+
actedById: string;
|
|
87
|
+
}
|
|
88
|
+
export declare const DOCUMENT_VERIFICATION_PACKAGE_NAME = "documentVerification";
|
|
89
|
+
export interface DocumentVerificationServiceClient {
|
|
90
|
+
updateVerificationStatus(request: UpdateDocumentVerificationStatusRequest): Observable<DocumentVerificationResponse>;
|
|
91
|
+
getDocumentVerificationsWithDetails(request: GetVerificationsWithDetailsRequest): Observable<GetDocumentVerificationsWithDetailsResponse>;
|
|
92
|
+
getDocumentVerificationDetailsById(request: GetVerificationDetailsByIdRequest): Observable<DocumentVerificationDetailsResponse>;
|
|
93
|
+
countPendingOrInProgressVerifications(request: Empty): Observable<CountResponse>;
|
|
94
|
+
getDistinctReviewers(request: Empty): Observable<GetDistinctReviewersResponse>;
|
|
95
|
+
undoLastStatusChange(request: UndoLastStatusChangeRequest): Observable<DocumentVerificationResponse>;
|
|
96
|
+
}
|
|
97
|
+
export interface DocumentVerificationServiceController {
|
|
98
|
+
updateVerificationStatus(request: UpdateDocumentVerificationStatusRequest): Promise<DocumentVerificationResponse> | Observable<DocumentVerificationResponse> | DocumentVerificationResponse;
|
|
99
|
+
getDocumentVerificationsWithDetails(request: GetVerificationsWithDetailsRequest): Promise<GetDocumentVerificationsWithDetailsResponse> | Observable<GetDocumentVerificationsWithDetailsResponse> | GetDocumentVerificationsWithDetailsResponse;
|
|
100
|
+
getDocumentVerificationDetailsById(request: GetVerificationDetailsByIdRequest): Promise<DocumentVerificationDetailsResponse> | Observable<DocumentVerificationDetailsResponse> | DocumentVerificationDetailsResponse;
|
|
101
|
+
countPendingOrInProgressVerifications(request: Empty): Promise<CountResponse> | Observable<CountResponse> | CountResponse;
|
|
102
|
+
getDistinctReviewers(request: Empty): Promise<GetDistinctReviewersResponse> | Observable<GetDistinctReviewersResponse> | GetDistinctReviewersResponse;
|
|
103
|
+
undoLastStatusChange(request: UndoLastStatusChangeRequest): Promise<DocumentVerificationResponse> | Observable<DocumentVerificationResponse> | DocumentVerificationResponse;
|
|
104
|
+
}
|
|
105
|
+
export declare function DocumentVerificationServiceControllerMethods(): (constructor: Function) => void;
|
|
106
|
+
export declare const DOCUMENT_VERIFICATION_SERVICE_NAME = "DocumentVerificationService";
|
|
@@ -0,0 +1,30 @@
|
|
|
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: document-verification.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'documentVerification';
|
|
8
|
+
export const DOCUMENT_VERIFICATION_PACKAGE_NAME = 'documentVerification';
|
|
9
|
+
export function DocumentVerificationServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'updateVerificationStatus',
|
|
13
|
+
'getDocumentVerificationsWithDetails',
|
|
14
|
+
'getDocumentVerificationDetailsById',
|
|
15
|
+
'countPendingOrInProgressVerifications',
|
|
16
|
+
'getDistinctReviewers',
|
|
17
|
+
'undoLastStatusChange',
|
|
18
|
+
];
|
|
19
|
+
for (const method of grpcMethods) {
|
|
20
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
21
|
+
GrpcMethod('DocumentVerificationService', method)(constructor.prototype[method], method, descriptor);
|
|
22
|
+
}
|
|
23
|
+
const grpcStreamMethods = [];
|
|
24
|
+
for (const method of grpcStreamMethods) {
|
|
25
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
26
|
+
GrpcStreamMethod('DocumentVerificationService', method)(constructor.prototype[method], method, descriptor);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export const DOCUMENT_VERIFICATION_SERVICE_NAME = 'DocumentVerificationService';
|