law-common 9.0.3-beta.5 → 9.1.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.
@@ -1,3 +1,4 @@
1
1
  export declare const timesheetViewThreshold = "timesheetViewThreshold";
2
2
  export declare const timesheetThreshold = "timesheetThreshold";
3
3
  export declare const timesheetEnterThreshold = "timesheetEnterThreshold";
4
+ export declare const timesheetMinimumTotalDuration = 15;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.timesheetEnterThreshold = exports.timesheetThreshold = exports.timesheetViewThreshold = void 0;
3
+ exports.timesheetMinimumTotalDuration = exports.timesheetEnterThreshold = exports.timesheetThreshold = exports.timesheetViewThreshold = void 0;
4
4
  exports.timesheetViewThreshold = "timesheetViewThreshold";
5
5
  exports.timesheetThreshold = "timesheetThreshold";
6
6
  exports.timesheetEnterThreshold = "timesheetEnterThreshold";
7
+ exports.timesheetMinimumTotalDuration = 15;
@@ -36,16 +36,19 @@ export declare enum EntityEnum {
36
36
  BANK = "bank",
37
37
  CLIENT_AFFILIATE = "client_affiliate"
38
38
  }
39
- export type ISearchIncludeEntity<T extends EntityEnum> = {
40
- name: T;
41
- relations?: ISearchIncludeEntity<T>[];
42
- entities?: ISearchIncludeEntity<T>[];
43
- columnkeys?: EntityKeyType<T>[];
39
+ export type ISearchIncludeEntity = {
40
+ name: EntityEnum;
44
41
  mappingProperties?: string[];
45
- searchProperty?: EntityKeyType<T>;
42
+ searchProperty?: string;
43
+ relations?: ISearchIncludeEntity[];
44
+ entities?: ISearchIncludeEntity[];
46
45
  };
47
46
  export type IEntityServiceResponse = {
48
- [K in EntityEnum]?: IBaseEntityServiceResponse<EntityKeyType<K>>;
47
+ [EntityEnum.BILLING]?: IBaseEntityServiceResponse<IBillingEntity>;
48
+ [EntityEnum.BILLING_TIMESHEET]?: IBaseEntityServiceResponse<IBillingTimesheetEntity>;
49
+ [EntityEnum.TIMESHEET]?: IBaseEntityServiceResponse<ITimesheetEntity>;
50
+ [EntityEnum.USER]?: IBaseEntityServiceResponse<IUserEntity>;
51
+ [EntityEnum.PROJECT]?: IBaseEntityServiceResponse<IProjectEntity>;
49
52
  };
50
53
  export type IBaseEntityServiceResponse<T> = {
51
54
  baseEntities: T[];
@@ -60,7 +63,6 @@ export type IBaseEntityApiResponse<T extends {
60
63
  [K in EntityEnum]?: K extends EntityEnum.BILLING ? IBaseEntityApiResponse<IBillingEntity> : K extends EntityEnum.BILLING_TIMESHEET ? IBaseEntityApiResponse<IBillingTimesheetEntity> : K extends EntityEnum.TIMESHEET ? IBaseEntityApiResponse<ITimesheetEntity> : K extends EntityEnum.USER ? IBaseEntityApiResponse<IUserEntity> : K extends EntityEnum.PROJECT ? IBaseEntityApiResponse<IProjectEntity> : K extends EntityEnum.CLIENT ? IBaseEntityApiResponse<IClientEntity> : never;
61
64
  };
62
65
  };
63
- export type EnumEntityType<T extends EntityEnum> = T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : never;
64
66
  export type EntityRelationConfig<T> = {
65
67
  [K in EntityEnum]?: {
66
68
  mappingProperties: (keyof T)[];
@@ -68,7 +70,7 @@ export type EntityRelationConfig<T> = {
68
70
  projectProperties?: EntityKeyType<K>[];
69
71
  };
70
72
  };
71
- export type EntityKeyType<K extends EntityEnum> = K extends EntityEnum.USER ? keyof IUserEntity : K extends EntityEnum.PROJECT ? keyof IProjectEntity : K extends EntityEnum.BILLING_TIMESHEET ? keyof IBillingTimesheetEntity : K extends EntityEnum.BILLING ? keyof IBillingEntity : K extends EntityEnum.TIMESHEET ? keyof ITimesheetEntity : K extends EntityEnum.CLIENT ? keyof IClientEntity : never;
73
+ export type EntityKeyType<K extends EntityEnum> = K extends EntityEnum.USER ? keyof IUserEntity : K extends EntityEnum.PROJECT ? keyof IProjectEntity : K extends EntityEnum.BILLING_TIMESHEET ? keyof IBillingTimesheetEntity : never;
72
74
  export type IEntityApiResponse<T extends {
73
75
  createdOn: Date;
74
76
  updatedOn: Date;
@@ -88,9 +90,8 @@ export type IEntityFilterData<T> = ConvertToArray<IEntityUpdateDto<T>> & {
88
90
  [key in keyof T]?: T[key];
89
91
  };
90
92
  [key: string]: any;
91
- relations?: ISearchIncludeEntity<EntityEnum>[];
92
- entities?: ISearchIncludeEntity<EntityEnum>[];
93
- columnKeys?: (keyof T)[];
93
+ relations?: ISearchIncludeEntity[];
94
+ entities?: ISearchIncludeEntity[];
94
95
  };
95
96
  export type IEntityHistoryParsed = {
96
97
  parsedData: any;
@@ -2,7 +2,7 @@ import { OrganizationStatusEnum } from "../enums/organization.entity.enum";
2
2
  import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
3
  import { IEntityFilterData } from "./entity.utils.interface";
4
4
  export interface IOrganizationEntity extends IAuditColumnEntity {
5
- id: string;
5
+ id: number;
6
6
  name: string;
7
7
  email: string;
8
8
  contact: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "9.0.3-beta.5",
3
+ "version": "9.1.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [