@decaf-ts/db-decorators 0.12.0 → 0.14.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.
Files changed (203) hide show
  1. package/lib/cjs/identity/decorators.cjs +5 -4
  2. package/lib/cjs/identity/decorators.cjs.map +1 -0
  3. package/lib/cjs/identity/index.cjs +1 -0
  4. package/lib/cjs/identity/index.cjs.map +1 -0
  5. package/lib/cjs/index.cjs +2 -1
  6. package/lib/cjs/index.cjs.map +1 -0
  7. package/lib/cjs/interfaces/BulkCrudOperator.cjs +1 -0
  8. package/lib/cjs/interfaces/BulkCrudOperator.cjs.map +1 -0
  9. package/lib/cjs/interfaces/Contextual.cjs +1 -0
  10. package/lib/cjs/interfaces/Contextual.cjs.map +1 -0
  11. package/lib/cjs/interfaces/CrudOperator.cjs +1 -0
  12. package/lib/cjs/interfaces/CrudOperator.cjs.map +1 -0
  13. package/lib/cjs/interfaces/IRepository.cjs +1 -0
  14. package/lib/cjs/interfaces/IRepository.cjs.map +1 -0
  15. package/lib/cjs/interfaces/index.cjs +1 -0
  16. package/lib/cjs/interfaces/index.cjs.map +1 -0
  17. package/lib/cjs/model/constants.cjs +1 -0
  18. package/lib/cjs/model/constants.cjs.map +1 -0
  19. package/lib/cjs/model/decorators.cjs +25 -24
  20. package/lib/cjs/model/decorators.cjs.map +1 -0
  21. package/lib/cjs/model/index.cjs +1 -0
  22. package/lib/cjs/model/index.cjs.map +1 -0
  23. package/lib/cjs/model/model.cjs +1 -0
  24. package/lib/cjs/model/model.cjs.map +1 -0
  25. package/lib/cjs/model/validation.cjs +1 -0
  26. package/lib/cjs/model/validation.cjs.map +1 -0
  27. package/lib/cjs/operations/Operations.cjs +6 -5
  28. package/lib/cjs/operations/Operations.cjs.map +1 -0
  29. package/lib/cjs/operations/OperationsRegistry.cjs +1 -0
  30. package/lib/cjs/operations/OperationsRegistry.cjs.map +1 -0
  31. package/lib/cjs/operations/constants.cjs +15 -39
  32. package/lib/cjs/operations/constants.cjs.map +1 -0
  33. package/lib/cjs/operations/decorators.cjs +42 -41
  34. package/lib/cjs/operations/decorators.cjs.map +1 -0
  35. package/lib/cjs/operations/index.cjs +1 -0
  36. package/lib/cjs/operations/index.cjs.map +1 -0
  37. package/lib/cjs/operations/types.cjs +1 -0
  38. package/lib/cjs/operations/types.cjs.map +1 -0
  39. package/lib/cjs/overrides/Metadata.cjs +1 -0
  40. package/lib/cjs/overrides/Metadata.cjs.map +1 -0
  41. package/lib/cjs/overrides/Model.cjs +1 -0
  42. package/lib/cjs/overrides/Model.cjs.map +1 -0
  43. package/lib/cjs/overrides/ModelBuilderExtensions.cjs +8 -7
  44. package/lib/cjs/overrides/ModelBuilderExtensions.cjs.map +1 -0
  45. package/lib/cjs/overrides/index.cjs +1 -0
  46. package/lib/cjs/overrides/index.cjs.map +1 -0
  47. package/lib/cjs/overrides/overrides.cjs +21 -20
  48. package/lib/cjs/overrides/overrides.cjs.map +1 -0
  49. package/lib/cjs/repository/Context.cjs +3 -2
  50. package/lib/cjs/repository/Context.cjs.map +1 -0
  51. package/lib/cjs/repository/Repository.cjs +42 -41
  52. package/lib/cjs/repository/Repository.cjs.map +1 -0
  53. package/lib/cjs/repository/constants.cjs +1 -0
  54. package/lib/cjs/repository/constants.cjs.map +1 -0
  55. package/lib/cjs/repository/errors.cjs +1 -0
  56. package/lib/cjs/repository/errors.cjs.map +1 -0
  57. package/lib/cjs/repository/index.cjs +1 -0
  58. package/lib/cjs/repository/index.cjs.map +1 -0
  59. package/lib/cjs/repository/types.cjs +1 -0
  60. package/lib/cjs/repository/types.cjs.map +1 -0
  61. package/lib/cjs/repository/utils.cjs +10 -9
  62. package/lib/cjs/repository/utils.cjs.map +1 -0
  63. package/lib/cjs/repository/wrappers.cjs +8 -7
  64. package/lib/cjs/repository/wrappers.cjs.map +1 -0
  65. package/lib/cjs/validation/constants.cjs +4 -3
  66. package/lib/cjs/validation/constants.cjs.map +1 -0
  67. package/lib/cjs/validation/decorators.cjs +22 -21
  68. package/lib/cjs/validation/decorators.cjs.map +1 -0
  69. package/lib/cjs/validation/index.cjs +1 -0
  70. package/lib/cjs/validation/index.cjs.map +1 -0
  71. package/lib/cjs/validation/validation.cjs +3 -2
  72. package/lib/cjs/validation/validation.cjs.map +1 -0
  73. package/lib/cjs/validation/validators/ReadOnlyValidator.cjs +14 -8
  74. package/lib/cjs/validation/validators/ReadOnlyValidator.cjs.map +1 -0
  75. package/lib/cjs/validation/validators/TimestampValidator.cjs +14 -8
  76. package/lib/cjs/validation/validators/TimestampValidator.cjs.map +1 -0
  77. package/lib/cjs/validation/validators/UpdateValidator.cjs +1 -0
  78. package/lib/cjs/validation/validators/UpdateValidator.cjs.map +1 -0
  79. package/lib/cjs/validation/validators/index.cjs +1 -0
  80. package/lib/cjs/validation/validators/index.cjs.map +1 -0
  81. package/lib/esm/index.js +1 -1
  82. package/lib/types/identity/decorators.d.cts +8 -0
  83. package/lib/types/identity/decorators.d.mts +8 -0
  84. package/lib/types/identity/index.d.cts +6 -0
  85. package/lib/types/identity/index.d.mts +6 -0
  86. package/lib/types/index.d.cts +15 -0
  87. package/lib/types/index.d.mts +15 -0
  88. package/lib/types/index.d.ts +1 -1
  89. package/lib/types/interfaces/BulkCrudOperator.d.cts +47 -0
  90. package/lib/types/interfaces/BulkCrudOperator.d.mts +47 -0
  91. package/lib/types/interfaces/Contextual.d.cts +23 -0
  92. package/lib/types/interfaces/Contextual.d.mts +23 -0
  93. package/lib/types/interfaces/CrudOperator.d.cts +46 -0
  94. package/lib/types/interfaces/CrudOperator.d.mts +46 -0
  95. package/lib/types/interfaces/IRepository.d.cts +19 -0
  96. package/lib/types/interfaces/IRepository.d.mts +19 -0
  97. package/lib/types/interfaces/index.d.cts +9 -0
  98. package/lib/types/interfaces/index.d.mts +9 -0
  99. package/lib/types/model/constants.d.cts +37 -0
  100. package/lib/types/model/constants.d.mts +37 -0
  101. package/lib/types/model/decorators.d.cts +145 -0
  102. package/lib/types/model/decorators.d.mts +145 -0
  103. package/lib/types/model/index.d.cts +9 -0
  104. package/lib/types/model/index.d.mts +9 -0
  105. package/lib/types/model/model.d.cts +6 -0
  106. package/lib/types/model/model.d.mts +6 -0
  107. package/lib/types/model/validation.d.cts +57 -0
  108. package/lib/types/model/validation.d.mts +57 -0
  109. package/lib/types/operations/Operations.d.cts +80 -0
  110. package/lib/types/operations/Operations.d.mts +80 -0
  111. package/lib/types/operations/OperationsRegistry.d.cts +72 -0
  112. package/lib/types/operations/OperationsRegistry.d.mts +72 -0
  113. package/lib/types/operations/constants.d.cts +106 -0
  114. package/lib/types/operations/constants.d.mts +106 -0
  115. package/lib/types/operations/decorators.d.cts +348 -0
  116. package/lib/types/operations/decorators.d.mts +348 -0
  117. package/lib/types/operations/index.d.cts +10 -0
  118. package/lib/types/operations/index.d.mts +10 -0
  119. package/lib/types/operations/types.d.cts +60 -0
  120. package/lib/types/operations/types.d.mts +60 -0
  121. package/lib/types/overrides/Metadata.d.cts +54 -0
  122. package/lib/types/overrides/Metadata.d.mts +54 -0
  123. package/lib/types/overrides/Model.d.cts +84 -0
  124. package/lib/types/overrides/Model.d.mts +84 -0
  125. package/lib/types/overrides/ModelBuilderExtensions.d.cts +15 -0
  126. package/lib/types/overrides/ModelBuilderExtensions.d.mts +15 -0
  127. package/lib/types/overrides/index.d.cts +10 -0
  128. package/lib/types/overrides/index.d.mts +10 -0
  129. package/lib/types/overrides/overrides.d.cts +1 -0
  130. package/lib/types/overrides/overrides.d.mts +1 -0
  131. package/lib/types/repository/Context.d.cts +112 -0
  132. package/lib/types/repository/Context.d.mts +112 -0
  133. package/lib/types/repository/Repository.d.cts +352 -0
  134. package/lib/types/repository/Repository.d.mts +352 -0
  135. package/lib/types/repository/constants.d.cts +9 -0
  136. package/lib/types/repository/constants.d.mts +9 -0
  137. package/lib/types/repository/errors.d.cts +126 -0
  138. package/lib/types/repository/errors.d.mts +126 -0
  139. package/lib/types/repository/index.d.cts +12 -0
  140. package/lib/types/repository/index.d.mts +12 -0
  141. package/lib/types/repository/types.d.cts +62 -0
  142. package/lib/types/repository/types.d.mts +62 -0
  143. package/lib/types/repository/utils.d.cts +34 -0
  144. package/lib/types/repository/utils.d.mts +34 -0
  145. package/lib/types/repository/wrappers.d.cts +39 -0
  146. package/lib/types/repository/wrappers.d.mts +39 -0
  147. package/lib/types/validation/constants.d.cts +45 -0
  148. package/lib/types/validation/constants.d.mts +45 -0
  149. package/lib/types/validation/decorators.d.cts +143 -0
  150. package/lib/types/validation/decorators.d.mts +143 -0
  151. package/lib/types/validation/index.d.cts +4 -0
  152. package/lib/types/validation/index.d.mts +4 -0
  153. package/lib/types/validation/validation.d.cts +41 -0
  154. package/lib/types/validation/validation.d.mts +41 -0
  155. package/lib/types/validation/validators/ReadOnlyValidator.d.cts +47 -0
  156. package/lib/types/validation/validators/ReadOnlyValidator.d.mts +47 -0
  157. package/lib/types/validation/validators/TimestampValidator.d.cts +48 -0
  158. package/lib/types/validation/validators/TimestampValidator.d.mts +48 -0
  159. package/lib/types/validation/validators/UpdateValidator.d.cts +40 -0
  160. package/lib/types/validation/validators/UpdateValidator.d.mts +40 -0
  161. package/lib/types/validation/validators/index.d.cts +3 -0
  162. package/lib/types/validation/validators/index.d.mts +3 -0
  163. package/package.json +4 -4
  164. package/lib/cjs/identity/decorators.js.map +0 -1
  165. package/lib/cjs/identity/index.js.map +0 -1
  166. package/lib/cjs/index.js.map +0 -1
  167. package/lib/cjs/interfaces/BulkCrudOperator.js.map +0 -1
  168. package/lib/cjs/interfaces/Contextual.js.map +0 -1
  169. package/lib/cjs/interfaces/CrudOperator.js.map +0 -1
  170. package/lib/cjs/interfaces/IRepository.js.map +0 -1
  171. package/lib/cjs/interfaces/index.js.map +0 -1
  172. package/lib/cjs/model/constants.js.map +0 -1
  173. package/lib/cjs/model/decorators.js.map +0 -1
  174. package/lib/cjs/model/index.js.map +0 -1
  175. package/lib/cjs/model/model.js.map +0 -1
  176. package/lib/cjs/model/validation.js.map +0 -1
  177. package/lib/cjs/operations/Operations.js.map +0 -1
  178. package/lib/cjs/operations/OperationsRegistry.js.map +0 -1
  179. package/lib/cjs/operations/constants.js.map +0 -1
  180. package/lib/cjs/operations/decorators.js.map +0 -1
  181. package/lib/cjs/operations/index.js.map +0 -1
  182. package/lib/cjs/operations/types.js.map +0 -1
  183. package/lib/cjs/overrides/Metadata.js.map +0 -1
  184. package/lib/cjs/overrides/Model.js.map +0 -1
  185. package/lib/cjs/overrides/ModelBuilderExtensions.js.map +0 -1
  186. package/lib/cjs/overrides/index.js.map +0 -1
  187. package/lib/cjs/overrides/overrides.js.map +0 -1
  188. package/lib/cjs/repository/Context.js.map +0 -1
  189. package/lib/cjs/repository/Repository.js.map +0 -1
  190. package/lib/cjs/repository/constants.js.map +0 -1
  191. package/lib/cjs/repository/errors.js.map +0 -1
  192. package/lib/cjs/repository/index.js.map +0 -1
  193. package/lib/cjs/repository/types.js.map +0 -1
  194. package/lib/cjs/repository/utils.js.map +0 -1
  195. package/lib/cjs/repository/wrappers.js.map +0 -1
  196. package/lib/cjs/validation/constants.js.map +0 -1
  197. package/lib/cjs/validation/decorators.js.map +0 -1
  198. package/lib/cjs/validation/index.js.map +0 -1
  199. package/lib/cjs/validation/validation.js.map +0 -1
  200. package/lib/cjs/validation/validators/ReadOnlyValidator.js.map +0 -1
  201. package/lib/cjs/validation/validators/TimestampValidator.js.map +0 -1
  202. package/lib/cjs/validation/validators/UpdateValidator.js.map +0 -1
  203. package/lib/cjs/validation/validators/index.js.map +0 -1
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Repository = void 0;
4
4
  require("./../overrides/index.cjs");
