@adaas/a-concept 0.1.24 → 0.1.26

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 (227) hide show
  1. package/dist/index.cjs +3 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.mts +3961 -0
  4. package/dist/index.d.ts +3961 -50
  5. package/dist/index.mjs +3 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +5 -6
  8. package/src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts +2 -1
  9. package/src/global/A-Context/A-Context.class.ts +81 -7
  10. package/src/global/A-Context/A-Context.error.ts +4 -0
  11. package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
  12. package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
  13. package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
  14. package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
  15. package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
  16. package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
  17. package/src/global/A-Feature/A-Feature-Define.decorator.ts +2 -1
  18. package/src/global/A-Feature/A-Feature-Extend.decorator.ts +2 -1
  19. package/src/global/A-Feature/A-Feature.class.ts +11 -0
  20. package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
  21. package/src/global/A-Inject/A-Inject.types.ts +5 -3
  22. package/src/global/A-Scope/A-Scope.class.ts +85 -57
  23. package/src/global/A-Stage/A-Stage.class.ts +22 -2
  24. package/src/global/A-Stage/A-Stage.error.ts +2 -0
  25. package/src/helpers/A_Common.helper.ts +101 -0
  26. package/src/helpers/A_TypeGuards.helper.ts +8 -0
  27. package/src/index.ts +88 -0
  28. package/tests/A-Component.test.ts +1 -1
  29. package/tests/A-Concept.test.ts +5 -6
  30. package/tests/A-Dependency.test.ts +93 -0
  31. package/tests/A-Feature.test.ts +7 -7
  32. package/tests/A-Scope.test.ts +10 -10
  33. package/tsconfig.json +2 -2
  34. package/tsup.config.ts +32 -0
  35. package/dist/index.js +0 -112
  36. package/dist/index.js.map +0 -1
  37. package/dist/src/constants/env.constants.d.ts +0 -33
  38. package/dist/src/constants/env.constants.js +0 -47
  39. package/dist/src/constants/env.constants.js.map +0 -1
  40. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
  41. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -96
  42. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
  43. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
  44. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
  45. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
  46. package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
  47. package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
  48. package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
  49. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
  50. package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
  51. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
  52. package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
  53. package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
  54. package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
  55. package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
  56. package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
  57. package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
  58. package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
  59. package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
  60. package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
  61. package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
  62. package/dist/src/global/A-Component/A-Component.class.js +0 -56
  63. package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
  64. package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
  65. package/dist/src/global/A-Component/A-Component.constants.js +0 -11
  66. package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
  67. package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
  68. package/dist/src/global/A-Component/A-Component.meta.js +0 -78
  69. package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
  70. package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
  71. package/dist/src/global/A-Component/A-Component.types.js +0 -4
  72. package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
  73. package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
  74. package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
  75. package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
  76. package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
  77. package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
  78. package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
  79. package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
  80. package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
  81. package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
  82. package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
  83. package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
  84. package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
  85. package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
  86. package/dist/src/global/A-Container/A-Container.class.js +0 -78
  87. package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
  88. package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
  89. package/dist/src/global/A-Container/A-Container.constants.js +0 -11
  90. package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
  91. package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
  92. package/dist/src/global/A-Container/A-Container.meta.js +0 -76
  93. package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
  94. package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
  95. package/dist/src/global/A-Container/A-Container.types.js +0 -4
  96. package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
  97. package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
  98. package/dist/src/global/A-Context/A-Context.class.js +0 -603
  99. package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
  100. package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
  101. package/dist/src/global/A-Context/A-Context.error.js +0 -25
  102. package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
  103. package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
  104. package/dist/src/global/A-Context/A-Context.types.js +0 -3
  105. package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
  106. package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
  107. package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
  108. package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
  109. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
  110. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
  111. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
  112. package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
  113. package/dist/src/global/A-Entity/A-Entity.class.js +0 -282
  114. package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
  115. package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
  116. package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
  117. package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
  118. package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
  119. package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
  120. package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
  121. package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
  122. package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
  123. package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
  124. package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
  125. package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
  126. package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
  127. package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
  128. package/dist/src/global/A-Error/A_Error.class.js +0 -296
  129. package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
  130. package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
  131. package/dist/src/global/A-Error/A_Error.constants.js +0 -9
  132. package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
  133. package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
  134. package/dist/src/global/A-Error/A_Error.types.js +0 -3
  135. package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
  136. package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
  137. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
  138. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
  139. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
  140. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -128
  141. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
  142. package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
  143. package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
  144. package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
  145. package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
  146. package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
  147. package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
  148. package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -334
  149. package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
  150. package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
  151. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
  152. package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
  153. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
  154. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
  155. package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
  156. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
  157. package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
  158. package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
  159. package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
  160. package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
  161. package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
  162. package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
  163. package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
  164. package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
  165. package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
  166. package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
  167. package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
  168. package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
  169. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
  170. package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
  171. package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
  172. package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
  173. package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
  174. package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
  175. package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
  176. package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
  177. package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
  178. package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
  179. package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
  180. package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
  181. package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
  182. package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
  183. package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
  184. package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
  185. package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
  186. package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
  187. package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -101
  188. package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
  189. package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
  190. package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
  191. package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -112
  192. package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
  193. package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
  194. package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
  195. package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
  196. package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
  197. package/dist/src/global/ASEID/ASEID.class.js +0 -167
  198. package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
  199. package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
  200. package/dist/src/global/ASEID/ASEID.constants.js +0 -2
  201. package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
  202. package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
  203. package/dist/src/global/ASEID/ASEID.error.js +0 -10
  204. package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
  205. package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
  206. package/dist/src/global/ASEID/ASEID.types.js +0 -5
  207. package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
  208. package/dist/src/helpers/A_Common.helper.d.ts +0 -28
  209. package/dist/src/helpers/A_Common.helper.js +0 -170
  210. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  211. package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
  212. package/dist/src/helpers/A_Formatter.helper.js +0 -62
  213. package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
  214. package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
  215. package/dist/src/helpers/A_Identity.helper.js +0 -43
  216. package/dist/src/helpers/A_Identity.helper.js.map +0 -1
  217. package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
  218. package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
  219. package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
  220. package/dist/src/types/A_Common.types.d.ts +0 -36
  221. package/dist/src/types/A_Common.types.js +0 -3
  222. package/dist/src/types/A_Common.types.js.map +0 -1
  223. package/index.ts +0 -81
  224. package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
  225. package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
  226. package/trace-require.js +0 -46
  227. package/tsconfig.build.json +0 -58
