@postpaybr/protos 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/package.json +28 -0
  2. package/src/account-entry.proto +86 -0
  3. package/src/address.proto +64 -0
  4. package/src/admin-card-verification.proto +90 -0
  5. package/src/administrator.proto +192 -0
  6. package/src/anticipation.proto +86 -0
  7. package/src/asset.proto +44 -0
  8. package/src/auth.proto +29 -0
  9. package/src/bank-account.proto +62 -0
  10. package/src/card-vault.proto +36 -0
  11. package/src/card-verification.proto +30 -0
  12. package/src/card.proto +138 -0
  13. package/src/charge-schedule.proto +22 -0
  14. package/src/charge.proto +610 -0
  15. package/src/context.proto +174 -0
  16. package/src/customer.proto +234 -0
  17. package/src/daily-balance.proto +32 -0
  18. package/src/document-verification.proto +111 -0
  19. package/src/email.proto +76 -0
  20. package/src/expo-push.proto +27 -0
  21. package/src/fee.proto +65 -0
  22. package/src/location.proto +40 -0
  23. package/src/notification.proto +207 -0
  24. package/src/order.proto +189 -0
  25. package/src/payable.proto +246 -0
  26. package/src/payer.proto +24 -0
  27. package/src/payment-calculator.proto +165 -0
  28. package/src/payment-card.proto +217 -0
  29. package/src/payment-gateway.proto +94 -0
  30. package/src/payment-pix.proto +115 -0
  31. package/src/receipt.proto +212 -0
  32. package/src/recipient-payment-gateway.proto +101 -0
  33. package/src/recipient.proto +237 -0
  34. package/src/role.proto +57 -0
  35. package/src/sms.proto +36 -0
  36. package/src/tax.proto +323 -0
  37. package/src/transfer.proto +206 -0
  38. package/src/two-factor.proto +67 -0
  39. package/src/typescript/account-entry.ts +177 -0
  40. package/src/typescript/address.ts +133 -0
  41. package/src/typescript/admin-card-verification.ts +181 -0
  42. package/src/typescript/administrator.ts +375 -0
  43. package/src/typescript/anticipation.ts +187 -0
  44. package/src/typescript/asset.ts +123 -0
  45. package/src/typescript/auth.ts +84 -0
  46. package/src/typescript/bank-account.ts +157 -0
  47. package/src/typescript/card-vault.ts +92 -0
  48. package/src/typescript/card-verification.ts +93 -0
  49. package/src/typescript/card.ts +283 -0
  50. package/src/typescript/charge-schedule.ts +86 -0
  51. package/src/typescript/charge.ts +930 -0
  52. package/src/typescript/context.ts +296 -0
  53. package/src/typescript/customer.ts +425 -0
  54. package/src/typescript/daily-balance.ts +94 -0
  55. package/src/typescript/document-verification.ts +219 -0
  56. package/src/typescript/email.ts +183 -0
  57. package/src/typescript/expo-push.ts +75 -0
  58. package/src/typescript/fee.ts +131 -0
  59. package/src/typescript/location.ts +96 -0
  60. package/src/typescript/notification.ts +372 -0
  61. package/src/typescript/order.ts +311 -0
  62. package/src/typescript/payable.ts +414 -0
  63. package/src/typescript/payer.ts +68 -0
  64. package/src/typescript/payment-calculator.ts +252 -0
  65. package/src/typescript/payment-card.ts +290 -0
  66. package/src/typescript/payment-gateway.ts +209 -0
  67. package/src/typescript/payment-pix.ts +170 -0
  68. package/src/typescript/receipt.ts +344 -0
  69. package/src/typescript/recipient-payment-gateway.ts +209 -0
  70. package/src/typescript/recipient.ts +413 -0
  71. package/src/typescript/role.ts +144 -0
  72. package/src/typescript/sms.ts +96 -0
  73. package/src/typescript/tax.ts +463 -0
  74. package/src/typescript/transfer.ts +260 -0
  75. package/src/typescript/two-factor.ts +177 -0
  76. package/src/typescript/user.ts +413 -0
  77. package/src/typescript/wallet.ts +63 -0
  78. package/src/user.proto +214 -0
  79. package/src/wallet.proto +18 -0
