@quadnix/octo 0.0.23 → 0.0.25

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 (294) hide show
  1. package/dist/app.type.d.ts +116 -1
  2. package/dist/app.type.js +21 -0
  3. package/dist/app.type.js.map +1 -1
  4. package/dist/decorators/anchor.decorator.d.ts +1 -1
  5. package/dist/decorators/anchor.decorator.js +1 -1
  6. package/dist/decorators/enable-hook.decorator.d.ts +5 -0
  7. package/dist/decorators/enable-hook.decorator.js +5 -0
  8. package/dist/decorators/enable-hook.decorator.js.map +1 -1
  9. package/dist/decorators/event-source.decorator.d.ts +4 -0
  10. package/dist/decorators/event-source.decorator.js +5 -6
  11. package/dist/decorators/event-source.decorator.js.map +1 -1
  12. package/dist/decorators/model.decorator.d.ts +17 -4
  13. package/dist/decorators/model.decorator.js +17 -4
  14. package/dist/decorators/model.decorator.js.map +1 -1
  15. package/dist/decorators/on-event.decorator.js +1 -6
  16. package/dist/decorators/on-event.decorator.js.map +1 -1
  17. package/dist/decorators/overlay.decorator.d.ts +14 -5
  18. package/dist/decorators/overlay.decorator.js +14 -5
  19. package/dist/decorators/overlay.decorator.js.map +1 -1
  20. package/dist/decorators/resource.decorator.d.ts +15 -5
  21. package/dist/decorators/resource.decorator.js +15 -5
  22. package/dist/decorators/resource.decorator.js.map +1 -1
  23. package/dist/decorators/validate.decorator.d.ts +8 -0
  24. package/dist/decorators/validate.decorator.js +8 -0
  25. package/dist/decorators/validate.decorator.js.map +1 -1
  26. package/dist/errors/container.error.d.ts +9 -0
  27. package/dist/errors/container.error.js +9 -0
  28. package/dist/errors/container.error.js.map +1 -1
  29. package/dist/errors/input.error.d.ts +38 -0
  30. package/dist/errors/input.error.js +38 -0
  31. package/dist/errors/input.error.js.map +1 -1
  32. package/dist/errors/module.error.d.ts +3 -0
  33. package/dist/errors/module.error.js +3 -0
  34. package/dist/errors/module.error.js.map +1 -1
  35. package/dist/errors/node.error.d.ts +27 -0
  36. package/dist/errors/node.error.js +27 -0
  37. package/dist/errors/node.error.js.map +1 -1
  38. package/dist/errors/schema.error.d.ts +3 -0
  39. package/dist/errors/schema.error.js +3 -0
  40. package/dist/errors/schema.error.js.map +1 -1
  41. package/dist/errors/transaction.error.d.ts +21 -0
  42. package/dist/errors/transaction.error.js +23 -3
  43. package/dist/errors/transaction.error.js.map +1 -1
  44. package/dist/events/action.event.d.ts +2 -1
  45. package/dist/events/action.event.js +2 -1
  46. package/dist/events/action.event.js.map +1 -1
  47. package/dist/events/event.model.d.ts +5 -3
  48. package/dist/events/event.model.js +3 -1
  49. package/dist/events/event.model.js.map +1 -1
  50. package/dist/events/hook/commit.hook.event.d.ts +6 -3
  51. package/dist/events/hook/commit.hook.event.js +6 -3
  52. package/dist/events/hook/commit.hook.event.js.map +1 -1
  53. package/dist/events/hook/hook.event.d.ts +2 -1
  54. package/dist/events/hook/hook.event.js +2 -1
  55. package/dist/events/hook/hook.event.js.map +1 -1
  56. package/dist/events/hook/model.hook.event.d.ts +6 -3
  57. package/dist/events/hook/model.hook.event.js +6 -3
  58. package/dist/events/hook/model.hook.event.js.map +1 -1
  59. package/dist/events/hook/resource.hook.event.d.ts +6 -3
  60. package/dist/events/hook/resource.hook.event.js +6 -3
  61. package/dist/events/hook/resource.hook.event.js.map +1 -1
  62. package/dist/events/module.event.d.ts +2 -1
  63. package/dist/events/module.event.js +2 -1
  64. package/dist/events/module.event.js.map +1 -1
  65. package/dist/events/registration.event.d.ts +14 -7
  66. package/dist/events/registration.event.js +14 -7
  67. package/dist/events/registration.event.js.map +1 -1
  68. package/dist/events/serialization.event.d.ts +12 -6
  69. package/dist/events/serialization.event.js +12 -6
  70. package/dist/events/serialization.event.js.map +1 -1
  71. package/dist/events/transaction.event.d.ts +53 -10
  72. package/dist/events/transaction.event.js +36 -8
  73. package/dist/events/transaction.event.js.map +1 -1
  74. package/dist/functions/container/container.d.ts +2 -0
  75. package/dist/functions/container/container.js +2 -0
  76. package/dist/functions/container/container.js.map +1 -1
  77. package/dist/functions/container/test-container.d.ts +2 -0
  78. package/dist/functions/container/test-container.js +2 -0
  79. package/dist/functions/container/test-container.js.map +1 -1
  80. package/dist/functions/dependency/dependency.d.ts +9 -0
  81. package/dist/functions/dependency/dependency.js +6 -0
  82. package/dist/functions/dependency/dependency.js.map +1 -1
  83. package/dist/functions/diff/diff-metadata.d.ts +3 -0
  84. package/dist/functions/diff/diff-metadata.js +3 -0
  85. package/dist/functions/diff/diff-metadata.js.map +1 -1
  86. package/dist/functions/diff/diff.d.ts +8 -1
  87. package/dist/functions/diff/diff.js +7 -0
  88. package/dist/functions/diff/diff.js.map +1 -1
  89. package/dist/functions/diff/diff.utility.d.ts +3 -0
  90. package/dist/functions/diff/diff.utility.js +5 -2
  91. package/dist/functions/diff/diff.utility.js.map +1 -1
  92. package/dist/functions/hook/commit.hook.d.ts +3 -0
  93. package/dist/functions/hook/commit.hook.js +3 -0
  94. package/dist/functions/hook/commit.hook.js.map +1 -1
  95. package/dist/functions/hook/hook.interface.d.ts +3 -0
  96. package/dist/functions/hook/model-action.hook.d.ts +3 -0
  97. package/dist/functions/hook/model-action.hook.js +3 -0
  98. package/dist/functions/hook/model-action.hook.js.map +1 -1
  99. package/dist/functions/hook/resource-action.hook.d.ts +5 -2
  100. package/dist/functions/hook/resource-action.hook.js +5 -1
  101. package/dist/functions/hook/resource-action.hook.js.map +1 -1
  102. package/dist/functions/node/node-action.abstract.d.ts +3 -0
  103. package/dist/functions/node/node-action.abstract.js +3 -0
  104. package/dist/functions/node/node-action.abstract.js.map +1 -1
  105. package/dist/functions/node/node.abstract.d.ts +3 -1
  106. package/dist/functions/node/node.abstract.js +3 -1
  107. package/dist/functions/node/node.abstract.js.map +1 -1
  108. package/dist/functions/node/node.interface.d.ts +4 -0
  109. package/dist/functions/schema/schema.d.ts +17 -0
  110. package/dist/functions/schema/schema.js +18 -1
  111. package/dist/functions/schema/schema.js.map +1 -1
  112. package/dist/index.d.ts +1 -1
  113. package/dist/index.js +1 -1
  114. package/dist/index.js.map +1 -1
  115. package/dist/main.d.ts +6 -1
  116. package/dist/main.js +14 -1
  117. package/dist/main.js.map +1 -1
  118. package/dist/models/account/account.model.d.ts +3 -0
  119. package/dist/models/account/account.model.js +5 -1
  120. package/dist/models/account/account.model.js.map +1 -1
  121. package/dist/models/account/account.schema.d.ts +6 -0
  122. package/dist/models/account/account.schema.js +6 -0
  123. package/dist/models/account/account.schema.js.map +1 -1
  124. package/dist/models/app/app.model.d.ts +3 -1
  125. package/dist/models/app/app.model.js +3 -1
  126. package/dist/models/app/app.model.js.map +1 -1
  127. package/dist/models/app/app.schema.d.ts +3 -0
  128. package/dist/models/app/app.schema.js +3 -0
  129. package/dist/models/app/app.schema.js.map +1 -1
  130. package/dist/models/deployment/deployment.model.d.ts +3 -1
  131. package/dist/models/deployment/deployment.model.js +3 -1
  132. package/dist/models/deployment/deployment.model.js.map +1 -1
  133. package/dist/models/deployment/deployment.schema.d.ts +3 -0
  134. package/dist/models/deployment/deployment.schema.js +3 -0
  135. package/dist/models/deployment/deployment.schema.js.map +1 -1
  136. package/dist/models/environment/environment.model.d.ts +3 -1
  137. package/dist/models/environment/environment.model.js +3 -1
  138. package/dist/models/environment/environment.model.js.map +1 -1
  139. package/dist/models/environment/environment.schema.d.ts +3 -0
  140. package/dist/models/environment/environment.schema.js +3 -0
  141. package/dist/models/environment/environment.schema.js.map +1 -1
  142. package/dist/models/execution/execution.model.d.ts +3 -1
  143. package/dist/models/execution/execution.model.js +3 -1
  144. package/dist/models/execution/execution.model.js.map +1 -1
  145. package/dist/models/execution/execution.schema.d.ts +3 -0
  146. package/dist/models/execution/execution.schema.js +3 -0
  147. package/dist/models/execution/execution.schema.js.map +1 -1
  148. package/dist/models/filesystem/filesystem.model.d.ts +3 -0
  149. package/dist/models/filesystem/filesystem.model.js +3 -0
  150. package/dist/models/filesystem/filesystem.model.js.map +1 -1
  151. package/dist/models/filesystem/filesystem.schema.d.ts +3 -0
  152. package/dist/models/filesystem/filesystem.schema.js +3 -0
  153. package/dist/models/filesystem/filesystem.schema.js.map +1 -1
  154. package/dist/models/image/image.model.d.ts +3 -1
  155. package/dist/models/image/image.model.js +3 -1
  156. package/dist/models/image/image.model.js.map +1 -1
  157. package/dist/models/image/image.schema.d.ts +3 -0
  158. package/dist/models/image/image.schema.js +4 -1
  159. package/dist/models/image/image.schema.js.map +1 -1
  160. package/dist/models/model-action.interface.d.ts +2 -0
  161. package/dist/models/model.abstract.d.ts +3 -0
  162. package/dist/models/model.abstract.js +3 -0
  163. package/dist/models/model.abstract.js.map +1 -1
  164. package/dist/models/model.interface.d.ts +5 -0
  165. package/dist/models/pipeline/pipeline.model.d.ts +3 -1
  166. package/dist/models/pipeline/pipeline.model.js +3 -1
  167. package/dist/models/pipeline/pipeline.model.js.map +1 -1
  168. package/dist/models/pipeline/pipeline.schema.d.ts +3 -0
  169. package/dist/models/pipeline/pipeline.schema.js +3 -0
  170. package/dist/models/pipeline/pipeline.schema.js.map +1 -1
  171. package/dist/models/region/region.model.d.ts +3 -1
  172. package/dist/models/region/region.model.js +3 -1
  173. package/dist/models/region/region.model.js.map +1 -1
  174. package/dist/models/region/region.schema.d.ts +3 -0
  175. package/dist/models/region/region.schema.js +3 -0
  176. package/dist/models/region/region.schema.js.map +1 -1
  177. package/dist/models/server/server.model.d.ts +3 -1
  178. package/dist/models/server/server.model.js +3 -1
  179. package/dist/models/server/server.model.js.map +1 -1
  180. package/dist/models/server/server.schema.d.ts +3 -0
  181. package/dist/models/server/server.schema.js +3 -0
  182. package/dist/models/server/server.schema.js.map +1 -1
  183. package/dist/models/service/service.model.d.ts +3 -1
  184. package/dist/models/service/service.model.js +3 -1
  185. package/dist/models/service/service.model.js.map +1 -1
  186. package/dist/models/service/service.schema.d.ts +3 -0
  187. package/dist/models/service/service.schema.js +3 -0
  188. package/dist/models/service/service.schema.js.map +1 -1
  189. package/dist/models/subnet/subnet.model.d.ts +3 -1
  190. package/dist/models/subnet/subnet.model.js +3 -1
  191. package/dist/models/subnet/subnet.model.js.map +1 -1
  192. package/dist/models/subnet/subnet.schema.d.ts +5 -0
  193. package/dist/models/subnet/subnet.schema.js +5 -0
  194. package/dist/models/subnet/subnet.schema.js.map +1 -1
  195. package/dist/modules/module.abstract.d.ts +3 -0
  196. package/dist/modules/module.abstract.js +3 -0
  197. package/dist/modules/module.abstract.js.map +1 -1
  198. package/dist/modules/module.container.d.ts +6 -0
  199. package/dist/modules/module.container.js +11 -0
  200. package/dist/modules/module.container.js.map +1 -1
  201. package/dist/modules/module.interface.d.ts +3 -0
  202. package/dist/modules/test-module.container.d.ts +8 -0
  203. package/dist/modules/test-module.container.js +14 -6
  204. package/dist/modules/test-module.container.js.map +1 -1
  205. package/dist/overlays/anchor.abstract.d.ts +3 -0
  206. package/dist/overlays/anchor.abstract.js +4 -1
  207. package/dist/overlays/anchor.abstract.js.map +1 -1
  208. package/dist/overlays/anchor.interface.d.ts +3 -0
  209. package/dist/overlays/anchor.schema.d.ts +7 -1
  210. package/dist/overlays/anchor.schema.js +3 -0
  211. package/dist/overlays/anchor.schema.js.map +1 -1
  212. package/dist/overlays/overlay-data.repository.d.ts +6 -0
  213. package/dist/overlays/overlay-data.repository.js +6 -0
  214. package/dist/overlays/overlay-data.repository.js.map +1 -1
  215. package/dist/overlays/overlay.abstract.d.ts +3 -0
  216. package/dist/overlays/overlay.abstract.js +6 -0
  217. package/dist/overlays/overlay.abstract.js.map +1 -1
  218. package/dist/overlays/overlay.interface.d.ts +3 -0
  219. package/dist/overlays/overlay.schema.d.ts +3 -0
  220. package/dist/overlays/overlay.schema.js +3 -0
  221. package/dist/overlays/overlay.schema.js.map +1 -1
  222. package/dist/resources/resource-action.interface.d.ts +5 -2
  223. package/dist/resources/resource-data.repository.d.ts +7 -0
  224. package/dist/resources/resource-data.repository.js +13 -0
  225. package/dist/resources/resource-data.repository.js.map +1 -1
  226. package/dist/resources/resource.abstract.d.ts +4 -0
  227. package/dist/resources/resource.abstract.js +13 -2
  228. package/dist/resources/resource.abstract.js.map +1 -1
  229. package/dist/resources/resource.interface.d.ts +6 -0
  230. package/dist/resources/resource.schema.d.ts +3 -0
  231. package/dist/resources/resource.schema.js +3 -0
  232. package/dist/resources/resource.schema.js.map +1 -1
  233. package/dist/services/capture/capture.service.d.ts +7 -0
  234. package/dist/services/capture/capture.service.js +9 -0
  235. package/dist/services/capture/capture.service.js.map +1 -1
  236. package/dist/services/event/event.service.d.ts +8 -1
  237. package/dist/services/event/event.service.js +14 -4
  238. package/dist/services/event/event.service.js.map +1 -1
  239. package/dist/services/input/input.service.d.ts +6 -0
  240. package/dist/services/input/input.service.js +18 -12
  241. package/dist/services/input/input.service.js.map +1 -1
  242. package/dist/services/schema-translation/schema-translation.service.d.ts +6 -0
  243. package/dist/services/schema-translation/schema-translation.service.js +6 -0
  244. package/dist/services/schema-translation/schema-translation.service.js.map +1 -1
  245. package/dist/services/serialization/model/model-serialization.service.d.ts +6 -0
  246. package/dist/services/serialization/model/model-serialization.service.js +29 -8
  247. package/dist/services/serialization/model/model-serialization.service.js.map +1 -1
  248. package/dist/services/serialization/resource/resource-serialization.service.d.ts +6 -0
  249. package/dist/services/serialization/resource/resource-serialization.service.js +6 -0
  250. package/dist/services/serialization/resource/resource-serialization.service.js.map +1 -1
  251. package/dist/services/state-management/local.state-provider.d.ts +12 -0
  252. package/dist/services/state-management/local.state-provider.js +62 -0
  253. package/dist/services/state-management/local.state-provider.js.map +1 -1
  254. package/dist/services/state-management/state-management.service.d.ts +13 -0
  255. package/dist/services/state-management/state-management.service.js +21 -0
  256. package/dist/services/state-management/state-management.service.js.map +1 -1
  257. package/dist/services/state-management/state-provider.interface.d.ts +10 -0
  258. package/dist/services/state-management/test.state-provider.d.ts +11 -0
  259. package/dist/services/state-management/test.state-provider.js +44 -0
  260. package/dist/services/state-management/test.state-provider.js.map +1 -1
  261. package/dist/services/transaction/transaction.service.d.ts +8 -1
  262. package/dist/services/transaction/transaction.service.js +88 -13
  263. package/dist/services/transaction/transaction.service.js.map +1 -1
  264. package/dist/services/validation/validation.service.d.ts +6 -0
  265. package/dist/services/validation/validation.service.js +6 -0
  266. package/dist/services/validation/validation.service.js.map +1 -1
  267. package/dist/utilities/array/array.utility.d.ts +3 -0
  268. package/dist/utilities/array/array.utility.js +3 -0
  269. package/dist/utilities/array/array.utility.js.map +1 -1
  270. package/dist/utilities/cidr/cidr.utility.d.ts +3 -0
  271. package/dist/utilities/cidr/cidr.utility.js +3 -0
  272. package/dist/utilities/cidr/cidr.utility.js.map +1 -1
  273. package/dist/utilities/node/node.utility.d.ts +3 -0
  274. package/dist/utilities/node/node.utility.js +3 -0
  275. package/dist/utilities/node/node.utility.js.map +1 -1
  276. package/dist/utilities/object/object.utility.d.ts +3 -0
  277. package/dist/utilities/object/object.utility.js +4 -1
  278. package/dist/utilities/object/object.utility.js.map +1 -1
  279. package/dist/utilities/test-helpers/test-classes.d.ts +27 -0
  280. package/dist/utilities/test-helpers/test-classes.js +27 -0
  281. package/dist/utilities/test-helpers/test-classes.js.map +1 -1
  282. package/dist/utilities/test-helpers/test-models.d.ts +6 -0
  283. package/dist/utilities/test-helpers/test-models.js +6 -0
  284. package/dist/utilities/test-helpers/test-models.js.map +1 -1
  285. package/dist/utilities/test-helpers/test-overlays.d.ts +3 -0
  286. package/dist/utilities/test-helpers/test-overlays.js +3 -0
  287. package/dist/utilities/test-helpers/test-overlays.js.map +1 -1
  288. package/dist/utilities/test-helpers/test-resources.d.ts +9 -0
  289. package/dist/utilities/test-helpers/test-resources.js +10 -1
  290. package/dist/utilities/test-helpers/test-resources.js.map +1 -1
  291. package/dist/utilities/validation/validation.utility.d.ts +3 -0
  292. package/dist/utilities/validation/validation.utility.js +3 -0
  293. package/dist/utilities/validation/validation.utility.js.map +1 -1
  294. package/package.json +2 -2
