@adaas/a-utils 0.0.8 → 0.1.1

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 (172) hide show
  1. package/.nvmrc +1 -1
  2. package/dist/index.d.ts +21 -14
  3. package/dist/index.js +53 -20
  4. package/dist/index.js.map +1 -1
  5. package/dist/src/constants/errors.constants.d.ts +0 -65
  6. package/dist/src/constants/errors.constants.js +0 -72
  7. package/dist/src/constants/errors.constants.js.map +1 -1
  8. package/dist/src/lib/A-Channel/A-Channel.component.d.ts +3 -0
  9. package/dist/src/lib/A-Channel/A-Channel.component.js +8 -0
  10. package/dist/src/lib/A-Channel/A-Channel.component.js.map +1 -0
  11. package/dist/src/lib/A-Channel/A-Channel.error.d.ts +3 -0
  12. package/dist/src/lib/A-Channel/A-Channel.error.js +8 -0
  13. package/dist/src/lib/A-Channel/A-Channel.error.js.map +1 -0
  14. package/dist/src/lib/A-Channel/A-Channel.types.d.ts +0 -0
  15. package/dist/src/lib/A-Channel/A-Channel.types.js +2 -0
  16. package/dist/src/lib/A-Channel/A-Channel.types.js.map +1 -0
  17. package/dist/src/lib/A-Command/A-Command.constants.d.ts +22 -0
  18. package/dist/src/lib/A-Command/A-Command.constants.js +28 -0
  19. package/dist/src/lib/A-Command/A-Command.constants.js.map +1 -0
  20. package/dist/src/lib/A-Command/A-Command.entity.d.ts +133 -0
  21. package/dist/src/lib/A-Command/A-Command.entity.js +273 -0
  22. package/dist/src/lib/A-Command/A-Command.entity.js.map +1 -0
  23. package/dist/src/lib/A-Command/A-Command.error.d.ts +3 -0
  24. package/dist/src/lib/A-Command/A-Command.error.js +8 -0
  25. package/dist/src/lib/A-Command/A-Command.error.js.map +1 -0
  26. package/dist/src/lib/A-Command/A-Command.types.d.ts +73 -0
  27. package/dist/src/lib/A-Command/A-Command.types.js +4 -0
  28. package/dist/src/lib/A-Command/A-Command.types.js.map +1 -0
  29. package/dist/src/lib/A-Config/A-Config.constants.d.ts +3 -0
  30. package/dist/src/lib/A-Config/A-Config.constants.js +6 -0
  31. package/dist/src/lib/A-Config/A-Config.constants.js.map +1 -0
  32. package/dist/src/lib/A-Config/A-Config.container.d.ts +8 -0
  33. package/dist/src/lib/A-Config/A-Config.container.js +75 -0
  34. package/dist/src/lib/A-Config/A-Config.container.js.map +1 -0
  35. package/dist/src/lib/A-Config/A-Config.context.d.ts +29 -0
  36. package/dist/src/lib/A-Config/A-Config.context.js +63 -0
  37. package/dist/src/lib/A-Config/A-Config.context.js.map +1 -0
  38. package/dist/src/lib/A-Config/A-Config.error.d.ts +4 -0
  39. package/dist/src/lib/A-Config/A-Config.error.js +9 -0
  40. package/dist/src/lib/A-Config/A-Config.error.js.map +1 -0
  41. package/dist/src/lib/A-Config/A-Config.types.d.ts +19 -0
  42. package/dist/src/lib/A-Config/A-Config.types.js +7 -0
  43. package/dist/src/lib/A-Config/A-Config.types.js.map +1 -0
  44. package/dist/src/lib/A-Config/components/ConfigReader.component.d.ts +30 -0
  45. package/dist/src/lib/A-Config/components/ConfigReader.component.js +85 -0
  46. package/dist/src/lib/A-Config/components/ConfigReader.component.js.map +1 -0
  47. package/dist/src/lib/A-Config/components/ENVConfigReader.component.d.ts +10 -0
  48. package/dist/src/lib/A-Config/components/ENVConfigReader.component.js +37 -0
  49. package/dist/src/lib/A-Config/components/ENVConfigReader.component.js.map +1 -0
  50. package/dist/src/lib/A-Config/components/FileConfigReader.component.d.ts +11 -0
  51. package/dist/src/lib/A-Config/components/FileConfigReader.component.js +47 -0
  52. package/dist/src/lib/A-Config/components/FileConfigReader.component.js.map +1 -0
  53. package/dist/src/lib/A-Logger/A-Logger.component.d.ts +29 -0
  54. package/dist/src/lib/A-Logger/A-Logger.component.js +152 -0
  55. package/dist/src/lib/A-Logger/A-Logger.component.js.map +1 -0
  56. package/dist/src/lib/A-Logger/A-Logger.types.d.ts +0 -0
  57. package/dist/src/lib/A-Logger/A-Logger.types.js +2 -0
  58. package/dist/src/lib/A-Logger/A-Logger.types.js.map +1 -0
  59. package/dist/src/lib/A-Memory/A-Memory.context.d.ts +64 -0
  60. package/dist/src/lib/A-Memory/A-Memory.context.js +105 -0
  61. package/dist/src/lib/A-Memory/A-Memory.context.js.map +1 -0
  62. package/dist/src/lib/A-Polyfill/A-Polyfill.component.d.ts +20 -0
  63. package/dist/src/lib/A-Polyfill/A-Polyfill.component.js +53 -0
  64. package/dist/src/lib/A-Polyfill/A-Polyfill.component.js.map +1 -0
  65. package/dist/src/{global/A_Polyfills.d.ts → lib/A-Polyfill/A-Polyfill.types.d.ts} +1 -13
  66. package/dist/src/lib/A-Polyfill/A-Polyfill.types.js +2 -0
  67. package/dist/src/lib/A-Polyfill/A-Polyfill.types.js.map +1 -0
  68. package/dist/src/lib/A-Polyfill/A-Polyfills.class.d.ts +10 -0
  69. package/dist/src/{global/A_Polyfills.js → lib/A-Polyfill/A-Polyfills.class.js} +4 -4
  70. package/dist/src/lib/A-Polyfill/A-Polyfills.class.js.map +1 -0
  71. package/dist/src/{global/A_Deferred.class.d.ts → lib/A-Schedule/A-Deferred.class.d.ts} +4 -0
  72. package/dist/src/{global/A_Deferred.class.js → lib/A-Schedule/A-Deferred.class.js} +5 -1
  73. package/dist/src/lib/A-Schedule/A-Deferred.class.js.map +1 -0
  74. package/dist/src/lib/A-Schedule/A-Schedule.component.d.ts +57 -0
  75. package/dist/src/lib/A-Schedule/A-Schedule.component.js +49 -0
  76. package/dist/src/lib/A-Schedule/A-Schedule.component.js.map +1 -0
  77. package/dist/src/{types/A_ScheduleObject.types.d.ts → lib/A-Schedule/A-Schedule.types.d.ts} +2 -1
  78. package/dist/src/{types/ASEID.types.js → lib/A-Schedule/A-Schedule.types.js} +1 -3
  79. package/dist/src/lib/A-Schedule/A-Schedule.types.js.map +1 -0
  80. package/dist/src/lib/A-Schedule/A-ScheduleObject.class.d.ts +29 -0
  81. package/dist/src/{global/A_ScheduleObject.class.js → lib/A-Schedule/A-ScheduleObject.class.js} +25 -5
  82. package/dist/src/lib/A-Schedule/A-ScheduleObject.class.js.map +1 -0
  83. package/index.ts +23 -47
  84. package/jest.config.ts +3 -3
  85. package/package.json +6 -6
  86. package/src/constants/errors.constants.ts +0 -78
  87. package/src/lib/A-Channel/A-Channel.component.ts +8 -0
  88. package/src/lib/A-Channel/A-Channel.error.ts +6 -0
  89. package/src/lib/A-Channel/A-Channel.types.ts +0 -0
  90. package/src/lib/A-Command/A-Command.constants.ts +31 -0
  91. package/src/lib/A-Command/A-Command.entity.ts +327 -0
  92. package/src/lib/A-Command/A-Command.error.ts +6 -0
  93. package/src/lib/A-Command/A-Command.types.ts +100 -0
  94. package/src/lib/A-Config/A-Config.constants.ts +13 -0
  95. package/src/lib/A-Config/A-Config.container.ts +63 -0
  96. package/src/lib/A-Config/A-Config.context.ts +117 -0
  97. package/src/lib/A-Config/A-Config.error.ts +7 -0
  98. package/src/lib/A-Config/A-Config.types.ts +26 -0
  99. package/src/lib/A-Config/components/ConfigReader.component.ts +67 -0
  100. package/src/lib/A-Config/components/ENVConfigReader.component.ts +31 -0
  101. package/src/lib/A-Config/components/FileConfigReader.component.ts +42 -0
  102. package/src/lib/A-Logger/A-Logger.component.ts +190 -0
  103. package/src/lib/A-Logger/A-Logger.types.ts +0 -0
  104. package/src/lib/A-Memory/A-Memory.context.ts +115 -0
  105. package/src/lib/A-Polyfill/A-Polyfill.component.ts +45 -0
  106. package/src/lib/A-Polyfill/A-Polyfill.types.ts +10 -0
  107. package/src/{global/A_Polyfills.ts → lib/A-Polyfill/A-Polyfills.class.ts} +2 -16
  108. package/src/{global/A_Deferred.class.ts → lib/A-Schedule/A-Deferred.class.ts} +4 -0
  109. package/src/lib/A-Schedule/A-Schedule.component.ts +89 -0
  110. package/src/{types/A_ScheduleObject.types.ts → lib/A-Schedule/A-Schedule.types.ts} +7 -2
  111. package/src/{global/A_ScheduleObject.class.ts → lib/A-Schedule/A-ScheduleObject.class.ts} +25 -7
  112. package/tests/A-Channel.test.ts +16 -0
  113. package/tests/A-Command.test.ts +133 -0
  114. package/tests/A-Config.test.ts +185 -0
  115. package/tests/A-Polyfill.test.ts +67 -0
  116. package/tests/A-Schedule.test.ts +84 -0
  117. package/tests/jest.setup.ts +35 -0
  118. package/tsconfig.build.json +56 -0
  119. package/tsconfig.json +2 -2
  120. package/dist/src/global/ASEID.class.d.ts +0 -77
  121. package/dist/src/global/ASEID.class.js +0 -129
  122. package/dist/src/global/ASEID.class.js.map +0 -1
  123. package/dist/src/global/A_Deferred.class.js.map +0 -1
  124. package/dist/src/global/A_Entity.class.d.ts +0 -49
  125. package/dist/src/global/A_Entity.class.js +0 -94
  126. package/dist/src/global/A_Entity.class.js.map +0 -1
  127. package/dist/src/global/A_Error.class.d.ts +0 -13
  128. package/dist/src/global/A_Error.class.js +0 -63
  129. package/dist/src/global/A_Error.class.js.map +0 -1
  130. package/dist/src/global/A_Polyfills.js.map +0 -1
  131. package/dist/src/global/A_ScheduleObject.class.d.ts +0 -9
  132. package/dist/src/global/A_ScheduleObject.class.js.map +0 -1
  133. package/dist/src/global/A_ServerError.class.d.ts +0 -13
  134. package/dist/src/global/A_ServerError.class.js +0 -57
  135. package/dist/src/global/A_ServerError.class.js.map +0 -1
  136. package/dist/src/helpers/A_Common.helper.d.ts +0 -42
  137. package/dist/src/helpers/A_Common.helper.js +0 -214
  138. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  139. package/dist/src/helpers/A_Schedule.helper.d.ts +0 -6
  140. package/dist/src/helpers/A_Schedule.helper.js +0 -21
  141. package/dist/src/helpers/A_Schedule.helper.js.map +0 -1
  142. package/dist/src/types/ASEID.types.d.ts +0 -65
  143. package/dist/src/types/ASEID.types.js.map +0 -1
  144. package/dist/src/types/A_Common.types.d.ts +0 -59
  145. package/dist/src/types/A_Common.types.js +0 -3
  146. package/dist/src/types/A_Common.types.js.map +0 -1
  147. package/dist/src/types/A_Entity.types.d.ts +0 -13
  148. package/dist/src/types/A_Entity.types.js +0 -4
  149. package/dist/src/types/A_Entity.types.js.map +0 -1
  150. package/dist/src/types/A_Error.type.d.ts +0 -7
  151. package/dist/src/types/A_Error.type.js +0 -3
  152. package/dist/src/types/A_Error.type.js.map +0 -1
  153. package/dist/src/types/A_Error.types.d.ts +0 -7
  154. package/dist/src/types/A_Error.types.js +0 -3
  155. package/dist/src/types/A_Error.types.js.map +0 -1
  156. package/dist/src/types/A_ScheduleObject.types.js +0 -3
  157. package/dist/src/types/A_ScheduleObject.types.js.map +0 -1
  158. package/dist/src/types/A_ServerError.types.d.ts +0 -4
  159. package/dist/src/types/A_ServerError.types.js +0 -3
  160. package/dist/src/types/A_ServerError.types.js.map +0 -1
  161. package/src/global/ASEID.class.ts +0 -208
  162. package/src/global/A_Error.class.ts +0 -88
  163. package/src/global/A_ServerError.class.ts +0 -70
  164. package/src/helpers/A_Common.helper.ts +0 -265
  165. package/src/helpers/A_Schedule.helper.ts +0 -25
  166. package/src/types/ASEID.types.ts +0 -86
  167. package/src/types/A_Common.types.ts +0 -111
  168. package/src/types/A_Entity.types.ts +0 -17
  169. package/src/types/A_Error.types.ts +0 -10
  170. package/src/types/A_ServerError.types.ts +0 -7
  171. package/tests/default.test.ts +0 -160
  172. package/tests/polyfill.test.ts +0 -37
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v20.10.0
1
+ v22.20.0
package/dist/index.d.ts CHANGED
@@ -1,14 +1,21 @@
1
- export { A_CommonHelper } from './src/helpers/A_Common.helper';
2
- export { A_ScheduleHelper } from './src/helpers/A_Schedule.helper';
3
- export { A_Error } from './src/global/A_Error.class';
4
- export { A_ServerError } from './src/global/A_ServerError.class';
5
- export { ASEID } from './src/global/ASEID.class';
6
- export { A_ScheduleObject } from './src/global/A_ScheduleObject.class';
7
- export { A_Polyfills } from './src/global/A_Polyfills';
8
- export { A_CONSTANTS__ERROR_CODES } from './src/constants/errors.constants';
9
- export { A_TYPES__DeepPartial, A_TYPES__Dictionary, A_TYPES__ObjectKeyEnum, A_TYPES__Required, A_TYPES__Paths, A_TYPES__PathsToObject, A_TYPES__UnionToIntersection, A_TYPES__ExtractProperties, A_TYPES__ExtractNested, A_TYPES__NonObjectPaths } from './src/types/A_Common.types';
10
- export { A_TYPES__IAEntity, A_TYPES__AEntity_JSON } from './src/types/A_Entity.types';
11
- export { A_TYPES__ScheduleObjectConfig } from './src/types/A_ScheduleObject.types';
12
- export { A_TYPES__Error } from './src/types/A_Error.types';
13
- export { A_TYPES__ServerError } from './src/types/A_ServerError.types';
14
- export { A_TYPES__ASEID_Constructor, A_TYPES__ASEID_ConstructorConfig, A_TYPES__ASEID_JSON } from './src/types/ASEID.types';
1
+ export { A_Channel } from './src/lib/A-Channel/A-Channel.component';
2
+ export { A_ChannelError } from './src/lib/A-Channel/A-Channel.error';
3
+ export { A_Command } from './src/lib/A-Command/A-Command.entity';
4
+ export { A_CommandError } from './src/lib/A-Command/A-Command.error';
5
+ export * from './src/lib/A-Command/A-Command.types';
6
+ export * from './src/lib/A-Command/A-Command.constants';
7
+ export { A_ConfigLoader } from './src/lib/A-Config/A-Config.container';
8
+ export { A_Config } from './src/lib/A-Config/A-Config.context';
9
+ export { A_ConfigError } from './src/lib/A-Config/A-Config.error';
10
+ export { ConfigReader } from './src/lib/A-Config/components/ConfigReader.component';
11
+ export { ENVConfigReader } from './src/lib/A-Config/components/ENVConfigReader.component';
12
+ export { FileConfigReader } from './src/lib/A-Config/components/FileConfigReader.component';
13
+ export * from './src/lib/A-Config/A-Config.types';
14
+ export * from './src/lib/A-Config/A-Config.constants';
15
+ export { A_Memory } from './src/lib/A-Memory/A-Memory.context';
16
+ export { A_Polyfill } from './src/lib/A-Polyfill/A-Polyfill.component';
17
+ export { A_PolyfillClass } from './src/lib/A-Polyfill/A-Polyfills.class';
18
+ export { A_Schedule } from './src/lib/A-Schedule/A-Schedule.component';
19
+ export * from './src/lib/A-Schedule/A-Schedule.types';
20
+ export { A_ScheduleObject } from './src/lib/A-Schedule/A-ScheduleObject.class';
21
+ export { A_Deferred } from './src/lib/A-Schedule/A-Deferred.class';
package/dist/index.js CHANGED
@@ -1,24 +1,57 @@
1
1
  "use strict";
