@postpaybr/protos 1.1.5 → 1.1.8

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 (118) hide show
  1. package/dist/typescript/account-entry.d.ts +80 -0
  2. package/dist/typescript/account-entry.js +32 -0
  3. package/dist/typescript/address.d.ts +65 -0
  4. package/dist/typescript/address.js +33 -0
  5. package/dist/typescript/admin-card-verification.d.ts +86 -0
  6. package/dist/typescript/admin-card-verification.js +32 -0
  7. package/dist/typescript/administrator.d.ts +176 -0
  8. package/dist/typescript/administrator.js +41 -0
  9. package/dist/typescript/anticipation.d.ts +84 -0
  10. package/dist/typescript/anticipation.js +34 -0
  11. package/dist/typescript/asset.d.ts +43 -0
  12. package/dist/typescript/asset.js +33 -0
  13. package/dist/typescript/auth.d.ts +28 -0
  14. package/dist/typescript/auth.js +28 -0
  15. package/dist/typescript/bank-account.d.ts +63 -0
  16. package/dist/typescript/bank-account.js +33 -0
  17. package/dist/typescript/card-vault.d.ts +35 -0
  18. package/dist/typescript/card-vault.js +28 -0
  19. package/dist/typescript/card-verification.d.ts +29 -0
  20. package/dist/typescript/card-verification.js +31 -0
  21. package/dist/typescript/card.d.ts +147 -0
  22. package/dist/typescript/card.js +37 -0
  23. package/dist/typescript/charge-schedule.d.ts +35 -0
  24. package/dist/typescript/charge-schedule.js +28 -0
  25. package/dist/typescript/charge.d.ts +538 -0
  26. package/dist/typescript/charge.js +59 -0
  27. package/dist/typescript/context.d.ts +154 -0
  28. package/dist/typescript/context.js +36 -0
  29. package/dist/typescript/customer.d.ts +213 -0
  30. package/dist/typescript/customer.js +43 -0
  31. package/dist/typescript/daily-balance.d.ts +32 -0
  32. package/dist/typescript/daily-balance.js +28 -0
  33. package/dist/typescript/document-verification.d.ts +106 -0
  34. package/dist/typescript/document-verification.js +34 -0
  35. package/dist/typescript/email.d.ts +71 -0
  36. package/dist/typescript/email.js +35 -0
  37. package/dist/typescript/expo-push.d.ts +31 -0
  38. package/dist/typescript/expo-push.js +28 -0
  39. package/dist/typescript/fee.d.ts +66 -0
  40. package/dist/typescript/fee.js +32 -0
  41. package/dist/typescript/location.d.ts +38 -0
  42. package/dist/typescript/location.js +28 -0
  43. package/dist/typescript/notification.d.ts +198 -0
  44. package/dist/typescript/notification.js +39 -0
  45. package/dist/typescript/order.d.ts +173 -0
  46. package/dist/typescript/order.js +38 -0
  47. package/dist/typescript/payable.d.ts +226 -0
  48. package/dist/typescript/payable.js +41 -0
  49. package/dist/typescript/payer.d.ts +23 -0
  50. package/dist/typescript/payer.js +28 -0
  51. package/dist/typescript/payment-calculator.d.ts +135 -0
  52. package/dist/typescript/payment-calculator.js +33 -0
  53. package/dist/typescript/payment-card.d.ts +189 -0
  54. package/dist/typescript/payment-card.js +31 -0
  55. package/dist/typescript/payment-gateway.d.ts +92 -0
  56. package/dist/typescript/payment-gateway.js +35 -0
  57. package/dist/typescript/payment-pix.d.ts +101 -0
  58. package/dist/typescript/payment-pix.js +28 -0
  59. package/dist/typescript/receipt.d.ts +193 -0
  60. package/dist/typescript/receipt.js +37 -0
  61. package/dist/typescript/recipient-payment-gateway.d.ts +95 -0
  62. package/dist/typescript/recipient-payment-gateway.js +34 -0
  63. package/dist/typescript/recipient.d.ts +222 -0
  64. package/dist/typescript/recipient.js +40 -0
  65. package/dist/typescript/role.d.ts +57 -0
  66. package/dist/typescript/role.js +34 -0
  67. package/dist/typescript/sms.d.ts +34 -0
  68. package/dist/typescript/sms.js +28 -0
  69. package/dist/typescript/tax.d.ts +293 -0
  70. package/dist/typescript/tax.js +40 -0
  71. package/dist/typescript/transfer.d.ts +185 -0
  72. package/dist/typescript/transfer.js +27 -0
  73. package/dist/typescript/two-factor.d.ts +66 -0
  74. package/dist/typescript/two-factor.js +34 -0
  75. package/dist/typescript/user.d.ts +196 -0
  76. package/dist/typescript/user.js +45 -0
  77. package/dist/typescript/wallet.d.ts +18 -0
  78. package/dist/typescript/wallet.js +28 -0
  79. package/package.json +16 -7
  80. /package/{account-entry.proto → src/protos/account-entry.proto} +0 -0
  81. /package/{address.proto → src/protos/address.proto} +0 -0
  82. /package/{admin-card-verification.proto → src/protos/admin-card-verification.proto} +0 -0
  83. /package/{administrator.proto → src/protos/administrator.proto} +0 -0
  84. /package/{anticipation.proto → src/protos/anticipation.proto} +0 -0
  85. /package/{asset.proto → src/protos/asset.proto} +0 -0
  86. /package/{auth.proto → src/protos/auth.proto} +0 -0
  87. /package/{bank-account.proto → src/protos/bank-account.proto} +0 -0
  88. /package/{card-vault.proto → src/protos/card-vault.proto} +0 -0
  89. /package/{card-verification.proto → src/protos/card-verification.proto} +0 -0
  90. /package/{card.proto → src/protos/card.proto} +0 -0
  91. /package/{charge-schedule.proto → src/protos/charge-schedule.proto} +0 -0
  92. /package/{charge.proto → src/protos/charge.proto} +0 -0
  93. /package/{context.proto → src/protos/context.proto} +0 -0
  94. /package/{customer.proto → src/protos/customer.proto} +0 -0
  95. /package/{daily-balance.proto → src/protos/daily-balance.proto} +0 -0
  96. /package/{document-verification.proto → src/protos/document-verification.proto} +0 -0
  97. /package/{email.proto → src/protos/email.proto} +0 -0
  98. /package/{expo-push.proto → src/protos/expo-push.proto} +0 -0
  99. /package/{fee.proto → src/protos/fee.proto} +0 -0
  100. /package/{location.proto → src/protos/location.proto} +0 -0
  101. /package/{notification.proto → src/protos/notification.proto} +0 -0
  102. /package/{order.proto → src/protos/order.proto} +0 -0
  103. /package/{payable.proto → src/protos/payable.proto} +0 -0
  104. /package/{payer.proto → src/protos/payer.proto} +0 -0
  105. /package/{payment-calculator.proto → src/protos/payment-calculator.proto} +0 -0
  106. /package/{payment-card.proto → src/protos/payment-card.proto} +0 -0
  107. /package/{payment-gateway.proto → src/protos/payment-gateway.proto} +0 -0
  108. /package/{payment-pix.proto → src/protos/payment-pix.proto} +0 -0
  109. /package/{receipt.proto → src/protos/receipt.proto} +0 -0
  110. /package/{recipient-payment-gateway.proto → src/protos/recipient-payment-gateway.proto} +0 -0
  111. /package/{recipient.proto → src/protos/recipient.proto} +0 -0
  112. /package/{role.proto → src/protos/role.proto} +0 -0
  113. /package/{sms.proto → src/protos/sms.proto} +0 -0
  114. /package/{tax.proto → src/protos/tax.proto} +0 -0
  115. /package/{transfer.proto → src/protos/transfer.proto} +0 -0
  116. /package/{two-factor.proto → src/protos/two-factor.proto} +0 -0
  117. /package/{user.proto → src/protos/user.proto} +0 -0
  118. /package/{wallet.proto → src/protos/wallet.proto} +0 -0
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v6.32.0
6
+ // source: payment-calculator.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PAYMENT_CALCULATOR_SERVICE_NAME = exports.PAYMENT_CALCULATOR_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.PaymentCalculatorServiceControllerMethods = PaymentCalculatorServiceControllerMethods;
10
+ const microservices_1 = require("@nestjs/microservices");
11
+ exports.protobufPackage = 'paymentCalculator';
12
+ exports.PAYMENT_CALCULATOR_PACKAGE_NAME = 'paymentCalculator';
13
+ function PaymentCalculatorServiceControllerMethods() {
14
+ return function (constructor) {
15
+ const grpcMethods = [
16
+ 'calculateInstallments',
17
+ 'getPaymentMethods',
18
+ 'getPrincipalMethod',
19
+ 'calculatePostpayFee',
20
+ 'calculateIndividualTaxFees',
21
+ ];
22
+ for (const method of grpcMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ (0, microservices_1.GrpcMethod)('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ const grpcStreamMethods = [];
27
+ for (const method of grpcStreamMethods) {
28
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
29
+ (0, microservices_1.GrpcStreamMethod)('PaymentCalculatorService', method)(constructor.prototype[method], method, descriptor);
30
+ }
31
+ };
32
+ }
33
+ exports.PAYMENT_CALCULATOR_SERVICE_NAME = 'PaymentCalculatorService';
@@ -0,0 +1,189 @@
1
+ import { HolderType, RecipientLegalType } from '@postpaybr/contracts/dist/enums';
2
+ import { brandType, ChargeMetadata, ChargeStatus, ChargeType, GatewayIdentification, taxMeta, MetaType, PaymentMethods, PaymentScheduleType, TaxStatus, TaxTypes } from '@postpaybr/contracts/dist/types';
3
+ import { Observable } from 'rxjs';
4
+ export declare const protobufPackage = "paymentCard";
5
+ export interface CreatePaymentRequest {
6
+ customerId: string;
7
+ taxes: TaxPayload[];
8
+ payment: PaymentDetails | undefined;
9
+ closed?: boolean | undefined;
10
+ ip?: string | undefined;
11
+ sessionId?: string | undefined;
12
+ pushToken: string;
13
+ }
14
+ export interface TaxPayload {
15
+ tax: Tax | undefined;
16
+ payer: Payer | undefined;
17
+ location: Location | undefined;
18
+ metaType: MetaType;
19
+ meta: taxMeta | undefined;
20
+ }
21
+ export interface Tax {
22
+ id: string;
23
+ type: TaxTypes;
24
+ status: TaxStatus;
25
+ description: string;
26
+ amount: number;
27
+ year: number;
28
+ dueAt: string;
29
+ documentId: string;
30
+ code: string;
31
+ isSingleQuota: boolean;
32
+ quota?: number | undefined;
33
+ fee: number;
34
+ fine: number;
35
+ discountAmount: number;
36
+ }
37
+ export interface Payer {
38
+ id?: string | undefined;
39
+ name: string;
40
+ document: string;
41
+ phone?: string | undefined;
42
+ }
43
+ export interface Location {
44
+ state: number;
45
+ city: number;
46
+ recipientId: string;
47
+ }
48
+ export interface PaymentDetails {
49
+ method: PaymentMethods;
50
+ amount: number;
51
+ discountPercentage?: number | undefined;
52
+ fee: number;
53
+ discountAmount?: number | undefined;
54
+ gatewayId?: GatewayIdentification | undefined;
55
+ card?: Card | undefined;
56
+ paymentSchedule: PaymentSchedule | undefined;
57
+ baseFee: number;
58
+ feePercentage: number;
59
+ chargeId?: string | undefined;
60
+ isRetry?: boolean | undefined;
61
+ orderId?: string | undefined;
62
+ }
63
+ export interface PaymentSchedule {
64
+ type: PaymentScheduleType;
65
+ date?: string | undefined;
66
+ }
67
+ export interface Card {
68
+ id: string;
69
+ shadowNumber: string;
70
+ brand: brandType;
71
+ installments?: number | undefined;
72
+ installmentValue?: number | undefined;
73
+ }
74
+ export interface CreatePaymentResponse {
75
+ order: Order | undefined;
76
+ orderType: TaxTypes;
77
+ }
78
+ export interface ProcessScheduledPaymentRequest {
79
+ customerId: string;
80
+ tax: TaxPayload;
81
+ charge: Charge | undefined;
82
+ payment: PaymentDetails | undefined;
83
+ }
84
+ export interface ProcessScheduledPaymentResponse {
85
+ }
86
+ export interface CreateVerificationPaymentRequest {
87
+ customerId: string;
88
+ card: CardDetails | undefined;
89
+ value: number;
90
+ cardVerificationId?: string | undefined;
91
+ }
92
+ export interface CardDetails {
93
+ id?: string;
94
+ vaultToken: string;
95
+ vaultTokenCvv: string;
96
+ }
97
+ export interface CreateVerificationPaymentResponse {
98
+ }
99
+ export interface Charge {
100
+ id: string;
101
+ amount: number;
102
+ paymentMethod: PaymentMethods;
103
+ status: ChargeStatus;
104
+ dueAt: string;
105
+ txid: string;
106
+ brcode: string;
107
+ pushToken: string;
108
+ installmentNumber: number;
109
+ installmentValue: number;
110
+ fee: number;
111
+ baseFee: number;
112
+ feePercentage: number;
113
+ isScheduled: boolean;
114
+ discountPercentage: number;
115
+ discountAmount: number;
116
+ createdAt: Date;
117
+ gatewayId: GatewayIdentification;
118
+ cardId: string;
119
+ orderId: string;
120
+ orderScheduleId: string;
121
+ payableIds: string[];
122
+ taxId?: string;
123
+ recipientId?: string;
124
+ chargeSchedule?: ChargeSchedule | undefined;
125
+ endToEndId: string;
126
+ type: ChargeType;
127
+ metadata: ChargeMetadata | undefined;
128
+ }
129
+ export interface ChargeSchedule {
130
+ id: string;
131
+ executionDate: Date;
132
+ isExecuted: boolean;
133
+ createdAt: Date;
134
+ updatedAt: Date;
135
+ charge: Charge | undefined;
136
+ }
137
+ export interface Recipient {
138
+ id: string;
139
+ code: string;
140
+ commercialName: string;
141
+ socialReason: string;
142
+ holderType: HolderType;
143
+ document: string;
144
+ cnaeId: string;
145
+ legalType: RecipientLegalType;
146
+ contactName: string;
147
+ contactEmail: string;
148
+ contactPhone: string;
149
+ isAutomaticAnticipationEnabled: boolean;
150
+ foundation: string;
151
+ avatarUrl?: string | undefined;
152
+ }
153
+ export interface Order {
154
+ id: string;
155
+ totalAmount: number;
156
+ status: string;
157
+ createdAt: Date;
158
+ items: OrderItemEntity[];
159
+ charges: Charge[];
160
+ customer: Customer | undefined;
161
+ }
162
+ export interface OrderItemEntity {
163
+ id: string;
164
+ recipient: Recipient | undefined;
165
+ tax: Tax | undefined;
166
+ order: Order | undefined;
167
+ }
168
+ export interface Customer {
169
+ id: string;
170
+ firstName: string;
171
+ lastName: string;
172
+ document: string;
173
+ email: string;
174
+ isEmailVerified: boolean;
175
+ phone: string;
176
+ }
177
+ export declare const PAYMENT_CARD_PACKAGE_NAME = "paymentCard";
178
+ export interface PaymentCardClient {
179
+ createPayment(request: CreatePaymentRequest): Observable<CreatePaymentResponse>;
180
+ processScheduledPayment(request: ProcessScheduledPaymentRequest): Observable<ProcessScheduledPaymentResponse>;
181
+ createVerificationPayment(request: CreateVerificationPaymentRequest): Observable<CreateVerificationPaymentResponse>;
182
+ }
183
+ export interface PaymentCardController {
184
+ createPayment(request: CreatePaymentRequest): Promise<CreatePaymentResponse> | Observable<CreatePaymentResponse> | CreatePaymentResponse;
185
+ processScheduledPayment(request: ProcessScheduledPaymentRequest): Promise<ProcessScheduledPaymentResponse> | Observable<ProcessScheduledPaymentResponse> | ProcessScheduledPaymentResponse;
186
+ createVerificationPayment(request: CreateVerificationPaymentRequest): Promise<CreateVerificationPaymentResponse> | Observable<CreateVerificationPaymentResponse> | CreateVerificationPaymentResponse;
187
+ }
188
+ export declare function PaymentCardControllerMethods(): (constructor: Function) => void;
189
+ export declare const PAYMENT_CARD_SERVICE_NAME = "PaymentCard";
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v3.20.3
6
+ // source: payment-card.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PAYMENT_CARD_SERVICE_NAME = exports.PAYMENT_CARD_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.PaymentCardControllerMethods = PaymentCardControllerMethods;
10
+ const microservices_1 = require("@nestjs/microservices");
11
+ exports.protobufPackage = 'paymentCard';
12
+ exports.PAYMENT_CARD_PACKAGE_NAME = 'paymentCard';
13
+ function PaymentCardControllerMethods() {
14
+ return function (constructor) {
15
+ const grpcMethods = [
16
+ 'createPayment',
17
+ 'processScheduledPayment',
18
+ 'createVerificationPayment',
19
+ ];
20
+ for (const method of grpcMethods) {
21
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
22
+ (0, microservices_1.GrpcMethod)('PaymentCard', method)(constructor.prototype[method], method, descriptor);
23
+ }
24
+ const grpcStreamMethods = [];
25
+ for (const method of grpcStreamMethods) {
26
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
27
+ (0, microservices_1.GrpcStreamMethod)('PaymentCard', method)(constructor.prototype[method], method, descriptor);
28
+ }
29
+ };
30
+ }
31
+ exports.PAYMENT_CARD_SERVICE_NAME = 'PaymentCard';
@@ -0,0 +1,92 @@
1
+ import { GatewayIdentification, PaymentMethods } from '@postpaybr/contracts/dist/types';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "paymentGateway";
4
+ export interface PaymentGateway {
5
+ id: string;
6
+ name: string;
7
+ gatewayId: GatewayIdentification;
8
+ supportsPix: boolean;
9
+ supportsCreditCard: boolean;
10
+ supportsDebitCard: boolean;
11
+ supportsAutomaticAnticipation: boolean;
12
+ supportsManualAnticipation: boolean;
13
+ isActive: boolean;
14
+ description: string;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ }
18
+ export interface PaymentGatewayResponse {
19
+ paymentGateway: PaymentGateway | undefined;
20
+ }
21
+ export interface PaymentGatewayListResponse {
22
+ gateways: PaymentGateway[];
23
+ }
24
+ export interface GetByIdRequest {
25
+ id: string;
26
+ }
27
+ export interface GetByGatewayIdRequest {
28
+ gatewayId: GatewayIdentification;
29
+ }
30
+ export interface GetGatewaysByMethodSupportRequest {
31
+ method: PaymentMethods;
32
+ }
33
+ export interface CreateGatewayRequest {
34
+ name: string;
35
+ gatewayId: GatewayIdentification;
36
+ supportsPix: boolean;
37
+ supportsCreditCard: boolean;
38
+ supportsDebitCard: boolean;
39
+ supportsAutomaticAnticipation: boolean;
40
+ supportsManualAnticipation: boolean;
41
+ isActive: boolean;
42
+ description: string;
43
+ }
44
+ export interface UpdateGatewayRequest {
45
+ id: string;
46
+ name?: string | undefined;
47
+ gatewayId?: GatewayIdentification | undefined;
48
+ supportsPix?: boolean | undefined;
49
+ supportsCreditCard?: boolean | undefined;
50
+ supportsDebitCard?: boolean | undefined;
51
+ supportsAutomaticAnticipation?: boolean | undefined;
52
+ supportsManualAnticipation?: boolean | undefined;
53
+ isActive?: boolean | undefined;
54
+ description?: string | undefined;
55
+ }
56
+ export interface DeactivateGatewayRequest {
57
+ id: string;
58
+ }
59
+ export interface Void {
60
+ }
61
+ export interface TableFilterParams {
62
+ pageIndex?: number | undefined;
63
+ pageSize?: number | undefined;
64
+ statuses?: string[];
65
+ globalFilter?: string | undefined;
66
+ startDate?: Date | undefined;
67
+ endDate?: Date | undefined;
68
+ }
69
+ export interface GetAllGatewaysRequest {
70
+ filter: TableFilterParams | undefined;
71
+ }
72
+ export declare const PAYMENT_GATEWAY_PACKAGE_NAME = "paymentGateway";
73
+ export interface PaymentGatewayServiceClient {
74
+ getById(request: GetByIdRequest): Observable<PaymentGatewayResponse>;
75
+ getByGatewayId(request: GetByGatewayIdRequest): Observable<PaymentGatewayResponse>;
76
+ getAllGateways(request: GetAllGatewaysRequest): Observable<PaymentGatewayListResponse>;
77
+ getGatewaysByMethodSupport(request: GetGatewaysByMethodSupportRequest): Observable<PaymentGatewayListResponse>;
78
+ createGateway(request: CreateGatewayRequest): Observable<PaymentGatewayResponse>;
79
+ updateGateway(request: UpdateGatewayRequest): Observable<PaymentGatewayResponse>;
80
+ deactivateGateway(request: DeactivateGatewayRequest): Observable<Void>;
81
+ }
82
+ export interface PaymentGatewayServiceController {
83
+ getById(request: GetByIdRequest): Promise<PaymentGatewayResponse> | Observable<PaymentGatewayResponse> | PaymentGatewayResponse;
84
+ getByGatewayId(request: GetByGatewayIdRequest): Promise<PaymentGatewayResponse> | Observable<PaymentGatewayResponse> | PaymentGatewayResponse;
85
+ getAllGateways(request: GetAllGatewaysRequest): Promise<PaymentGatewayListResponse> | Observable<PaymentGatewayListResponse> | PaymentGatewayListResponse;
86
+ getGatewaysByMethodSupport(request: GetGatewaysByMethodSupportRequest): Promise<PaymentGatewayListResponse> | Observable<PaymentGatewayListResponse> | PaymentGatewayListResponse;
87
+ createGateway(request: CreateGatewayRequest): Promise<PaymentGatewayResponse> | Observable<PaymentGatewayResponse> | PaymentGatewayResponse;
88
+ updateGateway(request: UpdateGatewayRequest): Promise<PaymentGatewayResponse> | Observable<PaymentGatewayResponse> | PaymentGatewayResponse;
89
+ deactivateGateway(request: DeactivateGatewayRequest): Promise<Void> | Observable<Void> | Void;
90
+ }
91
+ export declare function PaymentGatewayServiceControllerMethods(): (constructor: Function) => void;
92
+ export declare const PAYMENT_GATEWAY_SERVICE_NAME = "PaymentGatewayService";
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v6.32.1
6
+ // source: payment-gateway.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PAYMENT_GATEWAY_SERVICE_NAME = exports.PAYMENT_GATEWAY_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.PaymentGatewayServiceControllerMethods = PaymentGatewayServiceControllerMethods;
10
+ const microservices_1 = require("@nestjs/microservices");
11
+ exports.protobufPackage = 'paymentGateway';
12
+ exports.PAYMENT_GATEWAY_PACKAGE_NAME = 'paymentGateway';
13
+ function PaymentGatewayServiceControllerMethods() {
14
+ return function (constructor) {
15
+ const grpcMethods = [
16
+ 'getById',
17
+ 'getByGatewayId',
18
+ 'getAllGateways',
19
+ 'getGatewaysByMethodSupport',
20
+ 'createGateway',
21
+ 'updateGateway',
22
+ 'deactivateGateway',
23
+ ];
24
+ for (const method of grpcMethods) {
25
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
+ (0, microservices_1.GrpcMethod)('PaymentGatewayService', method)(constructor.prototype[method], method, descriptor);
27
+ }
28
+ const grpcStreamMethods = [];
29
+ for (const method of grpcStreamMethods) {
30
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
31
+ (0, microservices_1.GrpcStreamMethod)('PaymentGatewayService', method)(constructor.prototype[method], method, descriptor);
32
+ }
33
+ };
34
+ }
35
+ exports.PAYMENT_GATEWAY_SERVICE_NAME = 'PaymentGatewayService';
@@ -0,0 +1,101 @@
1
+ import { brandType, GatewayIdentification, taxMeta, MetaType, PaymentMethods, PaymentScheduleType, TaxStatus, TaxTypes } from '@postpaybr/contracts/dist/types';
2
+ import { Observable } from 'rxjs';
3
+ export declare const protobufPackage = "paymentPix";
4
+ export interface CreatePaymentRequest {
5
+ customerId: string;
6
+ taxes: TaxPayload[];
7
+ payment: PaymentDetails | undefined;
8
+ closed?: boolean | undefined;
9
+ ip?: string | undefined;
10
+ sessionId?: string | undefined;
11
+ pushToken: string;
12
+ }
13
+ export interface TaxPayload {
14
+ tax: Tax | undefined;
15
+ payer: Payer | undefined;
16
+ location: Location | undefined;
17
+ metaType: MetaType;
18
+ meta: taxMeta | undefined;
19
+ }
20
+ export interface Tax {
21
+ id: string;
22
+ type: TaxTypes;
23
+ status: TaxStatus;
24
+ description: string;
25
+ amount: number;
26
+ year: number;
27
+ dueAt: string;
28
+ documentId: string;
29
+ code: string;
30
+ isSingleQuota: boolean;
31
+ quota?: number | undefined;
32
+ fee: number;
33
+ fine: number;
34
+ discountAmount: number;
35
+ }
36
+ export interface Payer {
37
+ id?: string | undefined;
38
+ name: string;
39
+ document: string;
40
+ phone?: string | undefined;
41
+ }
42
+ export interface Location {
43
+ state: number;
44
+ city: number;
45
+ recipientId: string;
46
+ }
47
+ export interface Address {
48
+ street: string;
49
+ number: string;
50
+ complement: string;
51
+ neighborhood: string;
52
+ city: string;
53
+ state: string;
54
+ zipCode: string;
55
+ }
56
+ export interface PaymentDetails {
57
+ method: PaymentMethods;
58
+ amount: number;
59
+ discountPercentage?: number | undefined;
60
+ fee: number;
61
+ discountAmount?: number | undefined;
62
+ gatewayId?: GatewayIdentification | undefined;
63
+ card?: Card | undefined;
64
+ paymentSchedule: PaymentSchedule | undefined;
65
+ baseFee: number;
66
+ feePercentage: number;
67
+ chargeId?: string | undefined;
68
+ isRetry?: boolean | undefined;
69
+ orderId?: string | undefined;
70
+ }
71
+ export interface PaymentSchedule {
72
+ type: PaymentScheduleType;
73
+ date?: string | undefined;
74
+ }
75
+ export interface Card {
76
+ id: string;
77
+ shadowNumber: string;
78
+ brand: brandType;
79
+ installments?: number | undefined;
80
+ installmentValue?: number | undefined;
81
+ }
82
+ export interface Order {
83
+ id: string;
84
+ totalAmount: number;
85
+ status: string;
86
+ createdAt: Date;
87
+ }
88
+ export interface CreatePaymentResponse {
89
+ order: Order | undefined;
90
+ orderType: string;
91
+ chargeId: string;
92
+ }
93
+ export declare const PAYMENT_PIX_PACKAGE_NAME = "paymentPix";
94
+ export interface PaymentPixClient {
95
+ createPayment(request: CreatePaymentRequest): Observable<CreatePaymentResponse>;
96
+ }
97
+ export interface PaymentPixController {
98
+ createPayment(request: CreatePaymentRequest): Promise<CreatePaymentResponse> | Observable<CreatePaymentResponse> | CreatePaymentResponse;
99
+ }
100
+ export declare function PaymentPixControllerMethods(): (constructor: Function) => void;
101
+ export declare const PAYMENT_SERVICE_PIX_SERVICE_NAME = "PaymentPix";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.6.0
5
+ // protoc v3.20.3
6
+ // source: payment-pix.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PAYMENT_SERVICE_PIX_SERVICE_NAME = exports.PAYMENT_PIX_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.PaymentPixControllerMethods = PaymentPixControllerMethods;
10
+ const microservices_1 = require("@nestjs/microservices");
11
+ exports.protobufPackage = 'paymentPix';
12
+ exports.PAYMENT_PIX_PACKAGE_NAME = 'paymentPix';
13
+ function PaymentPixControllerMethods() {
14
+ return function (constructor) {
15
+ const grpcMethods = ['createPayment'];
16
+ for (const method of grpcMethods) {
17
+ 1;
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)('PaymentPix', method)(constructor.prototype[method], method, descriptor);
20
+ }
21
+ const grpcStreamMethods = [];
22
+ for (const method of grpcStreamMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ (0, microservices_1.GrpcStreamMethod)('PaymentPix', method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.PAYMENT_SERVICE_PIX_SERVICE_NAME = 'PaymentPix';