@postpaybr/protos 1.1.2 → 1.1.5

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 (40) hide show
  1. package/package.json +9 -7
  2. package/typescript/account-entry.ts +0 -177
  3. package/typescript/address.ts +0 -133
  4. package/typescript/admin-card-verification.ts +0 -181
  5. package/typescript/administrator.ts +0 -375
  6. package/typescript/anticipation.ts +0 -187
  7. package/typescript/asset.ts +0 -123
  8. package/typescript/auth.ts +0 -84
  9. package/typescript/bank-account.ts +0 -157
  10. package/typescript/card-vault.ts +0 -92
  11. package/typescript/card-verification.ts +0 -93
  12. package/typescript/card.ts +0 -283
  13. package/typescript/charge-schedule.ts +0 -86
  14. package/typescript/charge.ts +0 -930
  15. package/typescript/context.ts +0 -296
  16. package/typescript/customer.ts +0 -425
  17. package/typescript/daily-balance.ts +0 -94
  18. package/typescript/document-verification.ts +0 -219
  19. package/typescript/email.ts +0 -183
  20. package/typescript/expo-push.ts +0 -75
  21. package/typescript/fee.ts +0 -131
  22. package/typescript/location.ts +0 -96
  23. package/typescript/notification.ts +0 -372
  24. package/typescript/order.ts +0 -311
  25. package/typescript/payable.ts +0 -414
  26. package/typescript/payer.ts +0 -68
  27. package/typescript/payment-calculator.ts +0 -252
  28. package/typescript/payment-card.ts +0 -289
  29. package/typescript/payment-gateway.ts +0 -209
  30. package/typescript/payment-pix.ts +0 -170
  31. package/typescript/receipt.ts +0 -344
  32. package/typescript/recipient-payment-gateway.ts +0 -209
  33. package/typescript/recipient.ts +0 -413
  34. package/typescript/role.ts +0 -144
  35. package/typescript/sms.ts +0 -96
  36. package/typescript/tax.ts +0 -463
  37. package/typescript/transfer.ts +0 -260
  38. package/typescript/two-factor.ts +0 -177
  39. package/typescript/user.ts +0 -413
  40. package/typescript/wallet.ts +0 -63
