ecom-documents 1.0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Changed
11
+ ### Added
12
+ ### Fixed
13
+ ### Removed
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Your Organization
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # ecom-documents
@@ -0,0 +1,324 @@
1
+ import axios from 'axios';
2
+ import { ValidationError } from 'class-validator';
3
+
4
+ declare class DateRangeExportDto {
5
+ from: string | Date;
6
+ to: string | Date;
7
+ }
8
+
9
+ interface PageOptionsDto {
10
+ page?: number;
11
+ limit?: number;
12
+ skip: number;
13
+ take?: number;
14
+ order?: 'ASC' | 'DESC';
15
+ }
16
+ interface ChunkedFetchConfig<T> {
17
+ queryFn: (pageOptions: PageOptionsDto) => Promise<[T[], number]>;
18
+ pageOptions: PageOptionsDto;
19
+ chunkSize?: number;
20
+ }
21
+ declare function fetchDBQueryInChunks<T>(config: ChunkedFetchConfig<T>): Promise<T[]>;
22
+
23
+ declare function maskAccountNumber(str: string): string;
24
+
25
+ type ValueOf<T> = T[keyof T];
26
+
27
+ declare const DocumentType: {
28
+ readonly STATEMENTS: "STATEMENTS";
29
+ readonly PAYOUTS: "PAYOUTS";
30
+ readonly SETTLEMENTS: "SETTLEMENTS";
31
+ readonly TRANSACTIONS: "TRANSACTIONS";
32
+ readonly TRANSACTIONS_INTERNAL: "TRANSACTIONS_INTERNAL";
33
+ readonly REFUNDS: "REFUNDS";
34
+ readonly REFUNDS_INTERNAL_GATEWAY: "REFUNDS_INTERNAL_GATEWAY";
35
+ readonly PROFIT_FEES: "PROFIT_FEES";
36
+ readonly PAYMENT_METHODS: "PAYMENT_METHODS";
37
+ readonly VENDOR_LIST: "VENDOR_LIST";
38
+ readonly VENDOR_SALES: "VENDOR_SALES";
39
+ readonly EXCEPTIONS: "EXCEPTIONS";
40
+ readonly REFUNDS_POS: "REFUNDS_POS";
41
+ readonly REFUNDS_INTERNAL_POS: "REFUNDS_INTERNAL_POS";
42
+ };
43
+ type DocumentType = ValueOf<typeof DocumentType>;
44
+
45
+ declare const FileFormat: {
46
+ readonly PDF: "pdf";
47
+ readonly CSV: "csv";
48
+ readonly XLSX: "xlsx";
49
+ };
50
+ type FileFormat = ValueOf<typeof FileFormat>;
51
+
52
+ declare class MerchantDetailsHeaderExportDto {
53
+ name: string;
54
+ profile?: string;
55
+ accountNumber: string;
56
+ totalBalance: number;
57
+ availableBalance: number;
58
+ pendingBalance: number;
59
+ currency: string;
60
+ }
61
+
62
+ declare class DocumentGenerationRequestDto<T = any> {
63
+ documentFormat: FileFormat;
64
+ documentType: DocumentType;
65
+ merchantInfo: MerchantDetailsHeaderExportDto;
66
+ dateRange: DateRangeExportDto;
67
+ data: T[];
68
+ presignedURL?: boolean;
69
+ }
70
+
71
+ declare class DocumentPathResponseDto {
72
+ name: string;
73
+ path: string;
74
+ s3Result: object;
75
+ constructor(name: string, path: string, commandResult: object);
76
+ }
77
+
78
+ declare class DocumentExportClient {
79
+ client: ReturnType<typeof axios.create>;
80
+ constructor(documentMsBaseUrl: string, documentMSCommunicationKey: string);
81
+ generateDocument(documentFormat: FileFormat, documentType: DocumentType, dateRange: DateRangeExportDto, payload: {
82
+ data: object[];
83
+ }, merchantInfo: MerchantDetailsHeaderExportDto, presignedURL?: boolean): Promise<DocumentPathResponseDto>;
84
+ }
85
+
86
+ declare class DocumentError extends Error {
87
+ code: string;
88
+ statusCode?: number | undefined;
89
+ details?: any | undefined;
90
+ constructor(message: string, code: string, statusCode?: number | undefined, details?: any | undefined);
91
+ }
92
+ declare class DocumentGenerationError extends DocumentError {
93
+ constructor(message: string, details?: any);
94
+ }
95
+ declare class DocumentNetworkError extends DocumentError {
96
+ constructor(message: string, statusCode?: number, details?: any);
97
+ }
98
+
99
+ declare class DocumentValidationError extends DocumentError {
100
+ validationErrors: ValidationError[];
101
+ constructor(message: string, validationErrors: ValidationError[]);
102
+ getMessages(): string[];
103
+ }
104
+
105
+ declare class ExceptionDocument {
106
+ createdAt: string | Date;
107
+ merchantName: string;
108
+ merchantRisk: string;
109
+ cardNumber: string;
110
+ cardIssuer: string;
111
+ cardHolderName: string;
112
+ payerIpAddress: string;
113
+ product: string;
114
+ paymentMethod: string;
115
+ amount: number | string;
116
+ action: string;
117
+ }
118
+ declare class ExceptionExportDto {
119
+ data: ExceptionDocument[];
120
+ }
121
+
122
+ declare class PaymentMethodDocument {
123
+ paymentMethod: string;
124
+ totalAmount: number;
125
+ percentageOfTotal: string;
126
+ txnCount: number;
127
+ }
128
+ declare class PaymentMethodsExportDto {
129
+ data: PaymentMethodDocument[];
130
+ }
131
+
132
+ declare class PayoutDocument {
133
+ id: string;
134
+ mid: string;
135
+ iban: string;
136
+ amount: number;
137
+ currency: string;
138
+ numOfTxn: number;
139
+ notes: string;
140
+ createdAt: string | Date;
141
+ }
142
+ declare class PayoutsExportDto {
143
+ data: PayoutDocument[];
144
+ }
145
+
146
+ declare class ProfitFeesDocument {
147
+ mid: string;
148
+ merchantName: string;
149
+ numOfTxn: number;
150
+ totalTxnAmount: number;
151
+ totalProfitAmount: number;
152
+ type: 'PROFIT' | 'FEES';
153
+ }
154
+ declare class ProfitFeesExportDto {
155
+ data: ProfitFeesDocument[];
156
+ }
157
+
158
+ declare class RefundBaseDto {
159
+ createdAt: string | Date;
160
+ refundedAt?: string | Date;
161
+ rejectedAt?: string | Date;
162
+ ecomReference?: string;
163
+ merchantReference?: string;
164
+ originalTxnId: string;
165
+ originalTxnDate: string | Date;
166
+ originalTxnAmount: number;
167
+ amount: number;
168
+ paymentMethod: string;
169
+ status: string;
170
+ mid: string;
171
+ merchantName: string;
172
+ }
173
+ declare class RefundDocument extends RefundBaseDto {
174
+ customerName: string;
175
+ customerPhone: string;
176
+ invoiceNumber?: string;
177
+ product: string;
178
+ type: string;
179
+ requestedBy?: string;
180
+ }
181
+ declare class RefundPOSDocument extends RefundBaseDto {
182
+ authId: string | null;
183
+ terminalId: string;
184
+ terminalName?: string;
185
+ cardNumber: string;
186
+ }
187
+ declare class RefundsExportDto {
188
+ data: RefundDocument[];
189
+ }
190
+ declare class RefundsPOSExportDto {
191
+ data: RefundPOSDocument[];
192
+ }
193
+
194
+ declare class SettlementDocument {
195
+ mid: string;
196
+ merchantName: string;
197
+ bank?: string;
198
+ holderName?: string;
199
+ iban?: string;
200
+ accountNumber?: string;
201
+ totalAmount: number;
202
+ totalTxnCount: number;
203
+ settlementDate?: string | null;
204
+ }
205
+ declare class SettlementsExportDto {
206
+ data: SettlementDocument[];
207
+ }
208
+
209
+ declare class StatementDocument {
210
+ createdAt: Date | string;
211
+ transactionId?: string;
212
+ merchantReference?: string;
213
+ invoiceId?: string;
214
+ description?: string;
215
+ paymentMethod: string;
216
+ amount: number;
217
+ type: string;
218
+ balanceAfter: number;
219
+ }
220
+ declare class StatementsExportDto {
221
+ data: StatementDocument[];
222
+ }
223
+
224
+ declare class TransactionDocument {
225
+ createdAt: string | Date;
226
+ id: string;
227
+ ecomReference: string;
228
+ merchantReference?: string;
229
+ merchantName?: string;
230
+ invoiceNumber?: string;
231
+ customerName: string;
232
+ customerPhone: string;
233
+ amount: number;
234
+ product: string;
235
+ paymentMethod: string;
236
+ status: string;
237
+ authCode?: string;
238
+ terminalId?: string;
239
+ terminalName?: string;
240
+ cardNumber?: string;
241
+ }
242
+ declare class TransactionsExportDto {
243
+ data: TransactionDocument[];
244
+ }
245
+
246
+ declare class VendorSalesDocument {
247
+ mid: string;
248
+ vendorNumber: string;
249
+ vendorName: string;
250
+ totalTxnAmount: number;
251
+ }
252
+ declare class VendorListDocument {
253
+ mid: string;
254
+ vendorNumber: string;
255
+ vendorName: string;
256
+ email: string;
257
+ bank: string;
258
+ iban: string;
259
+ commission: number | string;
260
+ }
261
+ declare class VendorSalesExportDto {
262
+ data: VendorSalesDocument[];
263
+ }
264
+ declare class VendorListExportDto {
265
+ data: VendorListDocument[];
266
+ }
267
+
268
+ declare const DocumentPayloadMap: {
269
+ readonly STATEMENTS: typeof StatementsExportDto;
270
+ readonly PAYOUTS: typeof PayoutsExportDto;
271
+ readonly SETTLEMENTS: typeof SettlementsExportDto;
272
+ readonly TRANSACTIONS: typeof TransactionsExportDto;
273
+ readonly TRANSACTIONS_INTERNAL: typeof TransactionsExportDto;
274
+ readonly REFUNDS: typeof RefundsExportDto;
275
+ readonly REFUNDS_INTERNAL_GATEWAY: typeof RefundsExportDto;
276
+ readonly PROFIT_FEES: typeof ProfitFeesExportDto;
277
+ readonly PAYMENT_METHODS: typeof PaymentMethodsExportDto;
278
+ readonly VENDOR_LIST: typeof VendorListExportDto;
279
+ readonly VENDOR_SALES: typeof VendorSalesExportDto;
280
+ readonly EXCEPTIONS: typeof ExceptionExportDto;
281
+ readonly REFUNDS_POS: typeof RefundsPOSExportDto;
282
+ readonly REFUNDS_INTERNAL_POS: typeof RefundsPOSExportDto;
283
+ };
284
+
285
+ declare class InvoiceDocument {
286
+ createdAt: string | Date;
287
+ paidAt: string | Date;
288
+ customerName: string;
289
+ customerPhone: string;
290
+ id: string;
291
+ merchantReference: string;
292
+ createdBy: string;
293
+ transactionId: string;
294
+ status: string;
295
+ amount: number;
296
+ paymentMethod: string;
297
+ }
298
+ declare class InvoiceHistoryDocument {
299
+ createdAt: string | Date;
300
+ action: string;
301
+ createdBy: string;
302
+ invoiceId: string;
303
+ paymentMethod: string;
304
+ paymentMethodBrand: string;
305
+ }
306
+ declare class InvoiceExportDto {
307
+ data: InvoiceDocument[];
308
+ }
309
+ declare class InvoiceHistoryExportDto {
310
+ data: InvoiceHistoryDocument[];
311
+ }
312
+
313
+ interface ValidationResult<T = any> {
314
+ isValid: boolean;
315
+ errors?: ValidationError[];
316
+ validatedPayload?: T;
317
+ errorMessage?: string;
318
+ }
319
+ declare class DocumentValidator {
320
+ static validatePayload(type: DocumentType, payload: any): Promise<ValidationResult>;
321
+ static formatErrors(errors: ValidationError[]): string[];
322
+ }
323
+
324
+ export { type ChunkedFetchConfig, DateRangeExportDto, DocumentError, DocumentExportClient, DocumentGenerationError, DocumentGenerationRequestDto, DocumentNetworkError, DocumentPathResponseDto, DocumentPayloadMap, DocumentType, DocumentValidationError, DocumentValidator, ExceptionExportDto, FileFormat, InvoiceExportDto, InvoiceHistoryExportDto, MerchantDetailsHeaderExportDto, type PageOptionsDto, PaymentMethodsExportDto, PayoutsExportDto, ProfitFeesExportDto, RefundsExportDto, RefundsPOSExportDto, SettlementsExportDto, StatementsExportDto, TransactionsExportDto, type ValidationResult, type ValueOf, VendorListExportDto, VendorSalesExportDto, fetchDBQueryInChunks, maskAccountNumber };
@@ -0,0 +1,324 @@
1
+ import axios from 'axios';
2
+ import { ValidationError } from 'class-validator';
3
+
4
+ declare class DateRangeExportDto {
5
+ from: string | Date;
6
+ to: string | Date;
7
+ }
8
+
9
+ interface PageOptionsDto {
10
+ page?: number;
11
+ limit?: number;
12
+ skip: number;
13
+ take?: number;
14
+ order?: 'ASC' | 'DESC';
15
+ }
16
+ interface ChunkedFetchConfig<T> {
17
+ queryFn: (pageOptions: PageOptionsDto) => Promise<[T[], number]>;
18
+ pageOptions: PageOptionsDto;
19
+ chunkSize?: number;
20
+ }
21
+ declare function fetchDBQueryInChunks<T>(config: ChunkedFetchConfig<T>): Promise<T[]>;
22
+
23
+ declare function maskAccountNumber(str: string): string;
24
+
25
+ type ValueOf<T> = T[keyof T];
26
+
27
+ declare const DocumentType: {
28
+ readonly STATEMENTS: "STATEMENTS";
29
+ readonly PAYOUTS: "PAYOUTS";
30
+ readonly SETTLEMENTS: "SETTLEMENTS";
31
+ readonly TRANSACTIONS: "TRANSACTIONS";
32
+ readonly TRANSACTIONS_INTERNAL: "TRANSACTIONS_INTERNAL";
33
+ readonly REFUNDS: "REFUNDS";
34
+ readonly REFUNDS_INTERNAL_GATEWAY: "REFUNDS_INTERNAL_GATEWAY";
35
+ readonly PROFIT_FEES: "PROFIT_FEES";
36
+ readonly PAYMENT_METHODS: "PAYMENT_METHODS";
37
+ readonly VENDOR_LIST: "VENDOR_LIST";
38
+ readonly VENDOR_SALES: "VENDOR_SALES";
39
+ readonly EXCEPTIONS: "EXCEPTIONS";
40
+ readonly REFUNDS_POS: "REFUNDS_POS";
41
+ readonly REFUNDS_INTERNAL_POS: "REFUNDS_INTERNAL_POS";
42
+ };
43
+ type DocumentType = ValueOf<typeof DocumentType>;
44
+
45
+ declare const FileFormat: {
46
+ readonly PDF: "pdf";
47
+ readonly CSV: "csv";
48
+ readonly XLSX: "xlsx";
49
+ };
50
+ type FileFormat = ValueOf<typeof FileFormat>;
51
+
52
+ declare class MerchantDetailsHeaderExportDto {
53
+ name: string;
54
+ profile?: string;
55
+ accountNumber: string;
56
+ totalBalance: number;
57
+ availableBalance: number;
58
+ pendingBalance: number;
59
+ currency: string;
60
+ }
61
+
62
+ declare class DocumentGenerationRequestDto<T = any> {
63
+ documentFormat: FileFormat;
64
+ documentType: DocumentType;
65
+ merchantInfo: MerchantDetailsHeaderExportDto;
66
+ dateRange: DateRangeExportDto;
67
+ data: T[];
68
+ presignedURL?: boolean;
69
+ }
70
+
71
+ declare class DocumentPathResponseDto {
72
+ name: string;
73
+ path: string;
74
+ s3Result: object;
75
+ constructor(name: string, path: string, commandResult: object);
76
+ }
77
+
78
+ declare class DocumentExportClient {
79
+ client: ReturnType<typeof axios.create>;
80
+ constructor(documentMsBaseUrl: string, documentMSCommunicationKey: string);
81
+ generateDocument(documentFormat: FileFormat, documentType: DocumentType, dateRange: DateRangeExportDto, payload: {
82
+ data: object[];
83
+ }, merchantInfo: MerchantDetailsHeaderExportDto, presignedURL?: boolean): Promise<DocumentPathResponseDto>;
84
+ }
85
+
86
+ declare class DocumentError extends Error {
87
+ code: string;
88
+ statusCode?: number | undefined;
89
+ details?: any | undefined;
90
+ constructor(message: string, code: string, statusCode?: number | undefined, details?: any | undefined);
91
+ }
92
+ declare class DocumentGenerationError extends DocumentError {
93
+ constructor(message: string, details?: any);
94
+ }
95
+ declare class DocumentNetworkError extends DocumentError {
96
+ constructor(message: string, statusCode?: number, details?: any);
97
+ }
98
+
99
+ declare class DocumentValidationError extends DocumentError {
100
+ validationErrors: ValidationError[];
101
+ constructor(message: string, validationErrors: ValidationError[]);
102
+ getMessages(): string[];
103
+ }
104
+
105
+ declare class ExceptionDocument {
106
+ createdAt: string | Date;
107
+ merchantName: string;
108
+ merchantRisk: string;
109
+ cardNumber: string;
110
+ cardIssuer: string;
111
+ cardHolderName: string;
112
+ payerIpAddress: string;
113
+ product: string;
114
+ paymentMethod: string;
115
+ amount: number | string;
116
+ action: string;
117
+ }
118
+ declare class ExceptionExportDto {
119
+ data: ExceptionDocument[];
120
+ }
121
+
122
+ declare class PaymentMethodDocument {
123
+ paymentMethod: string;
124
+ totalAmount: number;
125
+ percentageOfTotal: string;
126
+ txnCount: number;
127
+ }
128
+ declare class PaymentMethodsExportDto {
129
+ data: PaymentMethodDocument[];
130
+ }
131
+
132
+ declare class PayoutDocument {
133
+ id: string;
134
+ mid: string;
135
+ iban: string;
136
+ amount: number;
137
+ currency: string;
138
+ numOfTxn: number;
139
+ notes: string;
140
+ createdAt: string | Date;
141
+ }
142
+ declare class PayoutsExportDto {
143
+ data: PayoutDocument[];
144
+ }
145
+
146
+ declare class ProfitFeesDocument {
147
+ mid: string;
148
+ merchantName: string;
149
+ numOfTxn: number;
150
+ totalTxnAmount: number;
151
+ totalProfitAmount: number;
152
+ type: 'PROFIT' | 'FEES';
153
+ }
154
+ declare class ProfitFeesExportDto {
155
+ data: ProfitFeesDocument[];
156
+ }
157
+
158
+ declare class RefundBaseDto {
159
+ createdAt: string | Date;
160
+ refundedAt?: string | Date;
161
+ rejectedAt?: string | Date;
162
+ ecomReference?: string;
163
+ merchantReference?: string;
164
+ originalTxnId: string;
165
+ originalTxnDate: string | Date;
166
+ originalTxnAmount: number;
167
+ amount: number;
168
+ paymentMethod: string;
169
+ status: string;
170
+ mid: string;
171
+ merchantName: string;
172
+ }
173
+ declare class RefundDocument extends RefundBaseDto {
174
+ customerName: string;
175
+ customerPhone: string;
176
+ invoiceNumber?: string;
177
+ product: string;
178
+ type: string;
179
+ requestedBy?: string;
180
+ }
181
+ declare class RefundPOSDocument extends RefundBaseDto {
182
+ authId: string | null;
183
+ terminalId: string;
184
+ terminalName?: string;
185
+ cardNumber: string;
186
+ }
187
+ declare class RefundsExportDto {
188
+ data: RefundDocument[];
189
+ }
190
+ declare class RefundsPOSExportDto {
191
+ data: RefundPOSDocument[];
192
+ }
193
+
194
+ declare class SettlementDocument {
195
+ mid: string;
196
+ merchantName: string;
197
+ bank?: string;
198
+ holderName?: string;
199
+ iban?: string;
200
+ accountNumber?: string;
201
+ totalAmount: number;
202
+ totalTxnCount: number;
203
+ settlementDate?: string | null;
204
+ }
205
+ declare class SettlementsExportDto {
206
+ data: SettlementDocument[];
207
+ }
208
+
209
+ declare class StatementDocument {
210
+ createdAt: Date | string;
211
+ transactionId?: string;
212
+ merchantReference?: string;
213
+ invoiceId?: string;
214
+ description?: string;
215
+ paymentMethod: string;
216
+ amount: number;
217
+ type: string;
218
+ balanceAfter: number;
219
+ }
220
+ declare class StatementsExportDto {
221
+ data: StatementDocument[];
222
+ }
223
+
224
+ declare class TransactionDocument {
225
+ createdAt: string | Date;
226
+ id: string;
227
+ ecomReference: string;
228
+ merchantReference?: string;
229
+ merchantName?: string;
230
+ invoiceNumber?: string;
231
+ customerName: string;
232
+ customerPhone: string;
233
+ amount: number;
234
+ product: string;
235
+ paymentMethod: string;
236
+ status: string;
237
+ authCode?: string;
238
+ terminalId?: string;
239
+ terminalName?: string;
240
+ cardNumber?: string;
241
+ }
242
+ declare class TransactionsExportDto {
243
+ data: TransactionDocument[];
244
+ }
245
+
246
+ declare class VendorSalesDocument {
247
+ mid: string;
248
+ vendorNumber: string;
249
+ vendorName: string;
250
+ totalTxnAmount: number;
251
+ }
252
+ declare class VendorListDocument {
253
+ mid: string;
254
+ vendorNumber: string;
255
+ vendorName: string;
256
+ email: string;
257
+ bank: string;
258
+ iban: string;
259
+ commission: number | string;
260
+ }
261
+ declare class VendorSalesExportDto {
262
+ data: VendorSalesDocument[];
263
+ }
264
+ declare class VendorListExportDto {
265
+ data: VendorListDocument[];
266
+ }
267
+
268
+ declare const DocumentPayloadMap: {
269
+ readonly STATEMENTS: typeof StatementsExportDto;
270
+ readonly PAYOUTS: typeof PayoutsExportDto;
271
+ readonly SETTLEMENTS: typeof SettlementsExportDto;
272
+ readonly TRANSACTIONS: typeof TransactionsExportDto;
273
+ readonly TRANSACTIONS_INTERNAL: typeof TransactionsExportDto;
274
+ readonly REFUNDS: typeof RefundsExportDto;
275
+ readonly REFUNDS_INTERNAL_GATEWAY: typeof RefundsExportDto;
276
+ readonly PROFIT_FEES: typeof ProfitFeesExportDto;
277
+ readonly PAYMENT_METHODS: typeof PaymentMethodsExportDto;
278
+ readonly VENDOR_LIST: typeof VendorListExportDto;
279
+ readonly VENDOR_SALES: typeof VendorSalesExportDto;
280
+ readonly EXCEPTIONS: typeof ExceptionExportDto;
281
+ readonly REFUNDS_POS: typeof RefundsPOSExportDto;
282
+ readonly REFUNDS_INTERNAL_POS: typeof RefundsPOSExportDto;
283
+ };
284
+
285
+ declare class InvoiceDocument {
286
+ createdAt: string | Date;
287
+ paidAt: string | Date;
288
+ customerName: string;
289
+ customerPhone: string;
290
+ id: string;
291
+ merchantReference: string;
292
+ createdBy: string;
293
+ transactionId: string;
294
+ status: string;
295
+ amount: number;
296
+ paymentMethod: string;
297
+ }
298
+ declare class InvoiceHistoryDocument {
299
+ createdAt: string | Date;
300
+ action: string;
301
+ createdBy: string;
302
+ invoiceId: string;
303
+ paymentMethod: string;
304
+ paymentMethodBrand: string;
305
+ }
306
+ declare class InvoiceExportDto {
307
+ data: InvoiceDocument[];
308
+ }
309
+ declare class InvoiceHistoryExportDto {
310
+ data: InvoiceHistoryDocument[];
311
+ }
312
+
313
+ interface ValidationResult<T = any> {
314
+ isValid: boolean;
315
+ errors?: ValidationError[];
316
+ validatedPayload?: T;
317
+ errorMessage?: string;
318
+ }
319
+ declare class DocumentValidator {
320
+ static validatePayload(type: DocumentType, payload: any): Promise<ValidationResult>;
321
+ static formatErrors(errors: ValidationError[]): string[];
322
+ }
323
+
324
+ export { type ChunkedFetchConfig, DateRangeExportDto, DocumentError, DocumentExportClient, DocumentGenerationError, DocumentGenerationRequestDto, DocumentNetworkError, DocumentPathResponseDto, DocumentPayloadMap, DocumentType, DocumentValidationError, DocumentValidator, ExceptionExportDto, FileFormat, InvoiceExportDto, InvoiceHistoryExportDto, MerchantDetailsHeaderExportDto, type PageOptionsDto, PaymentMethodsExportDto, PayoutsExportDto, ProfitFeesExportDto, RefundsExportDto, RefundsPOSExportDto, SettlementsExportDto, StatementsExportDto, TransactionsExportDto, type ValidationResult, type ValueOf, VendorListExportDto, VendorSalesExportDto, fetchDBQueryInChunks, maskAccountNumber };