@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,196 @@
|
|
|
1
|
+
import { AccountType } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { UserStatus } from '@postpaybr/contracts/enums';
|
|
4
|
+
export declare const protobufPackage = "user";
|
|
5
|
+
export interface CreateChangePasswordRequest {
|
|
6
|
+
accountId: string;
|
|
7
|
+
token: string;
|
|
8
|
+
attempts?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface CreateChangePasswordResponse {
|
|
11
|
+
success: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface getChangePasswordByAccountIdRequest {
|
|
14
|
+
accountId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface getChangePasswordByAccountIdResponse {
|
|
17
|
+
changePassword: ChangePasswordEntity | undefined;
|
|
18
|
+
}
|
|
19
|
+
export interface VerifyChangePasswordRequest {
|
|
20
|
+
token: string;
|
|
21
|
+
}
|
|
22
|
+
export interface VerifyChangePasswordResponse {
|
|
23
|
+
success: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface UpdateChangePasswordAttemptsRequest {
|
|
26
|
+
id: string;
|
|
27
|
+
attempts: number;
|
|
28
|
+
}
|
|
29
|
+
export interface UpdateChangePasswordAttemptsResponse {
|
|
30
|
+
success: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface ChangePasswordEntity {
|
|
33
|
+
id: string;
|
|
34
|
+
token: string;
|
|
35
|
+
attempts: number;
|
|
36
|
+
isVerified: boolean;
|
|
37
|
+
createdAt: Date;
|
|
38
|
+
user: User | undefined;
|
|
39
|
+
}
|
|
40
|
+
export interface CreateUserRequest {
|
|
41
|
+
password: string;
|
|
42
|
+
devices: CreateDevice[];
|
|
43
|
+
}
|
|
44
|
+
export interface UpdateUserAccountIdRequest {
|
|
45
|
+
userId: string;
|
|
46
|
+
accountId: string;
|
|
47
|
+
accountType: AccountType;
|
|
48
|
+
}
|
|
49
|
+
export interface GetUserByIdRequest {
|
|
50
|
+
id: string;
|
|
51
|
+
}
|
|
52
|
+
export interface GetUserByAccountRequest {
|
|
53
|
+
accountId: string;
|
|
54
|
+
accountType: AccountType;
|
|
55
|
+
}
|
|
56
|
+
export interface SendRecoveryPasswordEmailRequest {
|
|
57
|
+
email: string;
|
|
58
|
+
}
|
|
59
|
+
export interface SendRecoveryPasswordEmailResponse {
|
|
60
|
+
success: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface HandleRecoveryPasswordRequest {
|
|
63
|
+
token: string;
|
|
64
|
+
data: RecoveryPasswordDto | undefined;
|
|
65
|
+
}
|
|
66
|
+
export interface HandleChangePasswordRequest {
|
|
67
|
+
accountId: string;
|
|
68
|
+
accountType: AccountType;
|
|
69
|
+
newPassword: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ChangeStatusRequest {
|
|
72
|
+
accountId: string;
|
|
73
|
+
accountType: AccountType;
|
|
74
|
+
status: UserStatus;
|
|
75
|
+
}
|
|
76
|
+
export interface ChangeStatusResponse {
|
|
77
|
+
success: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface User {
|
|
80
|
+
id: string;
|
|
81
|
+
password: string;
|
|
82
|
+
status: UserStatus;
|
|
83
|
+
roles: Role[];
|
|
84
|
+
accountId: string;
|
|
85
|
+
accountType: AccountType;
|
|
86
|
+
devices: Device[];
|
|
87
|
+
pin: string;
|
|
88
|
+
pinAttempts: number;
|
|
89
|
+
createdAt: Date;
|
|
90
|
+
updatedAt: Date;
|
|
91
|
+
twoFactorEnabled: boolean;
|
|
92
|
+
twoFactorSecret: string | null;
|
|
93
|
+
twoFactorBackupCodes?: string[];
|
|
94
|
+
twoFactorEnabledAt: Date | null;
|
|
95
|
+
}
|
|
96
|
+
export interface Role {
|
|
97
|
+
id: string;
|
|
98
|
+
code: string;
|
|
99
|
+
description: string;
|
|
100
|
+
permissions: string[];
|
|
101
|
+
}
|
|
102
|
+
export interface UserWithDevices {
|
|
103
|
+
user: User | undefined;
|
|
104
|
+
devices: Device[];
|
|
105
|
+
}
|
|
106
|
+
export interface Device {
|
|
107
|
+
id: string;
|
|
108
|
+
token: string;
|
|
109
|
+
expoPushToken: string;
|
|
110
|
+
user: User;
|
|
111
|
+
}
|
|
112
|
+
export interface CreateDevice {
|
|
113
|
+
token?: string;
|
|
114
|
+
expoPushToken: string;
|
|
115
|
+
}
|
|
116
|
+
export interface RecoveryPasswordDto {
|
|
117
|
+
newPassword: string;
|
|
118
|
+
email: string;
|
|
119
|
+
}
|
|
120
|
+
export interface GetUserRolesRequest {
|
|
121
|
+
accountId: string;
|
|
122
|
+
}
|
|
123
|
+
export interface GetUserRolesResponse {
|
|
124
|
+
roles: Role[];
|
|
125
|
+
}
|
|
126
|
+
export interface UpdateUserRolesRequest {
|
|
127
|
+
accountId: string;
|
|
128
|
+
newRoleIds: string[];
|
|
129
|
+
}
|
|
130
|
+
export interface UpdateUserRolesResponse {
|
|
131
|
+
success: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface GetAccountIdsByStatusRequest {
|
|
134
|
+
statuses: string[];
|
|
135
|
+
}
|
|
136
|
+
export interface GetAccountIdsByStatusResponse {
|
|
137
|
+
accountIds: string[];
|
|
138
|
+
}
|
|
139
|
+
export interface GetUserStatusByAccountIdRequest {
|
|
140
|
+
accountId: string;
|
|
141
|
+
}
|
|
142
|
+
export interface GetUserStatusByAccountIdResponse {
|
|
143
|
+
status: UserStatus;
|
|
144
|
+
}
|
|
145
|
+
export interface UpdateUsersStatusByAccountIdsRequest {
|
|
146
|
+
accountIds: string[];
|
|
147
|
+
status: UserStatus;
|
|
148
|
+
}
|
|
149
|
+
export interface UpdateUsersStatusByAccountIdsResponse {
|
|
150
|
+
success: boolean;
|
|
151
|
+
}
|
|
152
|
+
export declare const USER_PACKAGE_NAME = "user";
|
|
153
|
+
export interface UserServiceClient {
|
|
154
|
+
/** Change Password Methods */
|
|
155
|
+
createChangePassword(request: CreateChangePasswordRequest): Observable<CreateChangePasswordResponse>;
|
|
156
|
+
getChangePasswordByAccountId(request: getChangePasswordByAccountIdRequest): Observable<getChangePasswordByAccountIdResponse>;
|
|
157
|
+
verifyChangePassword(request: VerifyChangePasswordRequest): Observable<VerifyChangePasswordResponse>;
|
|
158
|
+
updateChangePasswordAttempts(request: UpdateChangePasswordAttemptsRequest): Observable<UpdateChangePasswordAttemptsResponse>;
|
|
159
|
+
/** User Methods */
|
|
160
|
+
createUser(request: CreateUserRequest): Observable<UserWithDevices>;
|
|
161
|
+
updateUserAccountId(request: UpdateUserAccountIdRequest): Observable<User>;
|
|
162
|
+
getUserById(request: GetUserByIdRequest): Observable<User>;
|
|
163
|
+
getUserByAccount(request: GetUserByAccountRequest): Observable<User>;
|
|
164
|
+
sendRecoveryPasswordEmail(request: SendRecoveryPasswordEmailRequest): Observable<SendRecoveryPasswordEmailResponse>;
|
|
165
|
+
handleRecoveryPassword(request: HandleRecoveryPasswordRequest): Observable<User>;
|
|
166
|
+
handleChangePassword(request: HandleChangePasswordRequest): Observable<User>;
|
|
167
|
+
changeStatus(request: ChangeStatusRequest): Observable<ChangeStatusResponse>;
|
|
168
|
+
getUserRoles(request: GetUserRolesRequest): Observable<GetUserRolesResponse>;
|
|
169
|
+
updateUserRoles(request: UpdateUserRolesRequest): Observable<UpdateUserRolesResponse>;
|
|
170
|
+
getAccountIdsByStatus(request: GetAccountIdsByStatusRequest): Observable<GetAccountIdsByStatusResponse>;
|
|
171
|
+
getUserStatusByAccountId(request: GetUserStatusByAccountIdRequest): Observable<GetUserStatusByAccountIdResponse>;
|
|
172
|
+
updateUsersStatusByAccountIds(request: UpdateUsersStatusByAccountIdsRequest): Observable<UpdateUsersStatusByAccountIdsResponse>;
|
|
173
|
+
}
|
|
174
|
+
export interface UserServiceController {
|
|
175
|
+
/** Change Password Methods */
|
|
176
|
+
createChangePassword(request: CreateChangePasswordRequest): Promise<CreateChangePasswordResponse> | Observable<CreateChangePasswordResponse> | CreateChangePasswordResponse;
|
|
177
|
+
getChangePasswordByAccountId(request: getChangePasswordByAccountIdRequest): Promise<getChangePasswordByAccountIdResponse> | Observable<getChangePasswordByAccountIdResponse> | getChangePasswordByAccountIdResponse;
|
|
178
|
+
verifyChangePassword(request: VerifyChangePasswordRequest): Promise<VerifyChangePasswordResponse> | Observable<VerifyChangePasswordResponse> | VerifyChangePasswordResponse;
|
|
179
|
+
updateChangePasswordAttempts(request: UpdateChangePasswordAttemptsRequest): Promise<UpdateChangePasswordAttemptsResponse> | Observable<UpdateChangePasswordAttemptsResponse> | UpdateChangePasswordAttemptsResponse;
|
|
180
|
+
/** User Methods */
|
|
181
|
+
createUser(request: CreateUserRequest): Promise<UserWithDevices> | Observable<UserWithDevices> | UserWithDevices;
|
|
182
|
+
updateUserAccountId(request: UpdateUserAccountIdRequest): Promise<User> | Observable<User> | User;
|
|
183
|
+
getUserById(request: GetUserByIdRequest): Promise<User> | Observable<User> | User;
|
|
184
|
+
getUserByAccount(request: GetUserByAccountRequest): Promise<User> | Observable<User> | User;
|
|
185
|
+
sendRecoveryPasswordEmail(request: SendRecoveryPasswordEmailRequest): Promise<SendRecoveryPasswordEmailResponse> | Observable<SendRecoveryPasswordEmailResponse> | SendRecoveryPasswordEmailResponse;
|
|
186
|
+
handleRecoveryPassword(request: HandleRecoveryPasswordRequest): Promise<User> | Observable<User> | User;
|
|
187
|
+
handleChangePassword(request: HandleChangePasswordRequest): Promise<User> | Observable<User> | User;
|
|
188
|
+
changeStatus(request: ChangeStatusRequest): Promise<ChangeStatusResponse> | Observable<ChangeStatusResponse> | ChangeStatusResponse;
|
|
189
|
+
getUserRoles(request: GetUserRolesRequest): Promise<GetUserRolesResponse> | Observable<GetUserRolesResponse> | GetUserRolesResponse;
|
|
190
|
+
updateUserRoles(request: UpdateUserRolesRequest): Promise<UpdateUserRolesResponse> | Observable<UpdateUserRolesResponse> | UpdateUserRolesResponse;
|
|
191
|
+
getAccountIdsByStatus(request: GetAccountIdsByStatusRequest): Promise<GetAccountIdsByStatusResponse> | Observable<GetAccountIdsByStatusResponse> | GetAccountIdsByStatusResponse;
|
|
192
|
+
getUserStatusByAccountId(request: GetUserStatusByAccountIdRequest): Promise<GetUserStatusByAccountIdResponse> | Observable<GetUserStatusByAccountIdResponse> | GetUserStatusByAccountIdResponse;
|
|
193
|
+
updateUsersStatusByAccountIds(request: UpdateUsersStatusByAccountIdsRequest): Promise<UpdateUsersStatusByAccountIdsResponse> | Observable<UpdateUsersStatusByAccountIdsResponse> | UpdateUsersStatusByAccountIdsResponse;
|
|
194
|
+
}
|
|
195
|
+
export declare function UserServiceControllerMethods(): (constructor: Function) => void;
|
|
196
|
+
export declare const USER_SERVICE_NAME = "UserService";
|
|
@@ -0,0 +1,41 @@
|
|
|
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: user.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'user';
|
|
8
|
+
export const USER_PACKAGE_NAME = 'user';
|
|
9
|
+
export function UserServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'createChangePassword',
|
|
13
|
+
'getChangePasswordByAccountId',
|
|
14
|
+
'verifyChangePassword',
|
|
15
|
+
'updateChangePasswordAttempts',
|
|
16
|
+
'createUser',
|
|
17
|
+
'updateUserAccountId',
|
|
18
|
+
'getUserById',
|
|
19
|
+
'getUserByAccount',
|
|
20
|
+
'sendRecoveryPasswordEmail',
|
|
21
|
+
'handleRecoveryPassword',
|
|
22
|
+
'handleChangePassword',
|
|
23
|
+
'changeStatus',
|
|
24
|
+
'getUserRoles',
|
|
25
|
+
'updateUserRoles',
|
|
26
|
+
'getAccountIdsByStatus',
|
|
27
|
+
'getUserStatusByAccountId',
|
|
28
|
+
'updateUsersStatusByAccountIds',
|
|
29
|
+
];
|
|
30
|
+
for (const method of grpcMethods) {
|
|
31
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
32
|
+
GrpcMethod('UserService', method)(constructor.prototype[method], method, descriptor);
|
|
33
|
+
}
|
|
34
|
+
const grpcStreamMethods = [];
|
|
35
|
+
for (const method of grpcStreamMethods) {
|
|
36
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
37
|
+
GrpcStreamMethod('UserService', method)(constructor.prototype[method], method, descriptor);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export const USER_SERVICE_NAME = 'UserService';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare const protobufPackage = "wallet";
|
|
3
|
+
export interface CreateWalletRequest {
|
|
4
|
+
customerId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WalletResponse {
|
|
7
|
+
id: string;
|
|
8
|
+
customerId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const WALLET_PACKAGE_NAME = "wallet";
|
|
11
|
+
export interface WalletServiceClient {
|
|
12
|
+
createWallet(request: CreateWalletRequest): Observable<WalletResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface WalletServiceController {
|
|
15
|
+
createWallet(request: CreateWalletRequest): Promise<WalletResponse> | Observable<WalletResponse> | WalletResponse;
|
|
16
|
+
}
|
|
17
|
+
export declare function WalletServiceControllerMethods(): (constructor: Function) => void;
|
|
18
|
+
export declare const WALLET_SERVICE_NAME = "WalletService";
|
|
@@ -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: wallet.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
8
|
+
export const protobufPackage = 'wallet';
|
|
9
|
+
export const WALLET_PACKAGE_NAME = 'wallet';
|
|
10
|
+
export function WalletServiceControllerMethods() {
|
|
11
|
+
return function (constructor) {
|
|
12
|
+
const grpcMethods = ['createWallet'];
|
|
13
|
+
for (const method of grpcMethods) {
|
|
14
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
15
|
+
GrpcMethod('WalletService', 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('WalletService', method)(constructor.prototype[method], method, descriptor);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export const WALLET_SERVICE_NAME = 'WalletService';
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postpaybr/protos",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "./typescript/index.
|
|
6
|
-
"types": "./typescript/index.ts",
|
|
5
|
+
"main": "./dist/typescript/index.js",
|
|
6
|
+
"types": "./dist/typescript/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"typescript",
|
|
9
|
-
"
|
|
8
|
+
"dist/typescript",
|
|
9
|
+
"src/protos"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"build": "tsc -p src/tsconfig.json",
|
|
13
|
+
"generate:proto": "cross-var npx protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=src/typescript -I=src --ts_proto_opt=nestJs=true %npm_config_proto%",
|
|
14
|
+
"prepublishOnly": "npm run build"
|
|
13
15
|
},
|
|
14
16
|
"dependencies": {
|
|
15
17
|
"@postpaybr/contracts": "latest"
|
|
@@ -20,8 +22,8 @@
|
|
|
20
22
|
"ts-proto": "^2.7.0"
|
|
21
23
|
},
|
|
22
24
|
"exports": {
|
|
23
|
-
".": "./typescript/index.
|
|
24
|
-
"./typescript/*": "./typescript/*",
|
|
25
|
-
"./*.proto": "
|
|
25
|
+
".": "./dist/typescript/index.js",
|
|
26
|
+
"./typescript/*": "./dist/typescript/*",
|
|
27
|
+
"./*.proto": "./src/protos/*.proto"
|
|
26
28
|
}
|
|
27
29
|
}
|
|
@@ -1,177 +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 v6.32.0
|
|
5
|
-
// source: account-entry.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import {
|
|
9
|
-
AccountEntryType,
|
|
10
|
-
ChargeMetadata,
|
|
11
|
-
GatewayIdentification,
|
|
12
|
-
PaymentMethods,
|
|
13
|
-
} from '@postpaybr/contracts/types';
|
|
14
|
-
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
15
|
-
import { Observable } from 'rxjs';
|
|
16
|
-
|
|
17
|
-
export const protobufPackage = 'accountEntry';
|
|
18
|
-
|
|
19
|
-
export interface CreateAccountEntryRequest {
|
|
20
|
-
amount: number;
|
|
21
|
-
type: AccountEntryType;
|
|
22
|
-
description: string;
|
|
23
|
-
bankAccountId: string;
|
|
24
|
-
recipientId: string;
|
|
25
|
-
transferId?: string | undefined;
|
|
26
|
-
chargeId?: string | undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface CreateAccountEntryResponse {
|
|
30
|
-
accountEntry: AccountEntry | undefined;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface CreateAccountEntriesRequest {
|
|
34
|
-
entries: CreateAccountEntryRequest[];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface CreateAccountEntriesResponse {
|
|
38
|
-
accountEntries: AccountEntry[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface GetEntriesByTransferRequest {
|
|
42
|
-
transferId: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface GetEntriesByTransferResponse {
|
|
46
|
-
accountEntries: AccountEntry[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface TableFilterParams {
|
|
50
|
-
pageIndex?: number;
|
|
51
|
-
pageSize?: number;
|
|
52
|
-
status?: string[];
|
|
53
|
-
globalFilter?: string;
|
|
54
|
-
startDate?: Date;
|
|
55
|
-
endDate?: Date;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface GetEntriesByPeriodRequest {
|
|
59
|
-
recipientId: string;
|
|
60
|
-
filter: TableFilterParams | undefined;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface GetEntriesByPeriodResponse {
|
|
64
|
-
accountEntries: AccountEntry[];
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface AccountEntry {
|
|
68
|
-
id: string;
|
|
69
|
-
amount: number;
|
|
70
|
-
type: AccountEntryType;
|
|
71
|
-
description: string;
|
|
72
|
-
bankAccountId: string;
|
|
73
|
-
recipientId: string;
|
|
74
|
-
transferId?: string | undefined;
|
|
75
|
-
chargeId?: string | undefined;
|
|
76
|
-
createdAt: Date;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface Charge {
|
|
80
|
-
id: string;
|
|
81
|
-
amount: number;
|
|
82
|
-
paymentMethod: PaymentMethods;
|
|
83
|
-
txid: string;
|
|
84
|
-
gatewayId: GatewayIdentification;
|
|
85
|
-
metadata: ChargeMetadata;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface DailyBalance {
|
|
89
|
-
date: Date;
|
|
90
|
-
balance: number;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export const ACCOUNT_ENTRY_PACKAGE_NAME = 'accountEntry';
|
|
94
|
-
|
|
95
|
-
export interface AccountEntryServiceClient {
|
|
96
|
-
createAccountEntry(
|
|
97
|
-
request: CreateAccountEntryRequest,
|
|
98
|
-
): Observable<CreateAccountEntryResponse>;
|
|
99
|
-
|
|
100
|
-
createAccountEntries(
|
|
101
|
-
request: CreateAccountEntriesRequest,
|
|
102
|
-
): Observable<CreateAccountEntriesResponse>;
|
|
103
|
-
|
|
104
|
-
getEntriesByTransfer(
|
|
105
|
-
request: GetEntriesByTransferRequest,
|
|
106
|
-
): Observable<GetEntriesByTransferResponse>;
|
|
107
|
-
|
|
108
|
-
getEntriesByPeriod(
|
|
109
|
-
request: GetEntriesByPeriodRequest,
|
|
110
|
-
): Observable<GetEntriesByPeriodResponse>;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface AccountEntryServiceController {
|
|
114
|
-
createAccountEntry(
|
|
115
|
-
request: CreateAccountEntryRequest,
|
|
116
|
-
):
|
|
117
|
-
| Promise<CreateAccountEntryResponse>
|
|
118
|
-
| Observable<CreateAccountEntryResponse>
|
|
119
|
-
| CreateAccountEntryResponse;
|
|
120
|
-
|
|
121
|
-
createAccountEntries(
|
|
122
|
-
request: CreateAccountEntriesRequest,
|
|
123
|
-
):
|
|
124
|
-
| Promise<CreateAccountEntriesResponse>
|
|
125
|
-
| Observable<CreateAccountEntriesResponse>
|
|
126
|
-
| CreateAccountEntriesResponse;
|
|
127
|
-
|
|
128
|
-
getEntriesByTransfer(
|
|
129
|
-
request: GetEntriesByTransferRequest,
|
|
130
|
-
):
|
|
131
|
-
| Promise<GetEntriesByTransferResponse>
|
|
132
|
-
| Observable<GetEntriesByTransferResponse>
|
|
133
|
-
| GetEntriesByTransferResponse;
|
|
134
|
-
|
|
135
|
-
getEntriesByPeriod(
|
|
136
|
-
request: GetEntriesByPeriodRequest,
|
|
137
|
-
):
|
|
138
|
-
| Promise<GetEntriesByPeriodResponse>
|
|
139
|
-
| Observable<GetEntriesByPeriodResponse>
|
|
140
|
-
| GetEntriesByPeriodResponse;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export function AccountEntryServiceControllerMethods() {
|
|
144
|
-
return function (constructor: Function) {
|
|
145
|
-
const grpcMethods: string[] = [
|
|
146
|
-
'createAccountEntry',
|
|
147
|
-
'createAccountEntries',
|
|
148
|
-
'getEntriesByTransfer',
|
|
149
|
-
'getEntriesByPeriod',
|
|
150
|
-
];
|
|
151
|
-
for (const method of grpcMethods) {
|
|
152
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
153
|
-
constructor.prototype,
|
|
154
|
-
method,
|
|
155
|
-
);
|
|
156
|
-
GrpcMethod('AccountEntryService', method)(
|
|
157
|
-
constructor.prototype[method],
|
|
158
|
-
method,
|
|
159
|
-
descriptor,
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
const grpcStreamMethods: string[] = [];
|
|
163
|
-
for (const method of grpcStreamMethods) {
|
|
164
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
165
|
-
constructor.prototype,
|
|
166
|
-
method,
|
|
167
|
-
);
|
|
168
|
-
GrpcStreamMethod('AccountEntryService', method)(
|
|
169
|
-
constructor.prototype[method],
|
|
170
|
-
method,
|
|
171
|
-
descriptor,
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export const ACCOUNT_ENTRY_SERVICE_NAME = 'AccountEntryService';
|
package/typescript/address.ts
DELETED
|
@@ -1,133 +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 v6.32.0
|
|
5
|
-
// source: address.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
9
|
-
import { Observable } from 'rxjs';
|
|
10
|
-
|
|
11
|
-
export const protobufPackage = 'address';
|
|
12
|
-
|
|
13
|
-
export interface Address {
|
|
14
|
-
id: string;
|
|
15
|
-
zipCode: string;
|
|
16
|
-
street: string;
|
|
17
|
-
number: string;
|
|
18
|
-
complement?: string | undefined;
|
|
19
|
-
neighborhood: string;
|
|
20
|
-
city: string;
|
|
21
|
-
state: string;
|
|
22
|
-
nickname?: string | undefined;
|
|
23
|
-
reference?: string | undefined;
|
|
24
|
-
accountId?: string | undefined;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface CreateAddressDto {
|
|
28
|
-
state: string;
|
|
29
|
-
city: string;
|
|
30
|
-
zipCode: string;
|
|
31
|
-
neighborhood: string;
|
|
32
|
-
street: string;
|
|
33
|
-
number: string;
|
|
34
|
-
nickname?: string | undefined;
|
|
35
|
-
complement?: string | undefined;
|
|
36
|
-
reference?: string | undefined;
|
|
37
|
-
accountId?: string | undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface getAddressesByAccountIdRequest {
|
|
41
|
-
accountId: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface GetAddressByIdRequest {
|
|
45
|
-
accountId: string;
|
|
46
|
-
id: string;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface AddressList {
|
|
50
|
-
addresses: Address[];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface UpdateAddressRequest {
|
|
54
|
-
id: string;
|
|
55
|
-
state?: string | undefined;
|
|
56
|
-
city?: string | undefined;
|
|
57
|
-
zipCode?: string | undefined;
|
|
58
|
-
neighborhood?: string | undefined;
|
|
59
|
-
street?: string | undefined;
|
|
60
|
-
number?: string | undefined;
|
|
61
|
-
nickname?: string | undefined;
|
|
62
|
-
complement?: string | undefined;
|
|
63
|
-
reference?: string | undefined;
|
|
64
|
-
accountId?: string | undefined;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export const ADDRESS_PACKAGE_NAME = 'address';
|
|
68
|
-
|
|
69
|
-
export interface AddressServiceClient {
|
|
70
|
-
createAddress(request: CreateAddressDto): Observable<Address>;
|
|
71
|
-
|
|
72
|
-
getAddressesByAccountId(
|
|
73
|
-
request: getAddressesByAccountIdRequest,
|
|
74
|
-
): Observable<AddressList>;
|
|
75
|
-
|
|
76
|
-
getAddressById(request: GetAddressByIdRequest): Observable<Address>;
|
|
77
|
-
|
|
78
|
-
updateAddress(request: UpdateAddressRequest): Observable<Address>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface AddressServiceController {
|
|
82
|
-
createAddress(
|
|
83
|
-
request: CreateAddressDto,
|
|
84
|
-
): Promise<Address> | Observable<Address> | Address;
|
|
85
|
-
|
|
86
|
-
getAddressesByAccountId(
|
|
87
|
-
request: getAddressesByAccountIdRequest,
|
|
88
|
-
): Promise<AddressList> | Observable<AddressList> | AddressList;
|
|
89
|
-
|
|
90
|
-
getAddressById(
|
|
91
|
-
request: GetAddressByIdRequest,
|
|
92
|
-
): Promise<Address> | Observable<Address> | Address;
|
|
93
|
-
|
|
94
|
-
updateAddress(
|
|
95
|
-
request: UpdateAddressRequest,
|
|
96
|
-
): Promise<Address> | Observable<Address> | Address;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export function AddressServiceControllerMethods() {
|
|
100
|
-
return function (constructor: Function) {
|
|
101
|
-
const grpcMethods: string[] = [
|
|
102
|
-
'createAddress',
|
|
103
|
-
'getAddressesByAccountId',
|
|
104
|
-
'getAddressById',
|
|
105
|
-
'updateAddress',
|
|
106
|
-
];
|
|
107
|
-
for (const method of grpcMethods) {
|
|
108
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
109
|
-
constructor.prototype,
|
|
110
|
-
method,
|
|
111
|
-
);
|
|
112
|
-
GrpcMethod('AddressService', method)(
|
|
113
|
-
constructor.prototype[method],
|
|
114
|
-
method,
|
|
115
|
-
descriptor,
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
const grpcStreamMethods: string[] = [];
|
|
119
|
-
for (const method of grpcStreamMethods) {
|
|
120
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(
|
|
121
|
-
constructor.prototype,
|
|
122
|
-
method,
|
|
123
|
-
);
|
|
124
|
-
GrpcStreamMethod('AddressService', method)(
|
|
125
|
-
constructor.prototype[method],
|
|
126
|
-
method,
|
|
127
|
-
descriptor,
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export const ADDRESS_SERVICE_NAME = 'AddressService';
|