law-common 10.18.1-beta.11 → 10.18.1-beta.12

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.
@@ -5,6 +5,7 @@ import { EntitySearchConstraintTypeEnum } from "../enums/entity_search_constrain
5
5
  import { HistoryOperationEnum } from "../enums/history_operation.enum";
6
6
  import { BillingReimbursementExpneseEntityModel } from "../model/billing-reimbursement-expense.entity.model";
7
7
  import { BillingEntityModel } from "../model/billing.entity.model";
8
+ import { ClientAffiliateEntityModel } from "../model/client-affiliate.entity.model";
8
9
  import { ClientEntityModel } from "../model/client.entity.model";
9
10
  import { ProjectUserMappingEntityModel } from "../model/project-user-mapping.entity.model";
10
11
  import { ProjectEntityModel } from "../model/project.entity.model";
@@ -275,7 +276,7 @@ export declare enum VirtualEntityEnum {
275
276
  }
276
277
  export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
277
278
  export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
278
- 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 : UserEntityModel;
279
+ 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.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : UserEntityModel;
279
280
  export type EntityMap = {
280
281
  [key in EntityEnum]: EnumToModel<key>[];
281
282
  };
@@ -0,0 +1,19 @@
1
+ import { IClientAffiliateApiEntity } from "../../api";
2
+ import { EntityEnum } from "../interface/entity.utils.interface";
3
+ import { BaseEntityModel } from "./base.entity.model";
4
+ export declare class ClientAffiliateEntityModel extends BaseEntityModel<EntityEnum.CLIENT_AFFILIATE> implements IClientAffiliateApiEntity {
5
+ id: number;
6
+ name: string;
7
+ address: string;
8
+ details?: string;
9
+ clientId: number;
10
+ organizationId: number;
11
+ zipCode: string;
12
+ country: string;
13
+ createdOn: string;
14
+ updatedOn: string;
15
+ createdBy: number;
16
+ updatedBy: number;
17
+ getRelationConfigs(): any;
18
+ static fromApiEntity(apiEntity: IClientAffiliateApiEntity): ClientAffiliateEntityModel;
19
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientAffiliateEntityModel = void 0;
4
+ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
5
+ const base_entity_model_1 = require("./base.entity.model");
6
+ class ClientAffiliateEntityModel extends base_entity_model_1.BaseEntityModel {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.id = 0;
10
+ this.name = "";
11
+ this.address = "";
12
+ this.clientId = 0;
13
+ this.organizationId = 0;
14
+ this.zipCode = "";
15
+ this.country = "";
16
+ this.createdOn = "";
17
+ this.updatedOn = "";
18
+ this.createdBy = 0;
19
+ this.updatedBy = 0;
20
+ }
21
+ getRelationConfigs() {
22
+ return this.constructor.prototype.constructor.relationConfigs;
23
+ }
24
+ static fromApiEntity(apiEntity) {
25
+ const entity = new ClientAffiliateEntityModel(entity_utils_interface_1.EntityEnum.CLIENT_AFFILIATE);
26
+ Object.assign(entity, apiEntity);
27
+ return entity;
28
+ }
29
+ }
30
+ exports.ClientAffiliateEntityModel = ClientAffiliateEntityModel;
@@ -8,6 +8,7 @@ const entity_utils_interface_1 = require("../interface/entity.utils.interface");
8
8
  const base_entity_model_1 = require("./base.entity.model");
9
9
  const billing_reimbursement_expense_entity_model_1 = require("./billing-reimbursement-expense.entity.model");
10
10
  const billing_entity_model_1 = require("./billing.entity.model");
11
+ const client_affiliate_entity_model_1 = require("./client-affiliate.entity.model");
11
12
  const client_entity_model_1 = require("./client.entity.model");
12
13
  const project_user_mapping_entity_model_1 = require("./project-user-mapping.entity.model");
13
14
  const project_entity_model_1 = require("./project.entity.model");
@@ -52,6 +53,7 @@ function parseEntities(json, baseEntity, entityMap) {
52
53
  [entity_utils_interface_1.EntityEnum.REIMBURSEMENT]: reimbursement_entity_model_1.ReimbursementEntityModel.fromApiEntity,
53
54
  [entity_utils_interface_1.EntityEnum.REIMBURSEMENT_EXPENSE]: reimbursement_expense_entity_model_1.ReimbursementExpenseEntityModel.fromApiEntity,
54
55
  [entity_utils_interface_1.EntityEnum.BILLING_REIMBURSEMENT_EXPENSE]: billing_reimbursement_expense_entity_model_1.BillingReimbursementExpneseEntityModel.fromApiEntity,
56
+ [entity_utils_interface_1.EntityEnum.CLIENT_AFFILIATE]: client_affiliate_entity_model_1.ClientAffiliateEntityModel.fromApiEntity,
55
57
  };
56
58
  if (!(baseEntity in entityFromJsonMappings)) {
57
59
  throw new Error(`Unknown entity: ${baseEntity}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "10.18.1-beta.11",
3
+ "version": "10.18.1-beta.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [