@decaf-ts/db-decorators 0.6.0 → 0.6.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.
Files changed (141) hide show
  1. package/LICENSE.md +21 -157
  2. package/README.md +571 -10
  3. package/dist/db-decorators.cjs +1375 -327
  4. package/dist/db-decorators.esm.cjs +1375 -328
  5. package/lib/esm/identity/decorators.d.ts +7 -0
  6. package/lib/esm/identity/decorators.js +11 -4
  7. package/lib/esm/identity/index.js +3 -3
  8. package/lib/esm/identity/utils.d.ts +36 -23
  9. package/lib/esm/identity/utils.js +38 -25
  10. package/lib/esm/index.d.ts +12 -27
  11. package/lib/esm/index.js +13 -28
  12. package/lib/esm/interfaces/BulkCrudOperator.d.ts +39 -0
  13. package/lib/esm/interfaces/BulkCrudOperator.js +1 -1
  14. package/lib/esm/interfaces/Contextual.d.ts +19 -2
  15. package/lib/esm/interfaces/Contextual.js +1 -1
  16. package/lib/esm/interfaces/CrudOperator.d.ts +26 -23
  17. package/lib/esm/interfaces/CrudOperator.js +1 -1
  18. package/lib/esm/interfaces/IRepository.d.ts +10 -2
  19. package/lib/esm/interfaces/IRepository.js +1 -1
  20. package/lib/esm/interfaces/index.js +5 -5
  21. package/lib/esm/model/constants.d.ts +11 -13
  22. package/lib/esm/model/constants.js +12 -14
  23. package/lib/esm/model/decorators.d.ts +112 -23
  24. package/lib/esm/model/decorators.js +119 -29
  25. package/lib/esm/model/index.d.ts +1 -0
  26. package/lib/esm/model/index.js +7 -6
  27. package/lib/esm/model/model.d.ts +2 -141
  28. package/lib/esm/model/model.js +2 -13
  29. package/lib/esm/model/overrides.d.ts +1 -0
  30. package/lib/esm/model/overrides.js +23 -0
  31. package/lib/esm/model/utils.d.ts +39 -0
  32. package/lib/esm/model/utils.js +43 -4
  33. package/lib/esm/model/validation.d.ts +26 -8
  34. package/lib/esm/model/validation.js +29 -11
  35. package/lib/esm/operations/Operations.d.ts +65 -3
  36. package/lib/esm/operations/Operations.js +68 -6
  37. package/lib/esm/operations/OperationsRegistry.d.ts +44 -16
  38. package/lib/esm/operations/OperationsRegistry.js +46 -18
  39. package/lib/esm/operations/constants.d.ts +34 -8
  40. package/lib/esm/operations/constants.js +23 -9
  41. package/lib/esm/operations/decorators.d.ts +140 -134
  42. package/lib/esm/operations/decorators.js +152 -137
  43. package/lib/esm/operations/index.js +6 -6
  44. package/lib/esm/operations/types.d.ts +10 -0
  45. package/lib/esm/operations/types.js +1 -1
  46. package/lib/esm/repository/BaseRepository.d.ts +324 -0
  47. package/lib/esm/repository/BaseRepository.js +309 -9
  48. package/lib/esm/repository/Context.d.ts +153 -2
  49. package/lib/esm/repository/Context.js +154 -6
  50. package/lib/esm/repository/Repository.d.ts +89 -0
  51. package/lib/esm/repository/Repository.js +96 -7
  52. package/lib/esm/repository/constants.d.ts +7 -0
  53. package/lib/esm/repository/constants.js +9 -1
  54. package/lib/esm/repository/errors.d.ts +61 -34
  55. package/lib/esm/repository/errors.js +62 -35
  56. package/lib/esm/repository/index.js +9 -9
  57. package/lib/esm/repository/types.d.ts +26 -0
  58. package/lib/esm/repository/types.js +1 -1
  59. package/lib/esm/repository/utils.d.ts +11 -0
  60. package/lib/esm/repository/utils.js +7 -7
  61. package/lib/esm/repository/wrappers.d.ts +2 -2
  62. package/lib/esm/repository/wrappers.js +5 -5
  63. package/lib/esm/validation/constants.d.ts +20 -5
  64. package/lib/esm/validation/constants.js +22 -7
  65. package/lib/esm/validation/decorators.d.ts +101 -19
  66. package/lib/esm/validation/decorators.js +109 -27
  67. package/lib/esm/validation/index.js +5 -5
  68. package/lib/esm/validation/validation.js +10 -2
  69. package/lib/esm/validation/validators/ReadOnlyValidator.d.ts +32 -8
  70. package/lib/esm/validation/validators/ReadOnlyValidator.js +34 -10
  71. package/lib/esm/validation/validators/TimestampValidator.d.ts +37 -3
  72. package/lib/esm/validation/validators/TimestampValidator.js +39 -5
  73. package/lib/esm/validation/validators/UpdateValidator.d.ts +28 -11
  74. package/lib/esm/validation/validators/UpdateValidator.js +23 -8
  75. package/lib/esm/validation/validators/index.js +4 -4
  76. package/lib/identity/decorators.cjs +8 -1
  77. package/lib/identity/decorators.d.ts +7 -0
  78. package/lib/identity/utils.cjs +35 -22
  79. package/lib/identity/utils.d.ts +36 -23
  80. package/lib/index.cjs +14 -28
  81. package/lib/index.d.ts +12 -27
  82. package/lib/interfaces/BulkCrudOperator.cjs +1 -1
  83. package/lib/interfaces/BulkCrudOperator.d.ts +39 -0
  84. package/lib/interfaces/Contextual.cjs +1 -1
  85. package/lib/interfaces/Contextual.d.ts +19 -2
  86. package/lib/interfaces/CrudOperator.cjs +1 -1
  87. package/lib/interfaces/CrudOperator.d.ts +26 -23
  88. package/lib/interfaces/IRepository.cjs +1 -1
  89. package/lib/interfaces/IRepository.d.ts +10 -2
  90. package/lib/model/constants.cjs +12 -14
  91. package/lib/model/constants.d.ts +11 -13
  92. package/lib/model/decorators.cjs +114 -24
  93. package/lib/model/decorators.d.ts +112 -23
  94. package/lib/model/index.cjs +2 -1
  95. package/lib/model/index.d.ts +1 -0
  96. package/lib/model/model.cjs +1 -13
  97. package/lib/model/model.d.ts +2 -141
  98. package/lib/model/overrides.cjs +25 -0
  99. package/lib/model/overrides.d.ts +1 -0
  100. package/lib/model/utils.cjs +41 -2
  101. package/lib/model/utils.d.ts +39 -0
  102. package/lib/model/validation.cjs +27 -9
  103. package/lib/model/validation.d.ts +26 -8
  104. package/lib/operations/Operations.cjs +66 -4
  105. package/lib/operations/Operations.d.ts +65 -3
  106. package/lib/operations/OperationsRegistry.cjs +45 -17
  107. package/lib/operations/OperationsRegistry.d.ts +44 -16
  108. package/lib/operations/constants.cjs +24 -10
  109. package/lib/operations/constants.d.ts +34 -8
  110. package/lib/operations/decorators.cjs +150 -135
  111. package/lib/operations/decorators.d.ts +140 -134
  112. package/lib/operations/types.cjs +1 -1
  113. package/lib/operations/types.d.ts +10 -0
  114. package/lib/repository/BaseRepository.cjs +303 -3
  115. package/lib/repository/BaseRepository.d.ts +324 -0
  116. package/lib/repository/Context.cjs +153 -5
  117. package/lib/repository/Context.d.ts +153 -2
  118. package/lib/repository/Repository.cjs +90 -1
  119. package/lib/repository/Repository.d.ts +89 -0
  120. package/lib/repository/constants.cjs +9 -1
  121. package/lib/repository/constants.d.ts +7 -0
  122. package/lib/repository/errors.cjs +62 -35
  123. package/lib/repository/errors.d.ts +61 -34
  124. package/lib/repository/types.cjs +1 -1
  125. package/lib/repository/types.d.ts +26 -0
  126. package/lib/repository/utils.cjs +3 -3
  127. package/lib/repository/utils.d.ts +11 -0
  128. package/lib/repository/wrappers.cjs +3 -3
  129. package/lib/repository/wrappers.d.ts +2 -2
  130. package/lib/validation/constants.cjs +21 -6
  131. package/lib/validation/constants.d.ts +20 -5
  132. package/lib/validation/decorators.cjs +102 -20
  133. package/lib/validation/decorators.d.ts +101 -19
  134. package/lib/validation/validation.cjs +9 -1
  135. package/lib/validation/validators/ReadOnlyValidator.cjs +33 -9
  136. package/lib/validation/validators/ReadOnlyValidator.d.ts +32 -8
  137. package/lib/validation/validators/TimestampValidator.cjs +38 -4
  138. package/lib/validation/validators/TimestampValidator.d.ts +37 -3
  139. package/lib/validation/validators/UpdateValidator.cjs +23 -8
  140. package/lib/validation/validators/UpdateValidator.d.ts +28 -11
  141. package/package.json +2 -2
@@ -1,193 +1,199 @@
1
1
  import { IdOperationHandler, OperationHandler, StandardOperationHandler, UpdateOperationHandler } from "./types";
2
2
  import { OperationKeys } from "./constants";
3
3
  /**
4
- * @summary Defines a behaviour to set on the defined {@link DBOperations.CREATE_UPDATE}
5
- *
6
- * @param {OnOperationHandler<any>} handler The method called upon the operation
7
- * @param data
8
- * @param {any[]} [args] Arguments that will be passed in order to the handler method
9
- *
10
- * @see on
11
- *
4
+ * @description Decorator for handling create and update operations
5
+ * @summary Defines a behavior to execute during both create and update operations
6
+ * @template V - Type for metadata, defaults to object
7
+ * @param {StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
8
+ * @param {V} [data] - Optional metadata to pass to the handler
9
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
12
10
  * @function onCreateUpdate
13
- *
14
- * @category Decorators
11
+ * @category Property Decorators
15
12
  */
16
13
  export declare function onCreateUpdate<V = object>(handler: StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
17
14
  /**
18
- * @summary Defines a behaviour to set on the defined {@link DBOperations.UPDATE}
19
- *
20
- * @param {OnOperationHandler<any>} handler The method called upon the operation
21
- * @param data
22
- * @param {any[]} [args] Arguments that will be passed in order to the handler method
23
- *
24
- * @see on
25
- *
15
+ * @description Decorator for handling update operations
16
+ * @summary Defines a behavior to execute during update operations
17
+ * @template V - Type for metadata, defaults to object
18
+ * @param {UpdateOperationHandler<any, any, V, any>} handler - The method called upon the operation
19
+ * @param {V} [data] - Optional metadata to pass to the handler
20
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
26
21
  * @function onUpdate
27
- *
28
- * @category Decorators
22
+ * @category Property Decorators
29
23
  */
30
24
  export declare function onUpdate<V = object>(handler: UpdateOperationHandler<any, any, V, any>, data?: V): (target: object, propertyKey?: any) => void;
31
25
  /**
32
- * @summary Defines a behaviour to set on the defined {@link DBOperations.CREATE}
33
- *
34
- * @param {OnOperationHandler<any>} handler The method called upon the operation
35
- * @param data
36
- *
37
- * @see on
38
- *
26
+ * @description Decorator for handling create operations
27
+ * @summary Defines a behavior to execute during create operations
28
+ * @template V - Type for metadata, defaults to object
29
+ * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
30
+ * @param {V} [data] - Optional metadata to pass to the handler
31
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
39
32
  * @function onCreate
40
- *
41
- * @category Decorators
33
+ * @category Property Decorators
42
34
  */
43
35
  export declare function onCreate<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
44
36
  /**
45
- * @summary Defines a behaviour to set on the defined {@link DBOperations.READ}
46
- *
47
- * @param {OnOperationHandler<any>} handler The method called upon the operation
48
- * @param data
49
- *
50
- * @see on
51
- *
37
+ * @description Decorator for handling read operations
38
+ * @summary Defines a behavior to execute during read operations
39
+ * @template V - Type for metadata, defaults to object
40
+ * @param {IdOperationHandler<any, any, V, any, any>} handler - The method called upon the operation
41
+ * @param {V} [data] - Optional metadata to pass to the handler
42
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
52
43
  * @function onRead
53
- *
54
- * @category Decorators
44
+ * @category Property Decorators
55
45
  */
56
46
  export declare function onRead<V = object>(handler: IdOperationHandler<any, any, V, any, any>, data: V): (target: object, propertyKey?: any) => void;
57
47
  /**
58
- * @summary Defines a behaviour to set on the defined {@link DBOperations.DELETE}
59
- *
60
- * @param {OnOperationHandler<any>} handler The method called upon the operation
61
- * @param data
62
- *
63
- * @see on
64
- *
48
+ * @description Decorator for handling delete operations
49
+ * @summary Defines a behavior to execute during delete operations
50
+ * @template V - Type for metadata, defaults to object
51
+ * @param {OperationHandler<any, any, V, any, any>} handler - The method called upon the operation
52
+ * @param {V} [data] - Optional metadata to pass to the handler
53
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
65
54
  * @function onDelete
66
- *
67
- * @category Decorators
55
+ * @category Property Decorators
68
56
  */
69
57
  export declare function onDelete<V = object>(handler: OperationHandler<any, any, V, any, any>, data: V): (target: object, propertyKey?: any) => void;
70
58
  /**
71
- * @summary Defines a behaviour to set on the defined {@link DBOperations.DELETE}
72
- *
73
- * @param {OnOperationHandler<any>} handler The method called upon the operation
74
- * @param data
75
- *
76
- * @see on
77
- *
59
+ * @description Decorator for handling all operation types
60
+ * @summary Defines a behavior to execute during any database operation
61
+ * @template V - Type for metadata, defaults to object
62
+ * @param {OperationHandler<any, any, V, any, any>} handler - The method called upon the operation
63
+ * @param {V} [data] - Optional metadata to pass to the handler
64
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
78
65
  * @function onAny
79
- *
80
- * @category Decorators
66
+ * @category Property Decorators
81
67
  */
82
68
  export declare function onAny<V = object>(handler: OperationHandler<any, any, V, any, any>, data: V): (target: object, propertyKey?: any) => void;
83
69
  /**
84
- * @summary Defines a behaviour to set on the defined {@link DBOperations}
85
- *
86
- * @param {OperationKeys[] | DBOperations} op One of {@link DBOperations}
87
- * @param {OnOperationHandler<any>} handler The method called upon the operation
88
- * @param data
89
- *
90
- * ex: handler(...args, ...props.map(p => target[p]))
91
- *
70
+ * @description Base decorator for handling database operations
71
+ * @summary Defines a behavior to execute during specified database operations
72
+ * @template V - Type for metadata, defaults to object
73
+ * @param {OperationKeys[] | DBOperations} [op=DBOperations.ALL] - One or more operation types to handle
74
+ * @param {OperationHandler<any, any, V, any, any>} handler - The method called upon the operation
75
+ * @param {V} [data] - Optional metadata to pass to the handler
76
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
92
77
  * @function on
93
- *
94
- * @category Decorators
78
+ * @category Property Decorators
79
+ * @example
80
+ * // Example usage:
81
+ * class MyModel {
82
+ * @on(DBOperations.CREATE, myHandler)
83
+ * myProperty: string;
84
+ * }
95
85
  */
96
86
  export declare function on<V = object>(op: OperationKeys[] | undefined, handler: OperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
97
87
  /**
98
- * @summary Defines a behaviour to set after the defined {@link DBOperations.CREATE_UPDATE}
99
- *
100
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
101
- * @param data
102
- *
103
- * @see after
104
- *
88
+ * @description Decorator for handling post-create and post-update operations
89
+ * @summary Defines a behavior to execute after both create and update operations
90
+ * @template V - Type for metadata, defaults to object
91
+ * @param {StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
92
+ * @param {V} [data] - Optional metadata to pass to the handler
93
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
105
94
  * @function afterCreateUpdate
106
- *
107
- * @category Decorators
95
+ * @category Property Decorators
108
96
  */
109
97
  export declare function afterCreateUpdate<V = object>(handler: StandardOperationHandler<any, any, V, any, any> | UpdateOperationHandler<any, any, V, any, any>, data: V): (target: object, propertyKey?: any) => void;
110
98
  /**
111
- * @summary Defines a behaviour to set after the defined {@link DBOperations.UPDATE}
112
- *
113
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
114
- * @param data
115
- *
116
- * @see after
117
- *
99
+ * @description Decorator for handling post-update operations
100
+ * @summary Defines a behavior to execute after update operations
101
+ * @template V - Type for metadata, defaults to object
102
+ * @param {UpdateOperationHandler<any, any, V, any, any>} handler - The method called after the operation
103
+ * @param {V} [data] - Optional metadata to pass to the handler
104
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
118
105
  * @function afterUpdate
119
- *
120
- * @category Decorators
106
+ * @category Property Decorators
121
107
  */
122
108
  export declare function afterUpdate<V = object>(handler: UpdateOperationHandler<any, any, V, any, any>, data: V): (target: object, propertyKey?: any) => void;
123
109
  /**
124
- * @summary Defines a behaviour to set after the defined {@link DBOperations.CREATE}
125
- *
126
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
127
- * @param data
128
- *
129
- * @see after
130
- *
110
+ * @description Decorator for handling post-create operations
111
+ * @summary Defines a behavior to execute after create operations
112
+ * @template V - Type for metadata, defaults to object
113
+ * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
114
+ * @param {V} [data] - Optional metadata to pass to the handler
115
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
131
116
  * @function afterCreate
132
- *
133
- * @category Decorators
117
+ * @category Property Decorators
134
118
  */
135
119
  export declare function afterCreate<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data: V): (target: object, propertyKey?: any) => void;
136
120
  /**
137
- * @summary Defines a behaviour to set after the defined {@link DBOperations.READ}
138
- *
139
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
140
- * @param data
141
- * @param {any[]} [args] Arguments that will be passed in order to the handler method
142
- *
143
- * @see after
144
- *
121
+ * @description Decorator for handling post-read operations
122
+ * @summary Defines a behavior to execute after read operations
123
+ * @template V - Type for metadata, defaults to object
124
+ * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
125
+ * @param {V} [data] - Optional metadata to pass to the handler
126
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
145
127
  * @function afterRead
146
- *
147
- * @category Decorators
128
+ * @category Property Decorators
148
129
  */
149
130
  export declare function afterRead<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
150
131
  /**
151
- * @summary Defines a behaviour to set after the defined {@link DBOperations.DELETE}
152
- *
153
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
154
- * @param data
155
- * @param {any[]} [args] Arguments that will be passed in order to the handler method
156
- *
157
- * @see after
158
- *
132
+ * @description Decorator for handling post-delete operations
133
+ * @summary Defines a behavior to execute after delete operations
134
+ * @template V - Type for metadata, defaults to object
135
+ * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
136
+ * @param {V} [data] - Optional metadata to pass to the handler
137
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
159
138
  * @function afterDelete
160
- *
161
- * @category Decorators
139
+ * @category Property Decorators
162
140
  */
163
141
  export declare function afterDelete<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
164
142
  /**
165
- * @summary Defines a behaviour to set after the defined {@link DBOperations.DELETE}
166
- *
167
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
168
- * @param data
169
- * @param {any[]} [args] Arguments that will be passed in order to the handler method
170
- *
171
- * @see after
172
- *
143
+ * @description Decorator for handling post-operation for all operation types
144
+ * @summary Defines a behavior to execute after any database operation
145
+ * @template V - Type for metadata, defaults to object
146
+ * @param {StandardOperationHandler<any, any, V, any, any>} handler - The method called after the operation
147
+ * @param {V} [data] - Optional metadata to pass to the handler
148
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
173
149
  * @function afterAny
174
- *
175
- * @category Decorators
150
+ * @category Property Decorators
176
151
  */
177
152
  export declare function afterAny<V = object>(handler: StandardOperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
178
153
  /**
179
- * @summary Defines a behaviour to set on the defined {@link DBOperations}
180
- *
181
- * @param {OperationKeys[] | DBOperations} op One of {@link DBOperations}
182
- * @param {AfterOperationHandler<any>} handler The method called upon the operation
183
- *
184
- * ex: handler(...args, ...props.map(p => target[p]))
185
- *
186
- * @param data
187
- * @param args
154
+ * @description Base decorator for handling post-operation behaviors
155
+ * @summary Defines a behavior to execute after specified database operations
156
+ * @template V - Type for metadata, defaults to object
157
+ * @param {OperationKeys[] | DBOperations} [op=DBOperations.ALL] - One or more operation types to handle
158
+ * @param {OperationHandler<any, any, V, any, any>} handler - The method called after the operation
159
+ * @param {V} [data] - Optional metadata to pass to the handler
160
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
188
161
  * @function after
189
- *
190
- * @category Decorators
162
+ * @category Property Decorators
163
+ * @example
164
+ * // Example usage:
165
+ * class MyModel {
166
+ * @after(DBOperations.CREATE, myHandler)
167
+ * myProperty: string;
168
+ * }
191
169
  */
192
170
  export declare function after<V = object>(op: OperationKeys[] | undefined, handler: OperationHandler<any, any, V, any, any>, data?: V): (target: object, propertyKey?: any) => void;
171
+ /**
172
+ * @description Core decorator factory for operation handlers
173
+ * @summary Creates decorators that register handlers for database operations
174
+ * @template V - Type for metadata, defaults to object
175
+ * @param {OperationKeys.ON | OperationKeys.AFTER} baseOp - Whether the handler runs during or after the operation
176
+ * @param {OperationKeys[]} [operation=DBOperations.ALL] - The specific operations to handle
177
+ * @param {OperationHandler<any, any, V, any, any>} handler - The handler function to execute
178
+ * @param {V} [dataToAdd] - Optional metadata to pass to the handler
179
+ * @return {PropertyDecorator} A decorator that can be applied to class properties
180
+ * @function operation
181
+ * @category Property Decorators
182
+ * @mermaid
183
+ * sequenceDiagram
184
+ * participant Client
185
+ * participant Decorator as @operation
186
+ * participant Operations as Operations Registry
187
+ * participant Handler
188
+ *
189
+ * Client->>Decorator: Apply to property
190
+ * Decorator->>Operations: Register handler
191
+ * Decorator->>Decorator: Store metadata
192
+ *
193
+ * Note over Client,Handler: Later, during operation execution
194
+ * Client->>Operations: Execute operation
195
+ * Operations->>Handler: Call registered handler
196
+ * Handler-->>Operations: Return result
197
+ * Operations-->>Client: Return final result
198
+ */
193
199
  export declare function operation<V = object>(baseOp: OperationKeys.ON | OperationKeys.AFTER, operation: OperationKeys[] | undefined, handler: OperationHandler<any, any, V, any, any>, dataToAdd?: V): (target: object, propertyKey?: any) => void;