2
- // ====================== EXPORTS ======================
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
3
16
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.A_CONSTANTS__ERROR_CODES = exports.A_Polyfills = exports.A_ScheduleObject = exports.ASEID = exports.A_ServerError = exports.A_Error = exports.A_ScheduleHelper = exports.A_CommonHelper = void 0;
5
- // --- Helpers ---
6
- var A_Common_helper_1 = require("./src/helpers/A_Common.helper");
7
- Object.defineProperty(exports, "A_CommonHelper", { enumerable: true, get: function () { return A_Common_helper_1.A_CommonHelper; } });
8
- var A_Schedule_helper_1 = require("./src/helpers/A_Schedule.helper");
9
- Object.defineProperty(exports, "A_ScheduleHelper", { enumerable: true, get: function () { return A_Schedule_helper_1.A_ScheduleHelper; } });
10
- // --- Global ---
11
- var A_Error_class_1 = require("./src/global/A_Error.class");
12
- Object.defineProperty(exports, "A_Error", { enumerable: true, get: function () { return A_Error_class_1.A_Error; } });
13
- var A_ServerError_class_1 = require("./src/global/A_ServerError.class");
14
- Object.defineProperty(exports, "A_ServerError", { enumerable: true, get: function () { return A_ServerError_class_1.A_ServerError; } });
15
- var ASEID_class_1 = require("./src/global/ASEID.class");
16
- Object.defineProperty(exports, "ASEID", { enumerable: true, get: function () { return ASEID_class_1.ASEID; } });
17
- var A_ScheduleObject_class_1 = require("./src/global/A_ScheduleObject.class");
17
+ exports.A_Deferred = exports.A_ScheduleObject = exports.A_Schedule = exports.A_PolyfillClass = exports.A_Polyfill = exports.A_Memory = exports.FileConfigReader = exports.ENVConfigReader = exports.ConfigReader = exports.A_ConfigError = exports.A_Config = exports.A_ConfigLoader = exports.A_CommandError = exports.A_Command = exports.A_ChannelError = exports.A_Channel = void 0;
18
+ var A_Channel_component_1 = require("./src/lib/A-Channel/A-Channel.component");
19
+ Object.defineProperty(exports, "A_Channel", { enumerable: true, get: function () { return A_Channel_component_1.A_Channel; } });
20
+ var A_Channel_error_1 = require("./src/lib/A-Channel/A-Channel.error");
21
+ Object.defineProperty(exports, "A_ChannelError", { enumerable: true, get: function () { return A_Channel_error_1.A_ChannelError; } });
22
+ // export * from './src/lib/A-Channel/A-Channel.types';
23
+ var A_Command_entity_1 = require("./src/lib/A-Command/A-Command.entity");
24
+ Object.defineProperty(exports, "A_Command", { enumerable: true, get: function () { return A_Command_entity_1.A_Command; } });
25
+ var A_Command_error_1 = require("./src/lib/A-Command/A-Command.error");
26
+ Object.defineProperty(exports, "A_CommandError", { enumerable: true, get: function () { return A_Command_error_1.A_CommandError; } });
27
+ __exportStar(require("./src/lib/A-Command/A-Command.types"), exports);
28
+ __exportStar(require("./src/lib/A-Command/A-Command.constants"), exports);
29
+ var A_Config_container_1 = require("./src/lib/A-Config/A-Config.container");
30
+ Object.defineProperty(exports, "A_ConfigLoader", { enumerable: true, get: function () { return A_Config_container_1.A_ConfigLoader; } });
31
+ var A_Config_context_1 = require("./src/lib/A-Config/A-Config.context");
32
+ Object.defineProperty(exports, "A_Config", { enumerable: true, get: function () { return A_Config_context_1.A_Config; } });
33
+ var A_Config_error_1 = require("./src/lib/A-Config/A-Config.error");
34
+ Object.defineProperty(exports, "A_ConfigError", { enumerable: true, get: function () { return A_Config_error_1.A_ConfigError; } });
35
+ var ConfigReader_component_1 = require("./src/lib/A-Config/components/ConfigReader.component");
36
+ Object.defineProperty(exports, "ConfigReader", { enumerable: true, get: function () { return ConfigReader_component_1.ConfigReader; } });
37
+ var ENVConfigReader_component_1 = require("./src/lib/A-Config/components/ENVConfigReader.component");
38
+ Object.defineProperty(exports, "ENVConfigReader", { enumerable: true, get: function () { return ENVConfigReader_component_1.ENVConfigReader; } });
39
+ var FileConfigReader_component_1 = require("./src/lib/A-Config/components/FileConfigReader.component");
40
+ Object.defineProperty(exports, "FileConfigReader", { enumerable: true, get: function () { return FileConfigReader_component_1.FileConfigReader; } });
41
+ __exportStar(require("./src/lib/A-Config/A-Config.types"), exports);
42
+ __exportStar(require("./src/lib/A-Config/A-Config.constants"), exports);
43
+ var A_Memory_context_1 = require("./src/lib/A-Memory/A-Memory.context");
44
+ Object.defineProperty(exports, "A_Memory", { enumerable: true, get: function () { return A_Memory_context_1.A_Memory; } });
45
+ var A_Polyfill_component_1 = require("./src/lib/A-Polyfill/A-Polyfill.component");
46
+ Object.defineProperty(exports, "A_Polyfill", { enumerable: true, get: function () { return A_Polyfill_component_1.A_Polyfill; } });
47
+ var A_Polyfills_class_1 = require("./src/lib/A-Polyfill/A-Polyfills.class");
48
+ Object.defineProperty(exports, "A_PolyfillClass", { enumerable: true, get: function () { return A_Polyfills_class_1.A_PolyfillClass; } });
49
+ // export * from './src/lib/A-Polyfill/A-Polyfill.types';
50
+ var A_Schedule_component_1 = require("./src/lib/A-Schedule/A-Schedule.component");
51
+ Object.defineProperty(exports, "A_Schedule", { enumerable: true, get: function () { return A_Schedule_component_1.A_Schedule; } });
52
+ __exportStar(require("./src/lib/A-Schedule/A-Schedule.types"), exports);
53
+ var A_ScheduleObject_class_1 = require("./src/lib/A-Schedule/A-ScheduleObject.class");
18
54
  Object.defineProperty(exports, "A_ScheduleObject", { enumerable: true, get: function () { return A_ScheduleObject_class_1.A_ScheduleObject; } });
