@decaf-ts/db-decorators 0.7.4 → 0.7.6

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 (86) hide show
  1. package/README.md +5 -1
  2. package/dist/db-decorators.cjs +1 -1
  3. package/dist/db-decorators.cjs.map +1 -1
  4. package/dist/db-decorators.js +1 -1
  5. package/dist/db-decorators.js.map +1 -1
  6. package/lib/esm/index.d.ts +1 -1
  7. package/lib/esm/index.js +1 -1
  8. package/lib/esm/interfaces/BulkCrudOperator.d.ts +5 -4
  9. package/lib/esm/interfaces/Contextual.d.ts +3 -3
  10. package/lib/esm/interfaces/CrudOperator.d.ts +5 -4
  11. package/lib/esm/interfaces/IRepository.d.ts +2 -4
  12. package/lib/esm/model/decorators.d.ts +6 -7
  13. package/lib/esm/model/decorators.js +16 -14
  14. package/lib/esm/model/decorators.js.map +1 -1
  15. package/lib/esm/operations/Operations.d.ts +3 -7
  16. package/lib/esm/operations/Operations.js +1 -3
  17. package/lib/esm/operations/Operations.js.map +1 -1
  18. package/lib/esm/operations/OperationsRegistry.d.ts +2 -6
  19. package/lib/esm/operations/OperationsRegistry.js +0 -2
  20. package/lib/esm/operations/OperationsRegistry.js.map +1 -1
  21. package/lib/esm/operations/decorators.d.ts +42 -28
  22. package/lib/esm/operations/decorators.js +34 -11
  23. package/lib/esm/operations/decorators.js.map +1 -1
  24. package/lib/esm/operations/types.d.ts +9 -10
  25. package/lib/esm/overrides/Model.d.ts +16 -4
  26. package/lib/esm/overrides/overrides.js +21 -0
  27. package/lib/esm/overrides/overrides.js.map +1 -1
  28. package/lib/esm/repository/BaseRepository.d.ts +16 -27
  29. package/lib/esm/repository/BaseRepository.js +2 -28
  30. package/lib/esm/repository/BaseRepository.js.map +1 -1
  31. package/lib/esm/repository/Context.d.ts +9 -8
  32. package/lib/esm/repository/Context.js +9 -1
  33. package/lib/esm/repository/Context.js.map +1 -1
  34. package/lib/esm/repository/Repository.d.ts +9 -6
  35. package/lib/esm/repository/Repository.js +52 -38
  36. package/lib/esm/repository/Repository.js.map +1 -1
  37. package/lib/esm/repository/constants.d.ts +1 -1
  38. package/lib/esm/repository/constants.js +2 -0
  39. package/lib/esm/repository/constants.js.map +1 -1
  40. package/lib/esm/repository/types.d.ts +16 -2
  41. package/lib/esm/repository/utils.d.ts +6 -32
  42. package/lib/esm/repository/utils.js +9 -106
  43. package/lib/esm/repository/utils.js.map +1 -1
  44. package/lib/esm/validation/decorators.d.ts +4 -5
  45. package/lib/esm/validation/decorators.js.map +1 -1
  46. package/lib/index.cjs +1 -1
  47. package/lib/index.d.ts +1 -1
  48. package/lib/interfaces/BulkCrudOperator.d.ts +5 -4
  49. package/lib/interfaces/Contextual.d.ts +3 -3
  50. package/lib/interfaces/CrudOperator.d.ts +5 -4
  51. package/lib/interfaces/IRepository.d.ts +2 -4
  52. package/lib/model/decorators.cjs +16 -14
  53. package/lib/model/decorators.d.ts +6 -7
  54. package/lib/model/decorators.js.map +1 -1
  55. package/lib/operations/Operations.cjs +1 -3
  56. package/lib/operations/Operations.d.ts +3 -7
  57. package/lib/operations/Operations.js.map +1 -1
  58. package/lib/operations/OperationsRegistry.cjs +0 -2
  59. package/lib/operations/OperationsRegistry.d.ts +2 -6
  60. package/lib/operations/OperationsRegistry.js.map +1 -1
  61. package/lib/operations/decorators.cjs +36 -12
  62. package/lib/operations/decorators.d.ts +42 -28
  63. package/lib/operations/decorators.js.map +1 -1
  64. package/lib/operations/types.d.ts +9 -10
  65. package/lib/overrides/Model.d.ts +16 -4
  66. package/lib/overrides/overrides.cjs +21 -0
  67. package/lib/overrides/overrides.js.map +1 -1
  68. package/lib/repository/BaseRepository.cjs +2 -28
  69. package/lib/repository/BaseRepository.d.ts +16 -27
  70. package/lib/repository/BaseRepository.js.map +1 -1
  71. package/lib/repository/Context.cjs +9 -1
  72. package/lib/repository/Context.d.ts +9 -8
  73. package/lib/repository/Context.js.map +1 -1
  74. package/lib/repository/Repository.cjs +51 -37
  75. package/lib/repository/Repository.d.ts +9 -6
  76. package/lib/repository/Repository.js.map +1 -1
  77. package/lib/repository/constants.cjs +2 -0
  78. package/lib/repository/constants.d.ts +1 -1
  79. package/lib/repository/constants.js.map +1 -1
  80. package/lib/repository/types.d.ts +16 -2
  81. package/lib/repository/utils.cjs +10 -108
  82. package/lib/repository/utils.d.ts +6 -32
  83. package/lib/repository/utils.js.map +1 -1
  84. package/lib/validation/decorators.d.ts +4 -5
  85. package/lib/validation/decorators.js.map +1 -1
  86. package/package.json +11 -10
@@ -2,8 +2,6 @@ import { OperationHandler } from "./types";
2
2
  import { OperationKeys } from "./constants";
3
3
  import { IRepository } from "../interfaces/IRepository";
4
4
  import { Model } from "@decaf-ts/decorator-validation";
5
- import { Context } from "../repository";
6
- import { RepositoryFlags } from "../repository/types";
7
5
  /**
8
6
  * @description Registry for database operation handlers
9
7
  * @summary Manages and stores operation handlers for different model properties and operations
@@ -37,15 +35,13 @@ export declare class OperationsRegistry {
37
35
  * @template M - Model type extending Model
38
36
  * @template R - Repository type extending IRepository
39
37
  * @template V - Metadata type
40
- * @template F - Repository flags extending RepositoryFlags
41
- * @template C - Context type extending Context<F>
42
38
  * @param {string | Record<string, any>} target - The target class name or object
43
39
  * @param {string} propKey - The property key to get handlers for
44
40
  * @param {string} operation - The operation key to get handlers for
45
41
  * @param {OperationHandler[]} [accum] - Accumulator for recursive calls
46
42
  * @return {OperationHandler[] | undefined} Array of handlers or undefined if none found
47
43
  */
48
- get<M extends Model, R extends IRepository<M, F, C>, V, F extends RepositoryFlags, C extends Context<F>>(target: string | Record<string, any>, propKey: string, operation: string, accum?: OperationHandler<M, R, V, F, C>[]): OperationHandler<M, R, V, F, C>[] | undefined;
44
+ get<M extends Model, R extends IRepository<M, any>, V>(target: string | Record<string, any>, propKey: string, operation: string, accum?: OperationHandler<M, R, V>[]): OperationHandler<M, R, V>[] | undefined;
49
45
  /**
50
46
  * @description Registers an operation handler for a specific target and operation
51
47
  * @summary Stores a handler in the registry for a given target, property, and operation
@@ -60,5 +56,5 @@ export declare class OperationsRegistry {
60
56
  * @param {string | symbol} propKey - The property key to register the handler for
61
57
  * @return {void}
62
58
  */
63
- register<M extends Model, R extends IRepository<M, F, C>, V, F extends RepositoryFlags, C extends Context<F>>(handler: OperationHandler<M, R, V, F, C>, operation: OperationKeys, target: M, propKey: string | symbol): void;
59
+ register<M extends Model, R extends IRepository<M, any>, V>(handler: OperationHandler<M, R, V>, operation: OperationKeys, target: M, propKey: string | symbol): void;
64
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OperationsRegistry.js","sourceRoot":"","sources":["../../src/operations/OperationsRegistry.ts"],"names":[],"mappings":";;;AAGA,iDAA0C;AAK1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAa,kBAAkB;IAA/B;QACmB,UAAK,GAMlB,EAAE,CAAC;IAuFT,CAAC;IArFC;;;;;;;;;;;;;OAaG;IACH,GAAG,CAOD,MAAoC,EACpC,OAAe,EACf,SAAiB,EACjB,KAAyC;QAEzC,KAAK,GAAG,KAAK,IAAI,EAAE,CAAC;QACpB,IAAI,IAAI,CAAC;QACT,IAAI,CAAC;YACH,IAAI,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;YACrE,KAAK,CAAC,OAAO,CACX,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAC7D,CAAC;YACF,6DAA6D;QAC/D,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,IACE,OAAO,MAAM,KAAK,QAAQ;gBAC1B,MAAM,KAAK,MAAM,CAAC,SAAS;gBAC3B,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,SAAS;gBAElD,OAAO,KAAK,CAAC;QACjB,CA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C,SAAwB,EACxB,MAAS,EACT,OAAwB;QAExB,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QACrC,MAAM,WAAW,GAAG,uBAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAEvD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;YAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAC/D,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;YACvC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QAC5C,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;YAAE,OAAO;QAC9D,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;IAC9D,CAAC;CACF;AAhFD,gDAgFC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlockOperations = void 0;
3
+ exports.BlockOperations = exports.getHandlerArgs = void 0;
4
4
  exports.getHandlersDecorators = getHandlersDecorators;
5
5
  exports.groupDecorators = groupDecorators;
6
6
  exports.sortDecorators = sortDecorators;
@@ -23,7 +23,6 @@ exports.storeHandlerMetadata = storeHandlerMetadata;
23
23
  const constants_1 = require("./constants.cjs");
24
24
  const Operations_1 = require("./Operations.cjs");
25
25
  const errors_1 = require("./../repository/errors.cjs");
26
- const utils_1 = require("./../repository/utils.cjs");
27
26
  const decoration_1 = require("@decaf-ts/decoration");
28
27
  const defaultPriority = 50;
29
28
  const DefaultGroupSort = { priority: defaultPriority };
@@ -31,7 +30,7 @@ const DefaultGroupSort = { priority: defaultPriority };
31
30
  * @description Internal function to register operation handlers
32
31
  * @summary Registers an operation handler for a specific operation key on a target property
33
32
  * @param {OperationKeys} op - The operation key to handle
34
- * @param {OperationHandler<any, any, any, any, any>} handler - The handler function to register
33
+ * @param {OperationHandler<any, any, any>} handler - The handler function to register
35
34
  * @return {PropertyDecorator} A decorator that registers the handler
36
35
  * @function handle
37
36
  * @category Property Decorators
@@ -41,6 +40,31 @@ function handle(op, handler) {
41
40
  Operations_1.Operations.register(handler, op, target, propertyKey);
42
41
  };
43
42
  }
43
+ /**
44
+ * @summary retrieves the arguments for the handler
45
+ * @param {any} dec the decorator
46
+ * @param {string} prop the property name
47
+ * @param {{}} m the model
48
+ * @param {{}} [accum] accumulator used for internal recursiveness
49
+ *
50
+ * @function getHandlerArgs
51
+ * @memberOf module:db-decorators.Repository
52
+ */
53
+ const getHandlerArgs = function (dec, prop, m, accum) {
54
+ const name = m.constructor.name;
55
+ if (!name)
56
+ throw new errors_1.InternalError("Could not determine model class");
57
+ accum = accum || {};
58
+ if (dec.props.handlers[name] && dec.props.handlers[name][prop])
59
+ accum = { ...dec.props.handlers[name][prop], ...accum };
60
+ let proto = Object.getPrototypeOf(m);
61
+ if (proto === Object.prototype)
62
+ return accum;
63
+ if (proto.constructor.name === name)
64
+ proto = Object.getPrototypeOf(proto);
65
+ return (0, exports.getHandlerArgs)(dec, prop, proto, accum);
66
+ };
67
+ exports.getHandlerArgs = getHandlerArgs;
44
68
  /**
45
69
  * @description Retrieves decorator objects for handling database operations
46
70
  * @summary Retrieves a list of decorator objects representing operation handlers for a given model and decorators
@@ -65,7 +89,7 @@ function getHandlersDecorators(model, decorators, prefix) {
65
89
  const handlers = Operations_1.Operations.get(model, prop, prefix + key);
66
90
  if (!handlers || !handlers.length)
67
91
  throw new errors_1.InternalError(`Could not find registered handler for the operation ${prefix + key} under property ${prop}`);
68
- const handlerArgs = (0, utils_1.getHandlerArgs)(dec, prop, model);
92
+ const handlerArgs = (0, exports.getHandlerArgs)(dec, prop, model);
69
93
  if (!handlerArgs || Object.values(handlerArgs).length !== handlers.length)
70
94
  throw new errors_1.InternalError("Args and handlers length do not match");
71
95
  for (let i = 0; i < handlers.length; i++) {
@@ -173,7 +197,7 @@ function onUpdate(handler, data, groupsort) {
173
197
  * @description Decorator for handling create operations
174
198
  * @summary Defines a behavior to execute during create operations
175
199
  * @template V - Type for metadata, defaults to object
176
- * @param {GeneralOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
200
+ * @param {GeneralOperationHandler<any, any, V>} handler - The method called upon the operation
177
201
  * @param {V} [data] - Optional metadata to pass to the handler
178
202
  * @return {PropertyDecorator} A decorator that can be applied to class properties
179
203
  * @function onCreate
@@ -186,7 +210,7 @@ function onCreate(handler, data, groupsort) {
186
210
  * @description Decorator for handling read operations
187
211
  * @summary Defines a behavior to execute during read operations
188
212
  * @template V - Type for metadata, defaults to object
189
- * @param {IdOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
213
+ * @param {IdOperationHandler<any, any, V>} handler - The method called upon the operation
190
214
  * @param {V} [data] - Optional metadata to pass to the handler
191
215
  * @return {PropertyDecorator} A decorator that can be applied to class properties
192
216
  * @function onRead
@@ -245,7 +269,7 @@ function on(op = constants_1.DBOperations.ALL, handler, data, groupsort) {
245
269
  * @description Decorator for handling post-create and post-update operations
246
270
  * @summary Defines a behavior to execute after both create and update operations
247
271
  * @template V - Type for metadata, defaults to object
248
- * @param {StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
272
+ * @param {StandardOperationHandler<any, any, V> | UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
249
273
  * @param {V} [data] - Optional metadata to pass to the handler
250
274
  * @return {PropertyDecorator} A decorator that can be applied to class properties
251
275
  * @function afterCreateUpdate
@@ -258,7 +282,7 @@ function afterCreateUpdate(handler, data, groupsort) {
258
282
  * @description Decorator for handling post-update operations
259
283
  * @summary Defines a behavior to execute after update operations
260
284
  * @template V - Type for metadata, defaults to object
261
- * @param {UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
285
+ * @param {UpdateOperationHandler<any, any, V>} handler - The method called after the operation
262
286
  * @param {V} [data] - Optional metadata to pass to the handler
263
287
  * @return {PropertyDecorator} A decorator that can be applied to class properties
264
288
  * @function afterUpdate
@@ -271,7 +295,7 @@ function afterUpdate(handler, data, groupsort) {
271
295
  * @description Decorator for handling post-create operations
272
296
  * @summary Defines a behavior to execute after create operations
273
297
  * @template V - Type for metadata, defaults to object
274
- * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
298
+ * @param {StandardOperationHandler<any, any, V>} handler - The method called after the operation
275
299
  * @param {V} [data] - Optional metadata to pass to the handler
276
300
  * @return {PropertyDecorator} A decorator that can be applied to class properties
277
301
  * @function afterCreate
@@ -310,7 +334,7 @@ function afterDelete(handler, data, groupsort) {
310
334
  * @description Decorator for handling post-operation for all operation types
311
335
  * @summary Defines a behavior to execute after any database operation
312
336
  * @template V - Type for metadata, defaults to object
313
- * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
337
+ * @param {StandardOperationHandler<any, any, V>} handler - The method called after the operation
314
338
  * @param {V} [data] - Optional metadata to pass to the handler
315
339
  * @return {PropertyDecorator} A decorator that can be applied to class properties
316
340
  * @function afterAny
@@ -324,7 +348,7 @@ function afterAny(handler, data, groupsort) {
324
348
  * @summary Defines a behavior to execute after specified database operations
325
349
  * @template V - Type for metadata, defaults to object
326
350
  * @param {OperationKeys[] | DBOperations} [op=DBOperations.ALL] - One or more operation types to handle
327
- * @param {OperationHandler<any, any, V, any, any>} handler - The method called after the operation
351
+ * @param {OperationHandler<any, any, Vy>} handler - The method called after the operation
328
352
  * @param {V} [data] - Optional metadata to pass to the handler
329
353
  * @return {PropertyDecorator} A decorator that can be applied to class properties
330
354
  * @function after
@@ -345,7 +369,7 @@ function after(op = constants_1.DBOperations.ALL, handler, data, groupsort) {
345
369
  * @template V - Type for metadata, defaults to object
346
370
  * @param {OperationKeys.ON | OperationKeys.AFTER} baseOp - Whether the handler runs during or after the operation
347
371
  * @param {OperationKeys[]} [operation=DBOperations.ALL] - The specific operations to handle
348
- * @param {OperationHandler<any, any, V, any, any>} handler - The handler function to execute
372
+ * @param {OperationHandler<any, any, V>} handler - The handler function to execute
349
373
  * @param {V} [dataToAdd] - Optional metadata to pass to the handler
350
374
  * @return {PropertyDecorator} A decorator that can be applied to class properties
351
375
  * @function operation
@@ -2,8 +2,7 @@ import { GeneralOperationHandler, GeneralUpdateOperationHandler, IdOperationHand
2
2
  import { CrudOperations, OperationKeys } from "./constants";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
4
  import { IRepository } from "../interfaces";
5
- import { RepositoryFlags } from "../repository/types";
6
- import { Context } from "../repository/Context";
5
+ import { Constructor } from "@decaf-ts/decoration";
7
6
  /**
8
7
  * @description Represents sorting parameters for grouping decorators
9
8
  * @summary Defines the structure for specifying group sorting options
@@ -22,16 +21,31 @@ export type GroupSort = {
22
21
  * @description DecoratorObject type definition
23
22
  * @summary Defines the structure of an object used to represent a decorator in the context of database operations.
24
23
  * @typedef {Object} DecoratorObject
25
- * @property {OperationHandler<any, any, any, any, any>} handler - The handler function to be executed during the operation
24
+ * @property {OperationHandler<any, any, any>} handler - The handler function to be executed during the operation
26
25
  * @property {object} data - Optional metadata to be passed to the handler function
27
26
  * @property {string} prop - The property key to which the decorator is applied
28
27
  * @category Type Definitions
29
28
  */
