@postpaybr/protos 1.1.2 → 1.1.7
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.
- package/dist/typescript/account-entry.d.ts +80 -0
- package/dist/typescript/account-entry.js +28 -0
- package/dist/typescript/address.d.ts +65 -0
- package/dist/typescript/address.js +29 -0
- package/dist/typescript/admin-card-verification.d.ts +86 -0
- package/dist/typescript/admin-card-verification.js +28 -0
- package/dist/typescript/administrator.d.ts +176 -0
- package/dist/typescript/administrator.js +37 -0
- package/dist/typescript/anticipation.d.ts +84 -0
- package/dist/typescript/anticipation.js +30 -0
- package/dist/typescript/asset.d.ts +43 -0
- package/dist/typescript/asset.js +29 -0
- package/dist/typescript/auth.d.ts +28 -0
- package/dist/typescript/auth.js +24 -0
- package/dist/typescript/bank-account.d.ts +63 -0
- package/dist/typescript/bank-account.js +29 -0
- package/dist/typescript/card-vault.d.ts +35 -0
- package/dist/typescript/card-vault.js +24 -0
- package/dist/typescript/card-verification.d.ts +29 -0
- package/dist/typescript/card-verification.js +27 -0
- package/dist/typescript/card.d.ts +147 -0
- package/dist/typescript/card.js +33 -0
- package/dist/typescript/charge-schedule.d.ts +35 -0
- package/dist/typescript/charge-schedule.js +24 -0
- package/dist/typescript/charge.d.ts +538 -0
- package/dist/typescript/charge.js +55 -0
- package/dist/typescript/context.d.ts +154 -0
- package/dist/typescript/context.js +32 -0
- package/dist/typescript/customer.d.ts +213 -0
- package/dist/typescript/customer.js +39 -0
- package/dist/typescript/daily-balance.d.ts +32 -0
- package/dist/typescript/daily-balance.js +24 -0
- package/dist/typescript/document-verification.d.ts +106 -0
- package/dist/typescript/document-verification.js +30 -0
- package/dist/typescript/email.d.ts +71 -0
- package/dist/typescript/email.js +31 -0
- package/dist/typescript/expo-push.d.ts +31 -0
- package/dist/typescript/expo-push.js +24 -0
- package/dist/typescript/fee.d.ts +66 -0
- package/dist/typescript/fee.js +28 -0
- package/dist/typescript/location.d.ts +38 -0
- package/dist/typescript/location.js +24 -0
- package/dist/typescript/notification.d.ts +198 -0
- package/dist/typescript/notification.js +35 -0
- package/dist/typescript/order.d.ts +173 -0
- package/dist/typescript/order.js +34 -0
- package/dist/typescript/payable.d.ts +226 -0
- package/dist/typescript/payable.js +37 -0
- package/dist/typescript/payer.d.ts +23 -0
- package/dist/typescript/payer.js +24 -0
- package/dist/typescript/payment-calculator.d.ts +135 -0
- package/dist/typescript/payment-calculator.js +29 -0
- package/dist/typescript/payment-card.d.ts +189 -0
- package/dist/typescript/payment-card.js +27 -0
- package/dist/typescript/payment-gateway.d.ts +92 -0
- package/dist/typescript/payment-gateway.js +31 -0
- package/dist/typescript/payment-pix.d.ts +101 -0
- package/dist/typescript/payment-pix.js +24 -0
- package/dist/typescript/receipt.d.ts +193 -0
- package/dist/typescript/receipt.js +33 -0
- package/dist/typescript/recipient-payment-gateway.d.ts +95 -0
- package/dist/typescript/recipient-payment-gateway.js +30 -0
- package/dist/typescript/recipient.d.ts +222 -0
- package/dist/typescript/recipient.js +36 -0
- package/dist/typescript/role.d.ts +57 -0
- package/dist/typescript/role.js +30 -0
- package/dist/typescript/sms.d.ts +34 -0
- package/dist/typescript/sms.js +24 -0
- package/dist/typescript/tax.d.ts +293 -0
- package/dist/typescript/tax.js +36 -0
- package/dist/typescript/transfer.d.ts +185 -0
- package/dist/typescript/transfer.js +23 -0
- package/dist/typescript/two-factor.d.ts +66 -0
- package/dist/typescript/two-factor.js +30 -0
- package/dist/typescript/user.d.ts +196 -0
- package/dist/typescript/user.js +41 -0
- package/dist/typescript/wallet.d.ts +18 -0
- package/dist/typescript/wallet.js +24 -0
- package/package.json +11 -9
- package/typescript/account-entry.ts +0 -177
- package/typescript/address.ts +0 -133
- package/typescript/admin-card-verification.ts +0 -181
- package/typescript/administrator.ts +0 -375
- package/typescript/anticipation.ts +0 -187
- package/typescript/asset.ts +0 -123
- package/typescript/auth.ts +0 -84
- package/typescript/bank-account.ts +0 -157
- package/typescript/card-vault.ts +0 -92
- package/typescript/card-verification.ts +0 -93
- package/typescript/card.ts +0 -283
- package/typescript/charge-schedule.ts +0 -86
- package/typescript/charge.ts +0 -930
- package/typescript/context.ts +0 -296
- package/typescript/customer.ts +0 -425
- package/typescript/daily-balance.ts +0 -94
- package/typescript/document-verification.ts +0 -219
- package/typescript/email.ts +0 -183
- package/typescript/expo-push.ts +0 -75
- package/typescript/fee.ts +0 -131
- package/typescript/location.ts +0 -96
- package/typescript/notification.ts +0 -372
- package/typescript/order.ts +0 -311
- package/typescript/payable.ts +0 -414
- package/typescript/payer.ts +0 -68
- package/typescript/payment-calculator.ts +0 -252
- package/typescript/payment-card.ts +0 -289
- package/typescript/payment-gateway.ts +0 -209
- package/typescript/payment-pix.ts +0 -170
- package/typescript/receipt.ts +0 -344
- package/typescript/recipient-payment-gateway.ts +0 -209
- package/typescript/recipient.ts +0 -413
- package/typescript/role.ts +0 -144
- package/typescript/sms.ts +0 -96
- package/typescript/tax.ts +0 -463
- package/typescript/transfer.ts +0 -260
- package/typescript/two-factor.ts +0 -177
- package/typescript/user.ts +0 -413
- package/typescript/wallet.ts +0 -63
- /package/{account-entry.proto → src/protos/account-entry.proto} +0 -0
- /package/{address.proto → src/protos/address.proto} +0 -0
- /package/{admin-card-verification.proto → src/protos/admin-card-verification.proto} +0 -0
- /package/{administrator.proto → src/protos/administrator.proto} +0 -0
- /package/{anticipation.proto → src/protos/anticipation.proto} +0 -0
- /package/{asset.proto → src/protos/asset.proto} +0 -0
- /package/{auth.proto → src/protos/auth.proto} +0 -0
- /package/{bank-account.proto → src/protos/bank-account.proto} +0 -0
- /package/{card-vault.proto → src/protos/card-vault.proto} +0 -0
- /package/{card-verification.proto → src/protos/card-verification.proto} +0 -0
- /package/{card.proto → src/protos/card.proto} +0 -0
- /package/{charge-schedule.proto → src/protos/charge-schedule.proto} +0 -0
- /package/{charge.proto → src/protos/charge.proto} +0 -0
- /package/{context.proto → src/protos/context.proto} +0 -0
- /package/{customer.proto → src/protos/customer.proto} +0 -0
- /package/{daily-balance.proto → src/protos/daily-balance.proto} +0 -0
- /package/{document-verification.proto → src/protos/document-verification.proto} +0 -0
- /package/{email.proto → src/protos/email.proto} +0 -0
- /package/{expo-push.proto → src/protos/expo-push.proto} +0 -0
- /package/{fee.proto → src/protos/fee.proto} +0 -0
- /package/{location.proto → src/protos/location.proto} +0 -0
- /package/{notification.proto → src/protos/notification.proto} +0 -0
- /package/{order.proto → src/protos/order.proto} +0 -0
- /package/{payable.proto → src/protos/payable.proto} +0 -0
- /package/{payer.proto → src/protos/payer.proto} +0 -0
- /package/{payment-calculator.proto → src/protos/payment-calculator.proto} +0 -0
- /package/{payment-card.proto → src/protos/payment-card.proto} +0 -0
- /package/{payment-gateway.proto → src/protos/payment-gateway.proto} +0 -0
- /package/{payment-pix.proto → src/protos/payment-pix.proto} +0 -0
- /package/{receipt.proto → src/protos/receipt.proto} +0 -0
- /package/{recipient-payment-gateway.proto → src/protos/recipient-payment-gateway.proto} +0 -0
- /package/{recipient.proto → src/protos/recipient.proto} +0 -0
- /package/{role.proto → src/protos/role.proto} +0 -0
- /package/{sms.proto → src/protos/sms.proto} +0 -0
- /package/{tax.proto → src/protos/tax.proto} +0 -0
- /package/{transfer.proto → src/protos/transfer.proto} +0 -0
- /package/{two-factor.proto → src/protos/two-factor.proto} +0 -0
- /package/{user.proto → src/protos/user.proto} +0 -0
- /package/{wallet.proto → src/protos/wallet.proto} +0 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { ChargeStatus, MetaType, OrderStatus, PaymentMethods, taxMeta, TaxStatus, TaxTypes } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "tax";
|
|
4
|
+
export interface Payer {
|
|
5
|
+
id?: string | undefined;
|
|
6
|
+
name: string;
|
|
7
|
+
document: string;
|
|
8
|
+
phone?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface LocationDetailsDto {
|
|
11
|
+
document: string;
|
|
12
|
+
city: number;
|
|
13
|
+
state: number;
|
|
14
|
+
year: number;
|
|
15
|
+
}
|
|
16
|
+
export interface completeTax {
|
|
17
|
+
id: string;
|
|
18
|
+
type: TaxTypes;
|
|
19
|
+
status: TaxStatus;
|
|
20
|
+
description: string;
|
|
21
|
+
amount: number;
|
|
22
|
+
year: number;
|
|
23
|
+
dueAt: string;
|
|
24
|
+
documentId: string;
|
|
25
|
+
code: string;
|
|
26
|
+
isSingleQuota: boolean;
|
|
27
|
+
quota?: number | undefined;
|
|
28
|
+
fee: number;
|
|
29
|
+
fine: number;
|
|
30
|
+
discountAmount: number;
|
|
31
|
+
}
|
|
32
|
+
export interface TaxPayload {
|
|
33
|
+
tax: completeTax | undefined;
|
|
34
|
+
payer: Payer | undefined;
|
|
35
|
+
location: Location | undefined;
|
|
36
|
+
metaType: MetaType;
|
|
37
|
+
meta: taxMeta | undefined;
|
|
38
|
+
}
|
|
39
|
+
export interface Tax {
|
|
40
|
+
id: string;
|
|
41
|
+
type: TaxTypes;
|
|
42
|
+
description: string;
|
|
43
|
+
year: number;
|
|
44
|
+
documentId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface Location {
|
|
47
|
+
state: number;
|
|
48
|
+
city: number;
|
|
49
|
+
recipientId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface Address {
|
|
52
|
+
street: string;
|
|
53
|
+
number: string;
|
|
54
|
+
complement: string;
|
|
55
|
+
neighborhood: string;
|
|
56
|
+
city: string;
|
|
57
|
+
state: string;
|
|
58
|
+
zipCode: string;
|
|
59
|
+
}
|
|
60
|
+
export interface Property {
|
|
61
|
+
documentId?: string | undefined;
|
|
62
|
+
address?: Address | undefined;
|
|
63
|
+
}
|
|
64
|
+
export interface TaxDetail {
|
|
65
|
+
tax: any | undefined;
|
|
66
|
+
payer: any | undefined;
|
|
67
|
+
location: Location | undefined;
|
|
68
|
+
metaType: MetaType;
|
|
69
|
+
meta: taxMeta | undefined;
|
|
70
|
+
items: TaxItem[];
|
|
71
|
+
}
|
|
72
|
+
export interface TaxItem {
|
|
73
|
+
id: string;
|
|
74
|
+
code: string;
|
|
75
|
+
quota: number;
|
|
76
|
+
dueAt: string;
|
|
77
|
+
amount: number;
|
|
78
|
+
isSingleQuota: boolean;
|
|
79
|
+
status: TaxStatus;
|
|
80
|
+
discountPercentage: number;
|
|
81
|
+
discountAmount: number;
|
|
82
|
+
fee: number;
|
|
83
|
+
fine: number;
|
|
84
|
+
}
|
|
85
|
+
export interface PropertyDetail {
|
|
86
|
+
property: Property | undefined;
|
|
87
|
+
payer: Payer | undefined;
|
|
88
|
+
taxTypes: any;
|
|
89
|
+
pendingTaxesAmount?: number | undefined;
|
|
90
|
+
paidTaxesAmount?: number | undefined;
|
|
91
|
+
overdueTaxesAmount?: number | undefined;
|
|
92
|
+
lastPaidTaxDate?: string | undefined;
|
|
93
|
+
nextDueDate?: string | undefined;
|
|
94
|
+
nearDueTaxesDates?: TaxDueDate[];
|
|
95
|
+
overdueTaxesDates?: TaxDueDate[];
|
|
96
|
+
receiptId?: string | undefined;
|
|
97
|
+
}
|
|
98
|
+
export interface TaxDueDate {
|
|
99
|
+
id: string;
|
|
100
|
+
dueDate: string;
|
|
101
|
+
}
|
|
102
|
+
export interface TaxPayloadRequest {
|
|
103
|
+
data: TaxPayload | undefined;
|
|
104
|
+
payer: Payer | undefined;
|
|
105
|
+
}
|
|
106
|
+
export interface TaxByDocumentIdRequest {
|
|
107
|
+
documentId: string;
|
|
108
|
+
}
|
|
109
|
+
export interface TaxByDocumentIdAndTypeRequest {
|
|
110
|
+
documentId: string;
|
|
111
|
+
type: TaxTypes;
|
|
112
|
+
}
|
|
113
|
+
export interface TaxByIdRequest {
|
|
114
|
+
id: string;
|
|
115
|
+
}
|
|
116
|
+
export interface GroupedPropertyDetails {
|
|
117
|
+
properties: PropertyDetail[];
|
|
118
|
+
}
|
|
119
|
+
export interface TaxDetails {
|
|
120
|
+
taxes: TaxDetail[];
|
|
121
|
+
}
|
|
122
|
+
export interface TaxEntity {
|
|
123
|
+
id: string;
|
|
124
|
+
type: TaxTypes;
|
|
125
|
+
status: TaxStatus;
|
|
126
|
+
description: string;
|
|
127
|
+
amount: number;
|
|
128
|
+
year: number;
|
|
129
|
+
dueAt: string;
|
|
130
|
+
documentId: string;
|
|
131
|
+
code: string;
|
|
132
|
+
isSingleQuota: boolean;
|
|
133
|
+
quota: number;
|
|
134
|
+
fee: number;
|
|
135
|
+
fine: number;
|
|
136
|
+
discountPercentage: number;
|
|
137
|
+
discountAmount: number;
|
|
138
|
+
state: number;
|
|
139
|
+
city: number;
|
|
140
|
+
recipientId: string;
|
|
141
|
+
metaType: MetaType;
|
|
142
|
+
meta?: taxMeta | undefined;
|
|
143
|
+
payer: PayerEntity | undefined;
|
|
144
|
+
orderItem?: OrderItemEntity | undefined;
|
|
145
|
+
receipt?: Receipt | undefined;
|
|
146
|
+
createdAt: Date;
|
|
147
|
+
updatedAt: Date;
|
|
148
|
+
}
|
|
149
|
+
export interface Charge {
|
|
150
|
+
id: string;
|
|
151
|
+
amount: number;
|
|
152
|
+
paymentMethod: string;
|
|
153
|
+
status: ChargeStatus;
|
|
154
|
+
dueAt?: string | undefined;
|
|
155
|
+
txid?: string | undefined;
|
|
156
|
+
brcode?: string | undefined;
|
|
157
|
+
installmentNumber?: number | undefined;
|
|
158
|
+
installmentValue?: number | undefined;
|
|
159
|
+
createdAt: Date;
|
|
160
|
+
}
|
|
161
|
+
export interface PayerEntity {
|
|
162
|
+
id: string;
|
|
163
|
+
name: string;
|
|
164
|
+
document: string;
|
|
165
|
+
phone: string;
|
|
166
|
+
taxes: TaxEntity[];
|
|
167
|
+
}
|
|
168
|
+
export interface Receipt {
|
|
169
|
+
id: string;
|
|
170
|
+
amount: number;
|
|
171
|
+
protocol: string;
|
|
172
|
+
txid?: string | undefined;
|
|
173
|
+
createdAt: Date;
|
|
174
|
+
}
|
|
175
|
+
export interface OrderItemEntity {
|
|
176
|
+
id: string;
|
|
177
|
+
recipient: Recipient | undefined;
|
|
178
|
+
tax: Tax | undefined;
|
|
179
|
+
order: Order | undefined;
|
|
180
|
+
}
|
|
181
|
+
export interface Order {
|
|
182
|
+
id: string;
|
|
183
|
+
totalAmount: number;
|
|
184
|
+
status: OrderStatus;
|
|
185
|
+
createdAt: Date;
|
|
186
|
+
items: OrderItemEntity[];
|
|
187
|
+
charges: Charge[];
|
|
188
|
+
customer: Customer | undefined;
|
|
189
|
+
}
|
|
190
|
+
export interface Customer {
|
|
191
|
+
id: string;
|
|
192
|
+
firstName: string;
|
|
193
|
+
lastName: string;
|
|
194
|
+
document: string;
|
|
195
|
+
email: string;
|
|
196
|
+
isEmailVerified: boolean;
|
|
197
|
+
phone: string;
|
|
198
|
+
}
|
|
199
|
+
export interface Recipient {
|
|
200
|
+
id: string;
|
|
201
|
+
code: string;
|
|
202
|
+
}
|
|
203
|
+
export interface TaxesRequest {
|
|
204
|
+
taxes: TaxEntity[];
|
|
205
|
+
}
|
|
206
|
+
export interface TaxDescriptionResponse {
|
|
207
|
+
description: string;
|
|
208
|
+
}
|
|
209
|
+
export interface UpdateTaxReceiptIdRequest {
|
|
210
|
+
id: string;
|
|
211
|
+
receiptId: string;
|
|
212
|
+
}
|
|
213
|
+
export interface UpdateTaxStatusRequest {
|
|
214
|
+
id: string;
|
|
215
|
+
status: TaxStatus;
|
|
216
|
+
}
|
|
217
|
+
export interface GetAllTaxesRequest {
|
|
218
|
+
data?: GetAllTaxesDto | undefined;
|
|
219
|
+
pagination: PaginationFilterDto | undefined;
|
|
220
|
+
date: DateFilterDto | undefined;
|
|
221
|
+
}
|
|
222
|
+
export interface GetAllTaxesDto {
|
|
223
|
+
recipientId?: string | undefined;
|
|
224
|
+
types?: TaxTypes[] | undefined;
|
|
225
|
+
statuses?: TaxStatus[] | undefined;
|
|
226
|
+
}
|
|
227
|
+
export interface PaginationFilterDto {
|
|
228
|
+
limit?: number | undefined;
|
|
229
|
+
offset?: number | undefined;
|
|
230
|
+
}
|
|
231
|
+
export interface DateFilterDto {
|
|
232
|
+
startDate?: Date | undefined;
|
|
233
|
+
endDate?: Date | undefined;
|
|
234
|
+
}
|
|
235
|
+
export interface GetAllTaxesResponse {
|
|
236
|
+
taxes: TaxEntity[];
|
|
237
|
+
count: number;
|
|
238
|
+
}
|
|
239
|
+
export interface CompleteTaxDetailsResponse {
|
|
240
|
+
tax?: TaxEntity | undefined;
|
|
241
|
+
charge?: ChargeDetails | undefined;
|
|
242
|
+
}
|
|
243
|
+
export interface ChargeDetails {
|
|
244
|
+
id: string;
|
|
245
|
+
amount: number;
|
|
246
|
+
paymentMethod: PaymentMethods;
|
|
247
|
+
status: ChargeStatus;
|
|
248
|
+
dueAt: string;
|
|
249
|
+
txid?: string | undefined;
|
|
250
|
+
brcode?: string | undefined;
|
|
251
|
+
installmentNumber?: number | undefined;
|
|
252
|
+
installmentValue?: number | undefined;
|
|
253
|
+
fee: number;
|
|
254
|
+
baseFee: number;
|
|
255
|
+
feePercentage: number;
|
|
256
|
+
discountPercentage: number;
|
|
257
|
+
discountAmount: number;
|
|
258
|
+
createdAt: Date;
|
|
259
|
+
gatewayId: string;
|
|
260
|
+
failureReason?: string | undefined;
|
|
261
|
+
failureDetails?: string | undefined;
|
|
262
|
+
}
|
|
263
|
+
export declare const TAX_PACKAGE_NAME = "tax";
|
|
264
|
+
export interface TaxServiceClient {
|
|
265
|
+
createTax(request: TaxPayloadRequest): Observable<TaxEntity>;
|
|
266
|
+
getTaxesGroupedByPayerLocation(request: LocationDetailsDto): Observable<GroupedPropertyDetails>;
|
|
267
|
+
getTaxesGroupedByDocumentId(request: TaxByDocumentIdRequest): Observable<GroupedPropertyDetails>;
|
|
268
|
+
getTaxesByDocumentId(request: TaxByDocumentIdRequest): Observable<TaxDetails>;
|
|
269
|
+
getTaxesByDocumentIdAndType(request: TaxByDocumentIdAndTypeRequest): Observable<TaxDetail>;
|
|
270
|
+
groupTaxesByDocumentId(request: TaxesRequest): Observable<TaxDetails>;
|
|
271
|
+
getTaxDetailsById(request: TaxByIdRequest): Observable<TaxEntity>;
|
|
272
|
+
getTaxDescription(request: TaxByIdRequest): Observable<TaxDescriptionResponse>;
|
|
273
|
+
updateTaxReceiptId(request: UpdateTaxReceiptIdRequest): Observable<TaxEntity>;
|
|
274
|
+
updateTaxStatus(request: UpdateTaxStatusRequest): Observable<TaxEntity>;
|
|
275
|
+
getAllTaxes(request: GetAllTaxesRequest): Observable<GetAllTaxesResponse>;
|
|
276
|
+
getCompleteTaxDetailsById(request: TaxByIdRequest): Observable<CompleteTaxDetailsResponse>;
|
|
277
|
+
}
|
|
278
|
+
export interface TaxServiceController {
|
|
279
|
+
createTax(request: TaxPayloadRequest): Promise<TaxEntity> | Observable<TaxEntity> | TaxEntity;
|
|
280
|
+
getTaxesGroupedByPayerLocation(request: LocationDetailsDto): Promise<GroupedPropertyDetails> | Observable<GroupedPropertyDetails> | GroupedPropertyDetails;
|
|
281
|
+
getTaxesGroupedByDocumentId(request: TaxByDocumentIdRequest): Promise<GroupedPropertyDetails> | Observable<GroupedPropertyDetails> | GroupedPropertyDetails;
|
|
282
|
+
getTaxesByDocumentId(request: TaxByDocumentIdRequest): Promise<TaxDetails> | Observable<TaxDetails> | TaxDetails;
|
|
283
|
+
getTaxesByDocumentIdAndType(request: TaxByDocumentIdAndTypeRequest): Promise<TaxDetail> | Observable<TaxDetail> | TaxDetail;
|
|
284
|
+
groupTaxesByDocumentId(request: TaxesRequest): Promise<TaxDetails> | Observable<TaxDetails> | TaxDetails;
|
|
285
|
+
getTaxDetailsById(request: TaxByIdRequest): Promise<TaxEntity> | Observable<TaxEntity> | TaxEntity;
|
|
286
|
+
getTaxDescription(request: TaxByIdRequest): Promise<TaxDescriptionResponse> | Observable<TaxDescriptionResponse> | TaxDescriptionResponse;
|
|
287
|
+
updateTaxReceiptId(request: UpdateTaxReceiptIdRequest): Promise<TaxEntity> | Observable<TaxEntity> | TaxEntity;
|
|
288
|
+
updateTaxStatus(request: UpdateTaxStatusRequest): Promise<TaxEntity> | Observable<TaxEntity> | TaxEntity;
|
|
289
|
+
getAllTaxes(request: GetAllTaxesRequest): Promise<GetAllTaxesResponse> | Observable<GetAllTaxesResponse> | GetAllTaxesResponse;
|
|
290
|
+
getCompleteTaxDetailsById(request: TaxByIdRequest): Promise<CompleteTaxDetailsResponse> | Observable<CompleteTaxDetailsResponse> | CompleteTaxDetailsResponse;
|
|
291
|
+
}
|
|
292
|
+
export declare function TaxServiceControllerMethods(): (constructor: Function) => void;
|
|
293
|
+
export declare const TAX_SERVICE_NAME = "TaxService";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.7.7
|
|
4
|
+
// protoc v6.33.0
|
|
5
|
+
// source: tax.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'tax';
|
|
8
|
+
export const TAX_PACKAGE_NAME = 'tax';
|
|
9
|
+
export function TaxServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'createTax',
|
|
13
|
+
'getTaxesGroupedByPayerLocation',
|
|
14
|
+
'getTaxesGroupedByDocumentId',
|
|
15
|
+
'getTaxesByDocumentId',
|
|
16
|
+
'getTaxesByDocumentIdAndType',
|
|
17
|
+
'groupTaxesByDocumentId',
|
|
18
|
+
'getTaxDetailsById',
|
|
19
|
+
'getTaxDescription',
|
|
20
|
+
'updateTaxReceiptId',
|
|
21
|
+
'updateTaxStatus',
|
|
22
|
+
'getAllTaxes',
|
|
23
|
+
'getCompleteTaxDetailsById',
|
|
24
|
+
];
|
|
25
|
+
for (const method of grpcMethods) {
|
|
26
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
27
|
+
GrpcMethod('TaxService', method)(constructor.prototype[method], method, descriptor);
|
|
28
|
+
}
|
|
29
|
+
const grpcStreamMethods = [];
|
|
30
|
+
for (const method of grpcStreamMethods) {
|
|
31
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
32
|
+
GrpcStreamMethod('TaxService', method)(constructor.prototype[method], method, descriptor);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export const TAX_SERVICE_NAME = 'TaxService';
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { ChargeStatus, GatewayIdentification } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "transfer";
|
|
4
|
+
export interface UpdateTransferStatusRequest {
|
|
5
|
+
transferId: string;
|
|
6
|
+
status: ChargeStatus;
|
|
7
|
+
responsePayload?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateTransferStatusResponse {
|
|
10
|
+
success: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface Transfer {
|
|
13
|
+
id: string;
|
|
14
|
+
amount: number;
|
|
15
|
+
recipientId: string;
|
|
16
|
+
chargeId: string;
|
|
17
|
+
description: string;
|
|
18
|
+
status: ChargeStatus;
|
|
19
|
+
processedAt: string;
|
|
20
|
+
gatewayId: GatewayIdentification;
|
|
21
|
+
bankAccountId: string;
|
|
22
|
+
requestPayload: Record<string, any>;
|
|
23
|
+
responsePayload?: Record<string, any>;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
}
|
|
27
|
+
export interface BankAccount {
|
|
28
|
+
id: string;
|
|
29
|
+
recipientId: string;
|
|
30
|
+
bankCode: string;
|
|
31
|
+
branch: string;
|
|
32
|
+
account: string;
|
|
33
|
+
accountType: string;
|
|
34
|
+
pixKey: string;
|
|
35
|
+
pixKeyType: string;
|
|
36
|
+
balance: number;
|
|
37
|
+
transfers: string[];
|
|
38
|
+
isMain: boolean;
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
updatedAt: Date;
|
|
41
|
+
}
|
|
42
|
+
export interface Recipient {
|
|
43
|
+
id: string;
|
|
44
|
+
code: string;
|
|
45
|
+
commercialName: string;
|
|
46
|
+
socialReason: string;
|
|
47
|
+
holderType: string;
|
|
48
|
+
document: string;
|
|
49
|
+
cnaeId: string;
|
|
50
|
+
legalType: string;
|
|
51
|
+
foundation: string;
|
|
52
|
+
contactName: string;
|
|
53
|
+
contactEmail: string;
|
|
54
|
+
contactPhone: string;
|
|
55
|
+
isAutomaticAnticipationEnabled: boolean;
|
|
56
|
+
avatarUrl: string;
|
|
57
|
+
isActive: boolean;
|
|
58
|
+
providerStatus: string;
|
|
59
|
+
payableIds: string[];
|
|
60
|
+
addressId: string;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
}
|
|
64
|
+
export interface Charge {
|
|
65
|
+
id: string;
|
|
66
|
+
amount: number;
|
|
67
|
+
paymentMethod: string;
|
|
68
|
+
status: string;
|
|
69
|
+
type: string;
|
|
70
|
+
dueAt: string;
|
|
71
|
+
txid: string;
|
|
72
|
+
endToEndId: string;
|
|
73
|
+
brcode: string;
|
|
74
|
+
pushToken: string;
|
|
75
|
+
installmentNumber: number;
|
|
76
|
+
installmentValue: number;
|
|
77
|
+
fee: number;
|
|
78
|
+
baseFee: number;
|
|
79
|
+
feePercentage: number;
|
|
80
|
+
isScheduled: boolean;
|
|
81
|
+
discountPercentage: number;
|
|
82
|
+
discountAmount: number;
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
gatewayId: GatewayIdentification;
|
|
85
|
+
cardId: string;
|
|
86
|
+
orderId: string;
|
|
87
|
+
orderScheduleId: string;
|
|
88
|
+
payableIds: string[];
|
|
89
|
+
taxId: string;
|
|
90
|
+
metadata: string;
|
|
91
|
+
}
|
|
92
|
+
export interface Payable {
|
|
93
|
+
id: string;
|
|
94
|
+
amount: number;
|
|
95
|
+
installment: number;
|
|
96
|
+
status: string;
|
|
97
|
+
dueAt: string;
|
|
98
|
+
isAnticipated: boolean;
|
|
99
|
+
processedAt: string;
|
|
100
|
+
createdAt: Date;
|
|
101
|
+
chargeId: string;
|
|
102
|
+
recipientId: string;
|
|
103
|
+
}
|
|
104
|
+
export interface BankTransferData {
|
|
105
|
+
pixKey: string;
|
|
106
|
+
amount: number;
|
|
107
|
+
chargeId: string;
|
|
108
|
+
recipient: Recipient | undefined;
|
|
109
|
+
routingKey: string;
|
|
110
|
+
gatewayId: GatewayIdentification;
|
|
111
|
+
payables: Payable[];
|
|
112
|
+
bankAccountId: string;
|
|
113
|
+
}
|
|
114
|
+
export interface UpdateBankAccountBalanceRequest {
|
|
115
|
+
bankAccountId: string;
|
|
116
|
+
amount: number;
|
|
117
|
+
operation: string;
|
|
118
|
+
}
|
|
119
|
+
export interface UpdateBankAccountBalanceResponse {
|
|
120
|
+
success: boolean;
|
|
121
|
+
newBalance: number;
|
|
122
|
+
}
|
|
123
|
+
export interface GetMainAccountRequest {
|
|
124
|
+
}
|
|
125
|
+
export interface GetMainAccountResponse {
|
|
126
|
+
bankAccount: BankAccount | undefined;
|
|
127
|
+
}
|
|
128
|
+
export interface GetBankAccountByRecipientIdRequest {
|
|
129
|
+
recipientId: string;
|
|
130
|
+
}
|
|
131
|
+
export interface GetBankAccountByRecipientIdResponse {
|
|
132
|
+
bankAccount: BankAccount[];
|
|
133
|
+
}
|
|
134
|
+
export interface GetRecipientByIdRequest {
|
|
135
|
+
id: string;
|
|
136
|
+
}
|
|
137
|
+
export interface GetRecipientByIdResponse {
|
|
138
|
+
recipient: Recipient | undefined;
|
|
139
|
+
}
|
|
140
|
+
export interface GetLiquidatedChargesForTransferRequest {
|
|
141
|
+
}
|
|
142
|
+
export interface GetLiquidatedChargesForTransferResponse {
|
|
143
|
+
charges: Charge[];
|
|
144
|
+
}
|
|
145
|
+
export interface UpdatePayablesStatusRequest {
|
|
146
|
+
payableIds: string[];
|
|
147
|
+
status: string;
|
|
148
|
+
}
|
|
149
|
+
export interface UpdatePayablesStatusResponse {
|
|
150
|
+
success: boolean;
|
|
151
|
+
affected: number;
|
|
152
|
+
}
|
|
153
|
+
export interface GetPayableByIdRequest {
|
|
154
|
+
payableId: string;
|
|
155
|
+
}
|
|
156
|
+
export interface GetPayableByIdResponse {
|
|
157
|
+
payable: Payable | undefined;
|
|
158
|
+
}
|
|
159
|
+
export interface RoutingInfoRequest {
|
|
160
|
+
method: string;
|
|
161
|
+
recipientId: string;
|
|
162
|
+
operationType: string;
|
|
163
|
+
}
|
|
164
|
+
export interface RoutingInfoResponse {
|
|
165
|
+
gatewayId: GatewayIdentification;
|
|
166
|
+
pixKey: string;
|
|
167
|
+
routingKey: string;
|
|
168
|
+
}
|
|
169
|
+
export interface CreatePaymentPixRequest {
|
|
170
|
+
data: BankTransferData | undefined;
|
|
171
|
+
routingKey: string;
|
|
172
|
+
}
|
|
173
|
+
export interface CreatePaymentPixResponse {
|
|
174
|
+
success: boolean;
|
|
175
|
+
paymentId: string;
|
|
176
|
+
}
|
|
177
|
+
export declare const TRANSFER_PACKAGE_NAME = "transfer";
|
|
178
|
+
export interface TransferServiceClient {
|
|
179
|
+
updateTransferStatus(request: UpdateTransferStatusRequest): Observable<UpdateTransferStatusResponse>;
|
|
180
|
+
}
|
|
181
|
+
export interface TransferServiceController {
|
|
182
|
+
updateTransferStatus(request: UpdateTransferStatusRequest): Promise<UpdateTransferStatusResponse> | Observable<UpdateTransferStatusResponse> | UpdateTransferStatusResponse;
|
|
183
|
+
}
|
|
184
|
+
export declare function TransferServiceControllerMethods(): (constructor: Function) => void;
|
|
185
|
+
export declare const TRANSFER_SERVICE_NAME = "TransferService";
|
|
@@ -0,0 +1,23 @@
|
|
|
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: transfer.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'transfer';
|
|
8
|
+
export const TRANSFER_PACKAGE_NAME = 'transfer';
|
|
9
|
+
export function TransferServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = ['updateTransferStatus'];
|
|
12
|
+
for (const method of grpcMethods) {
|
|
13
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
14
|
+
GrpcMethod('TransferService', method)(constructor.prototype[method], method, descriptor);
|
|
15
|
+
}
|
|
16
|
+
const grpcStreamMethods = [];
|
|
17
|
+
for (const method of grpcStreamMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
GrpcStreamMethod('TransferService', method)(constructor.prototype[method], method, descriptor);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export const TRANSFER_SERVICE_NAME = 'TransferService';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AccountTypeEnum } from '@postpaybr/contracts/types';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare const protobufPackage = "twoFactor";
|
|
4
|
+
export interface EnableTwoFactorRequest {
|
|
5
|
+
accountId: string;
|
|
6
|
+
accountType: AccountTypeEnum;
|
|
7
|
+
}
|
|
8
|
+
export interface TwoFactorResponse {
|
|
9
|
+
qrCodeUrl: string;
|
|
10
|
+
backupCodes: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface VerifyTwoFactorRequest {
|
|
13
|
+
accountId: string;
|
|
14
|
+
accountType: AccountTypeEnum;
|
|
15
|
+
token: string;
|
|
16
|
+
}
|
|
17
|
+
export interface VerifyTwoFactorResponse {
|
|
18
|
+
success: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface DisableTwoFactorRequest {
|
|
21
|
+
accountId: string;
|
|
22
|
+
accountType: AccountTypeEnum;
|
|
23
|
+
backupCode: string;
|
|
24
|
+
}
|
|
25
|
+
export interface DisableTwoFactorResponse {
|
|
26
|
+
success: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface VerifyTwoFactorTokenRequest {
|
|
29
|
+
accountId: string;
|
|
30
|
+
accountType: AccountTypeEnum;
|
|
31
|
+
token: string;
|
|
32
|
+
}
|
|
33
|
+
export interface GenerateBackupCodesRequest {
|
|
34
|
+
accountId: string;
|
|
35
|
+
accountType: AccountTypeEnum;
|
|
36
|
+
}
|
|
37
|
+
export interface GenerateBackupCodesResponse {
|
|
38
|
+
backupCodes: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface GetTwoFactorStatusRequest {
|
|
41
|
+
accountId: string;
|
|
42
|
+
accountType: AccountTypeEnum;
|
|
43
|
+
}
|
|
44
|
+
export interface TwoFactorStatusResponse {
|
|
45
|
+
isEnabled: boolean;
|
|
46
|
+
hasBackupCodes: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare const TWO_FACTOR_PACKAGE_NAME = "twoFactor";
|
|
49
|
+
export interface TwoFactorServiceClient {
|
|
50
|
+
enableTwoFactor(request: EnableTwoFactorRequest): Observable<TwoFactorResponse>;
|
|
51
|
+
verifyAndEnableTwoFactor(request: VerifyTwoFactorRequest): Observable<VerifyTwoFactorResponse>;
|
|
52
|
+
disableTwoFactor(request: DisableTwoFactorRequest): Observable<DisableTwoFactorResponse>;
|
|
53
|
+
verifyTwoFactorToken(request: VerifyTwoFactorTokenRequest): Observable<VerifyTwoFactorResponse>;
|
|
54
|
+
generateNewBackupCodes(request: GenerateBackupCodesRequest): Observable<GenerateBackupCodesResponse>;
|
|
55
|
+
getTwoFactorStatus(request: GetTwoFactorStatusRequest): Observable<TwoFactorStatusResponse>;
|
|
56
|
+
}
|
|
57
|
+
export interface TwoFactorServiceController {
|
|
58
|
+
enableTwoFactor(request: EnableTwoFactorRequest): Promise<TwoFactorResponse> | Observable<TwoFactorResponse> | TwoFactorResponse;
|
|
59
|
+
verifyAndEnableTwoFactor(request: VerifyTwoFactorRequest): Promise<VerifyTwoFactorResponse> | Observable<VerifyTwoFactorResponse> | VerifyTwoFactorResponse;
|
|
60
|
+
disableTwoFactor(request: DisableTwoFactorRequest): Promise<DisableTwoFactorResponse> | Observable<DisableTwoFactorResponse> | DisableTwoFactorResponse;
|
|
61
|
+
verifyTwoFactorToken(request: VerifyTwoFactorTokenRequest): Promise<VerifyTwoFactorResponse> | Observable<VerifyTwoFactorResponse> | VerifyTwoFactorResponse;
|
|
62
|
+
generateNewBackupCodes(request: GenerateBackupCodesRequest): Promise<GenerateBackupCodesResponse> | Observable<GenerateBackupCodesResponse> | GenerateBackupCodesResponse;
|
|
63
|
+
getTwoFactorStatus(request: GetTwoFactorStatusRequest): Promise<TwoFactorStatusResponse> | Observable<TwoFactorStatusResponse> | TwoFactorStatusResponse;
|
|
64
|
+
}
|
|
65
|
+
export declare function TwoFactorServiceControllerMethods(): (constructor: Function) => void;
|
|
66
|
+
export declare const TWO_FACTOR_SERVICE_NAME = "TwoFactorService";
|
|
@@ -0,0 +1,30 @@
|
|
|
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: two-factor.proto
|
|
6
|
+
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
|
|
7
|
+
export const protobufPackage = 'twoFactor';
|
|
8
|
+
export const TWO_FACTOR_PACKAGE_NAME = 'twoFactor';
|
|
9
|
+
export function TwoFactorServiceControllerMethods() {
|
|
10
|
+
return function (constructor) {
|
|
11
|
+
const grpcMethods = [
|
|
12
|
+
'enableTwoFactor',
|
|
13
|
+
'verifyAndEnableTwoFactor',
|
|
14
|
+
'disableTwoFactor',
|
|
15
|
+
'verifyTwoFactorToken',
|
|
16
|
+
'generateNewBackupCodes',
|
|
17
|
+
'getTwoFactorStatus',
|
|
18
|
+
];
|
|
19
|
+
for (const method of grpcMethods) {
|
|
20
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
21
|
+
GrpcMethod('TwoFactorService', method)(constructor.prototype[method], method, descriptor);
|
|
22
|
+
}
|
|
23
|
+
const grpcStreamMethods = [];
|
|
24
|
+
for (const method of grpcStreamMethods) {
|
|
25
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
26
|
+
GrpcStreamMethod('TwoFactorService', method)(constructor.prototype[method], method, descriptor);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export const TWO_FACTOR_SERVICE_NAME = 'TwoFactorService';
|