law-common 9.0.3-beta.2 → 9.0.3-beta.4
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.
|
@@ -60,6 +60,7 @@ export type IBaseEntityApiResponse<T extends {
|
|
|
60
60
|
[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
61
|
};
|
|
62
62
|
};
|
|
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;
|
|
63
64
|
export type EntityRelationConfig<T> = {
|
|
64
65
|
[K in EntityEnum]?: {
|
|
65
66
|
mappingProperties: (keyof T)[];
|
|
@@ -67,7 +68,7 @@ export type EntityRelationConfig<T> = {
|
|
|
67
68
|
projectProperties?: EntityKeyType<K>[];
|
|
68
69
|
};
|
|
69
70
|
};
|
|
70
|
-
export type EntityKeyType<K extends EntityEnum> = K extends
|
|
71
|
+
export type EntityKeyType<K extends EntityEnum> = K extends EnumEntityType<K> ? keyof EntityKeyType<K> : never;
|
|
71
72
|
export type IEntityApiResponse<T extends {
|
|
72
73
|
createdOn: Date;
|
|
73
74
|
updatedOn: Date;
|
|
@@ -89,6 +90,7 @@ export type IEntityFilterData<T> = ConvertToArray<IEntityUpdateDto<T>> & {
|
|
|
89
90
|
[key: string]: any;
|
|
90
91
|
relations?: ISearchIncludeEntity<EntityEnum>[];
|
|
91
92
|
entities?: ISearchIncludeEntity<EntityEnum>[];
|
|
93
|
+
columnKeys?: (keyof T)[];
|
|
92
94
|
};
|
|
93
95
|
export type IEntityHistoryParsed = {
|
|
94
96
|
parsedData: any;
|