@mody-park-cha-raja/finance_common 4.29.1-beta.2 → 4.29.1-beta.3

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
@@ -14,6 +14,12 @@ declare const FLAT_NUMBERS: readonly string[];
14
14
  declare const FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
15
15
  /** @deprecated Use FlatEntity from the database instead. Kept for migration reference. */
16
16
  declare const WINGS: readonly string[];
17
+ /**
18
+ * All single-letter wing alphabets (A–Z) available for Flat entity creation.
19
+ * Unlike the deprecated static WINGS (A–I seed), this covers every letter the
20
+ * FLAT_WING_PATTERN accepts, so new societies are not limited to the seeded set.
21
+ */
22
+ declare const WING_ALPHABETS: readonly string[];
17
23
 
18
24
  declare enum ConfigurationKey {
19
25
  OPENING_BALANCE = "opening_balance",
@@ -321,7 +327,7 @@ interface FlatOption {
321
327
  label: string;
322
328
  value: string;
323
329
  }
324
- declare class FlatModel {
330
+ declare class FlatModel extends BaseEntityModel implements IFlatEntity {
325
331
  id: number;
326
332
  wing: string;
327
333
  unitNumber: string;
@@ -339,6 +345,8 @@ declare class FlatModel {
339
345
  static readonly FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
340
346
  static readonly SPECIAL_FLATS: readonly string[];
341
347
  static readonly WINGS: readonly string[];
348
+ /** A–Z — every single-letter wing available for Flat entity creation. */
349
+ static readonly WING_ALPHABETS: readonly string[];
342
350
  static getDonationYear(): number;
343
351
  static getTotalFlats(): number;
344
352
  static getWingsFromFlats(flats: ReadonlyArray<{
@@ -1068,4 +1076,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
1068
1076
  declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
1069
1077
  declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
1070
1078
 
1071
- 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_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, 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 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, VendorHistoryModel, VendorModel, VendorType, WINGS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
1079
+ 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_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, 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 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, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
package/dist/index.d.ts CHANGED
@@ -14,6 +14,12 @@ declare const FLAT_NUMBERS: readonly string[];
14
14
  declare const FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
15
15
  /** @deprecated Use FlatEntity from the database instead. Kept for migration reference. */
16
16
  declare const WINGS: readonly string[];
17
+ /**
18
+ * All single-letter wing alphabets (A–Z) available for Flat entity creation.
19
+ * Unlike the deprecated static WINGS (A–I seed), this covers every letter the
20
+ * FLAT_WING_PATTERN accepts, so new societies are not limited to the seeded set.
21
+ */
22
+ declare const WING_ALPHABETS: readonly string[];
17
23
 
18
24
  declare enum ConfigurationKey {
19
25
  OPENING_BALANCE = "opening_balance",
@@ -321,7 +327,7 @@ interface FlatOption {
321
327
  label: string;
322
328
  value: string;
323
329
  }
324
- declare class FlatModel {
330
+ declare class FlatModel extends BaseEntityModel implements IFlatEntity {
325
331
  id: number;
326
332
  wing: string;
327
333
  unitNumber: string;
@@ -339,6 +345,8 @@ declare class FlatModel {
339
345
  static readonly FLATS_BY_WING: ReadonlyMap<string, readonly string[]>;
340
346
  static readonly SPECIAL_FLATS: readonly string[];
341
347
  static readonly WINGS: readonly string[];
348
+ /** A–Z — every single-letter wing available for Flat entity creation. */
349
+ static readonly WING_ALPHABETS: readonly string[];
342
350
  static getDonationYear(): number;
343
351
  static getTotalFlats(): number;
344
352
  static getWingsFromFlats(flats: ReadonlyArray<{
@@ -1068,4 +1076,4 @@ declare function isSpecialFlatLabel(label: string): boolean;
1068
1076
  declare function getFlatValidationErrors(input: Partial<IFlatEntity>): FlatValidationError[];
1069
1077
  declare function validateFlatOrThrow(input: Partial<IFlatEntity>): void;
1070
1078
 
1071
- 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_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, 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 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, VendorHistoryModel, VendorModel, VendorType, WINGS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
1079
+ 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_NUMBERS, FLAT_UNIT_NUMBER_PATTERN, FLAT_WING_PATTERN, type FlatCollectionEntry, type FlatCollectionStatus, type FlatDonationLike, FlatHistoryModel, 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 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, VendorHistoryModel, VendorModel, VendorType, WINGS, WING_ALPHABETS, type WingCollectionDonationLike, type WingCollectionReport, type WingCollectionRow, type WingCollectionTotals, type XlsxCellAddress, type XlsxMergeRange, type XlsxSerializationType, type XlsxSheetInput, type XlsxSheetOptions, buildUserExpenseReport, buildUserExpenseWorkbook, buildWingWiseCollectionReport, buildWingWiseCollectionWorkbook, buildXlsxWorkbook, convertNumberToWords, definedValues, diffArrays, entityListEntityModelMap, epochToReadableDate, getFlatValidationErrors, getObjectDiffingKeys, getWingSelectionLabel, getWingSelectionSlug, groupBy, isSpecialFlatLabel, isValidFlatWing, roundToTwoDecimals, serializeXlsx, validateFlatOrThrow };
package/dist/index.js CHANGED
@@ -81,6 +81,7 @@ __export(index_exports, {
81
81
  VendorModel: () => VendorModel,
82
82
  VendorType: () => VendorType,
83
83
  WINGS: () => WINGS,
84
+ WING_ALPHABETS: () => WING_ALPHABETS,
84
85
  buildUserExpenseReport: () => buildUserExpenseReport,
85
86
  buildUserExpenseWorkbook: () => buildUserExpenseWorkbook,
86
87
  buildWingWiseCollectionReport: () => buildWingWiseCollectionReport,
@@ -439,6 +440,10 @@ var WINGS = (() => {
439
440
  }
440
441
  return wings;
441
442
  })();
443
+ var WING_ALPHABETS = Array.from(
444
+ { length: 26 },
445
+ (_, i) => String.fromCharCode(65 + i)
446
+ );
442
447
 
443
448
  // src/enums/configuration-key.enum.ts
444
449
  var ConfigurationKey = /* @__PURE__ */ ((ConfigurationKey2) => {
@@ -1091,8 +1096,9 @@ function convertNumberToWords(num) {
1091
1096
  }
1092
1097
 
1093
1098
  // src/models/flat.entity.model.ts
1094
- var _FlatModel = class _FlatModel {
1099
+ var _FlatModel = class _FlatModel extends BaseEntityModel {
1095
1100
  constructor() {
1101
+ super(...arguments);
1096
1102
  this.id = 0;
1097
1103
  this.wing = "";
1098
1104
  this.unitNumber = "";
@@ -1128,7 +1134,10 @@ var _FlatModel = class _FlatModel {
1128
1134
  static getFlatOptionsFromFlats(flats, wing) {
1129
1135
  const specials = _FlatModel.getSpecialsFromFlats(flats);
1130
1136
  return [
1131
- ...flats.filter((f) => f.wing === wing).map((f) => ({ label: `${wing}-${f.unitNumber}`, value: f.unitNumber })),
1137
+ ...flats.filter((f) => f.wing === wing).map((f) => ({
1138
+ label: `${wing}-${f.unitNumber}`,
1139
+ value: f.unitNumber
1140
+ })),
1132
1141
  ...specials.map((label) => ({ label, value: label }))
1133
1142
  ];
1134
1143
  }
@@ -1240,6 +1249,8 @@ _FlatModel.FLAT_NUMBERS = FLAT_NUMBERS;
1240
1249
  _FlatModel.FLATS_BY_WING = FLATS_BY_WING;
1241
1250
  _FlatModel.SPECIAL_FLATS = SPECIAL_FLATS;
1242
1251
  _FlatModel.WINGS = WINGS;
1252
+ /** A–Z — every single-letter wing available for Flat entity creation. */
1253
+ _FlatModel.WING_ALPHABETS = WING_ALPHABETS;
1243
1254
  var FlatModel = _FlatModel;
1244
1255
 
1245
1256
  // src/models/sponsor-history.entity.model.ts
@@ -2219,6 +2230,7 @@ function validateFlatOrThrow(input) {
2219
2230
  VendorModel,
2220
2231
  VendorType,
2221
2232
  WINGS,
2233
+ WING_ALPHABETS,
2222
2234
  buildUserExpenseReport,
2223
2235
  buildUserExpenseWorkbook,
2224
2236
  buildWingWiseCollectionReport,