@@ -0,0 +1,96 @@
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: location.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
9
+ import { Observable } from 'rxjs';
10
+
11
+ export const protobufPackage = 'location';
12
+
13
+ export interface State {
14
+ id: string;
15
+ code: string;
16
+ name: string;
17
+ nationalCode: number;
18
+ cities: City[];
19
+ }
20
+
21
+ export interface City {
22
+ id: string;
23
+ name: string;
24
+ nationalCode: number;
25
+ active: boolean;
26
+ state: State | undefined;
27
+ }
28
+
29
+ export interface GetCitiesRequest {
30
+ nationalCode: number;
31
+ }
32
+
33
+ export interface GetCitiesResponse {
34
+ cities: City[];
35
+ }
36
+
37
+ export interface GetStatesRequest {}
38
+
39
+ export interface GetStatesResponse {
40
+ states: State[];
41
+ }
42
+
43
+ export const LOCATION_PACKAGE_NAME = 'location';
44
+
45
+ export interface LocationServiceClient {
46
+ getCities(request: GetCitiesRequest): Observable<GetCitiesResponse>;
47
+
48
+ getStates(request: GetStatesRequest): Observable<GetStatesResponse>;
49
+ }
50
+
51
+ export interface LocationServiceController {
52
+ getCities(
53
+ request: GetCitiesRequest,
54
+ ):
55
+ | Promise<GetCitiesResponse>
56
+ | Observable<GetCitiesResponse>
57
+ | GetCitiesResponse;
58
+
59
+ getStates(
60
+ request: GetStatesRequest,
61
+ ):
62
+ | Promise<GetStatesResponse>
63
+ | Observable<GetStatesResponse>
64
+ | GetStatesResponse;
65
+ }
66
+
67
+ export function LocationServiceControllerMethods() {
68
+ return function (constructor: Function) {
69
+ const grpcMethods: string[] = ['getCities', 'getStates'];
70
+ for (const method of grpcMethods) {
71
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
72
+ constructor.prototype,
73
+ method,
74
+ );
75
+ GrpcMethod('LocationService', method)(
76
+ constructor.prototype[method],
77
+ method,
78
+ descriptor,
79
+ );
80
+ }
81
+ const grpcStreamMethods: string[] = [];
82
+ for (const method of grpcStreamMethods) {
83
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
84
+ constructor.prototype,
85
+ method,
86
+ );
87
+ GrpcStreamMethod('LocationService', method)(
88
+ constructor.prototype[method],
89
+ method,
90
+ descriptor,
91
+ );
92
+ }
93
+ };
94
+ }
95
+
96
+ export const LOCATION_SERVICE_NAME = 'LocationService';
@@ -0,0 +1,372 @@
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: notification.proto
6
+
7
+ /* eslint-disable */
8
+ import { RecipientType } from '@postpaybr/contracts/enums';
9
+ import {
10
+ ChangesFieldType,
11
+ NotificationCategory,
12
+ NotificationImageType,
13
+ } from '@postpaybr/contracts/types';
14
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
15
+ import { Observable } from 'rxjs';
16
+
17
+ export const protobufPackage = 'notification';
18
+
19
+ export interface GetAllNotificationsDto {
20
+ recipientId: string;
21
+ recipientType: RecipientType;
22
+ severities?: number[];
23
+ isRead?: boolean | undefined;
24
+ }
25
+
26
+ export interface DateFilter {
27
+ startDate?: Date | undefined;
28
+ endDate?: Date | undefined;
29
+ }
30
+
31
+ export interface PaginationFilter {
32
+ limit?: number | undefined;
33
+ offset?: number | undefined;
34
+ }
35
+
36
+ export interface NotificationChange {
37
+ field: ChangesFieldType;
38
+ oldValue: string;
39
+ newValue: string;
40
+ }
41
+
42
+ export interface ChangePoint {
43
+ title: string;
44
+ description: string;
45
+ }
46
+
47
+ export interface NotificationMetadata {
48
+ actionLabel?: string | undefined;
49
+ url?: string | undefined;
50
+ deviceInfo?: string | undefined;
51
+ location?: string | undefined;
52
+ eventDate?: Date | undefined;
53
+ securityAction?: string | undefined;
54
+ changes?: NotificationChange[];
55
+ startDate?: Date | undefined;
56
+ endDate?: Date | undefined;
57
+ impactDescription?: string | undefined;
58
+ updateReason?: string | undefined;
59
+ changePoints?: ChangePoint[];
60
+ userId?: string | undefined;
61
+ scheduledPaymentDate?: Date | undefined;
62
+ paymentAmount?: number | undefined;
63
+ paymentStatus?: string | undefined;
64
+ paymentMethod?: string | undefined;
65
+ chargeId?: string | undefined;
66
+ receiptId?: string | undefined;
67
+ taxId?: string | undefined;
68
+ params?: { [key: string]: string };
69
+ actionButtonVariant?: 'default' | 'ghost' | undefined;
70
+ callToAction?: string | undefined;
71
+ }
72
+
73
+ export interface NotificationMetadata_ParamsEntry {
74
+ key: string;
75
+ value: string;
76
+ }
77
+
78
+ export interface Notification {
79
+ id: string;
80
+ title: string;
81
+ description: string;
82
+ isRead: boolean;
83
+ severity: number;
84
+ createdAt: Date;
85
+ updatedAt: Date;
86
+ category: NotificationCategory;
87
+ recipientType: RecipientType;
88
+ recipientId: string;
89
+ imageUrl?: string | undefined;
90
+ imageType?: NotificationImageType | undefined;
91
+ meta?: NotificationMetadata | undefined;
92
+ }
93
+
94
+ export interface CreateNotificationRequest {
95
+ recipientId: string;
96
+ recipientType: RecipientType;
97
+ title: string;
98
+ description: string;
99
+ severity?: number | undefined;
100
+ category?: NotificationCategory | undefined;
101
+ meta?: NotificationMetadata | undefined;
102
+ isRead?: boolean | undefined;
103
+ imageUrl?: string | undefined;
104
+ imageType?: NotificationImageType | undefined;
105
+ }
106
+
107
+ export interface NotificationResponse {
108
+ notification: Notification | undefined;
109
+ }
110
+
111
+ export interface GetNotificationByIdRequest {
112
+ recipientId: string;
113
+ recipientType: RecipientType;
114
+ id: string;
115
+ }
116
+
117
+ export interface GetAllNotificationsRequest {
118
+ data: GetAllNotificationsDto | undefined;
119
+ dateFilter: DateFilter | undefined;
120
+ pagination: PaginationFilter | undefined;
121
+ }
122
+
123
+ export interface NotificationsResponse {
124
+ notifications: Notification[];
125
+ count: number;
126
+ }
127
+
128
+ export interface CountUnreadNotificationsRequest {
129
+ recipientId: string;
130
+ recipientType: RecipientType;
131
+ }
132
+
133
+ export interface CountUnreadNotificationsResponse {
134
+ countNotRead: number;
135
+ }
136
+
137
+ export interface MarkAsReadRequest {
138
+ recipientId: string;
139
+ recipientType: RecipientType;
140
+ notificationId: string;
141
+ }
142
+
143
+ export interface MarkAsReadResponse {
144
+ success: boolean;
145
+ }
146
+
147
+ export interface CreateSecurityNotificationRequest {
148
+ recipientId: string;
149
+ recipientType: RecipientType;
150
+ deviceInfo?: string | undefined;
151
+ location?: string | undefined;
152
+ eventDate: Date;
153
+ imageUrl?: string | undefined;
154
+ imageType?: NotificationImageType | undefined;
155
+ }
156
+
157
+ export interface CreatePasswordChangedNotificationRequest {
158
+ recipientId: string;
159
+ recipientType: RecipientType;
160
+ deviceInfo?: string | undefined;
161
+ location?: string | undefined;
162
+ eventDate: Date;
163
+ imageUrl?: string | undefined;
164
+ imageType?: NotificationImageType | undefined;
165
+ }
166
+
167
+ export interface CreateMaintenanceNotificationRequest {
168
+ recipientId: string;
169
+ recipientType: RecipientType;
170
+ startDate: Date;
171
+ endDate: Date;
172
+ impactDescription: string;
173
+ imageUrl?: string | undefined;
174
+ imageType?: NotificationImageType | undefined;
175
+ }
176
+
177
+ export interface CreateTermsUpdatedNotificationRequest {
178
+ recipientId: string;
179
+ recipientType: RecipientType;
180
+ updateReason: string;
181
+ changePoints: ChangePoint[];
182
+ imageUrl?: string | undefined;
183
+ imageType?: NotificationImageType | undefined;
184
+ }
185
+
186
+ export interface CreateProfileUpdatedNotificationRequest {
187
+ recipientId: string;
188
+ recipientType: RecipientType;
189
+ changes: NotificationChange[];
190
+ imageUrl?: string | undefined;
191
+ imageType?: NotificationImageType | undefined;
192
+ }
193
+
194
+ export interface GetNotificationStatusRequest {
195
+ recipientId: string;
196
+ recipientType: RecipientType;
197
+ }
198
+
199
+ export interface GetNotificationStatusResponse {
200
+ hasCritical: boolean;
201
+ hasUpdates: boolean;
202
+ allCriticalRead: boolean;
203
+ allUpdatesRead: boolean;
204
+ }
205
+
206
+ export const NOTIFICATION_PACKAGE_NAME = 'notification';
207
+
208
+ export interface NotificationServiceClient {
209
+ createNotification(
210
+ request: CreateNotificationRequest,
211
+ ): Observable<NotificationResponse>;
212
+
213
+ getNotificationById(
214
+ request: GetNotificationByIdRequest,
215
+ ): Observable<NotificationResponse>;
216
+
217
+ getAllNotifications(
218
+ request: GetAllNotificationsRequest,
219
+ ): Observable<NotificationsResponse>;
220
+
221
+ countUnreadNotifications(
222
+ request: CountUnreadNotificationsRequest,
223
+ ): Observable<CountUnreadNotificationsResponse>;
224
+
225
+ markAsRead(request: MarkAsReadRequest): Observable<MarkAsReadResponse>;
226
+
227
+ createSecurityNotification(
228
+ request: CreateSecurityNotificationRequest,
229
+ ): Observable<NotificationResponse>;
230
+
231
+ createPasswordChangedNotification(
232
+ request: CreatePasswordChangedNotificationRequest,
233
+ ): Observable<NotificationResponse>;
234
+
235
+ createMaintenanceNotification(
236
+ request: CreateMaintenanceNotificationRequest,
237
+ ): Observable<NotificationResponse>;
238
+
239
+ createTermsUpdatedNotification(
240
+ request: CreateTermsUpdatedNotificationRequest,
241
+ ): Observable<NotificationResponse>;
242
+
243
+ createProfileUpdatedNotification(
244
+ request: CreateProfileUpdatedNotificationRequest,
245
+ ): Observable<NotificationResponse>;
246
+
247
+ getNotificationStatus(
248
+ request: GetNotificationStatusRequest,
249
+ ): Observable<GetNotificationStatusResponse>;
250
+ }
251
+
252
+ export interface NotificationServiceController {
253
+ createNotification(
254
+ request: CreateNotificationRequest,
255
+ ):
256
+ | Promise<NotificationResponse>
257
+ | Observable<NotificationResponse>
258
+ | NotificationResponse;
259
+
260
+ getNotificationById(
261
+ request: GetNotificationByIdRequest,
262
+ ):
263
+ | Promise<NotificationResponse>
264
+ | Observable<NotificationResponse>
265
+ | NotificationResponse;
266
+
267
+ getAllNotifications(
268
+ request: GetAllNotificationsRequest,
269
+ ):
270
+ | Promise<NotificationsResponse>
271
+ | Observable<NotificationsResponse>
272
+ | NotificationsResponse;
273
+
274
+ countUnreadNotifications(
275
+ request: CountUnreadNotificationsRequest,
276
+ ):
277
+ | Promise<CountUnreadNotificationsResponse>
278
+ | Observable<CountUnreadNotificationsResponse>
279
+ | CountUnreadNotificationsResponse;
280
+
281
+ markAsRead(
282
+ request: MarkAsReadRequest,
283
+ ):
284
+ | Promise<MarkAsReadResponse>
285
+ | Observable<MarkAsReadResponse>
286
+ | MarkAsReadResponse;
287
+
288
+ createSecurityNotification(
289
+ request: CreateSecurityNotificationRequest,
290
+ ):
291
+ | Promise<NotificationResponse>
292
+ | Observable<NotificationResponse>
293
+ | NotificationResponse;
294
+
295
+ createPasswordChangedNotification(
296
+ request: CreatePasswordChangedNotificationRequest,
297
+ ):
298
+ | Promise<NotificationResponse>
299
+ | Observable<NotificationResponse>
300
+ | NotificationResponse;
301
+
302
+ createMaintenanceNotification(
303
+ request: CreateMaintenanceNotificationRequest,
304
+ ):
305
+ | Promise<NotificationResponse>
306
+ | Observable<NotificationResponse>
307
+ | NotificationResponse;
308
+
309
+ createTermsUpdatedNotification(
310
+ request: CreateTermsUpdatedNotificationRequest,
311
+ ):
312
+ | Promise<NotificationResponse>
313
+ | Observable<NotificationResponse>
314
+ | NotificationResponse;
315
+
316
+ createProfileUpdatedNotification(
317
+ request: CreateProfileUpdatedNotificationRequest,
318
+ ):
319
+ | Promise<NotificationResponse>
320
+ | Observable<NotificationResponse>
321
+ | NotificationResponse;
322
+
323
+ getNotificationStatus(
324
+ request: GetNotificationStatusRequest,
325
+ ):
326
+ | Promise<GetNotificationStatusResponse>
327
+ | Observable<GetNotificationStatusResponse>
328
+ | GetNotificationStatusResponse;
329
+ }
330
+
331
+ export function NotificationServiceControllerMethods() {
332
+ return function (constructor: Function) {
333
+ const grpcMethods: string[] = [
334
+ 'createNotification',
335
+ 'getNotificationById',
336
+ 'getAllNotifications',
337
+ 'countUnreadNotifications',
338
+ 'markAsRead',
339
+ 'createSecurityNotification',
340
+ 'createPasswordChangedNotification',
341
+ 'createMaintenanceNotification',
342
+ 'createTermsUpdatedNotification',
343
+ 'createProfileUpdatedNotification',
344
+ 'getNotificationStatus',
345
+ ];
346
+ for (const method of grpcMethods) {
347
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
348
+ constructor.prototype,
349
+ method,
350
+ );
351
+ GrpcMethod('NotificationService', method)(
352
+ constructor.prototype[method],
353
+ method,
354
+ descriptor,
355
+ );
356
+ }
357
+ const grpcStreamMethods: string[] = [];
358
+ for (const method of grpcStreamMethods) {
359
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
360
+ constructor.prototype,
361
+ method,
362
+ );
363
+ GrpcStreamMethod('NotificationService', method)(
364
+ constructor.prototype[method],
365
+ method,
366
+ descriptor,
367
+ );
368
+ }
369
+ };
370
+ }
371
+
372
+ export const NOTIFICATION_SERVICE_NAME = 'NotificationService';