@decaf-ts/core 0.5.1 → 0.5.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 (197) hide show
  1. package/LICENSE.md +21 -157
  2. package/README.md +652 -15
  3. package/dist/core.cjs +2110 -132
  4. package/dist/core.esm.cjs +2111 -133
  5. package/lib/esm/identity/decorators.d.ts +52 -7
  6. package/lib/esm/identity/decorators.js +53 -8
  7. package/lib/esm/identity/utils.d.ts +19 -0
  8. package/lib/esm/identity/utils.js +20 -1
  9. package/lib/esm/index.d.ts +9 -2
  10. package/lib/esm/index.js +10 -3
  11. package/lib/esm/interfaces/ErrorParser.d.ts +12 -0
  12. package/lib/esm/interfaces/ErrorParser.js +1 -1
  13. package/lib/esm/interfaces/Executor.d.ts +13 -0
  14. package/lib/esm/interfaces/Executor.js +1 -1
  15. package/lib/esm/interfaces/Observable.d.ts +27 -0
  16. package/lib/esm/interfaces/Observable.js +1 -1
  17. package/lib/esm/interfaces/Observer.d.ts +12 -0
  18. package/lib/esm/interfaces/Observer.js +1 -1
  19. package/lib/esm/interfaces/Paginatable.d.ts +15 -0
  20. package/lib/esm/interfaces/Paginatable.js +1 -1
  21. package/lib/esm/interfaces/Queriable.d.ts +34 -9
  22. package/lib/esm/interfaces/Queriable.js +1 -1
  23. package/lib/esm/interfaces/RawExecutor.d.ts +14 -0
  24. package/lib/esm/interfaces/RawExecutor.js +1 -1
  25. package/lib/esm/interfaces/SequenceOptions.d.ts +52 -0
  26. package/lib/esm/interfaces/SequenceOptions.js +19 -1
  27. package/lib/esm/model/BaseModel.d.ts +31 -0
  28. package/lib/esm/model/BaseModel.js +24 -1
  29. package/lib/esm/model/construction.d.ts +433 -0
  30. package/lib/esm/model/construction.js +441 -2
  31. package/lib/esm/model/decorators.d.ts +159 -29
  32. package/lib/esm/model/decorators.js +160 -30
  33. package/lib/esm/model/types.d.ts +9 -0
  34. package/lib/esm/model/types.js +1 -1
  35. package/lib/esm/persistence/Adapter.d.ts +358 -17
  36. package/lib/esm/persistence/Adapter.js +287 -19
  37. package/lib/esm/persistence/Dispatch.d.ts +114 -1
  38. package/lib/esm/persistence/Dispatch.js +102 -4
  39. package/lib/esm/persistence/ObserverHandler.d.ts +95 -0
  40. package/lib/esm/persistence/ObserverHandler.js +96 -1
  41. package/lib/esm/persistence/Sequence.d.ts +89 -0
  42. package/lib/esm/persistence/Sequence.js +70 -1
  43. package/lib/esm/persistence/constants.d.ts +22 -0
  44. package/lib/esm/persistence/constants.js +23 -1
  45. package/lib/esm/persistence/decorators.d.ts +10 -0
  46. package/lib/esm/persistence/decorators.js +11 -1
  47. package/lib/esm/persistence/errors.d.ts +23 -0
  48. package/lib/esm/persistence/errors.js +24 -1
  49. package/lib/esm/persistence/types.d.ts +18 -0
  50. package/lib/esm/persistence/types.js +1 -1
  51. package/lib/esm/query/Condition.d.ts +78 -31
  52. package/lib/esm/query/Condition.js +132 -53
  53. package/lib/esm/query/Paginator.d.ts +56 -0
  54. package/lib/esm/query/Paginator.js +57 -1
  55. package/lib/esm/query/Statement.d.ts +51 -0
  56. package/lib/esm/query/Statement.js +52 -1
  57. package/lib/esm/query/constants.d.ts +25 -0
  58. package/lib/esm/query/constants.js +26 -1
  59. package/lib/esm/query/errors.d.ts +14 -0
  60. package/lib/esm/query/errors.js +15 -1
  61. package/lib/esm/query/options.d.ts +21 -3
  62. package/lib/esm/query/options.js +1 -1
  63. package/lib/esm/query/selectors.d.ts +26 -0
  64. package/lib/esm/query/selectors.js +1 -1
  65. package/lib/esm/ram/RamAdapter.d.ts +311 -0
  66. package/lib/esm/ram/RamAdapter.js +312 -1
  67. package/lib/esm/ram/RamContext.d.ts +16 -1
  68. package/lib/esm/ram/RamContext.js +18 -3
  69. package/lib/esm/ram/RamPaginator.d.ts +43 -0
  70. package/lib/esm/ram/RamPaginator.js +54 -2
  71. package/lib/esm/ram/RamSequence.d.ts +61 -0
  72. package/lib/esm/ram/RamSequence.js +63 -2
  73. package/lib/esm/ram/RamStatement.d.ts +74 -0
  74. package/lib/esm/ram/RamStatement.js +75 -1
  75. package/lib/esm/ram/constants.d.ts +8 -0
  76. package/lib/esm/ram/constants.js +9 -1
  77. package/lib/esm/ram/handlers.d.ts +19 -0
  78. package/lib/esm/ram/handlers.js +20 -1
  79. package/lib/esm/ram/model/RamSequence.d.ts +25 -0
  80. package/lib/esm/ram/model/RamSequence.js +19 -1
  81. package/lib/esm/ram/types.d.ts +42 -0
  82. package/lib/esm/ram/types.js +1 -1
  83. package/lib/esm/repository/Repository.d.ts +363 -8
  84. package/lib/esm/repository/Repository.js +361 -16
  85. package/lib/esm/repository/constants.d.ts +25 -0
  86. package/lib/esm/repository/constants.js +26 -1
  87. package/lib/esm/repository/decorators.d.ts +27 -0
  88. package/lib/esm/repository/decorators.js +28 -1
  89. package/lib/esm/repository/errors.d.ts +12 -5
  90. package/lib/esm/repository/errors.js +13 -6
  91. package/lib/esm/repository/injectables.d.ts +18 -0
  92. package/lib/esm/repository/injectables.js +19 -1
  93. package/lib/esm/repository/types.d.ts +15 -0
  94. package/lib/esm/repository/types.js +1 -1
  95. package/lib/esm/repository/utils.d.ts +11 -0
  96. package/lib/esm/repository/utils.js +12 -1
  97. package/lib/esm/utils/decorators.d.ts +8 -0
  98. package/lib/esm/utils/decorators.js +9 -1
  99. package/lib/esm/utils/errors.d.ts +46 -0
  100. package/lib/esm/utils/errors.js +47 -1
  101. package/lib/identity/decorators.cjs +53 -8
  102. package/lib/identity/decorators.d.ts +52 -7
  103. package/lib/identity/utils.cjs +20 -1
  104. package/lib/identity/utils.d.ts +19 -0
  105. package/lib/index.cjs +10 -3
  106. package/lib/index.d.ts +9 -2
  107. package/lib/interfaces/ErrorParser.cjs +1 -1
  108. package/lib/interfaces/ErrorParser.d.ts +12 -0
  109. package/lib/interfaces/Executor.cjs +1 -1
  110. package/lib/interfaces/Executor.d.ts +13 -0
  111. package/lib/interfaces/Observable.cjs +1 -1
  112. package/lib/interfaces/Observable.d.ts +27 -0
  113. package/lib/interfaces/Observer.cjs +1 -1
  114. package/lib/interfaces/Observer.d.ts +12 -0
  115. package/lib/interfaces/Paginatable.cjs +1 -1
  116. package/lib/interfaces/Paginatable.d.ts +15 -0
  117. package/lib/interfaces/Queriable.cjs +1 -1
  118. package/lib/interfaces/Queriable.d.ts +34 -9
  119. package/lib/interfaces/RawExecutor.cjs +1 -1
  120. package/lib/interfaces/RawExecutor.d.ts +14 -0
  121. package/lib/interfaces/SequenceOptions.cjs +19 -1
  122. package/lib/interfaces/SequenceOptions.d.ts +52 -0
  123. package/lib/model/BaseModel.cjs +24 -1
  124. package/lib/model/BaseModel.d.ts +31 -0
  125. package/lib/model/construction.cjs +441 -2
  126. package/lib/model/construction.d.ts +433 -0
  127. package/lib/model/decorators.cjs +160 -30
  128. package/lib/model/decorators.d.ts +159 -29
  129. package/lib/model/types.cjs +1 -1
  130. package/lib/model/types.d.ts +9 -0
  131. package/lib/persistence/Adapter.cjs +287 -19
  132. package/lib/persistence/Adapter.d.ts +358 -17
  133. package/lib/persistence/Dispatch.cjs +102 -4
  134. package/lib/persistence/Dispatch.d.ts +114 -1
  135. package/lib/persistence/ObserverHandler.cjs +96 -1
  136. package/lib/persistence/ObserverHandler.d.ts +95 -0
  137. package/lib/persistence/Sequence.cjs +70 -1
  138. package/lib/persistence/Sequence.d.ts +89 -0
  139. package/lib/persistence/constants.cjs +23 -1
  140. package/lib/persistence/constants.d.ts +22 -0
  141. package/lib/persistence/decorators.cjs +11 -1
  142. package/lib/persistence/decorators.d.ts +10 -0
  143. package/lib/persistence/errors.cjs +24 -1
  144. package/lib/persistence/errors.d.ts +23 -0
  145. package/lib/persistence/types.cjs +1 -1
  146. package/lib/persistence/types.d.ts +18 -0
  147. package/lib/query/Condition.cjs +132 -53
  148. package/lib/query/Condition.d.ts +78 -31
  149. package/lib/query/Paginator.cjs +57 -1
  150. package/lib/query/Paginator.d.ts +56 -0
  151. package/lib/query/Statement.cjs +52 -1
  152. package/lib/query/Statement.d.ts +51 -0
  153. package/lib/query/constants.cjs +26 -1
  154. package/lib/query/constants.d.ts +25 -0
  155. package/lib/query/errors.cjs +15 -1
  156. package/lib/query/errors.d.ts +14 -0
  157. package/lib/query/options.cjs +1 -1
  158. package/lib/query/options.d.ts +21 -3
  159. package/lib/query/selectors.cjs +1 -1
  160. package/lib/query/selectors.d.ts +26 -0
  161. package/lib/ram/RamAdapter.cjs +312 -1
  162. package/lib/ram/RamAdapter.d.ts +311 -0
  163. package/lib/ram/RamContext.cjs +18 -3
  164. package/lib/ram/RamContext.d.ts +16 -1
  165. package/lib/ram/RamPaginator.cjs +54 -2
  166. package/lib/ram/RamPaginator.d.ts +43 -0
  167. package/lib/ram/RamSequence.cjs +63 -2
  168. package/lib/ram/RamSequence.d.ts +61 -0
  169. package/lib/ram/RamStatement.cjs +75 -1
  170. package/lib/ram/RamStatement.d.ts +74 -0
  171. package/lib/ram/constants.cjs +9 -1
  172. package/lib/ram/constants.d.ts +8 -0
  173. package/lib/ram/handlers.cjs +20 -1
  174. package/lib/ram/handlers.d.ts +19 -0
  175. package/lib/ram/model/RamSequence.cjs +19 -1
  176. package/lib/ram/model/RamSequence.d.ts +25 -0
  177. package/lib/ram/types.cjs +1 -1
  178. package/lib/ram/types.d.ts +42 -0
  179. package/lib/repository/Repository.cjs +360 -15
  180. package/lib/repository/Repository.d.ts +363 -8
  181. package/lib/repository/constants.cjs +26 -1
  182. package/lib/repository/constants.d.ts +25 -0
  183. package/lib/repository/decorators.cjs +28 -1
  184. package/lib/repository/decorators.d.ts +27 -0
  185. package/lib/repository/errors.cjs +13 -6
  186. package/lib/repository/errors.d.ts +12 -5
  187. package/lib/repository/injectables.cjs +19 -1
  188. package/lib/repository/injectables.d.ts +18 -0
  189. package/lib/repository/types.cjs +1 -1
  190. package/lib/repository/types.d.ts +15 -0
  191. package/lib/repository/utils.cjs +12 -1
  192. package/lib/repository/utils.d.ts +11 -0
  193. package/lib/utils/decorators.cjs +9 -1
  194. package/lib/utils/decorators.d.ts +8 -0
  195. package/lib/utils/errors.cjs +47 -1
  196. package/lib/utils/errors.d.ts +46 -0
  197. package/package.json +5 -5