@@ -2,7 +2,7 @@ import type { IDependency } from './functions/dependency/dependency.js';
2
2
  import type { ANode } from './functions/node/node.abstract.js';
3
3
  import type { IModelAction } from './models/model-action.interface.js';
4
4
  import type { AModel } from './models/model.abstract.js';
5
- import type { IModel } from './models/model.interface.js';
5
+ import type { IModel, IModelReference } from './models/model.interface.js';
6
6
  import type { AModule } from './modules/module.abstract.js';
7
7
  import type { AAnchor } from './overlays/anchor.abstract.js';
8
8
  import type { BaseAnchorSchema } from './overlays/anchor.schema.js';
@@ -12,6 +12,9 @@ import type { IResourceAction } from './resources/resource-action.interface.js';
12
12
  import type { AResource } from './resources/resource.abstract.js';
13
13
  import type { BaseResourceSchema } from './resources/resource.schema.js';
14
14
  import type { ValidationUtility } from './utilities/validation/validation.utility.js';
15
+ /**
16
+ * @group Types
17
+ */
15
18
  export declare class MatchingAnchor<S extends BaseAnchorSchema> {
16
19
  private readonly actual;
17
20
  private readonly schemaTranslator?;
@@ -22,6 +25,9 @@ export declare class MatchingAnchor<S extends BaseAnchorSchema> {
22
25
  }, any>;
23
26
  getSchemaInstance(): S;
24
27
  }