5
5
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
6
- const utils_1 = require("./utils.cjs");
7
- const constants_1 = require("./../operations/constants.cjs");
8
- const errors_1 = require("./errors.cjs");
9
- const wrappers_1 = require("./wrappers.cjs");
10
- const Context_1 = require("./Context.cjs");
6
+ const utils_js_1 = require("./utils.cjs");
7
+ const constants_js_1 = require("./../operations/constants.cjs");
8
+ const errors_js_1 = require("./errors.cjs");
9
+ const wrappers_js_1 = require("./wrappers.cjs");
10
+ const Context_js_1 = require("./Context.cjs");
11
11
  /**
12
12
  * @description Base repository implementation providing CRUD operations for models.
13
13
  * @summary The BaseRepository class serves as a foundation for repository implementations, providing
@@ -108,7 +108,7 @@ class Repository {
108
108
  */
109
109
  get class() {
110
110
  if (!this._class)
111
- throw new errors_1.InternalError(`No class definition found for this repository`);
111
+ throw new errors_js_1.InternalError(`No class definition found for this repository`);
112
112
  return this._class;
113
113
  }
114
114
  /**
@@ -136,9 +136,9 @@ class Repository {
136
136
  const self = this;
137
137
  [this.create, this.read, this.delete].forEach((m) => {
138
138
  const name = m.name;
139
- (0, wrappers_1.wrapMethodWithContext)(self, self[name + "Prefix"], m, self[name + "Suffix"]);
139
+ (0, wrappers_js_1.wrapMethodWithContext)(self, self[name + "Prefix"], m, self[name + "Suffix"]);
140
140
  });
141
- (0, wrappers_1.wrapMethodWithContextForUpdate)(self, self[this.update.name + "Prefix"], this.update, self[this.update.name + "Suffix"]);
141
+ (0, wrappers_js_1.wrapMethodWithContextForUpdate)(self, self[this.update.name + "Prefix"], this.update, self[this.update.name + "Suffix"]);
142
142
  }
143
143
  /**
144
144
  * @description Creates multiple model instances in the repository.
@@ -161,14 +161,14 @@ class Repository {
161
161
  * @return A promise that resolves to an array containing the prepared model and context arguments
162
162
  */