@@ -1,12 +1,64 @@
1
+ /**
2
+ * @description Interface for sequence configuration options
3
+ * @summary Defines the configuration options for creating and managing sequences
4
+ * @interface SequenceOptions
5
+ * @memberOf module:core
6
+ */
1
7
  export interface SequenceOptions {
8
+ /**
9
+ * @description Optional name for the sequence
10
+ * @summary A unique identifier for the sequence
11
+ */
2
12
  name?: string;
13
+ /**
14
+ * @description The data type of the sequence
15
+ * @summary Specifies whether the sequence generates Number or BigInt values
16
+ */
3
17
  type: "Number" | "BigInt" | undefined;
18
+ /**
19
+ * @description The initial value of the sequence
20
+ * @summary The value that the sequence starts with
21
+ */
4
22
  startWith: number;
23
+ /**
24
+ * @description The increment value for each step in the sequence
25
+ * @summary The amount by which the sequence increases with each call
26
+ */
5
27
  incrementBy: number;
28
+ /**
29
+ * @description Optional minimum value for the sequence
30
+ * @summary The lowest value that the sequence can generate
31
+ */
6
32
  minValue?: number;
33
+ /**
34
+ * @description Optional maximum value for the sequence
35
+ * @summary The highest value that the sequence can generate
36
+ */
7
37
  maxValue?: number;
38
+ /**
39
+ * @description Whether the sequence should cycle when reaching its limits
40
+ * @summary If true, the sequence will restart from minValue when reaching maxValue
41
+ */
8
42
  cycle: boolean;
9
43
  }