@@ -0,0 +1,3961 @@
1
+ declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES: {
2
+ /**
3
+ * Name of the application
4
+ *
5
+ * DEFAULT value is 'a-concept'
6
+ *
7
+ * [!] Provided name will be used for all aseids in the application by default
8
+ */
9
+ readonly A_CONCEPT_NAME: "A_CONCEPT_NAME";
10
+ /**
11
+ * Root scope of the application
12
+ *
13
+ * DEFAULT value is 'root'
14
+ *
15
+ * [!] Provided name will be used for all aseids in the application by default
16
+ */
17
+ readonly A_CONCEPT_ROOT_SCOPE: "A_CONCEPT_ROOT_SCOPE";
18
+ /**
19
+ * Environment of the application e.g. development, production, staging
20
+ */
21
+ readonly A_CONCEPT_ENVIRONMENT: "A_CONCEPT_ENVIRONMENT";
22
+ /**
23
+ * Root folder of the application
24
+ * [!] Automatically set by A-Concept when the application starts
25
+ */
26
+ readonly A_CONCEPT_ROOT_FOLDER: "A_CONCEPT_ROOT_FOLDER";
27
+ /**
28
+ * Allows to define a default error description for errors thrown without a description
29
+ */
30
+ readonly A_ERROR_DEFAULT_DESCRIPTION: "A_ERROR_DEFAULT_DESCRIPTION";
31
+ };
32
+ type A_TYPES__ConceptENVVariables = (typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES)[keyof typeof A_CONSTANTS__DEFAULT_ENV_VARIABLES][];
33
+ declare const A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY: readonly ["A_CONCEPT_NAME", "A_CONCEPT_ROOT_SCOPE", "A_CONCEPT_ENVIRONMENT", "A_CONCEPT_ROOT_FOLDER", "A_ERROR_DEFAULT_DESCRIPTION"];
34
+
35
+ type Decrement = [never, 0, 1, 2, 3, 4, 5];
36
+ type A_TYPES__DeepPartial<T, D extends number = 5> = {
37
+ [P in keyof Required<T>]?: [
38
+ D
39
+ ] extends [never] ? any : Required<T>[P] extends Array<infer U> ? Array<A_TYPES__DeepPartial<U, Decrement[D]>> : Required<T>[P] extends Function ? Required<T>[P] : Required<T>[P] extends object ? A_TYPES__DeepPartial<T[P], Decrement[D]> : T[P];
40
+ };
41
+ type A_TYPES__ObjectKeyEnum<T, E> = {
42
+ [P in keyof Required<T>]?: T[P] extends object ? A_TYPES__ObjectKeyEnum<T[P], E> : E;
43
+ };
44
+ type A_TYPES__Dictionary<T> = {
45
+ [Key: string]: T;
46
+ };
47
+ type A_TYPES__NonObjectPaths<T> = T extends object ? {
48
+ [K in keyof T]: `${Exclude<K, symbol>}${""}`;
49
+ }[keyof T] : never;
50
+ type A_TYPES__Paths<T, D extends number = 5> = [D] extends [never] ? never : (T extends object ? {
51
+ [K in keyof T]: `${Exclude<K, symbol>}${"" | `.${A_TYPES__Paths<T[K], Decrement[D]>}`}`;
52
+ }[keyof T] : never);
53
+ type A_TYPES__UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
54
+ type A_TYPES__PathsToObject<_Obj, T extends readonly string[]> = A_TYPES__UnionToIntersection<{
55
+ [K in keyof T]: T[K] extends `${infer Key}.${infer Rest}` ? {
56
+ [P in Key]: P extends keyof _Obj ? A_TYPES__PathsToObject<Required<_Obj>[P], [Rest]> : any;
57
+ } : {
58
+ [P in T[K]]: `${T[K]}` extends keyof Required<_Obj> ? Required<_Obj>[`${T[K]}`] : never;
59
+ };
60
+ }[number]>;
61
+ type A_TYPES__Required<T, arr extends (A_TYPES__Paths<T>)[] = (A_TYPES__Paths<T>)[]> = A_TYPES__PathsToObject<T, arr> & T;
62
+ type A_TYPES__ExtractNested<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? {
63
+ [Key in K]: A_TYPES__ExtractNested<T[K], Rest>;
64
+ } : never : P extends keyof T ? {
65
+ [Key in P]: T[P];
66
+ } : never;
67
+ type A_TYPES__ExtractProperties<T, P extends A_TYPES__Paths<T>[]> = A_TYPES__UnionToIntersection<{
68
+ [K in keyof P]: P[K] extends string ? A_TYPES__ExtractNested<T, P[K]> : never;
69
+ }[number]>;
70
+
71
+ /**
72
+ * A Meta is an entity that stores all the metadata for the specific entity like container, component, feature, etc.
73
+ *
74
+ * [!] Meta can be different depending on the type of input data
75
+ */
76
+ declare class A_Meta<_StorageItems extends Record<string, any> = any> implements Iterable<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]> {
77
+ protected meta: Map<keyof _StorageItems, _StorageItems[keyof _StorageItems]>;
78
+ /**
79
+ * Method to get the iterator for the meta object
80
+ *
81
+ * @returns
82
+ */
83
+ [Symbol.iterator](): Iterator<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
84
+ /**
85
+ * Allows to replicate received meta object by replacing internal meta to the received one
86
+ *
87
+ * @param meta
88
+ * @returns
89
+ */
90
+ from(meta: A_Meta<_StorageItems>): A_Meta<_StorageItems>;
91
+ /**
92
+ * Method to set values in the map
93
+ *
94
+ * @param key
95
+ * @param value
96
+ */
97
+ set<K extends keyof _StorageItems>(key: K, value: _StorageItems[K]): void;
98
+ /**
99
+ * Method to get values from the map
100
+ *
101
+ * @param key
102
+ * @returns
103
+ */
104
+ get<K extends keyof _StorageItems>(key: K): _StorageItems[K] | undefined;
105
+ /**
106
+ * Method to delete values from the map
107
+ *
108
+ * @param key
109
+ * @returns
110
+ */
111
+ delete(key: keyof _StorageItems): boolean;
112
+ /**
113
+ * Method to get the size of the map
114
+ *
115
+ * @returns
116
+ */
117
+ size(): number;
118
+ /**
119
+ * This method is needed to convert the key to a regular expression and cover cases like:
120
+ *
121
+ * simple * e.g. "a*" instead of "a.*"
122
+ *
123
+ * simple ? e.g. "a?" instead of "a."
124
+ *
125
+ * etc.
126
+ *
127
+ * @param key
128
+ * @returns
129
+ */
130
+ private convertToRegExp;
131
+ /**
132
+ * Method to find values in the map by name.
133
+ *
134
+ * Converts the Key in Map to a regular expression and then compares to the name
135
+ *
136
+ * @param name
137
+ * @returns
138
+ */
139
+ find(name: string): [keyof _StorageItems, _StorageItems[keyof _StorageItems]][];
140
+ /**
141
+ * Method to find values in the map by regular expression
142
+ *
143
+ * Compares Map Key to the input regular expression
144
+ *
145
+ * @param regex
146
+ * @returns
147
+ */
148
+ findByRegex(regex: RegExp): Array<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
149
+ /**
150
+ * Method to check if the map has a specific key
151
+ *
152
+ * @param key
153
+ * @returns
154
+ */
155
+ has(key: keyof _StorageItems): boolean;
156
+ /**
157
+ * Method to get the size of the map
158
+ *
159
+ * @returns
160
+ */
161
+ entries(): IterableIterator<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
162
+ /**
163
+ * Method to clear the map
164
+ */
165
+ clear(): void;
166
+ toArray(): Array<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
167
+ }
168
+
169
+ declare enum A_TYPES__ContainerMetaKey {
170
+ FEATURES = "a-container-features",
171
+ INJECTIONS = "a-container-injections",
172
+ ABSTRACTIONS = "a-container-abstractions",
173
+ EXTENSIONS = "a-container-extensions"
174
+ }
175
+
176
+ declare enum A_TYPES__A_Stage_Status {
177
+ /**
178
+ * The stage is currently being processed
179
+ */
180
+ PROCESSING = "PROCESSING",
181
+ /**
182
+ * The stage has been completed
183
+ */
184
+ COMPLETED = "COMPLETED",
185
+ /**
186
+ * The stage has failed
187
+ */
188
+ FAILED = "FAILED",
189
+ /**
190
+ * The stage has been skipped
191
+ */
192
+ SKIPPED = "SKIPPED",
193
+ /**
194
+ * The stage has been paused
195
+ */
196
+ /**
197
+ * The stage has been stopped
198
+ */
199
+ /**
200
+ * The stage has been started
201
+ */
202
+ /**
203
+ * The stage has been initialized
204
+ */
205
+ INITIALIZED = "INITIALIZED",
206
+ /**
207
+ * The stage has been aborted
208
+ */
209
+ ABORTED = "ABORTED"
210
+ }
211
+ type A_TYPES_StageExecutionBehavior = 'async' | 'sync';
212
+ type A_TYPES__A_StageStep = {
213
+ /**
214
+ * The component to be called
215
+ */
216
+ component: A_TYPES__Component_Constructor | A_Container | string;
217
+ /**
218
+ * The method to be called on the component
219
+ */
220
+ handler: string;
221
+ /**
222
+ * Original Feature Extension name
223
+ *
224
+ * [!] could be string or regex
225
+ *
226
+ */
227
+ name: string;
228
+ /**
229
+ * In case its async it will be executed independently from the main thread.
230
+ *
231
+ * [!] However, in case of sync, it will be executed in the main thread.in the order of the declaration.
232
+ *
233
+ */
234
+ behavior: A_TYPES_StageExecutionBehavior;
235
+ /**
236
+ * Allows to define the order of the execution of the method.
237
+ *
238
+ * [!] In case the method has circular dependencies it will Throw an error.
239
+ *
240
+ */
241
+ before: string;
242
+ /**
243
+ * Allows to define the order of the execution of the method.
244
+ *
245
+ * [!] In case the method has circular dependencies it will Throw an error.
246
+ *
247
+ */
248
+ after: string;
249
+ /**
250
+ * Indicates whether to throw an error if the step fails.
251
+ *
252
+ * [!] By default is true
253
+ */
254
+ throwOnError: boolean;
255
+ /**
256
+ *
257
+ */
258
+ override: string;
259
+ };
260
+ type A_TYPES__Stage_Serialized = {
261
+ /**
262
+ * The name of the stage
263
+ */
264
+ name: string;
265
+ /**
266
+ * The status of the stage
267
+ *
268
+ */
269
+ status: A_TYPES__A_Stage_Status;
270
+ };
271
+ type A_TYPES__A_StageStepProcessingExtraParams = {
272
+ steps: A_TYPES__A_StageStep[];
273
+ filter: (step: A_TYPES__A_StageStep) => boolean;
274
+ };
275
+
276
+ interface A_TYPES__ASEID_Constructor {
277
+ /**
278
+ * Concept for the ASEID
279
+ * Generally it is the application name or code, should correspond to the concept where the entity is used
280
+ * Could be ID or ASEID
281
+ */
282
+ concept?: string;
283
+ /**
284
+ * Entity Scope the primary location of the resource
285
+ * Organization, or organization Unit or Internal/External
286
+ * Could be ID or ASEID
287
+ *
288
+ */
289
+ scope: number | string;
290
+ /**
291
+ * Entity Type the type of the resource
292
+ */
293
+ entity: string;
294
+ /**
295
+ * Entity ID the unique identifier of the resource
296
+ */
297
+ id: number | string;
298
+ /**
299
+ * Version of the entity (optional)
300
+ */
301
+ version?: string;
302
+ /**
303
+ * Shard of the entity (optional)
304
+ */
305
+ shard?: string;
306
+ }
307
+ interface A_TYPES__ASEID_ConstructorConfig {
308
+ /**
309
+ * If true, the entity ASEID will be distributed across multiple shards.
310
+ * In this case SHARD should be provided via Environment Variables (A_SHARD) or Configurations
311
+ *
312
+ */
313
+ sharding?: boolean;
314
+ }
315
+ type A_TYPES__ASEID_JSON = {
316
+ /**
317
+ * Concept for the ASEID
318
+ */
319
+ concept: string;
320
+ /**
321
+ * Entity Scope the primary location of the resource
322
+ */
323
+ scope: string;
324
+ /**
325
+ * Entity Type the type of the resource
326
+ */
327
+ entity: string;
328
+ /**
329
+ * Entity ID the unique identifier of the resource
330
+ */
331
+ id: string;
332
+ /**
333
+ * Version of the entity (optional)
334
+ */
335
+ version?: string;
336
+ /**
337
+ * Shard of the entity (optional)
338
+ */
339
+ shard?: string;
340
+ };
341
+
342
+ declare class ASEID {
343
+ /**
344
+ * ASEID Regular Expression
345
+ */
346
+ static readonly regexp: RegExp;
347
+ /**
348
+ * Tests if the identity string is an ASEID
349
+ *
350
+ * @param identity
351
+ * @returns
352
+ */
353
+ static isASEID(identity: string): boolean;
354
+ /**
355
+ * Concept for the ASEID
356
+ * Generally it is the application name or code, should correspond to the concept where the entity is used
357
+ * Could be ID or ASEID
358
+ */
359
+ private _concept;
360
+ /**
361
+ * Entity Scope the primary location of the resource
362
+ * Organization, or organization Unit
363
+ * Could be ID or ASEID
364
+ *
365
+ */
366
+ private _scope;
367
+ /**
368
+ * Entity Type the type of the resource
369
+ */
370
+ private _entity;
371
+ /**
372
+ * Entity ID the unique identifier of the resource
373
+ */
374
+ private _id;
375
+ /**
376
+ * Version of the entity (optional)
377
+ */
378
+ private _version?;
379
+ /**
380
+ * Shard of the entity (optional)
381
+ */
382
+ private _shard?;
383
+ /**
384
+ * ASEID is a structured identifier for entities in the A-Concept system.
385
+ * using the format:
386
+ * A - A-Concept
387
+ * S - System
388
+ * E - Entity
389
+ * I - Identifier
390
+ * D - iDentifier
391
+ *
392
+ * Structure: CONCEPT_NAME + @ + SCOPE + : ENTITY_NAME + : + ID + @ + VERSION
393
+ *
394
+ * Example:
395
+ * - root@core:usr:0000000001
396
+ *
397
+ * [!] Concept is optional, if not provided will be used the current concept name
398
+ * [!] Scope is optional, if not provided will be used the root scope of the current concept
399
+ * [!] Version is optional, if not provided will be considered as latest version
400
+ *
401
+ * @param aseid - ASEID string representation or ASEID components as object
402
+ */
403
+ constructor(
404
+ /**
405
+ * ASEID string representation
406
+ */
407
+ aseid: string);
408
+ constructor(
409
+ /**
410
+ * ASEID components as object
411
+ */
412
+ props: A_TYPES__Required<Partial<A_TYPES__ASEID_Constructor>, ['id', 'entity']>);
413
+ /**
414
+ * Getters for ASEID components
415
+ */
416
+ get concept(): string;
417
+ /**
418
+ * Get the scope of the ASEID
419
+ */
420
+ get scope(): string;
421
+ /**
422
+ * Get the entity of the ASEID
423
+ */
424
+ get entity(): string;
425
+ /**
426
+ * Get the id of the ASEID
427
+ */
428
+ get id(): string;
429
+ /**
430
+ * Get the version of the ASEID (if any)
431
+ */
432
+ get version(): string | undefined;
433
+ /**
434
+ * Get the shard of the ASEID (if any)
435
+ */
436
+ get shard(): string | undefined;
437
+ /**
438
+ * get Internal Initializer based on the type of the parameter provided
439
+ *
440
+ * @param param1
441
+ * @returns
442
+ */
443
+ private getInitializer;
444
+ /**
445
+ * Initialize ASEID from string
446
+ *
447
+ * @param param1
448
+ */
449
+ private fromString;
450
+ /**
451
+ * Initialize ASEID from object
452
+ *
453
+ * @param param1
454
+ */
455
+ private fromObject;
456
+ /**
457
+ * String representation of the ASEID
458
+ *
459
+ * @returns
460
+ */
461
+ toString(): string;
462
+ /**
463
+ * JSON representation of the ASEID
464
+ *
465
+ * @returns
466
+ */
467
+ toJSON(): A_TYPES__ASEID_JSON;
468
+ protected verifyInput(param1: string | A_TYPES__Required<Partial<A_TYPES__ASEID_Constructor>, ['id', 'entity']>): void;
469
+ }
470
+
471
+ declare enum A_TYPES__EntityMetaKey {
472
+ EXTENSIONS = "a-component-extensions",
473
+ FEATURES = "a-component-features",
474
+ ABSTRACTIONS = "a-component-abstractions",
475
+ INJECTIONS = "a-component-injections"
476
+ }
477
+
478
+ /**
479
+ * Entity interface
480
+ */
481
+ interface A_TYPES__IEntity {
482
+ /**
483
+ * The ASEID of the entity
484
+ */
485
+ aseid: ASEID;
486
+ }
487
+ /**
488
+ * Entity constructor type
489
+ * Uses the generic type T to specify the type of the entity
490
+ */
491
+ type A_TYPES__Entity_Constructor<T = A_Entity> = new (...args: any[]) => T;
492
+ /**
493
+ * Entity initialization type
494
+ */
495
+ type A_TYPES__Entity_Init = any;
496
+ /**
497
+ * Entity serialized type
498
+ */
499
+ type A_TYPES__Entity_Serialized = {
500
+ /**
501
+ * The ASEID of the entity
502
+ */
503
+ aseid: string;
504
+ };
505
+ /**
506
+ * Entity meta type
507
+ */
508
+ type A_TYPES__EntityMeta = {
509
+ [A_TYPES__EntityMetaKey.EXTENSIONS]: A_Meta<{
510
+ /**
511
+ * Where Key the regexp for what to apply the extension
512
+ * A set of container names or a wildcard, or a regexp
513
+ *
514
+ *
515
+ * Where value is the extension instructions
516
+ */
517
+ [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
518
+ }>;
519
+ case: any;
520
+ [A_TYPES__EntityMetaKey.FEATURES]: A_Meta<{
521
+ /**
522
+ * Where Key is the name of the feature
523
+ *
524
+ * Where value is the list of features
525
+ */
526
+ [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
527
+ }>;
528
+ };
529
+
530
+ /**
531
+ * A_Entity is another abstraction that describes all major participants in the system business logic.
532
+ * Each Entity should have a clear definition and a clear set of responsibilities.
533
+ * However, entity may hide some of its responsibilities behind the interface to prevent overload.
534
+ *
535
+ * Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
536
+ */
537
+ declare class A_Entity<_ConstructorType extends A_TYPES__Entity_Init = A_TYPES__Entity_Init, _SerializedType extends A_TYPES__Entity_Serialized = A_TYPES__Entity_Serialized> implements A_TYPES__IEntity {
538
+ /**
539
+ * Entity Identifier that corresponds to the class name
540
+ */
541
+ static get entity(): string;
542
+ /**
543
+ * DEFAULT Concept Name (Application Name) of the entity from environment variable A_CONCEPT_NAME
544
+ * [!] If environment variable is not set, it will default to 'a-concept'
545
+ */
546
+ static get concept(): string;
547
+ /**
548
+ * DEFAULT Scope of the entity from environment variable A_CONCEPT_DEFAULT_SCOPE
549
+ * [!] If environment variable is not set, it will default to 'core'
550
+ * [!] Scope is an application specific identifier that can be used to group entities together
551
+ * [!] e.g. 'default', 'core', 'public', 'internal', etc
552
+ */
553
+ static get scope(): string;
554
+ /**
555
+ * ASEID is an entity identifier that is unique across the system
556
+ * A - A_Concept or Application
557
+ * S - System or Scope
558
+ * E - Entity
559
+ * ID - Identifier
560
+ *
561
+ * [!] ASEID is immutable and should not be changed after the entity is created
562
+ *
563
+ * [!] ASEID is composed of the following parts:
564
+ * - concept: an application specific identifier from where the entity is coming from
565
+ * - scope: the scope of the entity from concept
566
+ * - entity: the name of the entity from concept
567
+ * - id: the unique identifier of the entity
568
+ *
569
+ * [!] For more information about ASEID, please refer to the ASEID class documentation]
570
+ */
571
+ aseid: ASEID;
572
+ /**
573
+ * Create a new A_entity instance from Aseid String
574
+ * e.g. project@scope:entity:0000000001
575
+ *
576
+ * @param aseid
577
+ */
578
+ constructor(
579
+ /**
580
+ * ASEID string that represents the entity
581
+ */
582
+ aseid?: string);
583
+ /**
584
+ * Create a new A_entity instance from Aseid instance
585
+ * e.g. new ASEID({concept: 'project', scope: 'default', entity: 'entity', id: '0000000001'})
586
+ *
587
+ * @param aseid
588
+ */
589
+ constructor(
590
+ /**
591
+ * ASEID instance that represents the entity
592
+ */
593
+ aseid: ASEID);
594
+ /**
595
+ * Create a new A_entity instance from serialized object
596
+ *
597
+ * @param serialized
598
+ */
599
+ constructor(
600
+ /**
601
+ * Serialized object that represents the entity
602
+ */
603
+ serialized: _SerializedType);
604
+ /**
605
+ * Create a new A_entity instance from constructor object
606
+ *
607
+ * @param newEntity
608
+ */
609
+ constructor(
610
+ /**
611
+ * Constructor object that represents the entity
612
+ */
613
+ newEntity?: _ConstructorType);
614
+ /**
615
+ * Extracts the ID from the ASEID
616
+ * ID is the unique identifier of the entity
617
+ */
618
+ get id(): string | number;
619
+ protected isStringASEID(x: unknown): x is string;
620
+ protected isASEIDInstance(x: unknown): x is ASEID;
621
+ /**
622
+ * A "serialized" object is considered such if it is a non-null object
623
+ * and contains an "aseid" property (this mirrors your original check).
624
+ *
625
+ * @param x
626
+ * @returns
627
+ */
628
+ protected isSerializedObject(x: unknown): x is _SerializedType;
629
+ /**
630
+ * Constructor-style props = a plain object which does NOT contain "aseid".
631
+ * This is the "create from provided fields" case.
632
+ *
633
+ * @param x
634
+ * @returns
635
+ */
636
+ protected isConstructorProps(x: unknown): x is _ConstructorType;
637
+ /**
638
+ * Determines the appropriate initializer method based on the type of `props`.
639
+ * The method checks if `props` is:
640
+ * 1) a string that matches ASEID format -> fromASEID
641
+ * 2) an ASEID instance -> fromASEID
642
+ * 3) a serialized object (has 'aseid') -> fromJSON
643
+ * 4) a plain object with no 'aseid' -> treat as constructor props -> fromNew
644
+ *
645
+ * [!] If `props` is undefined, it will call fromUndefined method
646
+ *
647
+ * If none of the above, it throws an error indicating incorrect constructor usage.
648
+ *
649
+ *
650
+ * To get a custom initializer, override this method in the child class.
651
+ * Example:
652
+ * ```typescript
653
+ * protected getInitializer(
654
+ * props?: string | ASEID | _SerializedType | _ConstructorType
655
+ * ): (props: any) => void | (() => void) {
656
+ * if('customField' in props) {
657
+ * return this.fromCustomField.bind(this);
658
+ * }
659
+ * return super.getInitializer(props);
660
+ * }
661
+ * ```
662
+ * @param props
663
+ * @returns The appropriate initializer method
664
+ */
665
+ protected getInitializer(props?: string | ASEID | _SerializedType | _ConstructorType): (props: any) => void | (() => void);
666
+ /**
667
+ * Call a feature of the component with the provided scope
668
+ *
669
+ * [!] If the provided scope is not inherited from the entity scope, it will be inherited
670
+ *
671
+ * @param lifecycleMethod
672
+ * @param args
673
+ */
674
+ call(feature: string, scope?: A_Scope): any;
675
+ /**
676
+ * The default method that can be called and extended to load entity data.
677
+ */
678
+ load(scope?: A_Scope): Promise<any>;
679
+ /**
680
+ * The default method that can be called and extended to destroy entity data.
681
+ */
682
+ destroy(scope?: A_Scope): Promise<any>;
683
+ /**
684
+ * The default method that can be called and extended to save entity data.
685
+ */
686
+ save(scope?: A_Scope): Promise<any>;
687
+ /**
688
+ * Create a new entity from ASEID string or instance
689
+ * [!] Executed when the constructor is called with a string or ASEID instance that represents the ASEID
690
+ * [!] Executes By Default with new A_Entity('aseid-string') or new A_Entity(new ASEID(...)) if getInitializer has not been overridden
691
+ *
692
+ * @param aseid
693
+ */
694
+ fromASEID(aseid: string | ASEID): void;
695
+ /**
696
+ * Handles the case when no props are provided to the constructor.
697
+ * This method can be overridden in child classes to set default values or perform specific initialization logic.
698
+ * By default, it does nothing.
699
+ *
700
+ *
701
+ * @returns
702
+ */
703
+ fromUndefined(): void;
704
+ /**
705
+ * Create a new entity from constructor object
706
+ * [!] Executed when the constructor is called with an object that does not contain "aseid" property
707
+ * [!] Executes By Default with new A_Entity({}) if getInitializer has not been overridden
708
+ *
709
+ * @param newEntity
710
+ * @returns
711
+ */
712
+ fromNew(newEntity: _ConstructorType): void;
713
+ /**
714
+ * Creates a new entity from serialized object
715
+ *
716
+ * [!] Executed when the constructor is called with an object that contains "aseid" property
717
+ * [!] Executes By Default with new A_Entity({ aseid: '...' }) if getInitializer has not been overridden
718
+ *
719
+ *
720
+ * @param serialized
721
+ * @returns
722
+ */
723
+ fromJSON(serialized: _SerializedType): void;
724
+ /**
725
+ * Converts the entity to a JSON object
726
+ * [!] This method should be extended in the child classes to include all properties of the entity
727
+ * [!] Includes aseid by default
728
+ *
729
+ *
730
+ * @returns
731
+ */
732
+ toJSON(): _SerializedType;
733
+ /**
734
+ * Returns the string representation of the entity
735
+ * what is basically the ASEID string
736
+ *
737
+ * @returns
738
+ */
739
+ toString(): string;
740
+ }
741
+
742
+ /**
743
+ * A-Feature decorator
744
+ *
745
+ * This decorator allows to define a custom lifecycle stage for the Container.
746
+ * These stages are executed in a container-specific order and can be extended by components that are injected into the container.
747
+ * This approach allows to create a flexible and extendable architecture for the application.
748
+ *
749
+ * The main difference between the A-Feature and A-Feature decorators is that A-Feature methods can be inherited and overridden by child classes.
750
+ *
751
+ *
752
+ * @param params
753
+ * @returns
754
+ */
755
+ declare function A_Feature_Define(config?: Partial<A_TYPES__FeatureDefineDecoratorConfig>): (target: A_TYPES__FeatureDefineDecoratorTarget, propertyKey: string, descriptor: A_TYPES__FeatureDefineDecoratorDescriptor) => A_TYPES__FeatureDefineDecoratorDescriptor;
756
+
757
+ /**
758
+ * A-Extend decorator
759
+ *
760
+ * This decorator allows to define a custom Extend stage for the Container.
761
+ * These stages are executed in a container-specific order and can be extended by components that are injected into the container.
762
+ * This approach allows to create a flexible and extendable architecture for the application.
763
+ *
764
+ * The main difference between the A-Extend and A-Extend decorators is that A-Extend methods can be inherited and overridden by child classes.
765
+ *
766
+ *
767
+ * @param params
768
+ * @returns
769
+ */
770
+ /**
771
+ * Use regexp in case if you need more flexibility and control over the name of the method
772
+ *
773
+ * @param regexp
774
+ */
775
+ declare function A_Feature_Extend(
776
+ /**
777
+ * The regular expression to match the name of the Feature method to be extended
778
+ *
779
+ * Example:
780
+ *
781
+ * ```ts
782
+ * @A_Feature.Extend(/.*\.load/)
783
+ * ```
784
+ */
785
+ regexp: RegExp): any;
786
+ /**
787
+ * In this case the name configurations will be used as an input to get scope and name of target function
788
+ * [!] Not that for all SCOPE will be used OR operator
789
+ *
790
+ * @param config
791
+ */
792
+ declare function A_Feature_Extend(
793
+ /**
794
+ * Configuration for the A-Feature-Extend decorator
795
+ */
796
+ config: Partial<A_TYPES__FeatureExtendDecoratorConfig>): any;
797
+ /**
798
+ * In this case the name of function will be used as a name of the Feature.
799
+ * [!] AND it will be applicable for ANY element where the name is the same as the name of the function
800
+ */
801
+ declare function A_Feature_Extend(): any;
802
+
803
+ /**
804
+ * Entity constructor type
805
+ * Uses the generic type T to specify the type of the entity
806
+ */
807
+ type A_TYPES__Error_Constructor<T = A_Error> = new (...args: any[]) => T;
808
+ /**
809
+ * Error initialization type
810
+ */
811
+ type A_TYPES__Error_Init = {
812
+ /**
813
+ * Error title
814
+ *
815
+ * A short description of the error
816
+ */
817
+ title: string;
818
+ /**
819
+ * Error code representing the type of error
820
+ *
821
+ * Should be unique within the application or service
822
+ *
823
+ * Example: 'validation-error', 'not-found', 'user-not-found', 'unauthorized' etc.
824
+ *
825
+ * [!] Note: It is recommended to use kebab-case for error codes
826
+ * [!] Note: If not provided would be used a kebab-case message of the error
827
+ */
828
+ code?: string;
829
+ /**
830
+ * Possible Scope if needed to identify the error by it's execution environment
831
+ *
832
+ * For example, error of type 'validation' could happen in different scopes
833
+ * like 'user', 'admin', 'system' etc. This will help to identify the error context better
834
+ *
835
+ * Could be string or A_Scope instance
836
+ *
837
+ * [!] Note: If not provided, the default scope of the A_Error will be used (A_Context.root.name)
838
+ */
839
+ scope?: string | A_Scope;
840
+ /**
841
+ * Detailed description of the error
842
+ */
843
+ description?: string;
844
+ /**
845
+ * Link to the documentation or support page for the error
846
+ */
847
+ link?: string;
848
+ /**
849
+ * Original Error if any
850
+ */
851
+ originalError?: Error | unknown;
852
+ };
853
+ /**
854
+ * Error serialized type
855
+ */
856
+ type A_TYPES__Error_Serialized = {
857
+ /**
858
+ * ASEID of the error
859
+ */
860
+ aseid: string;
861
+ /**
862
+ * A brief title of the error
863
+ */
864
+ title: string;
865
+ /**
866
+ * Error message
867
+ */
868
+ message: string;
869
+ /**
870
+ * Type of the error
871
+ */
872
+ type: string;
873
+ /**
874
+ * Error code
875
+ */
876
+ code: string;
877
+ /**
878
+ * Error description
879
+ */
880
+ description: string;
881
+ /**
882
+ * Link to documentation or support page
883
+ */
884
+ link?: string;
885
+ /**
886
+ * Scope of the error
887
+ */
888
+ scope: string;
889
+ /**
890
+ * Original error message if any
891
+ */
892
+ originalError?: string;
893
+ };
894
+
895
+ declare class A_Error<_ConstructorType extends A_TYPES__Error_Init = A_TYPES__Error_Init, _SerializedType extends A_TYPES__Error_Serialized = A_TYPES__Error_Serialized> extends Error {
896
+ /**
897
+ * Error Identifier that corresponds to the class name
898
+ */
899
+ static get entity(): string;
900
+ /**
901
+ * DEFAULT Namespace of the error from environment variable A_CONCEPT_NAMESPACE
902
+ *
903
+ * [!] If environment variable is not set, it will default to 'a-concept'
904
+ */
905
+ static get concept(): string;
906
+ /**
907
+ * DEFAULT Scope of the entity from environment variable A_CONCEPT_DEFAULT_SCOPE
908
+ *
909
+ * [!] If environment variable is not set, it will default to 'core'
910
+ * [!] Scope is an application specific identifier that can be used to group entities together
911
+ * [!] e.g. 'default', 'core', 'public', 'internal', etc
912
+ */
913
+ static get scope(): string;
914
+ /**
915
+ * ASEID of the error instance
916
+ */
917
+ protected _aseid: ASEID;
918
+ /**
919
+ * Title of the error
920
+ */
921
+ protected _title: string;
922
+ /**
923
+ * Possible Scope if needed to identify the error by it's execution environment
924
+ */
925
+ protected _scope?: string;
926
+ /**
927
+ * Unique code representing the type of error
928
+ */
929
+ protected _code?: string;
930
+ /**
931
+ * Detailed description of the error
932
+ */
933
+ protected _description?: string;
934
+ /**
935
+ * Original Error if any
936
+ */
937
+ protected _originalError?: Error | any;
938
+ /**
939
+ * Link to the documentation or support page for the error
940
+ */
941
+ protected _link?: string;
942
+ /**
943
+ * A_Error is a custom error class for A_Concept framework.
944
+ * This error allows to have more structured error handling.
945
+ * Each error has a unique code, description and a link to the documentation.
946
+ *
947
+ * Example of usage:
948
+ * ```typescript
949
+ *
950
+ * // 1) all parameters will be used as provided
951
+ * throw new A_Error({
952
+ * message: 'User not found',
953
+ * code: 'USER_NOT_FOUND',
954
+ * description: 'The user with the given ID was not found.',
955
+ * link: 'https://support.adaas.org/error/USER_NOT_FOUND'
956
+ * });
957
+ *
958
+ * // or
959
+ * // 2) only message is provided, other parameters will be set to default values:
960
+ * // - code: 'user-not-found' (kebab-case of the message)
961
+ * // - description: 'User not found' (same as message)
962
+ * // - link: Empty
963
+ * throw new A_Error('User not found');
964
+ *
965
+ * // or
966
+ * // 3) Provided Message and Description, other parameters will be set to default values:
967
+ * // - code: 'user-not-found' (kebab-case of the message)
968
+ * // - description: 'The user with the given ID was not found.' (as provided)
969
+ * // - link: Empty
970
+ * throw new A_Error('User not found', 'The user with the given ID was not found.');
971
+ *
972
+ *
973
+ * ```
974
+ * [!] Note: The behavior of A_Error is similar to the A_Entity however it cannot have own A_Features.
975
+ * [!] Note: This class can be inherited to create custom error classes.
976
+ *
977
+ * @param message
978
+ */
979
+ constructor(
980
+ /**
981
+ * A_Error Constructor params
982
+ */
983
+ params: _ConstructorType);
984
+ constructor(
985
+ /**
986
+ * Error message
987
+ */
988
+ message: string);
989
+ constructor(
990
+ /**
991
+ * Original JS Error
992
+ */
993
+ error: Error);
994
+ constructor(
995
+ /**
996
+ * Error message
997
+ */
998
+ title: string,
999
+ /**
1000
+ * Detailed description of the error
1001
+ */
1002
+ description: string);
1003
+ /**
1004
+ * Returns the ASEID of the error instance
1005
+ */
1006
+ get aseid(): ASEID;
1007
+ /**
1008
+ * Returns the title of the error
1009
+ *
1010
+ * Example: 'User not found', 'Validation error', 'Unauthorized access', etc.
1011
+ *
1012
+ * [!] Note: This title should be short and concise, less than 60 characters
1013
+ * [!] Note: If title exceeds 60 characters, there would be an error thrown
1014
+ * [!] Note: This title is intended to be human-readable and can be displayed in UI or logs
1015
+ */
1016
+ get title(): string;
1017
+ /**
1018
+ * Returns an Error message what is a brief title of the error
1019
+ *
1020
+ */
1021
+ get message(): string;
1022
+ /**
1023
+ * Returns a unique code representing the type of error
1024
+ *
1025
+ * If code is not provided, it will generate a kebab-case of the message
1026
+ *
1027
+ * Example: 'validation-error', 'not-found', 'user-not-found', 'unauthorized' etc.
1028
+ *
1029
+ * [!] Note: It is recommended to use kebab-case for error codes
1030
+ * [!] Note: If not provided would be used a kebab-case message of the error
1031
+ */
1032
+ get code(): string;
1033
+ /**
1034
+ * Returns the type of the error which corresponds to the static entity of the class
1035
+ *
1036
+ * Example: 'a-error', 'validation-error', 'not-found-error', 'user-error', etc.
1037
+ *
1038
+ * Defaults to the kebab-case of the class name
1039
+ *
1040
+ * [!] Note: naming ad separation are fully dependent on the architecture of the application
1041
+ * [!] Note: It is recommended to use kebab-case for error types
1042
+ * [!] Note: This type is intended to group similar errors together
1043
+ */
1044
+ get type(): string;
1045
+ /**
1046
+ * Returns a link with possible documentation or support page for the error
1047
+ * If link is not provided, it will generate a link based on the ASEID of the error that points to the A-Concept support page
1048
+ *
1049
+ * Example: https://adaas.support/a-concept/errors/{ASEID}
1050
+ *
1051
+ * [!] Note: ASEID is generated based on the static properties of the class (concept, scope, entity) and the code of the error
1052
+ */
1053
+ get link(): string;
1054
+ /**
1055
+ * The scope name of the error instance
1056
+ *
1057
+ * If scope is not provided, it will use the static scope of the class
1058
+ *
1059
+ * [!] Note: Scope is an application specific identifier that can be used to group entities together
1060
+ * [!] e.g. 'default', 'core', 'public', 'internal', etc
1061
+ */
1062
+ get scope(): string;
1063
+ /**
1064
+ * A detailed description of the error
1065
+ * If description is not provided, it will use the environment variable A_ERROR_DEFAULT_DESCRIPTION or a generic message
1066
+ *
1067
+ * Example: 'The user with the given ID was not found.', 'The provided data is invalid.', 'You do not have permission to access this resource.', etc.
1068
+ *
1069
+ * [!] Note: This description is intended to provide more context about the error and can be used for debugging or logging purposes
1070
+ */
1071
+ get description(): string;
1072
+ /**
1073
+ * Returns the original error if any
1074
+ *
1075
+ * This can be useful for debugging purposes to see the original stack trace or error message
1076
+ *
1077
+ * [!] Note: Original error is optional and may not be present in all cases
1078
+ */
1079
+ get originalError(): Error | any | undefined;
1080
+ /**
1081
+ * Determines which initializer method to use based on the type of the first parameter.
1082
+ *
1083
+ * @param param1
1084
+ * @returns
1085
+ */
1086
+ protected getInitializer(param1: _ConstructorType | Error | string | any, param2?: string): (param1: any, param2: any) => void | (() => void);
1087
+ /**
1088
+ * Initializes the A_Error instance from a standard Error object.
1089
+ *
1090
+ * @param error
1091
+ */
1092
+ protected fromError(error: Error): void;
1093
+ /**
1094
+ * Initializes the A_Error instance from a message.
1095
+ *
1096
+ * @param title
1097
+ * @param description
1098
+ */
1099
+ protected fromMessage(message: string): void;
1100
+ fromTitle(title: string, description: string): void;
1101
+ /**
1102
+ * Initializes the A_Error instance from a constructor parameters object.
1103
+ *
1104
+ * @param params
1105
+ */
1106
+ protected fromConstructor(params: _ConstructorType): void;
1107
+ /**
1108
+ * Serializes the A_Error instance to a plain object.
1109
+ *
1110
+ *
1111
+ * @returns
1112
+ */
1113
+ toJSON(): _SerializedType;
1114
+ /**
1115
+ * Checks if the provided title exceeds 60 characters.
1116
+ * If it does, throws a validation A_Error.
1117
+ *
1118
+ * @param title
1119
+ */
1120
+ protected validateTitle(title: string): void;
1121
+ }
1122
+
1123
+ declare class A_Stage {
1124
+ /**
1125
+ * The feature that owns this stage
1126
+ */
1127
+ private readonly _feature;
1128
+ /**
1129
+ * Initial Instructions to process the stage
1130
+ */
1131
+ private readonly _definition;
1132
+ /**
1133
+ * Possible errors during stage processing
1134
+ */
1135
+ private _error?;
1136
+ /**
1137
+ * Indicates the current status of the stage
1138
+ */
1139
+ private _status;
1140
+ /**
1141
+ * Promise that will be resolved when the stage is Processed
1142
+ */
1143
+ private _processed;
1144
+ /**
1145
+ * A_Stage is a callable A_Function within A_Feature that should be run with specific parameters.
1146
+ * [!] Depending on the Stage Definition type sync/async function can be executed correspondingly.
1147
+ *
1148
+ * A-Stage is a common object that uses to simplify logic and re-use of A-Feature internals for better composition.
1149
+ */
1150
+ constructor(
1151
+ /**
1152
+ * The feature that owns this stage
1153
+ */
1154
+ feature: A_Feature,
1155
+ /**
1156
+ * The step definitions of the stage
1157
+ */
1158
+ step: A_TYPES__A_StageStep);
1159
+ /**
1160
+ * Returns the name of the stage
1161
+ */
1162
+ get name(): string;
1163
+ /**
1164
+ * Returns the definition of the stage
1165
+ */
1166
+ get definition(): A_TYPES__A_StageStep;
1167
+ /**
1168
+ * Returns the current status of the stage
1169
+ */
1170
+ get status(): A_TYPES__A_Stage_Status;
1171
+ /**
1172
+ * Returns the feature that owns this stage
1173
+ */
1174
+ get feature(): A_Feature;
1175
+ /**
1176
+ * Returns true if the stage is processed (completed, failed, or skipped)
1177
+ */
1178
+ get isProcessed(): boolean;
1179
+ /**
1180
+ * Returns the error of the stage
1181
+ */
1182
+ get error(): A_Error | undefined;
1183
+ /**
1184
+ * Resolves the arguments of the step
1185
+ *
1186
+ * @param step
1187
+ * @returns
1188
+ */
1189
+ protected getStepArgs(scope: A_Scope, step: A_TYPES__A_StageStep): Promise<(A_Container | A_Component | A_Entity<any, A_TYPES__Entity_Serialized> | A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any>[]> | A_Feature<A_TYPES__FeatureAvailableComponents> | A_Fragment<any> | A_TYPES__ScopeResolvableComponents[] | undefined)[]>;
1190
+ /**
1191
+ * Resolves the component of the step
1192
+ *
1193
+ * @param step
1194
+ * @returns
1195
+ */
1196
+ protected getStepComponent(scope: A_Scope, step: A_TYPES__A_StageStep): A_TYPES__ScopeResolvableComponents;
1197
+ /**
1198
+ * Calls the handler of the step
1199
+ *
1200
+ * @param step
1201
+ * @returns
1202
+ */
1203
+ protected callStepHandler(step: A_TYPES__A_StageStep, scope: A_Scope): Promise<any>;
1204
+ skip(): void;
1205
+ /**
1206
+ * This method processes the stage by executing all the steps
1207
+ *
1208
+ * @param scope - Scope to be used to resolve the steps dependencies
1209
+ */
1210
+ process(
1211
+ /**
1212
+ * Scope to be used to resolve the steps dependencies
1213
+ */
1214
+ scope?: A_Scope): Promise<void>;
1215
+ protected completed(): void;
1216
+ protected failed(error: Error | A_Error | any): void;
1217
+ /**
1218
+ * Serializes the stage to JSON
1219
+ *
1220
+ */
1221
+ toJSON(): A_TYPES__Stage_Serialized;
1222
+ /**
1223
+ * Returns a string representation of the stage
1224
+ *
1225
+ * @returns
1226
+ */
1227
+ toString(): string;
1228
+ }
1229
+
1230
+ declare class A_StepsManager {
1231
+ entities: A_TYPES__A_StageStep[];
1232
+ graph: Map<string, Set<string>>;
1233
+ visited: Set<string>;
1234
+ tempMark: Set<string>;
1235
+ sortedEntities: string[];
1236
+ private _isBuilt;
1237
+ constructor(entities: Array<A_TYPES__FeatureDefineDecoratorTemplateItem>);
1238
+ private prepareSteps;
1239
+ private ID;
1240
+ private buildGraph;
1241
+ private matchEntities;
1242
+ private visit;
1243
+ toSortedArray(): Array<string>;
1244
+ toStages(feature: A_Feature): Array<A_Stage>;
1245
+ }
1246
+
1247
+ declare class A_StageError extends A_Error {
1248
+ static readonly ArgumentsResolutionError = "A-Stage Arguments Resolution Error";
1249
+ static get CompileError(): string;
1250
+ }
1251
+
1252
+ declare class A_FeatureError extends A_Error {
1253
+ /**
1254
+ * Indicates that the Feature has been interrupted
1255
+ */
1256
+ static readonly Interruption = "Feature Interrupted";
1257
+ /**
1258
+ * Indicates that there was an error initializing the Feature
1259
+ *
1260
+ * Failed during the A-Feature initialization process
1261
+ */
1262
+ static readonly FeatureInitializationError = "Unable to initialize A-Feature";
1263
+ /**
1264
+ * Indicates that there was an error defining the Feature
1265
+ *
1266
+ * Failed during the @A_Feature.Define() decorator execution
1267
+ */
1268
+ static readonly FeatureDefinitionError = "Unable to define A-Feature";
1269
+ /**
1270
+ * Indicates that there was an error extending the Feature
1271
+ *
1272
+ * Failed during the @A_Feature.Extend() decorator execution
1273
+ */
1274
+ static readonly FeatureExtensionError = "Unable to extend A-Feature";
1275
+ }
1276
+
1277
+ /**
1278
+ * This is a common class that uses to return an entity that initiates a feature call
1279
+ *
1280
+ * It can be used then in @A_Inject(A_Caller) to get the entity that initiated the feature call
1281
+ *
1282
+ * [!] the class itself may be retrieved, but may require additional processing inside the feature
1283
+ *
1284
+ */
1285
+ declare class A_Caller<T extends A_TYPES__FeatureAvailableComponents = A_TYPES__FeatureAvailableComponents> {
1286
+ /**
1287
+ * The component that initiated the feature call
1288
+ */
1289
+ protected _component: T;
1290
+ /**
1291
+ * A_Caller allows to get the component that initiated the feature call
1292
+ *
1293
+ * It can be used then in @A_Inject(A_Caller) to get the entity that initiated the feature call
1294
+ *
1295
+ * [!] If Scope is not provided, a new empty scope will be created and inherited from the global scope
1296
+ *
1297
+ * @param component
1298
+ * @param scope
1299
+ */
1300
+ constructor(component: T);
1301
+ get component(): T;
1302
+ /**
1303
+ * Validates the provided parameters and Ensures that the component is of an allowed type
1304
+ *
1305
+ * @param component
1306
+ */
1307
+ protected validateParams(component: T): void;
1308
+ }
1309
+
1310
+ /**
1311
+ * A_Feature is representing a feature that can be executed across multiple components
1312
+ * This class stores the steps of the feature and executes them in order of appearance
1313
+ *
1314
+ * Using A_Feature.Define and A_Feature.Extend decorators to define and extend the feature methods
1315
+ * across the different, distributed components
1316
+ *
1317
+ */
1318
+ declare class A_Feature<T extends A_TYPES__FeatureAvailableComponents = A_TYPES__FeatureAvailableComponents> {
1319
+ /**
1320
+ * Define a new A-Feature
1321
+ */
1322
+ static get Define(): typeof A_Feature_Define;
1323
+ /**
1324
+ * Extend an existing A-Feature
1325
+ */
1326
+ static get Extend(): typeof A_Feature_Extend;
1327
+ /**
1328
+ * The name of the Feature
1329
+ */
1330
+ protected _name: string;
1331
+ /**
1332
+ * List of stages that are part of this Feature
1333
+ */
1334
+ protected _stages: Array<A_Stage>;
1335
+ /**
1336
+ * The Stage currently being processed
1337
+ */
1338
+ protected _current?: A_Stage;
1339
+ /**
1340
+ * Actual Index of the current Stage being processed
1341
+ */
1342
+ protected _index: number;
1343
+ /**
1344
+ * Steps Manager to organize the steps into stages
1345
+ */
1346
+ protected _SM: A_StepsManager;
1347
+ /**
1348
+ * The Caller that initiated the Feature call
1349
+ */
1350
+ protected _caller: A_Caller<T>;
1351
+ /**
1352
+ * The current state of the Feature
1353
+ */
1354
+ protected _state: A_TYPES__FeatureState;
1355
+ /**
1356
+ * The error that caused the Feature to be interrupted
1357
+ */
1358
+ protected _error?: A_FeatureError;
1359
+ /**
1360
+ * A-Feature is a pipeline distributed by multiple components that can be easily attached or detached from the scope.
1361
+ * Feature itself does not have scope, but attached to the caller who dictates how feature should be processed.
1362
+ *
1363
+ * Comparing to A-Command Feature does not store any state except statuses for better analysis.
1364
+ *
1365
+ * [!] Note: If A-Feature should have result use A-Fragment
1366
+ *
1367
+ * @param params
1368
+ */
1369
+ constructor(
1370
+ /**
1371
+ * Feature Initialization parameters
1372
+ */
1373
+ params: A_TYPES__Feature_Init<T>);
1374
+ /**
1375
+ * The name of the Feature
1376
+ */
1377
+ get name(): string;
1378
+ /**
1379
+ * The error that caused the Feature to be interrupted
1380
+ */
1381
+ get error(): A_FeatureError | undefined;
1382
+ /**
1383
+ * The current state of the Feature
1384
+ */
1385
+ get state(): A_TYPES__FeatureState;
1386
+ /**
1387
+ * Sets the current state of the Feature
1388
+ */
1389
+ get index(): number;
1390
+ /**
1391
+ * Returns the current A-Feature Stage
1392
+ */
1393
+ get stage(): A_Stage | undefined;
1394
+ /**
1395
+ * The Caller that initiated the Feature call
1396
+ */
1397
+ get caller(): A_Caller<T>;
1398
+ /**
1399
+ * The Scope allocated for the Feature Execution
1400
+ */
1401
+ get scope(): A_Scope;
1402
+ /**
1403
+ * The number of stages in the feature
1404
+ */
1405
+ get size(): number;
1406
+ /**
1407
+ * This method checks if the A-Feature is done
1408
+ *
1409
+ * @returns
1410
+ */
1411
+ get isDone(): boolean;
1412
+ /**
1413
+ * Iterator to iterate over the steps of the feature
1414
+ *
1415
+ * @returns
1416
+ */
1417
+ [Symbol.iterator](): Iterator<A_Stage, any>;
1418
+ /**
1419
+ * Validates the provided parameters for A-Feature initialization
1420
+ *
1421
+ * @param params
1422
+ */
1423
+ protected validateParams(params: A_TYPES__Feature_Init<T>): void;
1424
+ /**
1425
+ * Returns the appropriate initializer method based on the provided parameters
1426
+ *
1427
+ * @param params
1428
+ * @returns
1429
+ */
1430
+ protected getInitializer(params: A_TYPES__Feature_Init<T>): (param1: any) => void | (() => void);
1431
+ /**
1432
+ * Initializes the A-Feature from the provided template
1433
+ *
1434
+ * @param params
1435
+ */
1436
+ protected fromTemplate(params: A_TYPES__Feature_InitWithTemplate<T>): void;
1437
+ /**
1438
+ * Initializes the A-Feature from the provided component
1439
+ *
1440
+ * @param params
1441
+ */
1442
+ protected fromComponent(params: A_TYPES__Feature_InitWithComponent<T>): void;
1443
+ /**
1444
+ * This method processes the feature by executing all the stages
1445
+ *
1446
+ */
1447
+ process(
1448
+ /**
1449
+ * Optional scope to be used to resolve the steps dependencies
1450
+ * If not provided, the scope of the caller component will be used
1451
+ */
1452
+ scope?: A_Scope): Promise<void>;
1453
+ /**
1454
+ * This method moves the feature to the next stage
1455
+ *
1456
+ * @param stage
1457
+ */
1458
+ next(stage: any): void;
1459
+ /**
1460
+ * This method marks the feature as completed and returns the result
1461
+ * Uses to interrupt or end the feature processing
1462
+ *
1463
+ * @param result
1464
+ * @returns
1465
+ */
1466
+ completed(): Promise<void>;
1467
+ /**
1468
+ * This method marks the feature as failed and throws an error
1469
+ * Uses to interrupt or end the feature processing
1470
+ *
1471
+ * @param error
1472
+ */
1473
+ interrupt(
1474
+ /**
1475
+ * The reason of feature interruption
1476
+ */
1477
+ reason?: string | A_StageError | Error): Promise<void>;
1478
+ toString(): string;
1479
+ }
1480
+
1481
+ /**
1482
+ * Feature constructor type
1483
+ * Uses the generic type T to specify the type of the feature
1484
+ */
1485
+ type A_TYPES__Feature_Constructor<T = A_Feature> = new (...args: any[]) => T;
1486
+ /**
1487
+ * Feature initialization type
1488
+ */
1489
+ type A_TYPES__Feature_Init<T extends A_TYPES__FeatureAvailableComponents = A_TYPES__FeatureAvailableComponents> = A_TYPES__Feature_InitWithComponent<T> | A_TYPES__Feature_InitWithTemplate<T>;
1490
+ /**
1491
+ * Feature initialization type using component
1492
+ */
1493
+ type A_TYPES__Feature_InitWithComponent<T extends A_TYPES__FeatureAvailableComponents = A_TYPES__FeatureAvailableComponents> = {
1494
+ /**
1495
+ * Feature Name
1496
+ */
1497
+ name: string;
1498
+ /**
1499
+ * The component from where the feature is calling. It's important for proper scoping.
1500
+ * Based on the component would be retrieved connected components, entities and containers.
1501
+ *
1502
+ * [!] Could be Container, Entity, Component or Command
1503
+ */
1504
+ component: T;
1505
+ /**
1506
+ * In case when Entity is not attached to the scope can be used to transparently show dependencies
1507
+ *
1508
+ *
1509
+ */
1510
+ scope?: A_Scope;
1511
+ };
1512
+ /**
1513
+ * Feature initialization type using template
1514
+ */
1515
+ type A_TYPES__Feature_InitWithTemplate<T extends A_TYPES__FeatureAvailableComponents = A_TYPES__FeatureAvailableComponents> = {
1516
+ /**
1517
+ * Feature Name
1518
+ */
1519
+ name: string;
1520
+ /**
1521
+ * The scope from where to retrieve dependent components, entities and containers.
1522
+ *
1523
+ * [!] Important for proper scoping.
1524
+ */
1525
+ scope: A_Scope;
1526
+ /**
1527
+ * The component from where the feature is calling. It's important for proper scoping.
1528
+ * Based on the component would be retrieved connected components, entities and containers.
1529
+ *
1530
+ * [!] Could be Container, Entity, Component or Command
1531
+ */
1532
+ component?: T;
1533
+ /**
1534
+ * Optional Feature template to be used instead of building it from decorators
1535
+ */
1536
+ template: Array<A_TYPES__FeatureDefineDecoratorTemplateItem>;
1537
+ };
1538
+ /**
1539
+ * Feature serialized type
1540
+ */
1541
+ type A_TYPES__Feature_Serialized = {};
1542
+ /**
1543
+ * Feature lifecycle states
1544
+ */
1545
+ declare enum A_TYPES__FeatureState {
1546
+ /**
1547
+ * The feature has been initialized
1548
+ */
1549
+ INITIALIZED = "INITIALIZED",
1550
+ /**
1551
+ * The feature is currently being processed
1552
+ */
1553
+ PROCESSING = "PROCESSING",
1554
+ /**
1555
+ * The feature has been completed
1556
+ */
1557
+ COMPLETED = "COMPLETED",
1558
+ /**
1559
+ * The feature has been interrupted
1560
+ */
1561
+ INTERRUPTED = "INTERRUPTED"
1562
+ }
1563
+ /**
1564
+ * A list of component where features can be Defined
1565
+ *
1566
+ * [!] On this component Feature Definition is Available
1567
+ */
1568
+ type A_TYPES__FeatureAvailableComponents = InstanceType<A_TYPES__FeatureAvailableConstructors>;
1569
+ /**
1570
+ * A list of constructors where features can be Defined
1571
+ *
1572
+ * [!] On this component Feature Definition is Available
1573
+ */
1574
+ type A_TYPES__FeatureAvailableConstructors = A_TYPES__Component_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Container_Constructor;
1575
+ /**
1576
+ * Indicates a type of Feature Define decorator
1577
+ */
1578
+ type A_TYPES__FeatureDefineDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>>;
1579
+ /**
1580
+ * Describes additional configuration properties to be used in Feature Define decorator
1581
+ */
1582
+ type A_TYPES__FeatureDefineDecoratorConfig = {
1583
+ /**
1584
+ * Feature name
1585
+ *
1586
+ * [!] By default uses the method name
1587
+ */
1588
+ name: string;
1589
+ /**
1590
+ * Indicates a default behavior of the feature. If true the feature will be automatically attached to the execution.
1591
+ *
1592
+ * [!] Before feature execution the method itself will be called to prepare the feature template
1593
+ * [!] Default is false
1594
+ */
1595
+ invoke: boolean;
1596
+ /**
1597
+ * Allows to add a default behavior or number of steps that will be part of the feature
1598
+ */
1599
+ template: Array<A_TYPES__FeatureDefineDecoratorTemplateItem>;
1600
+ };
1601
+ /**
1602
+ * Describes a single template item used in Feature Define decorator
1603
+ */
1604
+ type A_TYPES__FeatureDefineDecoratorTemplateItem = A_TYPES__Required<Partial<A_TYPES__A_StageStep>, ['name', 'handler', 'component']>;
1605
+ /**
1606
+ * Describes a target where Feature Define decorator can be applied
1607
+ *
1608
+ * [!] The feature can be defined on Container, Entity, Component or Command
1609
+ */
1610
+ type A_TYPES__FeatureDefineDecoratorTarget = A_Container | A_Entity | A_Component;
1611
+ /**
1612
+ * A type of Meta information stored by Feature Define decorator
1613
+ * This information then uses by A-Context to build a proper feature template
1614
+ */
1615
+ type A_TYPES__FeatureDefineDecoratorMeta = {
1616
+ /**
1617
+ * Feature name
1618
+ * mainly it's a unique combination of the class name and method name
1619
+ */
1620
+ name: string;
1621
+ /**
1622
+ * Actual method name in the class
1623
+ */
1624
+ handler: string;
1625
+ /**
1626
+ * Indicates a default behavior of the feature. If true the feature will be automatically attached to the execution.
1627
+ *
1628
+ * [!] Before feature execution the method itself will be called to prepare the feature template
1629
+ * [!] Default is false
1630
+ */
1631
+ invoke: boolean;
1632
+ /**
1633
+ * Allows to add a default behavior or number of steps that will be part of the feature
1634
+ */
1635
+ template: Array<A_TYPES__A_StageStep>;
1636
+ };
1637
+ /**
1638
+ * Descriptor type for A_Extend decorator
1639
+ */
1640
+ type A_TYPES__FeatureExtendDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
1641
+ /**
1642
+ * Target type for A_Extend decorator
1643
+ *
1644
+ * [!] Can be applied only on A-Components
1645
+ */
1646
+ type A_TYPES__FeatureExtendDecoratorTarget = A_Component;
1647
+ /**
1648
+ * Configuration type for A_Extend decorator
1649
+ *
1650
+ * This is an INPUT parameter provided by the user
1651
+ */
1652
+ type A_TYPES__FeatureExtendDecoratorConfig = {
1653
+ /**
1654
+ * Name of the container Lifecycle method to be extended.
1655
+ *
1656
+ * [!] If not provided will be used the name of the method.
1657
+ * [!!] If name contains "." dot it will be considered as a path to the method.
1658
+ */
1659
+ name: string;
1660
+ /**
1661
+ * Container class or container name uses to identify the proper container in case when the name is not unique.
1662
+ *
1663
+ * [!] If not provided will be applied to all containers with the same name.
1664
+ * [!!] By default uses OR to join all provided items. If you need more complex Logic, please use Regexp instead
1665
+ *
1666
+ * [!!!] In case if you need to exclude some containers, entities or components, please use "exclude" property
1667
+ *
1668
+ * Example:
1669
+ *
1670
+ * ```ts
1671
+ * @A_Feature.Extend({
1672
+ * name: 'load',
1673
+ * scope: {
1674
+ * include: [A_Container1, A_Entity1],
1675
+ * exclude: [A_Component1]
1676
+ * }
1677
+ * })
1678
+ * ```
1679
+ */
1680
+ scope: Array<A_TYPES__FeatureExtendDecoratorScopeItem> | Partial<A_TYPES__FeatureExtendDecoratorScopeConfig>;
1681
+ /**
1682
+ * The behavior of the method.
1683
+ * In case its async it will be executed independently from the main thread.
1684
+ *
1685
+ * [!] However, in case of sync, it will be executed in the main thread.in the order of the declaration.
1686
+ *
1687
+ */
1688
+ behavior: A_TYPES_StageExecutionBehavior;
1689
+ /**
1690
+ * Allows to define the order of the execution of the method.
1691
+ *
1692
+ * [!] It applies for the following structure :'Component.methodName'
1693
+ * [!] In case the method has circular dependencies it will Throw an error.
1694
+ *
1695
+ * Example:
1696
+ * ```ts
1697
+ * @A_Feature.Extend({
1698
+ * name: 'load',
1699
+ * before: ['Component1.methodName', 'Component2.methodName2']
1700
+ * })
1701
+ * // OR
1702
+ * @A_Feature.Extend({
1703
+ * name: 'load',
1704
+ * before: /Component2\..+/
1705
+ * })
1706
+ * ```
1707
+ */
1708
+ before: Array<string> | RegExp;
1709
+ /**
1710
+ * Allows to define the order of the execution of the method.
1711
+ *
1712
+ * [!] It applies for the following structure :'Component.methodName'
1713
+ * [!] In case the method has circular dependencies it will Throw an error.
1714
+ *
1715
+ * Example:
1716
+ * ```ts
1717
+ * @A_Feature.Extend({
1718
+ * name: 'load',
1719
+ * after: ['Component1.methodName', 'Component2.methodName2']
1720
+ * })
1721
+ * // OR
1722
+ * @A_Feature.Extend({
1723
+ * name: 'load',
1724
+ * after: /Component2\..+/
1725
+ * })
1726
+ * ```
1727
+ *
1728
+ */
1729
+ after: Array<string> | RegExp;
1730
+ /**
1731
+ * Indicates whether to throw an error if the step fails.
1732
+ *
1733
+ * [!] By default is true
1734
+ */
1735
+ throwOnError: boolean;
1736
+ /**
1737
+ * Allows to override particular steps in the feature sequence by provided names [Component].[Method] or by regexp
1738
+ */
1739
+ override: Array<string> | RegExp;
1740
+ };
1741
+ /**
1742
+ * Scope item that can be used in A_Extend decorator configuration
1743
+ */
1744
+ type A_TYPES__FeatureExtendDecoratorScopeConfig = {
1745
+ /**
1746
+ * A list of components, entities or containers to include in the scope of the extension
1747
+ */
1748
+ include?: Array<A_TYPES__FeatureExtendDecoratorScopeItem>;
1749
+ /**
1750
+ * A list of components, entities or containers to exclude from the scope of the extension
1751
+ */
1752
+ exclude?: Array<A_TYPES__FeatureExtendDecoratorScopeItem>;
1753
+ };
1754
+ /**
1755
+ * A single item that can be used in scope configuration
1756
+ */
1757
+ type A_TYPES__FeatureExtendDecoratorScopeItem = A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Component_Constructor;
1758
+ /**
1759
+ * Meta type for A_Extend decorator
1760
+ */
1761
+ type A_TYPES__FeatureExtendDecoratorMeta = {
1762
+ /**
1763
+ * Original Feature Extension name
1764
+ *
1765
+ * [!] could be string or regex
1766
+ */
1767
+ name: string;
1768
+ /**
1769
+ * Actual method name in the class
1770
+ */
1771
+ handler: string;
1772
+ /**
1773
+ * The behavior of the method.
1774
+ * In case its async it will be executed independently from the main thread.
1775
+ *
1776
+ * [!] However, in case of sync, it will be executed in the main thread.in the order of the declaration.
1777
+ *
1778
+ */
1779
+ behavior: A_TYPES_StageExecutionBehavior;
1780
+ /**
1781
+ * Allows to define the order of the execution of the method.
1782
+ *
1783
+ * [!] In case the method has circular dependencies it will Throw an error.
1784
+ *
1785
+ */
1786
+ before: string;
1787
+ /**
1788
+ * Allows to define the order of the execution of the method.
1789
+ *
1790
+ * [!] In case the method has circular dependencies it will Throw an error.
1791
+ *
1792
+ */
1793
+ after: string;
1794
+ /**
1795
+ * Indicates whether to throw an error if the step fails.
1796
+ *
1797
+ * [!] By default is true
1798
+ */
1799
+ throwOnError: boolean;
1800
+ /**
1801
+ * Allows to override particular steps in the feature sequence by provided names [Component].[Method] or by regexp
1802
+ */
1803
+ override: string;
1804
+ };
1805
+
1806
+ /**
1807
+ * Container constructor type
1808
+ * Uses the generic type T to specify the type of the container
1809
+ */
1810
+ type A_TYPES__Container_Constructor<T = A_Container> = new (...args: any[]) => T;
1811
+ /**
1812
+ * Container initialization type
1813
+ */
1814
+ type A_TYPES__Container_Init = {
1815
+ /**
1816
+ * The extra name for the container (optional)
1817
+ */
1818
+ name?: string;
1819
+ } & A_TYPES__Scope_Init;
1820
+ /**
1821
+ * Container serialized type
1822
+ */
1823
+ type A_TYPES__Container_Serialized = {
1824
+ /**
1825
+ * The ASEID of the container
1826
+ */
1827
+ aseid: string;
1828
+ };
1829
+ /**
1830
+ * Meta information stored in each Container
1831
+ */
1832
+ type A_TYPES__ContainerMeta = {
1833
+ /**
1834
+ * Extensions applied to the component per handler
1835
+ */
1836
+ [A_TYPES__ContainerMetaKey.EXTENSIONS]: A_Meta<{
1837
+ /**
1838
+ * Where Key the regexp for what to apply the extension
1839
+ * A set of container names or a wildcard, or a regexp
1840
+ *
1841
+ *
1842
+ * Where value is the extension instructions
1843
+ */
1844
+ [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
1845
+ }>;
1846
+ [A_TYPES__ContainerMetaKey.FEATURES]: A_Meta<{
1847
+ /**
1848
+ * Where Key is the name of the feature
1849
+ *
1850
+ * Where value is the list of features
1851
+ */
1852
+ [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
1853
+ }>;
1854
+ [A_TYPES__ContainerMetaKey.ABSTRACTIONS]: A_Meta<{
1855
+ /**
1856
+ * Where Key the regexp for what to apply the extension
1857
+ * A set of container names or a wildcard, or a regexp
1858
+ *
1859
+ *
1860
+ * Where value is the extension instructions
1861
+ */
1862
+ [Key: string]: A_TYPES__ConceptAbstraction[];
1863
+ }>;
1864
+ [A_TYPES__ContainerMetaKey.INJECTIONS]: A_Meta<{
1865
+ /**
1866
+ * Where Key is the name of the injection
1867
+ *
1868
+ * Where value is the list of injections
1869
+ */
1870
+ [Key: string]: A_TYPES__A_InjectDecorator_Meta;
1871
+ }>;
1872
+ };
1873
+ type A_TYPES__ContainerMetaExtension = A_TYPES__FeatureExtendDecoratorMeta;
1874
+
1875
+ declare class A_Container {
1876
+ /**
1877
+ * Configuration of the container that will be used to run it.
1878
+ */
1879
+ protected readonly config: Partial<A_TYPES__Container_Init>;
1880
+ /**
1881
+ * Name of the container
1882
+ */
1883
+ get name(): string;
1884
+ /**
1885
+ * Returns the scope where the container is registered
1886
+ */
1887
+ get scope(): A_Scope;
1888
+ /**
1889
+ * This class should combine Components to achieve the goal withing Concept
1890
+ *
1891
+ * Container is a direct container that should be "run" to make Concept work.
1892
+ * So because of that Container can be:
1893
+ * - HTTP Server
1894
+ * - BASH Script
1895
+ * - Database Connection
1896
+ * - Microservice
1897
+ * - etc.
1898
+ *
1899
+ * @param config - Configuration of the container that will be used to run it.
1900
+ */
1901
+ constructor(
1902
+ /**
1903
+ * Configuration of the container that will be used to run it.
1904
+ */
1905
+ config?: Partial<A_TYPES__Container_Init>);
1906
+ /**
1907
+ * Calls the feature with the given name in the given scope
1908
+ *
1909
+ * [!] Note: This method creates a new instance of the feature every time it is called
1910
+ *
1911
+ * @param feature - the name of the feature to call
1912
+ * @param scope - the scope in which to call the feature
1913
+ * @returns - void
1914
+ */
1915
+ call(
1916
+ /**
1917
+ * Name of the feature to call
1918
+ */
1919
+ feature: string,
1920
+ /**
1921
+ * scope in which the feature will be executed
1922
+ */
1923
+ scope?: A_Scope): Promise<void>;
1924
+ }
1925
+
1926
+ declare enum A_TYPES__ConceptAbstractions {
1927
+ /**
1928
+ * Run the concept.
1929
+ */
1930
+ Run = "run",
1931
+ /**
1932
+ * Build the concept.
1933
+ */
1934
+ Build = "build",
1935
+ /**
1936
+ * Publish the concept.
1937
+ */
1938
+ Publish = "publish",
1939
+ /**
1940
+ * Deploy the concept.
1941
+ */
1942
+ Deploy = "deploy",
1943
+ /**
1944
+ * Load the concept.
1945
+ */
1946
+ Load = "load",
1947
+ /**
1948
+ * Start the concept.
1949
+ */
1950
+ Start = "start",
1951
+ /**
1952
+ * Stop the concept.
1953
+ */
1954
+ Stop = "stop"
1955
+ }
1956
+
1957
+ /**
1958
+ * A-Abstraction Extend decorator allows to extends behavior of each concept abstraction execution.
1959
+ * In case some components or containers requires to extend the behavior of the abstraction like 'start', 'build' or 'deploy'
1960
+ * for example, this decorator allows to do so.
1961
+ *
1962
+ * @param name - abstraction name
1963
+ * @param config - configuration of the abstraction extension
1964
+ * @returns
1965
+ */
1966
+ declare function A_Abstraction_Extend(
1967
+ /**
1968
+ * Name of the Concept Abstraction to extend
1969
+ */
1970
+ name: A_TYPES__ConceptAbstractions,
1971
+ /**
1972
+ * Configuration of the Abstraction Extension
1973
+ *
1974
+ */
1975
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
1976
+
1977
+ declare class A_Abstraction {
1978
+ /**
1979
+ * The name of the Abstraction e.g. 'deploy', 'start', 'test', etc.
1980
+ */
1981
+ protected _name: A_TYPES__ConceptAbstractions;
1982
+ /**
1983
+ * List of features that are part of this Abstraction
1984
+ */
1985
+ protected _features: A_Feature[];
1986
+ /**
1987
+ * The Feature currently being processed
1988
+ */
1989
+ protected _current?: A_Feature;
1990
+ /**
1991
+ * Actual Index of the current Feature being processed
1992
+ */
1993
+ protected _index: number;
1994
+ /**
1995
+ * Allows to extends A-Abstraction with additional methods
1996
+ */
1997
+ static get Extend(): typeof A_Abstraction_Extend;
1998
+ /**
1999
+ * A-Abstraction is an object that is common for any application.
2000
+ * By providing components and creating abstraction extensions it's possible to create a unique behavior of the whole solution.
2001
+ *
2002
+ * Every application has basic abstractions like 'start', 'stop', 'deploy', 'test', etc.
2003
+ * They can be easily extended with additional logic from both containers and components.
2004
+ *
2005
+ *
2006
+ * @param params
2007
+ */
2008
+ constructor(
2009
+ /**
2010
+ * Parameters to define the A-Abstraction
2011
+ */
2012
+ params: A_TYPES__Abstraction_Init);
2013
+ /**
2014
+ * Returns the name of the Abstraction
2015
+ */
2016
+ get name(): string;
2017
+ /**
2018
+ * Returns the current Feature being processed
2019
+ */
2020
+ get feature(): A_Feature | undefined;
2021
+ /**
2022
+ * This method checks if the A-Feature is done
2023
+ *
2024
+ * @returns
2025
+ */
2026
+ get isDone(): boolean;
2027
+ [Symbol.iterator](): Iterator<A_Feature, any>;
2028
+ /**
2029
+ * This method moves the Abstraction processing to the next Feature in the list
2030
+ *
2031
+ * @param stage
2032
+ */
2033
+ next(stage: any): void;
2034
+ /**
2035
+ * Allows to process all stages of the Abstraction
2036
+ *
2037
+ * @returns
2038
+ */
2039
+ process(
2040
+ /**
2041
+ * Allows to override the scope in which the Abstraction will be processed
2042
+ *
2043
+ */
2044
+ scope?: A_Scope): Promise<void>;
2045
+ }
2046
+
2047
+ /**
2048
+ * Abstraction constructor type
2049
+ * Uses the generic type T to specify the type of the abstraction
2050
+ */
2051
+ type A_TYPES__Abstraction_Constructor<T = A_Abstraction> = new (...args: any[]) => T;
2052
+ /**
2053
+ * Abstraction initialization type
2054
+ */
2055
+ type A_TYPES__Abstraction_Init = {
2056
+ /**
2057
+ * Name of the A-Abstraction
2058
+ */
2059
+ name: A_TYPES__ConceptAbstractions;
2060
+ /**
2061
+ * Features that compose the A-Abstraction
2062
+ */
2063
+ containers: Array<A_Container>;
2064
+ };
2065
+ /**
2066
+ * Abstraction serialized type
2067
+ */
2068
+ type A_TYPES__Abstraction_Serialized = {
2069
+ /**
2070
+ * The ASEID of the abstraction
2071
+ */
2072
+ aseid: string;
2073
+ };
2074
+ /**
2075
+ * Components that can extend Abstractions
2076
+ */
2077
+ type A_TYPES__AbstractionAvailableComponents = A_Component | A_Container;
2078
+ type A_TYPES__AbstractionDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
2079
+ type A_TYPES__AbstractionDecoratorConfig = A_TYPES__FeatureExtendDecoratorConfig;
2080
+
2081
+ declare class A_Concept<_Imports extends A_Container[] = A_Container[]> {
2082
+ protected props: A_TYPES__Concept_Init<_Imports>;
2083
+ /**
2084
+ * Load the concept. This step runs before any other steps to ensure that all components are loaded.
2085
+ */
2086
+ static Load(
2087
+ /**
2088
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2089
+ */
2090
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): ReturnType<typeof A_Abstraction_Extend>;
2091
+ /**
2092
+ * Publish the concept to ADAAS platform. (Or any other place defined in the concept)
2093
+ *
2094
+ * [!] To extend the logic just create a custom containers and override the default behavior.
2095
+ */
2096
+ static Publish(
2097
+ /**
2098
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2099
+ */
2100
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): ReturnType<typeof A_Abstraction_Extend>;
2101
+ /**
2102
+ * Deploy the concept to the environment.
2103
+ */
2104
+ static Deploy(
2105
+ /**
2106
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2107
+ */
2108
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2109
+ /**
2110
+ * Compiles the Concept in case there are some containers that require that.
2111
+ *
2112
+ * Can be used for static websites or any other concept that requires a build step.
2113
+ *
2114
+ */
2115
+ static Build(
2116
+ /**
2117
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2118
+ */
2119
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2120
+ /**
2121
+ * Main execution of the concept.
2122
+ */
2123
+ static Run(
2124
+ /**
2125
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2126
+ */
2127
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2128
+ /**
2129
+ * Start the concept. Uses for servers or any other background services.
2130
+ */
2131
+ static Start(
2132
+ /**
2133
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2134
+ */
2135
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2136
+ /**
2137
+ * Stop the concept. Uses for servers or any other background services.
2138
+ */
2139
+ static Stop(
2140
+ /**
2141
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2142
+ */
2143
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2144
+ /**
2145
+ * Name of the concept
2146
+ *
2147
+ * By default, the name of the Concept is 'a-concept'
2148
+ */
2149
+ private _name;
2150
+ /**
2151
+ * A list of internally defined containers that the concept uses.
2152
+ */
2153
+ protected _containers: A_Container[];
2154
+ /**
2155
+ * A-Concept is a placeholder for the concept of the any program.
2156
+ *
2157
+ * Concept - could be any Program regardless environment and it's goal.
2158
+ * It could be mobile, web or simple html page.
2159
+ * All depends on Containers and Components installed and provided in the Concept.
2160
+ *
2161
+ *
2162
+ * [!] Concept operates ONLY with all Components and Containers provided to achieve the goal.
2163
+ *
2164
+ *
2165
+ * @param props - Initialization properties for the Concept
2166
+ */
2167
+ constructor(props: A_TYPES__Concept_Init<_Imports>);
2168
+ /**
2169
+ * Name of the concept
2170
+ */
2171
+ get name(): string;
2172
+ /**
2173
+ * The primary Root scope of the concept.
2174
+ */
2175
+ get scope(): A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any>[]>;
2176
+ /**
2177
+ * Register a class or value in the concept scope.
2178
+ */
2179
+ get register(): A_Scope['register'];
2180
+ /**
2181
+ * Resolve a class or value from the concept scope.
2182
+ */
2183
+ get resolve(): A_Scope['resolve'];
2184
+ /**
2185
+ * Load the concept.
2186
+ */
2187
+ load(scope?: A_Scope): Promise<void>;
2188
+ /**
2189
+ * Run the concept.
2190
+ */
2191
+ run(scope?: A_Scope): Promise<void>;
2192
+ /**
2193
+ * Start the concept.
2194
+ *
2195
+ * @param params
2196
+ */
2197
+ start(scope?: A_Scope): Promise<void>;
2198
+ /**
2199
+ * Stop the concept.
2200
+ *
2201
+ * @param params
2202
+ */
2203
+ stop(scope?: A_Scope): Promise<void>;
2204
+ /**
2205
+ * Build the concept.
2206
+ */
2207
+ build(scope?: A_Scope): Promise<void>;
2208
+ /**
2209
+ * Deploy the concept.
2210
+ */
2211
+ deploy(scope?: A_Scope): Promise<void>;
2212
+ /**
2213
+ * Publish the concept.
2214
+ */
2215
+ publish(scope?: A_Scope): Promise<void>;
2216
+ /**
2217
+ * Call the specific method of the concept or included modules.
2218
+ */
2219
+ call<K extends Record<_Imports[number]['name'], string>>(
2220
+ /**
2221
+ * Name of the method to call
2222
+ */
2223
+ method: K[keyof K],
2224
+ /**
2225
+ * Container in which the method is located
2226
+ */
2227
+ container: _Imports[number]): Promise<void>;
2228
+ }
2229
+
2230
+ declare class A_Fragment<_MemoryItems extends Record<string, any> = any> {
2231
+ /**
2232
+ * Fragment Name
2233
+ */
2234
+ name: string;
2235
+ /**
2236
+ * Memory storage for the Fragment instance
2237
+ */
2238
+ protected _meta: A_Meta<_MemoryItems>;
2239
+ /**
2240
+ * A-Fragment is a singleton, a piece of execution Context that can be shared between the Components/Entities/Commands
2241
+ * For every A_Scope can be defined only One A_Fragment of the same type.
2242
+ * This class is useful for the design purpose and maintainance of the application
2243
+ *
2244
+ *
2245
+ * [!] Every A_Fragment is a Memory Class that can store data in memory between the steps of the pipeline.
2246
+ * [!] So if it necessary to store some information in the Execution Context - use memory of the Fragment
2247
+ */
2248
+ constructor(params?: Partial<A_TYPES__Fragment_Init>);
2249
+ /**
2250
+ * Returns the Meta object that allows to store data in the Fragment memory
2251
+ *
2252
+ * @returns
2253
+ */
2254
+ get memory(): A_Meta<_MemoryItems>;
2255
+ /**
2256
+ * Returns the JSON representation of the Fragment
2257
+ *
2258
+ * @returns
2259
+ */
2260
+ toJSON(): _MemoryItems & {
2261
+ name: string;
2262
+ };
2263
+ }
2264
+
2265
+ /**
2266
+ * Fragment constructor type
2267
+ * Uses the generic type T to specify the type of the fragment
2268
+ */
2269
+ type A_TYPES__Fragment_Constructor<T = A_Fragment> = new (...args: any[]) => T;
2270
+ /**
2271
+ * Fragment initialization type
2272
+ */
2273
+ type A_TYPES__Fragment_Init = {
2274
+ name: string;
2275
+ };
2276
+ /**
2277
+ * Fragment serialized type
2278
+ */
2279
+ type A_TYPES__Fragment_Serialized = {
2280
+ /**
2281
+ * The ASEID of the fragment
2282
+ */
2283
+ aseid: string;
2284
+ };
2285
+
2286
+ /**
2287
+ * Concept constructor type
2288
+ * Uses the generic type T to specify the type of the concept
2289
+ */
2290
+ type A_TYPES__Concept_Constructor<T = A_Concept> = new (...args: any[]) => T;
2291
+ /**
2292
+ * Concept initialization type
2293
+ * Uses the generic type T to specify the type of containers that the concept will use
2294
+ */
2295
+ type A_TYPES__Concept_Init<T extends Array<A_Container>> = {
2296
+ /**
2297
+ * The name of the Concept
2298
+ * If name is not provided, will be used from environment variable A_CONCEPT_NAME
2299
+ *
2300
+ * By default, the name of the Concept is 'a-concept'
2301
+ *
2302
+ */
2303
+ name?: string;
2304
+ /**
2305
+ * A set of Context Fragments to register globally for the concept.
2306
+ * These fragments will be available in the global context.
2307
+ *
2308
+ */
2309
+ fragments?: Array<InstanceType<A_TYPES__Fragment_Constructor>>;
2310
+ /**
2311
+ * A set of Containers that the concept depends on.
2312
+ * These containers will create a new Container for the concept.
2313
+ */
2314
+ containers?: T;
2315
+ /**
2316
+ * A set of Entities that the concept can use.
2317
+ * These components will be used in the concept.
2318
+ */
2319
+ entities?: Array<InstanceType<A_TYPES__Entity_Constructor> | A_TYPES__Entity_Constructor>;
2320
+ /**
2321
+ * A set of Components available for all containers and fragments in the concept.
2322
+ * These components will be registered in the root scope of the concept.
2323
+ *
2324
+ * [!] Note that these components will be available in all containers and fragments in the concept.
2325
+ */
2326
+ components?: Array<A_TYPES__Component_Constructor>;
2327
+ };
2328
+ /**
2329
+ * Concept serialized type
2330
+ */
2331
+ type A_TYPES__Concept_Serialized = {};
2332
+ /**
2333
+ * Uses as a transfer object to pass configurations to Feature constructor
2334
+ */
2335
+ type A_TYPES__ConceptAbstractionMeta = {
2336
+ /**
2337
+ * The arguments that will be passed to the handler
2338
+ */
2339
+ args: A_TYPES__A_InjectDecorator_Meta;
2340
+ } & A_TYPES__FeatureExtendDecoratorMeta;
2341
+ /**
2342
+ * Uses to define the extension that will be applied to the Concept
2343
+ */
2344
+ type A_TYPES__ConceptAbstraction = A_TYPES__FeatureExtendDecoratorMeta;
2345
+
2346
+ declare enum A_TYPES__ComponentMetaKey {
2347
+ EXTENSIONS = "a-component-extensions",
2348
+ FEATURES = "a-component-features",
2349
+ INJECTIONS = "a-component-injections",
2350
+ ABSTRACTIONS = "a-component-abstractions"
2351
+ }
2352
+
2353
+ /**
2354
+ * Component constructor type
2355
+ * Uses the generic type T to specify the type of the component
2356
+ */
2357
+ type A_TYPES__Component_Constructor<T = A_Component> = new (...args: any[]) => T;
2358
+ /**
2359
+ * Component initialization type
2360
+ */
2361
+ type A_TYPES__Component_Init = any;
2362
+ /**
2363
+ * Component serialized type
2364
+ */
2365
+ type A_TYPES__Component_Serialized = {
2366
+ /**
2367
+ * The ASEID of the component
2368
+ */
2369
+ aseid: string;
2370
+ };
2371
+ /**
2372
+ * Component meta type
2373
+ */
2374
+ type A_TYPES__ComponentMeta = {
2375
+ /**
2376
+ * Extensions applied to the component per handler
2377
+ */
2378
+ [A_TYPES__ComponentMetaKey.EXTENSIONS]: A_Meta<{
2379
+ /**
2380
+ * Where Key the regexp for what to apply the extension
2381
+ * A set of container names or a wildcard, or a regexp
2382
+ *
2383
+ *
2384
+ * Where value is the extension instructions
2385
+ */
2386
+ [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
2387
+ }>;
2388
+ /**
2389
+ * Features defined on the component per handler
2390
+ */
2391
+ [A_TYPES__ComponentMetaKey.FEATURES]: A_Meta<{
2392
+ /**
2393
+ * Where Key is the name of the feature
2394
+ *
2395
+ * Where value is the list of features
2396
+ */
2397
+ [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
2398
+ }>;
2399
+ /**
2400
+ * Injections defined on the component per handler
2401
+ */
2402
+ [A_TYPES__ComponentMetaKey.INJECTIONS]: A_Meta<{
2403
+ /**
2404
+ * Where Key is the name of the injection
2405
+ *
2406
+ * Where value is the list of injections
2407
+ */
2408
+ [Key: string]: A_TYPES__A_InjectDecorator_Meta;
2409
+ }>;
2410
+ /**
2411
+ * Abstractions extended by the component per handler
2412
+ */
2413
+ [A_TYPES__ComponentMetaKey.ABSTRACTIONS]: A_Meta<{
2414
+ /**
2415
+ * Where Key is the name of the stage
2416
+ *
2417
+ * Where value is the list of injections
2418
+ */
2419
+ [Key: string]: A_TYPES__ConceptAbstraction[];
2420
+ }>;
2421
+ };
2422
+ type A_TYPES__ComponentMetaExtension = A_TYPES__FeatureExtendDecoratorMeta;
2423
+
2424
+ type A_TYPES__CallerComponent = A_Container | A_Component | A_Entity;
2425
+ /**
2426
+ * Caller constructor type
2427
+ * Uses the generic type T to specify the type of the caller component
2428
+ */
2429
+ type A_TYPES__Caller_Constructor<T = A_Caller> = new (...args: any[]) => T;
2430
+ /**
2431
+ * Caller initialization type
2432
+ */
2433
+ type A_TYPES__Caller_Init = {};
2434
+ /**
2435
+ * Caller serialized type
2436
+ */
2437
+ type A_TYPES__Caller_Serialized = {};
2438
+
2439
+ /**
2440
+ * A-Inject decorator descriptor type
2441
+ * Indicates the type of the decorator function
2442
+ */
2443
+ type A_TYPES__A_InjectDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => Promise<void>>;
2444
+ /**
2445
+ * A-Inject decorator return type
2446
+ * Indicates what the decorator function returns
2447
+ */
2448
+ type A_TYPES__A_InjectDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
2449
+ type A_TYPES__A_InjectDecorator_Meta = Array<{
2450
+ target: A_TYPES__InjectableConstructors;
2451
+ require?: boolean;
2452
+ load?: string;
2453
+ defaultArgs?: any;
2454
+ create?: boolean;
2455
+ instructions?: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions>;
2456
+ }>;
2457
+ /**
2458
+ * Targets that can be injected into Extended functions or constructors
2459
+ *
2460
+ */
2461
+ type A_TYPES__InjectableTargets = A_TYPES__Component_Constructor | InstanceType<A_TYPES__Component_Constructor> | InstanceType<A_TYPES__Container_Constructor>;
2462
+ type A_TYPES__InjectableConstructors = A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Feature_Constructor | A_TYPES__Caller_Constructor | A_TYPES__Fragment_Constructor | string;
2463
+ type A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T extends A_Entity = A_Entity> = {
2464
+ query: Partial<A_TYPES__A_InjectDecorator_EntityInjectionQuery<T>>;
2465
+ pagination: Partial<A_TYPES__A_InjectDecorator_EntityInjectionPagination>;
2466
+ };
2467
+ type A_TYPES__A_InjectDecorator_EntityInjectionQuery<T extends A_Entity = A_Entity> = {
2468
+ aseid: string;
2469
+ } & {
2470
+ [key in keyof T]?: any;
2471
+ };
2472
+ type A_TYPES__A_InjectDecorator_EntityInjectionPagination = {
2473
+ count: number;
2474
+ from: 'start' | 'end';
2475
+ };
2476
+
2477
+ declare class A_Scope<_ComponentType extends A_TYPES__Component_Constructor[] = A_TYPES__Component_Constructor[], _ErrorType extends A_TYPES__Error_Constructor[] = A_TYPES__Error_Constructor[], _EntityType extends A_TYPES__Entity_Constructor[] = A_TYPES__Entity_Constructor[], _FragmentType extends A_Fragment[] = A_Fragment[]> {
2478
+ /**
2479
+ * Scope Name uses for identification and logging purposes
2480
+ */
2481
+ protected _name: string;
2482
+ /**
2483
+ * Parent scope reference, used for inheritance of components, fragments, entities and commands
2484
+ */
2485
+ protected _parent?: A_Scope;
2486
+ /**
2487
+ * A set of allowed components, A set of constructors that are allowed in the scope
2488
+ *
2489
+ */
2490
+ protected _allowedComponents: Set<_ComponentType[number]>;
2491
+ /**
2492
+ * A set of allowed errors, A set of constructors that are allowed in the scope
2493
+ */
2494
+ protected _allowedErrors: Set<_ErrorType[number]>;
2495
+ /**
2496
+ * A set of allowed entities, A set of constructors that are allowed in the scope
2497
+ */
2498
+ protected _allowedEntities: Set<_EntityType[number]>;
2499
+ /**
2500
+ * A set of allowed fragments, A set of constructors that are allowed in the scope
2501
+ */
2502
+ protected _allowedFragments: Set<A_TYPES__Fragment_Constructor<_FragmentType[number]>>;
2503
+ /**
2504
+ * Storage for the components, should be strong as components are unique per scope
2505
+ */
2506
+ protected _components: Map<_ComponentType[number], InstanceType<_ComponentType[number]>>;
2507
+ /**
2508
+ * Storage for the errors, should be strong as errors are unique per code
2509
+ */
2510
+ protected _errors: Map<string, InstanceType<_ErrorType[number]>>;
2511
+ /**
2512
+ * Storage for the entities, should be strong as entities are unique per aseid
2513
+ */
2514
+ protected _entities: Map<string, InstanceType<_EntityType[number]>>;
2515
+ /**
2516
+ * Storage for the fragments, should be weak as fragments are singletons per scope
2517
+ */
2518
+ protected _fragments: Map<A_TYPES__Fragment_Constructor<_FragmentType[number]>, _FragmentType[number]>;
2519
+ /**
2520
+ * Returns the name of the scope
2521
+ */
2522
+ get name(): string;
2523
+ /**
2524
+ * Returns a list of Constructors for A-Components that are available in the scope
2525
+ */
2526
+ get allowedComponents(): Set<_ComponentType[number]>;
2527
+ /**
2528
+ * Returns a list of Constructors for A-Entities that are available in the scope
2529
+ */
2530
+ get allowedEntities(): Set<_EntityType[number]>;
2531
+ /**
2532
+ * Returns a list of Constructors for A-Fragments that are available in the scope
2533
+ */
2534
+ get allowedFragments(): Set<A_TYPES__Fragment_Constructor<_FragmentType[number]>>;
2535
+ /**
2536
+ * Returns a list of Constructors for A-Errors that are available in the scope
2537
+ */
2538
+ get allowedErrors(): Set<_ErrorType[number]>;
2539
+ /**
2540
+ * Returns an Array of entities registered in the scope
2541
+ *
2542
+ * [!] One entity per aseid
2543
+ */
2544
+ get entities(): Array<InstanceType<_EntityType[number]>>;
2545
+ /**
2546
+ * Returns an Array of fragments registered in the scope
2547
+ *
2548
+ * [!] One fragment per scope
2549
+ */
2550
+ get fragments(): Array<_FragmentType[number]>;
2551
+ /**
2552
+ * Returns an Array of components registered in the scope
2553
+ *
2554
+ * [!] One component instance per scope
2555
+ */
2556
+ get components(): Array<InstanceType<_ComponentType[number]>>;
2557
+ /**
2558
+ * Returns the parent scope of the current scope
2559
+ *
2560
+ * @param setValue
2561
+ * @returns
2562
+ */
2563
+ get parent(): A_Scope | undefined;
2564
+ /**
2565
+ * A_Scope refers to the visibility and accessibility of :
2566
+ * - variables,
2567
+ * - Components,
2568
+ * - Context Fragments
2569
+ * - Entities
2570
+ * - and objects in different parts of your code.
2571
+ * Scope determines where a particular piece of data (like a variable or function)
2572
+ * can be accessed, modified, or referenced, and it plays a crucial role in avoiding naming collisions and ensuring data integrity.
2573
+ *
2574
+ * [!] The scope behavior is similar to tree structure where each scope can have a parent scope and inherit its components, fragments, entities and errors
2575
+ *
2576
+ * @param params
2577
+ * @param config
2578
+ */
2579
+ constructor();
2580
+ constructor(
2581
+ /**
2582
+ * A set of constructors that are allowed in the scope
2583
+ */
2584
+ params: Partial<A_TYPES__Scope_Init<_ComponentType, _ErrorType, _EntityType, _FragmentType>>,
2585
+ /**
2586
+ * Configuration options for the scope
2587
+ */
2588
+ config?: Partial<A_TYPES__ScopeConfig>);
2589
+ /**
2590
+ * Determines which initializer method to use based on the type of the first parameter.
2591
+ *
2592
+ * @param param1
2593
+ * @returns
2594
+ */
2595
+ protected getInitializer(param1?: Partial<A_TYPES__Scope_Init<_ComponentType, _ErrorType, _EntityType, _FragmentType>>, param2?: Partial<A_TYPES__ScopeConfig>): (param1: any, param2: any) => void | (() => void);
2596
+ protected defaultInitialized(params?: Partial<A_TYPES__Scope_Init<_ComponentType, _ErrorType, _EntityType, _FragmentType>>, config?: Partial<A_TYPES__ScopeConfig>): void;
2597
+ /**
2598
+ * This method is used to initialize the components in the scope
2599
+ * To save memory components are initialized only when they are requested
2600
+ *
2601
+ * This method only registers the component in the scope in case they are not registered yet
2602
+ *
2603
+ * @param _components
2604
+ */
2605
+ protected initComponents(_components?: _ComponentType): void;
2606
+ /**
2607
+ * This method is used to initialize the errors in the scope
2608
+ *
2609
+ * This method only registers the errors in the scope in case they are not registered yet
2610
+ *
2611
+ * @param _errors
2612
+ */
2613
+ protected initErrors(_errors?: _ErrorType): void;
2614
+ /**
2615
+ * This method is used to initialize the entities in the scope
2616
+ *
2617
+ * This method only registers the entities in the scope in case they are not registered yet
2618
+ *
2619
+ * @param _entities
2620
+ */
2621
+ protected initEntities(_entities?: [
2622
+ ..._EntityType,
2623
+ ...InstanceType<_EntityType[number]>[]
2624
+ ]): void;
2625
+ /**
2626
+ * This method is used to initialize the fragments in the scope
2627
+ *
2628
+ * This method only registers the fragments in the scope in case they are not registered yet
2629
+ *
2630
+ * @param _fragments
2631
+ */
2632
+ protected initFragments(_fragments?: _FragmentType): void;
2633
+ /**
2634
+ * This method is used to destroy the scope and all its registered components, fragments and entities
2635
+ *
2636
+ * [!] This method deregisters all components, fragments and entities from the A-Context
2637
+ * [!] This method also clears all internal registries and collections
2638
+ */
2639
+ destroy(): void;
2640
+ /**
2641
+ * Returns the issuer of the scope, useful for debugging and tracking purposes
2642
+ *
2643
+ * Issuer can be:
2644
+ * - A Container that allocated the scope
2645
+ * - A Feature that allocated the scope
2646
+ *
2647
+ * [!] Note that the issuer is the direct allocator of the scope, so if a Container allocated a Feature that allocated the scope, the issuer will be the Feature
2648
+ *
2649
+ * @returns
2650
+ */
2651
+ issuer<T extends A_TYPES__ScopeLinkedComponents>(): T | undefined;
2652
+ /**
2653
+ * This method is used to inherit from a parent scope
2654
+ *
2655
+ * [!] This method checks for circular inheritance and throws an error if detected
2656
+ *
2657
+ * @param parent
2658
+ * @returns
2659
+ */
2660
+ inherit(parent: A_Scope): A_Scope;
2661
+ /**
2662
+ * This method is used to check if the component is available in the scope
2663
+ *
2664
+ * [!] Note that this method checks for the component in the current scope and all parent scopes
2665
+ *
2666
+ * @param component
2667
+ * @returns
2668
+ */
2669
+ has<T extends A_Component>(
2670
+ /**
2671
+ * Provide a component constructor to check if it's available in the scope
2672
+ */
2673
+ component: A_TYPES__Component_Constructor<T>): boolean;
2674
+ has<T extends A_Entity>(
2675
+ /**
2676
+ * Provide an entity constructor to check if it's available in the scope
2677
+ *
2678
+ * [!] Note that entities are unique per aseid, so this method checks if there's at least one entity of the provided type in the scope
2679
+ */
2680
+ entity: A_TYPES__Entity_Constructor<T>): boolean;
2681
+ has<T extends A_Fragment>(
2682
+ /**
2683
+ * Provide a fragment constructor to check if it's available in the scope
2684
+ */
2685
+ fragment: A_TYPES__Fragment_Constructor<T>): boolean;
2686
+ has(
2687
+ /**
2688
+ * Provide a string to check if a component, entity or fragment with the provided name is available in the scope
2689
+ */
2690
+ constructor: string): boolean;
2691
+ /**
2692
+ * Merges two scopes into a new one
2693
+ *
2694
+ * [!] Notes:
2695
+ * - this method does NOT modify the existing scopes
2696
+ * - parent of the new scope will be the parent of the current scope or the parent of anotherScope (if exists)
2697
+ *
2698
+ * @param anotherScope
2699
+ * @returns
2700
+ */
2701
+ merge(anotherScope: A_Scope): A_Scope;
2702
+ /**
2703
+ * Allows to retrieve the constructor of the component or entity by its name
2704
+ *
2705
+ * [!] Notes:
2706
+ * - In case of search for A-Entity please ensure that provided string corresponds to the static entity property of the class. [!] By default it's the kebab-case of the class name
2707
+ * - In case of search for A_Component please ensure that provided string corresponds to the class name in PascalCase
2708
+ *
2709
+ * @param name
2710
+ * @returns
2711
+ */
2712
+ resolveConstructor<T extends A_Entity>(
2713
+ /**
2714
+ * Provide the entity name or static entity property to retrieve its constructor
2715
+ */
2716
+ name: string): A_TYPES__Entity_Constructor<T>;
2717
+ resolveConstructor<T extends A_Component>(
2718
+ /**
2719
+ * Provide the component name in PascalCase to retrieve its constructor
2720
+ */
2721
+ name: string): A_TYPES__Component_Constructor<T>;
2722
+ resolveConstructor<T extends A_Fragment>(
2723
+ /**
2724
+ * Provide the fragment name in PascalCase to retrieve its constructor
2725
+ */
2726
+ name: string): A_TYPES__Fragment_Constructor<T>;
2727
+ /**
2728
+ * This method allows to resolve/inject a component, fragment or entity from the scope
2729
+ * Depending on the provided parameters it can resolve:
2730
+ * - A single component/fragment/entity by its constructor or name
2731
+ * - An array of components/fragments/entities by providing an array of constructors
2732
+ * - An entity or an array of entities by providing the entity constructor and query instructions
2733
+ *
2734
+ * @param component
2735
+ * @returns
2736
+ */
2737
+ resolve<T extends A_Component>(
2738
+ /**
2739
+ * Provide a component constructor to resolve its instance from the scope
2740
+ */
2741
+ component: A_TYPES__Component_Constructor<T>): T | undefined;
2742
+ resolve<T extends A_TYPES__Component_Constructor[]>(
2743
+ /**
2744
+ * Provide an array of component constructors to resolve their instances from the scope
2745
+ */
2746
+ components: [...T]): Array<InstanceType<T[number]>> | undefined;
2747
+ resolve<T extends A_Fragment>(
2748
+ /**
2749
+ * Provide a fragment constructor to resolve its instance from the scope
2750
+ */
2751
+ fragment: A_TYPES__Fragment_Constructor<T>): T | undefined;
2752
+ resolve<T extends A_TYPES__Fragment_Constructor[]>(
2753
+ /**
2754
+ * Provide an array of fragment constructors to resolve their instances from the scope
2755
+ */
2756
+ fragments: [...T]): Array<InstanceType<T[number]>> | undefined;
2757
+ resolve<T extends A_Entity>(
2758
+ /**
2759
+ * Provide an entity constructor to resolve its instance or an array of instances from the scope
2760
+ */
2761
+ entity: A_TYPES__Entity_Constructor<T>): T | undefined;
2762
+ resolve<T extends A_Scope>(
2763
+ /**
2764
+ * Uses only in case of resolving a single entity
2765
+ *
2766
+ * Provide an entity constructor to resolve its instance from the scope
2767
+ */
2768
+ scope: new (...args: any[]) => T): T | undefined;
2769
+ resolve<T extends A_Entity>(
2770
+ /**
2771
+ * Provide an entity constructor to resolve its instance or an array of instances from the scope
2772
+ */
2773
+ entity: A_TYPES__Entity_Constructor<T>,
2774
+ /**
2775
+ * Provide optional instructions to find a specific entity or a set of entities
2776
+ */
2777
+ instructions: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T>>): Array<T>;
2778
+ resolve<T extends A_TYPES__ScopeResolvableComponents>(constructorName: string): T | undefined;
2779
+ resolve<T extends A_TYPES__ScopeResolvableComponents>(
2780
+ /**
2781
+ * Provide a component, fragment or entity constructor or an array of constructors to resolve its instance(s) from the scope
2782
+ */
2783
+ param1: A_TYPES__InjectableConstructors): T | Array<T> | undefined;
2784
+ resolve<T extends A_TYPES__ScopeLinkedConstructors>(
2785
+ /**
2786
+ * Provide a component, fragment or entity constructor or an array of constructors to resolve its instance(s) from the scope
2787
+ */
2788
+ param1: InstanceType<T>): T | Array<T> | undefined;
2789
+ /**
2790
+ * This method is used internally to resolve a component, fragment or entity by its constructor name
2791
+ *
2792
+ * [!] Note that this method checks for the component, fragment or entity in the current scope and all parent scopes
2793
+ *
2794
+ * @param name - name of the component, fragment or entity to resolve (constructor name for components and fragments, static entity property for entities, static code property for commands)
2795
+ * @returns
2796
+ */
2797
+ private resolveByName;
2798
+ /**
2799
+ * This method is used internally to resolve a single component, fragment or entity from the scope
2800
+ *
2801
+ * @param component
2802
+ * @param instructions
2803
+ * @returns
2804
+ */
2805
+ private resolveOnce;
2806
+ private resolveIssuer;
2807
+ /**
2808
+ * This method is used internally to resolve a single entity from the scope based on the provided instructions
2809
+ *
2810
+ * [!] Note that this method can return either a single entity or an array of entities depending on the instructions provided
2811
+ *
2812
+ * @param entity
2813
+ * @param instructions
2814
+ * @returns
2815
+ */
2816
+ private resolveEntity;
2817
+ /**
2818
+ * This method is used internally to resolve a single fragment from the scope
2819
+ *
2820
+ * @param fragment
2821
+ * @returns
2822
+ */
2823
+ private resolveFragment;
2824
+ /**
2825
+ * This method is used internally to resolve a single scope from the current scope
2826
+ *
2827
+ * @param scope
2828
+ * @returns
2829
+ */
2830
+ private resolveScope;
2831
+ /**
2832
+ * This method is used internally to resolve a single component from the scope
2833
+ *
2834
+ * @param component
2835
+ * @returns
2836
+ */
2837
+ private resolveComponent;
2838
+ /**
2839
+ * This method is used to register the component in the scope
2840
+ *
2841
+ * @param fragment
2842
+ */
2843
+ register<T extends A_Component>(
2844
+ /**
2845
+ * Provide a component constructor to register it in the scope
2846
+ */
2847
+ component: A_TYPES__Component_Constructor<T>): void;
2848
+ register(
2849
+ /**
2850
+ * Provide a command instance to register it in the scope
2851
+ */
2852
+ component: A_Component): void;
2853
+ register<T extends A_Error>(
2854
+ /**
2855
+ * Provide an error constructor to register it in the scope
2856
+ */
2857
+ error: A_TYPES__Error_Constructor<T>): void;
2858
+ register(
2859
+ /**
2860
+ * Provide an error instance to register it in the scope
2861
+ */
2862
+ error: A_Error): void;
2863
+ register<T extends A_Fragment>(
2864
+ /**
2865
+ * Provide a command instance to register it in the scope
2866
+ */
2867
+ fragment: A_TYPES__Fragment_Constructor<T>): void;
2868
+ register(
2869
+ /**
2870
+ * Provide a fragment instance to register it in the scope
2871
+ */
2872
+ fragment: A_Fragment): void;
2873
+ register<T extends A_Entity>(
2874
+ /**
2875
+ * Provide an entity constructor to register it in the scope
2876
+ */
2877
+ entity: A_TYPES__Entity_Constructor<T>): void;
2878
+ register(
2879
+ /**
2880
+ * Provide an entity instance to register it in the scope
2881
+ */
2882
+ entity: A_Entity): void;
2883
+ /**
2884
+ * This method is useful when you want to serialize the scope to JSON
2885
+ *
2886
+ * [!] Note this is not a deep serialization, only the fragments are serialized
2887
+ * [!] Fragments are a storage for information which is relevant to the scope
2888
+ *
2889
+ * @returns
2890
+ */
2891
+ toJSON(): Record<string, any>;
2892
+ /**
2893
+ * Type guard to check if the constructor is of type A_Component and is allowed in the scope
2894
+ *
2895
+ * @param ctor
2896
+ * @returns
2897
+ */
2898
+ protected isAllowedComponent(ctor: unknown): ctor is _ComponentType[number];
2899
+ /**
2900
+ * Type guard to check if the constructor is of type A_Entity and is allowed in the scope
2901
+ *
2902
+ * @param ctor
2903
+ * @returns
2904
+ */
2905
+ protected isAllowedEntity(ctor: unknown): ctor is A_TYPES__Entity_Constructor<_EntityType[number]>;
2906
+ /**
2907
+ * Type guard to check if the constructor is of type A_Fragment and is allowed in the scope
2908
+ *
2909
+ * @param ctor
2910
+ * @returns
2911
+ */
2912
+ protected isAllowedFragment(ctor: unknown): ctor is A_TYPES__Fragment_Constructor<_FragmentType[number]>;
2913
+ /**
2914
+ * Type guard to check if the constructor is of type A_Error and is allowed in the scope
2915
+ *
2916
+ * @param ctor
2917
+ * @returns
2918
+ */
2919
+ protected isAllowedError(ctor: unknown): ctor is A_TYPES__Error_Constructor<_ErrorType[number]>;
2920
+ /**
2921
+ * This method is used to check if the scope is inherited from another scope
2922
+ *
2923
+ * @param scope
2924
+ * @returns
2925
+ */
2926
+ isInheritedFrom(scope: A_Scope): boolean;
2927
+ /**
2928
+ * Helper method to check circular inheritance
2929
+ * Should return a full sequence of inheritance for logging purposes
2930
+ *
2931
+ * @param scope
2932
+ * @returns
2933
+ */
2934
+ checkCircularInheritance(scope: A_Scope): Array<string> | false;
2935
+ /**
2936
+ * Helper method to print the inheritance chain of the scope
2937
+ */
2938
+ printInheritanceChain(): void;
2939
+ }
2940
+
2941
+ /**
2942
+ * A-Component is a primary "extendable" object in the system
2943
+ * A unique combination of Components creates completely new functionality
2944
+ *
2945
+ * The most important thing is that A-Component is STATELESS, it means that it doesn't store any state in itself
2946
+ *
2947
+ *
2948
+ * [!] Every A-Component is a singleton, so if you need to create multiple instances of the same logic - use A-Container
2949
+ * [!] So one scope can have only one instance of the same A-Component
2950
+ * [!] Every A-Component can be extended by features and extensions
2951
+ * [!] ONLY A-Component can have A-Feature extensions
2952
+ *
2953
+ */
2954
+ declare class A_Component {
2955
+ /**
2956
+ * Calls the feature with the given name in the given scope
2957
+ *
2958
+ * [!] Note: This method creates a new instance of the feature every time it is called
2959
+ *
2960
+ * @param feature - the name of the feature to call
2961
+ * @param scope - the scope in which to call the feature
2962
+ * @returns - void
2963
+ */
2964
+ call(
2965
+ /**
2966
+ * Name of the feature to call
2967
+ */
2968
+ feature: string,
2969
+ /**
2970
+ * Scope in which the feature will be executed
2971
+ */
2972
+ scope?: A_Scope): Promise<void>;
2973
+ }
2974
+
2975
+ /**
2976
+ * Scope constructor type
2977
+ * Uses the generic type T to specify the type of the Scope
2978
+ */
2979
+ type A_TYPES__Scope_Constructor<T = A_Scope> = new (...args: any[]) => T;
2980
+ /**
2981
+ * Scope initialization type
2982
+ */
2983
+ type A_TYPES__Scope_Init<_ComponentType extends A_TYPES__Component_Constructor[] = A_TYPES__Component_Constructor[], _ErrorType extends A_TYPES__Error_Constructor[] = A_TYPES__Error_Constructor[], _EntityType extends A_TYPES__Entity_Constructor[] = A_TYPES__Entity_Constructor[], _FragmentType extends A_Fragment[] = A_Fragment[]> = {
2984
+ /**
2985
+ * Scope Name
2986
+ */
2987
+ name: string;
2988
+ /**
2989
+ * A list of Context Fragments available in the Scope
2990
+ */
2991
+ fragments: [..._FragmentType];
2992
+ /**
2993
+ * A set of Components available in the Scope
2994
+ */
2995
+ components: [..._ComponentType];
2996
+ /**
2997
+ * A set of Errors available in the Scope
2998
+ */
2999
+ errors: [..._ErrorType];
3000
+ /**
3001
+ * A set of Entities available in the Scope
3002
+ *
3003
+ */
3004
+ entities: [
3005
+ ..._EntityType,
3006
+ ...InstanceType<_EntityType[number]>[]
3007
+ ];
3008
+ };
3009
+ /**
3010
+ * Scope configuration type
3011
+ */
3012
+ type A_TYPES__ScopeConfig = {
3013
+ /**
3014
+ * Allows to define a parent to take dependencies from in case of the current scope does not have the required component
3015
+ */
3016
+ parent: A_Scope;
3017
+ };
3018
+ /**
3019
+ * Scope serialized type
3020
+ */
3021
+ type A_TYPES__Scope_Serialized = {};
3022
+ /**
3023
+ *
3024
+ */
3025
+ type A_TYPES__ScopeLinkedConstructors = A_TYPES__Container_Constructor | A_TYPES__Feature_Constructor;
3026
+ /**
3027
+ * A list of components that can have a scope associated with them
3028
+ */
3029
+ type A_TYPES__ScopeLinkedComponents = A_Container | A_Feature;
3030
+ /**
3031
+ * A list of components that can be resolved by a scope
3032
+ */
3033
+ type A_TYPES__ScopeResolvableComponents = A_Component | A_Fragment | A_Entity;
3034
+ /**
3035
+ * A list of components that are dependent on a scope and do not have their own scope
3036
+ */
3037
+ type A_TYPES_ScopeDependentComponents = A_Component | A_Entity | A_Fragment;
3038
+ /**
3039
+ * A list of components that are independent of a scope. They don't need a scope to be resolved
3040
+ * Those components haven't scope dependent features.
3041
+ */
3042
+ type A_TYPES_ScopeIndependentComponents = A_Error | A_Scope | A_Caller;
3043
+
3044
+ /**
3045
+ * Components that can have Meta associated with them
3046
+ */
3047
+ type A_TYPES__MetaLinkedComponents = A_Container | A_Component | A_Entity;
3048
+ /**
3049
+ * Constructors of components that can have Meta associated with them
3050
+ */
3051
+ type A_TYPES__MetaLinkedComponentConstructors = A_TYPES__Container_Constructor | A_TYPES__Component_Constructor | A_TYPES__Entity_Constructor;
3052
+
3053
+ declare class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
3054
+ /**
3055
+ * Allows to get all the injections for a given handler
3056
+ *
3057
+ * @param handler
3058
+ * @returns
3059
+ */
3060
+ injections(handler: string): A_TYPES__A_InjectDecorator_Meta;
3061
+ /**
3062
+ * Allows to get all the extensions for a given feature
3063
+ *
3064
+ * @param feature
3065
+ * @returns
3066
+ */
3067
+ extensions(feature: string): A_TYPES__ComponentMetaExtension[];
3068
+ /**
3069
+ * Returns all features defined in the Component
3070
+ *
3071
+ * @returns
3072
+ */
3073
+ features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
3074
+ /**
3075
+ * Returns a set of instructions to run proper methods in Component during A-Concept Stage
3076
+ *
3077
+ * @param stage
3078
+ * @returns
3079
+ */
3080
+ abstractions(abstraction: any): A_TYPES__ConceptAbstractionMeta[];
3081
+ }
3082
+
3083
+ declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
3084
+ /**
3085
+ * Allows to get all the injections for a given handler
3086
+ *
3087
+ * @param handler
3088
+ * @returns
3089
+ */
3090
+ injections(handler: string): A_TYPES__A_InjectDecorator_Meta;
3091
+ /**
3092
+ * Returns all features defined in the Container
3093
+ *
3094
+ * @returns
3095
+ */
3096
+ features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
3097
+ /**
3098
+ * Returns a set of instructions to run proper methods in Container during A-Concept Stage
3099
+ *
3100
+ * @param stage
3101
+ * @returns
3102
+ */
3103
+ abstractions(abstraction: A_TYPES__ConceptAbstractions): A_TYPES__ConceptAbstractionMeta[];
3104
+ /**
3105
+ * Allows to get all the extensions for a given feature
3106
+ *
3107
+ * @param feature
3108
+ * @returns
3109
+ */
3110
+ extensions(feature: string): A_TYPES__ContainerMetaExtension[];
3111
+ }
3112
+
3113
+ declare class A_EntityMeta extends A_Meta<A_TYPES__EntityMeta> {
3114
+ /**
3115
+ * Returns all features defined in the Container
3116
+ *
3117
+ * @returns
3118
+ */
3119
+ features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
3120
+ }
3121
+
3122
+ type A_TYPES__ContextEnvironment = 'server' | 'browser' | 'mobile' | 'desktop' | 'embedded' | 'unknown';
3123
+ type A_TYPES__FeatureExtendableMeta = A_ContainerMeta | A_ComponentMeta | A_EntityMeta;
3124
+
3125
+ declare class A_Context {
3126
+ /**
3127
+ * Default name of the application from environment variable A_CONCEPT_NAME
3128
+ *
3129
+ * [!] If environment variable is not set, it will default to 'a-concept'
3130
+ */
3131
+ static get concept(): string;
3132
+ /**
3133
+ * Root scope of the application from environment variable A_CONCEPT_ROOT_SCOPE
3134
+ *
3135
+ * [!] If environment variable is not set, it will default to 'root'
3136
+ */
3137
+ static get root(): A_Scope;
3138
+ /**
3139
+ * Environment the application is running in.
3140
+ * Can be either 'server' or 'browser'.
3141
+ * [!] Determined by checking if 'window' object is available.
3142
+ */
3143
+ static get environment(): A_TYPES__ContextEnvironment;
3144
+ /**
3145
+ * Singleton instance of the Context
3146
+ */
3147
+ private static _instance;
3148
+ /**
3149
+ * Root Scope of the Concept and Environment
3150
+ *
3151
+ * Root scope is the top-level scope that all other scopes inherit from.
3152
+ * It stores global configurations and settings and ALL SHAREABLE RESOURCES.
3153
+ *
3154
+ * [!] Root scope is created automatically when the Context is initialized.
3155
+ * [!] Root scope name can be configured using environment variable A_CONCEPT_ROOT_SCOPE
3156
+ */
3157
+ private _root;
3158
+ /**
3159
+ * A registry that keeps track of scopes for all components (Containers, Features, Commands)
3160
+ * Which can issue a scope allocation.
3161
+ */
3162
+ protected _registry: WeakMap<A_TYPES__ScopeLinkedComponents, A_Scope>;
3163
+ /**
3164
+ * This is a registry that stores an issuer of each scope allocation.
3165
+ * It helps to track which component (Container, Feature, Command) allocated a specific scope.
3166
+ */
3167
+ protected _scopeIssuers: WeakMap<A_Scope, A_TYPES__ScopeLinkedComponents>;
3168
+ /**
3169
+ * Stores a context associated with a specific component that depends on a scope.
3170
+ * uses for quick retrieval of the scope for the component.
3171
+ */
3172
+ protected _scopeStorage: WeakMap<A_TYPES_ScopeDependentComponents, A_Scope>;
3173
+ /**
3174
+ * Stores meta information for different component types by their constructors.
3175
+ * Meta provides to store extra information about the class behavior and configuration.
3176
+ */
3177
+ protected _metaStorage: Map<A_TYPES__MetaLinkedComponentConstructors, A_Meta>;
3178
+ /**
3179
+ * Private constructor to enforce singleton pattern.
3180
+ *
3181
+ * [!] This class should not be instantiated directly. Use A_Context.getInstance() instead.
3182
+ */
3183
+ private constructor();
3184
+ /**
3185
+ * Get the instance of the Namespace Provider.
3186
+ *
3187
+ * If the instance does not exist, it will be created.
3188
+ *
3189
+ * @returns
3190
+ */
3191
+ static getInstance(): A_Context;
3192
+ /**
3193
+ * Register method allows to register a component with a specific scope in the context.
3194
+ *
3195
+ * @param component - Component to register with a specific scope. Can be either A_Container, A_Feature.
3196
+ * @param scope - Scope to associate the component with.
3197
+ * @returns
3198
+ */
3199
+ static register(
3200
+ /**
3201
+ * Provide the scope that will be associated with the component.
3202
+ */
3203
+ scope: A_Scope,
3204
+ /**
3205
+ * Provide a component that needs to be registered with a specific scope.
3206
+ */
3207
+ component: A_TYPES_ScopeDependentComponents): A_Scope;
3208
+ /**
3209
+ * Deregister method allows to deregister a component from the context.
3210
+ *
3211
+ * @param component - Component to deregister from the context.
3212
+ */
3213
+ static deregister(
3214
+ /**
3215
+ * Provide a component that needs to be deregistered from the context.
3216
+ */
3217
+ component: A_TYPES_ScopeDependentComponents): void;
3218
+ /**
3219
+ * Allocate method instantiates a new scope for the given component and registers it in the context.
3220
+ * It bounds the component (Container, Feature) to a new scope that can be configured and used independently.
3221
+ *
3222
+ *
3223
+ * @param component - Component to allocate the scope for. Can be either A_Container, A_Feature.
3224
+ * @param importing - Configuration of the scope that will be created for the component.
3225
+ */
3226
+ static allocate(
3227
+ /**
3228
+ * Provide a component that needs a scope allocation.
3229
+ */
3230
+ component: A_TYPES__ScopeLinkedComponents): A_Scope;
3231
+ static allocate(
3232
+ /**
3233
+ * Provide a component that needs a scope allocation.
3234
+ */
3235
+ component: A_TYPES__ScopeLinkedComponents,
3236
+ /**
3237
+ * Provide the scope that will be used as a base for the new scope.
3238
+ */
3239
+ importing: A_Scope): A_Scope;
3240
+ static allocate(
3241
+ /**
3242
+ * Provide a component that needs a scope allocation.
3243
+ */
3244
+ component: A_TYPES__ScopeLinkedComponents,
3245
+ /**
3246
+ * Provide configuration for the scope that will be created for the component.
3247
+ */
3248
+ config: Partial<A_TYPES__Scope_Init & A_TYPES__ScopeConfig>): A_Scope;
3249
+ /**
3250
+ * Deallocate method removes the scope allocation for the given component from the context.
3251
+ *
3252
+ * @param component
3253
+ * @returns
3254
+ */
3255
+ static deallocate(
3256
+ /**
3257
+ * A Scope that needs to be deallocated.
3258
+ */
3259
+ scope: A_Scope): any;
3260
+ static deallocate(
3261
+ /**
3262
+ * Provide a component that needs to have its scope deallocated.
3263
+ */
3264
+ component: A_TYPES__ScopeLinkedComponents): any;
3265
+ /**
3266
+ * Get or Create Meta for the specific class or instance.
3267
+ * This method will return the existing meta if it exists, or create a new one if it doesn't.
3268
+ *
3269
+ * Meta object contains custom metadata based on the class type.
3270
+ *
3271
+ * @param container
3272
+ */
3273
+ static meta(
3274
+ /**
3275
+ * Get meta for the specific container class by constructor.
3276
+ */
3277
+ container: A_TYPES__Container_Constructor): A_ContainerMeta;
3278
+ static meta(
3279
+ /**
3280
+ * Get meta for the specific container instance.
3281
+ */
3282
+ container: A_Container): A_ContainerMeta;
3283
+ static meta(
3284
+ /**
3285
+ * Get meta for the specific entity class by constructor.
3286
+ */
3287
+ entity: A_TYPES__Entity_Constructor): A_EntityMeta;
3288
+ static meta(
3289
+ /**
3290
+ * Get meta for the specific entity instance.
3291
+ */
3292
+ entity: A_Entity): A_EntityMeta;
3293
+ static meta(
3294
+ /**
3295
+ * Get meta for the specific component class by constructor.
3296
+ */
3297
+ component: A_TYPES__Component_Constructor): A_ComponentMeta;
3298
+ static meta(
3299
+ /**
3300
+ * Get meta for the specific component instance.
3301
+ */
3302
+ component: A_Component): A_ComponentMeta;
3303
+ static meta(
3304
+ /**
3305
+ * Get meta for the specific component by its name.
3306
+ */
3307
+ component: string): A_ComponentMeta;
3308
+ static meta(
3309
+ /**
3310
+ * Get meta for the specific injectable target (class or instance).
3311
+ */
3312
+ target: A_TYPES__InjectableTargets): A_ComponentMeta;
3313
+ static meta<T extends Record<string, any>>(
3314
+ /**
3315
+ * Get meta for the specific class or instance
3316
+ */
3317
+ constructor: new (...args: any[]) => any): A_Meta<T>;
3318
+ /**
3319
+ *
3320
+ * This method allows to get the issuer of a specific scope.
3321
+ *
3322
+ * @param scope - Scope to get the issuer for.
3323
+ * @returns - Component that issued the scope.
3324
+ */
3325
+ static issuer(
3326
+ /**
3327
+ * Provide the scope to get its issuer.
3328
+ */
3329
+ scope: A_Scope): A_TYPES__ScopeLinkedComponents;
3330
+ /**
3331
+ * Get the scope of the specific class or instance.
3332
+ *
3333
+ * Every execution in Concept has its own scope.
3334
+ *
3335
+ * This method will return the scope of the specific class or instance.
3336
+ *
3337
+ * @param entity
3338
+ */
3339
+ static scope<T extends A_Entity>(
3340
+ /**
3341
+ * Provide an entity to get its scope.
3342
+ */
3343
+ entity: T): A_Scope;
3344
+ static scope<T extends A_Component>(
3345
+ /**
3346
+ * Provide a component to get its scope.
3347
+ */
3348
+ component: T): A_Scope;
3349
+ static scope<T extends A_Container>(
3350
+ /**
3351
+ * Provide a container to get its scope.
3352
+ */
3353
+ container: T): A_Scope;
3354
+ static scope<T extends A_Feature>(
3355
+ /**
3356
+ * Provide a feature to get its scope.
3357
+ */
3358
+ feature: T): A_Scope;
3359
+ static scope<T extends A_Fragment>(
3360
+ /**
3361
+ * Provide a fragment to get its scope.
3362
+ */
3363
+ fragment: T): A_Scope;
3364
+ /**
3365
+ * Returns a template of the feature that can be then used to create a new A-Feature Instance
3366
+ *
3367
+ * [!] Note: Steps/Stages included are fully dependent on the scope provided since it dictates which components are active and can provide extensions for the feature.
3368
+ *
3369
+ * @param name
3370
+ */
3371
+ static featureTemplate(
3372
+ /**
3373
+ * Provide the name of the feature to get the template for. Regular expressions are also supported to match multiple features.
3374
+ */
3375
+ name: string | RegExp,
3376
+ /**
3377
+ * Provide the component to get the feature template from.
3378
+ */
3379
+ component: A_TYPES__FeatureAvailableComponents,
3380
+ /**
3381
+ * Provide the scope that dictates which components are active and can provide extensions for the feature.
3382
+ */
3383
+ scope?: A_Scope): Array<A_TYPES__A_StageStep>;
3384
+ /**
3385
+ * Returns all extensions for the specific feature in the specific component within the provided scope.
3386
+ * Scope dictates which components are active and can provide extensions for the feature.
3387
+ *
3388
+ * [!] This method only returns extensions, not the base feature definition.
3389
+ *
3390
+ * @param scope
3391
+ * @returns
3392
+ */
3393
+ static featureExtensions(
3394
+ /**
3395
+ * Provide the name of the feature to get the template for. Regular expressions are also supported to match multiple features.
3396
+ */
3397
+ name: string | RegExp,
3398
+ /**
3399
+ * Provide the component to get the feature template from.
3400
+ */
3401
+ component: A_TYPES__FeatureAvailableComponents,
3402
+ /**
3403
+ * Provide the scope that dictates which components are active and can provide extensions for the feature.
3404
+ */
3405
+ scope: A_Scope): Array<A_TYPES__A_StageStep>;
3406
+ /**
3407
+ * method helps to filter steps in a way that only the most derived classes are kept.
3408
+ *
3409
+ * @param scope
3410
+ * @param items
3411
+ * @returns
3412
+ */
3413
+ private filterToMostDerived;
3414
+ /**
3415
+ * This method returns the feature template definition without any extensions.
3416
+ * It can be used to retrieve the base template for a feature before any modifications are applied.
3417
+ *
3418
+ * [!] This method does not consider extensions from other components.
3419
+ *
3420
+ * @param feature
3421
+ * @param component
3422
+ * @returns
3423
+ */
3424
+ static featureDefinition(
3425
+ /**
3426
+ * Name of the feature to get the template for.
3427
+ * Regular expressions are also supported to match multiple features.
3428
+ */
3429
+ feature: string | RegExp,
3430
+ /**
3431
+ * Component to get the feature template from.
3432
+ */
3433
+ component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
3434
+ /**
3435
+ * Returns a definition of the abstraction that can be then used to create a new A-Feature Instance
3436
+ *
3437
+ * [!] Note: Steps/Stages included are fully dependent on the scope provided since it dictates which components are active and can provide extensions for the abstraction.
3438
+ *
3439
+ * @param abstraction
3440
+ */
3441
+ static abstractionTemplate(
3442
+ /**
3443
+ * Provide the abstraction stage to get the definition for.
3444
+ */
3445
+ abstraction: A_TYPES__ConceptAbstractions,
3446
+ /**
3447
+ * Provide the component to get the abstraction definition from.
3448
+ */
3449
+ component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
3450
+ static abstractionExtensions(
3451
+ /**
3452
+ * Provide the abstraction name to get the definition for.
3453
+ */
3454
+ abstraction: A_TYPES__ConceptAbstractions,
3455
+ /**
3456
+ * Provide the component to get the abstraction definition from.
3457
+ */
3458
+ component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
3459
+ /**
3460
+ * Resets the Context to its initial state.
3461
+ */
3462
+ static reset(): void;
3463
+ /**
3464
+ * Type guard to check if the param is allowed for scope allocation.
3465
+ *
3466
+ * @param param
3467
+ * @returns
3468
+ */
3469
+ static isAllowedForScopeAllocation(param: any): param is A_TYPES__ScopeLinkedComponents;
3470
+ /**
3471
+ * Type guard to check if the param is allowed to be registered in the context.
3472
+ *
3473
+ * @param param
3474
+ * @returns
3475
+ */
3476
+ static isAllowedToBeRegistered(param: any): param is A_TYPES_ScopeDependentComponents;
3477
+ /**
3478
+ * Type guard to check if the param is allowed for meta storage.
3479
+ *
3480
+ * @param param
3481
+ * @returns
3482
+ */
3483
+ static isAllowedForMeta(param: any): param is A_TYPES__MetaLinkedComponents;
3484
+ /**
3485
+ * Type guard to check if the param is allowed for meta storage by constructor.
3486
+ *
3487
+ * @param param
3488
+ * @returns
3489
+ */
3490
+ static isAllowedForMetaConstructor(param: any): param is A_TYPES__MetaLinkedComponentConstructors;
3491
+ }
3492
+
3493
+ declare class A_ConceptMeta extends A_Meta<any> {
3494
+ private containers;
3495
+ constructor(containers: Array<A_Container>);
3496
+ }
3497
+
3498
+ declare class A_AbstractionError extends A_Error {
3499
+ /**
3500
+ * This error code indicates that there was an issue extending the abstraction execution
3501
+ */
3502
+ static readonly AbstractionExtensionError = "Unable to extend abstraction execution";
3503
+ }
3504
+
3505
+ declare class A_CallerError extends A_Error {
3506
+ /**
3507
+ * This error code indicates that there was an issue initializing the A-Caller
3508
+ */
3509
+ static readonly CallerInitializationError = "Unable to initialize A-Caller";
3510
+ }
3511
+
3512
+ declare class ASEID_Error extends A_Error {
3513
+ static readonly ASEIDInitializationError = "ASEID Initialization Error";
3514
+ static readonly ASEIDValidationError = "ASEID Validation Error";
3515
+ }
3516
+
3517
+ declare class A_ScopeError extends A_Error {
3518
+ static readonly InitializationError = "A-Scope Initialization Error";
3519
+ static readonly ConstructorError = "Unable to construct A-Scope instance";
3520
+ static readonly ResolutionError = "A-Scope Resolution Error";
3521
+ static readonly RegistrationError = "A-Scope Registration Error";
3522
+ static readonly CircularInheritanceError = "A-Scope Circular Inheritance Error";
3523
+ }
3524
+
3525
+ /**
3526
+ * A-Dependency require decorator return type
3527
+ */
3528
+ type A_TYPES__A_Dependency_RequireDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3529
+ /**
3530
+ * A-Dependency load decorator return type
3531
+ */
3532
+ type A_TYPES__A_Dependency_LoadDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3533
+ /**
3534
+ * A-Dependency default decorator return type
3535
+ */
3536
+ type A_TYPES__A_Dependency_DefaultDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3537
+
3538
+ /**
3539
+ * Should indicate which Default is required
3540
+ */
3541
+ declare function A_Dependency_Default(
3542
+ /**
3543
+ * Constructor Parameters that will be used to create the default instance
3544
+ */
3545
+ ...args: any[]): A_TYPES__A_Dependency_DefaultDecoratorReturn;
3546
+
3547
+ /**
3548
+ * Should indicate which Load is required
3549
+ */
3550
+ declare function A_Dependency_Load(
3551
+ /**
3552
+ * Path to load the dependency from
3553
+ */
3554
+ path: string): A_TYPES__A_Dependency_LoadDecoratorReturn;
3555
+
3556
+ /**
3557
+ * Should indicate which dependency is required
3558
+ */
3559
+ declare function A_Dependency_Require(): A_TYPES__A_Dependency_RequireDecoratorReturn;
3560
+
3561
+ declare class A_Dependency {
3562
+ /**
3563
+ * Allows to indicate which Injected parameter is required
3564
+ *
3565
+ * [!] If parameter marked as required is not provided, an error will be thrown
3566
+ *
3567
+ * @returns
3568
+ */
3569
+ static get Required(): typeof A_Dependency_Require;
3570
+ /**
3571
+ * Allows to indicate which dependency should be loaded from a specific path
3572
+ *
3573
+ * @returns
3574
+ */
3575
+ static get Loaded(): typeof A_Dependency_Load;
3576
+ /**
3577
+ * Allows to indicate which dependency default parameters should be used
3578
+ *
3579
+ * @returns
3580
+ */
3581
+ static get Default(): typeof A_Dependency_Default;
3582
+ }
3583
+
3584
+ declare class A_DependencyError extends A_Error {
3585
+ static readonly InvalidDependencyTarget = "Invalid Dependency Target";
3586
+ static readonly InvalidLoadTarget = "Invalid Load Target";
3587
+ static readonly InvalidLoadPath = "Invalid Load Path";
3588
+ static readonly InvalidDefaultTarget = "Invalid Default Target";
3589
+ }
3590
+
3591
+ /**
3592
+ * A-Inject decorator
3593
+ *
3594
+ * This Decorator allows to inject dependencies into the module like
3595
+ * - Namespaces
3596
+ * - Other Concepts
3597
+ * - or maybe Components
3598
+ *
3599
+ * @param params - see overloads
3600
+ * @returns - decorator function
3601
+ */
3602
+ declare function A_Inject<T extends A_Scope>(
3603
+ /***
3604
+ * Provide the Scope constructor that will be associated with the injection.
3605
+ *
3606
+ * [!] It returns an instance of the Scope where the Entity/Component/Container is defined.
3607
+ */
3608
+ scope: A_TYPES__Scope_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3609
+ declare function A_Inject<T extends A_Feature>(
3610
+ /**
3611
+ * Provide the Feature constructor that will be associated with the injection.
3612
+ *
3613
+ * [!] It returns an Instance of the Feature what is executed.
3614
+ */
3615
+ feature: A_TYPES__Feature_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3616
+ declare function A_Inject<T extends A_Component>(
3617
+ /**
3618
+ * Provide the Component constructor that will be associated with the injection.
3619
+ *
3620
+ * [!] It returns an Instance of the Component from current Scope or from Parent Scopes.
3621
+ */
3622
+ component: A_TYPES__Component_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3623
+ declare function A_Inject(
3624
+ /**
3625
+ * Provide the A_Caller constructor to inject the Caller instance
3626
+ *
3627
+ * [!] It returns initiator of the call, e.g. Container/Component/Command who called Feature
3628
+ */
3629
+ caller: typeof A_Caller): A_TYPES__A_InjectDecoratorReturn;
3630
+ declare function A_Inject<T extends A_Fragment>(
3631
+ /**
3632
+ * Provide the Fragment constructor to inject the Fragment instance
3633
+ *
3634
+ * [!] It returns the Fragment instance from current Scope or from Parent Scopes.
3635
+ */
3636
+ fragment: A_TYPES__Fragment_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3637
+ declare function A_Inject<T extends A_Entity>(
3638
+ /**
3639
+ * Provide the Entity constructor to inject the Entity instance
3640
+ *
3641
+ * [!] Note: It returns the Entity instance from current Scope or from Parent Scopes.
3642
+ * [!] Note: If instance has more than one Entity of the same type It returns FIRST found Entity
3643
+ * [!] Note: Use 'config' to specify to inject specific one or even Array of Entities
3644
+ */
3645
+ entity: A_TYPES__Entity_Constructor<T>,
3646
+ /**
3647
+ * Provide additional instructions on how to perform the injection
3648
+ *
3649
+ * [!] Default Pagination is 1 if it's necessary to get multiple Entities please customize it in the instructions
3650
+ */
3651
+ config?: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T>>): A_TYPES__A_InjectDecoratorReturn<T>;
3652
+ declare function A_Inject<T extends A_Component>(
3653
+ /**
3654
+ * Provide the name of Component constructor to inject the Component instance
3655
+ *
3656
+ * [!] You can use both customized one or original depending on your overriding strategy
3657
+ */
3658
+ ctor: string): A_TYPES__A_InjectDecoratorReturn;
3659
+
3660
+ declare class A_CommonHelper {
3661
+ /**
3662
+ * A simple promise that resolves immediately.
3663
+ * Can be used in async functions to create a resolved promise.
3664
+ */
3665
+ static resolve(): Promise<void>;
3666
+ /**
3667
+ * Check if a class is inherited from another class
3668
+ *
3669
+ * @param childClass
3670
+ * @param parentClass
3671
+ * @returns
3672
+ */
3673
+ static isInheritedFrom(childClass: any, parentClass: any): boolean;
3674
+ /**
3675
+ * Omit properties from an object or array with nested objects
3676
+ *
3677
+ * @param input
3678
+ * @param paths
3679
+ * @returns
3680
+ */
3681
+ static omitProperties<T, S extends string>(input: T, paths: string[]): Omit<T, S>;
3682
+ static isObject(item: unknown): item is Record<string, any>;
3683
+ static deepMerge<T = any>(target: any, source: any, visited?: Map<any, any>): T;
3684
+ static deepClone<T>(target: T): T;
3685
+ static deepCloneAndMerge<T>(target: A_TYPES__DeepPartial<T>, source: T): T;
3686
+ /**
3687
+ * Get a readable name for a component (string, class, function, React element, instance, etc.)
3688
+ *
3689
+ * Covers:
3690
+ * - string tags ("div")
3691
+ * - symbols (Symbol.for('xxx'))
3692
+ * - functions and classes (with name or displayName)
3693
+ * - React elements (object with `type`)
3694
+ * - component instances (constructor.name)
3695
+ * - objects with custom toString returning meaningful info
3696
+ *
3697
+ * Falls back to sensible defaults ("Unknown" / "Anonymous").
3698
+ */
3699
+ static getComponentName(component: any): string;
3700
+ }
3701
+
3702
+ /**
3703
+ * A_FormatterHelper
3704
+ *
3705
+ * Helper class for formatting strings into different cases.
3706
+ */
3707
+ declare class A_FormatterHelper {
3708
+ /**
3709
+ * Convert string to UPPER_SNAKE_CASE
3710
+ *
3711
+ * @param str
3712
+ * @returns
3713
+ */
3714
+ static toUpperSnakeCase(str: string): string;
3715
+ /**
3716
+ * Convert string to camelCase
3717
+ *
3718
+ * @param str
3719
+ * @returns
3720
+ */
3721
+ static toCamelCase(str: string): string;
3722
+ /**
3723
+ * Convert string to PascalCase
3724
+ *
3725
+ * @param str
3726
+ * @returns
3727
+ */
3728
+ static toPascalCase(str: string): string;
3729
+ /**
3730
+ * Convert string to kebab-case
3731
+ *
3732
+ * @param str
3733
+ * @returns
3734
+ */
3735
+ static toKebabCase(str: string): string;
3736
+ }
3737
+
3738
+ type A_ID_TYPES__TimeId_Parts = {
3739
+ timestamp: Date;
3740
+ random: string;
3741
+ };
3742
+ declare class A_IdentityHelper {
3743
+ /**
3744
+ * Generates a short, time-based unique ID.
3745
+ * Encodes current time (ms since epoch) and random bits in base36.
3746
+ * Example: "mb4f1g-7f9a1c"
3747
+ */
3748
+ static generateTimeId(parts?: A_ID_TYPES__TimeId_Parts): string;
3749
+ /**
3750
+ * Parses a short ID back into its parts.
3751
+ * Returns an object with the original timestamp (as Date) and random string.
3752
+ */
3753
+ static parseTimeId(id: string): A_ID_TYPES__TimeId_Parts;
3754
+ /**
3755
+ * Format a number with leading zeros to a fixed length
3756
+ *
3757
+ * @param number
3758
+ * @param maxZeros
3759
+ * @returns
3760
+ */
3761
+ static formatWithLeadingZeros(number: any, maxZeros?: number): string;
3762
+ /**
3763
+ * Remove leading zeros from a formatted number
3764
+ */
3765
+ static removeLeadingZeros(formattedNumber: any): string;
3766
+ }
3767
+
3768
+ declare class A_StepManagerError extends A_Error {
3769
+ static readonly CircularDependencyError = "A-StepManager Circular Dependency Error";
3770
+ }
3771
+
3772
+ declare class A_TypeGuards {
3773
+ /**
3774
+ * Check if value is a string
3775
+ *
3776
+ * @param value
3777
+ * @returns
3778
+ */
3779
+ static isString(value: any): value is string;
3780
+ /**
3781
+ * Check if value is a number
3782
+ *
3783
+ * @param value
3784
+ * @returns
3785
+ */
3786
+ static isNumber(value: any): value is number;
3787
+ /**
3788
+ * Check if value is a boolean
3789
+ *
3790
+ * @param value
3791
+ * @returns
3792
+ */
3793
+ static isBoolean(value: any): value is boolean;
3794
+ /**
3795
+ * Check if value is an array
3796
+ *
3797
+ * @param value
3798
+ * @returns
3799
+ */
3800
+ static isArray(value: any): value is Array<any>;
3801
+ /**
3802
+ * Check if value is an object
3803
+ *
3804
+ * @param value
3805
+ * @returns
3806
+ */
3807
+ static isObject<T extends Object = Object>(value: any): value is T;
3808
+ /**
3809
+ * Check if value is a function
3810
+ *
3811
+ * @param value
3812
+ * @returns
3813
+ */
3814
+ static isFunction(value: any): value is Function;
3815
+ static isUndefined(value: any): value is undefined;
3816
+ static isRegExp(value: any): value is RegExp;
3817
+ /**
3818
+ * Type guard to check if the constructor is of type A_Container
3819
+ *
3820
+ * @param ctor
3821
+ * @returns
3822
+ */
3823
+ static isContainerConstructor(ctor: any): ctor is A_TYPES__Container_Constructor;
3824
+ /**
3825
+ * Type guard to check if the constructor is of type A_Component
3826
+ *
3827
+ * @param ctor
3828
+ * @returns
3829
+ */
3830
+ static isComponentConstructor(ctor: any): ctor is A_TYPES__Component_Constructor;
3831
+ /**
3832
+ * Type guard to check if the constructor is of type A_Fragment
3833
+ *
3834
+ * @param ctor
3835
+ * @returns
3836
+ */
3837
+ static isFragmentConstructor(ctor: any): ctor is A_TYPES__Fragment_Constructor;
3838
+ /**
3839
+ * Type guard to check if the constructor is of type A_Entity
3840
+ *
3841
+ * @param ctor
3842
+ * @returns
3843
+ */
3844
+ static isEntityConstructor(ctor: any): ctor is A_TYPES__Entity_Constructor;
3845
+ /**
3846
+ * Type guard to check if the constructor is of type A_Scope
3847
+ *
3848
+ * @param ctor
3849
+ * @returns
3850
+ */
3851
+ static isScopeConstructor(ctor: any): ctor is A_TYPES__Scope_Constructor;
3852
+ /**
3853
+ * Type guard to check if the constructor is of type A_Scope
3854
+ *
3855
+ * @param ctor
3856
+ * @returns
3857
+ */
3858
+ static isErrorConstructor(ctor: any): ctor is A_TYPES__Error_Constructor;
3859
+ /**
3860
+ * Type guard to check if the constructor is of type A_Feature
3861
+ *
3862
+ * @param ctor
3863
+ * @returns
3864
+ */
3865
+ static isFeatureConstructor(ctor: any): ctor is A_TYPES__Feature_Constructor;
3866
+ /**
3867
+ * Type guard to check if the constructor is of type A_Caller
3868
+ *
3869
+ * @param ctor
3870
+ * @returns
3871
+ */
3872
+ static isCallerConstructor(ctor: any): ctor is A_TYPES__Caller_Constructor;
3873
+ /**
3874
+ * Type guard to check if the instance is of type A_Container
3875
+ *
3876
+ * @param instance
3877
+ * @returns
3878
+ */
3879
+ static isContainerInstance(instance: any): instance is A_Container;
3880
+ /**
3881
+ * Type guard to check if the instance is of type A_Component
3882
+ *
3883
+ * @param instance
3884
+ * @returns
3885
+ */
3886
+ static isComponentInstance(instance: any): instance is A_Component;
3887
+ /**
3888
+ * Type guard to check if the instance is of type A_Feature
3889
+ *
3890
+ * @param instance
3891
+ * @returns
3892
+ */
3893
+ static isFeatureInstance(instance: any): instance is A_Feature;
3894
+ /**
3895
+ * Type guard to check if the instance is of type A_Fragment
3896
+ *
3897
+ * @param instance
3898
+ * @returns
3899
+ */
3900
+ static isFragmentInstance(instance: any): instance is A_Fragment;
3901
+ /**
3902
+ * Type guard to check if the instance is of type A_Entity
3903
+ *
3904
+ * @param instance
3905
+ * @returns
3906
+ */
3907
+ static isEntityInstance(instance: any): instance is A_Entity;
3908
+ /**
3909
+ * Type guard to check if the instance is of type A_Scope
3910
+ *
3911
+ * @param instance
3912
+ * @returns
3913
+ */
3914
+ static isScopeInstance(instance: any): instance is A_Scope;
3915
+ /**
3916
+ * Type guard to check if the instance is of type A_Error
3917
+ *
3918
+ * @param instance
3919
+ * @returns
3920
+ */
3921
+ static isErrorInstance(instance: any): instance is A_Error;
3922
+ /**
3923
+ * Type guard to check if the instance is of type A_ComponentMeta
3924
+ *
3925
+ * @param instance
3926
+ * @returns
3927
+ */
3928
+ static isComponentMetaInstance(instance: any): instance is A_ComponentMeta;
3929
+ /**
3930
+ * Type guard to check if the instance is of type A_ContainerMeta
3931
+ *
3932
+ * @param instance
3933
+ * @returns
3934
+ */
3935
+ static isContainerMetaInstance(instance: any): instance is A_ContainerMeta;
3936
+ /**
3937
+ * Type guard to check if the instance is of type A_EntityMeta
3938
+ *
3939
+ * @param instance
3940
+ * @returns
3941
+ */
3942
+ static isEntityMetaInstance(instance: any): instance is A_EntityMeta;
3943
+ static isConstructorAllowedForScopeAllocation(target: any): target is A_TYPES__ScopeLinkedConstructors;
3944
+ static isInstanceAllowedForScopeAllocation(target: any): target is A_TYPES__ScopeLinkedComponents;
3945
+ static isConstructorAvailableForAbstraction(target: any): target is A_TYPES__AbstractionAvailableComponents;
3946
+ static isTargetAvailableForInjection(target: any): target is A_TYPES__InjectableTargets;
3947
+ static isAllowedForFeatureCall(param: any): param is A_TYPES__FeatureAvailableComponents;
3948
+ static isAllowedForFeatureDefinition(param: any): param is A_TYPES__FeatureAvailableComponents;
3949
+ static isAllowedForFeatureExtension(param: any): param is A_TYPES__FeatureExtendDecoratorTarget;
3950
+ static isAllowedForAbstractionDefinition(param: any): param is A_TYPES__AbstractionAvailableComponents;
3951
+ static isAllowedForDependencyDefaultCreation(param: any): param is A_TYPES__Entity_Constructor | A_TYPES__Component_Constructor;
3952
+ /**
3953
+ * Allows to check if the provided param is of constructor type.
3954
+ *
3955
+ * @param param
3956
+ * @returns
3957
+ */
3958
+ static isConstructorType<T extends A_TYPES__Error_Init>(param: any): param is T;
3959
+ }
3960
+
3961
+ export { ASEID, ASEID_Error, A_Abstraction, A_AbstractionError, A_Abstraction_Extend, A_CONSTANTS__DEFAULT_ENV_VARIABLES, A_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, A_Caller, A_CallerError, A_CommonHelper, A_Component, A_ComponentMeta, A_Concept, A_ConceptMeta, A_Container, A_ContainerMeta, A_Context, A_Dependency, A_DependencyError, A_Dependency_Default, A_Dependency_Load, A_Dependency_Require, A_Entity, A_Error, A_Feature, A_FeatureError, A_Feature_Define, A_Feature_Extend, A_FormatterHelper, A_Fragment, type A_ID_TYPES__TimeId_Parts, A_IdentityHelper, A_Inject, A_Meta, A_Scope, A_ScopeError, A_Stage, A_StageError, A_StepManagerError, A_StepsManager, type A_TYPES_ScopeDependentComponents, type A_TYPES_ScopeIndependentComponents, type A_TYPES_StageExecutionBehavior, type A_TYPES__ASEID_Constructor, type A_TYPES__ASEID_ConstructorConfig, type A_TYPES__ASEID_JSON, type A_TYPES__A_Dependency_DefaultDecoratorReturn, type A_TYPES__A_Dependency_LoadDecoratorReturn, type A_TYPES__A_Dependency_RequireDecoratorReturn, type A_TYPES__A_InjectDecoratorDescriptor, type A_TYPES__A_InjectDecoratorReturn, type A_TYPES__A_InjectDecorator_EntityInjectionInstructions, type A_TYPES__A_InjectDecorator_EntityInjectionPagination, type A_TYPES__A_InjectDecorator_EntityInjectionQuery, type A_TYPES__A_InjectDecorator_Meta, type A_TYPES__A_StageStep, type A_TYPES__A_StageStepProcessingExtraParams, A_TYPES__A_Stage_Status, type A_TYPES__AbstractionAvailableComponents, type A_TYPES__AbstractionDecoratorConfig, type A_TYPES__AbstractionDecoratorDescriptor, type A_TYPES__Abstraction_Constructor, type A_TYPES__Abstraction_Init, type A_TYPES__Abstraction_Serialized, type A_TYPES__CallerComponent, type A_TYPES__Caller_Constructor, type A_TYPES__Caller_Init, type A_TYPES__Caller_Serialized, type A_TYPES__ComponentMeta, type A_TYPES__ComponentMetaExtension, type A_TYPES__Component_Constructor, type A_TYPES__Component_Init, type A_TYPES__Component_Serialized, type A_TYPES__ConceptAbstraction, type A_TYPES__ConceptAbstractionMeta, type A_TYPES__ConceptENVVariables, type A_TYPES__Concept_Constructor, type A_TYPES__Concept_Init, type A_TYPES__Concept_Serialized, type A_TYPES__ContainerMeta, type A_TYPES__ContainerMetaExtension, type A_TYPES__Container_Constructor, type A_TYPES__Container_Init, type A_TYPES__Container_Serialized, type A_TYPES__ContextEnvironment, type A_TYPES__DeepPartial, type A_TYPES__Dictionary, type A_TYPES__EntityMeta, type A_TYPES__Entity_Constructor, type A_TYPES__Entity_Init, type A_TYPES__Entity_Serialized, type A_TYPES__Error_Constructor, type A_TYPES__Error_Init, type A_TYPES__Error_Serialized, type A_TYPES__ExtractNested, type A_TYPES__ExtractProperties, type A_TYPES__FeatureAvailableComponents, type A_TYPES__FeatureAvailableConstructors, type A_TYPES__FeatureDefineDecoratorConfig, type A_TYPES__FeatureDefineDecoratorDescriptor, type A_TYPES__FeatureDefineDecoratorMeta, type A_TYPES__FeatureDefineDecoratorTarget, type A_TYPES__FeatureDefineDecoratorTemplateItem, type A_TYPES__FeatureExtendDecoratorConfig, type A_TYPES__FeatureExtendDecoratorDescriptor, type A_TYPES__FeatureExtendDecoratorMeta, type A_TYPES__FeatureExtendDecoratorScopeConfig, type A_TYPES__FeatureExtendDecoratorScopeItem, type A_TYPES__FeatureExtendDecoratorTarget, type A_TYPES__FeatureExtendableMeta, A_TYPES__FeatureState, type A_TYPES__Feature_Constructor, type A_TYPES__Feature_Init, type A_TYPES__Feature_InitWithComponent, type A_TYPES__Feature_InitWithTemplate, type A_TYPES__Feature_Serialized, type A_TYPES__Fragment_Constructor, type A_TYPES__Fragment_Init, type A_TYPES__Fragment_Serialized, type A_TYPES__IEntity, type A_TYPES__InjectableConstructors, type A_TYPES__InjectableTargets, type A_TYPES__MetaLinkedComponentConstructors, type A_TYPES__MetaLinkedComponents, type A_TYPES__NonObjectPaths, type A_TYPES__ObjectKeyEnum, type A_TYPES__Paths, type A_TYPES__PathsToObject, type A_TYPES__Required, type A_TYPES__ScopeConfig, type A_TYPES__ScopeLinkedComponents, type A_TYPES__ScopeLinkedConstructors, type A_TYPES__ScopeResolvableComponents, type A_TYPES__Scope_Constructor, type A_TYPES__Scope_Init, type A_TYPES__Scope_Serialized, type A_TYPES__Stage_Serialized, type A_TYPES__UnionToIntersection, A_TypeGuards };