163
163
  async createPrefix(model, ...args) {
164
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.CREATE, this.class, args);
164
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.CREATE, this.class, args);
165
165
  model = new this.class(model);
166
166
  if (!contextArgs.context.get("ignoreHandlers"))
167
- await (0, utils_1.enforceDBDecorators)(this, contextArgs.context, model, constants_1.OperationKeys.CREATE, constants_1.OperationKeys.ON);
167
+ await (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, model, constants_js_1.OperationKeys.CREATE, constants_js_1.OperationKeys.ON);
168
168
  if (!contextArgs.context.get("ignoreValidation")) {
169
169
  const errors = await Promise.resolve(model.hasErrors());
170
170
  if (errors)
171
- throw new errors_1.ValidationError(errors.toString());
171
+ throw new errors_js_1.ValidationError(errors.toString());
172
172
  }
173
173
  return [model, ...contextArgs.args];
174
174
  }
@@ -182,7 +182,7 @@ class Repository {
182
182
  */
183
183
  async createSuffix(model, context) {
184
184
  if (!context.get("ignoreHandlers"))
185
- await (0, utils_1.enforceDBDecorators)(this, context, model, constants_1.OperationKeys.CREATE, constants_1.OperationKeys.AFTER);
185
+ await (0, utils_js_1.enforceDBDecorators)(this, context, model, constants_js_1.OperationKeys.CREATE, constants_js_1.OperationKeys.AFTER);
186
186
  return model;
187
187
  }
188
188
  /**
@@ -195,20 +195,20 @@ class Repository {
195
195
  * @return A promise that resolves to an array containing the prepared models and context arguments
196
196
  */
197
197
  async createAllPrefix(models, ...args) {
198
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.CREATE, this.class, args);
198
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.CREATE, this.class, args);
199
199
  const ignoreHandlers = contextArgs.context.get("ignoreHandlers");
200
200
  const ignoreValidate = contextArgs.context.get("ignoreValidation");
201
201
  models = await Promise.all(models.map(async (m) => {
202
202
  const model = new this.class(m);
203
203
  if (!ignoreHandlers)
204
- await (0, utils_1.enforceDBDecorators)(this, contextArgs.context, model, constants_1.OperationKeys.CREATE, constants_1.OperationKeys.ON);
204
+ await (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, model, constants_js_1.OperationKeys.CREATE, constants_js_1.OperationKeys.ON);
205
205
  return model;
206
206
  }));
207
207
  if (!ignoreValidate) {
208
208
  const modelsValidation = await Promise.all(models.map((m) => Promise.resolve(m.hasErrors())));
209
- const errors = (0, utils_1.reduceErrorsToPrint)(modelsValidation);
209
+ const errors = (0, utils_js_1.reduceErrorsToPrint)(modelsValidation);
210
210
  if (errors)
211
- throw new errors_1.ValidationError(errors);
211
+ throw new errors_js_1.ValidationError(errors);
212
212
  }
213
213
  return [models, ...contextArgs.args];
214
214
  }
@@ -222,7 +222,7 @@ class Repository {
222
222
  */
223
223
  async createAllSuffix(models, context) {
224
224
  if (!context.get("ignoreHandlers"))
225
- await Promise.all(models.map((m) => (0, utils_1.enforceDBDecorators)(this, context, m, constants_1.OperationKeys.CREATE, constants_1.OperationKeys.AFTER)));
225
+ await Promise.all(models.map((m) => (0, utils_js_1.enforceDBDecorators)(this, context, m, constants_js_1.OperationKeys.CREATE, constants_js_1.OperationKeys.AFTER)));
226
226
  return models;
227
227
  }
228
228
  /**
@@ -246,7 +246,7 @@ class Repository {
246
246
  */
247
247
  async readSuffix(model, context) {
248
248
  if (!context.get("ignoreHandlers"))
249
- await (0, utils_1.enforceDBDecorators)(this, context, model, constants_1.OperationKeys.READ, constants_1.OperationKeys.AFTER);
249
+ await (0, utils_js_1.enforceDBDecorators)(this, context, model, constants_js_1.OperationKeys.READ, constants_js_1.OperationKeys.AFTER);
250
250
  return model;
251
251
  }
252
252
  /**
@@ -259,10 +259,10 @@ class Repository {
259
259
  * @return A promise that resolves to an array containing the key and context arguments
260
260
  */
261
261
  async readPrefix(key, ...args) {
262
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.READ, this.class, args);
262
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.READ, this.class, args);
263
263
  const model = new this.class();
264
264
  model[this.pk] = key;
265
- await (0, utils_1.enforceDBDecorators)(this, contextArgs.context, model, constants_1.OperationKeys.READ, constants_1.OperationKeys.ON);
265
+ await (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, model, constants_js_1.OperationKeys.READ, constants_js_1.OperationKeys.ON);
266
266
  return [key, ...contextArgs.args];
