@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,94 @@
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
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
9
+ import { Observable } from 'rxjs';
10
+
11
+ export const protobufPackage = 'dailyBalance';
12
+
13
+ export interface GetBalanceHistoryRequest {
14
+ recipientId: string;
15
+ startDate: Date;
16
+ endDate: Date;
17
+ }
18
+
19
+ export interface DailyBalance {
20
+ date: Date;
21
+ balance: number;
22
+ }
23
+
24
+ export interface GetBalanceHistoryResponse {
25
+ dailyBalances: DailyBalance[];
26
+ }
27
+
28
+ export interface getCurrentBalanceRequest {
29
+ recipientId: string;
30
+ }
31
+
32
+ export interface getCurrentBalanceResponse {
33
+ balance: number;
34
+ lastUpdate: Date;
35
+ }
36
+
37
+ export const DAILY_BALANCE_PACKAGE_NAME = 'dailyBalance';
38
+
39
+ export interface DailyBalanceServiceClient {
40
+ getBalanceHistory(
41
+ request: GetBalanceHistoryRequest,
42
+ ): Observable<GetBalanceHistoryResponse>;
43
+
44
+ getCurrentBalance(
45
+ request: getCurrentBalanceRequest,
46
+ ): Observable<getCurrentBalanceResponse>;
47
+ }
48
+
49
+ export interface DailyBalanceServiceController {
50
+ getBalanceHistory(
51
+ request: GetBalanceHistoryRequest,
52
+ ):
53
+ | Promise<GetBalanceHistoryResponse>
54
+ | Observable<GetBalanceHistoryResponse>
55
+ | GetBalanceHistoryResponse;
56
+
57
+ getCurrentBalance(
58
+ request: getCurrentBalanceRequest,
59
+ ):
60
+ | Promise<getCurrentBalanceResponse>
61
+ | Observable<getCurrentBalanceResponse>
62
+ | getCurrentBalanceResponse;
63
+ }
64
+
65
+ export function DailyBalanceServiceControllerMethods() {
66
+ return function (constructor: Function) {
67
+ const grpcMethods: string[] = ['getBalanceHistory', 'getCurrentBalance'];
68
+ for (const method of grpcMethods) {
69
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
70
+ constructor.prototype,
71
+ method,
72
+ );
73
+ GrpcMethod('DailyBalanceService', method)(
74
+ constructor.prototype[method],
75
+ method,
76
+ descriptor,
77
+ );
78
+ }
79
+ const grpcStreamMethods: string[] = [];
80
+ for (const method of grpcStreamMethods) {
81
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
82
+ constructor.prototype,
83
+ method,
84
+ );
85
+ GrpcStreamMethod('DailyBalanceService', method)(
86
+ constructor.prototype[method],
87
+ method,
88
+ descriptor,
89
+ );
90
+ }
91
+ };
92
+ }
93
+
94
+ export const DAILY_BALANCE_SERVICE_NAME = 'DailyBalanceService';
@@ -0,0 +1,219 @@
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
+
7
+ /* eslint-disable */
8
+ import {
9
+ DocumentRejectionReason,
10
+ VerificationStatus,
11
+ } from '@postpaybr/contracts/types';
12
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
13
+ import { Observable } from 'rxjs';
14
+
15
+ export const protobufPackage = 'documentVerification';
16
+
17
+ export interface UpdateDocumentVerificationStatusRequest {
18
+ id: string;
19
+ status: VerificationStatus;
20
+ rejectionReasons?: DocumentRejectionReason[];
21
+ customRejectionReason?: string | undefined;
22
+ reviewerId?: string | undefined;
23
+ actedById: string;
24
+ }
25
+
26
+ export interface DocumentVerificationResponse {
27
+ id: string;
28
+ documentFrontUrl: string;
29
+ selfieWithDocumentUrl: string;
30
+ rejectionReasons: DocumentRejectionReason[];
31
+ customRejectionReason: string;
32
+ }
33
+
34
+ export interface GetVerificationsWithDetailsRequest {
35
+ status: VerificationStatus;
36
+ offset?: number | undefined;
37
+ limit?: number | undefined;
38
+ startDate?: Date | undefined;
39
+ endDate?: Date | undefined;
40
+ reviewerIds: string[];
41
+ }
42
+
43
+ export interface GetDocumentVerificationsWithDetailsResponse {
44
+ data: DocumentVerificationWithDetails[];
45
+ total: number;
46
+ currentCount: number;
47
+ order: string;
48
+ }
49
+
50
+ export interface DocumentVerificationWithDetails {
51
+ id: string;
52
+ customerName: string;
53
+ document: string;
54
+ createdAt: Date;
55
+ reviewDeadline: string;
56
+ latestHistoryCreatedAt: Date;
57
+ status: VerificationStatus;
58
+ lastReviewer: Reviewer | undefined;
59
+ }
60
+
61
+ export interface GetVerificationDetailsByIdRequest {
62
+ id: string;
63
+ }
64
+
65
+ export interface DocumentVerificationDetailsResponse {
66
+ id: string;
67
+ document: string;
68
+ customerName: string;
69
+ createdAt: Date;
70
+ currentStatus: VerificationStatus;
71
+ documentFrontUrl?: string | undefined;
72
+ selfieWithDocumentUrl?: string | undefined;
73
+ elapsedBusinessTime?: string | undefined;
74
+ lastReviewer?: Reviewer | undefined;
75
+ histories?: VerificationHistoryWithDetails[];
76
+ rejectionReasons?: DocumentRejectionReason[];
77
+ customRejectionReason?: string | undefined;
78
+ finalDecisionAt?: Date | undefined;
79
+ }
80
+
81
+ export interface Reviewer {
82
+ id: string;
83
+ name: string;
84
+ }
85
+
86
+ export interface VerificationHistoryWithDetails {
87
+ id: string;
88
+ status: VerificationStatus;
89
+ createdAt: Date;
90
+ reviewedBy: string;
91
+ actedBy: string;
92
+ }
93
+
94
+ export interface Empty {}
95
+
96
+ export interface CountResponse {
97
+ count: number;
98
+ }
99
+
100
+ export interface Reviewers {
101
+ id: string;
102
+ name: string;
103
+ }
104
+
105
+ export interface GetDistinctReviewersResponse {
106
+ reviewers: Reviewers[];
107
+ }
108
+
109
+ export interface UndoLastStatusChangeRequest {
110
+ verificationId: string;
111
+ actedById: string;
112
+ }
113
+
114
+ export const DOCUMENT_VERIFICATION_PACKAGE_NAME = 'documentVerification';
115
+
116
+ export interface DocumentVerificationServiceClient {
117
+ updateVerificationStatus(
118
+ request: UpdateDocumentVerificationStatusRequest,
119
+ ): Observable<DocumentVerificationResponse>;
120
+
121
+ getDocumentVerificationsWithDetails(
122
+ request: GetVerificationsWithDetailsRequest,
123
+ ): Observable<GetDocumentVerificationsWithDetailsResponse>;
124
+
125
+ getDocumentVerificationDetailsById(
126
+ request: GetVerificationDetailsByIdRequest,
127
+ ): Observable<DocumentVerificationDetailsResponse>;
128
+
129
+ countPendingOrInProgressVerifications(
130
+ request: Empty,
131
+ ): Observable<CountResponse>;
132
+
133
+ getDistinctReviewers(
134
+ request: Empty,
135
+ ): Observable<GetDistinctReviewersResponse>;
136
+
137
+ undoLastStatusChange(
138
+ request: UndoLastStatusChangeRequest,
139
+ ): Observable<DocumentVerificationResponse>;
140
+ }
141
+
142
+ export interface DocumentVerificationServiceController {
143
+ updateVerificationStatus(
144
+ request: UpdateDocumentVerificationStatusRequest,
145
+ ):
146
+ | Promise<DocumentVerificationResponse>
147
+ | Observable<DocumentVerificationResponse>
148
+ | DocumentVerificationResponse;
149
+
150
+ getDocumentVerificationsWithDetails(
151
+ request: GetVerificationsWithDetailsRequest,
152
+ ):
153
+ | Promise<GetDocumentVerificationsWithDetailsResponse>
154
+ | Observable<GetDocumentVerificationsWithDetailsResponse>
155
+ | GetDocumentVerificationsWithDetailsResponse;
156
+
157
+ getDocumentVerificationDetailsById(
158
+ request: GetVerificationDetailsByIdRequest,
159
+ ):
160
+ | Promise<DocumentVerificationDetailsResponse>
161
+ | Observable<DocumentVerificationDetailsResponse>
162
+ | DocumentVerificationDetailsResponse;
163
+
164
+ countPendingOrInProgressVerifications(
165
+ request: Empty,
166
+ ): Promise<CountResponse> | Observable<CountResponse> | CountResponse;
167
+
168
+ getDistinctReviewers(
169
+ request: Empty,
170
+ ):
171
+ | Promise<GetDistinctReviewersResponse>
172
+ | Observable<GetDistinctReviewersResponse>
173
+ | GetDistinctReviewersResponse;
174
+
175
+ undoLastStatusChange(
176
+ request: UndoLastStatusChangeRequest,
177
+ ):
178
+ | Promise<DocumentVerificationResponse>
179
+ | Observable<DocumentVerificationResponse>
180
+ | DocumentVerificationResponse;
181
+ }
182
+
183
+ export function DocumentVerificationServiceControllerMethods() {
184
+ return function (constructor: Function) {
185
+ const grpcMethods: string[] = [
186
+ 'updateVerificationStatus',
187
+ 'getDocumentVerificationsWithDetails',
188
+ 'getDocumentVerificationDetailsById',
189
+ 'countPendingOrInProgressVerifications',
190
+ 'getDistinctReviewers',
191
+ 'undoLastStatusChange',
192
+ ];
193
+ for (const method of grpcMethods) {
194
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
195
+ constructor.prototype,
196
+ method,
197
+ );
198
+ GrpcMethod('DocumentVerificationService', method)(
199
+ constructor.prototype[method],
200
+ method,
201
+ descriptor,
202
+ );
203
+ }
204
+ const grpcStreamMethods: string[] = [];
205
+ for (const method of grpcStreamMethods) {
206
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
207
+ constructor.prototype,
208
+ method,
209
+ );
210
+ GrpcStreamMethod('DocumentVerificationService', method)(
211
+ constructor.prototype[method],
212
+ method,
213
+ descriptor,
214
+ );
215
+ }
216
+ };
217
+ }
218
+
219
+ export const DOCUMENT_VERIFICATION_SERVICE_NAME = 'DocumentVerificationService';
@@ -0,0 +1,183 @@
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: email.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
9
+ import { Observable } from 'rxjs';
10
+
11
+ export const protobufPackage = 'email';
12
+
13
+ export interface SendVerificationEmailRequest {
14
+ email: string;
15
+ customerId?: string | undefined;
16
+ template: string;
17
+ subject: string;
18
+ }
19
+
20
+ export interface SendVerificationEmailResponse {
21
+ success: boolean;
22
+ }
23
+
24
+ export interface CheckVerificationEmailRequest {
25
+ token: string;
26
+ }
27
+
28
+ export interface CheckVerificationEmailResponse {
29
+ success: boolean;
30
+ }
31
+
32
+ export interface SendMessageEmailRequest {
33
+ email: string;
34
+ template: string;
35
+ subject?: string | undefined;
36
+ }
37
+
38
+ export interface SendMessageEmailResponse {
39
+ success: boolean;
40
+ }
41
+
42
+ export interface SendRecoveryPasswordEmailRequest {
43
+ email: string;
44
+ customerId: string;
45
+ subject: string;
46
+ }
47
+
48
+ export interface SendRecoveryPasswordEmailResponse {
49
+ success: boolean;
50
+ }
51
+
52
+ export interface CheckRecoveryPasswordTokenRequest {
53
+ token: string;
54
+ email: string;
55
+ }
56
+
57
+ export interface CheckRecoveryPasswordTokenResponse {
58
+ success: boolean;
59
+ attemptsLeft: number;
60
+ message: string;
61
+ }
62
+
63
+ export interface GetEmailVerificationByTokenRequest {
64
+ token: string;
65
+ }
66
+
67
+ export interface GetEmailVerificationByTokenResponse {
68
+ recipientId: string;
69
+ recipientType: string;
70
+ token: string;
71
+ expiresAt: Date;
72
+ isVerified: boolean;
73
+ }
74
+
75
+ export const EMAIL_PACKAGE_NAME = 'email';
76
+
77
+ export interface EmailServiceClient {
78
+ sendVerificationEmail(
79
+ request: SendVerificationEmailRequest,
80
+ ): Observable<SendVerificationEmailResponse>;
81
+
82
+ checkVerificationEmail(
83
+ request: CheckVerificationEmailRequest,
84
+ ): Observable<CheckVerificationEmailResponse>;
85
+
86
+ sendMessageEmail(
87
+ request: SendMessageEmailRequest,
88
+ ): Observable<SendMessageEmailResponse>;
89
+
90
+ sendRecoveryPasswordEmail(
91
+ request: SendRecoveryPasswordEmailRequest,
92
+ ): Observable<SendRecoveryPasswordEmailResponse>;
93
+
94
+ checkRecoveryPasswordToken(
95
+ request: CheckRecoveryPasswordTokenRequest,
96
+ ): Observable<CheckRecoveryPasswordTokenResponse>;
97
+
98
+ getEmailVerificationByToken(
99
+ request: GetEmailVerificationByTokenRequest,
100
+ ): Observable<GetEmailVerificationByTokenResponse>;
101
+ }
102
+
103
+ export interface EmailServiceController {
104
+ sendVerificationEmail(
105
+ request: SendVerificationEmailRequest,
106
+ ):
107
+ | Promise<SendVerificationEmailResponse>
108
+ | Observable<SendVerificationEmailResponse>
109
+ | SendVerificationEmailResponse;
110
+
111
+ checkVerificationEmail(
112
+ request: CheckVerificationEmailRequest,
113
+ ):
114
+ | Promise<CheckVerificationEmailResponse>
115
+ | Observable<CheckVerificationEmailResponse>
116
+ | CheckVerificationEmailResponse;
117
+
118
+ sendMessageEmail(
119
+ request: SendMessageEmailRequest,
120
+ ):
121
+ | Promise<SendMessageEmailResponse>
122
+ | Observable<SendMessageEmailResponse>
123
+ | SendMessageEmailResponse;
124
+
125
+ sendRecoveryPasswordEmail(
126
+ request: SendRecoveryPasswordEmailRequest,
127
+ ):
128
+ | Promise<SendRecoveryPasswordEmailResponse>
129
+ | Observable<SendRecoveryPasswordEmailResponse>
130
+ | SendRecoveryPasswordEmailResponse;
131
+
132
+ checkRecoveryPasswordToken(
133
+ request: CheckRecoveryPasswordTokenRequest,
134
+ ):
135
+ | Promise<CheckRecoveryPasswordTokenResponse>
136
+ | Observable<CheckRecoveryPasswordTokenResponse>
137
+ | CheckRecoveryPasswordTokenResponse;
138
+
139
+ getEmailVerificationByToken(
140
+ request: GetEmailVerificationByTokenRequest,
141
+ ):
142
+ | Promise<GetEmailVerificationByTokenResponse>
143
+ | Observable<GetEmailVerificationByTokenResponse>
144
+ | GetEmailVerificationByTokenResponse;
145
+ }
146
+
147
+ export function EmailServiceControllerMethods() {
148
+ return function (constructor: Function) {
149
+ const grpcMethods: string[] = [
150
+ 'sendVerificationEmail',
151
+ 'checkVerificationEmail',
152
+ 'sendMessageEmail',
153
+ 'sendRecoveryPasswordEmail',
154
+ 'checkRecoveryPasswordToken',
155
+ 'getEmailVerificationByToken',
156
+ ];
157
+ for (const method of grpcMethods) {
158
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
159
+ constructor.prototype,
160
+ method,
161
+ );
162
+ GrpcMethod('EmailService', method)(
163
+ constructor.prototype[method],
164
+ method,
165
+ descriptor,
166
+ );
167
+ }
168
+ const grpcStreamMethods: string[] = [];
169
+ for (const method of grpcStreamMethods) {
170
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
171
+ constructor.prototype,
172
+ method,
173
+ );
174
+ GrpcStreamMethod('EmailService', method)(
175
+ constructor.prototype[method],
176
+ method,
177
+ descriptor,
178
+ );
179
+ }
180
+ };
181
+ }
182
+
183
+ export const EMAIL_SERVICE_NAME = 'EmailService';
@@ -0,0 +1,75 @@
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: expo-push.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
9
+ import { Observable } from 'rxjs';
10
+
11
+ export const protobufPackage = 'expoPush';
12
+
13
+ export interface NotificationDto {
14
+ pushTokens: string[];
15
+ title: string;
16
+ body?: string | undefined;
17
+ data: { [key: string]: string };
18
+ }
19
+
20
+ export interface NotificationDto_DataEntry {
21
+ key: string;
22
+ value: string;
23
+ }
24
+
25
+ export interface DataValue {
26
+ stringValue?: string | undefined;
27
+ intValue?: number | undefined;
28
+ boolValue?: boolean | undefined;
29
+ floatValue?: number | undefined;
30
+ }
31
+
32
+ export interface Empty {}
33
+
34
+ export const EXPO_PUSH_PACKAGE_NAME = 'expoPush';
35
+
36
+ export interface ExpoPushServiceClient {
37
+ sendNotification(request: NotificationDto): Observable<Empty>;
38
+ }
39
+
40
+ export interface ExpoPushServiceController {
41
+ sendNotification(
42
+ request: NotificationDto,
43
+ ): Promise<Empty> | Observable<Empty> | Empty;
44
+ }
45
+
46
+ export function ExpoPushServiceControllerMethods() {
47
+ return function (constructor: Function) {
48
+ const grpcMethods: string[] = ['sendNotification'];
49
+ for (const method of grpcMethods) {
50
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
51
+ constructor.prototype,
52
+ method,
53
+ );
54
+ GrpcMethod('ExpoPushService', method)(
55
+ constructor.prototype[method],
56
+ method,
57
+ descriptor,
58
+ );
59
+ }
60
+ const grpcStreamMethods: string[] = [];
61
+ for (const method of grpcStreamMethods) {
62
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
63
+ constructor.prototype,
64
+ method,
65
+ );
66
+ GrpcStreamMethod('ExpoPushService', method)(
67
+ constructor.prototype[method],
68
+ method,
69
+ descriptor,
70
+ );
71
+ }
72
+ };
73
+ }
74
+
75
+ export const EXPO_PUSH_SERVICE_NAME = 'ExpoPushService';
@@ -0,0 +1,131 @@
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: fee.proto
6
+
7
+ /* eslint-disable */
8
+ import { brandType, FeeType, PaymentMethods } from '@postpaybr/contracts/types';
9
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
10
+ import { Observable } from 'rxjs';
11
+
12
+ export const protobufPackage = 'fee';
13
+
14
+ export interface CreateFeeDto {
15
+ method: PaymentMethods;
16
+ type: FeeType;
17
+ base: number;
18
+ percentage?: number | undefined;
19
+ promotionalBase?: number | undefined;
20
+ promotionalPercentage?: number | undefined;
21
+ description?: string | undefined;
22
+ installment: number;
23
+ brand: brandType;
24
+ }
25
+
26
+ export interface UpdateFeeDto {
27
+ method?: PaymentMethods | undefined;
28
+ type?: FeeType | undefined;
29
+ base?: number | undefined;
30
+ percentage?: number | undefined;
31
+ promotionalBase?: number | undefined;
32
+ promotionalPercentage?: number | undefined;
33
+ description?: string | undefined;
34
+ installment?: number | undefined;
35
+ brand?: brandType | undefined;
36
+ recipientId: string;
37
+ feeId: string;
38
+ }
39
+
40
+ export interface GetFeeRequest {
41
+ recipientId: string;
42
+ method: PaymentMethods;
43
+ installment?: number | undefined;
44
+ brand?: brandType | undefined;
45
+ }
46
+
47
+ export interface FeeEntity {
48
+ id: string;
49
+ method: PaymentMethods;
50
+ type: FeeType;
51
+ base: number;
52
+ percentage: number;
53
+ promotionalBase: number;
54
+ promotionalPercentage: number;
55
+ description?: string | undefined;
56
+ installment: number;
57
+ isDefault: boolean;
58
+ brand: brandType;
59
+ }
60
+
61
+ export interface FeeEntityList {
62
+ fees: FeeEntity[];
63
+ }
64
+
65
+ export interface Void {}
66
+
67
+ export const FEE_PACKAGE_NAME = 'fee';
68
+
69
+ export interface FeeServiceClient {
70
+ createFee(request: CreateFeeDto): Observable<FeeEntity>;
71
+
72
+ updateRecipientFee(request: UpdateFeeDto): Observable<FeeEntity>;
73
+
74
+ getAllDefaultFees(request: Void): Observable<FeeEntityList>;
75
+
76
+ getFeeForRecipientAndMethod(request: GetFeeRequest): Observable<FeeEntity>;
77
+ }
78
+
79
+ export interface FeeServiceController {
80
+ createFee(
81
+ request: CreateFeeDto,
82
+ ): Promise<FeeEntity> | Observable<FeeEntity> | FeeEntity;
83
+
84
+ updateRecipientFee(
85
+ request: UpdateFeeDto,
86
+ ): Promise<FeeEntity> | Observable<FeeEntity> | FeeEntity;
87
+
88
+ getAllDefaultFees(
89
+ request: Void,
90
+ ): Promise<FeeEntityList> | Observable<FeeEntityList> | FeeEntityList;
91
+
92
+ getFeeForRecipientAndMethod(
93
+ request: GetFeeRequest,
94
+ ): Promise<FeeEntity> | Observable<FeeEntity> | FeeEntity;
95
+ }
96
+
97
+ export function FeeServiceControllerMethods() {
98
+ return function (constructor: Function) {
99
+ const grpcMethods: string[] = [
100
+ 'createFee',
101
+ 'updateRecipientFee',
102
+ 'getAllDefaultFees',
103
+ 'getFeeForRecipientAndMethod',
104
+ ];
105
+ for (const method of grpcMethods) {
106
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
107
+ constructor.prototype,
108
+ method,
109
+ );
110
+ GrpcMethod('FeeService', method)(
111
+ constructor.prototype[method],
112
+ method,
113
+ descriptor,
114
+ );
115
+ }
116
+ const grpcStreamMethods: string[] = [];
117
+ for (const method of grpcStreamMethods) {
118
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
119
+ constructor.prototype,
120
+ method,
121
+ );
122
+ GrpcStreamMethod('FeeService', method)(
123
+ constructor.prototype[method],
124
+ method,
125
+ descriptor,
126
+ );
127
+ }
128
+ };
129
+ }
130
+
131
+ export const FEE_SERVICE_NAME = 'FeeService';