law-common 10.40.1-beta.6 → 10.42.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.
Files changed (25) hide show
  1. package/dist/src/api/index.d.ts +0 -2
  2. package/dist/src/api/index.js +0 -2
  3. package/dist/src/entities/index.d.ts +0 -2
  4. package/dist/src/entities/index.js +2 -2
  5. package/dist/src/entities/interface/entity.utils.interface.d.ts +3 -6
  6. package/dist/src/entities/interface/entity.utils.interface.js +0 -1
  7. package/dist/src/entities/model/entity.model.interface.d.ts +4 -6
  8. package/dist/src/entities/model/entity.model.interface.js +2 -20
  9. package/package.json +37 -36
  10. package/dist/src/api/interface/state.create.dto.interface.autocode.d.ts +0 -0
  11. package/dist/src/api/interface/state.create.dto.interface.autocode.js +0 -4
  12. package/dist/src/api/interface/state.create.dto.interface.d.ts +0 -4
  13. package/dist/src/api/interface/state.create.dto.interface.js +0 -2
  14. package/dist/src/api/interface/state.update.dto.interface.d.ts +0 -3
  15. package/dist/src/api/interface/state.update.dto.interface.js +0 -2
  16. package/dist/src/entities/enums/state_status_enum.autocode.d.ts +0 -0
  17. package/dist/src/entities/enums/state_status_enum.autocode.js +0 -6
  18. package/dist/src/entities/enums/state_status_enum.d.ts +0 -5
  19. package/dist/src/entities/enums/state_status_enum.js +0 -9
  20. package/dist/src/entities/interface/state.entity.interface.autocode.d.ts +0 -0
  21. package/dist/src/entities/interface/state.entity.interface.autocode.js +0 -7
  22. package/dist/src/entities/interface/state.entity.interface.d.ts +0 -7
  23. package/dist/src/entities/interface/state.entity.interface.js +0 -2
  24. package/dist/src/entities/model/state.entity.model.d.ts +0 -16
  25. package/dist/src/entities/model/state.entity.model.js +0 -28
@@ -52,5 +52,3 @@ export * from "./interface/address-book.create.dto.interface";
52
52
  export * from "./enums/crud.enum";
53
53
  export * from "./interface/api.utils.interface";
54
54
  export * from "./interface/address-book.update.dto.interface";
55
- export * from "./interface/state.create.dto.interface";
56
- export * from "./interface/state.update.dto.interface";
@@ -72,5 +72,3 @@ __exportStar(require("./interface/address-book.create.dto.interface"), exports);
72
72
  __exportStar(require("./enums/crud.enum"), exports);
73
73
  __exportStar(require("./interface/api.utils.interface"), exports);
74
74
  __exportStar(require("./interface/address-book.update.dto.interface"), exports);
75
- __exportStar(require("./interface/state.create.dto.interface"), exports);
76
- __exportStar(require("./interface/state.update.dto.interface"), exports);
@@ -105,5 +105,3 @@ export * from "./interface/billing-transaction-history.entity";
105
105
  export * from "./model/billing-transaction.model";
106
106
  export * from "./interface/address-book.entity.interface";
107
107
  export * from "./enums/address_book_status_enum";
108
- export * from "./interface/state.entity.interface";
109
- export * from "./enums/state_status_enum";
@@ -121,5 +121,5 @@ __exportStar(require("./interface/billing-transaction-history.entity"), exports)
121
121
  __exportStar(require("./model/billing-transaction.model"), exports);
122
122
  __exportStar(require("./interface/address-book.entity.interface"), exports);
123
123
  __exportStar(require("./enums/address_book_status_enum"), exports);
124
- __exportStar(require("./interface/state.entity.interface"), exports);
125
- __exportStar(require("./enums/state_status_enum"), exports);
124
+ // export * from "./interface/address-book.entity.interface.autocode";
125
+ // export * from "./enums/address_book_status_enum.autocode";
@@ -20,7 +20,6 @@ import { ProjectUserMappingEntityModel } from "../model/project-user-mapping.ent
20
20
  import { ProjectEntityModel } from "../model/project.entity.model";