19
- var A_Polyfills_1 = require("./src/global/A_Polyfills");
20
- Object.defineProperty(exports, "A_Polyfills", { enumerable: true, get: function () { return A_Polyfills_1.A_Polyfills; } });
21
- // --- Constants ---
22
- var errors_constants_1 = require("./src/constants/errors.constants");
23
- Object.defineProperty(exports, "A_CONSTANTS__ERROR_CODES", { enumerable: true, get: function () { return errors_constants_1.A_CONSTANTS__ERROR_CODES; } });
55
+ var A_Deferred_class_1 = require("./src/lib/A-Schedule/A-Deferred.class");
56
+ Object.defineProperty(exports, "A_Deferred", { enumerable: true, get: function () { return A_Deferred_class_1.A_Deferred; } });
24
57
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAEA,wDAAwD;;;AAGxD,kBAAkB;AAClB,iEAA+D;AAAtD,iHAAA,cAAc,OAAA;AACvB,qEAAmE;AAA1D,qHAAA,gBAAgB,OAAA;AAGzB,iBAAiB;AACjB,4DAAqD;AAA5C,wGAAA,OAAO,OAAA;AAChB,wEAAiE;AAAxD,oHAAA,aAAa,OAAA;AAEtB,wDAAiD;AAAxC,oGAAA,KAAK,OAAA;AAEd,8EAAuE;AAA9D,0HAAA,gBAAgB,OAAA;AAIzB,wDAEiC;AAD7B,0GAAA,WAAW,OAAA;AAGf,oBAAoB;AACpB,qEAA4E;AAAnE,4HAAA,wBAAwB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,+EAAoE;AAA3D,gHAAA,SAAS,OAAA;AAClB,uEAAqE;AAA5D,iHAAA,cAAc,OAAA;AACvB,uDAAuD;AAGvD,yEAAiE;AAAxD,6GAAA,SAAS,OAAA;AAClB,uEAAqE;AAA5D,iHAAA,cAAc,OAAA;AACvB,sEAAoD;AACpD,0EAAwD;AAGxD,4EAAuE;AAA9D,oHAAA,cAAc,OAAA;AACvB,wEAA+D;AAAtD,4GAAA,QAAQ,OAAA;AACjB,oEAAkE;AAAzD,+GAAA,aAAa,OAAA;AACtB,+FAAoF;AAA3E,sHAAA,YAAY,OAAA;AACrB,qGAA0F;AAAjF,4HAAA,eAAe,OAAA;AACxB,uGAA4F;AAAnF,8HAAA,gBAAgB,OAAA;AACzB,oEAAkD;AAClD,wEAAsD;AAGtD,wEAA8D;AAArD,4GAAA,QAAQ,OAAA;AAEjB,kFAAuE;AAA9D,kHAAA,UAAU,OAAA;AACnB,4EAAyE;AAAhE,oHAAA,eAAe,OAAA;AACxB,yDAAyD;AAMzD,kFAAsE;AAA7D,kHAAA,UAAU,OAAA;AACnB,wEAAqD;AACrD,sFAA8E;AAArE,0HAAA,gBAAgB,OAAA;AACzB,0EAAkE;AAAzD,8GAAA,UAAU,OAAA"}
@@ -1,65 +0,0 @@
1
- export declare enum A_CONSTANTS__ERROR_CODES {
2
- INCORRECT_A_ENTITY_CONSTRUCTOR = "ERR-A-Entity-0001",
3
- INVALID_ASEID = "ERR-ASEID-0001",
4
- UNEXPECTED_ERROR = "ERR-0001",
5
- METHOD_NOT_IMPLEMENTED = "ERR-0002",
6
- ROUTE_NOT_FOUND = "ERR-0003",
7
- TOKEN_NOT_PROVIDED = "ERR-0004",
8
- NOT_ALL_PARAMS_WAS_PROVIDED = "ERR-0005",
9
- CREDENTIALS_NOT_PROVIDED = "ERR-0006",
10
- CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ = "ERR-0007"
11
- }
12
- export declare const A_CONSTANTS__DEFAULT_ERRORS: {
13
- INCORRECT_A_ENTITY_CONSTRUCTOR: {
14
- code: A_CONSTANTS__ERROR_CODES;
15
- description: string;
16
- message: string;
17
- };
18
- INVALID_ASEID: {
19
- code: A_CONSTANTS__ERROR_CODES;
20
- description: string;
21
- message: string;
22
- };
23
- UNEXPECTED_ERROR: {
24
- serverCode: number;
25
- code: A_CONSTANTS__ERROR_CODES;
26
- description: string;
27
- message: string;
28
- };
29
- METHOD_NOT_IMPLEMENTED: {
30
- serverCode: number;
31
- code: A_CONSTANTS__ERROR_CODES;
32
- description: string;
33
- message: string;
34
- link: string;
35
- };
36
- ROUTE_NOT_FOUND: {
37
- serverCode: number;
38
- code: A_CONSTANTS__ERROR_CODES;
39
- description: string;
40
- message: string;
41
- };
42
- TOKEN_NOT_PROVIDED: {
43
- serverCode: number;
44
- code: A_CONSTANTS__ERROR_CODES;
45
- description: string;
46
- message: string;
47
- };
48
- NOT_ALL_PARAMS_WAS_PROVIDED: {
49
- serverCode: number;
50
- code: A_CONSTANTS__ERROR_CODES;
51
- description: string;
52
- message: string;
53
- };
54
- CREDENTIALS_NOT_PROVIDED: {
55
- code: A_CONSTANTS__ERROR_CODES;
56
- description: string;
57
- message: string;
58
- };
59
- CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ: {
60
- serverCode: number;
61
- code: A_CONSTANTS__ERROR_CODES;
62
- description: string;
63
- message: string;
64
- };
65
- };
@@ -1,74 +1,2 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_CONSTANTS__DEFAULT_ERRORS = exports.A_CONSTANTS__ERROR_CODES = void 0;
4
- var A_CONSTANTS__ERROR_CODES;
5
- (function (A_CONSTANTS__ERROR_CODES) {
6
- // Default Utils Errors
7
- A_CONSTANTS__ERROR_CODES["INCORRECT_A_ENTITY_CONSTRUCTOR"] = "ERR-A-Entity-0001";
8
- A_CONSTANTS__ERROR_CODES["INVALID_ASEID"] = "ERR-ASEID-0001";
9
- A_CONSTANTS__ERROR_CODES["UNEXPECTED_ERROR"] = "ERR-0001";
10
- A_CONSTANTS__ERROR_CODES["METHOD_NOT_IMPLEMENTED"] = "ERR-0002";
11
- A_CONSTANTS__ERROR_CODES["ROUTE_NOT_FOUND"] = "ERR-0003";
12
- A_CONSTANTS__ERROR_CODES["TOKEN_NOT_PROVIDED"] = "ERR-0004";
13
- A_CONSTANTS__ERROR_CODES["NOT_ALL_PARAMS_WAS_PROVIDED"] = "ERR-0005";
14
- A_CONSTANTS__ERROR_CODES["CREDENTIALS_NOT_PROVIDED"] = "ERR-0006";
15
- A_CONSTANTS__ERROR_CODES["CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ"] = "ERR-0007";
16
- })(A_CONSTANTS__ERROR_CODES || (exports.A_CONSTANTS__ERROR_CODES = A_CONSTANTS__ERROR_CODES = {}));
17
- ;
18
- exports.A_CONSTANTS__DEFAULT_ERRORS = {
19
- // Default A-Utils Errors
20
- INCORRECT_A_ENTITY_CONSTRUCTOR: {
21
- code: A_CONSTANTS__ERROR_CODES.INCORRECT_A_ENTITY_CONSTRUCTOR,
22
- description: 'The A_Entity constructor was called with incorrect parameters.',
23
- message: 'Incorrect A_Entity constructor parameters.'
24
- },
25
- INVALID_ASEID: {
26
- code: A_CONSTANTS__ERROR_CODES.INVALID_ASEID,
27
- description: 'The provided ASEID is invalid.',
28
- message: 'Invalid ASEID provided.'
29
- },
30
- // Default Utils Server Errors
31
- UNEXPECTED_ERROR: {
32
- serverCode: 500,
33
- code: A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR,
34
- description: 'If you see this error please let us know.',
35
- message: 'Oops... Something went wrong',
36
- },
37
- METHOD_NOT_IMPLEMENTED: {
38
- serverCode: 500,
39
- code: A_CONSTANTS__ERROR_CODES.METHOD_NOT_IMPLEMENTED,
40
- description: 'If you see this error please let us know.',
41
- message: 'Oops... Something went wrong',
42
- link: 'https://support.adaas.org/error/' + A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR
43
- },
44
- ROUTE_NOT_FOUND: {
45
- serverCode: 404,
46
- code: A_CONSTANTS__ERROR_CODES.ROUTE_NOT_FOUND,
47
- description: 'We can not find the route you\'re looking for. Please make sure that you\'re using the correct path.',
48
- message: 'The target route is not found.'
49
- },
50
- TOKEN_NOT_PROVIDED: {
51
- serverCode: 401,
52
- code: A_CONSTANTS__ERROR_CODES.TOKEN_NOT_PROVIDED,
53
- description: 'The token is missed in the Authorization header. Please make sure that it\'s presented.',
54
- message: 'Token has not found in the authorization header.'
55
- },
56
- NOT_ALL_PARAMS_WAS_PROVIDED: {
57
- serverCode: 409,
58
- code: A_CONSTANTS__ERROR_CODES.NOT_ALL_PARAMS_WAS_PROVIDED,
59
- description: 'Not all required params provided in the request',
60
- message: 'Conflict in request'
61
- },
62
- CREDENTIALS_NOT_PROVIDED: {
63
- code: A_CONSTANTS__ERROR_CODES.CREDENTIALS_NOT_PROVIDED,
64
- description: 'The credentials are missed. Please make sure that they are presented.',
65
- message: 'Credentials has not found in the request.'
66
- },
67
- CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ: {
68
- serverCode: 403,
69
- code: A_CONSTANTS__ERROR_CODES.CONFIGURATION_PROPERTY_NOT_EXISTS_OR_NOT_ALLOWED_TO_READ,
70
- description: 'The configuration property is not exists or not allowed to read.',
71
- message: 'Configuration property is not exists or not allowed to read.'
72
- }
73
- };
74
2
  //# sourceMappingURL=errors.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.constants.js","sourceRoot":"","sources":["../../../src/constants/errors.constants.ts"],"names":[],"mappings":";;;AACA,IAAY,wBAaX;AAbD,WAAY,wBAAwB;IAChC,wBAAwB;IACxB,gFAAoD,CAAA;IACpD,4DAAgC,CAAA;IAGhC,yDAA6B,CAAA;IAC7B,+DAAmC,CAAA;IACnC,wDAA4B,CAAA;IAC5B,2DAA+B,CAAA;IAC/B,oEAAwC,CAAA;IACxC,iEAAqC,CAAA;IACrC,iGAAqE,CAAA;AACzE,CAAC,EAbW,wBAAwB,wCAAxB,wBAAwB,QAanC;AAAA,CAAC;AAGW,QAAA,2BAA2B,GAAG;IACvC,yBAAyB;IACzB,8BAA8B,EAAE;QAC5B,IAAI,EAAE,wBAAwB,CAAC,8BAA8B;QAC7D,WAAW,EAAE,gEAAgE;QAC7E,OAAO,EAAE,4CAA4C;KACxD;IACD,aAAa,EAAE;QACX,IAAI,EAAE,wBAAwB,CAAC,aAAa;QAC5C,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,yBAAyB;KACrC;IAGD,8BAA8B;IAC9B,gBAAgB,EAAE;QACd,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,wBAAwB,CAAC,gBAAgB;QAC/C,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,8BAA8B;KAC1C;IACD,sBAAsB,EAAE;QACpB,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,wBAAwB,CAAC,sBAAsB;QACrD,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,8BAA8B;QACvC,IAAI,EAAE,kCAAkC,GAAG,wBAAwB,CAAC,gBAAgB;KACvF;IACD,eAAe,EAAE;QACb,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,wBAAwB,CAAC,eAAe;QAC9C,WAAW,EAAE,sGAAsG;QACnH,OAAO,EAAE,gCAAgC;KAC5C;IACD,kBAAkB,EAAE;QAChB,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,wBAAwB,CAAC,kBAAkB;QACjD,WAAW,EAAE,yFAAyF;QACtG,OAAO,EAAE,kDAAkD;KAC9D;IACD,2BAA2B,EAAE;QACzB,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,wBAAwB,CAAC,2BAA2B;QAC1D,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,qBAAqB;KACjC;IACD,wBAAwB,EAAE;QACtB,IAAI,EAAE,wBAAwB,CAAC,wBAAwB;QACvD,WAAW,EAAE,uEAAuE;QACpF,OAAO,EAAE,2CAA2C;KACvD;IACD,wDAAwD,EAAE;QACtD,UAAU,EAAE,GAAG;QACf,IAAI,EAAE,wBAAwB,CAAC,wDAAwD;QACvF,WAAW,EAAE,kEAAkE;QAC/E,OAAO,EAAE,8DAA8D;KAC1E;CAIJ,CAAA"}