28
+ /**
29
+ * @group Types
30
+ */
25
31
  export declare class MatchingModel<S extends object> {
26
32
  private readonly actual;
27
33
  private readonly schemaTranslator?;
@@ -30,6 +36,9 @@ export declare class MatchingModel<S extends object> {
30
36
  getActual(): AModel<Record<never, never>, any>;
31
37
  getSchemaInstance(): S;
32
38
  }
39
+ /**
40
+ * @group Types
41
+ */
33
42
  export declare class MatchingResource<S extends BaseResourceSchema> {
34
43
  private readonly actual;
35
44
  readonly schemaTranslator?: ((synth: BaseResourceSchema) => S) | undefined;
@@ -48,11 +57,17 @@ export declare class MatchingResource<S extends BaseResourceSchema> {
48
57
  response: Required<S['response']>;
49
58
  };
50
59
  }
60
+ /**
61
+ * @internal
62
+ */
51
63
  export declare enum NodeType {
52
64
  MODEL = "model",
53
65
  OVERLAY = "overlay",
54
66
  RESOURCE = "resource"
55
67
  }
68
+ /**
69
+ * @internal
70
+ */
56
71
  export declare enum ValidationType {
57
72
  CUSTOM = "custom",
58
73
  IS_MODEL = "isModel",
@@ -63,6 +78,9 @@ export declare enum ValidationType {
63
78
  MIN_LENGTH = "minLength",
64
79
  REGEX = "regex"
65
80
  }
81
+ /**
82
+ * @internal
83
+ */
66
84
  export type ValidationTypeOptions = {
67
85
  [ValidationType.CUSTOM]: Parameters<typeof ValidationUtility.validateCustom>[1];
68
86
  [ValidationType.IS_MODEL]: Parameters<typeof ValidationUtility.validateIsModel>[1];
@@ -73,22 +91,43 @@ export type ValidationTypeOptions = {
73
91
  [ValidationType.MIN_LENGTH]: Parameters<typeof ValidationUtility.validateMinLength>[1];
74
92
  [ValidationType.REGEX]: Parameters<typeof ValidationUtility.validateRegex>[1];
75
93
  };
94
+ /**
95
+ * @group Types
96
+ */
76
97
  export declare function hasNodeName(node: UnknownNode, nodeName: string): boolean;
98
+ /**
99
+ * @group Types
100
+ */
77
101
  export declare function stub<T>(value: string): T;
102
+ /**
103
+ * @internal
104
+ */
78
105
  export type ActionInputs = EnhancedModuleSchema<UnknownModule>;
106
+ /**
107
+ * @group Types
108
+ */
79
109
  export type ActionOutputs = {
80
110
  [key: string]: UnknownResource;
81
111
  };
112
+ /**
113
+ * @internal
114
+ */
82
115
  export type ClassRequiredProperties<T> = {
83
116
  [K in keyof T]: undefined extends T[K] ? never : K;
84
117
  }[keyof T];
85
118
  export type ClassOptionalProperties<T> = {
86
119
  [K in keyof T]: undefined extends T[K] ? K : never;
87
120
  }[keyof T];
121
+ /**
122
+ * @group Types
123
+ */
88
124
  export type DiffValueTypePropertyUpdate = {
89
125
  key: string;
90
126
  value: unknown;
91
127
  };
128
+ /**
129
+ * @group Types
130
+ */
92
131
  export type DiffValueTypeTagUpdate = {
93
132
  add: {
94
133
  [key: string]: string;
@@ -98,16 +137,28 @@ export type DiffValueTypeTagUpdate = {
98
137
  [key: string]: string;
99
138
  };
100
139
  };
140
+ /**
141
+ * @internal
142
+ */
101
143
  export type ObjectKeyValue<T> = {
102
144
  [K in keyof T]: {
103
145
  key: K;
104
146
  value: T[K];
105
147
  };
106
148
  }[keyof T];
149
+ /**
150
+ * @group Types
151
+ */
107
152
  export type Constructable<T> = new (...args: any[]) => T;
153
+ /**
154
+ * @group Types
155
+ */
108
156
  export type ModelSerializedOutput = {
109
157
  anchors: (AnchorSchema<UnknownAnchor> & {
110
158
  className: string;
159
+ location: IModelReference & {
160
+ type: NodeType;
161
+ };
111
162
  })[];
112
163
  dependencies: IDependency[];
113
164
  models: {
@@ -121,6 +172,9 @@ export type ModelSerializedOutput = {
121
172
  overlay: OverlaySchema<UnknownOverlay>;
122
173
  }[];
123
174
  };
175
+ /**
176
+ * @group Types
177
+ */
124
178
  export type ResourceSerializedOutput = {
125
179
  dependencies: IDependency[];
126
180
  resources: {
@@ -130,15 +184,28 @@ export type ResourceSerializedOutput = {
130
184
  };
131
185
  };
132
186
  };
187
+ /**
188
+ * @internal
189
+ */
133
190
  export type TransactionOptions = {
134
191
  enableResourceCapture?: boolean;
192
+ enableResourceValidation?: boolean;
135
193
  yieldModelDiffs?: boolean;
136
194
  yieldModelTransaction?: boolean;
137
195
  yieldResourceDiffs?: boolean;
138
196
  yieldResourceTransaction?: boolean;
139
197
  };
198
+ /**
199
+ * @internal
200
+ */
140
201
  export type ModifyInterface<T, R> = Omit<T, keyof R> & R;
202
+ /**
203
+ * @group Types
204
+ */
141
205
  export type AnchorSchema<T> = T extends AAnchor<infer S, any> ? S : never;
206
+ /**
207
+ * @group Types
208
+ */
142
209
  export type EnhancedModuleSchema<T extends UnknownModule> = {
143
210
  inputs: {
144
211
  [K in keyof ModuleSchemaInputs<T>]: ModuleSchema<T>[K];
@@ -148,23 +215,71 @@ export type EnhancedModuleSchema<T extends UnknownModule> = {
148
215
  overlays: Record<string, UnknownOverlay>;
149
216
  resources: Record<string, UnknownResource>;
150
217
  };
218
+ /**
219
+ * @internal
220
+ */
151
221
  export type ModelSchema<T> = T extends AModel<infer S, any> ? S : never;
222
+ /**
223
+ * @internal
224
+ */
152
225
  export type ModuleOutput<M> = M extends AModule<any, infer T> ? T : never;
226
+ /**
227
+ * @group Types
228
+ */
153
229
  export type ModuleSchema<T> = T extends AModule<infer S, any> ? S : never;
230
+ /**
231
+ * @group Types
232
+ */
154
233
  export type ModuleSchemaInputs<T> = {
155
234
  [K in ClassRequiredProperties<ModuleSchema<T>>]: ModuleSchema<T>[K];
156
235
  } & {
157
236
  [K in ClassOptionalProperties<ModuleSchema<T>>]?: ModuleSchema<T>[K];
158
237
  };
238
+ /**
239
+ * @internal
240
+ */
159
241
  export type NodeSchema<T> = T extends ANode<infer S, any> ? S : never;
242
+ /**
243
+ * @group Types
244
+ */
160
245
  export type OverlaySchema<T> = T extends AOverlay<infer S, any> ? S : never;
246
+ /**
247
+ * @group Types
248
+ */
161
249
  export type ResourceSchema<T> = T extends AResource<infer S, any> ? S : never;
250
+ /**
251
+ * @internal
252
+ */
162
253
  export type IUnknownModel = IModel<unknown, any>;
254
+ /**
255
+ * @internal
256
+ */
163
257
  export type IUnknownModelAction = IModelAction<any>;
258
+ /**
259
+ * @internal
260
+ */
164
261
  export type IUnknownResourceAction = IResourceAction<any>;
262
+ /**
263
+ * @internal
264
+ */
165
265
  export type UnknownAnchor = AAnchor<BaseAnchorSchema, UnknownModel>;
266
+ /**
267
+ * @internal
268
+ */
166
269
  export type UnknownModel = AModel<unknown, any>;
270
+ /**
271
+ * @internal
272
+ */
167
273
  export type UnknownModule = AModule<unknown, any>;
274
+ /**
275
+ * @internal
276
+ */
168
277
  export type UnknownNode = ANode<unknown, unknown>;
278
+ /**
279
+ * @internal
280
+ */
169
281
  export type UnknownOverlay = AOverlay<BaseOverlaySchema, any>;
282
+ /**
283
+ * @internal
284
+ */
170
285
  export type UnknownResource = AResource<any, any>;
package/dist/app.type.js CHANGED
@@ -1,4 +1,7 @@
1
1
  /* Classes */
2
+ /**
3
+ * @group Types
4
+ */
2
5
  export class MatchingAnchor {
3
6
  constructor(actual, schemaTranslator) {
4
7
  this.actual = actual;
@@ -14,6 +17,9 @@ export class MatchingAnchor {
14
17
  return this.hasSchemaTranslator() ? this.schemaTranslator(this.actual.synth()) : this.actual.synth();
15
18
  }
16
19
  }
20
+ /**
21
+ * @group Types
22
+ */
17
23
  export class MatchingModel {
18
24
  constructor(actual, schemaTranslator) {
19
25
  this.actual = actual;
@@ -29,6 +35,9 @@ export class MatchingModel {
29
35
  return this.hasSchemaTranslator() ? this.schemaTranslator(this.actual.synth()) : this.actual.synth();
30
36
  }
31
37
  }
38
+ /**
39
+ * @group Types
40
+ */
32
41
  export class MatchingResource {
33
42
  constructor(actual, schemaTranslator) {
34
43
  this.actual = actual;
@@ -57,12 +66,18 @@ export class MatchingResource {
57
66
  }
58
67
  }
59
68
  /* Enumerations */
69
+ /**
70
+ * @internal
71
+ */
60
72
  export var NodeType;
61
73
  (function (NodeType) {
62
74
  NodeType["MODEL"] = "model";
63
75
  NodeType["OVERLAY"] = "overlay";
64
76
  NodeType["RESOURCE"] = "resource";
65
77
  })(NodeType || (NodeType = {}));
78
+ /**
79
+ * @internal
80
+ */
66
81
  export var ValidationType;
67
82
  (function (ValidationType) {
68
83
  ValidationType["CUSTOM"] = "custom";
@@ -75,9 +90,15 @@ export var ValidationType;
75
90
  ValidationType["REGEX"] = "regex";
76
91
  })(ValidationType || (ValidationType = {}));
77
92
  /* Functions */
93
+ /**
94
+ * @group Types
95
+ */
78
96
  export function hasNodeName(node, nodeName) {
79
97
  return node.constructor.NODE_NAME === nodeName;
80
98
  }
99
+ /**
100
+ * @group Types
101
+ */
81
102
  export function stub(value) {
82
103
  return value;
83
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"app.type.js","sourceRoot":"","sources":["../src/app.type.ts"],"names":[],"mappings":"AAeA,aAAa;AACb,MAAM,OAAO,cAAc;IACzB,YACmB,MAAuB,EACvB,gBAAoC;QADpC,WAAM,GAAN,MAAM,CAAiB;QACvB,qBAAgB,GAAhB,gBAAgB,CAAoB;IACpD,CAAC;IAEJ,mBAAmB;QACjB,OAAO,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CA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AJD,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;AACvB,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,sCAAoB,CAAA;IACpB,0CAAwB,CAAA;IACxB,4CAA0B,CAAA;IAC1B,wCAAsB,CAAA;IACtB,0CAAwB,CAAA;IACxB,0CAAwB,CAAA;IACxB,iCAAe,CAAA;AACjB,CAAC,EATW,cAAc,KAAd,cAAc,QASzB;AAgBD,eAAe;AAEf;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAiB,EAAE,QAAgB;IAC7D,OAAQ,IAAI,CAAC,WAA4B,CAAC,SAAS,KAAK,QAAQ,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,KAAU,CAAC;AACpB,CAAC"}
@@ -9,6 +9,6 @@
9
9
  * ```
10
10
  * @group Decorators
11
11
  * @returns The decorated class.
12
- * @see Definition of [Anchors](/docs/fundamentals/overlay-and-anchor).
12
+ * @see Definition of [Anchors](/docs/fundamentals/overlays).
13
13
  */
14
14
  export declare function Anchor(packageName: string): (constructor: any) => void;
@@ -13,7 +13,7 @@ import { ValidationUtility } from '../utilities/validation/validation.utility.js
13
13
  * ```
14
14
  * @group Decorators
15
15
  * @returns The decorated class.
16
- * @see Definition of [Anchors](/docs/fundamentals/overlay-and-anchor).
16
+ * @see Definition of [Anchors](/docs/fundamentals/overlays).
17
17
  */
18
18
  export function Anchor(packageName) {
19
19
  const container = Container.getInstance();
@@ -7,10 +7,15 @@ type Hook = 'CommitHook';
7
7
  * @EnableHook('CommitHook')
8
8
  * async commitTransaction(): Promise<void> { ... }
9
9
  * ```
10
+ *
10
11
  * @group Decorators
12
+ *
11
13
  * @internal
14
+ *
12
15
  * @param hook The only values supported are `CommitHook`.
16
+ *
13
17
  * @returns The decorated method.
18
+ *
14
19
  * @see Definition of [Hooks](/docs/fundamentals/modules#hooks).
15
20
  */
16
21
  export declare function EnableHook(hook: Hook): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
@@ -7,10 +7,15 @@ import { CommitHook } from '../functions/hook/commit.hook.js';
7
7
  * @EnableHook('CommitHook')
8
8
  * async commitTransaction(): Promise<void> { ... }
9
9
  * ```
10
+ *
10
11
  * @group Decorators
12
+ *
11
13
  * @internal
14
+ *
12
15
  * @param hook The only values supported are `CommitHook`.
16
+ *
13
17
  * @returns The decorated method.
18
+ *
14
19
  * @see Definition of [Hooks](/docs/fundamentals/modules#hooks).
15
20
  */
16
21
  export function EnableHook(hook) {
@@ -1 +1 @@
1
- {"version":3,"file":"enable-hook.decorator.js","sourceRoot":"","sources":["../../src/decorators/enable-hook.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,OAAO,UAAU,OAAY,EAAE,YAAoB,EAAE,UAA8B;QACjF,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,YAAY;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;gBAC/C,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,IAAI,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"enable-hook.decorator.js","sourceRoot":"","sources":["../../src/decorators/enable-hook.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,UAAU,CAAC,IAAU;IACnC,OAAO,UAAU,OAAY,EAAE,YAAoB,EAAE,UAA8B;QACjF,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,YAAY;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;gBAC/C,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,IAAI,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -10,9 +10,13 @@ import type { Event } from '../events/index.js';
10
10
  * @EventSource(MyEvent)
11
11
  * myMethod(): void { ... }
12
12
  * ```
13
+ *
13
14
  * @group Decorators
15
+ *
14
16
  * @internal
17
+ *
15
18
  * @param ofType The type of event being emitted.
19
+ *
16
20
  * @returns The decorated method.
17
21
  */
18
22
  export declare function EventSource(ofType: Constructable<Event<unknown>>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
@@ -1,4 +1,3 @@
1
- import { Container } from '../functions/container/container.js';
2
1
  import { EventService } from '../services/event/event.service.js';
3
2
  /**
4
3
  * An `@EventSource` is a method decorator to enable automatic event emission.
@@ -10,18 +9,18 @@ import { EventService } from '../services/event/event.service.js';
10
9
  * @EventSource(MyEvent)
11
10
  * myMethod(): void { ... }
12
11
  * ```
12
+ *
13
13
  * @group Decorators
14
+ *
14
15
  * @internal
16
+ *
15
17
  * @param ofType The type of event being emitted.
18
+ *
16
19
  * @returns The decorated method.
17
20
  */
18
21
  export function EventSource(ofType) {
19
- const container = Container.getInstance();
20
22
  return function (_target, _propertyKey, descriptor) {
21
- const promise = container.get(EventService).then((eventService) => {
22
- ofType.registrar(eventService, descriptor);
23
- });
24
- container.registerStartupUnhandledPromise(promise);
23
+ ofType.registrar(EventService.getInstance(), descriptor);
25
24
  };
26
25
  }
27
26
  //# sourceMappingURL=event-source.decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-source.decorator.js","sourceRoot":"","sources":["../../src/decorators/event-source.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CACzB,MAAqC;IAErC,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAE1C,OAAO,UAAU,OAAY,EAAE,YAAoB,EAAE,UAA8B;QACjF,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;YAC/D,MAAc,CAAC,SAAS,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"event-source.decorator.js","sourceRoot":"","sources":["../../src/decorators/event-source.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW,CACzB,MAAqC;IAErC,OAAO,UAAU,OAAY,EAAE,YAAoB,EAAE,UAA8B;QAChF,MAAc,CAAC,SAAS,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CAAC;IACpE,CAAC,CAAC;AACJ,CAAC"}
@@ -1,15 +1,28 @@
1
1
  import { type Constructable, type ModelSchema, type UnknownModel } from '../app.type.js';
2
2
  /**
3
- * A `@Model` is a class decorator to be placed on top of a class that represents a model.
4
- * - A model must extend the {@link AModel} class.
3
+ * A `@Model` is a class decorator and must be placed on top of a class representing a model.
4
+ * - A model must also extend a base model class.
5
+ * - For type safety, the type of model being decorated is passed to the decorator.
5
6
  *
6
7
  * @example
7
8
  * ```ts
8
- * @Model('my-package', 'my-name')
9
- * export class MyModel extends AModel<IMyModel, MyModel> { ... }
9
+ * @Model<MyModel>('@example', 'region', MyModelSchema)
10
+ * export class MyModel extends Region { ... }
10
11
  * ```
12
+ *
11
13
  * @group Decorators
14
+ *
15
+ * @param packageName - The name of the package under which the model is registered.
16
+ * Selecting a unique package name helps avoid collisions between same model class names across different libraries.
17
+ * You will reuse the same package name throughout your library for different Octo components you create.
18
+ * @param modelName - a string that uniquely represents the base model you are extending.
19
+ * Octo provides names for each of the base models, and you must use the same name.
20
+ * E.g. for region base model, the model name is `region`.
21
+ * @param schema - The schema of the model.
22
+ *
12
23
  * @returns The decorated class.
24
+ *
13
25
  * @see Definition of [Models](/docs/fundamentals/models).
26
+ * @see {@link App} and {@link Region} are a few base models. More can be found in the same folder.
14
27
  */
15
28
  export declare function Model<T extends UnknownModel>(packageName: string, modelName: string, schema: Constructable<ModelSchema<T>>): (constructor: any) => void;
@@ -5,17 +5,30 @@ import { AOverlay } from '../overlays/overlay.abstract.js';
5
5
  import { ModelSerializationService } from '../services/serialization/model/model-serialization.service.js';
6
6
  import { ValidationUtility } from '../utilities/validation/validation.utility.js';
7
7
  /**
8
- * A `@Model` is a class decorator to be placed on top of a class that represents a model.
9
- * - A model must extend the {@link AModel} class.
8
+ * A `@Model` is a class decorator and must be placed on top of a class representing a model.
9
+ * - A model must also extend a base model class.
10
+ * - For type safety, the type of model being decorated is passed to the decorator.
10
11
  *
11
12
  * @example
12
13
  * ```ts
13
- * @Model('my-package', 'my-name')
14
- * export class MyModel extends AModel<IMyModel, MyModel> { ... }
14
+ * @Model<MyModel>('@example', 'region', MyModelSchema)
15
+ * export class MyModel extends Region { ... }
15
16
  * ```
17
+ *
16
18
  * @group Decorators
19
+ *
20
+ * @param packageName - The name of the package under which the model is registered.
21
+ * Selecting a unique package name helps avoid collisions between same model class names across different libraries.
22
+ * You will reuse the same package name throughout your library for different Octo components you create.
23
+ * @param modelName - a string that uniquely represents the base model you are extending.
24
+ * Octo provides names for each of the base models, and you must use the same name.
25
+ * E.g. for region base model, the model name is `region`.
26
+ * @param schema - The schema of the model.
27
+ *
17
28
  * @returns The decorated class.
29
+ *
18
30
  * @see Definition of [Models](/docs/fundamentals/models).
31
+ * @see {@link App} and {@link Region} are a few base models. More can be found in the same folder.
19
32
  */
20
33
  export function Model(packageName, modelName, schema) {
21
34
  const container = Container.getInstance();
@@ -1 +1 @@
1
- {"version":3,"file":"model.decorator.js","sourceRoot":"","sources":["../../src/decorators/model.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,QAAQ,EAAqB,MAAM,gBAAgB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gEAAgE,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,KAAK,CACnB,WAAmB,EACnB,SAAiB,EACjB,MAAqC;IAErC,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAE1C,OAAO,UAAU,WAAgB;QAC/B,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,EAAE,2BAA2B,CAAC,EAAE,CAAC;YAC/E,MAAM,IAAI,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,SAAS,EAAE,0BAA0B,CAAC,EAAE,CAAC;YAC5E,MAAM,IAAI,KAAK,CAAC,uBAAuB,SAAS,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,CAAC,WAAW,CAAC,SAAS,YAAY,MAAM,CAAC,IAAI,WAAW,CAAC,SAAS,YAAY,QAAQ,EAAE,CAAC;YAC5F,MAAM,IAAI,KAAK,CAAC,UAAU,WAAW,CAAC,IAAI,iCAAiC,CAAC,CAAC;QAC/E,CAAC;QAED,WAAW,CAAC,SAA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BAAiB,CAAC,aAAa,CAAC,SAAS,EAAE,0BAA0B,CAAC,EAAE,CAAC;YAC5E,MAAM,IAAI,KAAK,CAAC,uBAAuB,SAAS,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,CAAC,WAAW,CAAC,SAAS,YAAY,MAAM,CAAC,IAAI,WAAW,CAAC,SAAS,YAAY,QAAQ,EAAE,CAAC;YAC5F,MAAM,IAAI,KAAK,CAAC,UAAU,WAAW,CAAC,IAAI,iCAAiC,CAAC,CAAC;QAC/E,CAAC;QAED,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;QAClC,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC;QACvC,WAAW,CAAC,WAAW,GAAG,MAAM,CAAC;QACjC,WAAW,CAAC,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEvC,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,CAAC,yBAAyB,EAAE,EAAE;YAC1F,yBAAyB,CAAC,aAAa,CAAC,GAAG,WAAW,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,CAAC;QAC7F,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC"}
@@ -1,4 +1,3 @@
1
- import { Container } from '../functions/container/container.js';
2
1
  import { EventService } from '../services/event/event.service.js';
3
2
  /**
4
3
  * An `@OnEvent` is a method decorator to listen to an event.
@@ -18,12 +17,8 @@ import { EventService } from '../services/event/event.service.js';
18
17
  * @returns The decorated method.
19
18
  */
20
19
  export function OnEvent(ofType) {
21
- const container = Container.getInstance();
22
20
  return function (target, _propertyKey, descriptor) {
23
- const promise = container.get(EventService).then((eventService) => {
24
- eventService.registerListeners(ofType, target, descriptor);
25
- });
26
- container.registerStartupUnhandledPromise(promise);
21
+ EventService.getInstance().registerListeners(ofType, target, descriptor);
27
22
  };
28
23
  }
29
24
  //# sourceMappingURL=on-event.decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"on-event.decorator.js","sourceRoot":"","sources":["../../src/decorators/on-event.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,OAAO,CACrB,MAAqC;IAErC,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAE1C,OAAO,UAAU,MAAW,EAAE,YAAoB,EAAE,UAA8B;QAChF,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;YAChE,YAAY,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"on-event.decorator.js","sourceRoot":"","sources":["../../src/decorators/on-event.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,OAAO,CACrB,MAAqC;IAErC,OAAO,UAAU,MAAW,EAAE,YAAoB,EAAE,UAA8B;QAChF,YAAY,CAAC,WAAW,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3E,CAAC,CAAC;AACJ,CAAC"}
@@ -1,15 +1,24 @@
1
1
  import { type Constructable, type OverlaySchema, type UnknownOverlay } from '../app.type.js';
2
2
  /**
3
- * An `@Overlay` is a class decorator to be placed on top of a class that represents an overlay.
4
- * - An overlay must extend the {@link AOverlay} class.
3
+ * An `@Overlay` is a class decorator and must be placed on top of a class representing an overlay.
4
+ * - An overlay must also extend the {@link AOverlay} class.
5
+ * - For type safety, the type of overlay being decorated is passed to the decorator.
5
6
  *
6
7
  * @example
7
8
  * ```ts
8
- * @Overlay('my-package', 'my-name')
9
- * export class MyOverlay extends AOverlay<MyOverlay> { ... }
9
+ * @Overlay<MyOverlay>('@example', 'my-name', MyOverlaySchema)
10
+ * export class MyOverlay extends AOverlay<MyOverlaySchema, MyOverlay> { ... }
10
11
  * ```
11
12
  * @group Decorators
13
+ *
14
+ * @param packageName - The name of the package under which the overlay is registered.
15
+ * Selecting a unique package name helps avoid collisions between same overlay class names across different libraries.
16
+ * You will reuse the same package name throughout your library for different Octo components you create.
17
+ * @param overlayName - a string that uniquely represents the name of the overlay.
18
+ * @param schema - The schema of the overlay.
19
+ *
12
20
  * @returns The decorated class.
13
- * @see Definition of [Overlays](/docs/fundamentals/overlay-and-anchor).
21
+ *
22
+ * @see Definition of [Overlays](/docs/fundamentals/overlays).
14
23
  */
15
24
  export declare function Overlay<T extends UnknownOverlay>(packageName: string, overlayName: string, schema: Constructable<OverlaySchema<T>>): (constructor: any) => void;
@@ -4,17 +4,26 @@ import { AOverlay } from '../overlays/overlay.abstract.js';
4
4
  import { ModelSerializationService } from '../services/serialization/model/model-serialization.service.js';
5
5
  import { ValidationUtility } from '../utilities/validation/validation.utility.js';
6
6
  /**
7
- * An `@Overlay` is a class decorator to be placed on top of a class that represents an overlay.
8
- * - An overlay must extend the {@link AOverlay} class.
7
+ * An `@Overlay` is a class decorator and must be placed on top of a class representing an overlay.
8
+ * - An overlay must also extend the {@link AOverlay} class.
9
+ * - For type safety, the type of overlay being decorated is passed to the decorator.
9
10
  *
10
11
  * @example
11
12
  * ```ts
12
- * @Overlay('my-package', 'my-name')
13
- * export class MyOverlay extends AOverlay<MyOverlay> { ... }
13
+ * @Overlay<MyOverlay>('@example', 'my-name', MyOverlaySchema)
14
+ * export class MyOverlay extends AOverlay<MyOverlaySchema, MyOverlay> { ... }
14
15
  * ```
15
16
  * @group Decorators
17
+ *
18
+ * @param packageName - The name of the package under which the overlay is registered.
19
+ * Selecting a unique package name helps avoid collisions between same overlay class names across different libraries.
20
+ * You will reuse the same package name throughout your library for different Octo components you create.
21
+ * @param overlayName - a string that uniquely represents the name of the overlay.
22
+ * @param schema - The schema of the overlay.
23
+ *
16
24
  * @returns The decorated class.
17
- * @see Definition of [Overlays](/docs/fundamentals/overlay-and-anchor).
25
+ *
26
+ * @see Definition of [Overlays](/docs/fundamentals/overlays).
18
27
  */
19
28
  export function Overlay(packageName, overlayName, schema) {
20
29
  const container = Container.getInstance();
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.decorator.js","sourceRoot":"","sources":["../../src/decorators/overlay.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,QAAQ,EAA2C,MAAM,gBAAgB,CAAC;AACvG,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gEAAgE,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,OAAO,CACrB,WAAmB,EACnB,WAAmB,EACnB,MAAuC;IAEvC,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAE1C,OAAO,UAAU,WAAgB;QAC/B,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,EAAE,2BAA2B,CAAC,EAAE,CAAC;YAC/E,MAAM,IAAI,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,EAAE,0BAA0B,CAAC,EAAE,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;Q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a,CAAC,WAAW,EAAE,2BAA2B,CAAC,EAAE,CAAC;YAC/E,MAAM,IAAI,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,WAAW,EAAE,0BAA0B,CAAC,EAAE,CAAC;YAC9E,MAAM,IAAI,KAAK,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,CAAC,WAAW,CAAC,SAAS,YAAY,QAAQ,CAAC,EAAE,CAAC;YACjD,MAAM,IAAI,KAAK,CAAC,UAAU,WAAW,CAAC,IAAI,mCAAmC,CAAC,CAAC;QACjF,CAAC;QAED,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC;QACpC,WAAW,CAAC,YAAY,GAAG,WAAW,CAAC;QACvC,WAAW,CAAC,WAAW,GAAG,MAAM,CAAC;QACjC,WAAW,CAAC,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC;QAEzC,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,CAAC,yBAAyB,EAAE,EAAE;YAC1F,yBAAyB,CAAC,aAAa,CAAC,GAAG,WAAW,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,CAAC;QAC7F,CAAC,CAAC,CAAC;QACH,SAAS,CAAC,+BAA+B,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC"}
@@ -1,15 +1,25 @@
1
1
  import { type Constructable, type ResourceSchema, type UnknownResource } from '../app.type.js';
2
2
  /**
3
- * A `@Resource` is a class decorator to be placed on top of a class that represents a resource.
4
- * - A resource must extend the {@link AResource} class.
3
+ * A `@Resource` is a class decorator and must be placed on top of a class representing a resource.
4
+ * - A resource must also extend the {@link AResource} class.
5
+ * - For type safety, the type of resource being decorated is passed to the decorator.
5
6
  *
6
7
  * @example
7
8
  * ```ts
8
- * @Resource('my-package', 'my-name')
9
- * export class MyResource extends AResource<MyResource> { ... }
9
+ * @Resource<MyResource>('@example', 'my-name', MyResourceSchema)
10
+ * export class MyResource extends AResource<MyResourceSchema, MyResource> { ... }
10
11
  * ```
12
+ *
11
13
  * @group Decorators
14
+ *
15
+ * @param packageName - The name of the package under which the resource is registered.
16
+ * Selecting a unique package name helps avoid collisions between same resource class names across different libraries.
17
+ * You will reuse the same package name throughout your library for different Octo components you create.
18
+ * @param resourceName - a string that uniquely represents the name of the resource.
19
+ * @param schema - The schema of the resource.
20
+ *
12
21
  * @returns The decorated class.
13
- * @see Definition of [Resources](http://localhost:3000/docs/fundamentals/resources).
22
+ *
23
+ * @see Definition of [Resources](/docs/fundamentals/resources).
14
24
  */
15
25
  export declare function Resource<T extends UnknownResource>(packageName: string, resourceName: string, schema: Constructable<ResourceSchema<T>>): (constructor: any) => void;