267
267
  }
268
268
  /**
@@ -275,11 +275,11 @@ class Repository {
275
275
  * @return A promise that resolves to an array containing the keys and context arguments
276
276
  */
277
277
  async readAllPrefix(keys, ...args) {
278
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.READ, this.class, args);
278
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.READ, this.class, args);
279
279
  await Promise.all(keys.map(async (k) => {
280
280
  const m = new this.class();
281
281
  m[this.pk] = k;
282
- return (0, utils_1.enforceDBDecorators)(this, contextArgs.context, m, constants_1.OperationKeys.READ, constants_1.OperationKeys.ON);
282
+ return (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, m, constants_js_1.OperationKeys.READ, constants_js_1.OperationKeys.ON);
283
283
  }));
284
284
  return [keys, ...contextArgs.args];
285
285
  }
@@ -293,7 +293,7 @@ class Repository {
293
293
  */
294
294
  async readAllSuffix(models, context) {
295
295
  if (!context.get("ignoreHandlers"))
296
- await Promise.all(models.map((m) => (0, utils_1.enforceDBDecorators)(this, context, m, constants_1.OperationKeys.READ, constants_1.OperationKeys.AFTER)));
296
+ await Promise.all(models.map((m) => (0, utils_js_1.enforceDBDecorators)(this, context, m, constants_js_1.OperationKeys.READ, constants_js_1.OperationKeys.AFTER)));
297
297
  return models;
298
298
  }
299
299
  /**
@@ -317,7 +317,7 @@ class Repository {
317
317
  */
318
318
  async updateSuffix(model, oldModel, context) {
319
319
  if (!context.get("ignoreHandlers"))
320
- await (0, utils_1.enforceDBDecorators)(this, context, model, constants_1.OperationKeys.UPDATE, constants_1.OperationKeys.AFTER, oldModel);
320
+ await (0, utils_js_1.enforceDBDecorators)(this, context, model, constants_js_1.OperationKeys.UPDATE, constants_js_1.OperationKeys.AFTER, oldModel);
321
321
  return model;
322
322
  }
323
323
  /**
@@ -330,13 +330,13 @@ class Repository {
330
330
  * @return A promise that resolves to an array containing the prepared model and context arguments
331
331
  */
332
332
  async updatePrefix(model, ...args) {
333
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.UPDATE, this.class, args);
333
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.UPDATE, this.class, args);
334
334
  const context = contextArgs.context;
335
335
  const ignoreHandlers = contextArgs.context.get("ignoreHandlers");
336
336
  const ignoreValidate = contextArgs.context.get("ignoreValidation");
337
337
  const pk = model[this.pk];
338
338
  if (!pk)
339
- throw new errors_1.InternalError(`No value for the Id is defined under the property ${this.pk}`);
339
+ throw new errors_js_1.InternalError(`No value for the Id is defined under the property ${this.pk}`);
340
340
  let oldModel;
341
341
  if (context.get("applyUpdateValidation")) {
342
342
  oldModel = await this.read(pk);
@@ -344,11 +344,11 @@ class Repository {
344
344
  model = decorator_validation_1.Model.merge(oldModel, model, this.class);
345
345
  }
346
346
  if (!ignoreHandlers)
347
- await (0, utils_1.enforceDBDecorators)(this, contextArgs.context, model, constants_1.OperationKeys.UPDATE, constants_1.OperationKeys.ON, oldModel);
347
+ await (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, model, constants_js_1.OperationKeys.UPDATE, constants_js_1.OperationKeys.ON, oldModel);
348
348
  if (!ignoreValidate) {
349
349
  const errors = await Promise.resolve(model.hasErrors(oldModel));
350
350
  if (errors)
351
- throw new errors_1.ValidationError(errors.toString());
351
+ throw new errors_js_1.ValidationError(errors.toString());
352
352
  }
353
353
  return [model, ...contextArgs.args, oldModel];
354
354
  }
@@ -362,14 +362,14 @@ class Repository {
362
362
  * @return A promise that resolves to an array containing the prepared models and context arguments
363
363
  */
364
364
  async updateAllPrefix(models, ...args) {
365
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.UPDATE, this.class, args);
365
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.UPDATE, this.class, args);
366
366
  const context = contextArgs.context;
367
367
  const ignoreHandlers = context.get("ignoreHandlers");
368
368
  const ignoreValidate = context.get("ignoreValidation");
369
369
  const ids = models.map((m) => {
370
370
  const id = m[this.pk];
371
371
  if (typeof id === "undefined")
372
- throw new errors_1.InternalError(`No value for the Id is defined under the property ${this.pk}`);
372
+ throw new errors_js_1.InternalError(`No value for the Id is defined under the property ${this.pk}`);
373
373
  return id;
374
374
  });
375
375
  let oldModels;
@@ -379,7 +379,7 @@ class Repository {
379
379
  models = models.map((m, i) => decorator_validation_1.Model.merge(oldModels[i], m, this.class));
380
380
  }
381
381
  if (!ignoreHandlers)
382
- await Promise.all(models.map((m, i) => (0, utils_1.enforceDBDecorators)(this, contextArgs.context, m, constants_1.OperationKeys.UPDATE, constants_1.OperationKeys.ON, oldModels ? oldModels[i] : undefined)));
382
+ await Promise.all(models.map((m, i) => (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, m, constants_js_1.OperationKeys.UPDATE, constants_js_1.OperationKeys.ON, oldModels ? oldModels[i] : undefined)));
383
383
  if (!ignoreValidate) {
384
384
  let modelsValidation;
385
385
  if (!context.get("applyUpdateValidation")) {
@@ -388,9 +388,9 @@ class Repository {
388
388
  else {
389
389
  modelsValidation = await Promise.all(models.map((m, i) => Promise.resolve(m.hasErrors(oldModels[i]))));
390
390
  }
391
- const errors = (0, utils_1.reduceErrorsToPrint)(modelsValidation);
391
+ const errors = (0, utils_js_1.reduceErrorsToPrint)(modelsValidation);
392
392
  if (errors)
393
- throw new errors_1.ValidationError(errors);
393
+ throw new errors_js_1.ValidationError(errors);
394
394
  }
395
395
  return [models, ...contextArgs.args, oldModels];
396
396
  }
@@ -406,10 +406,10 @@ class Repository {
406
406
  if (context.get("applyUpdateValidation") &&
407
407
  !context.get("ignoreDevSafeGuards")) {
408
408
  if (!oldModels)
409
- throw new errors_1.InternalError("No previous versions of models provided");
409
+ throw new errors_js_1.InternalError("No previous versions of models provided");
410
410
  }
411
411
  if (!context.get("ignoreHandlers"))
412
- await Promise.all(models.map((m, i) => (0, utils_1.enforceDBDecorators)(this, context, m, constants_1.OperationKeys.UPDATE, constants_1.OperationKeys.AFTER, oldModels ? oldModels[i] : undefined)));
412
+ await Promise.all(models.map((m, i) => (0, utils_js_1.enforceDBDecorators)(this, context, m, constants_js_1.OperationKeys.UPDATE, constants_js_1.OperationKeys.AFTER, oldModels ? oldModels[i] : undefined)));
413
413
  return models;
414
414
  }
415
415
  /**
@@ -433,7 +433,7 @@ class Repository {
433
433
  */
434
434
  async deleteSuffix(model, context) {
435
435
  if (!context.get("ignoreHandlers"))
436
- await (0, utils_1.enforceDBDecorators)(this, context, model, constants_1.OperationKeys.DELETE, constants_1.OperationKeys.AFTER);
436
+ await (0, utils_js_1.enforceDBDecorators)(this, context, model, constants_js_1.OperationKeys.DELETE, constants_js_1.OperationKeys.AFTER);
437
437
  return model;
438
438
  }
439
439
  /**
@@ -446,9 +446,9 @@ class Repository {
446
446
  * @return A promise that resolves to an array containing the key and context arguments
447
447
  */
448
448
  async deletePrefix(key, ...args) {
449
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.DELETE, this.class, args);
449
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.DELETE, this.class, args);
450
450
  const model = await this.read(key, ...contextArgs.args);