21
21
  import { ReimbursementExpenseEntityModel } from "../model/reimbursement-expense.entity.model";
22
22
  import { ReimbursementEntityModel } from "../model/reimbursement.entity.model";
23
- import { StateEntityModel } from "../model/state.entity.model";
24
23
  import { TaskEntityModel } from "../model/task.entity.model";
25
24
  import { TimesheetEntityModel } from "../model/timesheet.entity.model";
26
25
  import { UserEntityModel } from "../model/user.entity.model";
@@ -56,7 +55,6 @@ import { IReimbursementEntity } from "./reimbursement.entity.interface";
56
55
  import { IReimbursementExpenseEntity } from "./reimbursement_expense.entity.interface";
57
56
  import { IRoleEntity } from "./role.entity.interface";
58
57
  import { IRolePermissionMappingEntity } from "./role.permission.mapping.entity.interface";
59
- import { IStateEntity } from "./state.entity.interface";
60
58
  import { ITaskEntity } from "./task.entity.interface";
61
59
  import { ITimesheetEntity } from "./timesheet.entity.interface";
62
60
  import { ITimesheetHistoryEntity } from "./timesheet_history.entity.interface";
@@ -145,8 +143,7 @@ export declare enum EntityEnum {
145
143
  HOLIDAY_LIST = "holiday_list",
146
144
  CRON_JOBS = "cron_jobs",
147
145
  TO_DO_LIST = "to_do_list",
148
- ADDRESS_BOOK = "address_book",
149
- STATE = "state"
146
+ ADDRESS_BOOK = "address_book"
150
147
  }
151
148
  export type EntityRelations = {
152
149
  [K in EntityEnum | VirtualEntityEnum]: K;
@@ -165,7 +162,7 @@ export type IBaseEntityApiResponse<T> = {
165
162
  [K in EntityEnum | VirtualEntityEnum]?: IBaseEntityApiResponse<EnumEntityType<K>>;
166
163
  };
167
164
  };
168
- export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_PAYMENT ? IBillingPaymentEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : never) & {
165
+ export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_PAYMENT ? IBillingPaymentEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : never) & {
169
166
  id: number;
170
167
  };
171
168
  export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
@@ -288,7 +285,7 @@ export declare enum VirtualEntityEnum {
288
285
  }
289
286
  export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
290
287
  export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
291
- export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : UserEntityModel;
288
+ export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : UserEntityModel;
292
289
  export type EntityMap = {
293
290
  [key in EntityEnum | VirtualEntityEnum]: EnumToModel<key>[];
294
291
  };
@@ -78,7 +78,6 @@ var EntityEnum;
78
78
  EntityEnum["CRON_JOBS"] = "cron_jobs";
79
79
  EntityEnum["TO_DO_LIST"] = "to_do_list";
80
80
  EntityEnum["ADDRESS_BOOK"] = "address_book";
