@mody-park-cha-raja/finance_common 4.35.0 → 4.35.1-beta.1
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 +85 -49
- package/dist/index.d.ts +85 -49
- package/dist/index.js +96 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +95 -60
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -104,6 +104,22 @@ interface IAuditColumnEntity {
|
|
|
104
104
|
updatedBy: number;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
interface IDtoValidationError {
|
|
108
|
+
key: string;
|
|
109
|
+
message: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type Nullable<T> = T | null;
|
|
113
|
+
|
|
114
|
+
interface IAartiEntity extends IAuditColumnEntity {
|
|
115
|
+
id: number;
|
|
116
|
+
titleEN: string;
|
|
117
|
+
titleMR: string;
|
|
118
|
+
englishVersion: string;
|
|
119
|
+
hindiVersion: string;
|
|
120
|
+
displayOrder?: Nullable<number>;
|
|
121
|
+
}
|
|
122
|
+
|
|
107
123
|
interface IConfigurationEntity extends IAuditColumnEntity {
|
|
108
124
|
id: number;
|
|
109
125
|
key: string;
|
|
@@ -166,13 +182,6 @@ interface IExpenseEntity extends IAuditColumnEntity {
|
|
|
166
182
|
interface IFlatHistoryEntity extends IBaseHistoryEntity {
|
|
167
183
|
}
|
|
168
184
|
|
|
169
|
-
interface IDtoValidationError {
|
|
170
|
-
key: string;
|
|
171
|
-
message: string;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
type Nullable<T> = T | null;
|
|
175
|
-
|
|
176
185
|
/**
|
|
177
186
|
* Utility class for validating date codes in `YYYYMMDD` format.
|
|
178
187
|
*
|
|
@@ -212,11 +221,6 @@ declare class DateUtil {
|
|
|
212
221
|
static isFuture(epoch: number): boolean;
|
|
213
222
|
}
|
|
214
223
|
|
|
215
|
-
declare abstract class BaseEntityModel {
|
|
216
|
-
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
217
|
-
populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
224
|
interface ICashBookEntry {
|
|
221
225
|
date: string;
|
|
222
226
|
particulars: string;
|
|
@@ -308,18 +312,9 @@ interface IVendorBillEntity extends IAuditColumnEntity {
|
|
|
308
312
|
status?: EntityStatus;
|
|
309
313
|
}
|
|
310
314
|
|
|
311
|
-
declare class
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
data: string;
|
|
315
|
-
operation: EntityHistoryOperation;
|
|
316
|
-
createdOn: number;
|
|
317
|
-
updatedOn: number;
|
|
318
|
-
createdBy: number;
|
|
319
|
-
updatedBy: number;
|
|
320
|
-
protected constructor();
|
|
321
|
-
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
|
|
322
|
-
static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
|
|
315
|
+
declare abstract class BaseEntityModel {
|
|
316
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
317
|
+
populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
|
|
323
318
|
}
|
|
324
319
|
|
|
325
320
|
declare class UserModel extends BaseEntityModel implements IUserEntity {
|
|
@@ -340,6 +335,54 @@ declare class UserModel extends BaseEntityModel implements IUserEntity {
|
|
|
340
335
|
static populateFromEntity(entity: IUserEntity): UserModel;
|
|
341
336
|
}
|
|
342
337
|
|
|
338
|
+
declare class AartiModel extends BaseEntityModel implements IAartiEntity {
|
|
339
|
+
id: number;
|
|
340
|
+
titleEN: string;
|
|
341
|
+
titleMR: string;
|
|
342
|
+
englishVersion: string;
|
|
343
|
+
hindiVersion: string;
|
|
344
|
+
displayOrder?: Nullable<number>;
|
|
345
|
+
createdOn: number;
|
|
346
|
+
updatedOn: number;
|
|
347
|
+
createdBy: number;
|
|
348
|
+
updatedBy: number;
|
|
349
|
+
protected constructor();
|
|
350
|
+
static populateFromEntity(entity: IAartiEntity): AartiModel;
|
|
351
|
+
createdByUser?: UserModel;
|
|
352
|
+
updatedByUser?: UserModel;
|
|
353
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
declare class ConfigurationModel extends BaseEntityModel implements IConfigurationEntity {
|
|
357
|
+
id: number;
|
|
358
|
+
key: string;
|
|
359
|
+
value: string;
|
|
360
|
+
type: ConfigurationType;
|
|
361
|
+
label: string;
|
|
362
|
+
createdOn: number;
|
|
363
|
+
updatedOn: number;
|
|
364
|
+
createdBy: number;
|
|
365
|
+
updatedBy: number;
|
|
366
|
+
protected constructor();
|
|
367
|
+
static populateFromEntity(entity: IConfigurationEntity): ConfigurationModel;
|
|
368
|
+
static fallBackPageSize(): number;
|
|
369
|
+
static defaultFallBackPageSize(): number;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
|
|
373
|
+
id: number;
|
|
374
|
+
entityId: number;
|
|
375
|
+
data: string;
|
|
376
|
+
operation: EntityHistoryOperation;
|
|
377
|
+
createdOn: number;
|
|
378
|
+
updatedOn: number;
|
|
379
|
+
createdBy: number;
|
|
380
|
+
updatedBy: number;
|
|
381
|
+
protected constructor();
|
|
382
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
|
|
383
|
+
static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
|
|
384
|
+
}
|
|
385
|
+
|
|
343
386
|
interface FlatDonationLike {
|
|
344
387
|
flatNo: string;
|
|
345
388
|
amount: number;
|
|
@@ -733,20 +776,6 @@ declare class UserHistoryModel extends BaseEntityModel implements IUserHistoryEn
|
|
|
733
776
|
static populateFromEntity(entity: IUserHistoryEntity): UserHistoryModel;
|
|
734
777
|
}
|
|
735
778
|
|
|
736
|
-
declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
|
|
737
|
-
id: number;
|
|
738
|
-
entityId: number;
|
|
739
|
-
data: string;
|
|
740
|
-
operation: EntityHistoryOperation;
|
|
741
|
-
createdOn: number;
|
|
742
|
-
updatedOn: number;
|
|
743
|
-
createdBy: number;
|
|
744
|
-
updatedBy: number;
|
|
745
|
-
protected constructor();
|
|
746
|
-
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
|
|
747
|
-
static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
779
|
declare class VendorBillHistoryModel extends BaseEntityModel implements IVendorBillHistoryEntity {
|
|
751
780
|
id: number;
|
|
752
781
|
entityId: number;
|
|
@@ -761,23 +790,22 @@ declare class VendorBillHistoryModel extends BaseEntityModel implements IVendorB
|
|
|
761
790
|
static populateFromEntity(entity: IVendorBillHistoryEntity): VendorBillHistoryModel;
|
|
762
791
|
}
|
|
763
792
|
|
|
764
|
-
declare class
|
|
793
|
+
declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
|
|
765
794
|
id: number;
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
label: string;
|
|
795
|
+
entityId: number;
|
|
796
|
+
data: string;
|
|
797
|
+
operation: EntityHistoryOperation;
|
|
770
798
|
createdOn: number;
|
|
771
799
|
updatedOn: number;
|
|
772
800
|
createdBy: number;
|
|
773
801
|
updatedBy: number;
|
|
774
802
|
protected constructor();
|
|
775
|
-
static
|
|
776
|
-
static
|
|
777
|
-
static defaultFallBackPageSize(): number;
|
|
803
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
|
|
804
|
+
static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
|
|
778
805
|
}
|
|
779
806
|
|
|
780
807
|
declare const entityListEntityModelMap: {
|
|
808
|
+
aarti: typeof AartiModel.populateFromEntity;
|
|
781
809
|
donation: typeof DonationModel.populateFromEntity;
|
|
782
810
|
donation_history: typeof DonationHistoryModel.populateFromEntity;
|
|
783
811
|
user: typeof UserModel.populateFromEntity;
|
|
@@ -1062,6 +1090,7 @@ interface IFlatEntity extends IAuditColumnEntity {
|
|
|
1062
1090
|
declare const FLAT_DONATION_RELATION_CONFIG: IEntityFilterSearchData<EntityList.FLAT>;
|
|
1063
1091
|
|
|
1064
1092
|
declare enum EntityList {
|
|
1093
|
+
AARTI = "aarti",
|
|
1065
1094
|
DONATION = "donation",
|
|
1066
1095
|
DONATION_HISTORY = "donation_history",
|
|
1067
1096
|
USER = "user",
|
|
@@ -1082,8 +1111,8 @@ declare enum EntityList {
|
|
|
1082
1111
|
FLAT_HISTORY = "flat_history",
|
|
1083
1112
|
CONFIGURATION = "configuration"
|
|
1084
1113
|
}
|
|
1085
|
-
type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.VENDOR_BILL ? IVendorBillEntity : T extends EntityList.VENDOR_BILL_HISTORY ? IVendorBillHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
|
|
1086
|
-
type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.VENDOR_BILL ? VendorBillModel : T extends EntityList.VENDOR_BILL_HISTORY ? VendorBillHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
|
|
1114
|
+
type EntityType<T extends EntityList> = T extends EntityList.AARTI ? IAartiEntity : T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.VENDOR_BILL ? IVendorBillEntity : T extends EntityList.VENDOR_BILL_HISTORY ? IVendorBillHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
|
|
1115
|
+
type EntityModelType<T extends EntityList> = T extends EntityList.AARTI ? AartiModel : T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.VENDOR_BILL ? VendorBillModel : T extends EntityList.VENDOR_BILL_HISTORY ? VendorBillHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
|
|
1087
1116
|
type EntityListEntityModelMap = {
|
|
1088
1117
|
[T in EntityList]: EntityModelType<T>[];
|
|
1089
1118
|
};
|
|
@@ -1157,6 +1186,13 @@ declare class EntityFilterDataHelper {
|
|
|
1157
1186
|
mergeEntity<T extends EntityList>(entityName: T, savedEntity: EntityType<T>): EntityModelType<T>;
|
|
1158
1187
|
}
|
|
1159
1188
|
|
|
1189
|
+
interface IAartiCreateDto extends IEntityCreateDto<EntityType<EntityList.AARTI>> {
|
|
1190
|
+
}
|
|
1191
|
+
interface IAartiUpdateDto extends IEntityUpdateDto<EntityType<EntityList.AARTI>> {
|
|
1192
|
+
}
|
|
1193
|
+
interface IAartiSearchDto extends IEntityFilterData<EntityType<EntityList.AARTI>> {
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1160
1196
|
interface IDonationCreateDto extends IEntityCreateDto<EntityType<EntityList.DONATION>> {
|
|
1161
1197
|
}
|
|
1162
1198
|
interface IDonationUpdateDto extends IEntityUpdateDto<EntityType<EntityList.DONATION>> {
|
|
@@ -1241,4 +1277,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
|
|
|
1241
1277
|
declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
|
|
1242
1278
|
declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
|
|
1243
1279
|
|
|
1244
|
-
export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorBillCreateDto, type IVendorBillEntity, type IVendorBillHistoryEntity, type IVendorBillSearchDto, type IVendorBillUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorBillHistoryModel, VendorBillModel, VendorBillStatus, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
|
1280
|
+
export { ALL_WINGS_SELECTION, AartiModel, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAartiCreateDto, type IAartiEntity, type IAartiSearchDto, type IAartiUpdateDto, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorBillCreateDto, type IVendorBillEntity, type IVendorBillHistoryEntity, type IVendorBillSearchDto, type IVendorBillUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorBillHistoryModel, VendorBillModel, VendorBillStatus, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
package/dist/index.d.ts
CHANGED
|
@@ -104,6 +104,22 @@ interface IAuditColumnEntity {
|
|
|
104
104
|
updatedBy: number;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
interface IDtoValidationError {
|
|
108
|
+
key: string;
|
|
109
|
+
message: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type Nullable<T> = T | null;
|
|
113
|
+
|
|
114
|
+
interface IAartiEntity extends IAuditColumnEntity {
|
|
115
|
+
id: number;
|
|
116
|
+
titleEN: string;
|
|
117
|
+
titleMR: string;
|
|
118
|
+
englishVersion: string;
|
|
119
|
+
hindiVersion: string;
|
|
120
|
+
displayOrder?: Nullable<number>;
|
|
121
|
+
}
|
|
122
|
+
|
|
107
123
|
interface IConfigurationEntity extends IAuditColumnEntity {
|
|
108
124
|
id: number;
|
|
109
125
|
key: string;
|
|
@@ -166,13 +182,6 @@ interface IExpenseEntity extends IAuditColumnEntity {
|
|
|
166
182
|
interface IFlatHistoryEntity extends IBaseHistoryEntity {
|
|
167
183
|
}
|
|
168
184
|
|
|
169
|
-
interface IDtoValidationError {
|
|
170
|
-
key: string;
|
|
171
|
-
message: string;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
type Nullable<T> = T | null;
|
|
175
|
-
|
|
176
185
|
/**
|
|
177
186
|
* Utility class for validating date codes in `YYYYMMDD` format.
|
|
178
187
|
*
|
|
@@ -212,11 +221,6 @@ declare class DateUtil {
|
|
|
212
221
|
static isFuture(epoch: number): boolean;
|
|
213
222
|
}
|
|
214
223
|
|
|
215
|
-
declare abstract class BaseEntityModel {
|
|
216
|
-
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
217
|
-
populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
224
|
interface ICashBookEntry {
|
|
221
225
|
date: string;
|
|
222
226
|
particulars: string;
|
|
@@ -308,18 +312,9 @@ interface IVendorBillEntity extends IAuditColumnEntity {
|
|
|
308
312
|
status?: EntityStatus;
|
|
309
313
|
}
|
|
310
314
|
|
|
311
|
-
declare class
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
data: string;
|
|
315
|
-
operation: EntityHistoryOperation;
|
|
316
|
-
createdOn: number;
|
|
317
|
-
updatedOn: number;
|
|
318
|
-
createdBy: number;
|
|
319
|
-
updatedBy: number;
|
|
320
|
-
protected constructor();
|
|
321
|
-
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
|
|
322
|
-
static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
|
|
315
|
+
declare abstract class BaseEntityModel {
|
|
316
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
317
|
+
populateRelations(searchResponse: ISearchV2Response, visited?: Set<string>): this;
|
|
323
318
|
}
|
|
324
319
|
|
|
325
320
|
declare class UserModel extends BaseEntityModel implements IUserEntity {
|
|
@@ -340,6 +335,54 @@ declare class UserModel extends BaseEntityModel implements IUserEntity {
|
|
|
340
335
|
static populateFromEntity(entity: IUserEntity): UserModel;
|
|
341
336
|
}
|
|
342
337
|
|
|
338
|
+
declare class AartiModel extends BaseEntityModel implements IAartiEntity {
|
|
339
|
+
id: number;
|
|
340
|
+
titleEN: string;
|
|
341
|
+
titleMR: string;
|
|
342
|
+
englishVersion: string;
|
|
343
|
+
hindiVersion: string;
|
|
344
|
+
displayOrder?: Nullable<number>;
|
|
345
|
+
createdOn: number;
|
|
346
|
+
updatedOn: number;
|
|
347
|
+
createdBy: number;
|
|
348
|
+
updatedBy: number;
|
|
349
|
+
protected constructor();
|
|
350
|
+
static populateFromEntity(entity: IAartiEntity): AartiModel;
|
|
351
|
+
createdByUser?: UserModel;
|
|
352
|
+
updatedByUser?: UserModel;
|
|
353
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList>>>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
declare class ConfigurationModel extends BaseEntityModel implements IConfigurationEntity {
|
|
357
|
+
id: number;
|
|
358
|
+
key: string;
|
|
359
|
+
value: string;
|
|
360
|
+
type: ConfigurationType;
|
|
361
|
+
label: string;
|
|
362
|
+
createdOn: number;
|
|
363
|
+
updatedOn: number;
|
|
364
|
+
createdBy: number;
|
|
365
|
+
updatedBy: number;
|
|
366
|
+
protected constructor();
|
|
367
|
+
static populateFromEntity(entity: IConfigurationEntity): ConfigurationModel;
|
|
368
|
+
static fallBackPageSize(): number;
|
|
369
|
+
static defaultFallBackPageSize(): number;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
declare class DonationHistoryModel extends BaseEntityModel implements IDonationHistoryEntity {
|
|
373
|
+
id: number;
|
|
374
|
+
entityId: number;
|
|
375
|
+
data: string;
|
|
376
|
+
operation: EntityHistoryOperation;
|
|
377
|
+
createdOn: number;
|
|
378
|
+
updatedOn: number;
|
|
379
|
+
createdBy: number;
|
|
380
|
+
updatedBy: number;
|
|
381
|
+
protected constructor();
|
|
382
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.DONATION_HISTORY>>>;
|
|
383
|
+
static populateFromEntity(entity: IDonationHistoryEntity): DonationHistoryModel;
|
|
384
|
+
}
|
|
385
|
+
|
|
343
386
|
interface FlatDonationLike {
|
|
344
387
|
flatNo: string;
|
|
345
388
|
amount: number;
|
|
@@ -733,20 +776,6 @@ declare class UserHistoryModel extends BaseEntityModel implements IUserHistoryEn
|
|
|
733
776
|
static populateFromEntity(entity: IUserHistoryEntity): UserHistoryModel;
|
|
734
777
|
}
|
|
735
778
|
|
|
736
|
-
declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
|
|
737
|
-
id: number;
|
|
738
|
-
entityId: number;
|
|
739
|
-
data: string;
|
|
740
|
-
operation: EntityHistoryOperation;
|
|
741
|
-
createdOn: number;
|
|
742
|
-
updatedOn: number;
|
|
743
|
-
createdBy: number;
|
|
744
|
-
updatedBy: number;
|
|
745
|
-
protected constructor();
|
|
746
|
-
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
|
|
747
|
-
static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
779
|
declare class VendorBillHistoryModel extends BaseEntityModel implements IVendorBillHistoryEntity {
|
|
751
780
|
id: number;
|
|
752
781
|
entityId: number;
|
|
@@ -761,23 +790,22 @@ declare class VendorBillHistoryModel extends BaseEntityModel implements IVendorB
|
|
|
761
790
|
static populateFromEntity(entity: IVendorBillHistoryEntity): VendorBillHistoryModel;
|
|
762
791
|
}
|
|
763
792
|
|
|
764
|
-
declare class
|
|
793
|
+
declare class VendorHistoryModel extends BaseEntityModel implements IVendorHistoryEntity {
|
|
765
794
|
id: number;
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
label: string;
|
|
795
|
+
entityId: number;
|
|
796
|
+
data: string;
|
|
797
|
+
operation: EntityHistoryOperation;
|
|
770
798
|
createdOn: number;
|
|
771
799
|
updatedOn: number;
|
|
772
800
|
createdBy: number;
|
|
773
801
|
updatedBy: number;
|
|
774
802
|
protected constructor();
|
|
775
|
-
static
|
|
776
|
-
static
|
|
777
|
-
static defaultFallBackPageSize(): number;
|
|
803
|
+
static relations: Partial<Record<EntityList, IModelRelationConfig<EntityList.VENDOR_HISTORY>>>;
|
|
804
|
+
static populateFromEntity(entity: IVendorHistoryEntity): VendorHistoryModel;
|
|
778
805
|
}
|
|
779
806
|
|
|
780
807
|
declare const entityListEntityModelMap: {
|
|
808
|
+
aarti: typeof AartiModel.populateFromEntity;
|
|
781
809
|
donation: typeof DonationModel.populateFromEntity;
|
|
782
810
|
donation_history: typeof DonationHistoryModel.populateFromEntity;
|
|
783
811
|
user: typeof UserModel.populateFromEntity;
|
|
@@ -1062,6 +1090,7 @@ interface IFlatEntity extends IAuditColumnEntity {
|
|
|
1062
1090
|
declare const FLAT_DONATION_RELATION_CONFIG: IEntityFilterSearchData<EntityList.FLAT>;
|
|
1063
1091
|
|
|
1064
1092
|
declare enum EntityList {
|
|
1093
|
+
AARTI = "aarti",
|
|
1065
1094
|
DONATION = "donation",
|
|
1066
1095
|
DONATION_HISTORY = "donation_history",
|
|
1067
1096
|
USER = "user",
|
|
@@ -1082,8 +1111,8 @@ declare enum EntityList {
|
|
|
1082
1111
|
FLAT_HISTORY = "flat_history",
|
|
1083
1112
|
CONFIGURATION = "configuration"
|
|
1084
1113
|
}
|
|
1085
|
-
type EntityType<T extends EntityList> = T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.VENDOR_BILL ? IVendorBillEntity : T extends EntityList.VENDOR_BILL_HISTORY ? IVendorBillHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
|
|
1086
|
-
type EntityModelType<T extends EntityList> = T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.VENDOR_BILL ? VendorBillModel : T extends EntityList.VENDOR_BILL_HISTORY ? VendorBillHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
|
|
1114
|
+
type EntityType<T extends EntityList> = T extends EntityList.AARTI ? IAartiEntity : T extends EntityList.DONATION ? IDonationEntity : T extends EntityList.DONATION_HISTORY ? IDonationHistoryEntity : T extends EntityList.USER ? IUserEntity : T extends EntityList.USER_HISTORY ? IUserHistoryEntity : T extends EntityList.EXPENSE ? IExpenseEntity : T extends EntityList.EXPENSE_HISTORY ? IExpenseHistoryEntity : T extends EntityList.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityList.EXPENSE_HEAD_HISTORY ? IExpenseHeadHistoryEntity : T extends EntityList.VENDOR ? IVendorEntity : T extends EntityList.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityList.VENDOR_BILL ? IVendorBillEntity : T extends EntityList.VENDOR_BILL_HISTORY ? IVendorBillHistoryEntity : T extends EntityList.TRANSACTION ? ITransactionEntity : T extends EntityList.TRANSACTION_HISTORY ? ITransactionHistoryEntity : T extends EntityList.SPONSOR ? ISponsorEntity : T extends EntityList.SPONSOR_HISTORY ? ISponsorHistoryEntity : T extends EntityList.FLAT ? IFlatEntity : T extends EntityList.FLAT_HISTORY ? IFlatHistoryEntity : T extends EntityList.CONFIGURATION ? IConfigurationEntity : never;
|
|
1115
|
+
type EntityModelType<T extends EntityList> = T extends EntityList.AARTI ? AartiModel : T extends EntityList.DONATION ? DonationModel : T extends EntityList.DONATION_HISTORY ? DonationHistoryModel : T extends EntityList.USER ? UserModel : T extends EntityList.USER_HISTORY ? UserHistoryModel : T extends EntityList.EXPENSE ? ExpenseModel : T extends EntityList.EXPENSE_HISTORY ? ExpenseHistoryModel : T extends EntityList.EXPENSE_HEAD ? ExpenseHeadModel : T extends EntityList.EXPENSE_HEAD_HISTORY ? ExpenseHeadHistoryModel : T extends EntityList.VENDOR ? VendorModel : T extends EntityList.VENDOR_HISTORY ? VendorHistoryModel : T extends EntityList.VENDOR_BILL ? VendorBillModel : T extends EntityList.VENDOR_BILL_HISTORY ? VendorBillHistoryModel : T extends EntityList.TRANSACTION ? TransactionModel : T extends EntityList.TRANSACTION_HISTORY ? TransactionHistoryModel : T extends EntityList.SPONSOR ? SponsorModel : T extends EntityList.SPONSOR_HISTORY ? SponsorHistoryModel : T extends EntityList.FLAT ? FlatModel : T extends EntityList.FLAT_HISTORY ? FlatHistoryModel : T extends EntityList.CONFIGURATION ? ConfigurationModel : never;
|
|
1087
1116
|
type EntityListEntityModelMap = {
|
|
1088
1117
|
[T in EntityList]: EntityModelType<T>[];
|
|
1089
1118
|
};
|
|
@@ -1157,6 +1186,13 @@ declare class EntityFilterDataHelper {
|
|
|
1157
1186
|
mergeEntity<T extends EntityList>(entityName: T, savedEntity: EntityType<T>): EntityModelType<T>;
|
|
1158
1187
|
}
|
|
1159
1188
|
|
|
1189
|
+
interface IAartiCreateDto extends IEntityCreateDto<EntityType<EntityList.AARTI>> {
|
|
1190
|
+
}
|
|
1191
|
+
interface IAartiUpdateDto extends IEntityUpdateDto<EntityType<EntityList.AARTI>> {
|
|
1192
|
+
}
|
|
1193
|
+
interface IAartiSearchDto extends IEntityFilterData<EntityType<EntityList.AARTI>> {
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1160
1196
|
interface IDonationCreateDto extends IEntityCreateDto<EntityType<EntityList.DONATION>> {
|
|
1161
1197
|
}
|
|
1162
1198
|
interface IDonationUpdateDto extends IEntityUpdateDto<EntityType<EntityList.DONATION>> {
|
|
@@ -1241,4 +1277,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
|
|
|
1241
1277
|
declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
|
|
1242
1278
|
declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
|
|
1243
1279
|
|
|
1244
|
-
export { ALL_WINGS_SELECTION, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorBillCreateDto, type IVendorBillEntity, type IVendorBillHistoryEntity, type IVendorBillSearchDto, type IVendorBillUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorBillHistoryModel, VendorBillModel, VendorBillStatus, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
|
1280
|
+
export { ALL_WINGS_SELECTION, AartiModel, BadRequestException, BaseEntityModel, ConfigurationKey, ConfigurationModel, ConfigurationType, DateCodeUtils, DateUtil, DonationHistoryModel, DonationModel, EntityFilterDataHelper, EntityHistoryOperation, EntityList, type EntityListEntityModelMap, type EntityModelType, EntityStatus, type EntityType, ExpenseHeadHistoryModel, ExpenseHeadModel, ExpenseHistoryModel, ExpenseModel, FLATS_BY_WING, FLAT_DONATION_RELATION_CONFIG, FLAT_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, type FlatIdDonationLike, FlatModel, type FlatOption, type FlatParseResult, type FlatValidationError, ForbiddenException, HttpException, type IAartiCreateDto, type IAartiEntity, type IAartiSearchDto, type IAartiUpdateDto, type IAuditColumnEntity, type IBaseHistoryEntity, type ICashBookEntry, type IConfigurationCreateDto, type IConfigurationEntity, type IConfigurationSearchDto, type IConfigurationUpdateDto, type IDonationCreateDto, type IDonationEntity, type IDonationHistoryEntity, type IDonationSearchDto, type IDonationUpdateDto, type IDtoValidationError, type IEntityCreateDto, type IEntityFilterData, type IEntityFilterSearchData, type IEntityFilterSearchDataV2, type IEntityUpdateDto, type IExpenseCreateDto, type IExpenseEntity, type IExpenseHeadCreateDto, type IExpenseHeadEntity, type IExpenseHeadHistoryEntity, type IExpenseHeadSearchDto, type IExpenseHeadUpdateDto, type IExpenseHistoryEntity, type IExpenseSearchDto, type IExpenseUpdateDto, type IFlatCreateDto, type IFlatEntity, type IFlatHistoryEntity, type IFlatSearchDto, type IFlatUpdateDto, type IMappingPropertyEntry, type IModelRelationConfig, type ISearchV2Response, type ISponsorCreateDto, type ISponsorEntity, type ISponsorHistoryEntity, type ISponsorSearchDto, type ISponsorUpdateDto, type ITransactionCreateDto, type ITransactionEntity, type ITransactionHistoryEntity, type ITransactionSearchDto, type ITransactionUpdateDto, type IUserCreateDto, type IUserEntity, type IUserHistoryEntity, type IUserSearchDto, type IUserUpdateDto, type IVendorBillCreateDto, type IVendorBillEntity, type IVendorBillHistoryEntity, type IVendorBillSearchDto, type IVendorBillUpdateDto, type IVendorCreateDto, type IVendorEntity, type IVendorHistoryEntity, type IVendorSearchDto, type IVendorUpdateDto, NotFoundException, type Nullable, OrderByDirection, PAYMENT_OPTIONS, PaymentType, ReferenceIdPrefix, RelationType, SHOP_UNIT_NUMBER_PATTERN, SHOP_WING, SPECIAL_FLATS, SPECIAL_FLAT_LABELS, SponsorHistoryModel, SponsorModel, SponsorTier, TransactionEntityType, TransactionHistoryModel, TransactionModel, TransactionType, USER_RELATION_CONFIG, UnauthorizedException, type UserExpenseReport, type UserExpenseReportTotals, type UserExpenseRow, UserHistoryModel, UserModel, VendorBillHistoryModel, VendorBillModel, VendorBillStatus, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationByIdLike, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionReportByFlatId, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
ALL_WINGS_SELECTION: () => ALL_WINGS_SELECTION,
|
|
34
|
+
AartiModel: () => AartiModel,
|
|
34
35
|
BadRequestException: () => BadRequestException,
|
|
35
36
|
BaseEntityModel: () => BaseEntityModel,
|
|
36
37
|
ConfigurationKey: () => ConfigurationKey,
|
|
@@ -771,6 +772,63 @@ var BaseEntityModel = class {
|
|
|
771
772
|
};
|
|
772
773
|
BaseEntityModel.relations = {};
|
|
773
774
|
|
|
775
|
+
// src/models/aarti.entity.model.ts
|
|
776
|
+
var _AartiModel = class _AartiModel extends BaseEntityModel {
|
|
777
|
+
constructor() {
|
|
778
|
+
super();
|
|
779
|
+
this.id = 0;
|
|
780
|
+
this.titleEN = "";
|
|
781
|
+
this.titleMR = "";
|
|
782
|
+
this.englishVersion = "";
|
|
783
|
+
this.hindiVersion = "";
|
|
784
|
+
this.displayOrder = null;
|
|
785
|
+
this.createdOn = 0;
|
|
786
|
+
this.updatedOn = 0;
|
|
787
|
+
this.createdBy = 0;
|
|
788
|
+
this.updatedBy = 0;
|
|
789
|
+
}
|
|
790
|
+
static populateFromEntity(entity) {
|
|
791
|
+
return Object.assign(new _AartiModel(), entity);
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
_AartiModel.relations = {
|
|
795
|
+
["user" /* USER */]: {
|
|
796
|
+
relationType: "ONE" /* ONE */,
|
|
797
|
+
mappingProperties: [
|
|
798
|
+
{ sourceProperty: "createdBy", targetProperty: "createdByUser" },
|
|
799
|
+
{ sourceProperty: "updatedBy", targetProperty: "updatedByUser" }
|
|
800
|
+
],
|
|
801
|
+
searchProperty: "id",
|
|
802
|
+
entity: "user" /* USER */
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
var AartiModel = _AartiModel;
|
|
806
|
+
|
|
807
|
+
// src/models/configuration.entity.model.ts
|
|
808
|
+
var ConfigurationModel = class _ConfigurationModel extends BaseEntityModel {
|
|
809
|
+
constructor() {
|
|
810
|
+
super();
|
|
811
|
+
this.id = 0;
|
|
812
|
+
this.key = "";
|
|
813
|
+
this.value = "";
|
|
814
|
+
this.type = "string" /* STRING */;
|
|
815
|
+
this.label = "";
|
|
816
|
+
this.createdOn = 0;
|
|
817
|
+
this.updatedOn = 0;
|
|
818
|
+
this.createdBy = 0;
|
|
819
|
+
this.updatedBy = 0;
|
|
820
|
+
}
|
|
821
|
+
static populateFromEntity(entity) {
|
|
822
|
+
return Object.assign(new _ConfigurationModel(), entity);
|
|
823
|
+
}
|
|
824
|
+
static fallBackPageSize() {
|
|
825
|
+
return this.defaultFallBackPageSize();
|
|
826
|
+
}
|
|
827
|
+
static defaultFallBackPageSize() {
|
|
828
|
+
return 50;
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
|
|
774
832
|
// src/models/donation-history.entity.model.ts
|
|
775
833
|
var _DonationHistoryModel = class _DonationHistoryModel extends BaseEntityModel {
|
|
776
834
|
constructor() {
|
|
@@ -1524,55 +1582,6 @@ var _UserModel = class _UserModel extends BaseEntityModel {
|
|
|
1524
1582
|
_UserModel._superAdminEmail = "";
|
|
1525
1583
|
var UserModel = _UserModel;
|
|
1526
1584
|
|
|
1527
|
-
// src/models/vendor-history.entity.model.ts
|
|
1528
|
-
var _VendorHistoryModel = class _VendorHistoryModel extends BaseEntityModel {
|
|
1529
|
-
constructor() {
|
|
1530
|
-
super();
|
|
1531
|
-
this.id = 0;
|
|
1532
|
-
this.entityId = 0;
|
|
1533
|
-
this.data = "";
|
|
1534
|
-
this.operation = "CREATE" /* CREATE */;
|
|
1535
|
-
this.createdOn = 0;
|
|
1536
|
-
this.updatedOn = 0;
|
|
1537
|
-
this.createdBy = 0;
|
|
1538
|
-
this.updatedBy = 0;
|
|
1539
|
-
}
|
|
1540
|
-
static populateFromEntity(entity) {
|
|
1541
|
-
return Object.assign(new _VendorHistoryModel(), entity);
|
|
1542
|
-
}
|
|
1543
|
-
};
|
|
1544
|
-
_VendorHistoryModel.relations = {};
|
|
1545
|
-
var VendorHistoryModel = _VendorHistoryModel;
|
|
1546
|
-
|
|
1547
|
-
// src/models/vendor.entity.model.ts
|
|
1548
|
-
var _VendorModel = class _VendorModel extends BaseEntityModel {
|
|
1549
|
-
constructor() {
|
|
1550
|
-
super();
|
|
1551
|
-
this.id = 0;
|
|
1552
|
-
this.name = "";
|
|
1553
|
-
this.type = "";
|
|
1554
|
-
this.createdOn = 0;
|
|
1555
|
-
this.updatedOn = 0;
|
|
1556
|
-
this.createdBy = 0;
|
|
1557
|
-
this.updatedBy = 0;
|
|
1558
|
-
}
|
|
1559
|
-
static populateFromEntity(entity) {
|
|
1560
|
-
return Object.assign(new _VendorModel(), entity);
|
|
1561
|
-
}
|
|
1562
|
-
};
|
|
1563
|
-
_VendorModel.relations = {
|
|
1564
|
-
["user" /* USER */]: {
|
|
1565
|
-
relationType: "ONE" /* ONE */,
|
|
1566
|
-
mappingProperties: [
|
|
1567
|
-
{ sourceProperty: "createdBy", targetProperty: "createdByUser" },
|
|
1568
|
-
{ sourceProperty: "updatedBy", targetProperty: "updatedByUser" }
|
|
1569
|
-
],
|
|
1570
|
-
searchProperty: "id",
|
|
1571
|
-
entity: "user" /* USER */
|
|
1572
|
-
}
|
|
1573
|
-
};
|
|
1574
|
-
var VendorModel = _VendorModel;
|
|
1575
|
-
|
|
1576
1585
|
// src/models/vendor-bill-history.entity.model.ts
|
|
1577
1586
|
var _VendorBillHistoryModel = class _VendorBillHistoryModel extends BaseEntityModel {
|
|
1578
1587
|
constructor() {
|
|
@@ -1659,33 +1668,58 @@ _VendorBillModel.relations = {
|
|
|
1659
1668
|
};
|
|
1660
1669
|
var VendorBillModel = _VendorBillModel;
|
|
1661
1670
|
|
|
1662
|
-
// src/models/
|
|
1663
|
-
var
|
|
1671
|
+
// src/models/vendor-history.entity.model.ts
|
|
1672
|
+
var _VendorHistoryModel = class _VendorHistoryModel extends BaseEntityModel {
|
|
1664
1673
|
constructor() {
|
|
1665
1674
|
super();
|
|
1666
1675
|
this.id = 0;
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
this.
|
|
1670
|
-
this.label = "";
|
|
1676
|
+
this.entityId = 0;
|
|
1677
|
+
this.data = "";
|
|
1678
|
+
this.operation = "CREATE" /* CREATE */;
|
|
1671
1679
|
this.createdOn = 0;
|
|
1672
1680
|
this.updatedOn = 0;
|
|
1673
1681
|
this.createdBy = 0;
|
|
1674
1682
|
this.updatedBy = 0;
|
|
1675
1683
|
}
|
|
1676
1684
|
static populateFromEntity(entity) {
|
|
1677
|
-
return Object.assign(new
|
|
1685
|
+
return Object.assign(new _VendorHistoryModel(), entity);
|
|
1678
1686
|
}
|
|
1679
|
-
|
|
1680
|
-
|
|
1687
|
+
};
|
|
1688
|
+
_VendorHistoryModel.relations = {};
|
|
1689
|
+
var VendorHistoryModel = _VendorHistoryModel;
|
|
1690
|
+
|
|
1691
|
+
// src/models/vendor.entity.model.ts
|
|
1692
|
+
var _VendorModel = class _VendorModel extends BaseEntityModel {
|
|
1693
|
+
constructor() {
|
|
1694
|
+
super();
|
|
1695
|
+
this.id = 0;
|
|
1696
|
+
this.name = "";
|
|
1697
|
+
this.type = "";
|
|
1698
|
+
this.createdOn = 0;
|
|
1699
|
+
this.updatedOn = 0;
|
|
1700
|
+
this.createdBy = 0;
|
|
1701
|
+
this.updatedBy = 0;
|
|
1681
1702
|
}
|
|
1682
|
-
static
|
|
1683
|
-
return
|
|
1703
|
+
static populateFromEntity(entity) {
|
|
1704
|
+
return Object.assign(new _VendorModel(), entity);
|
|
1684
1705
|
}
|
|
1685
1706
|
};
|
|
1707
|
+
_VendorModel.relations = {
|
|
1708
|
+
["user" /* USER */]: {
|
|
1709
|
+
relationType: "ONE" /* ONE */,
|
|
1710
|
+
mappingProperties: [
|
|
1711
|
+
{ sourceProperty: "createdBy", targetProperty: "createdByUser" },
|
|
1712
|
+
{ sourceProperty: "updatedBy", targetProperty: "updatedByUser" }
|
|
1713
|
+
],
|
|
1714
|
+
searchProperty: "id",
|
|
1715
|
+
entity: "user" /* USER */
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
var VendorModel = _VendorModel;
|
|
1686
1719
|
|
|
1687
1720
|
// src/utils/entity.utils.ts
|
|
1688
1721
|
var EntityList = /* @__PURE__ */ ((EntityList2) => {
|
|
1722
|
+
EntityList2["AARTI"] = "aarti";
|
|
1689
1723
|
EntityList2["DONATION"] = "donation";
|
|
1690
1724
|
EntityList2["DONATION_HISTORY"] = "donation_history";
|
|
1691
1725
|
EntityList2["USER"] = "user";
|
|
@@ -1710,6 +1744,7 @@ var EntityList = /* @__PURE__ */ ((EntityList2) => {
|
|
|
1710
1744
|
|
|
1711
1745
|
// src/utils/entitiy-list-entity-model-map.ts
|
|
1712
1746
|
var entityListEntityModelMap = {
|
|
1747
|
+
["aarti" /* AARTI */]: AartiModel.populateFromEntity,
|
|
1713
1748
|
["donation" /* DONATION */]: DonationModel.populateFromEntity,
|
|
1714
1749
|
["donation_history" /* DONATION_HISTORY */]: DonationHistoryModel.populateFromEntity,
|
|
1715
1750
|
["user" /* USER */]: UserModel.populateFromEntity,
|
|
@@ -2425,6 +2460,7 @@ function validateFlatOrThrow(input) {
|
|
|
2425
2460
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2426
2461
|
0 && (module.exports = {
|
|
2427
2462
|
ALL_WINGS_SELECTION,
|
|
2463
|
+
AartiModel,
|
|
2428
2464
|
BadRequestException,
|
|
2429
2465
|
BaseEntityModel,
|
|
2430
2466
|
ConfigurationKey,
|