451
- await (0, utils_1.enforceDBDecorators)(this, contextArgs.context, model, constants_1.OperationKeys.DELETE, constants_1.OperationKeys.ON);
451
+ await (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, model, constants_js_1.OperationKeys.DELETE, constants_js_1.OperationKeys.ON);
452
452
  return [key, ...contextArgs.args];
453
453
  }
454
454
  /**
@@ -461,10 +461,10 @@ class Repository {
461
461
  * @return A promise that resolves to an array containing the keys and context arguments
462
462
  */
463
463
  async deleteAllPrefix(keys, ...args) {
464
- const contextArgs = await Context_1.Context.args(constants_1.OperationKeys.DELETE, this.class, args);
464
+ const contextArgs = await Context_js_1.Context.args(constants_js_1.OperationKeys.DELETE, this.class, args);
465
465
  const models = await this.readAll(keys, ...contextArgs.args);
466
466
  await Promise.all(models.map(async (m) => {
467
- return (0, utils_1.enforceDBDecorators)(this, contextArgs.context, m, constants_1.OperationKeys.DELETE, constants_1.OperationKeys.ON);
467
+ return (0, utils_js_1.enforceDBDecorators)(this, contextArgs.context, m, constants_js_1.OperationKeys.DELETE, constants_js_1.OperationKeys.ON);
468
468
  }));
469
469
  return [keys, ...contextArgs.args];
470
470
  }
