law-common 10.40.1-beta.0 → 10.40.1-beta.2

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.
@@ -52,3 +52,4 @@ 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.autocode";
@@ -72,3 +72,4 @@ __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.autocode"), exports);
@@ -0,0 +1,4 @@
1
+ import { IEntityCreateDto, IStateEntity } from "../../entities";
2
+ export type IStateCreateExclude = never;
3
+ export interface IStateCreateDto extends Omit<IEntityCreateDto<IStateEntity>, IStateCreateExclude> {
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -20,6 +20,7 @@ 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";
23
24
  import { TaskEntityModel } from "../model/task.entity.model";
24
25
  import { TimesheetEntityModel } from "../model/timesheet.entity.model";
25
26
  import { UserEntityModel } from "../model/user.entity.model";
@@ -55,6 +56,7 @@ import { IReimbursementEntity } from "./reimbursement.entity.interface";
55
56
  import { IReimbursementExpenseEntity } from "./reimbursement_expense.entity.interface";
56
57
  import { IRoleEntity } from "./role.entity.interface";
57
58
  import { IRolePermissionMappingEntity } from "./role.permission.mapping.entity.interface";
59
+ import { IStateEntity } from "./state.entity.interface";
58
60
  import { ITaskEntity } from "./task.entity.interface";
59
61
  import { ITimesheetEntity } from "./timesheet.entity.interface";
60
62
  import { ITimesheetHistoryEntity } from "./timesheet_history.entity.interface";
@@ -143,7 +145,8 @@ export declare enum EntityEnum {
143
145
  HOLIDAY_LIST = "holiday_list",
144
146
  CRON_JOBS = "cron_jobs",
145
147
  TO_DO_LIST = "to_do_list",
146
- ADDRESS_BOOK = "address_book"
148
+ ADDRESS_BOOK = "address_book",
149
+ STATE = "state"
147
150
  }
148
151
  export type EntityRelations = {
149
152
  [K in EntityEnum | VirtualEntityEnum]: K;
@@ -162,7 +165,7 @@ export type IBaseEntityApiResponse<T> = {
162
165
  [K in EntityEnum | VirtualEntityEnum]?: IBaseEntityApiResponse<EnumEntityType<K>>;
163
166
  };
164
167
  };
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) & {
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) & {
166
169
  id: number;
167
170
  };
168
171
  export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
@@ -285,7 +288,7 @@ export declare enum VirtualEntityEnum {
285
288
  }
286
289
  export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
287
290
  export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
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;
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;
289
292
  export type EntityMap = {
290
293
  [key in EntityEnum | VirtualEntityEnum]: EnumToModel<key>[];
291
294
  };
@@ -78,6 +78,7 @@ 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";
81
82
  })(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
82
83
  var VirtualEntityEnum;
83
84
  (function (VirtualEntityEnum) {
@@ -31,6 +31,7 @@ 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");
34
35
  function mapToIndex(entityMap) {
35
36
  return Object.keys(entityMap).reduce((acc, key) => {
36
37
  // @ts-ignore
@@ -80,6 +81,7 @@ exports.entityEnumToEntityModel = {
80
81
  [entity_utils_interface_1.EntityEnum.COUNTRY]: country_entity_model_1.CountryEntityModel.fromApiEntity,
81
82
  [entity_utils_interface_1.EntityEnum.ADDRESS_BOOK]: address_book_model_1.AddressBookEntityModel.fromEntity,
82
83
  [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,
83
85
  };
84
86
  function entityMapToModels(entityMap) {
85
87
  for (const entityName in entityMap) {
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,28 @@
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 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.40.1-beta.0",
3
+ "version": "10.40.1-beta.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [