@adaas/a-concept 0.1.23 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/index.cjs +3 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.mts +3952 -0
  4. package/dist/index.d.ts +3952 -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 +18 -13
  9. package/src/global/A-Component/A-Component.meta.ts +3 -2
  10. package/src/global/A-Container/A-Container.meta.ts +5 -8
  11. package/src/global/A-Context/A-Context.class.ts +81 -7
  12. package/src/global/A-Context/A-Context.error.ts +4 -0
  13. package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
  14. package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
  15. package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
  16. package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
  17. package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
  18. package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
  19. package/src/global/A-Entity/A-Entity.class.ts +2 -1
  20. package/src/global/A-Feature/A-Feature-Define.decorator.ts +7 -4
  21. package/src/global/A-Feature/A-Feature-Extend.decorator.ts +23 -17
  22. package/src/global/A-Feature/A-Feature.class.ts +12 -1
  23. package/src/global/A-Feature/A-Feature.types.ts +33 -8
  24. package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
  25. package/src/global/A-Inject/A-Inject.types.ts +5 -3
  26. package/src/global/A-Scope/A-Scope.class.ts +85 -57
  27. package/src/global/A-Stage/A-Stage.class.ts +22 -2
  28. package/src/global/A-Stage/A-Stage.error.ts +2 -0
  29. package/src/global/A-Stage/A-Stage.types.ts +7 -2
  30. package/src/global/A-StepManager/A-StepManager.class.ts +19 -13
  31. package/src/helpers/A_Common.helper.ts +101 -0
  32. package/src/helpers/A_TypeGuards.helper.ts +8 -0
  33. package/src/index.ts +88 -0
  34. package/tests/A-Component.test.ts +1 -1
  35. package/tests/A-Concept.test.ts +58 -10
  36. package/tests/A-Dependency.test.ts +93 -0
  37. package/tests/A-Feature.test.ts +11 -11
  38. package/tests/A-Scope.test.ts +10 -10
  39. package/tests/A-StepManager.test.ts +60 -11
  40. package/tsconfig.json +2 -2
  41. package/tsup.config.ts +32 -0
  42. package/dist/index.js +0 -112
  43. package/dist/index.js.map +0 -1
  44. package/dist/src/constants/env.constants.d.ts +0 -33
  45. package/dist/src/constants/env.constants.js +0 -47
  46. package/dist/src/constants/env.constants.js.map +0 -1
  47. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
  48. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -89
  49. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
  50. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
  51. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
  52. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
  53. package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
  54. package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
  55. package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
  56. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
  57. package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
  58. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
  59. package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
  60. package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
  61. package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
  62. package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
  63. package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
  64. package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
  65. package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
  66. package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
  67. package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
  68. package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
  69. package/dist/src/global/A-Component/A-Component.class.js +0 -56
  70. package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
  71. package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
  72. package/dist/src/global/A-Component/A-Component.constants.js +0 -11
  73. package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
  74. package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
  75. package/dist/src/global/A-Component/A-Component.meta.js +0 -77
  76. package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
  77. package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
  78. package/dist/src/global/A-Component/A-Component.types.js +0 -4
  79. package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
  80. package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
  81. package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
  82. package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
  83. package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
  84. package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
  85. package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
  86. package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
  87. package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
  88. package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
  89. package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
  90. package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
  91. package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
  92. package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
  93. package/dist/src/global/A-Container/A-Container.class.js +0 -78
  94. package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
  95. package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
  96. package/dist/src/global/A-Container/A-Container.constants.js +0 -11
  97. package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
  98. package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
  99. package/dist/src/global/A-Container/A-Container.meta.js +0 -83
  100. package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
  101. package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
  102. package/dist/src/global/A-Container/A-Container.types.js +0 -4
  103. package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
  104. package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
  105. package/dist/src/global/A-Context/A-Context.class.js +0 -603
  106. package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
  107. package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
  108. package/dist/src/global/A-Context/A-Context.error.js +0 -25
  109. package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
  110. package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
  111. package/dist/src/global/A-Context/A-Context.types.js +0 -3
  112. package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
  113. package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
  114. package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
  115. package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
  116. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
  117. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
  118. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
  119. package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
  120. package/dist/src/global/A-Entity/A-Entity.class.js +0 -281
  121. package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
  122. package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
  123. package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
  124. package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
  125. package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
  126. package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
  127. package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
  128. package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
  129. package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
  130. package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
  131. package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
  132. package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
  133. package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
  134. package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
  135. package/dist/src/global/A-Error/A_Error.class.js +0 -296
  136. package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
  137. package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
  138. package/dist/src/global/A-Error/A_Error.constants.js +0 -9
  139. package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
  140. package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
  141. package/dist/src/global/A-Error/A_Error.types.js +0 -3
  142. package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
  143. package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
  144. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
  145. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
  146. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
  147. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -119
  148. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
  149. package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
  150. package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
  151. package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
  152. package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
  153. package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
  154. package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
  155. package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -310
  156. package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
  157. package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
  158. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
  159. package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
  160. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
  161. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
  162. package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
  163. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
  164. package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
  165. package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
  166. package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
  167. package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
  168. package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
  169. package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
  170. package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
  171. package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
  172. package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
  173. package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
  174. package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
  175. package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
  176. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
  177. package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
  178. package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
  179. package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
  180. package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
  181. package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
  182. package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
  183. package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
  184. package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
  185. package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
  186. package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
  187. package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
  188. package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
  189. package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
  190. package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
  191. package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
  192. package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
  193. package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
  194. package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -97
  195. package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
  196. package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
  197. package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
  198. package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -111
  199. package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
  200. package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
  201. package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
  202. package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
  203. package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
  204. package/dist/src/global/ASEID/ASEID.class.js +0 -167
  205. package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
  206. package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
  207. package/dist/src/global/ASEID/ASEID.constants.js +0 -2
  208. package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
  209. package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
  210. package/dist/src/global/ASEID/ASEID.error.js +0 -10
  211. package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
  212. package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
  213. package/dist/src/global/ASEID/ASEID.types.js +0 -5
  214. package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
  215. package/dist/src/helpers/A_Common.helper.d.ts +0 -28
  216. package/dist/src/helpers/A_Common.helper.js +0 -170
  217. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  218. package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
  219. package/dist/src/helpers/A_Formatter.helper.js +0 -62
  220. package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
  221. package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
  222. package/dist/src/helpers/A_Identity.helper.js +0 -43
  223. package/dist/src/helpers/A_Identity.helper.js.map +0 -1
  224. package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
  225. package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
  226. package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
  227. package/dist/src/types/A_Common.types.d.ts +0 -36
  228. package/dist/src/types/A_Common.types.js +0 -3
  229. package/dist/src/types/A_Common.types.js.map +0 -1
  230. package/index.ts +0 -81
  231. package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
  232. package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
  233. package/trace-require.js +0 -46
  234. package/tsconfig.build.json +0 -58
package/dist/index.d.ts CHANGED
@@ -1,50 +1,3952 @@
1
- export * from './src/constants/env.constants';
2
- export * from './src/types/A_Common.types';
3
- export { A_Context } from './src/global/A-Context/A-Context.class';
4
- export * from './src/global/A-Context/A-Context.types';
5
- export { A_Concept } from './src/global/A-Concept/A-Concept.class';
6
- export { A_ConceptMeta } from './src/global/A-Concept/A-Concept.meta';
7
- export * from './src/global/A-Concept/A-Concept.types';
8
- export { A_Container } from './src/global/A-Container/A-Container.class';
9
- export { A_ContainerMeta } from './src/global/A-Container/A-Container.meta';
10
- export * from './src/global/A-Container/A-Container.class';
11
- export { A_Component } from './src/global/A-Component/A-Component.class';
12
- export { A_ComponentMeta } from './src/global/A-Component/A-Component.meta';
13
- export * from './src/global/A-Component/A-Component.types';
14
- export { A_Entity } from './src/global/A-Entity/A-Entity.class';
15
- export * from './src/global/A-Entity/A-Entity.types';
16
- export { A_Abstraction } from './src/global/A-Abstraction/A-Abstraction.class';
17
- export { A_AbstractionError } from './src/global/A-Abstraction/A-Abstraction.error';
18
- export * from './src/global/A-Abstraction/A-Abstraction.types';
19
- export { A_Caller } from './src/global/A-Caller/A_Caller.class';
20
- export { A_CallerError } from './src/global/A-Caller/A_Caller.error';
21
- export * from './src/global/A-Caller/A_Caller.types';
22
- export { A_Error } from './src/global/A-Error/A_Error.class';
23
- export * from './src/global/A-Error/A_Error.types';
24
- export { ASEID } from './src/global/ASEID/ASEID.class';
25
- export { ASEID_Error } from './src/global/ASEID/ASEID.error';
26
- export * from './src/global/ASEID/ASEID.types';
27
- export { A_Feature } from './src/global/A-Feature/A-Feature.class';
28
- export { A_FeatureError } from './src/global/A-Feature/A-Feature.error';
29
- export * from './src/global/A-Feature/A-Feature.types';
30
- export { A_Stage } from './src/global/A-Stage/A-Stage.class';
31
- export { A_StageError } from './src/global/A-Stage/A-Stage.error';
32
- export * from './src/global/A-Stage/A-Stage.types';
33
- export { A_Scope } from './src/global/A-Scope/A-Scope.class';
34
- export { A_ScopeError } from './src/global/A-Scope/A-Scope.error';
35
- export * from './src/global/A-Scope/A-Scope.types';
36
- export { A_Meta } from './src/global/A-Meta/A-Meta.class';
37
- export * from './src/global/A-Meta/A-Meta.types';
38
- export { A_Fragment } from './src/global/A-Fragment/A-Fragment.class';
39
- export * from './src/global/A-Fragment/A-Fragment.types';
40
- export { A_Inject } from './src/global/A-Inject/A-Inject.decorator';
41
- export * from './src/global/A-Inject/A-Inject.types';
42
- export { A_Feature_Define } from './src/global/A-Feature/A-Feature-Define.decorator';
43
- export { A_Feature_Extend } from './src/global/A-Feature/A-Feature-Extend.decorator';
44
- export { A_Abstraction_Extend } from './src/global/A-Abstraction/A-Abstraction-Extend.decorator';
45
- export { A_CommonHelper } from './src/helpers/A_Common.helper';
46
- export { A_FormatterHelper } from './src/helpers/A_Formatter.helper';
47
- export { A_IdentityHelper, A_ID_TYPES__TimeId_Parts } from './src/helpers/A_Identity.helper';
48
- export { A_StepsManager } from './src/global/A-StepManager/A-StepManager.class';
49
- export { A_StepManagerError } from './src/global/A-StepManager/A-StepManager.error';
50
- export { A_TypeGuards } from './src/helpers/A_TypeGuards.helper';
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
+ * Meta information stored in each Container
1822
+ */
1823
+ type A_TYPES__ContainerMeta = {
1824
+ /**
1825
+ * Extensions applied to the component per handler
1826
+ */
1827
+ [A_TYPES__ContainerMetaKey.EXTENSIONS]: A_Meta<{
1828
+ /**
1829
+ * Where Key the regexp for what to apply the extension
1830
+ * A set of container names or a wildcard, or a regexp
1831
+ *
1832
+ *
1833
+ * Where value is the extension instructions
1834
+ */
1835
+ [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
1836
+ }>;
1837
+ [A_TYPES__ContainerMetaKey.FEATURES]: A_Meta<{
1838
+ /**
1839
+ * Where Key is the name of the feature
1840
+ *
1841
+ * Where value is the list of features
1842
+ */
1843
+ [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
1844
+ }>;
1845
+ [A_TYPES__ContainerMetaKey.ABSTRACTIONS]: A_Meta<{
1846
+ /**
1847
+ * Where Key the regexp for what to apply the extension
1848
+ * A set of container names or a wildcard, or a regexp
1849
+ *
1850
+ *
1851
+ * Where value is the extension instructions
1852
+ */
1853
+ [Key: string]: A_TYPES__ConceptAbstraction[];
1854
+ }>;
1855
+ [A_TYPES__ContainerMetaKey.INJECTIONS]: A_Meta<{
1856
+ /**
1857
+ * Where Key is the name of the injection
1858
+ *
1859
+ * Where value is the list of injections
1860
+ */
1861
+ [Key: string]: A_TYPES__A_InjectDecorator_Meta;
1862
+ }>;
1863
+ };
1864
+ type A_TYPES__ContainerMetaExtension = A_TYPES__FeatureExtendDecoratorMeta;
1865
+
1866
+ declare class A_Container {
1867
+ /**
1868
+ * Configuration of the container that will be used to run it.
1869
+ */
1870
+ protected readonly config: Partial<A_TYPES__Container_Init>;
1871
+ /**
1872
+ * Name of the container
1873
+ */
1874
+ get name(): string;
1875
+ /**
1876
+ * Returns the scope where the container is registered
1877
+ */
1878
+ get scope(): A_Scope;
1879
+ /**
1880
+ * This class should combine Components to achieve the goal withing Concept
1881
+ *
1882
+ * Container is a direct container that should be "run" to make Concept work.
1883
+ * So because of that Container can be:
1884
+ * - HTTP Server
1885
+ * - BASH Script
1886
+ * - Database Connection
1887
+ * - Microservice
1888
+ * - etc.
1889
+ *
1890
+ * @param config - Configuration of the container that will be used to run it.
1891
+ */
1892
+ constructor(
1893
+ /**
1894
+ * Configuration of the container that will be used to run it.
1895
+ */
1896
+ config?: Partial<A_TYPES__Container_Init>);
1897
+ /**
1898
+ * Calls the feature with the given name in the given scope
1899
+ *
1900
+ * [!] Note: This method creates a new instance of the feature every time it is called
1901
+ *
1902
+ * @param feature - the name of the feature to call
1903
+ * @param scope - the scope in which to call the feature
1904
+ * @returns - void
1905
+ */
1906
+ call(
1907
+ /**
1908
+ * Name of the feature to call
1909
+ */
1910
+ feature: string,
1911
+ /**
1912
+ * scope in which the feature will be executed
1913
+ */
1914
+ scope?: A_Scope): Promise<void>;
1915
+ }
1916
+
1917
+ declare enum A_TYPES__ConceptAbstractions {
1918
+ /**
1919
+ * Run the concept.
1920
+ */
1921
+ Run = "run",
1922
+ /**
1923
+ * Build the concept.
1924
+ */
1925
+ Build = "build",
1926
+ /**
1927
+ * Publish the concept.
1928
+ */
1929
+ Publish = "publish",
1930
+ /**
1931
+ * Deploy the concept.
1932
+ */
1933
+ Deploy = "deploy",
1934
+ /**
1935
+ * Load the concept.
1936
+ */
1937
+ Load = "load",
1938
+ /**
1939
+ * Start the concept.
1940
+ */
1941
+ Start = "start",
1942
+ /**
1943
+ * Stop the concept.
1944
+ */
1945
+ Stop = "stop"
1946
+ }
1947
+
1948
+ /**
1949
+ * A-Abstraction Extend decorator allows to extends behavior of each concept abstraction execution.
1950
+ * In case some components or containers requires to extend the behavior of the abstraction like 'start', 'build' or 'deploy'
1951
+ * for example, this decorator allows to do so.
1952
+ *
1953
+ * @param name - abstraction name
1954
+ * @param config - configuration of the abstraction extension
1955
+ * @returns
1956
+ */
1957
+ declare function A_Abstraction_Extend(
1958
+ /**
1959
+ * Name of the Concept Abstraction to extend
1960
+ */
1961
+ name: A_TYPES__ConceptAbstractions,
1962
+ /**
1963
+ * Configuration of the Abstraction Extension
1964
+ *
1965
+ */
1966
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
1967
+
1968
+ declare class A_Abstraction {
1969
+ /**
1970
+ * The name of the Abstraction e.g. 'deploy', 'start', 'test', etc.
1971
+ */
1972
+ protected _name: A_TYPES__ConceptAbstractions;
1973
+ /**
1974
+ * List of features that are part of this Abstraction
1975
+ */
1976
+ protected _features: A_Feature[];
1977
+ /**
1978
+ * The Feature currently being processed
1979
+ */
1980
+ protected _current?: A_Feature;
1981
+ /**
1982
+ * Actual Index of the current Feature being processed
1983
+ */
1984
+ protected _index: number;
1985
+ /**
1986
+ * Allows to extends A-Abstraction with additional methods
1987
+ */
1988
+ static get Extend(): typeof A_Abstraction_Extend;
1989
+ /**
1990
+ * A-Abstraction is an object that is common for any application.
1991
+ * By providing components and creating abstraction extensions it's possible to create a unique behavior of the whole solution.
1992
+ *
1993
+ * Every application has basic abstractions like 'start', 'stop', 'deploy', 'test', etc.
1994
+ * They can be easily extended with additional logic from both containers and components.
1995
+ *
1996
+ *
1997
+ * @param params
1998
+ */
1999
+ constructor(
2000
+ /**
2001
+ * Parameters to define the A-Abstraction
2002
+ */
2003
+ params: A_TYPES__Abstraction_Init);
2004
+ /**
2005
+ * Returns the name of the Abstraction
2006
+ */
2007
+ get name(): string;
2008
+ /**
2009
+ * Returns the current Feature being processed
2010
+ */
2011
+ get feature(): A_Feature | undefined;
2012
+ /**
2013
+ * This method checks if the A-Feature is done
2014
+ *
2015
+ * @returns
2016
+ */
2017
+ get isDone(): boolean;
2018
+ [Symbol.iterator](): Iterator<A_Feature, any>;
2019
+ /**
2020
+ * This method moves the Abstraction processing to the next Feature in the list
2021
+ *
2022
+ * @param stage
2023
+ */
2024
+ next(stage: any): void;
2025
+ /**
2026
+ * Allows to process all stages of the Abstraction
2027
+ *
2028
+ * @returns
2029
+ */
2030
+ process(
2031
+ /**
2032
+ * Allows to override the scope in which the Abstraction will be processed
2033
+ *
2034
+ */
2035
+ scope?: A_Scope): Promise<void>;
2036
+ }
2037
+
2038
+ /**
2039
+ * Abstraction constructor type
2040
+ * Uses the generic type T to specify the type of the abstraction
2041
+ */
2042
+ type A_TYPES__Abstraction_Constructor<T = A_Abstraction> = new (...args: any[]) => T;
2043
+ /**
2044
+ * Abstraction initialization type
2045
+ */
2046
+ type A_TYPES__Abstraction_Init = {
2047
+ /**
2048
+ * Name of the A-Abstraction
2049
+ */
2050
+ name: A_TYPES__ConceptAbstractions;
2051
+ /**
2052
+ * Features that compose the A-Abstraction
2053
+ */
2054
+ containers: Array<A_Container>;
2055
+ };
2056
+ /**
2057
+ * Abstraction serialized type
2058
+ */
2059
+ type A_TYPES__Abstraction_Serialized = {
2060
+ /**
2061
+ * The ASEID of the abstraction
2062
+ */
2063
+ aseid: string;
2064
+ };
2065
+ /**
2066
+ * Components that can extend Abstractions
2067
+ */
2068
+ type A_TYPES__AbstractionAvailableComponents = A_Component | A_Container;
2069
+ type A_TYPES__AbstractionDecoratorDescriptor = TypedPropertyDescriptor<() => any> | TypedPropertyDescriptor<(...args: any[]) => any> | TypedPropertyDescriptor<(...args: any[]) => Promise<any>> | TypedPropertyDescriptor<() => Promise<any>>;
2070
+ type A_TYPES__AbstractionDecoratorConfig = A_TYPES__FeatureExtendDecoratorConfig;
2071
+
2072
+ declare class A_Concept<_Imports extends A_Container[] = A_Container[]> {
2073
+ protected props: A_TYPES__Concept_Init<_Imports>;
2074
+ /**
2075
+ * Load the concept. This step runs before any other steps to ensure that all components are loaded.
2076
+ */
2077
+ static Load(
2078
+ /**
2079
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2080
+ */
2081
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): ReturnType<typeof A_Abstraction_Extend>;
2082
+ /**
2083
+ * Publish the concept to ADAAS platform. (Or any other place defined in the concept)
2084
+ *
2085
+ * [!] To extend the logic just create a custom containers and override the default behavior.
2086
+ */
2087
+ static Publish(
2088
+ /**
2089
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2090
+ */
2091
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): ReturnType<typeof A_Abstraction_Extend>;
2092
+ /**
2093
+ * Deploy the concept to the environment.
2094
+ */
2095
+ static Deploy(
2096
+ /**
2097
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2098
+ */
2099
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2100
+ /**
2101
+ * Compiles the Concept in case there are some containers that require that.
2102
+ *
2103
+ * Can be used for static websites or any other concept that requires a build step.
2104
+ *
2105
+ */
2106
+ static Build(
2107
+ /**
2108
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2109
+ */
2110
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2111
+ /**
2112
+ * Main execution of the concept.
2113
+ */
2114
+ static Run(
2115
+ /**
2116
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2117
+ */
2118
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2119
+ /**
2120
+ * Start the concept. Uses for servers or any other background services.
2121
+ */
2122
+ static Start(
2123
+ /**
2124
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2125
+ */
2126
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2127
+ /**
2128
+ * Stop the concept. Uses for servers or any other background services.
2129
+ */
2130
+ static Stop(
2131
+ /**
2132
+ * provide additional configuration for the abstraction extension to make it dependent on other factors
2133
+ */
2134
+ config?: Partial<A_TYPES__AbstractionDecoratorConfig>): (target: A_Container | A_Component, propertyKey: string, descriptor: A_TYPES__AbstractionDecoratorDescriptor) => void;
2135
+ /**
2136
+ * Name of the concept
2137
+ *
2138
+ * By default, the name of the Concept is 'a-concept'
2139
+ */
2140
+ private _name;
2141
+ /**
2142
+ * A list of internally defined containers that the concept uses.
2143
+ */
2144
+ protected _containers: A_Container[];
2145
+ /**
2146
+ * A-Concept is a placeholder for the concept of the any program.
2147
+ *
2148
+ * Concept - could be any Program regardless environment and it's goal.
2149
+ * It could be mobile, web or simple html page.
2150
+ * All depends on Containers and Components installed and provided in the Concept.
2151
+ *
2152
+ *
2153
+ * [!] Concept operates ONLY with all Components and Containers provided to achieve the goal.
2154
+ *
2155
+ *
2156
+ * @param props - Initialization properties for the Concept
2157
+ */
2158
+ constructor(props: A_TYPES__Concept_Init<_Imports>);
2159
+ /**
2160
+ * Name of the concept
2161
+ */
2162
+ get name(): string;
2163
+ /**
2164
+ * The primary Root scope of the concept.
2165
+ */
2166
+ get scope(): A_Scope<A_TYPES__Component_Constructor[], A_TYPES__Error_Constructor[], A_TYPES__Entity_Constructor[], A_Fragment<any>[]>;
2167
+ /**
2168
+ * Register a class or value in the concept scope.
2169
+ */
2170
+ get register(): A_Scope['register'];
2171
+ /**
2172
+ * Resolve a class or value from the concept scope.
2173
+ */
2174
+ get resolve(): A_Scope['resolve'];
2175
+ /**
2176
+ * Load the concept.
2177
+ */
2178
+ load(scope?: A_Scope): Promise<void>;
2179
+ /**
2180
+ * Run the concept.
2181
+ */
2182
+ run(scope?: A_Scope): Promise<void>;
2183
+ /**
2184
+ * Start the concept.
2185
+ *
2186
+ * @param params
2187
+ */
2188
+ start(scope?: A_Scope): Promise<void>;
2189
+ /**
2190
+ * Stop the concept.
2191
+ *
2192
+ * @param params
2193
+ */
2194
+ stop(scope?: A_Scope): Promise<void>;
2195
+ /**
2196
+ * Build the concept.
2197
+ */
2198
+ build(scope?: A_Scope): Promise<void>;
2199
+ /**
2200
+ * Deploy the concept.
2201
+ */
2202
+ deploy(scope?: A_Scope): Promise<void>;
2203
+ /**
2204
+ * Publish the concept.
2205
+ */
2206
+ publish(scope?: A_Scope): Promise<void>;
2207
+ /**
2208
+ * Call the specific method of the concept or included modules.
2209
+ */
2210
+ call<K extends Record<_Imports[number]['name'], string>>(
2211
+ /**
2212
+ * Name of the method to call
2213
+ */
2214
+ method: K[keyof K],
2215
+ /**
2216
+ * Container in which the method is located
2217
+ */
2218
+ container: _Imports[number]): Promise<void>;
2219
+ }
2220
+
2221
+ declare class A_Fragment<_MemoryItems extends Record<string, any> = any> {
2222
+ /**
2223
+ * Fragment Name
2224
+ */
2225
+ name: string;
2226
+ /**
2227
+ * Memory storage for the Fragment instance
2228
+ */
2229
+ protected _meta: A_Meta<_MemoryItems>;
2230
+ /**
2231
+ * A-Fragment is a singleton, a piece of execution Context that can be shared between the Components/Entities/Commands
2232
+ * For every A_Scope can be defined only One A_Fragment of the same type.
2233
+ * This class is useful for the design purpose and maintainance of the application
2234
+ *
2235
+ *
2236
+ * [!] Every A_Fragment is a Memory Class that can store data in memory between the steps of the pipeline.
2237
+ * [!] So if it necessary to store some information in the Execution Context - use memory of the Fragment
2238
+ */
2239
+ constructor(params?: Partial<A_TYPES__Fragment_Init>);
2240
+ /**
2241
+ * Returns the Meta object that allows to store data in the Fragment memory
2242
+ *
2243
+ * @returns
2244
+ */
2245
+ get memory(): A_Meta<_MemoryItems>;
2246
+ /**
2247
+ * Returns the JSON representation of the Fragment
2248
+ *
2249
+ * @returns
2250
+ */
2251
+ toJSON(): _MemoryItems & {
2252
+ name: string;
2253
+ };
2254
+ }
2255
+
2256
+ /**
2257
+ * Fragment constructor type
2258
+ * Uses the generic type T to specify the type of the fragment
2259
+ */
2260
+ type A_TYPES__Fragment_Constructor<T = A_Fragment> = new (...args: any[]) => T;
2261
+ /**
2262
+ * Fragment initialization type
2263
+ */
2264
+ type A_TYPES__Fragment_Init = {
2265
+ name: string;
2266
+ };
2267
+ /**
2268
+ * Fragment serialized type
2269
+ */
2270
+ type A_TYPES__Fragment_Serialized = {
2271
+ /**
2272
+ * The ASEID of the fragment
2273
+ */
2274
+ aseid: string;
2275
+ };
2276
+
2277
+ /**
2278
+ * Concept constructor type
2279
+ * Uses the generic type T to specify the type of the concept
2280
+ */
2281
+ type A_TYPES__Concept_Constructor<T = A_Concept> = new (...args: any[]) => T;
2282
+ /**
2283
+ * Concept initialization type
2284
+ * Uses the generic type T to specify the type of containers that the concept will use
2285
+ */
2286
+ type A_TYPES__Concept_Init<T extends Array<A_Container>> = {
2287
+ /**
2288
+ * The name of the Concept
2289
+ * If name is not provided, will be used from environment variable A_CONCEPT_NAME
2290
+ *
2291
+ * By default, the name of the Concept is 'a-concept'
2292
+ *
2293
+ */
2294
+ name?: string;
2295
+ /**
2296
+ * A set of Context Fragments to register globally for the concept.
2297
+ * These fragments will be available in the global context.
2298
+ *
2299
+ */
2300
+ fragments?: Array<InstanceType<A_TYPES__Fragment_Constructor>>;
2301
+ /**
2302
+ * A set of Containers that the concept depends on.
2303
+ * These containers will create a new Container for the concept.
2304
+ */
2305
+ containers?: T;
2306
+ /**
2307
+ * A set of Entities that the concept can use.
2308
+ * These components will be used in the concept.
2309
+ */
2310
+ entities?: Array<InstanceType<A_TYPES__Entity_Constructor> | A_TYPES__Entity_Constructor>;
2311
+ /**
2312
+ * A set of Components available for all containers and fragments in the concept.
2313
+ * These components will be registered in the root scope of the concept.
2314
+ *
2315
+ * [!] Note that these components will be available in all containers and fragments in the concept.
2316
+ */
2317
+ components?: Array<A_TYPES__Component_Constructor>;
2318
+ };
2319
+ /**
2320
+ * Concept serialized type
2321
+ */
2322
+ type A_TYPES__Concept_Serialized = {};
2323
+ /**
2324
+ * Uses as a transfer object to pass configurations to Feature constructor
2325
+ */
2326
+ type A_TYPES__ConceptAbstractionMeta = {
2327
+ /**
2328
+ * The arguments that will be passed to the handler
2329
+ */
2330
+ args: A_TYPES__A_InjectDecorator_Meta;
2331
+ } & A_TYPES__FeatureExtendDecoratorMeta;
2332
+ /**
2333
+ * Uses to define the extension that will be applied to the Concept
2334
+ */
2335
+ type A_TYPES__ConceptAbstraction = A_TYPES__FeatureExtendDecoratorMeta;
2336
+
2337
+ declare enum A_TYPES__ComponentMetaKey {
2338
+ EXTENSIONS = "a-component-extensions",
2339
+ FEATURES = "a-component-features",
2340
+ INJECTIONS = "a-component-injections",
2341
+ ABSTRACTIONS = "a-component-abstractions"
2342
+ }
2343
+
2344
+ /**
2345
+ * Component constructor type
2346
+ * Uses the generic type T to specify the type of the component
2347
+ */
2348
+ type A_TYPES__Component_Constructor<T = A_Component> = new (...args: any[]) => T;
2349
+ /**
2350
+ * Component initialization type
2351
+ */
2352
+ type A_TYPES__Component_Init = any;
2353
+ /**
2354
+ * Component serialized type
2355
+ */
2356
+ type A_TYPES__Component_Serialized = {
2357
+ /**
2358
+ * The ASEID of the component
2359
+ */
2360
+ aseid: string;
2361
+ };
2362
+ /**
2363
+ * Component meta type
2364
+ */
2365
+ type A_TYPES__ComponentMeta = {
2366
+ /**
2367
+ * Extensions applied to the component per handler
2368
+ */
2369
+ [A_TYPES__ComponentMetaKey.EXTENSIONS]: A_Meta<{
2370
+ /**
2371
+ * Where Key the regexp for what to apply the extension
2372
+ * A set of container names or a wildcard, or a regexp
2373
+ *
2374
+ *
2375
+ * Where value is the extension instructions
2376
+ */
2377
+ [Key: string]: A_TYPES__FeatureExtendDecoratorMeta[];
2378
+ }>;
2379
+ /**
2380
+ * Features defined on the component per handler
2381
+ */
2382
+ [A_TYPES__ComponentMetaKey.FEATURES]: A_Meta<{
2383
+ /**
2384
+ * Where Key is the name of the feature
2385
+ *
2386
+ * Where value is the list of features
2387
+ */
2388
+ [Key: string]: A_TYPES__FeatureDefineDecoratorMeta;
2389
+ }>;
2390
+ /**
2391
+ * Injections defined on the component per handler
2392
+ */
2393
+ [A_TYPES__ComponentMetaKey.INJECTIONS]: A_Meta<{
2394
+ /**
2395
+ * Where Key is the name of the injection
2396
+ *
2397
+ * Where value is the list of injections
2398
+ */
2399
+ [Key: string]: A_TYPES__A_InjectDecorator_Meta;
2400
+ }>;
2401
+ /**
2402
+ * Abstractions extended by the component per handler
2403
+ */
2404
+ [A_TYPES__ComponentMetaKey.ABSTRACTIONS]: A_Meta<{
2405
+ /**
2406
+ * Where Key is the name of the stage
2407
+ *
2408
+ * Where value is the list of injections
2409
+ */
2410
+ [Key: string]: A_TYPES__ConceptAbstraction[];
2411
+ }>;
2412
+ };
2413
+ type A_TYPES__ComponentMetaExtension = A_TYPES__FeatureExtendDecoratorMeta;
2414
+
2415
+ type A_TYPES__CallerComponent = A_Container | A_Component | A_Entity;
2416
+ /**
2417
+ * Caller constructor type
2418
+ * Uses the generic type T to specify the type of the caller component
2419
+ */
2420
+ type A_TYPES__Caller_Constructor<T = A_Caller> = new (...args: any[]) => T;
2421
+ /**
2422
+ * Caller initialization type
2423
+ */
2424
+ type A_TYPES__Caller_Init = {};
2425
+ /**
2426
+ * Caller serialized type
2427
+ */
2428
+ type A_TYPES__Caller_Serialized = {};
2429
+
2430
+ /**
2431
+ * A-Inject decorator descriptor type
2432
+ * Indicates the type of the decorator function
2433
+ */
2434
+ type A_TYPES__A_InjectDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => Promise<void>>;
2435
+ /**
2436
+ * A-Inject decorator return type
2437
+ * Indicates what the decorator function returns
2438
+ */
2439
+ type A_TYPES__A_InjectDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
2440
+ type A_TYPES__A_InjectDecorator_Meta = Array<{
2441
+ target: A_TYPES__InjectableConstructors;
2442
+ require?: boolean;
2443
+ load?: string;
2444
+ defaultArgs?: any;
2445
+ create?: boolean;
2446
+ instructions?: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions>;
2447
+ }>;
2448
+ /**
2449
+ * Targets that can be injected into Extended functions or constructors
2450
+ *
2451
+ */
2452
+ type A_TYPES__InjectableTargets = A_TYPES__Component_Constructor | InstanceType<A_TYPES__Component_Constructor> | InstanceType<A_TYPES__Container_Constructor>;
2453
+ 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;
2454
+ type A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T extends A_Entity = A_Entity> = {
2455
+ query: Partial<A_TYPES__A_InjectDecorator_EntityInjectionQuery<T>>;
2456
+ pagination: Partial<A_TYPES__A_InjectDecorator_EntityInjectionPagination>;
2457
+ };
2458
+ type A_TYPES__A_InjectDecorator_EntityInjectionQuery<T extends A_Entity = A_Entity> = {
2459
+ aseid: string;
2460
+ } & {
2461
+ [key in keyof T]?: any;
2462
+ };
2463
+ type A_TYPES__A_InjectDecorator_EntityInjectionPagination = {
2464
+ count: number;
2465
+ from: 'start' | 'end';
2466
+ };
2467
+
2468
+ 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[]> {
2469
+ /**
2470
+ * Scope Name uses for identification and logging purposes
2471
+ */
2472
+ protected _name: string;
2473
+ /**
2474
+ * Parent scope reference, used for inheritance of components, fragments, entities and commands
2475
+ */
2476
+ protected _parent?: A_Scope;
2477
+ /**
2478
+ * A set of allowed components, A set of constructors that are allowed in the scope
2479
+ *
2480
+ */
2481
+ protected _allowedComponents: Set<_ComponentType[number]>;
2482
+ /**
2483
+ * A set of allowed errors, A set of constructors that are allowed in the scope
2484
+ */
2485
+ protected _allowedErrors: Set<_ErrorType[number]>;
2486
+ /**
2487
+ * A set of allowed entities, A set of constructors that are allowed in the scope
2488
+ */
2489
+ protected _allowedEntities: Set<_EntityType[number]>;
2490
+ /**
2491
+ * A set of allowed fragments, A set of constructors that are allowed in the scope
2492
+ */
2493
+ protected _allowedFragments: Set<A_TYPES__Fragment_Constructor<_FragmentType[number]>>;
2494
+ /**
2495
+ * Storage for the components, should be strong as components are unique per scope
2496
+ */
2497
+ protected _components: Map<_ComponentType[number], InstanceType<_ComponentType[number]>>;
2498
+ /**
2499
+ * Storage for the errors, should be strong as errors are unique per code
2500
+ */
2501
+ protected _errors: Map<string, InstanceType<_ErrorType[number]>>;
2502
+ /**
2503
+ * Storage for the entities, should be strong as entities are unique per aseid
2504
+ */
2505
+ protected _entities: Map<string, InstanceType<_EntityType[number]>>;
2506
+ /**
2507
+ * Storage for the fragments, should be weak as fragments are singletons per scope
2508
+ */
2509
+ protected _fragments: Map<A_TYPES__Fragment_Constructor<_FragmentType[number]>, _FragmentType[number]>;
2510
+ /**
2511
+ * Returns the name of the scope
2512
+ */
2513
+ get name(): string;
2514
+ /**
2515
+ * Returns a list of Constructors for A-Components that are available in the scope
2516
+ */
2517
+ get allowedComponents(): Set<_ComponentType[number]>;
2518
+ /**
2519
+ * Returns a list of Constructors for A-Entities that are available in the scope
2520
+ */
2521
+ get allowedEntities(): Set<_EntityType[number]>;
2522
+ /**
2523
+ * Returns a list of Constructors for A-Fragments that are available in the scope
2524
+ */
2525
+ get allowedFragments(): Set<A_TYPES__Fragment_Constructor<_FragmentType[number]>>;
2526
+ /**
2527
+ * Returns a list of Constructors for A-Errors that are available in the scope
2528
+ */
2529
+ get allowedErrors(): Set<_ErrorType[number]>;
2530
+ /**
2531
+ * Returns an Array of entities registered in the scope
2532
+ *
2533
+ * [!] One entity per aseid
2534
+ */
2535
+ get entities(): Array<InstanceType<_EntityType[number]>>;
2536
+ /**
2537
+ * Returns an Array of fragments registered in the scope
2538
+ *
2539
+ * [!] One fragment per scope
2540
+ */
2541
+ get fragments(): Array<_FragmentType[number]>;
2542
+ /**
2543
+ * Returns an Array of components registered in the scope
2544
+ *
2545
+ * [!] One component instance per scope
2546
+ */
2547
+ get components(): Array<InstanceType<_ComponentType[number]>>;
2548
+ /**
2549
+ * Returns the parent scope of the current scope
2550
+ *
2551
+ * @param setValue
2552
+ * @returns
2553
+ */
2554
+ get parent(): A_Scope | undefined;
2555
+ /**
2556
+ * A_Scope refers to the visibility and accessibility of :
2557
+ * - variables,
2558
+ * - Components,
2559
+ * - Context Fragments
2560
+ * - Entities
2561
+ * - and objects in different parts of your code.
2562
+ * Scope determines where a particular piece of data (like a variable or function)
2563
+ * can be accessed, modified, or referenced, and it plays a crucial role in avoiding naming collisions and ensuring data integrity.
2564
+ *
2565
+ * [!] The scope behavior is similar to tree structure where each scope can have a parent scope and inherit its components, fragments, entities and errors
2566
+ *
2567
+ * @param params
2568
+ * @param config
2569
+ */
2570
+ constructor();
2571
+ constructor(
2572
+ /**
2573
+ * A set of constructors that are allowed in the scope
2574
+ */
2575
+ params: Partial<A_TYPES__Scope_Init<_ComponentType, _ErrorType, _EntityType, _FragmentType>>,
2576
+ /**
2577
+ * Configuration options for the scope
2578
+ */
2579
+ config?: Partial<A_TYPES__ScopeConfig>);
2580
+ /**
2581
+ * Determines which initializer method to use based on the type of the first parameter.
2582
+ *
2583
+ * @param param1
2584
+ * @returns
2585
+ */
2586
+ protected getInitializer(param1?: Partial<A_TYPES__Scope_Init<_ComponentType, _ErrorType, _EntityType, _FragmentType>>, param2?: Partial<A_TYPES__ScopeConfig>): (param1: any, param2: any) => void | (() => void);
2587
+ protected defaultInitialized(params?: Partial<A_TYPES__Scope_Init<_ComponentType, _ErrorType, _EntityType, _FragmentType>>, config?: Partial<A_TYPES__ScopeConfig>): void;
2588
+ /**
2589
+ * This method is used to initialize the components in the scope
2590
+ * To save memory components are initialized only when they are requested
2591
+ *
2592
+ * This method only registers the component in the scope in case they are not registered yet
2593
+ *
2594
+ * @param _components
2595
+ */
2596
+ protected initComponents(_components?: _ComponentType): void;
2597
+ /**
2598
+ * This method is used to initialize the errors in the scope
2599
+ *
2600
+ * This method only registers the errors in the scope in case they are not registered yet
2601
+ *
2602
+ * @param _errors
2603
+ */
2604
+ protected initErrors(_errors?: _ErrorType): void;
2605
+ /**
2606
+ * This method is used to initialize the entities in the scope
2607
+ *
2608
+ * This method only registers the entities in the scope in case they are not registered yet
2609
+ *
2610
+ * @param _entities
2611
+ */
2612
+ protected initEntities(_entities?: [
2613
+ ..._EntityType,
2614
+ ...InstanceType<_EntityType[number]>[]
2615
+ ]): void;
2616
+ /**
2617
+ * This method is used to initialize the fragments in the scope
2618
+ *
2619
+ * This method only registers the fragments in the scope in case they are not registered yet
2620
+ *
2621
+ * @param _fragments
2622
+ */
2623
+ protected initFragments(_fragments?: _FragmentType): void;
2624
+ /**
2625
+ * This method is used to destroy the scope and all its registered components, fragments and entities
2626
+ *
2627
+ * [!] This method deregisters all components, fragments and entities from the A-Context
2628
+ * [!] This method also clears all internal registries and collections
2629
+ */
2630
+ destroy(): void;
2631
+ /**
2632
+ * Returns the issuer of the scope, useful for debugging and tracking purposes
2633
+ *
2634
+ * Issuer can be:
2635
+ * - A Container that allocated the scope
2636
+ * - A Feature that allocated the scope
2637
+ *
2638
+ * [!] 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
2639
+ *
2640
+ * @returns
2641
+ */
2642
+ issuer<T extends A_TYPES__ScopeLinkedComponents>(): T | undefined;
2643
+ /**
2644
+ * This method is used to inherit from a parent scope
2645
+ *
2646
+ * [!] This method checks for circular inheritance and throws an error if detected
2647
+ *
2648
+ * @param parent
2649
+ * @returns
2650
+ */
2651
+ inherit(parent: A_Scope): A_Scope;
2652
+ /**
2653
+ * This method is used to check if the component is available in the scope
2654
+ *
2655
+ * [!] Note that this method checks for the component in the current scope and all parent scopes
2656
+ *
2657
+ * @param component
2658
+ * @returns
2659
+ */
2660
+ has<T extends A_Component>(
2661
+ /**
2662
+ * Provide a component constructor to check if it's available in the scope
2663
+ */
2664
+ component: A_TYPES__Component_Constructor<T>): boolean;
2665
+ has<T extends A_Entity>(
2666
+ /**
2667
+ * Provide an entity constructor to check if it's available in the scope
2668
+ *
2669
+ * [!] 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
2670
+ */
2671
+ entity: A_TYPES__Entity_Constructor<T>): boolean;
2672
+ has<T extends A_Fragment>(
2673
+ /**
2674
+ * Provide a fragment constructor to check if it's available in the scope
2675
+ */
2676
+ fragment: A_TYPES__Fragment_Constructor<T>): boolean;
2677
+ has(
2678
+ /**
2679
+ * Provide a string to check if a component, entity or fragment with the provided name is available in the scope
2680
+ */
2681
+ constructor: string): boolean;
2682
+ /**
2683
+ * Merges two scopes into a new one
2684
+ *
2685
+ * [!] Notes:
2686
+ * - this method does NOT modify the existing scopes
2687
+ * - parent of the new scope will be the parent of the current scope or the parent of anotherScope (if exists)
2688
+ *
2689
+ * @param anotherScope
2690
+ * @returns
2691
+ */
2692
+ merge(anotherScope: A_Scope): A_Scope;
2693
+ /**
2694
+ * Allows to retrieve the constructor of the component or entity by its name
2695
+ *
2696
+ * [!] Notes:
2697
+ * - 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
2698
+ * - In case of search for A_Component please ensure that provided string corresponds to the class name in PascalCase
2699
+ *
2700
+ * @param name
2701
+ * @returns
2702
+ */
2703
+ resolveConstructor<T extends A_Entity>(
2704
+ /**
2705
+ * Provide the entity name or static entity property to retrieve its constructor
2706
+ */
2707
+ name: string): A_TYPES__Entity_Constructor<T>;
2708
+ resolveConstructor<T extends A_Component>(
2709
+ /**
2710
+ * Provide the component name in PascalCase to retrieve its constructor
2711
+ */
2712
+ name: string): A_TYPES__Component_Constructor<T>;
2713
+ resolveConstructor<T extends A_Fragment>(
2714
+ /**
2715
+ * Provide the fragment name in PascalCase to retrieve its constructor
2716
+ */
2717
+ name: string): A_TYPES__Fragment_Constructor<T>;
2718
+ /**
2719
+ * This method allows to resolve/inject a component, fragment or entity from the scope
2720
+ * Depending on the provided parameters it can resolve:
2721
+ * - A single component/fragment/entity by its constructor or name
2722
+ * - An array of components/fragments/entities by providing an array of constructors
2723
+ * - An entity or an array of entities by providing the entity constructor and query instructions
2724
+ *
2725
+ * @param component
2726
+ * @returns
2727
+ */
2728
+ resolve<T extends A_Component>(
2729
+ /**
2730
+ * Provide a component constructor to resolve its instance from the scope
2731
+ */
2732
+ component: A_TYPES__Component_Constructor<T>): T | undefined;
2733
+ resolve<T extends A_TYPES__Component_Constructor[]>(
2734
+ /**
2735
+ * Provide an array of component constructors to resolve their instances from the scope
2736
+ */
2737
+ components: [...T]): Array<InstanceType<T[number]>> | undefined;
2738
+ resolve<T extends A_Fragment>(
2739
+ /**
2740
+ * Provide a fragment constructor to resolve its instance from the scope
2741
+ */
2742
+ fragment: A_TYPES__Fragment_Constructor<T>): T | undefined;
2743
+ resolve<T extends A_TYPES__Fragment_Constructor[]>(
2744
+ /**
2745
+ * Provide an array of fragment constructors to resolve their instances from the scope
2746
+ */
2747
+ fragments: [...T]): Array<InstanceType<T[number]>> | undefined;
2748
+ resolve<T extends A_Entity>(
2749
+ /**
2750
+ * Provide an entity constructor to resolve its instance or an array of instances from the scope
2751
+ */
2752
+ entity: A_TYPES__Entity_Constructor<T>): T | undefined;
2753
+ resolve<T extends A_Scope>(
2754
+ /**
2755
+ * Uses only in case of resolving a single entity
2756
+ *
2757
+ * Provide an entity constructor to resolve its instance from the scope
2758
+ */
2759
+ scope: new (...args: any[]) => T): T | undefined;
2760
+ resolve<T extends A_Entity>(
2761
+ /**
2762
+ * Provide an entity constructor to resolve its instance or an array of instances from the scope
2763
+ */
2764
+ entity: A_TYPES__Entity_Constructor<T>,
2765
+ /**
2766
+ * Provide optional instructions to find a specific entity or a set of entities
2767
+ */
2768
+ instructions: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T>>): Array<T>;
2769
+ resolve<T extends A_TYPES__ScopeResolvableComponents>(constructorName: string): T | undefined;
2770
+ resolve<T extends A_TYPES__ScopeResolvableComponents>(
2771
+ /**
2772
+ * Provide a component, fragment or entity constructor or an array of constructors to resolve its instance(s) from the scope
2773
+ */
2774
+ param1: A_TYPES__InjectableConstructors): T | Array<T> | undefined;
2775
+ resolve<T extends A_TYPES__ScopeLinkedConstructors>(
2776
+ /**
2777
+ * Provide a component, fragment or entity constructor or an array of constructors to resolve its instance(s) from the scope
2778
+ */
2779
+ param1: InstanceType<T>): T | Array<T> | undefined;
2780
+ /**
2781
+ * This method is used internally to resolve a component, fragment or entity by its constructor name
2782
+ *
2783
+ * [!] Note that this method checks for the component, fragment or entity in the current scope and all parent scopes
2784
+ *
2785
+ * @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)
2786
+ * @returns
2787
+ */
2788
+ private resolveByName;
2789
+ /**
2790
+ * This method is used internally to resolve a single component, fragment or entity from the scope
2791
+ *
2792
+ * @param component
2793
+ * @param instructions
2794
+ * @returns
2795
+ */
2796
+ private resolveOnce;
2797
+ private resolveIssuer;
2798
+ /**
2799
+ * This method is used internally to resolve a single entity from the scope based on the provided instructions
2800
+ *
2801
+ * [!] Note that this method can return either a single entity or an array of entities depending on the instructions provided
2802
+ *
2803
+ * @param entity
2804
+ * @param instructions
2805
+ * @returns
2806
+ */
2807
+ private resolveEntity;
2808
+ /**
2809
+ * This method is used internally to resolve a single fragment from the scope
2810
+ *
2811
+ * @param fragment
2812
+ * @returns
2813
+ */
2814
+ private resolveFragment;
2815
+ /**
2816
+ * This method is used internally to resolve a single scope from the current scope
2817
+ *
2818
+ * @param scope
2819
+ * @returns
2820
+ */
2821
+ private resolveScope;
2822
+ /**
2823
+ * This method is used internally to resolve a single component from the scope
2824
+ *
2825
+ * @param component
2826
+ * @returns
2827
+ */
2828
+ private resolveComponent;
2829
+ /**
2830
+ * This method is used to register the component in the scope
2831
+ *
2832
+ * @param fragment
2833
+ */
2834
+ register<T extends A_Component>(
2835
+ /**
2836
+ * Provide a component constructor to register it in the scope
2837
+ */
2838
+ component: A_TYPES__Component_Constructor<T>): void;
2839
+ register(
2840
+ /**
2841
+ * Provide a command instance to register it in the scope
2842
+ */
2843
+ component: A_Component): void;
2844
+ register<T extends A_Error>(
2845
+ /**
2846
+ * Provide an error constructor to register it in the scope
2847
+ */
2848
+ error: A_TYPES__Error_Constructor<T>): void;
2849
+ register(
2850
+ /**
2851
+ * Provide an error instance to register it in the scope
2852
+ */
2853
+ error: A_Error): void;
2854
+ register<T extends A_Fragment>(
2855
+ /**
2856
+ * Provide a command instance to register it in the scope
2857
+ */
2858
+ fragment: A_TYPES__Fragment_Constructor<T>): void;
2859
+ register(
2860
+ /**
2861
+ * Provide a fragment instance to register it in the scope
2862
+ */
2863
+ fragment: A_Fragment): void;
2864
+ register<T extends A_Entity>(
2865
+ /**
2866
+ * Provide an entity constructor to register it in the scope
2867
+ */
2868
+ entity: A_TYPES__Entity_Constructor<T>): void;
2869
+ register(
2870
+ /**
2871
+ * Provide an entity instance to register it in the scope
2872
+ */
2873
+ entity: A_Entity): void;
2874
+ /**
2875
+ * This method is useful when you want to serialize the scope to JSON
2876
+ *
2877
+ * [!] Note this is not a deep serialization, only the fragments are serialized
2878
+ * [!] Fragments are a storage for information which is relevant to the scope
2879
+ *
2880
+ * @returns
2881
+ */
2882
+ toJSON(): Record<string, any>;
2883
+ /**
2884
+ * Type guard to check if the constructor is of type A_Component and is allowed in the scope
2885
+ *
2886
+ * @param ctor
2887
+ * @returns
2888
+ */
2889
+ protected isAllowedComponent(ctor: unknown): ctor is _ComponentType[number];
2890
+ /**
2891
+ * Type guard to check if the constructor is of type A_Entity and is allowed in the scope
2892
+ *
2893
+ * @param ctor
2894
+ * @returns
2895
+ */
2896
+ protected isAllowedEntity(ctor: unknown): ctor is A_TYPES__Entity_Constructor<_EntityType[number]>;
2897
+ /**
2898
+ * Type guard to check if the constructor is of type A_Fragment and is allowed in the scope
2899
+ *
2900
+ * @param ctor
2901
+ * @returns
2902
+ */
2903
+ protected isAllowedFragment(ctor: unknown): ctor is A_TYPES__Fragment_Constructor<_FragmentType[number]>;
2904
+ /**
2905
+ * Type guard to check if the constructor is of type A_Error and is allowed in the scope
2906
+ *
2907
+ * @param ctor
2908
+ * @returns
2909
+ */
2910
+ protected isAllowedError(ctor: unknown): ctor is A_TYPES__Error_Constructor<_ErrorType[number]>;
2911
+ /**
2912
+ * This method is used to check if the scope is inherited from another scope
2913
+ *
2914
+ * @param scope
2915
+ * @returns
2916
+ */
2917
+ isInheritedFrom(scope: A_Scope): boolean;
2918
+ /**
2919
+ * Helper method to check circular inheritance
2920
+ * Should return a full sequence of inheritance for logging purposes
2921
+ *
2922
+ * @param scope
2923
+ * @returns
2924
+ */
2925
+ checkCircularInheritance(scope: A_Scope): Array<string> | false;
2926
+ /**
2927
+ * Helper method to print the inheritance chain of the scope
2928
+ */
2929
+ printInheritanceChain(): void;
2930
+ }
2931
+
2932
+ /**
2933
+ * A-Component is a primary "extendable" object in the system
2934
+ * A unique combination of Components creates completely new functionality
2935
+ *
2936
+ * The most important thing is that A-Component is STATELESS, it means that it doesn't store any state in itself
2937
+ *
2938
+ *
2939
+ * [!] Every A-Component is a singleton, so if you need to create multiple instances of the same logic - use A-Container
2940
+ * [!] So one scope can have only one instance of the same A-Component
2941
+ * [!] Every A-Component can be extended by features and extensions
2942
+ * [!] ONLY A-Component can have A-Feature extensions
2943
+ *
2944
+ */
2945
+ declare class A_Component {
2946
+ /**
2947
+ * Calls the feature with the given name in the given scope
2948
+ *
2949
+ * [!] Note: This method creates a new instance of the feature every time it is called
2950
+ *
2951
+ * @param feature - the name of the feature to call
2952
+ * @param scope - the scope in which to call the feature
2953
+ * @returns - void
2954
+ */
2955
+ call(
2956
+ /**
2957
+ * Name of the feature to call
2958
+ */
2959
+ feature: string,
2960
+ /**
2961
+ * Scope in which the feature will be executed
2962
+ */
2963
+ scope?: A_Scope): Promise<void>;
2964
+ }
2965
+
2966
+ /**
2967
+ * Scope constructor type
2968
+ * Uses the generic type T to specify the type of the Scope
2969
+ */
2970
+ type A_TYPES__Scope_Constructor<T = A_Scope> = new (...args: any[]) => T;
2971
+ /**
2972
+ * Scope initialization type
2973
+ */
2974
+ 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[]> = {
2975
+ /**
2976
+ * Scope Name
2977
+ */
2978
+ name: string;
2979
+ /**
2980
+ * A list of Context Fragments available in the Scope
2981
+ */
2982
+ fragments: [..._FragmentType];
2983
+ /**
2984
+ * A set of Components available in the Scope
2985
+ */
2986
+ components: [..._ComponentType];
2987
+ /**
2988
+ * A set of Errors available in the Scope
2989
+ */
2990
+ errors: [..._ErrorType];
2991
+ /**
2992
+ * A set of Entities available in the Scope
2993
+ *
2994
+ */
2995
+ entities: [
2996
+ ..._EntityType,
2997
+ ...InstanceType<_EntityType[number]>[]
2998
+ ];
2999
+ };
3000
+ /**
3001
+ * Scope configuration type
3002
+ */
3003
+ type A_TYPES__ScopeConfig = {
3004
+ /**
3005
+ * Allows to define a parent to take dependencies from in case of the current scope does not have the required component
3006
+ */
3007
+ parent: A_Scope;
3008
+ };
3009
+ /**
3010
+ * Scope serialized type
3011
+ */
3012
+ type A_TYPES__Scope_Serialized = {};
3013
+ /**
3014
+ *
3015
+ */
3016
+ type A_TYPES__ScopeLinkedConstructors = A_TYPES__Container_Constructor | A_TYPES__Feature_Constructor;
3017
+ /**
3018
+ * A list of components that can have a scope associated with them
3019
+ */
3020
+ type A_TYPES__ScopeLinkedComponents = A_Container | A_Feature;
3021
+ /**
3022
+ * A list of components that can be resolved by a scope
3023
+ */
3024
+ type A_TYPES__ScopeResolvableComponents = A_Component | A_Fragment | A_Entity;
3025
+ /**
3026
+ * A list of components that are dependent on a scope and do not have their own scope
3027
+ */
3028
+ type A_TYPES_ScopeDependentComponents = A_Component | A_Entity | A_Fragment;
3029
+ /**
3030
+ * A list of components that are independent of a scope. They don't need a scope to be resolved
3031
+ * Those components haven't scope dependent features.
3032
+ */
3033
+ type A_TYPES_ScopeIndependentComponents = A_Error | A_Scope | A_Caller;
3034
+
3035
+ /**
3036
+ * Components that can have Meta associated with them
3037
+ */
3038
+ type A_TYPES__MetaLinkedComponents = A_Container | A_Component | A_Entity;
3039
+ /**
3040
+ * Constructors of components that can have Meta associated with them
3041
+ */
3042
+ type A_TYPES__MetaLinkedComponentConstructors = A_TYPES__Container_Constructor | A_TYPES__Component_Constructor | A_TYPES__Entity_Constructor;
3043
+
3044
+ declare class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
3045
+ /**
3046
+ * Allows to get all the injections for a given handler
3047
+ *
3048
+ * @param handler
3049
+ * @returns
3050
+ */
3051
+ injections(handler: string): A_TYPES__A_InjectDecorator_Meta;
3052
+ /**
3053
+ * Allows to get all the extensions for a given feature
3054
+ *
3055
+ * @param feature
3056
+ * @returns
3057
+ */
3058
+ extensions(feature: string): A_TYPES__ComponentMetaExtension[];
3059
+ /**
3060
+ * Returns all features defined in the Component
3061
+ *
3062
+ * @returns
3063
+ */
3064
+ features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
3065
+ /**
3066
+ * Returns a set of instructions to run proper methods in Component during A-Concept Stage
3067
+ *
3068
+ * @param stage
3069
+ * @returns
3070
+ */
3071
+ abstractions(abstraction: any): A_TYPES__ConceptAbstractionMeta[];
3072
+ }
3073
+
3074
+ declare class A_ContainerMeta extends A_Meta<A_TYPES__ContainerMeta> {
3075
+ /**
3076
+ * Allows to get all the injections for a given handler
3077
+ *
3078
+ * @param handler
3079
+ * @returns
3080
+ */
3081
+ injections(handler: string): A_TYPES__A_InjectDecorator_Meta;
3082
+ /**
3083
+ * Returns all features defined in the Container
3084
+ *
3085
+ * @returns
3086
+ */
3087
+ features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
3088
+ /**
3089
+ * Returns a set of instructions to run proper methods in Container during A-Concept Stage
3090
+ *
3091
+ * @param stage
3092
+ * @returns
3093
+ */
3094
+ abstractions(abstraction: A_TYPES__ConceptAbstractions): A_TYPES__ConceptAbstractionMeta[];
3095
+ /**
3096
+ * Allows to get all the extensions for a given feature
3097
+ *
3098
+ * @param feature
3099
+ * @returns
3100
+ */
3101
+ extensions(feature: string): A_TYPES__ContainerMetaExtension[];
3102
+ }
3103
+
3104
+ declare class A_EntityMeta extends A_Meta<A_TYPES__EntityMeta> {
3105
+ /**
3106
+ * Returns all features defined in the Container
3107
+ *
3108
+ * @returns
3109
+ */
3110
+ features(): Array<A_TYPES__FeatureDefineDecoratorMeta>;
3111
+ }
3112
+
3113
+ type A_TYPES__ContextEnvironment = 'server' | 'browser' | 'mobile' | 'desktop' | 'embedded' | 'unknown';
3114
+ type A_TYPES__FeatureExtendableMeta = A_ContainerMeta | A_ComponentMeta | A_EntityMeta;
3115
+
3116
+ declare class A_Context {
3117
+ /**
3118
+ * Default name of the application from environment variable A_CONCEPT_NAME
3119
+ *
3120
+ * [!] If environment variable is not set, it will default to 'a-concept'
3121
+ */
3122
+ static get concept(): string;
3123
+ /**
3124
+ * Root scope of the application from environment variable A_CONCEPT_ROOT_SCOPE
3125
+ *
3126
+ * [!] If environment variable is not set, it will default to 'root'
3127
+ */
3128
+ static get root(): A_Scope;
3129
+ /**
3130
+ * Environment the application is running in.
3131
+ * Can be either 'server' or 'browser'.
3132
+ * [!] Determined by checking if 'window' object is available.
3133
+ */
3134
+ static get environment(): A_TYPES__ContextEnvironment;
3135
+ /**
3136
+ * Singleton instance of the Context
3137
+ */
3138
+ private static _instance;
3139
+ /**
3140
+ * Root Scope of the Concept and Environment
3141
+ *
3142
+ * Root scope is the top-level scope that all other scopes inherit from.
3143
+ * It stores global configurations and settings and ALL SHAREABLE RESOURCES.
3144
+ *
3145
+ * [!] Root scope is created automatically when the Context is initialized.
3146
+ * [!] Root scope name can be configured using environment variable A_CONCEPT_ROOT_SCOPE
3147
+ */
3148
+ private _root;
3149
+ /**
3150
+ * A registry that keeps track of scopes for all components (Containers, Features, Commands)
3151
+ * Which can issue a scope allocation.
3152
+ */
3153
+ protected _registry: WeakMap<A_TYPES__ScopeLinkedComponents, A_Scope>;
3154
+ /**
3155
+ * This is a registry that stores an issuer of each scope allocation.
3156
+ * It helps to track which component (Container, Feature, Command) allocated a specific scope.
3157
+ */
3158
+ protected _scopeIssuers: WeakMap<A_Scope, A_TYPES__ScopeLinkedComponents>;
3159
+ /**
3160
+ * Stores a context associated with a specific component that depends on a scope.
3161
+ * uses for quick retrieval of the scope for the component.
3162
+ */
3163
+ protected _scopeStorage: WeakMap<A_TYPES_ScopeDependentComponents, A_Scope>;
3164
+ /**
3165
+ * Stores meta information for different component types by their constructors.
3166
+ * Meta provides to store extra information about the class behavior and configuration.
3167
+ */
3168
+ protected _metaStorage: Map<A_TYPES__MetaLinkedComponentConstructors, A_Meta>;
3169
+ /**
3170
+ * Private constructor to enforce singleton pattern.
3171
+ *
3172
+ * [!] This class should not be instantiated directly. Use A_Context.getInstance() instead.
3173
+ */
3174
+ private constructor();
3175
+ /**
3176
+ * Get the instance of the Namespace Provider.
3177
+ *
3178
+ * If the instance does not exist, it will be created.
3179
+ *
3180
+ * @returns
3181
+ */
3182
+ static getInstance(): A_Context;
3183
+ /**
3184
+ * Register method allows to register a component with a specific scope in the context.
3185
+ *
3186
+ * @param component - Component to register with a specific scope. Can be either A_Container, A_Feature.
3187
+ * @param scope - Scope to associate the component with.
3188
+ * @returns
3189
+ */
3190
+ static register(
3191
+ /**
3192
+ * Provide the scope that will be associated with the component.
3193
+ */
3194
+ scope: A_Scope,
3195
+ /**
3196
+ * Provide a component that needs to be registered with a specific scope.
3197
+ */
3198
+ component: A_TYPES_ScopeDependentComponents): A_Scope;
3199
+ /**
3200
+ * Deregister method allows to deregister a component from the context.
3201
+ *
3202
+ * @param component - Component to deregister from the context.
3203
+ */
3204
+ static deregister(
3205
+ /**
3206
+ * Provide a component that needs to be deregistered from the context.
3207
+ */
3208
+ component: A_TYPES_ScopeDependentComponents): void;
3209
+ /**
3210
+ * Allocate method instantiates a new scope for the given component and registers it in the context.
3211
+ * It bounds the component (Container, Feature) to a new scope that can be configured and used independently.
3212
+ *
3213
+ *
3214
+ * @param component - Component to allocate the scope for. Can be either A_Container, A_Feature.
3215
+ * @param importing - Configuration of the scope that will be created for the component.
3216
+ */
3217
+ static allocate(
3218
+ /**
3219
+ * Provide a component that needs a scope allocation.
3220
+ */
3221
+ component: A_TYPES__ScopeLinkedComponents): A_Scope;
3222
+ static allocate(
3223
+ /**
3224
+ * Provide a component that needs a scope allocation.
3225
+ */
3226
+ component: A_TYPES__ScopeLinkedComponents,
3227
+ /**
3228
+ * Provide the scope that will be used as a base for the new scope.
3229
+ */
3230
+ importing: A_Scope): A_Scope;
3231
+ static allocate(
3232
+ /**
3233
+ * Provide a component that needs a scope allocation.
3234
+ */
3235
+ component: A_TYPES__ScopeLinkedComponents,
3236
+ /**
3237
+ * Provide configuration for the scope that will be created for the component.
3238
+ */
3239
+ config: Partial<A_TYPES__Scope_Init & A_TYPES__ScopeConfig>): A_Scope;
3240
+ /**
3241
+ * Deallocate method removes the scope allocation for the given component from the context.
3242
+ *
3243
+ * @param component
3244
+ * @returns
3245
+ */
3246
+ static deallocate(
3247
+ /**
3248
+ * A Scope that needs to be deallocated.
3249
+ */
3250
+ scope: A_Scope): any;
3251
+ static deallocate(
3252
+ /**
3253
+ * Provide a component that needs to have its scope deallocated.
3254
+ */
3255
+ component: A_TYPES__ScopeLinkedComponents): any;
3256
+ /**
3257
+ * Get or Create Meta for the specific class or instance.
3258
+ * This method will return the existing meta if it exists, or create a new one if it doesn't.
3259
+ *
3260
+ * Meta object contains custom metadata based on the class type.
3261
+ *
3262
+ * @param container
3263
+ */
3264
+ static meta(
3265
+ /**
3266
+ * Get meta for the specific container class by constructor.
3267
+ */
3268
+ container: A_TYPES__Container_Constructor): A_ContainerMeta;
3269
+ static meta(
3270
+ /**
3271
+ * Get meta for the specific container instance.
3272
+ */
3273
+ container: A_Container): A_ContainerMeta;
3274
+ static meta(
3275
+ /**
3276
+ * Get meta for the specific entity class by constructor.
3277
+ */
3278
+ entity: A_TYPES__Entity_Constructor): A_EntityMeta;
3279
+ static meta(
3280
+ /**
3281
+ * Get meta for the specific entity instance.
3282
+ */
3283
+ entity: A_Entity): A_EntityMeta;
3284
+ static meta(
3285
+ /**
3286
+ * Get meta for the specific component class by constructor.
3287
+ */
3288
+ component: A_TYPES__Component_Constructor): A_ComponentMeta;
3289
+ static meta(
3290
+ /**
3291
+ * Get meta for the specific component instance.
3292
+ */
3293
+ component: A_Component): A_ComponentMeta;
3294
+ static meta(
3295
+ /**
3296
+ * Get meta for the specific component by its name.
3297
+ */
3298
+ component: string): A_ComponentMeta;
3299
+ static meta(
3300
+ /**
3301
+ * Get meta for the specific injectable target (class or instance).
3302
+ */
3303
+ target: A_TYPES__InjectableTargets): A_ComponentMeta;
3304
+ static meta<T extends Record<string, any>>(
3305
+ /**
3306
+ * Get meta for the specific class or instance
3307
+ */
3308
+ constructor: new (...args: any[]) => any): A_Meta<T>;
3309
+ /**
3310
+ *
3311
+ * This method allows to get the issuer of a specific scope.
3312
+ *
3313
+ * @param scope - Scope to get the issuer for.
3314
+ * @returns - Component that issued the scope.
3315
+ */
3316
+ static issuer(
3317
+ /**
3318
+ * Provide the scope to get its issuer.
3319
+ */
3320
+ scope: A_Scope): A_TYPES__ScopeLinkedComponents;
3321
+ /**
3322
+ * Get the scope of the specific class or instance.
3323
+ *
3324
+ * Every execution in Concept has its own scope.
3325
+ *
3326
+ * This method will return the scope of the specific class or instance.
3327
+ *
3328
+ * @param entity
3329
+ */
3330
+ static scope<T extends A_Entity>(
3331
+ /**
3332
+ * Provide an entity to get its scope.
3333
+ */
3334
+ entity: T): A_Scope;
3335
+ static scope<T extends A_Component>(
3336
+ /**
3337
+ * Provide a component to get its scope.
3338
+ */
3339
+ component: T): A_Scope;
3340
+ static scope<T extends A_Container>(
3341
+ /**
3342
+ * Provide a container to get its scope.
3343
+ */
3344
+ container: T): A_Scope;
3345
+ static scope<T extends A_Feature>(
3346
+ /**
3347
+ * Provide a feature to get its scope.
3348
+ */
3349
+ feature: T): A_Scope;
3350
+ static scope<T extends A_Fragment>(
3351
+ /**
3352
+ * Provide a fragment to get its scope.
3353
+ */
3354
+ fragment: T): A_Scope;
3355
+ /**
3356
+ * Returns a template of the feature that can be then used to create a new A-Feature Instance
3357
+ *
3358
+ * [!] 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.
3359
+ *
3360
+ * @param name
3361
+ */
3362
+ static featureTemplate(
3363
+ /**
3364
+ * Provide the name of the feature to get the template for. Regular expressions are also supported to match multiple features.
3365
+ */
3366
+ name: string | RegExp,
3367
+ /**
3368
+ * Provide the component to get the feature template from.
3369
+ */
3370
+ component: A_TYPES__FeatureAvailableComponents,
3371
+ /**
3372
+ * Provide the scope that dictates which components are active and can provide extensions for the feature.
3373
+ */
3374
+ scope?: A_Scope): Array<A_TYPES__A_StageStep>;
3375
+ /**
3376
+ * Returns all extensions for the specific feature in the specific component within the provided scope.
3377
+ * Scope dictates which components are active and can provide extensions for the feature.
3378
+ *
3379
+ * [!] This method only returns extensions, not the base feature definition.
3380
+ *
3381
+ * @param scope
3382
+ * @returns
3383
+ */
3384
+ static featureExtensions(
3385
+ /**
3386
+ * Provide the name of the feature to get the template for. Regular expressions are also supported to match multiple features.
3387
+ */
3388
+ name: string | RegExp,
3389
+ /**
3390
+ * Provide the component to get the feature template from.
3391
+ */
3392
+ component: A_TYPES__FeatureAvailableComponents,
3393
+ /**
3394
+ * Provide the scope that dictates which components are active and can provide extensions for the feature.
3395
+ */
3396
+ scope: A_Scope): Array<A_TYPES__A_StageStep>;
3397
+ /**
3398
+ * method helps to filter steps in a way that only the most derived classes are kept.
3399
+ *
3400
+ * @param scope
3401
+ * @param items
3402
+ * @returns
3403
+ */
3404
+ private filterToMostDerived;
3405
+ /**
3406
+ * This method returns the feature template definition without any extensions.
3407
+ * It can be used to retrieve the base template for a feature before any modifications are applied.
3408
+ *
3409
+ * [!] This method does not consider extensions from other components.
3410
+ *
3411
+ * @param feature
3412
+ * @param component
3413
+ * @returns
3414
+ */
3415
+ static featureDefinition(
3416
+ /**
3417
+ * Name of the feature to get the template for.
3418
+ * Regular expressions are also supported to match multiple features.
3419
+ */
3420
+ feature: string | RegExp,
3421
+ /**
3422
+ * Component to get the feature template from.
3423
+ */
3424
+ component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
3425
+ /**
3426
+ * Returns a definition of the abstraction that can be then used to create a new A-Feature Instance
3427
+ *
3428
+ * [!] 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.
3429
+ *
3430
+ * @param abstraction
3431
+ */
3432
+ static abstractionTemplate(
3433
+ /**
3434
+ * Provide the abstraction stage to get the definition for.
3435
+ */
3436
+ abstraction: A_TYPES__ConceptAbstractions,
3437
+ /**
3438
+ * Provide the component to get the abstraction definition from.
3439
+ */
3440
+ component: A_TYPES__FeatureAvailableComponents): Array<A_TYPES__A_StageStep>;
3441
+ static abstractionExtensions(
3442
+ /**
3443
+ * Provide the abstraction name 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
+ /**
3451
+ * Resets the Context to its initial state.
3452
+ */
3453
+ static reset(): void;
3454
+ /**
3455
+ * Type guard to check if the param is allowed for scope allocation.
3456
+ *
3457
+ * @param param
3458
+ * @returns
3459
+ */
3460
+ static isAllowedForScopeAllocation(param: any): param is A_TYPES__ScopeLinkedComponents;
3461
+ /**
3462
+ * Type guard to check if the param is allowed to be registered in the context.
3463
+ *
3464
+ * @param param
3465
+ * @returns
3466
+ */
3467
+ static isAllowedToBeRegistered(param: any): param is A_TYPES_ScopeDependentComponents;
3468
+ /**
3469
+ * Type guard to check if the param is allowed for meta storage.
3470
+ *
3471
+ * @param param
3472
+ * @returns
3473
+ */
3474
+ static isAllowedForMeta(param: any): param is A_TYPES__MetaLinkedComponents;
3475
+ /**
3476
+ * Type guard to check if the param is allowed for meta storage by constructor.
3477
+ *
3478
+ * @param param
3479
+ * @returns
3480
+ */
3481
+ static isAllowedForMetaConstructor(param: any): param is A_TYPES__MetaLinkedComponentConstructors;
3482
+ }
3483
+
3484
+ declare class A_ConceptMeta extends A_Meta<any> {
3485
+ private containers;
3486
+ constructor(containers: Array<A_Container>);
3487
+ }
3488
+
3489
+ declare class A_AbstractionError extends A_Error {
3490
+ /**
3491
+ * This error code indicates that there was an issue extending the abstraction execution
3492
+ */
3493
+ static readonly AbstractionExtensionError = "Unable to extend abstraction execution";
3494
+ }
3495
+
3496
+ declare class A_CallerError extends A_Error {
3497
+ /**
3498
+ * This error code indicates that there was an issue initializing the A-Caller
3499
+ */
3500
+ static readonly CallerInitializationError = "Unable to initialize A-Caller";
3501
+ }
3502
+
3503
+ declare class ASEID_Error extends A_Error {
3504
+ static readonly ASEIDInitializationError = "ASEID Initialization Error";
3505
+ static readonly ASEIDValidationError = "ASEID Validation Error";
3506
+ }
3507
+
3508
+ declare class A_ScopeError extends A_Error {
3509
+ static readonly InitializationError = "A-Scope Initialization Error";
3510
+ static readonly ConstructorError = "Unable to construct A-Scope instance";
3511
+ static readonly ResolutionError = "A-Scope Resolution Error";
3512
+ static readonly RegistrationError = "A-Scope Registration Error";
3513
+ static readonly CircularInheritanceError = "A-Scope Circular Inheritance Error";
3514
+ }
3515
+
3516
+ /**
3517
+ * A-Dependency require decorator return type
3518
+ */
3519
+ type A_TYPES__A_Dependency_RequireDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3520
+ /**
3521
+ * A-Dependency load decorator return type
3522
+ */
3523
+ type A_TYPES__A_Dependency_LoadDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3524
+ /**
3525
+ * A-Dependency default decorator return type
3526
+ */
3527
+ type A_TYPES__A_Dependency_DefaultDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
3528
+
3529
+ /**
3530
+ * Should indicate which Default is required
3531
+ */
3532
+ declare function A_Dependency_Default(
3533
+ /**
3534
+ * Constructor Parameters that will be used to create the default instance
3535
+ */
3536
+ ...args: any[]): A_TYPES__A_Dependency_DefaultDecoratorReturn;
3537
+
3538
+ /**
3539
+ * Should indicate which Load is required
3540
+ */
3541
+ declare function A_Dependency_Load(
3542
+ /**
3543
+ * Path to load the dependency from
3544
+ */
3545
+ path: string): A_TYPES__A_Dependency_LoadDecoratorReturn;
3546
+
3547
+ /**
3548
+ * Should indicate which dependency is required
3549
+ */
3550
+ declare function A_Dependency_Require(): A_TYPES__A_Dependency_RequireDecoratorReturn;
3551
+
3552
+ declare class A_Dependency {
3553
+ /**
3554
+ * Allows to indicate which Injected parameter is required
3555
+ *
3556
+ * [!] If parameter marked as required is not provided, an error will be thrown
3557
+ *
3558
+ * @returns
3559
+ */
3560
+ static get Required(): typeof A_Dependency_Require;
3561
+ /**
3562
+ * Allows to indicate which dependency should be loaded from a specific path
3563
+ *
3564
+ * @returns
3565
+ */
3566
+ static get Loaded(): typeof A_Dependency_Load;
3567
+ /**
3568
+ * Allows to indicate which dependency default parameters should be used
3569
+ *
3570
+ * @returns
3571
+ */
3572
+ static get Default(): typeof A_Dependency_Default;
3573
+ }
3574
+
3575
+ declare class A_DependencyError extends A_Error {
3576
+ static readonly InvalidDependencyTarget = "Invalid Dependency Target";
3577
+ static readonly InvalidLoadTarget = "Invalid Load Target";
3578
+ static readonly InvalidLoadPath = "Invalid Load Path";
3579
+ static readonly InvalidDefaultTarget = "Invalid Default Target";
3580
+ }
3581
+
3582
+ /**
3583
+ * A-Inject decorator
3584
+ *
3585
+ * This Decorator allows to inject dependencies into the module like
3586
+ * - Namespaces
3587
+ * - Other Concepts
3588
+ * - or maybe Components
3589
+ *
3590
+ * @param params - see overloads
3591
+ * @returns - decorator function
3592
+ */
3593
+ declare function A_Inject<T extends A_Scope>(
3594
+ /***
3595
+ * Provide the Scope constructor that will be associated with the injection.
3596
+ *
3597
+ * [!] It returns an instance of the Scope where the Entity/Component/Container is defined.
3598
+ */
3599
+ scope: A_TYPES__Scope_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3600
+ declare function A_Inject<T extends A_Feature>(
3601
+ /**
3602
+ * Provide the Feature constructor that will be associated with the injection.
3603
+ *
3604
+ * [!] It returns an Instance of the Feature what is executed.
3605
+ */
3606
+ feature: A_TYPES__Feature_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3607
+ declare function A_Inject<T extends A_Component>(
3608
+ /**
3609
+ * Provide the Component constructor that will be associated with the injection.
3610
+ *
3611
+ * [!] It returns an Instance of the Component from current Scope or from Parent Scopes.
3612
+ */
3613
+ component: A_TYPES__Component_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3614
+ declare function A_Inject(
3615
+ /**
3616
+ * Provide the A_Caller constructor to inject the Caller instance
3617
+ *
3618
+ * [!] It returns initiator of the call, e.g. Container/Component/Command who called Feature
3619
+ */
3620
+ caller: typeof A_Caller): A_TYPES__A_InjectDecoratorReturn;
3621
+ declare function A_Inject<T extends A_Fragment>(
3622
+ /**
3623
+ * Provide the Fragment constructor to inject the Fragment instance
3624
+ *
3625
+ * [!] It returns the Fragment instance from current Scope or from Parent Scopes.
3626
+ */
3627
+ fragment: A_TYPES__Fragment_Constructor<T>): A_TYPES__A_InjectDecoratorReturn;
3628
+ declare function A_Inject<T extends A_Entity>(
3629
+ /**
3630
+ * Provide the Entity constructor to inject the Entity instance
3631
+ *
3632
+ * [!] Note: It returns the Entity instance from current Scope or from Parent Scopes.
3633
+ * [!] Note: If instance has more than one Entity of the same type It returns FIRST found Entity
3634
+ * [!] Note: Use 'config' to specify to inject specific one or even Array of Entities
3635
+ */
3636
+ entity: A_TYPES__Entity_Constructor<T>,
3637
+ /**
3638
+ * Provide additional instructions on how to perform the injection
3639
+ *
3640
+ * [!] Default Pagination is 1 if it's necessary to get multiple Entities please customize it in the instructions
3641
+ */
3642
+ config?: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T>>): A_TYPES__A_InjectDecoratorReturn<T>;
3643
+ declare function A_Inject<T extends A_Component>(
3644
+ /**
3645
+ * Provide the name of Component constructor to inject the Component instance
3646
+ *
3647
+ * [!] You can use both customized one or original depending on your overriding strategy
3648
+ */
3649
+ ctor: string): A_TYPES__A_InjectDecoratorReturn;
3650
+
3651
+ declare class A_CommonHelper {
3652
+ /**
3653
+ * A simple promise that resolves immediately.
3654
+ * Can be used in async functions to create a resolved promise.
3655
+ */
3656
+ static resolve(): Promise<void>;
3657
+ /**
3658
+ * Check if a class is inherited from another class
3659
+ *
3660
+ * @param childClass
3661
+ * @param parentClass
3662
+ * @returns
3663
+ */
3664
+ static isInheritedFrom(childClass: any, parentClass: any): boolean;
3665
+ /**
3666
+ * Omit properties from an object or array with nested objects
3667
+ *
3668
+ * @param input
3669
+ * @param paths
3670
+ * @returns
3671
+ */
3672
+ static omitProperties<T, S extends string>(input: T, paths: string[]): Omit<T, S>;
3673
+ static isObject(item: unknown): item is Record<string, any>;
3674
+ static deepMerge<T = any>(target: any, source: any, visited?: Map<any, any>): T;
3675
+ static deepClone<T>(target: T): T;
3676
+ static deepCloneAndMerge<T>(target: A_TYPES__DeepPartial<T>, source: T): T;
3677
+ /**
3678
+ * Get a readable name for a component (string, class, function, React element, instance, etc.)
3679
+ *
3680
+ * Covers:
3681
+ * - string tags ("div")
3682
+ * - symbols (Symbol.for('xxx'))
3683
+ * - functions and classes (with name or displayName)
3684
+ * - React elements (object with `type`)
3685
+ * - component instances (constructor.name)
3686
+ * - objects with custom toString returning meaningful info
3687
+ *
3688
+ * Falls back to sensible defaults ("Unknown" / "Anonymous").
3689
+ */
3690
+ static getComponentName(component: any): string;
3691
+ }
3692
+
3693
+ /**
3694
+ * A_FormatterHelper
3695
+ *
3696
+ * Helper class for formatting strings into different cases.
3697
+ */
3698
+ declare class A_FormatterHelper {
3699
+ /**
3700
+ * Convert string to UPPER_SNAKE_CASE
3701
+ *
3702
+ * @param str
3703
+ * @returns
3704
+ */
3705
+ static toUpperSnakeCase(str: string): string;
3706
+ /**
3707
+ * Convert string to camelCase
3708
+ *
3709
+ * @param str
3710
+ * @returns
3711
+ */
3712
+ static toCamelCase(str: string): string;
3713
+ /**
3714
+ * Convert string to PascalCase
3715
+ *
3716
+ * @param str
3717
+ * @returns
3718
+ */
3719
+ static toPascalCase(str: string): string;
3720
+ /**
3721
+ * Convert string to kebab-case
3722
+ *
3723
+ * @param str
3724
+ * @returns
3725
+ */
3726
+ static toKebabCase(str: string): string;
3727
+ }
3728
+
3729
+ type A_ID_TYPES__TimeId_Parts = {
3730
+ timestamp: Date;
3731
+ random: string;
3732
+ };
3733
+ declare class A_IdentityHelper {
3734
+ /**
3735
+ * Generates a short, time-based unique ID.
3736
+ * Encodes current time (ms since epoch) and random bits in base36.
3737
+ * Example: "mb4f1g-7f9a1c"
3738
+ */
3739
+ static generateTimeId(parts?: A_ID_TYPES__TimeId_Parts): string;
3740
+ /**
3741
+ * Parses a short ID back into its parts.
3742
+ * Returns an object with the original timestamp (as Date) and random string.
3743
+ */
3744
+ static parseTimeId(id: string): A_ID_TYPES__TimeId_Parts;
3745
+ /**
3746
+ * Format a number with leading zeros to a fixed length
3747
+ *
3748
+ * @param number
3749
+ * @param maxZeros
3750
+ * @returns
3751
+ */
3752
+ static formatWithLeadingZeros(number: any, maxZeros?: number): string;
3753
+ /**
3754
+ * Remove leading zeros from a formatted number
3755
+ */
3756
+ static removeLeadingZeros(formattedNumber: any): string;
3757
+ }
3758
+
3759
+ declare class A_StepManagerError extends A_Error {
3760
+ static readonly CircularDependencyError = "A-StepManager Circular Dependency Error";
3761
+ }
3762
+
3763
+ declare class A_TypeGuards {
3764
+ /**
3765
+ * Check if value is a string
3766
+ *
3767
+ * @param value
3768
+ * @returns
3769
+ */
3770
+ static isString(value: any): value is string;
3771
+ /**
3772
+ * Check if value is a number
3773
+ *
3774
+ * @param value
3775
+ * @returns
3776
+ */
3777
+ static isNumber(value: any): value is number;
3778
+ /**
3779
+ * Check if value is a boolean
3780
+ *
3781
+ * @param value
3782
+ * @returns
3783
+ */
3784
+ static isBoolean(value: any): value is boolean;
3785
+ /**
3786
+ * Check if value is an array
3787
+ *
3788
+ * @param value
3789
+ * @returns
3790
+ */
3791
+ static isArray(value: any): value is Array<any>;
3792
+ /**
3793
+ * Check if value is an object
3794
+ *
3795
+ * @param value
3796
+ * @returns
3797
+ */
3798
+ static isObject<T extends Object = Object>(value: any): value is T;
3799
+ /**
3800
+ * Check if value is a function
3801
+ *
3802
+ * @param value
3803
+ * @returns
3804
+ */
3805
+ static isFunction(value: any): value is Function;
3806
+ static isUndefined(value: any): value is undefined;
3807
+ static isRegExp(value: any): value is RegExp;
3808
+ /**
3809
+ * Type guard to check if the constructor is of type A_Container
3810
+ *
3811
+ * @param ctor
3812
+ * @returns
3813
+ */
3814
+ static isContainerConstructor(ctor: any): ctor is A_TYPES__Container_Constructor;
3815
+ /**
3816
+ * Type guard to check if the constructor is of type A_Component
3817
+ *
3818
+ * @param ctor
3819
+ * @returns
3820
+ */
3821
+ static isComponentConstructor(ctor: any): ctor is A_TYPES__Component_Constructor;
3822
+ /**
3823
+ * Type guard to check if the constructor is of type A_Fragment
3824
+ *
3825
+ * @param ctor
3826
+ * @returns
3827
+ */
3828
+ static isFragmentConstructor(ctor: any): ctor is A_TYPES__Fragment_Constructor;
3829
+ /**
3830
+ * Type guard to check if the constructor is of type A_Entity
3831
+ *
3832
+ * @param ctor
3833
+ * @returns
3834
+ */
3835
+ static isEntityConstructor(ctor: any): ctor is A_TYPES__Entity_Constructor;
3836
+ /**
3837
+ * Type guard to check if the constructor is of type A_Scope
3838
+ *
3839
+ * @param ctor
3840
+ * @returns
3841
+ */
3842
+ static isScopeConstructor(ctor: any): ctor is A_TYPES__Scope_Constructor;
3843
+ /**
3844
+ * Type guard to check if the constructor is of type A_Scope
3845
+ *
3846
+ * @param ctor
3847
+ * @returns
3848
+ */
3849
+ static isErrorConstructor(ctor: any): ctor is A_TYPES__Error_Constructor;
3850
+ /**
3851
+ * Type guard to check if the constructor is of type A_Feature
3852
+ *
3853
+ * @param ctor
3854
+ * @returns
3855
+ */
3856
+ static isFeatureConstructor(ctor: any): ctor is A_TYPES__Feature_Constructor;
3857
+ /**
3858
+ * Type guard to check if the constructor is of type A_Caller
3859
+ *
3860
+ * @param ctor
3861
+ * @returns
3862
+ */
3863
+ static isCallerConstructor(ctor: any): ctor is A_TYPES__Caller_Constructor;
3864
+ /**
3865
+ * Type guard to check if the instance is of type A_Container
3866
+ *
3867
+ * @param instance
3868
+ * @returns
3869
+ */
3870
+ static isContainerInstance(instance: any): instance is A_Container;
3871
+ /**
3872
+ * Type guard to check if the instance is of type A_Component
3873
+ *
3874
+ * @param instance
3875
+ * @returns
3876
+ */
3877
+ static isComponentInstance(instance: any): instance is A_Component;
3878
+ /**
3879
+ * Type guard to check if the instance is of type A_Feature
3880
+ *
3881
+ * @param instance
3882
+ * @returns
3883
+ */
3884
+ static isFeatureInstance(instance: any): instance is A_Feature;
3885
+ /**
3886
+ * Type guard to check if the instance is of type A_Fragment
3887
+ *
3888
+ * @param instance
3889
+ * @returns
3890
+ */
3891
+ static isFragmentInstance(instance: any): instance is A_Fragment;
3892
+ /**
3893
+ * Type guard to check if the instance is of type A_Entity
3894
+ *
3895
+ * @param instance
3896
+ * @returns
3897
+ */
3898
+ static isEntityInstance(instance: any): instance is A_Entity;
3899
+ /**
3900
+ * Type guard to check if the instance is of type A_Scope
3901
+ *
3902
+ * @param instance
3903
+ * @returns
3904
+ */
3905
+ static isScopeInstance(instance: any): instance is A_Scope;
3906
+ /**
3907
+ * Type guard to check if the instance is of type A_Error
3908
+ *
3909
+ * @param instance
3910
+ * @returns
3911
+ */
3912
+ static isErrorInstance(instance: any): instance is A_Error;
3913
+ /**
3914
+ * Type guard to check if the instance is of type A_ComponentMeta
3915
+ *
3916
+ * @param instance
3917
+ * @returns
3918
+ */
3919
+ static isComponentMetaInstance(instance: any): instance is A_ComponentMeta;
3920
+ /**
3921
+ * Type guard to check if the instance is of type A_ContainerMeta
3922
+ *
3923
+ * @param instance
3924
+ * @returns
3925
+ */
3926
+ static isContainerMetaInstance(instance: any): instance is A_ContainerMeta;
3927
+ /**
3928
+ * Type guard to check if the instance is of type A_EntityMeta
3929
+ *
3930
+ * @param instance
3931
+ * @returns
3932
+ */
3933
+ static isEntityMetaInstance(instance: any): instance is A_EntityMeta;
3934
+ static isConstructorAllowedForScopeAllocation(target: any): target is A_TYPES__ScopeLinkedConstructors;
3935
+ static isInstanceAllowedForScopeAllocation(target: any): target is A_TYPES__ScopeLinkedComponents;
3936
+ static isConstructorAvailableForAbstraction(target: any): target is A_TYPES__AbstractionAvailableComponents;
3937
+ static isTargetAvailableForInjection(target: any): target is A_TYPES__InjectableTargets;
3938
+ static isAllowedForFeatureCall(param: any): param is A_TYPES__FeatureAvailableComponents;
3939
+ static isAllowedForFeatureDefinition(param: any): param is A_TYPES__FeatureAvailableComponents;
3940
+ static isAllowedForFeatureExtension(param: any): param is A_TYPES__FeatureExtendDecoratorTarget;
3941
+ static isAllowedForAbstractionDefinition(param: any): param is A_TYPES__AbstractionAvailableComponents;
3942
+ static isAllowedForDependencyDefaultCreation(param: any): param is A_TYPES__Entity_Constructor | A_TYPES__Component_Constructor;
3943
+ /**
3944
+ * Allows to check if the provided param is of constructor type.
3945
+ *
3946
+ * @param param
3947
+ * @returns
3948
+ */
3949
+ static isConstructorType<T extends A_TYPES__Error_Init>(param: any): param is T;
3950
+ }
3951
+
3952
+ 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__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 };