44
+ /**
45
+ * @description Default options for sequences
46
+ * @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
47
+ * @const DefaultSequenceOptions
48
+ * @memberOf module:core
49
+ */
10
50
  export declare const DefaultSequenceOptions: SequenceOptions;
51
+ /**
52
+ * @description Predefined options for numeric sequences
53
+ * @summary Configuration for standard number sequences starting at 0 and incrementing by 1
54
+ * @const NumericSequence
55
+ * @memberOf module:core
56
+ */
11
57
  export declare const NumericSequence: SequenceOptions;
58
+ /**
59
+ * @description Predefined options for BigInt sequences
60
+ * @summary Configuration for BigInt sequences starting at 0 and incrementing by 1
61
+ * @const BigIntSequence
62
+ * @memberOf module:core
63
+ */
12
64
  export declare const BigIntSequence: SequenceOptions;
@@ -12,6 +12,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.BaseModel = void 0;
13
13
  const db_decorators_1 = require("@decaf-ts/db-decorators");
14
14
  const decorator_validation_1 = require("@decaf-ts/decorator-validation");
15
+ /**
16
+ * @description Base model class for all domain models
17
+ * @summary An abstract base class that extends the Model class from decorator-validation and adds timestamp functionality.
18
+ * All domain models in the application should extend this class to inherit common properties and behaviors.
19
+ * @param {ModelArg<BaseModel>} arg - Optional initialization data for the model
20
+ * @class BaseModel
21
+ * @example
22
+ * ```typescript
23
+ * class User extends BaseModel {
24
+ * @required()
25
+ * username!: string;
26
+ *
27
+ * @email()
28
+ * email!: string;
29
+ *
30
+ * constructor(data?: ModelArg<User>) {
31
+ * super(data);
32
+ * }
33
+ * }
34
+ *
35
+ * const user = new User({ username: 'john', email: 'john@example.com' });
36
+ * ```
37
+ */
15
38
  class BaseModel extends decorator_validation_1.Model {
16
39
  constructor(arg) {
17
40
  super(arg);
@@ -26,4 +49,4 @@ __decorate([
26
49
  (0, db_decorators_1.timestamp)(),
27
50
  __metadata("design:type", Date)
28
51
  ], BaseModel.prototype, "updatedOn", void 0);
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmFzZU1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vZGVsL0Jhc2VNb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSwyREFBa0U7QUFDbEUseUVBQWlFO0FBRWpFLE1BQXNCLFNBQVUsU0FBUSw0QkFBSztJQU0zQyxZQUFzQixHQUF5QjtRQUM3QyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7SUFDYixDQUFDO0NBQ0Y7QUFURCw4QkFTQztBQVBDO0lBREMsSUFBQSx5QkFBUyxF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4gKiAgIGVtYWlsITogc3RyaW5nO1xuICogICBcbiAqICAgY29uc3RydWN0b3IoZGF0YT86IE1vZGVsQXJnPFVzZXI+KSB7XG4gKiAgICAgc3VwZXIoZGF0YSk7XG4gKiAgIH1cbiAqIH1cbiAqIFxuICogY29uc3QgdXNlciA9IG5ldyBVc2VyKHsgdXNlcm5hbWU6ICdqb2huJywgZW1haWw6ICdqb2huQGV4YW1wbGUuY29tJyB9KTtcbiAqIGBgYFxuICovXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQmFzZU1vZGVsIGV4dGVuZHMgTW9kZWwge1xuICAvKipcbiAgICogQGRlc2NyaXB0aW9uIENyZWF0aW9uIHRpbWVzdGFtcCBmb3IgdGhlIG1vZGVsXG4gICAqIEBzdW1tYXJ5IEF1dG9tYXRpY2FsbHkgc2V0IHRvIHRoZSBjdXJyZW50IGRhdGUgYW5kIHRpbWUgd2hlbiB0aGUgbW9kZWwgaXMgY3JlYXRlZFxuICAgKi9cbiAgQHRpbWVzdGFtcChEQk9wZXJhdGlvbnMuQ1JFQVRFKVxuICBjcmVhdGVkT24hOiBEYXRlO1xuXG4gIC8qKlxuICAgKiBAZGVzY3JpcHRpb24gTGFzdCB1cGRhdGUgdGltZXN0YW1wIGZvciB0aGUgbW9kZWxcbiAgICogQHN1bW1hcnkgQXV0b21hdGljYWxseSB1cGRhdGVkIHRvIHRoZSBjdXJyZW50IGRhdGUgYW5kIHRpbWUgd2hlbmV2ZXIgdGhlIG1vZGVsIGlzIG1vZGlmaWVkXG4gICAqL1xuICBAdGltZXN0YW1wKClcbiAgdXBkYXRlZE9uITogRGF0ZTtcblxuICBwcm90ZWN0ZWQgY29uc3RydWN0b3IoYXJnPzogTW9kZWxBcmc8QmFzZU1vZGVsPikge1xuICAgIHN1cGVyKGFyZyk7XG4gIH1cbn1cbiJdfQ==
@@ -1,6 +1,37 @@
1
1
  import { ModelArg, Model } from "@decaf-ts/decorator-validation";
2
+ /**
3
+ * @description Base model class for all domain models
4
+ * @summary An abstract base class that extends the Model class from decorator-validation and adds timestamp functionality.
5
+ * All domain models in the application should extend this class to inherit common properties and behaviors.
6
+ * @param {ModelArg<BaseModel>} arg - Optional initialization data for the model
7
+ * @class BaseModel
8
+ * @example
9
+ * ```typescript
10
+ * class User extends BaseModel {
11
+ * @required()
12
+ * username!: string;
13
+ *
14
+ * @email()
15
+ * email!: string;
16
+ *
17
+ * constructor(data?: ModelArg<User>) {
18
+ * super(data);
19
+ * }
20
+ * }
21
+ *
22
+ * const user = new User({ username: 'john', email: 'john@example.com' });
23
+ * ```
24
+ */
2
25
  export declare abstract class BaseModel extends Model {
26
+ /**
27
+ * @description Creation timestamp for the model
28
+ * @summary Automatically set to the current date and time when the model is created
29
+ */
3
30
  createdOn: Date;
31
+ /**
32
+ * @description Last update timestamp for the model
33
+ * @summary Automatically updated to the current date and time whenever the model is modified
34
+ */
4
35
  updatedOn: Date;
5
36
  protected constructor(arg?: ModelArg<BaseModel>);
6
37
  }