1
+ {"version":3,"file":"errors.constants.js","sourceRoot":"","sources":["../../../src/constants/errors.constants.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { A_Component } from "@adaas/a-concept";
2
+ export declare class A_Channel extends A_Component {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_Channel = void 0;
4
+ const a_concept_1 = require("@adaas/a-concept");
5
+ class A_Channel extends a_concept_1.A_Component {
6
+ }
7
+ exports.A_Channel = A_Channel;
8
+ //# sourceMappingURL=A-Channel.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Channel.component.js","sourceRoot":"","sources":["../../../../src/lib/A-Channel/A-Channel.component.ts"],"names":[],"mappings":";;;AAAA,gDAA0D;AAI1D,MAAa,SAAU,SAAQ,uBAAW;CAGzC;AAHD,8BAGC"}
@@ -0,0 +1,3 @@
1
+ import { A_Error } from "@adaas/a-concept";
2
+ export declare class A_ChannelError extends A_Error {
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_ChannelError = void 0;
4
+ const a_concept_1 = require("@adaas/a-concept");
5
+ class A_ChannelError extends a_concept_1.A_Error {
6
+ }
7
+ exports.A_ChannelError = A_ChannelError;
8
+ //# sourceMappingURL=A-Channel.error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Channel.error.js","sourceRoot":"","sources":["../../../../src/lib/A-Channel/A-Channel.error.ts"],"names":[],"mappings":";;;AAAA,gDAA2C;AAG3C,MAAa,cAAe,SAAQ,mBAAO;CAE1C;AAFD,wCAEC"}
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=A-Channel.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Channel.types.js","sourceRoot":"","sources":["../../../../src/lib/A-Channel/A-Channel.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ export declare enum A_TYPES__CommandMetaKey {
2
+ EXTENSIONS = "a-command-extensions",
3
+ FEATURES = "a-command-features",
4
+ ABSTRACTIONS = "a-command-abstractions"
5
+ }
6
+ export declare enum A_CONSTANTS__A_Command_Status {
7
+ INITIALIZED = "INITIALIZED",
8
+ IN_PROGRESS = "IN_PROGRESS",
9
+ COMPLETED = "COMPLETED",
10
+ FAILED = "FAILED"
11
+ }
12
+ /**
13
+ * A-Command Lifecycle Features
14
+ */
15
+ export declare enum A_CONSTANTS_A_Command_Features {
16
+ INIT = "init",
17
+ COMPLIED = "complied",
18
+ EXECUTE = "execute",
19
+ COMPLETE = "complete",
20
+ FAIL = "fail"
21
+ }
22
+ export type A_CONSTANTS__A_Command_Event = 'init' | 'compile' | 'execute' | 'complete' | 'fail';
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.A_CONSTANTS_A_Command_Features = exports.A_CONSTANTS__A_Command_Status = exports.A_TYPES__CommandMetaKey = void 0;
4
+ var A_TYPES__CommandMetaKey;
5
+ (function (A_TYPES__CommandMetaKey) {
6
+ A_TYPES__CommandMetaKey["EXTENSIONS"] = "a-command-extensions";
7
+ A_TYPES__CommandMetaKey["FEATURES"] = "a-command-features";
8
+ A_TYPES__CommandMetaKey["ABSTRACTIONS"] = "a-command-abstractions";
9
+ })(A_TYPES__CommandMetaKey || (exports.A_TYPES__CommandMetaKey = A_TYPES__CommandMetaKey = {}));
10
+ var A_CONSTANTS__A_Command_Status;
11
+ (function (A_CONSTANTS__A_Command_Status) {
12
+ A_CONSTANTS__A_Command_Status["INITIALIZED"] = "INITIALIZED";
13
+ A_CONSTANTS__A_Command_Status["IN_PROGRESS"] = "IN_PROGRESS";
14
+ A_CONSTANTS__A_Command_Status["COMPLETED"] = "COMPLETED";
15
+ A_CONSTANTS__A_Command_Status["FAILED"] = "FAILED";
16
+ })(A_CONSTANTS__A_Command_Status || (exports.A_CONSTANTS__A_Command_Status = A_CONSTANTS__A_Command_Status = {}));
17
+ /**
18
+ * A-Command Lifecycle Features
19
+ */
20
+ var A_CONSTANTS_A_Command_Features;
21
+ (function (A_CONSTANTS_A_Command_Features) {
22
+ A_CONSTANTS_A_Command_Features["INIT"] = "init";
23
+ A_CONSTANTS_A_Command_Features["COMPLIED"] = "complied";
24
+ A_CONSTANTS_A_Command_Features["EXECUTE"] = "execute";
25
+ A_CONSTANTS_A_Command_Features["COMPLETE"] = "complete";
26
+ A_CONSTANTS_A_Command_Features["FAIL"] = "fail";
27
+ })(A_CONSTANTS_A_Command_Features || (exports.A_CONSTANTS_A_Command_Features = A_CONSTANTS_A_Command_Features = {}));
28
+ //# sourceMappingURL=A-Command.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"A-Command.constants.js","sourceRoot":"","sources":["../../../../src/lib/A-Command/A-Command.constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,8DAAmC,CAAA;IACnC,0DAA+B,CAAA;IAC/B,kEAAuC,CAAA;AAC3C,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC;AAED,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACrC,4DAA2B,CAAA;IAC3B,4DAA2B,CAAA;IAC3B,wDAAuB,CAAA;IACvB,kDAAiB,CAAA;AACrB,CAAC,EALW,6BAA6B,6CAA7B,6BAA6B,QAKxC;AAED;;GAEG;AACH,IAAY,8BAMX;AAND,WAAY,8BAA8B;IACtC,+CAAa,CAAA;IACb,uDAAqB,CAAA;IACrB,qDAAmB,CAAA;IACnB,uDAAqB,CAAA;IACrB,+CAAa,CAAA;AACjB,CAAC,EANW,8BAA8B,8CAA9B,8BAA8B,QAMzC"}
@@ -0,0 +1,133 @@
1
+ import { A_TYPES__Command_Init, A_TYPES__Command_Listener, A_TYPES__Command_Serialized } from "./A-Command.types";
2
+ import { A_CONSTANTS__A_Command_Event, A_CONSTANTS__A_Command_Status } from "./A-Command.constants";
3
+ import { A_Entity, A_Error, A_Scope } from "@adaas/a-concept";
4
+ export declare class A_Command<InvokeType extends A_TYPES__Command_Init = A_TYPES__Command_Init, ResultType extends Record<string, any> = Record<string, any>, LifecycleEvents extends string = A_CONSTANTS__A_Command_Event> extends A_Entity<InvokeType, A_TYPES__Command_Serialized<ResultType>> {
5
+ /**
6
+ * Command Identifier that corresponds to the class name
7
+ */
8
+ static get code(): string;
9
+ protected _result?: ResultType;
10
+ protected _executionScope: A_Scope;
11
+ protected _errors?: Set<A_Error>;
12
+ protected _params: InvokeType;
13
+ protected _status: A_CONSTANTS__A_Command_Status;
14
+ protected _listeners: Map<LifecycleEvents | A_CONSTANTS__A_Command_Event, Set<A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>>>;
15
+ protected _startTime?: Date;
16
+ protected _endTime?: Date;
17
+ /**
18
+ * Execution Duration in milliseconds
19
+ */
20
+ get duration(): number | undefined;
21
+ /**
22
+ * A shared scope between all features of the command during its execution
23
+ */
24
+ get scope(): A_Scope;
25
+ /**
26
+ * Unique code identifying the command type
27
+ * Example: 'user.create', 'task.complete', etc.
28
+ *
29
+ */
30
+ get code(): string;
31
+ /**
32
+ * Current status of the command
33
+ */
34
+ get status(): A_CONSTANTS__A_Command_Status;
35
+ /**
36
+ * Start time of the command execution
37
+ */
38
+ get startedAt(): Date | undefined;
39
+ /**
40
+ * End time of the command execution
41
+ */
42
+ get endedAt(): Date | undefined;
43
+ /**
44
+ * Result of the command execution stored in the context
45
+ */
46
+ get result(): ResultType | undefined;
47
+ /**
48
+ * Errors encountered during the command execution stored in the context
49
+ */
50
+ get errors(): Set<A_Error> | undefined;
51
+ /**
52
+ * Parameters used to invoke the command
53
+ */
54
+ get params(): InvokeType;
55
+ /**
56
+ * Indicates if the command has failed
57
+ */
58
+ get isFailed(): boolean;
59
+ /**
60
+ * Indicates if the command has completed successfully
61
+ */
62
+ get isCompleted(): boolean;
63
+ /**
64
+ *
65
+ * A-Command represents an executable command with a specific code and parameters.
66
+ * It can be executed within a given scope and stores execution results and errors.
67
+ *
68
+ *
69
+ * A-Command should be context independent and execution logic should be based on attached components
70
+ *
71
+ * @param code
72
+ * @param params
73
+ */
74
+ constructor(
75
+ /**
76
+ * Command invocation parameters
77
+ */
78
+ params: InvokeType | A_TYPES__Command_Serialized<ResultType> | string);
79
+ init(): Promise<void>;
80
+ compile(): Promise<void>;
81
+ /**
82
+ * Executes the command logic.
83
+ */
84
+ execute(): Promise<any>;
85
+ /**
86
+ * Marks the command as completed
87
+ */
88
+ complete(): Promise<void>;
89
+ /**
90
+ * Marks the command as failed
91
+ */
92
+ fail(): Promise<void>;
93
+ /**
94
+ * Registers an event listener for a specific event
95
+ *
96
+ * @param event
97
+ * @param listener
98
+ */
99
+ on(event: LifecycleEvents | A_CONSTANTS__A_Command_Event, listener: A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>): void;
100
+ /**
101
+ * Removes an event listener for a specific event
102
+ *
103
+ * @param event
104
+ * @param listener
105
+ */
106
+ off(event: LifecycleEvents | A_CONSTANTS__A_Command_Event, listener: A_TYPES__Command_Listener<InvokeType, ResultType, LifecycleEvents>): void;
107
+ /**
108
+ * Emits an event to all registered listeners
109
+ *
110
+ * @param event
111
+ */
112
+ emit(event: LifecycleEvents | A_CONSTANTS__A_Command_Event): void;
113
+ /**
114
+ * Allows to create a Command instance from new data
115
+ *
116
+ * @param newEntity
117
+ */
118
+ fromNew(newEntity: InvokeType): void;
119
+ /**
120
+ * Allows to convert serialized data to Command instance
121
+ *
122
+ * [!] By default it omits params as they are not stored in the serialized data
123
+ *
124
+ * @param serialized
125
+ */
126
+ fromJSON(serialized: A_TYPES__Command_Serialized<ResultType>): void;
127
+ /**
128
+ * Converts the Command instance to a plain object
129
+ *
130
+ * @returns
131
+ */
132
+ toJSON(): A_TYPES__Command_Serialized<ResultType>;
133
+ }