ecom-documents 1.0.11 → 1.0.13

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/index.d.mts CHANGED
@@ -44,6 +44,11 @@ declare const DocumentType: {
44
44
  readonly INVOICES: "INVOICES";
45
45
  readonly INVOICE_USERS: "INVOICE_USERS";
46
46
  readonly INVOICE_BULK_INVALID: "INVOICE_BULK_INVALID";
47
+ readonly INTERNAL_USERS: "INTERNAL_USERS";
48
+ readonly MERCHANT_USERS: "MERCHANT_USERS";
49
+ readonly BLACKLIST_INVALID: "BLACKLIST_INVALID";
50
+ readonly BLACKLIST: "BLACKLIST";
51
+ readonly PARTNERS: "PARTNERS";
47
52
  };
48
53
  type DocumentType = ValueOf<typeof DocumentType>;
49
54
 
@@ -107,6 +112,17 @@ declare class DocumentValidationError extends DocumentError {
107
112
  getMessages(): string[];
108
113
  }
109
114
 
115
+ declare class InternalUserDocument {
116
+ fullName: string;
117
+ email: string;
118
+ phoneNumber?: string;
119
+ role: string;
120
+ isActive: boolean;
121
+ }
122
+ declare class InternalUsersExportDto {
123
+ data: InternalUserDocument[];
124
+ }
125
+
110
126
  declare class InvoiceBulkInvalidDocument {
111
127
  customerName?: string;
112
128
  customerPhone?: string;
@@ -365,6 +381,49 @@ declare class TransactionPOSInvalidExportDto {
365
381
  data: TransactionPOSInvalidDocument[];
366
382
  }
367
383
 
384
+ declare class BlackListDocument {
385
+ fullName: string;
386
+ idNumber: string;
387
+ nationality: string;
388
+ dateOfBirth: string | Date;
389
+ uploadedAt: string | Date;
390
+ uploadedBy: string;
391
+ status: string;
392
+ }
393
+ declare class BlackListExportDto {
394
+ data: BlackListDocument[];
395
+ }
396
+
397
+ declare class BlackListInvalidDocument {
398
+ fullName?: string;
399
+ idNumber?: string;
400
+ nationality?: string;
401
+ dateOfBirth?: string | Date;
402
+ reason?: string;
403
+ }
404
+ declare class BlackListInvalidExportDto {
405
+ data: BlackListInvalidDocument[];
406
+ }
407
+
408
+ declare class MerchantUserDocument {
409
+ fullName: string;
410
+ email: string;
411
+ phoneNumber?: string;
412
+ role: string;
413
+ }
414
+ declare class MerchantUsersExportDto {
415
+ data: MerchantUserDocument[];
416
+ }
417
+
418
+ declare class PartnerDocument {
419
+ fullName: string;
420
+ nationalId: string;
421
+ type: string;
422
+ }
423
+ declare class PartnerExportDto {
424
+ data: PartnerDocument[];
425
+ }
426
+
368
427
  declare const DocumentPayloadMap: {
369
428
  readonly STATEMENTS: typeof StatementsExportDto;
370
429
  readonly PAYOUTS: typeof PayoutsExportDto;
@@ -385,6 +444,11 @@ declare const DocumentPayloadMap: {
385
444
  readonly INVOICES: typeof InvoiceExportDto;
386
445
  readonly INVOICE_USERS: typeof InvoiceUserExportDto;
387
446
  readonly INVOICE_BULK_INVALID: typeof InvoiceBulkInvalidExportDto;
447
+ readonly INTERNAL_USERS: typeof InternalUsersExportDto;
448
+ readonly MERCHANT_USERS: typeof MerchantUsersExportDto;
449
+ readonly BLACKLIST_INVALID: typeof BlackListInvalidExportDto;
450
+ readonly BLACKLIST: typeof BlackListExportDto;
451
+ readonly PARTNERS: typeof PartnerExportDto;
388
452
  };
389
453
 
390
454
  interface ValidationResult<T = any> {
@@ -398,4 +462,4 @@ declare class DocumentValidator {
398
462
  static formatErrors(errors: ValidationError[]): string[];
399
463
  }
400
464
 
401
- export { type ChunkedFetchConfig, DateRangeExportDto, DocumentError, DocumentExportClient, DocumentGenerationError, DocumentGenerationRequestDto, DocumentNetworkError, DocumentPathResponseDto, DocumentPayloadMap, DocumentType, DocumentValidationError, DocumentValidator, ExceptionExportDto, FileFormat, InvoiceBulkInvalidExportDto, InvoiceExportDto, InvoiceHistoryExportDto, InvoiceUserExportDto, MerchantDetailsHeaderExportDto, type PageOptionsDto, PaymentMethodsExportDto, PayoutsExportDto, ProfitFeesExportDto, RefundBaseDto, RefundsExportDto, RefundsPOSExportDto, SettlementsExportDto, StatementsExportDto, TerminalsExportDto, TransactionPOSInvalidExportDto, TransactionsExportDto, TransactionsPOSExportDto, type ValidationResult, type ValueOf, VendorListExportDto, VendorSalesExportDto, fetchDBQueryInChunks, maskAccountNumber };
465
+ export { BlackListExportDto, BlackListInvalidExportDto, type ChunkedFetchConfig, DateRangeExportDto, DocumentError, DocumentExportClient, DocumentGenerationError, DocumentGenerationRequestDto, DocumentNetworkError, DocumentPathResponseDto, DocumentPayloadMap, DocumentType, DocumentValidationError, DocumentValidator, ExceptionExportDto, FileFormat, InternalUsersExportDto, InvoiceBulkInvalidExportDto, InvoiceExportDto, InvoiceHistoryExportDto, InvoiceUserExportDto, MerchantDetailsHeaderExportDto, MerchantUsersExportDto, type PageOptionsDto, PartnerExportDto, PaymentMethodsExportDto, PayoutsExportDto, ProfitFeesExportDto, RefundBaseDto, RefundsExportDto, RefundsPOSExportDto, SettlementsExportDto, StatementsExportDto, TerminalsExportDto, TransactionPOSInvalidExportDto, TransactionsExportDto, TransactionsPOSExportDto, type ValidationResult, type ValueOf, VendorListExportDto, VendorSalesExportDto, fetchDBQueryInChunks, maskAccountNumber };
package/dist/index.d.ts CHANGED
@@ -44,6 +44,11 @@ declare const DocumentType: {
44
44
  readonly INVOICES: "INVOICES";
45
45
  readonly INVOICE_USERS: "INVOICE_USERS";
46
46
  readonly INVOICE_BULK_INVALID: "INVOICE_BULK_INVALID";
47
+ readonly INTERNAL_USERS: "INTERNAL_USERS";
48
+ readonly MERCHANT_USERS: "MERCHANT_USERS";
49
+ readonly BLACKLIST_INVALID: "BLACKLIST_INVALID";
50
+ readonly BLACKLIST: "BLACKLIST";
51
+ readonly PARTNERS: "PARTNERS";
47
52
  };
48
53
  type DocumentType = ValueOf<typeof DocumentType>;
49
54
 
@@ -107,6 +112,17 @@ declare class DocumentValidationError extends DocumentError {
107
112
  getMessages(): string[];
108
113
  }
109
114
 
115
+ declare class InternalUserDocument {
116
+ fullName: string;
117
+ email: string;
118
+ phoneNumber?: string;
119
+ role: string;
120
+ isActive: boolean;
121
+ }
122
+ declare class InternalUsersExportDto {
123
+ data: InternalUserDocument[];
124
+ }
125
+
110
126
  declare class InvoiceBulkInvalidDocument {
111
127
  customerName?: string;
112
128
  customerPhone?: string;
@@ -365,6 +381,49 @@ declare class TransactionPOSInvalidExportDto {
365
381
  data: TransactionPOSInvalidDocument[];
366
382
  }
367
383
 
384
+ declare class BlackListDocument {
385
+ fullName: string;
386
+ idNumber: string;
387
+ nationality: string;
388
+ dateOfBirth: string | Date;
389
+ uploadedAt: string | Date;
390
+ uploadedBy: string;
391
+ status: string;
392
+ }
393
+ declare class BlackListExportDto {
394
+ data: BlackListDocument[];
395
+ }
396
+
397
+ declare class BlackListInvalidDocument {
398
+ fullName?: string;
399
+ idNumber?: string;
400
+ nationality?: string;
401
+ dateOfBirth?: string | Date;
402
+ reason?: string;
403
+ }
404
+ declare class BlackListInvalidExportDto {
405
+ data: BlackListInvalidDocument[];
406
+ }
407
+
408
+ declare class MerchantUserDocument {
409
+ fullName: string;
410
+ email: string;
411
+ phoneNumber?: string;
412
+ role: string;
413
+ }
414
+ declare class MerchantUsersExportDto {
415
+ data: MerchantUserDocument[];
416
+ }
417
+
418
+ declare class PartnerDocument {
419
+ fullName: string;
420
+ nationalId: string;
421
+ type: string;
422
+ }
423
+ declare class PartnerExportDto {
424
+ data: PartnerDocument[];
425
+ }
426
+
368
427
  declare const DocumentPayloadMap: {
369
428
  readonly STATEMENTS: typeof StatementsExportDto;
370
429
  readonly PAYOUTS: typeof PayoutsExportDto;
@@ -385,6 +444,11 @@ declare const DocumentPayloadMap: {
385
444
  readonly INVOICES: typeof InvoiceExportDto;
386
445
  readonly INVOICE_USERS: typeof InvoiceUserExportDto;
387
446
  readonly INVOICE_BULK_INVALID: typeof InvoiceBulkInvalidExportDto;
447
+ readonly INTERNAL_USERS: typeof InternalUsersExportDto;
448
+ readonly MERCHANT_USERS: typeof MerchantUsersExportDto;
449
+ readonly BLACKLIST_INVALID: typeof BlackListInvalidExportDto;
450
+ readonly BLACKLIST: typeof BlackListExportDto;
451
+ readonly PARTNERS: typeof PartnerExportDto;
388
452
  };
389
453
 
390
454
  interface ValidationResult<T = any> {
@@ -398,4 +462,4 @@ declare class DocumentValidator {
398
462
  static formatErrors(errors: ValidationError[]): string[];
399
463
  }
400
464
 
401
- export { type ChunkedFetchConfig, DateRangeExportDto, DocumentError, DocumentExportClient, DocumentGenerationError, DocumentGenerationRequestDto, DocumentNetworkError, DocumentPathResponseDto, DocumentPayloadMap, DocumentType, DocumentValidationError, DocumentValidator, ExceptionExportDto, FileFormat, InvoiceBulkInvalidExportDto, InvoiceExportDto, InvoiceHistoryExportDto, InvoiceUserExportDto, MerchantDetailsHeaderExportDto, type PageOptionsDto, PaymentMethodsExportDto, PayoutsExportDto, ProfitFeesExportDto, RefundBaseDto, RefundsExportDto, RefundsPOSExportDto, SettlementsExportDto, StatementsExportDto, TerminalsExportDto, TransactionPOSInvalidExportDto, TransactionsExportDto, TransactionsPOSExportDto, type ValidationResult, type ValueOf, VendorListExportDto, VendorSalesExportDto, fetchDBQueryInChunks, maskAccountNumber };
465
+ export { BlackListExportDto, BlackListInvalidExportDto, type ChunkedFetchConfig, DateRangeExportDto, DocumentError, DocumentExportClient, DocumentGenerationError, DocumentGenerationRequestDto, DocumentNetworkError, DocumentPathResponseDto, DocumentPayloadMap, DocumentType, DocumentValidationError, DocumentValidator, ExceptionExportDto, FileFormat, InternalUsersExportDto, InvoiceBulkInvalidExportDto, InvoiceExportDto, InvoiceHistoryExportDto, InvoiceUserExportDto, MerchantDetailsHeaderExportDto, MerchantUsersExportDto, type PageOptionsDto, PartnerExportDto, PaymentMethodsExportDto, PayoutsExportDto, ProfitFeesExportDto, RefundBaseDto, RefundsExportDto, RefundsPOSExportDto, SettlementsExportDto, StatementsExportDto, TerminalsExportDto, TransactionPOSInvalidExportDto, TransactionsExportDto, TransactionsPOSExportDto, type ValidationResult, type ValueOf, VendorListExportDto, VendorSalesExportDto, fetchDBQueryInChunks, maskAccountNumber };
package/dist/index.js CHANGED
@@ -41,14 +41,14 @@ var DocumentType = {
41
41
  // elinks
42
42
  INVOICES: "INVOICES",
43
43
  INVOICE_USERS: "INVOICE_USERS",
44
- INVOICE_BULK_INVALID: "INVOICE_BULK_INVALID"
45
- // MERCHANT_USERS: 'MERCHANT_USERS',
46
- // INTERNAL_USERS: 'INTERNAL_USERS',
47
- // USERS_AND_AGENTS: 'USERS_AND_AGENTS',
48
- // USERS: 'USERS',
49
- // BLACKLIST_INVALID: 'BLACKLIST_INVALID',
50
- // BLACKLIST: 'BLACKLIST',
51
- // PARTNERS: 'PARTNERS',
44
+ INVOICE_BULK_INVALID: "INVOICE_BULK_INVALID",
45
+ // auth
46
+ INTERNAL_USERS: "INTERNAL_USERS",
47
+ //merchant ms
48
+ MERCHANT_USERS: "MERCHANT_USERS",
49
+ BLACKLIST_INVALID: "BLACKLIST_INVALID",
50
+ BLACKLIST: "BLACKLIST",
51
+ PARTNERS: "PARTNERS"
52
52
  };
53
53
 
54
54
  // src/enums/fileFormat.enum.ts
@@ -57,6 +57,43 @@ var FileFormat = {
57
57
  CSV: "csv",
58
58
  XLSX: "xlsx"
59
59
  };
60
+ var InternalUserDocument = class {
61
+ fullName;
62
+ email;
63
+ phoneNumber;
64
+ role;
65
+ isActive;
66
+ };
67
+ __decorateClass([
68
+ classValidator.IsString(),
69
+ classValidator.IsNotEmpty()
70
+ ], InternalUserDocument.prototype, "fullName");
71
+ __decorateClass([
72
+ classValidator.IsString(),
73
+ classValidator.IsNotEmpty()
74
+ ], InternalUserDocument.prototype, "email");
75
+ __decorateClass([
76
+ classValidator.IsString(),
77
+ classValidator.IsOptional()
78
+ ], InternalUserDocument.prototype, "phoneNumber");
79
+ __decorateClass([
80
+ classValidator.IsString(),
81
+ classValidator.IsNotEmpty()
82
+ ], InternalUserDocument.prototype, "role");
83
+ __decorateClass([
84
+ classValidator.IsBoolean(),
85
+ classValidator.IsNotEmpty()
86
+ ], InternalUserDocument.prototype, "isActive");
87
+ var InternalUsersExportDto = class {
88
+ data;
89
+ };
90
+ __decorateClass([
91
+ classValidator.IsArray(),
92
+ classValidator.ValidateNested({ each: true }),
93
+ classTransformer.Type(() => InternalUserDocument),
94
+ classValidator.IsNotEmpty(),
95
+ classValidator.IsDefined()
96
+ ], InternalUsersExportDto.prototype, "data");
60
97
  var InvoiceBulkInvalidDocument = class {
61
98
  customerName;
62
99
  customerPhone;
@@ -1018,6 +1055,149 @@ __decorateClass([
1018
1055
  classValidator.IsNotEmpty(),
1019
1056
  classValidator.IsDefined()
1020
1057
  ], TransactionPOSInvalidExportDto.prototype, "data");
1058
+ var BlackListDocument = class {
1059
+ fullName;
1060
+ idNumber;
1061
+ nationality;
1062
+ dateOfBirth;
1063
+ uploadedAt;
1064
+ uploadedBy;
1065
+ status;
1066
+ };
1067
+ __decorateClass([
1068
+ classValidator.IsString(),
1069
+ classValidator.IsNotEmpty()
1070
+ ], BlackListDocument.prototype, "fullName");
1071
+ __decorateClass([
1072
+ classValidator.IsString(),
1073
+ classValidator.IsNotEmpty()
1074
+ ], BlackListDocument.prototype, "idNumber");
1075
+ __decorateClass([
1076
+ classValidator.IsString(),
1077
+ classValidator.IsNotEmpty()
1078
+ ], BlackListDocument.prototype, "nationality");
1079
+ __decorateClass([
1080
+ classValidator.IsString(),
1081
+ classValidator.IsNotEmpty()
1082
+ ], BlackListDocument.prototype, "dateOfBirth");
1083
+ __decorateClass([
1084
+ classValidator.IsString(),
1085
+ classValidator.IsNotEmpty()
1086
+ ], BlackListDocument.prototype, "uploadedAt");
1087
+ __decorateClass([
1088
+ classValidator.IsString(),
1089
+ classValidator.IsNotEmpty()
1090
+ ], BlackListDocument.prototype, "uploadedBy");
1091
+ __decorateClass([
1092
+ classValidator.IsString(),
1093
+ classValidator.IsNotEmpty()
1094
+ ], BlackListDocument.prototype, "status");
1095
+ var BlackListExportDto = class {
1096
+ data;
1097
+ };
1098
+ __decorateClass([
1099
+ classValidator.IsArray(),
1100
+ classValidator.ValidateNested({ each: true }),
1101
+ classTransformer.Type(() => BlackListDocument),
1102
+ classValidator.IsNotEmpty(),
1103
+ classValidator.IsDefined()
1104
+ ], BlackListExportDto.prototype, "data");
1105
+ var BlackListInvalidDocument = class {
1106
+ fullName;
1107
+ idNumber;
1108
+ nationality;
1109
+ dateOfBirth;
1110
+ reason;
1111
+ };
1112
+ __decorateClass([
1113
+ classValidator.IsString(),
1114
+ classValidator.IsOptional()
1115
+ ], BlackListInvalidDocument.prototype, "fullName");
1116
+ __decorateClass([
1117
+ classValidator.IsString(),
1118
+ classValidator.IsOptional()
1119
+ ], BlackListInvalidDocument.prototype, "idNumber");
1120
+ __decorateClass([
1121
+ classValidator.IsString(),
1122
+ classValidator.IsOptional()
1123
+ ], BlackListInvalidDocument.prototype, "nationality");
1124
+ __decorateClass([
1125
+ classValidator.IsString(),
1126
+ classValidator.IsOptional()
1127
+ ], BlackListInvalidDocument.prototype, "dateOfBirth");
1128
+ __decorateClass([
1129
+ classValidator.IsString(),
1130
+ classValidator.IsOptional()
1131
+ ], BlackListInvalidDocument.prototype, "reason");
1132
+ var BlackListInvalidExportDto = class {
1133
+ data;
1134
+ };
1135
+ __decorateClass([
1136
+ classValidator.IsArray(),
1137
+ classValidator.ValidateNested({ each: true }),
1138
+ classTransformer.Type(() => BlackListInvalidDocument),
1139
+ classValidator.IsNotEmpty(),
1140
+ classValidator.IsDefined()
1141
+ ], BlackListInvalidExportDto.prototype, "data");
1142
+ var MerchantUserDocument = class {
1143
+ fullName;
1144
+ email;
1145
+ phoneNumber;
1146
+ role;
1147
+ };
1148
+ __decorateClass([
1149
+ classValidator.IsString(),
1150
+ classValidator.IsNotEmpty()
1151
+ ], MerchantUserDocument.prototype, "fullName");
1152
+ __decorateClass([
1153
+ classValidator.IsString(),
1154
+ classValidator.IsNotEmpty()
1155
+ ], MerchantUserDocument.prototype, "email");
1156
+ __decorateClass([
1157
+ classValidator.IsString(),
1158
+ classValidator.IsOptional()
1159
+ ], MerchantUserDocument.prototype, "phoneNumber");
1160
+ __decorateClass([
1161
+ classValidator.IsString(),
1162
+ classValidator.IsNotEmpty()
1163
+ ], MerchantUserDocument.prototype, "role");
1164
+ var MerchantUsersExportDto = class {
1165
+ data;
1166
+ };
1167
+ __decorateClass([
1168
+ classValidator.IsArray(),
1169
+ classValidator.ValidateNested({ each: true }),
1170
+ classTransformer.Type(() => MerchantUserDocument),
1171
+ classValidator.IsNotEmpty(),
1172
+ classValidator.IsDefined()
1173
+ ], MerchantUsersExportDto.prototype, "data");
1174
+ var PartnerDocument = class {
1175
+ fullName;
1176
+ nationalId;
1177
+ type;
1178
+ };
1179
+ __decorateClass([
1180
+ classValidator.IsString(),
1181
+ classValidator.IsNotEmpty()
1182
+ ], PartnerDocument.prototype, "fullName");
1183
+ __decorateClass([
1184
+ classValidator.IsString(),
1185
+ classValidator.IsNotEmpty()
1186
+ ], PartnerDocument.prototype, "nationalId");
1187
+ __decorateClass([
1188
+ classValidator.IsString(),
1189
+ classValidator.IsNotEmpty()
1190
+ ], PartnerDocument.prototype, "type");
1191
+ var PartnerExportDto = class {
1192
+ data;
1193
+ };
1194
+ __decorateClass([
1195
+ classValidator.IsArray(),
1196
+ classValidator.ValidateNested({ each: true }),
1197
+ classTransformer.Type(() => PartnerDocument),
1198
+ classValidator.IsNotEmpty(),
1199
+ classValidator.IsDefined()
1200
+ ], PartnerExportDto.prototype, "data");
1021
1201
 
1022
1202
  // src/dtos/dto-map.ts
1023
1203
  var DocumentPayloadMap = {
@@ -1042,7 +1222,14 @@ var DocumentPayloadMap = {
1042
1222
  // elinks microservice dtos
1043
1223
  [DocumentType.INVOICES]: InvoiceExportDto,
1044
1224
  [DocumentType.INVOICE_USERS]: InvoiceUserExportDto,
1045
- [DocumentType.INVOICE_BULK_INVALID]: InvoiceBulkInvalidExportDto
1225
+ [DocumentType.INVOICE_BULK_INVALID]: InvoiceBulkInvalidExportDto,
1226
+ // auth microservice dtos
1227
+ [DocumentType.INTERNAL_USERS]: InternalUsersExportDto,
1228
+ // merchant microservice dtos
1229
+ [DocumentType.MERCHANT_USERS]: MerchantUsersExportDto,
1230
+ [DocumentType.BLACKLIST_INVALID]: BlackListInvalidExportDto,
1231
+ [DocumentType.BLACKLIST]: BlackListExportDto,
1232
+ [DocumentType.PARTNERS]: PartnerExportDto
1046
1233
  };
1047
1234
 
1048
1235
  // src/validators/document-validator.ts
@@ -1360,6 +1547,8 @@ var DocumentPathResponseDto = class {
1360
1547
  }
1361
1548
  };
1362
1549
 
1550
+ exports.BlackListExportDto = BlackListExportDto;
1551
+ exports.BlackListInvalidExportDto = BlackListInvalidExportDto;
1363
1552
  exports.DateRangeExportDto = DateRangeExportDto;
1364
1553
  exports.DocumentError = DocumentError;
1365
1554
  exports.DocumentExportClient = DocumentExportClient;
@@ -1373,11 +1562,14 @@ exports.DocumentValidationError = DocumentValidationError;
1373
1562
  exports.DocumentValidator = DocumentValidator;
1374
1563
  exports.ExceptionExportDto = ExceptionExportDto;
1375
1564
  exports.FileFormat = FileFormat;
1565
+ exports.InternalUsersExportDto = InternalUsersExportDto;
1376
1566
  exports.InvoiceBulkInvalidExportDto = InvoiceBulkInvalidExportDto;
1377
1567
  exports.InvoiceExportDto = InvoiceExportDto;
1378
1568
  exports.InvoiceHistoryExportDto = InvoiceHistoryExportDto;
1379
1569
  exports.InvoiceUserExportDto = InvoiceUserExportDto;
1380
1570
  exports.MerchantDetailsHeaderExportDto = MerchantDetailsHeaderExportDto;
1571
+ exports.MerchantUsersExportDto = MerchantUsersExportDto;
1572
+ exports.PartnerExportDto = PartnerExportDto;
1381
1573
  exports.PaymentMethodsExportDto = PaymentMethodsExportDto;
1382
1574
  exports.PayoutsExportDto = PayoutsExportDto;
1383
1575
  exports.ProfitFeesExportDto = ProfitFeesExportDto;