@@ -478,7 +478,7 @@ class Repository {
478
478
  */
479
479
  async deleteAllSuffix(models, context) {
480
480
  if (!context.get("ignoreHandlers"))
481
- await Promise.all(models.map((m) => (0, utils_1.enforceDBDecorators)(this, context, m, constants_1.OperationKeys.DELETE, constants_1.OperationKeys.AFTER)));
481
+ await Promise.all(models.map((m) => (0, utils_js_1.enforceDBDecorators)(this, context, m, constants_js_1.OperationKeys.DELETE, constants_js_1.OperationKeys.AFTER)));
482
482
  return models;
483
483
  }
484
484
  /**
@@ -491,4 +491,5 @@ class Repository {
491
491
  }
492
492
  }
493
493
  exports.Repository = Repository;
494
+ //# sourceMappingURL=Repository.js.map
494
495
  //# sourceMappingURL=Repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Repository.js","sourceRoot":"","sources":["Repository.js"],"names":[],"mappings":";;;AAAA,mCAAiC;AACjC,yEAAuD;AACvD,yCAAsE;AACtE,+DAA6D;AAC7D,2CAA6D;AAC7D,+CAAuF;AACvF,6CAAuC;AACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,MAAa,UAAU;IACnB;;;;;OAKG;IACH,IAAI,KAAK;QACL,IAAI,CAAC,IAAI,CAAC,MAAM;YACZ,MAAM,IAAI,yBAAa,CAAC,+CAA+C,CAAC,CAAC;QAC7E,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IACD;;;;;OAKG;IACH,IAAI,EAAE;QACF,OAAO,4BAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACD;;;;;OAKG;IACH,IAAI,OAAO;QACP,OAAO,4BAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IACD,YAAY,KAAK;QACb,IAAI,KAAK;YACL,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACxB,4DAA4D;QAC5D,MAAM,IAAI,GAAG,IA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AA,8BAAmB,EAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,4BAAa,CAAC,MAAM,EAAE,4BAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3H,OAAO,MAAM,CAAC;IAClB,CAAC;IACD;;;;OAIG;IACH,QAAQ;QACJ,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC;IAC3C,CAAC;CACJ;AAtYD,gCAsYC;AACD,sCAAsC"}
@@ -25,4 +25,5 @@ exports.DefaultRepositoryFlags = {
25
25
  applyUpdateValidation: true,
26
26
  allowGenerationOverride: false,
27
27
  };
28
+ //# sourceMappingURL=constants.js.map
28
29
  //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.js"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACU,QAAA,sBAAsB,GAAG;IAClC,aAAa,EAAE,SAAS;IACxB,aAAa,EAAE,EAAE;IACjB,2BAA2B,EAAE,EAAE;IAC/B,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,EAAE;IAClB,SAAS,EAAE,SAAS;IACpB,mBAAmB,EAAE,IAAI;IACzB,oBAAoB,EAAE,IAAI;IAC1B,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,KAAK;IACrB,mBAAmB,EAAE,KAAK;IAC1B,cAAc,EAAE,IAAI;IACpB,qBAAqB,EAAE,IAAI;IAC3B,uBAAuB,EAAE,KAAK;CACjC,CAAC;AACF,qCAAqC"}
@@ -160,4 +160,5 @@ class ConflictError extends BadRequestError {
160
160
  }
161
161
  }
162
162
  exports.ConflictError = ConflictError;
163
+ //# sourceMappingURL=errors.js.map
163
164
  //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["errors.js"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MA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AAE,GAAG,CAAC,CAAC;IAC1C,CAAC;CACJ;AAJD,0CAIC;AACD;;;;;;;;;;;;;;GAcG;AACH,MAAa,aAAc,SAAQ,SAAS;IACxC,YAAY,GAAG,EAAE,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,GAAG;QAClD,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;CACJ;AAJD,sCAIC;AACD;;;;;;;;;;;;;;GAcG;AACH,MAAa,kBAAmB,SAAQ,aAAa;IACjD,YAAY,GAAG;QACX,KAAK,CAAC,GAAG,EAAE,kBAAkB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7C,CAAC;CACJ;AAJD,gDAIC;AACD;;;;;;;;;;;;;GAaG;AACH,MAAa,aAAc,SAAQ,eAAe;IAC9C,YAAY,GAAG;QACX,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;CACJ;AAJD,sCAIC;AACD;;;;;;;;;;;;;GAaG;AACH,MAAa,aAAc,SAAQ,eAAe;IAC9C,YAAY,GAAG;QACX,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;CACJ;AAJD,sCAIC;AACD,kCAAkC"}
@@ -26,4 +26,5 @@ __exportStar(require("./errors.cjs"), exports);
26
26
  __exportStar(require("./types.cjs"), exports);
27
27
  __exportStar(require("./utils.cjs"), exports);
28
28
  __exportStar(require("./wrappers.cjs"), exports);
29
+ //# sourceMappingURL=index.js.map
29
30
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,kDAAgC;AAChC,iDAA+B;AAC/B,+CAA6B;AAC7B,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,gDAA8B;AAC9B,iCAAiC"}
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
3
4
  //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.js"],"names":[],"mappings":";;AACA,iCAAiC"}
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.reduceErrorsToPrint = reduceErrorsToPrint;
4
4
  exports.enforceDBDecorators = enforceDBDecorators;
5
5
  exports.getDbDecorators = getDbDecorators;
6
- const constants_1 = require("./../operations/constants.cjs");
7
- const errors_1 = require("./errors.cjs");
8
- const decorators_1 = require("./../operations/decorators.cjs");
6
+ const constants_js_1 = require("./../operations/constants.cjs");
7
+ const errors_js_1 = require("./errors.cjs");
8
+ const decorators_js_1 = require("./../operations/decorators.cjs");
9
9
  const decoration_1 = require("@decaf-ts/decoration");
10
10
  function reduceErrorsToPrint(errors) {
11
11
  return errors.reduce((accum, e, i) => {
@@ -34,9 +34,9 @@ async function enforceDBDecorators(repo, context, model, operation, prefix, oldM
34
34
  const decorators = getDbDecorators(model, operation, prefix);
35
35
  if (!decorators)
36
36
  return;
37
- const hanlersDecorators = (0, decorators_1.getHandlersDecorators)(model, decorators, prefix);
38
- const groupedDecorators = (0, decorators_1.groupDecorators)(hanlersDecorators);
39
- const sortedDecorators = (0, decorators_1.sortDecorators)(groupedDecorators);
37
+ const hanlersDecorators = (0, decorators_js_1.getHandlersDecorators)(model, decorators, prefix);
38
+ const groupedDecorators = (0, decorators_js_1.groupDecorators)(hanlersDecorators);
39
+ const sortedDecorators = (0, decorators_js_1.sortDecorators)(groupedDecorators);
40
40
  for (const dec of sortedDecorators) {
41
41
  const args = [
42
42
  context,
@@ -44,9 +44,9 @@ async function enforceDBDecorators(repo, context, model, operation, prefix, oldM
44
44
  dec.prop.length > 1 ? dec.prop : dec.prop[0],
45
45
  model,
46
46
  ];
47
- if ([constants_1.OperationKeys.UPDATE, constants_1.BulkCrudOperationKeys.UPDATE_ALL].includes(operation)) {
47
+ if ([constants_js_1.OperationKeys.UPDATE, constants_js_1.BulkCrudOperationKeys.UPDATE_ALL].includes(operation)) {
48
48
  if (!oldModel)
49
- throw new errors_1.InternalError("Missing old model for update operation");
49
+ throw new errors_js_1.InternalError("Missing old model for update operation");
50
50
  args.push(oldModel);
51
51
  }
52
52
  try {
@@ -73,7 +73,7 @@ async function enforceDBDecorators(repo, context, model, operation, prefix, oldM
73
73
  */
74
74
  function getDbDecorators(model, operation, extraPrefix) {
75
75
  const prefix = extraPrefix?.replace(/[.]$/, "");
76
- const decorators = decoration_1.Metadata.get(model.constructor, constants_1.ModelOperations.OPERATIONS);
76
+ const decorators = decoration_1.Metadata.get(model.constructor, constants_js_1.ModelOperations.OPERATIONS);
77
77
  if (!decorators)
78
78
  return;
79
79
  return Object.keys(decorators).reduce((accum, decorator) => {
@@ -92,4 +92,5 @@ function getDbDecorators(model, operation, extraPrefix) {
92
92
  return accum;
93
93
  }, undefined);
94
94
  }
95
+ //# sourceMappingURL=utils.js.map
95
96
  //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":";;AAIA,kDASC;AAcD,kDA8BC;AAWD,0CAoBC;AAxFD,+DAAsG;AACtG,2CAA4C;AAC5C,iEAAwG;AACxG,qDAAgD;AAChD,SAAgB,mBAAmB,CAAC,MAAM;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;QACjC,IAAI,CAAC;YACD,KAAK;gBACD,OAAO,KAAK,KAAK,QAAQ;oBACrB,CAAC,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE;oBACtC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,EAA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AC,CAAC,EAAE,CAAC,CAAC;QACzC,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACtB,IAAI,CAAC,KAAK;gBACN,KAAK,GAAG,EAAE,CAAC;YACf,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;QAC5B,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC,EAAE,SAAS,CAAC,CAAC;AAClB,CAAC;AACD,iCAAiC"}
@@ -4,8 +4,8 @@ exports.prefixMethod = prefixMethod;
4
4
  exports.suffixMethod = suffixMethod;
5
5
  exports.wrapMethodWithContext = wrapMethodWithContext;
6
6
  exports.wrapMethodWithContextForUpdate = wrapMethodWithContextForUpdate;
7
- const Context_1 = require("./Context.cjs");
8
- const errors_1 = require("./errors.cjs");
7
+ const Context_js_1 = require("./Context.cjs");
8
+ const errors_js_1 = require("./errors.cjs");
9
9
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
10
10
  /**
11
11
  * @summary Util method to change a method of an object prefixing it with another
@@ -78,8 +78,8 @@ function wrapMethodWithContext(obj, before, method, after, methodName) {
78
78
  if (transformedArgs instanceof Promise)
79
79
  transformedArgs = await transformedArgs;
80
80
  const context = transformedArgs[transformedArgs.length - 1];
81
- if (!(context instanceof Context_1.Context))
82
- throw new errors_1.InternalError("Missing a context");
81
+ if (!(context instanceof Context_js_1.Context))
82
+ throw new errors_js_1.InternalError("Missing a context");
83
83
  let results = target.call(thisArg, ...transformedArgs);
84
84
  if (results instanceof Promise)
85
85
  results = await results;
@@ -99,13 +99,13 @@ function wrapMethodWithContextForUpdate(obj, before, method, after, methodName)
99
99
  transformedArgs = await transformedArgs;
100
100
  const oldModel = transformedArgs.pop();
101
101
  const context = transformedArgs[transformedArgs.length - 1];
102
- if (!(context instanceof Context_1.Context))
103
- throw new errors_1.InternalError("Missing a context");
102
+ if (!(context instanceof Context_js_1.Context))
103
+ throw new errors_js_1.InternalError("Missing a context");
104
104
  if (context.get("applyUpdateValidation") &&
105
105
  !context.get("ignoreDevSafeGuards") &&
106
106
  !(oldModel instanceof decorator_validation_1.Model) &&
107
107
  (!Array.isArray(oldModel) || !oldModel.every((o) => o instanceof decorator_validation_1.Model))) {
108
- throw new errors_1.InternalError(`No previous versions os models found`);
108
+ throw new errors_js_1.InternalError(`No previous versions os models found`);
109
109
  }
110
110
  let results = target.call(thisArg, ...transformedArgs);
111
111
  if (results instanceof Promise)
@@ -117,4 +117,5 @@ function wrapMethodWithContextForUpdate(obj, before, method, after, methodName)
117
117
  },
118
118
  });
119
119
  }
120
+ //# sourceMappingURL=wrappers.js.map
120
121
  //# sourceMappingURL=wrappers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrappers.js","sourceRoot":"","sources":["wrappers.js"],"names":[],"mappings":";;AAcA,oCAaC;AAYD,oCAaC;AAcD,sDAmBC;AACD,wEA0BC;AAhHD,6CAAuC;AACvC,2CAA4C;AAC5C,yEAAuD;AACvD;;;;;;;;;;GAUG;AACH,SAAgB,YAAY,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS;IACtD,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IAChD,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC7B,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE;YACvC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,CAAC;YAChD,IAAI,OAAO,YAAY,OAAO;gBAC1B,OAAO,GAAG,MAAM,OAAO,CAAC;YAC5B,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC;YAC3C,IAAI,OAAO,YAAY,OAAO;gBAC1B,OAAO,GAAG,MAAM,OAAO,CAAC;YAC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AC;YAC5D,IAAI,CAAC,CAAC,OAAO,YAAY,oBAAO,CAAC;gBAC7B,MAAM,IAAI,yBAAa,CAAC,mBAAmB,CAAC,CAAC;YACjD,IAAI,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;gBACpC,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;gBACnC,CAAC,CAAC,QAAQ,YAAY,4BAAK,CAAC;gBAC5B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,4BAAK,CAAC,CAAC,EAAE,CAAC;gBAC3E,MAAM,IAAI,yBAAa,CAAC,sCAAsC,CAAC,CAAC;YACpE,CAAC;YACD,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,eAAe,CAAC,CAAC;YACvD,IAAI,OAAO,YAAY,OAAO;gBAC1B,OAAO,GAAG,MAAM,OAAO,CAAC;YAC5B,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC1D,IAAI,OAAO,YAAY,OAAO;gBAC1B,OAAO,GAAG,MAAM,OAAO,CAAC;YAC5B,OAAO,OAAO,CAAC;QACnB,CAAC;KACJ,CAAC,CAAC;AACP,CAAC;AACD,oCAAoC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateValidationKeys = exports.DEFAULT_ERROR_MESSAGES = void 0;
4
- const constants_1 = require("./../model/constants.cjs");
4
+ const constants_js_1 = require("./../model/constants.cjs");
5
5
  /**
6
6
  * @description Collection of default error messages used by validators.
7
7
  * @summary Holds the default error messages for various validation scenarios including ID validation, readonly properties, and timestamps.
@@ -44,7 +44,8 @@ exports.DEFAULT_ERROR_MESSAGES = {
44
44
  */
45
45
  exports.UpdateValidationKeys = {
46
46
  REFLECT: "db.update.validation.",
47
- TIMESTAMP: constants_1.DBKeys.TIMESTAMP,
48
- READONLY: constants_1.DBKeys.READONLY,
47
+ TIMESTAMP: constants_js_1.DBKeys.TIMESTAMP,
48
+ READONLY: constants_js_1.DBKeys.READONLY,
49
49
  };
50
+ //# sourceMappingURL=constants.js.map
50
51
  //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["constants.js"],"names":[],"mappings":";;;AAAA,0DAAiD;AACjD;;;;;;;;;;;;;;;GAeG;AACU,QAAA,sBAAsB,GAAG;IAClC,EAAE,EAAE;QACA,OAAO,EAAE,oBAAoB;QAC7B,QAAQ,EAAE,qBAAqB;KAClC;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,wBAAwB;KACpC;IACD,SAAS,EAAE;QACP,QAAQ,EAAE,wBAAwB;QAClC,IAAI,EAAE,qCAAqC;QAC3C,OAAO,EAAE,iCAAiC;KAC7C;CACJ,CAAC;AACF;;;;;;;;;GASG;AACU,QAAA,oBAAoB,GAAG;IAChC,OAAO,EAAE,uBAAuB;IAChC,SAAS,EAAE,qBAAM,CAAC,SAAS;IAC3B,QAAQ,EAAE,qBAAM,CAAC,QAAQ;CAC5B,CAAC;AACF,qCAAqC"}
@@ -8,13 +8,13 @@ exports.serializeAfterAll = serializeAfterAll;
8
8
  exports.serialize = serialize;
9
9
  require("./validation.cjs");
10
10
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
11
- const constants_1 = require("./../model/constants.cjs");
12
- const constants_2 = require("./constants.cjs");
13
- const constants_3 = require("./../operations/constants.cjs");
14
- const decorators_1 = require("./../operations/decorators.cjs");
15
- const errors_1 = require("./../repository/errors.cjs");
11
+ const constants_js_1 = require("./../model/constants.cjs");
12
+ const constants_js_2 = require("./constants.cjs");
13
+ const constants_js_3 = require("./../operations/constants.cjs");
14
+ const decorators_js_1 = require("./../operations/decorators.cjs");
15
+ const errors_js_1 = require("./../repository/errors.cjs");
16
16
  const decoration_1 = require("@decaf-ts/decoration");
17
- const decorators_2 = require("./../model/decorators.cjs");
17
+ const decorators_js_2 = require("./../model/decorators.cjs");
18
18
  /**
19
19
  * @description Prevents a property from being modified after initial creation.
20
20
  * @summary Marks the property as readonly, causing validation errors if attempts are made to modify it during updates.
@@ -23,8 +23,8 @@ const decorators_2 = require("./../model/decorators.cjs");
23
23
  * @function readonly
24
24
  * @category Property Decorators
25
25
  */
26
- function readonly(message = constants_2.DEFAULT_ERROR_MESSAGES.READONLY.INVALID) {
27
- const key = constants_1.DBKeys.READONLY;
26
+ function readonly(message = constants_js_2.DEFAULT_ERROR_MESSAGES.READONLY.INVALID) {
27
+ const key = constants_js_1.DBKeys.READONLY;
28
28
  const meta = {
29
29
  message: message,
30
30
  description: `defines the attribute as readOnly`,
@@ -103,23 +103,23 @@ async function timestampHandler(context, data, key, model) {
103
103
  * T->>M: Set current timestamp
104
104
  * M->>C: Return updated model
105
105
  */
106
- function timestamp(operation = constants_3.DBOperations.CREATE_UPDATE, format = constants_1.DEFAULT_TIMESTAMP_FORMAT) {
107
- const decorationKey = constants_1.DBKeys.TIMESTAMP;
108
- const updateValidationKey = decorator_validation_1.Validation.updateKey(constants_1.DBKeys.TIMESTAMP);
106
+ function timestamp(operation = constants_js_3.DBOperations.CREATE_UPDATE, format = constants_js_1.DEFAULT_TIMESTAMP_FORMAT) {
107
+ const decorationKey = constants_js_1.DBKeys.TIMESTAMP;
108
+ const updateValidationKey = decorator_validation_1.Validation.updateKey(constants_js_1.DBKeys.TIMESTAMP);
109
109
  function ts(operation, format) {
110
110
  const decorators = [
111
- (0, decorators_2.generated)(constants_1.DBKeys.TIMESTAMP),
112
- (0, decorator_validation_1.date)(format, constants_2.DEFAULT_ERROR_MESSAGES.TIMESTAMP.DATE),
113
- (0, decorator_validation_1.required)(constants_2.DEFAULT_ERROR_MESSAGES.TIMESTAMP.REQUIRED),
114
- (0, decoration_1.propMetadata)(decorator_validation_1.Validation.key(constants_1.DBKeys.TIMESTAMP), {
111
+ (0, decorators_js_2.generated)(constants_js_1.DBKeys.TIMESTAMP),
112
+ (0, decorator_validation_1.date)(format, constants_js_2.DEFAULT_ERROR_MESSAGES.TIMESTAMP.DATE),
113
+ (0, decorator_validation_1.required)(constants_js_2.DEFAULT_ERROR_MESSAGES.TIMESTAMP.REQUIRED),
114
+ (0, decoration_1.propMetadata)(decorator_validation_1.Validation.key(constants_js_1.DBKeys.TIMESTAMP), {
115
115
  operation: operation,
116
116
  format: format,
117
117
  }),
118
- (0, decorators_1.on)(operation, timestampHandler),
118
+ (0, decorators_js_1.on)(operation, timestampHandler),
119
119
  ];
120
- if (operation.indexOf(constants_3.OperationKeys.UPDATE) !== -1)
120
+ if (operation.indexOf(constants_js_3.OperationKeys.UPDATE) !== -1)
121
121
  decorators.push((0, decoration_1.propMetadata)(updateValidationKey, {
122
- message: constants_2.DEFAULT_ERROR_MESSAGES.TIMESTAMP.INVALID,
122
+ message: constants_js_2.DEFAULT_ERROR_MESSAGES.TIMESTAMP.INVALID,
123
123
  }));
124
124
  else
125
125
  decorators.push(readonly());
@@ -156,7 +156,7 @@ async function serializeOnCreateUpdate(context, data, key, model) {
156
156
  : JSON.stringify(model[key]);
157
157
  }
158
158
  catch (e) {
159
- throw new errors_1.SerializationError(`Failed to serialize ${key.toString()} property of model ${model.constructor.name}: ${e}`);
159
+ throw new errors_js_1.SerializationError(`Failed to serialize ${key.toString()} property of model ${model.constructor.name}: ${e}`);
160
160
  }
161
161
  }
162
162
  /**
@@ -185,7 +185,7 @@ async function serializeAfterAll(context, data, key, model) {
185
185
  : JSON.parse(model[key]);
186
186
  }
187
187
  catch (e) {
188
- throw new errors_1.SerializationError(`Failed to deserialize ${key.toString()} property of model ${model.constructor.name}: ${e}`);
188
+ throw new errors_js_1.SerializationError(`Failed to deserialize ${key.toString()} property of model ${model.constructor.name}: ${e}`);
189
189
  }
190
190
  }
191
191
  /**
@@ -216,6 +216,7 @@ async function serializeAfterAll(context, data, key, model) {
216
216
  * M->>C: Return model with deserialized property
217
217
  */
218
218
  function serialize(serializer) {
219
- return (0, decoration_1.apply)((0, decorators_1.onCreateUpdate)(serializeOnCreateUpdate, { serializer: serializer }), (0, decorators_1.after)(constants_3.DBOperations.ALL, serializeAfterAll, { serializer: serializer }), (0, decorator_validation_1.type)([String, Object]), (0, decoration_1.metadata)(constants_1.DBKeys.SERIALIZE, { serializer: serializer }));
219
+ return (0, decoration_1.apply)((0, decorators_js_1.onCreateUpdate)(serializeOnCreateUpdate, { serializer: serializer }), (0, decorators_js_1.after)(constants_js_3.DBOperations.ALL, serializeAfterAll, { serializer: serializer }), (0, decorator_validation_1.type)([String, Object]), (0, decoration_1.metadata)(constants_js_1.DBKeys.SERIALIZE, { serializer: serializer }));
220
220
  }
221
+ //# sourceMappingURL=decorators.js.map
221
222
  //# sourceMappingURL=decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["decorators.js"],"names":[],"mappings":";;AAiBA,4BAaC;AAgBD,4CAGC;AAgDD,8BA4BC;AAgBD,0DAWC;AAgBD,8CAaC;AA4BD,8BAEC;AAnND,2BAAyB;AACzB,yEAAoH;AACpH,0DAA2E;AAC3E,iDAAwD;AACxD,+DAA2E;AAC3E,iEAA0E;AAC1E,yDAA+D;AAC/D,qDAAkF;AAClF,4DAAqD;AACrD;;;;;;;GAOG;AACH,SAAgB,QAAQ,CAAC,OAAO,GAAG,qCAAsB,CAAC,QAAQ,CAAC,OAAO;IACtE,MAAM,GAAG,GAAG,qBAAM,CAAC,QAAQ,CAAC;IAC5B,MAAM,IAAI,GAAG;QACT,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,mCAAmC;QAChD,KAAK,EAAE,KAAK;KACf,CAAC;IACF,OAAO,uBAAU,CAAC,GAAG,CAAC,GAAG,CAAC;SACrB,MAAM,CAAC;QACR,SAAS,EAAE,+CAAwB;QACnC,IAAI,EAAE,CAAC,QA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G,CAAC,GAAG,IAAI,CAAC,UAAU;YACxB,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC/C,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,8BAAkB,CAAC,yBAAyB,GAAG,CAAC,QAAQ,EAAE,sBAAsB,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9H,CAAC;AACL,CAAC;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,SAAS,CAAC,UAAU;IAChC,OAAO,IAAA,kBAAK,EAAC,IAAA,8BAAc,EAAC,uBAAuB,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,IAAA,qBAAK,EAAC,2BAAY,CAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,EAAE,IAAA,2BAAI,EAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,IAAA,qBAAQ,EAAC,qBAAM,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AAC9O,CAAC;AACD,sCAAsC"}
@@ -18,4 +18,5 @@ __exportStar(require("./validators/index.cjs"), exports);
18
18
  __exportStar(require("./constants.cjs"), exports);
19
19
  __exportStar(require("./decorators.cjs"), exports);
20
20
  __exportStar(require("./validation.cjs"), exports);
21
+ //# sourceMappingURL=index.js.map
21
22
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,iDAA+B;AAC/B,kDAAgC;AAChC,kDAAgC;AAChC,iCAAiC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
4
- const constants_1 = require("./constants.cjs");
4
+ const constants_js_1 = require("./constants.cjs");
5
5
  /**
6
6
  * @description Generates a key for update validation metadata.
7
7
  * @summary Builds the key to store as metadata under Reflections for update validation by prefixing the provided key with the update validation prefix.
@@ -11,6 +11,7 @@ const constants_1 = require("./constants.cjs");
11
11
  * @memberOf module:db-decorators
12
12
  */
13
13
  decorator_validation_1.Validation.updateKey = function (key) {
14
- return constants_1.UpdateValidationKeys.REFLECT + key;
14
+ return constants_js_1.UpdateValidationKeys.REFLECT + key;
15
15
  };
16
+ //# sourceMappingURL=validation.js.map
16
17
  //# sourceMappingURL=validation.js.map