81
- EntityEnum["STATE"] = "state";
82
81
  })(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
83
82
  var VirtualEntityEnum;
84
83
  (function (VirtualEntityEnum) {
@@ -22,8 +22,7 @@ export declare class EntityModelRelationHelper {
22
22
  entityMap: EntityMap;
23
23
  entityModelMap: EntityMap;
24
24
  entityModelIndexMap: EntityIndexMap;
25
- constructor(entityMap: EntityMap, init?: boolean);
26
- static getClone(entity: EntityModelRelationHelper): EntityModelRelationHelper;
25
+ constructor(entityMap: EntityMap);
27
26
  private init;
28
27
  private toEntityModelMap;
29
28
  fromEntityToEntityModel<T extends EntityEnum | VirtualEntityEnum>(entity: EnumEntityType<T>, entityEnum: T): BaseEntityModel<T>;
@@ -33,12 +32,11 @@ export declare class EntityModelRelationHelper {
33
32
  populateRelationsByEntityModel(entityModel: BaseEntityModel<EntityEnum | VirtualEntityEnum>): void;
34
33
  addEntityModel<T extends EntityEnum | VirtualEntityEnum>(entityModel: BaseEntityModel<T>, config?: {
35
34
  populateRelations?: boolean;
36
- }): EntityModelRelationHelper;
35
+ }): void;
37
36
  addEntity<T extends EntityEnum | VirtualEntityEnum>(entity: EnumEntityType<T>, entityEnum: T, config?: {
38
37
  populateRelations?: boolean;
39
- }): EntityModelRelationHelper;
38
+ }): void;
40
39
  updateEntityModel<T extends EntityEnum | VirtualEntityEnum>(entityModel: BaseEntityModel<T>, config?: {
41
40
  populateRelations?: boolean;
42
- }): EntityModelRelationHelper;
43
- deleteById(entityEnum: EntityEnum, id: number): EntityModelRelationHelper;
41
+ }): void;
44
42
  }
@@ -31,7 +31,6 @@ const user_entity_model_1 = require("./user.entity.model");
31
31
  const country_entity_model_1 = require("./country.entity.model");
32
32
  const address_book_model_1 = require("./address_book.model");
33
33
  const billing_transaction_model_1 = require("./billing-transaction.model");