30
29
  export type DecoratorObject = {
31
- handler: OperationHandler<any, any, any, any, any>;
30
+ handler: OperationHandler<any, any, any>;
32
31
  data: Record<string, any>[];
33
32
  prop: string[];
34
33
  };
34
+ /**
35
+ * @summary retrieves the arguments for the handler
36
+ * @param {any} dec the decorator
37
+ * @param {string} prop the property name
38
+ * @param {{}} m the model
39
+ * @param {{}} [accum] accumulator used for internal recursiveness
40
+ *
41
+ * @function getHandlerArgs
42
+ * @memberOf module:db-decorators.Repository
43
+ */
44
+ export declare const getHandlerArgs: (dec: any, prop: string, m: Constructor<any>, accum?: Record<string, {
45
+ args: string[];
46
+ }>) => Record<string, {
47
+ args: string[];
48
+ }> | void;
35
49
  /**
36
50
  * @description Retrieves decorator objects for handling database operations
37
51
  * @summary Retrieves a list of decorator objects representing operation handlers for a given model and decorators
@@ -47,7 +61,7 @@ export type DecoratorObject = {
47
61
  * @function getHandlersDecorators
48
62
  * @category Function
49
63
  */
50
- export declare function getHandlersDecorators<M extends Model<true | false>, R extends IRepository<M, F, C>, V extends object = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>>(model: Model, decorators: Record<string, DecoratorMetadata[]>, prefix: string): DecoratorObject[];
64
+ export declare function getHandlersDecorators<M extends Model<true | false>, R extends IRepository<M, any>, V extends object = object>(model: Model, decorators: Record<string, DecoratorMetadata[]>, prefix: string): DecoratorObject[];
51
65
  /**
52
66
  * @description Groups decorators based on their group property
53
67
  * @summary Groups decorator objects by their group property, combining data and properties within each group
@@ -76,7 +90,7 @@ export declare function sortDecorators(decorators: DecoratorObject[]): Decorator
76
90
  * @function onCreateUpdate
77
91
  * @category Property Decorators
78
92
  */