@@ -1,413 +0,0 @@
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
-
7
- /* eslint-disable */
8
- import { AccountType } from '@postpaybr/contracts/types';
9
- import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
10
- import { Observable } from 'rxjs';
11
- import { UserStatus } from '@postpaybr/contracts/enums';
12
-
13
- export const protobufPackage = 'user';
14
-
15
- export interface CreateChangePasswordRequest {
16
- accountId: string;
17
- token: string;
18
- attempts?: number;
19
- }
20
-
21
- export interface CreateChangePasswordResponse {
22
- success: boolean;
23
- }
24
-
25
- export interface getChangePasswordByAccountIdRequest {
26
- accountId: string;
27
- }
28
-
29
- export interface getChangePasswordByAccountIdResponse {
30
- changePassword: ChangePasswordEntity | undefined;
31
- }
32
-
33
- export interface VerifyChangePasswordRequest {
34
- token: string;
35
- }
36
-
37
- export interface VerifyChangePasswordResponse {
38
- success: boolean;
39
- }
40
-
41
- export interface UpdateChangePasswordAttemptsRequest {
42
- id: string;
43
- attempts: number;
44
- }
45
-
46
- export interface UpdateChangePasswordAttemptsResponse {
47
- success: boolean;
48
- }
49
-
50
- export interface ChangePasswordEntity {
51
- id: string;
52
- token: string;
53
- attempts: number;
54
- isVerified: boolean;
55
- createdAt: Date;
56
- user: User | undefined;
57
- }
58
-
59
- export interface CreateUserRequest {
60
- password: string;
61
- devices: CreateDevice[];
62
- }
63
-
64
- export interface UpdateUserAccountIdRequest {
65
- userId: string;
66
- accountId: string;
67
- accountType: AccountType;
68
- }
69
-
70
- export interface GetUserByIdRequest {
71
- id: string;
72
- }
73
-
74
- export interface GetUserByAccountRequest {
75
- accountId: string;
76
- accountType: AccountType;
77
- }
78
-
79
- export interface SendRecoveryPasswordEmailRequest {
80
- email: string;
81
- }
82
-
83
- export interface SendRecoveryPasswordEmailResponse {
84
- success: boolean;
85
- }
86
-
87
- export interface HandleRecoveryPasswordRequest {
88
- token: string;
89
- data: RecoveryPasswordDto | undefined;
90
- }
91
-
92
- export interface HandleChangePasswordRequest {
93
- accountId: string;
94
- accountType: AccountType;
95
- newPassword: string;
96
- }
97
-
98
- export interface ChangeStatusRequest {
99
- accountId: string;
100
- accountType: AccountType;
101
- status: UserStatus;
102
- }
103
-
104
- export interface ChangeStatusResponse {
105
- success: boolean;
106
- }
107
-
108
- export interface User {
109
- id: string;
110
- password: string;
111
- status: UserStatus;
112
- roles: Role[];
113
- accountId: string;
114
- accountType: AccountType;
115
- devices: Device[];
116
- pin: string;
117
- pinAttempts: number;
118
- createdAt: Date;
119
- updatedAt: Date;
120
- twoFactorEnabled: boolean;
121
- twoFactorSecret: string | null;
122
- twoFactorBackupCodes?: string[];
123
- twoFactorEnabledAt: Date | null;
124
- }
125
-
126
- export interface Role {
127
- id: string;
128
- code: string;
129
- description: string;
130
- permissions: string[];
131
- }
132
-
133
- export interface UserWithDevices {
134
- user: User | undefined;
135
- devices: Device[];
136
- }
137
-
138
- export interface Device {
139
- id: string;
140
- token: string;
141
- expoPushToken: string;
142
- user: User;
143
- }
144
-
145
- export interface CreateDevice {
146
- token?: string;
147
- expoPushToken: string;
148
- }
149
-
150
- export interface RecoveryPasswordDto {
151
- newPassword: string;
152
- email: string;
153
- }
154
-
155
- export interface GetUserRolesRequest {
156
- accountId: string;
157
- }
158
-
159
- export interface GetUserRolesResponse {
160
- roles: Role[];
161
- }
162
-
163
- export interface UpdateUserRolesRequest {
164
- accountId: string;
165
- newRoleIds: string[];
166
- }
167
-
168
- export interface UpdateUserRolesResponse {
169
- success: boolean;
170
- }
171
-
172
- export interface GetAccountIdsByStatusRequest {
173
- statuses: string[];
174
- }
175
-
176
- export interface GetAccountIdsByStatusResponse {
177
- accountIds: string[];
178
- }
179
-
180
- export interface GetUserStatusByAccountIdRequest {
181
- accountId: string;
182
- }
183
-
184
- export interface GetUserStatusByAccountIdResponse {
185
- status: UserStatus;
186
- }
187
-
188
- export interface UpdateUsersStatusByAccountIdsRequest {
189
- accountIds: string[];
190
- status: UserStatus;
191
- }
192
-
193
- export interface UpdateUsersStatusByAccountIdsResponse {
194
- success: boolean;
195
- }
196
-
197
- export const USER_PACKAGE_NAME = 'user';
198
-
199
- export interface UserServiceClient {
200
- /** Change Password Methods */
201
-
202
- createChangePassword(
203
- request: CreateChangePasswordRequest,
204
- ): Observable<CreateChangePasswordResponse>;
205
-
206
- getChangePasswordByAccountId(
207
- request: getChangePasswordByAccountIdRequest,
208
- ): Observable<getChangePasswordByAccountIdResponse>;
209
-
210
- verifyChangePassword(
211
- request: VerifyChangePasswordRequest,
212
- ): Observable<VerifyChangePasswordResponse>;
213
-
214
- updateChangePasswordAttempts(
215
- request: UpdateChangePasswordAttemptsRequest,
216
- ): Observable<UpdateChangePasswordAttemptsResponse>;
217
-
218
- /** User Methods */
219
-
220
- createUser(request: CreateUserRequest): Observable<UserWithDevices>;
221
-
222
- updateUserAccountId(request: UpdateUserAccountIdRequest): Observable<User>;
223
-
224
- getUserById(request: GetUserByIdRequest): Observable<User>;
225
-
226
- getUserByAccount(request: GetUserByAccountRequest): Observable<User>;
227
-
228
- sendRecoveryPasswordEmail(
229
- request: SendRecoveryPasswordEmailRequest,
230
- ): Observable<SendRecoveryPasswordEmailResponse>;
231
-
232
- handleRecoveryPassword(
233
- request: HandleRecoveryPasswordRequest,
234
- ): Observable<User>;
235
-
236
- handleChangePassword(request: HandleChangePasswordRequest): Observable<User>;
237
-
238
- changeStatus(request: ChangeStatusRequest): Observable<ChangeStatusResponse>;
239
-
240
- getUserRoles(request: GetUserRolesRequest): Observable<GetUserRolesResponse>;
241
-
242
- updateUserRoles(
243
- request: UpdateUserRolesRequest,
244
- ): Observable<UpdateUserRolesResponse>;
245
-
246
- getAccountIdsByStatus(
247
- request: GetAccountIdsByStatusRequest,
248
- ): Observable<GetAccountIdsByStatusResponse>;
249
-
250
- getUserStatusByAccountId(
251
- request: GetUserStatusByAccountIdRequest,
252
- ): Observable<GetUserStatusByAccountIdResponse>;
253
-
254
- updateUsersStatusByAccountIds(
255
- request: UpdateUsersStatusByAccountIdsRequest,
256
- ): Observable<UpdateUsersStatusByAccountIdsResponse>;
257
- }
258
-
259
- export interface UserServiceController {
260
- /** Change Password Methods */
261
-
262
- createChangePassword(
263
- request: CreateChangePasswordRequest,
264
- ):
265
- | Promise<CreateChangePasswordResponse>
266
- | Observable<CreateChangePasswordResponse>
267
- | CreateChangePasswordResponse;
268
-
269
- getChangePasswordByAccountId(
270
- request: getChangePasswordByAccountIdRequest,
271
- ):
272
- | Promise<getChangePasswordByAccountIdResponse>
273
- | Observable<getChangePasswordByAccountIdResponse>
274
- | getChangePasswordByAccountIdResponse;
275
-
276
- verifyChangePassword(
277
- request: VerifyChangePasswordRequest,
278
- ):
279
- | Promise<VerifyChangePasswordResponse>
280
- | Observable<VerifyChangePasswordResponse>
281
- | VerifyChangePasswordResponse;
282
-
283
- updateChangePasswordAttempts(
284
- request: UpdateChangePasswordAttemptsRequest,
285
- ):
286
- | Promise<UpdateChangePasswordAttemptsResponse>
287
- | Observable<UpdateChangePasswordAttemptsResponse>
288
- | UpdateChangePasswordAttemptsResponse;
289
-
290
- /** User Methods */
291
-
292
- createUser(
293
- request: CreateUserRequest,
294
- ): Promise<UserWithDevices> | Observable<UserWithDevices> | UserWithDevices;
295
-
296
- updateUserAccountId(
297
- request: UpdateUserAccountIdRequest,
298
- ): Promise<User> | Observable<User> | User;
299
-
300
- getUserById(
301
- request: GetUserByIdRequest,
302
- ): Promise<User> | Observable<User> | User;
303
-
304
- getUserByAccount(
305
- request: GetUserByAccountRequest,
306
- ): Promise<User> | Observable<User> | User;
307
-
308
- sendRecoveryPasswordEmail(
309
- request: SendRecoveryPasswordEmailRequest,
310
- ):
311
- | Promise<SendRecoveryPasswordEmailResponse>
312
- | Observable<SendRecoveryPasswordEmailResponse>
313
- | SendRecoveryPasswordEmailResponse;
314
-
315
- handleRecoveryPassword(
316
- request: HandleRecoveryPasswordRequest,
317
- ): Promise<User> | Observable<User> | User;
318
-
319
- handleChangePassword(
320
- request: HandleChangePasswordRequest,
321
- ): Promise<User> | Observable<User> | User;
322
-
323
- changeStatus(
324
- request: ChangeStatusRequest,
325
- ):
326
- | Promise<ChangeStatusResponse>
327
- | Observable<ChangeStatusResponse>
328
- | ChangeStatusResponse;
329
-
330
- getUserRoles(
331
- request: GetUserRolesRequest,
332
- ):
333
- | Promise<GetUserRolesResponse>
334
- | Observable<GetUserRolesResponse>
335
- | GetUserRolesResponse;
336
-
337
- updateUserRoles(
338
- request: UpdateUserRolesRequest,
339
- ):
340
- | Promise<UpdateUserRolesResponse>
341
- | Observable<UpdateUserRolesResponse>
342
- | UpdateUserRolesResponse;
343
-
344
- getAccountIdsByStatus(
345
- request: GetAccountIdsByStatusRequest,
346
- ):
347
- | Promise<GetAccountIdsByStatusResponse>
348
- | Observable<GetAccountIdsByStatusResponse>
349
- | GetAccountIdsByStatusResponse;
350
-
351
- getUserStatusByAccountId(
352
- request: GetUserStatusByAccountIdRequest,
353
- ):
354
- | Promise<GetUserStatusByAccountIdResponse>
355
- | Observable<GetUserStatusByAccountIdResponse>
356
- | GetUserStatusByAccountIdResponse;
357
-
358
- updateUsersStatusByAccountIds(
359
- request: UpdateUsersStatusByAccountIdsRequest,
360
- ):
361
- | Promise<UpdateUsersStatusByAccountIdsResponse>
362
- | Observable<UpdateUsersStatusByAccountIdsResponse>
363
- | UpdateUsersStatusByAccountIdsResponse;
364
- }
365
-
366
- export function UserServiceControllerMethods() {
367
- return function (constructor: Function) {
368
- const grpcMethods: string[] = [
369
- 'createChangePassword',
370
- 'getChangePasswordByAccountId',
371
- 'verifyChangePassword',
372
- 'updateChangePasswordAttempts',
373
- 'createUser',
374
- 'updateUserAccountId',
375
- 'getUserById',
376
- 'getUserByAccount',
377
- 'sendRecoveryPasswordEmail',
378
- 'handleRecoveryPassword',
379
- 'handleChangePassword',
380
- 'changeStatus',
381
- 'getUserRoles',
382
- 'updateUserRoles',
383
- 'getAccountIdsByStatus',
384
- 'getUserStatusByAccountId',
385
- 'updateUsersStatusByAccountIds',
386
- ];
387
- for (const method of grpcMethods) {
388
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
389
- constructor.prototype,
390
- method,
391
- );
392
- GrpcMethod('UserService', method)(
393
- constructor.prototype[method],
394
- method,
395
- descriptor,
396
- );
397
- }
398
- const grpcStreamMethods: string[] = [];
399
- for (const method of grpcStreamMethods) {
400
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
401
- constructor.prototype,
402
- method,
403
- );
404
- GrpcStreamMethod('UserService', method)(
405
- constructor.prototype[method],
406
- method,
407
- descriptor,
408
- );
409
- }
410
- };
411
- }
412
-
413
- export const USER_SERVICE_NAME = 'UserService';
@@ -1,63 +0,0 @@
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
-
7
- /* eslint-disable */
8
- import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
9
- import { Observable } from 'rxjs';
10
-
11
- export const protobufPackage = 'wallet';
12
-
13
- export interface CreateWalletRequest {
14
- customerId: string;
15
- }
16
-
17
- export interface WalletResponse {
18
- id: string;
19
- customerId: string;
20
- }
21
-
22
- export const WALLET_PACKAGE_NAME = 'wallet';
23
-
24
- export interface WalletServiceClient {
25
- createWallet(request: CreateWalletRequest): Observable<WalletResponse>;
26
- }
27
-
28
- export interface WalletServiceController {
29
- createWallet(
30
- request: CreateWalletRequest,
31
- ): Promise<WalletResponse> | Observable<WalletResponse> | WalletResponse;
32
- }
33
-
34
- export function WalletServiceControllerMethods() {
35
- return function (constructor: Function) {
36
- const grpcMethods: string[] = ['createWallet'];
37
- for (const method of grpcMethods) {
38
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
39
- constructor.prototype,
40
- method,
41
- );
42
- GrpcMethod('WalletService', method)(
43
- constructor.prototype[method],
44
- method,
45
- descriptor,
46
- );
47
- }
48
- const grpcStreamMethods: string[] = [];
49
- for (const method of grpcStreamMethods) {
50
- const descriptor: any = Reflect.getOwnPropertyDescriptor(
51
- constructor.prototype,
52
- method,
53
- );
54
- GrpcStreamMethod('WalletService', method)(
55
- constructor.prototype[method],
56
- method,
57
- descriptor,
58
- );
59
- }
60
- };
61
- }
62
-
63
- export const WALLET_SERVICE_NAME = 'WalletService';