@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,209 @@
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.1
5
+ // source: payment-gateway.proto
6
+
7
+ /* eslint-disable */
8
+ import {
9
+ GatewayIdentification,
10
+ PaymentMethods,
11
+ } from '@postpaybr/contracts/types';
12
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
13
+ import { Observable } from 'rxjs';
14
+
15
+ export const protobufPackage = 'paymentGateway';
16
+
17
+ export interface PaymentGateway {
18
+ id: string;
19
+ name: string;
20
+ gatewayId: GatewayIdentification;
21
+ supportsPix: boolean;
22
+ supportsCreditCard: boolean;
23
+ supportsDebitCard: boolean;
24
+ supportsAutomaticAnticipation: boolean;
25
+ supportsManualAnticipation: boolean;
26
+ isActive: boolean;
27
+ description: string;
28
+ createdAt: Date;
29
+ updatedAt: Date;
30
+ }
31
+
32
+ export interface PaymentGatewayResponse {
33
+ paymentGateway: PaymentGateway | undefined;
34
+ }
35
+
36
+ export interface PaymentGatewayListResponse {
37
+ gateways: PaymentGateway[];
38
+ }
39
+
40
+ export interface GetByIdRequest {
41
+ id: string;
42
+ }
43
+
44
+ export interface GetByGatewayIdRequest {
45
+ gatewayId: GatewayIdentification;
46
+ }
47
+
48
+ export interface GetGatewaysByMethodSupportRequest {
49
+ method: PaymentMethods;
50
+ }
51
+
52
+ export interface CreateGatewayRequest {
53
+ name: string;
54
+ gatewayId: GatewayIdentification;
55
+ supportsPix: boolean;
56
+ supportsCreditCard: boolean;
57
+ supportsDebitCard: boolean;
58
+ supportsAutomaticAnticipation: boolean;
59
+ supportsManualAnticipation: boolean;
60
+ isActive: boolean;
61
+ description: string;
62
+ }
63
+
64
+ export interface UpdateGatewayRequest {
65
+ id: string;
66
+ name?: string | undefined;
67
+ gatewayId?: GatewayIdentification | undefined;
68
+ supportsPix?: boolean | undefined;
69
+ supportsCreditCard?: boolean | undefined;
70
+ supportsDebitCard?: boolean | undefined;
71
+ supportsAutomaticAnticipation?: boolean | undefined;
72
+ supportsManualAnticipation?: boolean | undefined;
73
+ isActive?: boolean | undefined;
74
+ description?: string | undefined;
75
+ }
76
+
77
+ export interface DeactivateGatewayRequest {
78
+ id: string;
79
+ }
80
+
81
+ export interface Void {}
82
+
83
+ export interface TableFilterParams {
84
+ pageIndex?: number | undefined;
85
+ pageSize?: number | undefined;
86
+ statuses?: string[];
87
+ globalFilter?: string | undefined;
88
+ startDate?: Date | undefined;
89
+ endDate?: Date | undefined;
90
+ }
91
+
92
+ export interface GetAllGatewaysRequest {
93
+ filter: TableFilterParams | undefined;
94
+ }
95
+
96
+ export const PAYMENT_GATEWAY_PACKAGE_NAME = 'paymentGateway';
97
+
98
+ export interface PaymentGatewayServiceClient {
99
+ getById(request: GetByIdRequest): Observable<PaymentGatewayResponse>;
100
+
101
+ getByGatewayId(
102
+ request: GetByGatewayIdRequest,
103
+ ): Observable<PaymentGatewayResponse>;
104
+
105
+ getAllGateways(
106
+ request: GetAllGatewaysRequest,
107
+ ): Observable<PaymentGatewayListResponse>;
108
+
109
+ getGatewaysByMethodSupport(
110
+ request: GetGatewaysByMethodSupportRequest,
111
+ ): Observable<PaymentGatewayListResponse>;
112
+
113
+ createGateway(
114
+ request: CreateGatewayRequest,
115
+ ): Observable<PaymentGatewayResponse>;
116
+
117
+ updateGateway(
118
+ request: UpdateGatewayRequest,
119
+ ): Observable<PaymentGatewayResponse>;
120
+
121
+ deactivateGateway(request: DeactivateGatewayRequest): Observable<Void>;
122
+ }
123
+
124
+ export interface PaymentGatewayServiceController {
125
+ getById(
126
+ request: GetByIdRequest,
127
+ ):
128
+ | Promise<PaymentGatewayResponse>
129
+ | Observable<PaymentGatewayResponse>
130
+ | PaymentGatewayResponse;
131
+
132
+ getByGatewayId(
133
+ request: GetByGatewayIdRequest,
134
+ ):
135
+ | Promise<PaymentGatewayResponse>
136
+ | Observable<PaymentGatewayResponse>
137
+ | PaymentGatewayResponse;
138
+
139
+ getAllGateways(
140
+ request: GetAllGatewaysRequest,
141
+ ):
142
+ | Promise<PaymentGatewayListResponse>
143
+ | Observable<PaymentGatewayListResponse>
144
+ | PaymentGatewayListResponse;
145
+
146
+ getGatewaysByMethodSupport(
147
+ request: GetGatewaysByMethodSupportRequest,
148
+ ):
149
+ | Promise<PaymentGatewayListResponse>
150
+ | Observable<PaymentGatewayListResponse>
151
+ | PaymentGatewayListResponse;
152
+
153
+ createGateway(
154
+ request: CreateGatewayRequest,
155
+ ):
156
+ | Promise<PaymentGatewayResponse>
157
+ | Observable<PaymentGatewayResponse>
158
+ | PaymentGatewayResponse;
159
+
160
+ updateGateway(
161
+ request: UpdateGatewayRequest,
162
+ ):
163
+ | Promise<PaymentGatewayResponse>
164
+ | Observable<PaymentGatewayResponse>
165
+ | PaymentGatewayResponse;
166
+
167
+ deactivateGateway(
168
+ request: DeactivateGatewayRequest,
169
+ ): Promise<Void> | Observable<Void> | Void;
170
+ }
171
+
172
+ export function PaymentGatewayServiceControllerMethods() {
173
+ return function (constructor: Function) {
174
+ const grpcMethods: string[] = [
175
+ 'getById',
176
+ 'getByGatewayId',
177
+ 'getAllGateways',
178
+ 'getGatewaysByMethodSupport',
179
+ 'createGateway',
180
+ 'updateGateway',
181
+ 'deactivateGateway',
182
+ ];
183
+ for (const method of grpcMethods) {
184
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
185
+ constructor.prototype,
186
+ method,
187
+ );
188
+ GrpcMethod('PaymentGatewayService', method)(
189
+ constructor.prototype[method],
190
+ method,
191
+ descriptor,
192
+ );
193
+ }
194
+ const grpcStreamMethods: string[] = [];
195
+ for (const method of grpcStreamMethods) {
196
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
197
+ constructor.prototype,
198
+ method,
199
+ );
200
+ GrpcStreamMethod('PaymentGatewayService', method)(
201
+ constructor.prototype[method],
202
+ method,
203
+ descriptor,
204
+ );
205
+ }
206
+ };
207
+ }
208
+
209
+ export const PAYMENT_GATEWAY_SERVICE_NAME = 'PaymentGatewayService';
@@ -0,0 +1,170 @@
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: payment-pix.proto
6
+
7
+ /* eslint-disable */
8
+ import {
9
+ brandType,
10
+ GatewayIdentification,
11
+ Meta,
12
+ MetaType,
13
+ PaymentMethods,
14
+ PaymentScheduleType,
15
+ TaxStatus,
16
+ TaxTypes,
17
+ } from '@postpaybr/contracts/types';
18
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
19
+ import { Observable } from 'rxjs';
20
+
21
+ export const protobufPackage = 'paymentPix';
22
+
23
+ export interface CreatePaymentRequest {
24
+ customerId: string;
25
+ taxes: TaxPayload[];
26
+ payment: PaymentDetails | undefined;
27
+ closed?: boolean | undefined;
28
+ ip?: string | undefined;
29
+ sessionId?: string | undefined;
30
+ pushToken: string;
31
+ }
32
+
33
+ export interface TaxPayload {
34
+ tax: Tax | undefined;
35
+ payer: Payer | undefined;
36
+ location: Location | undefined;
37
+ metaType: MetaType;
38
+ meta: Meta | undefined;
39
+ }
40
+
41
+ export interface Tax {
42
+ id: string;
43
+ type: TaxTypes;
44
+ status: TaxStatus;
45
+ description: string;
46
+ amount: number;
47
+ year: number;
48
+ dueAt: string;
49
+ documentId: string;
50
+ code: string;
51
+ isSingleQuota: boolean;
52
+ quota?: number | undefined;
53
+ fee: number;
54
+ fine: number;
55
+ discountAmount: number;
56
+ }
57
+
58
+ export interface Payer {
59
+ id?: string | undefined;
60
+ name: string;
61
+ document: string;
62
+ phone?: string | undefined;
63
+ }
64
+
65
+ export interface Location {
66
+ state: number;
67
+ city: number;
68
+ recipientId: string;
69
+ }
70
+
71
+ export interface Address {
72
+ street: string;
73
+ number: string;
74
+ complement: string;
75
+ neighborhood: string;
76
+ city: string;
77
+ state: string;
78
+ zipCode: string;
79
+ }
80
+
81
+ export interface PaymentDetails {
82
+ method: PaymentMethods;
83
+ amount: number;
84
+ discountPercentage?: number | undefined;
85
+ fee: number;
86
+ discountAmount?: number | undefined;
87
+ gatewayId?: GatewayIdentification | undefined;
88
+ card?: Card | undefined;
89
+ paymentSchedule: PaymentSchedule | undefined;
90
+ baseFee: number;
91
+ feePercentage: number;
92
+ chargeId?: string | undefined;
93
+ isRetry?: boolean | undefined;
94
+ orderId?: string | undefined;
95
+ }
96
+
97
+ export interface PaymentSchedule {
98
+ type: PaymentScheduleType;
99
+ date?: string | undefined;
100
+ }
101
+
102
+ export interface Card {
103
+ id: string;
104
+ shadowNumber: string;
105
+ brand: brandType;
106
+ installments?: number | undefined;
107
+ installmentValue?: number | undefined;
108
+ }
109
+
110
+ export interface Order {
111
+ id: string;
112
+ totalAmount: number;
113
+ status: string;
114
+ createdAt: Date;
115
+ }
116
+
117
+ export interface CreatePaymentResponse {
118
+ order: Order | undefined;
119
+ orderType: string;
120
+ chargeId: string;
121
+ }
122
+
123
+ export const PAYMENT_PIX_PACKAGE_NAME = 'paymentPix';
124
+
125
+ export interface PaymentPixClient {
126
+ createPayment(
127
+ request: CreatePaymentRequest,
128
+ ): Observable<CreatePaymentResponse>;
129
+ }
130
+
131
+ export interface PaymentPixController {
132
+ createPayment(
133
+ request: CreatePaymentRequest,
134
+ ):
135
+ | Promise<CreatePaymentResponse>
136
+ | Observable<CreatePaymentResponse>
137
+ | CreatePaymentResponse;
138
+ }
139
+
140
+ export function PaymentPixControllerMethods() {
141
+ return function (constructor: Function) {
142
+ const grpcMethods: string[] = ['createPayment'];
143
+ for (const method of grpcMethods) {
144
+ 1;
145
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
146
+ constructor.prototype,
147
+ method,
148
+ );
149
+ GrpcMethod('PaymentPix', method)(
150
+ constructor.prototype[method],
151
+ method,
152
+ descriptor,
153
+ );
154
+ }
155
+ const grpcStreamMethods: string[] = [];
156
+ for (const method of grpcStreamMethods) {
157
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
158
+ constructor.prototype,
159
+ method,
160
+ );
161
+ GrpcStreamMethod('PaymentPix', method)(
162
+ constructor.prototype[method],
163
+ method,
164
+ descriptor,
165
+ );
166
+ }
167
+ };
168
+ }
169
+
170
+ export const PAYMENT_SERVICE_PIX_SERVICE_NAME = 'PaymentPix';
@@ -0,0 +1,344 @@
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: receipt.proto
6
+
7
+ /* eslint-disable */
8
+ import {
9
+ ChargeStatus,
10
+ PaymentMethods,
11
+ ReceiptMetadata,
12
+ TaxTypes,
13
+ } from '@postpaybr/contracts/types';
14
+ import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
15
+ import { Observable } from 'rxjs';
16
+ import { ChargeScheduleDetail } from './charge';
17
+
18
+ export const protobufPackage = 'receipt';
19
+
20
+ export interface CreateReceiptRequest {
21
+ customerId: string;
22
+ data: CreateReceiptDto | undefined;
23
+ }
24
+
25
+ export interface GetReceiptRequest {
26
+ customerId: string;
27
+ id: string;
28
+ }
29
+
30
+ export interface GetAllReceiptsRequest {
31
+ customerId: string;
32
+ dateFilter: DateFilter | undefined;
33
+ pagination: PaginationFilter | undefined;
34
+ }
35
+
36
+ export interface UpdateTxidRequest {
37
+ chargeId: string;
38
+ txid: string;
39
+ }
40
+
41
+ export interface PaymentSummaryPreviewRequest {
42
+ customerId: string;
43
+ orderId: string;
44
+ orderType: string;
45
+ }
46
+
47
+ export interface ReceiptsByTaxIdsRequest {
48
+ taxIds: string[];
49
+ }
50
+
51
+ export interface GetReceiptByIdRequest {
52
+ id: string;
53
+ }
54
+
55
+ export interface ReceiptResponse {
56
+ id: string;
57
+ amount: number;
58
+ protocol: string;
59
+ txid: string;
60
+ createdAt: Date;
61
+
62
+ customerId: string;
63
+ taxId: string;
64
+ chargeId?: string | undefined;
65
+ isNfseIssued: boolean;
66
+ metadata?: ReceiptMetadata | undefined;
67
+ }
68
+
69
+ export interface ReceiptDetailResponse {
70
+ id: string;
71
+ createdAt: string;
72
+ method: string;
73
+ discountPercentage: number;
74
+ discountAmount: number;
75
+ fee: number;
76
+ fine: number;
77
+ amount: number;
78
+ protocol: string;
79
+ txid: string;
80
+ tax: TaxDetail | undefined;
81
+ }
82
+
83
+ export interface ReceiptsListResponse {
84
+ receipts: ReceiptListItem[];
85
+ count: number;
86
+ }
87
+
88
+ export interface ReceiptListItem {
89
+ id: string;
90
+ recipient: string;
91
+ paymentDate: Date;
92
+ amount: number;
93
+ method: string;
94
+ taxType: string;
95
+ }
96
+
97
+ export interface ReceiptsResponse {
98
+ receipts: ReceiptResponse[];
99
+ }
100
+
101
+ export interface PaymentSummaryPreviewResponse {
102
+ summary: PaymentSummary | undefined;
103
+ paymentsMade?: IndividualPayment[];
104
+ scheduledPayments?: IndividualPayment[];
105
+ }
106
+
107
+ export interface CreateReceiptDto {
108
+ amount: number;
109
+ protocol: string;
110
+ chargeId: string;
111
+ taxId: string;
112
+ txid: string;
113
+ }
114
+
115
+ export interface DateFilter {
116
+ startDate?: Date | undefined;
117
+ endDate?: Date | undefined;
118
+ }
119
+
120
+ export interface PaginationFilter {
121
+ limit?: number | undefined;
122
+ offset?: number | undefined;
123
+ }
124
+
125
+ export interface TaxDetail {
126
+ tax: reducedTax | undefined;
127
+ payer: Payer | undefined;
128
+ location: LocationInfo | undefined;
129
+ metaType: string;
130
+ meta: Meta | undefined;
131
+ items: TaxItem[];
132
+ }
133
+
134
+ export interface Meta {
135
+ address?: Address | undefined;
136
+ licensePlate?: string | undefined;
137
+ model?: string | undefined;
138
+ yearManufacture?: number | undefined;
139
+ renavam?: string | undefined;
140
+ }
141
+
142
+ export interface Address {
143
+ street: string;
144
+ number: string;
145
+ complement: string;
146
+ neighborhood: string;
147
+ city: string;
148
+ state: string;
149
+ zipCode: string;
150
+ }
151
+
152
+ export interface reducedTax {
153
+ id: string;
154
+ type: string;
155
+ description: string;
156
+ year: number;
157
+ documentId: string;
158
+ }
159
+
160
+ export interface LocationInfo {
161
+ state: number;
162
+ city: number;
163
+ recipientId: string;
164
+ }
165
+
166
+ export interface TaxItem {
167
+ id: string;
168
+ code: string;
169
+ quota: number;
170
+ dueAt: string;
171
+ amount: number;
172
+ isSingleQuota: boolean;
173
+ status: string;
174
+ discountPercentage: number;
175
+ discountAmount: number;
176
+ fee: number;
177
+ fine: number;
178
+ }
179
+
180
+ export interface Payer {
181
+ name: string;
182
+ document: string;
183
+ }
184
+
185
+ export interface PaymentSummary {
186
+ totalPaymentsMade?: number | undefined;
187
+ totalScheduledPayments?: number | undefined;
188
+ timestamp: string;
189
+ }
190
+
191
+ export interface IndividualPayment {
192
+ id: string;
193
+ createdAt: Date;
194
+ paymentMethod: PaymentMethods;
195
+ propertyDocument: string;
196
+ propertyDetail: string;
197
+ installmentNumber: number;
198
+ installmentValue: number;
199
+ schedule?: ChargeScheduleDetail | undefined;
200
+ taxType: TaxTypes;
201
+ status: ChargeStatus;
202
+ }
203
+
204
+ export interface deleteReceiptByChargeIdRequest {
205
+ chargeId: string;
206
+ }
207
+
208
+ export interface DeleteReceiptsResponse {
209
+ affected: number;
210
+ }
211
+
212
+ export const RECEIPT_PACKAGE_NAME = 'receipt';
213
+
214
+ export interface ReceiptServiceClient {
215
+ createReceipt(request: CreateReceiptRequest): Observable<ReceiptResponse>;
216
+
217
+ getReceipt(request: GetReceiptRequest): Observable<ReceiptDetailResponse>;
218
+
219
+ getAllReceipts(
220
+ request: GetAllReceiptsRequest,
221
+ ): Observable<ReceiptsListResponse>;
222
+
223
+ updateTxidByChargeId(
224
+ request: UpdateTxidRequest,
225
+ ): Observable<ReceiptsResponse>;
226
+
227
+ getPaymentSummaryPreview(
228
+ request: PaymentSummaryPreviewRequest,
229
+ ): Observable<PaymentSummaryPreviewResponse>;
230
+
231
+ getReceiptsByTaxIds(
232
+ request: ReceiptsByTaxIdsRequest,
233
+ ): Observable<ReceiptsResponse>;
234
+
235
+ getReceiptsByTaxIdsExcludingSeeded(
236
+ request: ReceiptsByTaxIdsRequest,
237
+ ): Observable<ReceiptsResponse>;
238
+
239
+ getReceiptById(request: GetReceiptByIdRequest): Observable<ReceiptResponse>;
240
+
241
+ deleteReceiptByChargeId(
242
+ request: deleteReceiptByChargeIdRequest,
243
+ ): Observable<DeleteReceiptsResponse>;
244
+ }
245
+
246
+ export interface ReceiptServiceController {
247
+ createReceipt(
248
+ request: CreateReceiptRequest,
249
+ ): Promise<ReceiptResponse> | Observable<ReceiptResponse> | ReceiptResponse;
250
+
251
+ getReceipt(
252
+ request: GetReceiptRequest,
253
+ ):
254
+ | Promise<ReceiptDetailResponse>
255
+ | Observable<ReceiptDetailResponse>
256
+ | ReceiptDetailResponse;
257
+
258
+ getAllReceipts(
259
+ request: GetAllReceiptsRequest,
260
+ ):
261
+ | Promise<ReceiptsListResponse>
262
+ | Observable<ReceiptsListResponse>
263
+ | ReceiptsListResponse;
264
+
265
+ updateTxidByChargeId(
266
+ request: UpdateTxidRequest,
267
+ ):
268
+ | Promise<ReceiptsResponse>
269
+ | Observable<ReceiptsResponse>
270
+ | ReceiptsResponse;
271
+
272
+ getPaymentSummaryPreview(
273
+ request: PaymentSummaryPreviewRequest,
274
+ ):
275
+ | Promise<PaymentSummaryPreviewResponse>
276
+ | Observable<PaymentSummaryPreviewResponse>
277
+ | PaymentSummaryPreviewResponse;
278
+
279
+ getReceiptsByTaxIds(
280
+ request: ReceiptsByTaxIdsRequest,
281
+ ):
282
+ | Promise<ReceiptsResponse>
283
+ | Observable<ReceiptsResponse>
284
+ | ReceiptsResponse;
285
+
286
+ getReceiptsByTaxIdsExcludingSeeded(
287
+ request: ReceiptsByTaxIdsRequest,
288
+ ):
289
+ | Promise<ReceiptsResponse>
290
+ | Observable<ReceiptsResponse>
291
+ | ReceiptsResponse;
292
+
293
+ getReceiptById(
294
+ request: GetReceiptByIdRequest,
295
+ ): Promise<ReceiptResponse> | Observable<ReceiptResponse> | ReceiptResponse;
296
+
297
+ deleteReceiptByChargeId(
298
+ request: deleteReceiptByChargeIdRequest,
299
+ ):
300
+ | Promise<DeleteReceiptsResponse>
301
+ | Observable<DeleteReceiptsResponse>
302
+ | DeleteReceiptsResponse;
303
+ }
304
+
305
+ export function ReceiptServiceControllerMethods() {
306
+ return function (constructor: Function) {
307
+ const grpcMethods: string[] = [
308
+ 'createReceipt',
309
+ 'getReceipt',
310
+ 'getAllReceipts',
311
+ 'updateTxidByChargeId',
312
+ 'getPaymentSummaryPreview',
313
+ 'getReceiptsByTaxIds',
314
+ 'getReceiptsByTaxIdsExcludingSeeded',
315
+ 'getReceiptById',
316
+ 'deleteReceiptByChargeId',
317
+ ];
318
+ for (const method of grpcMethods) {
319
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
320
+ constructor.prototype,
321
+ method,
322
+ );
323
+ GrpcMethod('ReceiptService', method)(
324
+ constructor.prototype[method],
325
+ method,
326
+ descriptor,
327
+ );
328
+ }
329
+ const grpcStreamMethods: string[] = [];
330
+ for (const method of grpcStreamMethods) {
331
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(
332
+ constructor.prototype,
333
+ method,
334
+ );
335
+ GrpcStreamMethod('ReceiptService', method)(
336
+ constructor.prototype[method],
337
+ method,
338
+ descriptor,
339
+ );
340
+ }
341
+ };
342
+ }
343
+
344
+ export const RECEIPT_SERVICE_NAME = 'ReceiptService';