79
- export declare function onCreateUpdate<V = object>(handler: GeneralOperationHandler<any, any, V, any, any> | GeneralUpdateOperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
93
+ export declare function onCreateUpdate<V = object>(handler: GeneralOperationHandler<any, any, V> | GeneralUpdateOperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
80
94
  /**
81
95
  * @description Decorator for handling update operations
82
96
  * @summary Defines a behavior to execute during update operations
@@ -87,29 +101,29 @@ export declare function onCreateUpdate<V = object>(handler: GeneralOperationHand
87
101
  * @function onUpdate
88
102
  * @category Property Decorators
89
103
  */
90
- export declare function onUpdate<V = object>(handler: UpdateOperationHandler<any, any, V, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
104
+ export declare function onUpdate<V = object>(handler: UpdateOperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
91
105
  /**
92
106
  * @description Decorator for handling create operations
93
107
  * @summary Defines a behavior to execute during create operations
94
108
  * @template V - Type for metadata, defaults to object
95
- * @param {GeneralOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
109
+ * @param {GeneralOperationHandler<any, any, V>} handler - The method called upon the operation
96
110
  * @param {V} [data] - Optional metadata to pass to the handler
97
111
  * @return {PropertyDecorator} A decorator that can be applied to class properties
98
112
  * @function onCreate
99
113
  * @category Property Decorators
100
114
  */
101
- export declare function onCreate<V = object>(handler: GeneralOperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
115
+ export declare function onCreate<V = object>(handler: GeneralOperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
102
116
  /**
103
117
  * @description Decorator for handling read operations
104
118
  * @summary Defines a behavior to execute during read operations
105
119
  * @template V - Type for metadata, defaults to object
106
- * @param {IdOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
120
+ * @param {IdOperationHandler<any, any, V>} handler - The method called upon the operation
107
121
  * @param {V} [data] - Optional metadata to pass to the handler
108
122
  * @return {PropertyDecorator} A decorator that can be applied to class properties
109
123
  * @function onRead
110
124
  * @category Property Decorators
111
125
  */
112
- export declare function onRead<V = object>(handler: IdOperationHandler<any, any, V, any, any>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
126
+ export declare function onRead<V = object>(handler: IdOperationHandler<any, any, V>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
113
127
  /**
114
128
  * @description Decorator for handling delete operations
115
129
  * @summary Defines a behavior to execute during delete operations
@@ -120,7 +134,7 @@ export declare function onRead<V = object>(handler: IdOperationHandler<any, any,
120
134
  * @function onDelete
121
135
  * @category Property Decorators
122
136
  */
123
- export declare function onDelete<V = object>(handler: OperationHandler<any, any, V, any, any>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
137
+ export declare function onDelete<V = object>(handler: OperationHandler<any, any, V>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
124
138
  /**
125
139
  * @description Decorator for handling all operation types
126
140
  * @summary Defines a behavior to execute during any database operation
@@ -131,7 +145,7 @@ export declare function onDelete<V = object>(handler: OperationHandler<any, any,
131
145
  * @function onAny
132
146
  * @category Property Decorators
133
147
  */
134
- export declare function onAny<V = object>(handler: OperationHandler<any, any, V, any, any>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
148
+ export declare function onAny<V = object>(handler: OperationHandler<any, any, V>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
135
149
  /**
136
150
  * @description Base decorator for handling database operations
137
151
  * @summary Defines a behavior to execute during specified database operations
@@ -149,40 +163,40 @@ export declare function onAny<V = object>(handler: OperationHandler<any, any, V,
149
163
  * myProperty: string;
150
164
  * }
151
165
  */
152
- export declare function on<V = object>(op: OperationKeys[] | undefined, handler: OperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
166
+ export declare function on<V = object>(op: OperationKeys[] | undefined, handler: OperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
153
167
  /**
154
168
  * @description Decorator for handling post-create and post-update operations
155
169
  * @summary Defines a behavior to execute after both create and update operations
156
170
  * @template V - Type for metadata, defaults to object
157
- * @param {StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
171
+ * @param {StandardOperationHandler<any, any, V> | UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
158
172
  * @param {V} [data] - Optional metadata to pass to the handler
159
173
  * @return {PropertyDecorator} A decorator that can be applied to class properties
160
174
  * @function afterCreateUpdate
161
175
  * @category Property Decorators
162
176
  */
163
- export declare function afterCreateUpdate<V = object>(handler: StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
177
+ export declare function afterCreateUpdate<V = object>(handler: StandardOperationHandler<any, any, V> | UpdateOperationHandler<any, any, V>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
164
178
  /**
165
179
  * @description Decorator for handling post-update operations
166
180
  * @summary Defines a behavior to execute after update operations
167
181
  * @template V - Type for metadata, defaults to object
168
- * @param {UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
182
+ * @param {UpdateOperationHandler<any, any, V>} handler - The method called after the operation
169
183
  * @param {V} [data] - Optional metadata to pass to the handler
170
184
  * @return {PropertyDecorator} A decorator that can be applied to class properties
171
185
  * @function afterUpdate
172
186
  * @category Property Decorators
173
187
  */
174
- export declare function afterUpdate<V = object>(handler: UpdateOperationHandler<any, any, V, any, any>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
188
+ export declare function afterUpdate<V = object>(handler: UpdateOperationHandler<any, any, V>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
175
189
  /**
176
190
  * @description Decorator for handling post-create operations
177
191
  * @summary Defines a behavior to execute after create operations
178
192
  * @template V - Type for metadata, defaults to object
179
- * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
193
+ * @param {StandardOperationHandler<any, any, V>} handler - The method called after the operation
180
194
  * @param {V} [data] - Optional metadata to pass to the handler
181
195
  * @return {PropertyDecorator} A decorator that can be applied to class properties
182
196
  * @function afterCreate
183
197
  * @category Property Decorators
184
198
  */
185
- export declare function afterCreate<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
199
+ export declare function afterCreate<V = object>(handler: StandardOperationHandler<any, any, V>, data: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
186
200
  /**
187
201
  * @description Decorator for handling post-read operations
188
202
  * @summary Defines a behavior to execute after read operations
@@ -193,7 +207,7 @@ export declare function afterCreate<V = object>(handler: StandardOperationHandle
193
207
  * @function afterRead
194
208
  * @category Property Decorators
195
209
  */
196
- export declare function afterRead<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
210
+ export declare function afterRead<V = object>(handler: StandardOperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
197
211
  /**
198
212
  * @description Decorator for handling post-delete operations
199
213
  * @summary Defines a behavior to execute after delete operations
@@ -204,24 +218,24 @@ export declare function afterRead<V = object>(handler: StandardOperationHandler<
204
218
  * @function afterDelete
205
219
  * @category Property Decorators
206
220
  */
207
- export declare function afterDelete<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
221
+ export declare function afterDelete<V = object>(handler: StandardOperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
208
222
  /**
209
223
  * @description Decorator for handling post-operation for all operation types
210
224
  * @summary Defines a behavior to execute after any database operation
211
225
  * @template V - Type for metadata, defaults to object
212
- * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
226
+ * @param {StandardOperationHandler<any, any, V>} handler - The method called after the operation
213
227
  * @param {V} [data] - Optional metadata to pass to the handler
214
228
  * @return {PropertyDecorator} A decorator that can be applied to class properties
215
229
  * @function afterAny
216
230
  * @category Property Decorators
217
231
  */
218
- export declare function afterAny<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
232
+ export declare function afterAny<V = object>(handler: StandardOperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
219
233
  /**
220
234
  * @description Base decorator for handling post-operation behaviors
221
235
  * @summary Defines a behavior to execute after specified database operations
222
236
  * @template V - Type for metadata, defaults to object
223
237
  * @param {OperationKeys[] | DBOperations} [op=DBOperations.ALL] - One or more operation types to handle
224
- * @param {OperationHandler<any, any, V, any, any>} handler - The method called after the operation
238
+ * @param {OperationHandler<any, any, Vy>} handler - The method called after the operation
225
239
  * @param {V} [data] - Optional metadata to pass to the handler
226
240
  * @return {PropertyDecorator} A decorator that can be applied to class properties
227
241
  * @function after
@@ -233,14 +247,14 @@ export declare function afterAny<V = object>(handler: StandardOperationHandler<a
233
247
  * myProperty: string;
234
248
  * }
235
249
  */
236
- export declare function after<V = object>(op: OperationKeys[] | undefined, handler: OperationHandler<any, any, V, any, any>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
250
+ export declare function after<V = object>(op: OperationKeys[] | undefined, handler: OperationHandler<any, any, V>, data?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
237
251
  /**
238
252
  * @description Core decorator factory for operation handlers
239
253
  * @summary Creates decorators that register handlers for database operations
240
254
  * @template V - Type for metadata, defaults to object
241
255
  * @param {OperationKeys.ON | OperationKeys.AFTER} baseOp - Whether the handler runs during or after the operation
242
256
  * @param {OperationKeys[]} [operation=DBOperations.ALL] - The specific operations to handle
243
- * @param {OperationHandler<any, any, V, any, any>} handler - The handler function to execute
257
+ * @param {OperationHandler<any, any, V>} handler - The handler function to execute
244
258
  * @param {V} [dataToAdd] - Optional metadata to pass to the handler
245
259
  * @return {PropertyDecorator} A decorator that can be applied to class properties
246
260
  * @function operation
@@ -262,7 +276,7 @@ export declare function after<V = object>(op: OperationKeys[] | undefined, handl
262
276
  * Handler-->>Operations: Return result
263
277
  * Operations-->>Client: Return final result
264
278
  */
265
- export declare function operation<V = object>(baseOp: OperationKeys.ON | OperationKeys.AFTER, operation: OperationKeys[] | undefined, handler: OperationHandler<any, any, V, any, any>, dataToAdd?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
279
+ export declare function operation<V = object>(baseOp: OperationKeys.ON | OperationKeys.AFTER, operation: OperationKeys[] | undefined, handler: OperationHandler<any, any, V>, dataToAdd?: V, groupsort?: GroupSort): (target: any, propertyKey?: any) => void;
266
280
  /**
267
281
  * @description
268
282
  * Creates a higher-order function that attaches a metadata entry containing a handler
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/operations/decorators.ts"],"names":[],"mappings":";;;AA0FA,sDAwCC;AAUD,0CAoDC;AAUD,wCAWC;AAYD,wCAQC;AAWD,4BAMC;AAWD,4BAMC;AAYD,wBAMC;AAYD,4BAMC;AAYD,sBAMC;AAmBD,gBAOC;AAWD,8CAQC;AAYD,kCAMC;AAYD,kCAMC;AAYD,8BAMC;AAWD,kCAMC;AAYD,4BAMC;AAmBD,sBAOC;AA8BD,8BA2DC;AAyCD,oDAOC;AAlmBD,+CAKqB;AACrB,iDAA0C;AAK1C,uDAAqD;AACrD,qDAAqD;AACrD,qDAA+E;AAiB/E,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,gBAAgB,GAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AAiBlE;;;;;;;;GAQG;AACH,SAAS,MAAM,CACb,EAAiB,EACjB,OAAkD;IAElD,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QAC1C,uBAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACxD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,qBAAqB,CAOnC,KAAY,EACZ,UAA+C,EAC/C,MAAc;IAEd,MAAM,KAAK,GAAsB,EAAE,CAAC;IACpC,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAwB,UAAU,CAAC,IAAI,CAAC,CAAC;QACnD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB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AED,OAAO,KAAK,CAAC;QACf,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,OAAO,IAAA,kBAAK,EAAC,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,SAAgB,oBAAoB,CAClC,GAAW,EACX,OAAkC;IAElC,OAAO,CAAC,GAAG,MAAkB,EAAE,EAAE;QAC/B,OAAO,IAAA,qBAAQ,EAAC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACI,MAAM,eAAe,GAAG,CAAC,UAA4B,EAAE,EAAE,CAC9D,oBAAoB,CAClB,yBAAa,CAAC,OAAO,GAAG,yBAAa,CAAC,KAAK,EAC3C,CAAC,UAA4B,EAAE,SAAyB,EAAE,EAAE;IAC1D,OAAO,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC,CACF,CAAC,UAAU,CAAC,CAAC;AANH,QAAA,eAAe,mBAMZ"}
@@ -1,8 +1,7 @@
1
1
  import { OperationKeys } from "./constants";
2
2
  import { IRepository } from "../interfaces/IRepository";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { Context } from "../repository/Context";
5
- import { RepositoryFlags } from "../repository/types";
4
+ import { ContextOfRepository } from "../repository/index";
6
5
  /**
7
6
  * @description Metadata for database operations
8
7
  * @summary Contains information about an operation, its handler, and associated metadata
@@ -28,12 +27,12 @@ export type OperationMetadata<V> = {
28
27
  * @template C - Context type extending Context<F>
29
28
  * @memberOf module:db-decorators
30
29
  */
31
- export type OperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = StandardOperationHandler<M, R, V, F, C> | UpdateOperationHandler<M, R, V, F, C> | IdOperationHandler<M, R, V, F, C> | GroupOperationHandler<M, R, V, F, C> | GroupUpdateOperationHandler<M, R, V, F, C>;
32
- export type StandardOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = (this: R, context: C, metadata: V, key: keyof M, model: M) => Promise<void> | void;
33
- export type IdOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = (this: R, context: C, decorator: V, key: keyof M, id: string) => Promise<void> | void;
34
- export type UpdateOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = (this: R, context: C, decorator: V, key: keyof M, model: M, oldModel: M) => Promise<void> | void;
35
- export type GroupOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = (this: R, context: C, metadata: V[], keys: (keyof M)[], model: M) => Promise<void> | void;
36
- export type GroupUpdateOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = (this: R, context: C, decorator: V[], keys: (keyof M)[], model: M, oldModel: M) => Promise<void> | void;
30
+ export type OperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = StandardOperationHandler<M, R, V> | UpdateOperationHandler<M, R, V> | IdOperationHandler<M, R, V> | GroupOperationHandler<M, R, V> | GroupUpdateOperationHandler<M, R, V>;
31
+ export type StandardOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = (this: R, context: ContextOfRepository<R>, metadata: V, key: keyof M, model: M) => Promise<void> | void;
32
+ export type IdOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = (this: R, context: ContextOfRepository<R>, decorator: V, key: keyof M, id: string) => Promise<void> | void;
33
+ export type UpdateOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = (this: R, context: ContextOfRepository<R>, decorator: V, key: keyof M, model: M, oldModel: M) => Promise<void> | void;
34
+ export type GroupOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = (this: R, context: ContextOfRepository<R>, metadata: V[], keys: (keyof M)[], model: M) => Promise<void> | void;
35
+ export type GroupUpdateOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = (this: R, context: ContextOfRepository<R>, decorator: V[], keys: (keyof M)[], model: M, oldModel: M) => Promise<void> | void;
37
36
  /**
38
37
  * @description General handler type for database operations
39
38
  * @summary Function signature for handlers that process operations like create and read
@@ -46,7 +45,7 @@ export type GroupUpdateOperationHandler<M extends Model, R extends IRepository<M
46
45
  * @return {Promise<void> | void} Nothing or a Promise resolving to nothing
47
46
  * @memberOf module:db-decorators
48
47
  */
49
- export type GeneralOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = StandardOperationHandler<M, R, V, F, C> | GroupOperationHandler<M, R, V, F, C>;
48
+ export type GeneralOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = StandardOperationHandler<M, R, V> | GroupOperationHandler<M, R, V>;
50
49
  /**
51
50
  * @description General handler type for group update database operations
52
51
  * @summary Function signature for handlers that process update operations with both new and old model states
@@ -58,4 +57,4 @@ export type GeneralOperationHandler<M extends Model, R extends IRepository<M, F,
58
57
  * @typedef {Function} GeneralUpdateOperationHandler
59
58
  * @memberOf module:db-decorators
60
59
  */
61
- export type GeneralUpdateOperationHandler<M extends Model, R extends IRepository<M, F, C>, V = object, F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = UpdateOperationHandler<M, R, V, F, C> | GroupUpdateOperationHandler<M, R, V, F, C>;
60
+ export type GeneralUpdateOperationHandler<M extends Model, R extends IRepository<M, any>, V = object> = UpdateOperationHandler<M, R, V> | GroupUpdateOperationHandler<M, R, V>;
@@ -3,7 +3,7 @@ import "@decaf-ts/decorator-validation";
3
3
  declare module "@decaf-ts/decorator-validation" {
4
4
  interface Model {
5
5
  isTransient(): boolean;
6
- segregate<M extends Model>(this: M): {
6
+ segregate<M extends Model<boolean>>(this: M): {
7
7
  model: M;
8
8
  transient?: Record<keyof M, M[keyof M]>;
9
9
  };
@@ -24,8 +24,11 @@ declare module "@decaf-ts/decorator-validation" {
24
24
  * const idProp = Model.pk(newModel);
25
25
  * const id = Model.pk(newModel, true);
26
26
  */
27
- function pk<M>(model: M | Constructor<M>, keyValue?: boolean): any;
28
- function isTransient<M extends Model>(model: M | Constructor<M>): boolean;
27
+ function pk<M extends Model<boolean>>(model: M | Constructor<M>): keyof M;
28
+ function pk<M extends Model<boolean>>(model: M, keyValue: boolean): M[keyof M];
29
+ function pk<M extends Model<boolean>>(model: M | Constructor<M>, keyValue?: boolean): keyof M | M[keyof M];
30
+ function pkProps<M extends Model<boolean>>(model: Constructor<M>): any;
31
+ function isTransient<M extends Model<boolean>>(model: M | Constructor<M>): boolean;
29
32
  /**
30
33
  * @description Separates transient properties from a model
31
34
  * @summary Extracts properties marked as transient into a separate object
@@ -55,9 +58,18 @@ declare module "@decaf-ts/decorator-validation" {
55
58
  * modelToTransient-->>Caller: {model, transient}
56
59
  * end
57
60
  */
58
- function segregate<M extends Model>(model: M): {
61
+ function segregate<M extends Model<boolean>>(model: M): {
59
62
  model: M;
60
63
  transient?: Record<keyof M, M[keyof M]>;
61
64
  };
65
+ /**
66
+ * @description Merges two model instances into a new instance.
67
+ * @summary Creates a new model instance by combining properties from an old model and a new model.
68
+ * Properties from the new model override properties from the old model if they are defined.
69
+ * @param {M} oldModel - The original model instance
70
+ * @param {M} model - The new model instance with updated properties
71
+ * @return {M} A new model instance with merged properties
72
+ */
73
+ function merge<M extends Model<boolean>>(oldModel: M, newModel: M, constructor?: Constructor<M>): M;
62
74
  }
63
75
  }
@@ -85,9 +85,30 @@ decorator_validation_1.Model.pk = function (model, keyValue = false) {
85
85
  return model[key];
86
86
  throw new Error("Cannot get the value of the pk from the constructor");
87
87
  }.bind(decorator_validation_1.Model);
88
+ decorator_validation_1.Model.pkProps = function (model) {
89
+ return decoration_1.Metadata.get(model, decoration_1.Metadata.key(constants_1.DBKeys.ID, decorator_validation_1.Model.pk(model)));
90
+ }.bind(decorator_validation_1.Model);
88
91
  decorator_validation_1.Model.isTransient = function isTransient(model) {
89
92
  return decoration_1.Metadata.isTransient(model);
90
93
  }.bind(decorator_validation_1.Model);
94
+ /**
95
+ * @description Merges two model instances into a new instance.
96
+ * @summary Creates a new model instance by combining properties from an old model and a new model.
97
+ * Properties from the new model override properties from the old model if they are defined.
98
+ * @template {M} - Type extending Model
99
+ * @param {M} oldModel - The original model instance
100
+ * @param {M} model - The new model instance with updated properties
101
+ * @return {M} A new model instance with merged properties
102
+ */
103
+ decorator_validation_1.Model.merge = function merge(oldModel, newModel, constructor) {
104
+ constructor = constructor || oldModel.constructor;
105
+ const extract = (model) => Object.entries(model).reduce((accum, [key, val]) => {
106
+ if (typeof val !== "undefined")
107
+ accum[key] = val;
108
+ return accum;
109
+ }, {});
110
+ return new constructor(Object.assign({}, extract(oldModel), extract(newModel)));
111
+ }.bind(decorator_validation_1.Model);
91
112
  decoration_1.Metadata.saveOperation = function (model, propertyKey, operation, metadata) {
92
113
  if (!propertyKey)
93
114
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../src/overrides/overrides.ts"],"names":[],"mappings":";;AAAA,yEAIwC;AACxC,0DAAsD;AACtD,qDAA6D;AAC7D,wDAA4C;AAC5C,6DAA0D;AAC1D,uDAA0D;AAE1D,4BAAK,CAAC,SAAS,CAAC,WAAW,GAAG;IAC5B,OAAO,qBAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACH,4BAAK,CAAC,SAAS,CAAC,SAAS,GAAG,UAE1B,eAAyB,EACzB,GAAG,UAAiB;IAEpB,IAAI,eAAe,IAAI,CAAC,CAAC,eAAe,Y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