34
- const state_entity_model_1 = require("./state.entity.model");
35
34
  function mapToIndex(entityMap) {
36
35
  return Object.keys(entityMap).reduce((acc, key) => {
37
36
  // @ts-ignore
@@ -81,7 +80,6 @@ exports.entityEnumToEntityModel = {
81
80
  [entity_utils_interface_1.EntityEnum.COUNTRY]: country_entity_model_1.CountryEntityModel.fromApiEntity,
82
81
  [entity_utils_interface_1.EntityEnum.ADDRESS_BOOK]: address_book_model_1.AddressBookEntityModel.fromEntity,
83
82
  [entity_utils_interface_1.EntityEnum.BILLING_TRANSACTION]: billing_transaction_model_1.BillingTransactionEntityModel.fromEntity,
84
- [entity_utils_interface_1.EntityEnum.STATE]: state_entity_model_1.StateEntityModel.fromEntity,
85
83
  };
86
84
  function entityMapToModels(entityMap) {
87
85
  for (const entityName in entityMap) {
@@ -136,18 +134,11 @@ function removeEntityById(entityIndexMap, entity, id) {
136
134
  }
137
135
  }
138
136
  class EntityModelRelationHelper {
139
- constructor(entityMap, init = true) {
137
+ constructor(entityMap) {
140
138
  this.entityMap = entityMap;
141
139
  this.entityModelMap = {};
142
140
  this.entityModelIndexMap = {};
143
- if (init)
144
- this.init();
145
- }
146
- static getClone(entity) {
147
- const clone = new EntityModelRelationHelper(entity.entityMap, false);
148
- clone.entityModelMap = Object.assign({}, entity.entityModelMap);
149
- clone.entityModelIndexMap = Object.assign({}, entity.entityModelIndexMap);
150
- return clone;
141
+ this.init();
151
142
  }
152
143
  init() {
153
144
  this.toEntityModelMap();
@@ -204,14 +195,12 @@ class EntityModelRelationHelper {
204
195
  if (config.populateRelations) {
205
196
  this.populateRelationsByEntityModel(entityModel);
206
197
  }
207
- return EntityModelRelationHelper.getClone(this);
208
198
  }
209
199
  addEntity(entity, entityEnum, config = { populateRelations: false }) {
210
200
  if (!(entityEnum in exports.entityEnumToEntityModel)) {
211
201
  throw new Error(`Unknown entity: ${entityEnum}`);
212
202
  }
213
203
  this.addEntityModel(this.fromEntityToEntityModel(entity, entityEnum), config);
214
- return EntityModelRelationHelper.getClone(this);
215
204
  }
216
205
  updateEntityModel(entityModel, config = { populateRelations: false }) {
217
206
  const entityEnum = entityModel.entityName;
@@ -221,13 +210,6 @@ class EntityModelRelationHelper {
221
210
  if (config.populateRelations) {
222
211
  this.populateRelationsByEntityModel(entityModel);
223
212
  }
224
- return EntityModelRelationHelper.getClone(this);
225
- }
226
- deleteById(entityEnum, id) {
227
- if (this.entityModelIndexMap[entityEnum]) {
228
- delete this.entityModelIndexMap[entityEnum][id];
229
- }
230
- return EntityModelRelationHelper.getClone(this);
231
213
  }
232
214
  }
233
215
  exports.EntityModelRelationHelper = EntityModelRelationHelper;
package/package.json CHANGED
@@ -1,36 +1,37 @@
1
- {
2
- "name": "law-common",
3
- "version": "10.40.1-beta.6",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "files": [
7
- "dist/**/*"
8
- ],
9
- "scripts": {
10
- "clean": "rm -rf dist",
11
- "build": "npm run clean && tsc",
12
- "publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
13
- "publish:patch": "npm version patch && git push && npm run build && npm publish",
14
- "publish:minor": "npm version minor && git push && npm run build && npm publish",
15
- "publish:major": "npm version major && git push && npm run build && npm publish",
16
- "link": "npm run build && npm link",
17
- "test": "jest"
18
- },
19
- "keywords": [],
20
- "author": "",
21
- "license": "ISC",
22
- "devDependencies": {
23
- "@types/jest": "^29.5.13",
24
- "@types/node": "^22.6.1",
25
- "jest": "^29.7.0",
26
- "ts-jest": "^29.2.5",
27
- "ts-node": "^10.9.2",
28
- "typescript": "^5.6.2"
29
- },
30
- "dependencies": {
31
- "@types/express": "^5.0.0",
32
- "@types/multer": "^1.4.12",
33
- "date-fns": "^4.1.0",
34
- "lodash": "4.17.21"
35
- }
36
- }
1
+ {
2
+ "name": "law-common",
3
+ "version": "10.42.0",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "files": [
7
+ "dist/**/*"
8
+ ],
9
+ "scripts": {
10
+ "clean": "rm -rf dist",
11
+ "build": "npm run clean && tsc",
12
+ "publish:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
13
+ "publish:patch": "npm version patch && git push && npm run build && npm publish",
14
+ "publish:minor": "npm version minor && git push && npm run build && npm publish",
15
+ "publish:major": "npm version major && git push && npm run build && npm publish",
16
+ "link": "npm run build && npm link",
17
+ "test": "jest"
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "ISC",
22
+ "devDependencies": {
23
+ "@types/jest": "^29.5.13",
24
+ "@types/lodash": "^4.17.21",
25
+ "@types/node": "^22.6.1",
26
+ "jest": "^29.7.0",
27
+ "ts-jest": "^29.2.5",
28
+ "ts-node": "^10.9.2",
29
+ "typescript": "^5.6.2"
30
+ },
31
+ "dependencies": {
32
+ "@types/express": "^5.0.0",
33
+ "@types/multer": "^1.4.12",
34
+ "date-fns": "^4.1.0",
35
+ "lodash": "4.17.21"
36
+ }
37
+ }
@@ -1,4 +0,0 @@
1
- "use strict";
2
- // import { IEntityCreateDto, IStateEntity } from "../../entities";
3
- // export type IStateCreateExclude = "status";
4
- // export interface IStateCreateDto extends Omit<IEntityCreateDto<IStateEntity>, IStateCreateExclude> {}
@@ -1,4 +0,0 @@
1
- import { IEntityCreateDto, IStateEntity } from "../../entities";
2
- export type IStateCreateExclude = "status";
3
- export interface IStateCreateDto extends Omit<IEntityCreateDto<IStateEntity>, IStateCreateExclude> {
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- import { DeepPartialButRequired } from "./api.utils.interface";
2
- import { IStateCreateDto } from "./state.create.dto.interface";
3
- export type IStateUpdateDto = DeepPartialButRequired<IStateCreateDto, never>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- "use strict";
2
- // export enum StateStatusEnum {
3
- // ACTIVE = "ACTIVE",
4
- // DEACTIVE = "DEACTIVE",
5
- // INACTIVE = "INACTIVE",
6
- // }
@@ -1,5 +0,0 @@
1
- export declare enum StateStatusEnum {
2
- ACTIVE = "ACTIVE",
3
- DEACTIVE = "DEACTIVE",
4
- INACTIVE = "INACTIVE"
5
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StateStatusEnum = void 0;
4
- var StateStatusEnum;
5
- (function (StateStatusEnum) {
6
- StateStatusEnum["ACTIVE"] = "ACTIVE";
7
- StateStatusEnum["DEACTIVE"] = "DEACTIVE";
8
- StateStatusEnum["INACTIVE"] = "INACTIVE";
9
- })(StateStatusEnum || (exports.StateStatusEnum = StateStatusEnum = {}));
@@ -1,7 +0,0 @@
1
- "use strict";
2
- // import { IEntityAuditColumn } from "./entity-audit-columns.interface";
3
- // export interface IStateEntity extends IEntityAuditColumn {
4
- // id: number;
5
- // name: string;
6
- // status: StateStatusEnum;
7
- // }
@@ -1,7 +0,0 @@
1
- import { StateStatusEnum } from "../enums/state_status_enum";
2
- import { IEntityAuditColumn } from "./entity-audit-columns.interface";
3
- export interface IStateEntity extends IEntityAuditColumn {
4
- id: number;
5
- name: string;
6
- status: StateStatusEnum;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import { StateStatusEnum } from "../enums/state_status_enum";
2
- import { EntityEnum } from "../interface/entity.utils.interface";
3
- import { IStateEntity } from "../interface/state.entity.interface";
4
- import { BaseEntityModel } from "./base.entity.model";
5
- export declare class StateEntityModel extends BaseEntityModel<EntityEnum.STATE> implements IStateEntity {
6
- id: number;
7
- name: string;
8
- status: StateStatusEnum;
9
- createdOn: number;
10
- updatedOn: number;
11
- createdBy: number;
12
- updatedBy: number;
13
- static fromEntity(entity: IStateEntity): StateEntityModel;
14
- static relationConfigs: never[];
15
- getRelationConfigs(): any[];
16
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StateEntityModel = void 0;
4
- const state_status_enum_1 = require("../enums/state_status_enum");
5
- const entity_utils_interface_1 = require("../interface/entity.utils.interface");
6
- const base_entity_model_1 = require("./base.entity.model");
7
- class StateEntityModel extends base_entity_model_1.BaseEntityModel {
8
- constructor() {
9
- super(...arguments);
10
- this.id = 0;
11
- this.name = "";
12
- this.status = state_status_enum_1.StateStatusEnum.ACTIVE;
13
- this.createdOn = 0;
14
- this.updatedOn = 0;
15
- this.createdBy = 0;
16
- this.updatedBy = 0;
17
- }
18
- static fromEntity(entity) {
19
- const result = new StateEntityModel(entity_utils_interface_1.EntityEnum.STATE);
20
- Object.assign(result, entity);
21
- return result;
22
- }
23
- getRelationConfigs() {
24
- return this.constructor.prototype.constructor.relationConfigs || [];
25
- }
26
- }
27
- exports.StateEntityModel = StateEntityModel;
28
- StateEntityModel.relationConfigs = [];