@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
@@ -1,77 +0,0 @@
1
- import { A_TYPES__ASEID_Constructor, A_TYPES__ASEID_JSON } from "../types/ASEID.types";
2
- /**
3
- * A - ADAAS
4
- * S - System
5
- * E - Entity
6
- * I - Identifier
7
- * D - iDentifier
8
- *
9
- *
10
- * adaas-sso@scope:usr:0000000001
11
- *
12
- * APP_NAMESPACE + @ + SCOPE + : ENTITY_NAME + : + ID + @ + VERSION
13
- */
14
- export declare class ASEID {
15
- static regexp: RegExp;
16
- /**
17
- * Namespace for the ASEID
18
- * Generally it is the application name or code, should correspond to the namespace of the application
19
- * Could be ID or ASEID
20
- */
21
- private _namespace;
22
- /**
23
- * Entity Scope the primary location of the resource
24
- * Organization, or organization Unit
25
- * Could be ID or ASEID
26
- *
27
- */
28
- private _scope;
29
- /**
30
- * Entity Type the type of the resource
31
- */
32
- private _entity;
33
- /**
34
- * Entity ID the unique identifier of the resource
35
- */
36
- private _id;
37
- /**
38
- * Version of the entity (optional)
39
- */
40
- private _version?;
41
- /**
42
- * Shard of the entity (optional)
43
- */
44
- private _shard?;
45
- constructor(aseid: string);
46
- constructor(props: A_TYPES__ASEID_Constructor);
47
- get namespace(): string;
48
- get scope(): string;
49
- get entity(): string;
50
- get id(): string;
51
- get version(): string | undefined;
52
- get shard(): string | undefined;
53
- /**
54
- * Tests if the identity string is an ASEID
55
- *
56
- * @param identity
57
- * @returns
58
- */
59
- static isASEID(identity: string): boolean;
60
- /**
61
- * Generate an ASEID from a namespace, entity, and id
62
- *
63
- * @param props
64
- * @returns
65
- */
66
- static generateASEID(props: A_TYPES__ASEID_Constructor): string;
67
- /**
68
- * Parse ASEID into its components
69
- *
70
- *
71
- * @param identity
72
- * @returns
73
- */
74
- static parseASEID(identity: string): A_TYPES__ASEID_JSON;
75
- toString(): string;
76
- toJSON(): A_TYPES__ASEID_JSON;
77
- }
@@ -1,129 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ASEID = void 0;
4
- const errors_constants_1 = require("../constants/errors.constants");
5
- const A_Common_helper_1 = require("../helpers/A_Common.helper");
6
- const A_Error_class_1 = require("./A_Error.class");
7
- /**
8
- * A - ADAAS
9
- * S - System
10
- * E - Entity
11
- * I - Identifier
12
- * D - iDentifier
13
- *
14
- *
15
- * adaas-sso@scope:usr:0000000001
16
- *
17
- * APP_NAMESPACE + @ + SCOPE + : ENTITY_NAME + : + ID + @ + VERSION
18
- */
19
- class ASEID {
20
- constructor(param1) {
21
- if (typeof param1 === 'string' && !ASEID.isASEID(param1)) {
22
- throw new A_Error_class_1.A_Error(errors_constants_1.A_CONSTANTS__DEFAULT_ERRORS.INVALID_ASEID);
23
- }
24
- const aseidString = typeof param1 === 'string' ? param1 : ASEID.generateASEID(param1);
25
- const { namespace, scope, entity, id, version, shard } = ASEID.parseASEID(aseidString);
26
- this._namespace = namespace;
27
- this._scope = scope;
28
- this._entity = entity;
29
- this._id = id;
30
- this._version = version;
31
- this._shard = shard;
32
- }
33
- get namespace() {
34
- return this._namespace;
35
- }
36
- get scope() {
37
- return this._scope;
38
- }
39
- get entity() {
40
- return this._entity;
41
- }
42
- get id() {
43
- return this._id;
44
- }
45
- get version() {
46
- return this._version;
47
- }
48
- get shard() {
49
- return this._shard;
50
- }
51
- /**
52
- * Tests if the identity string is an ASEID
53
- *
54
- * @param identity
55
- * @returns
56
- */
57
- static isASEID(identity) {
58
- return this.regexp.test(identity);
59
- }
60
- /**
61
- * Generate an ASEID from a namespace, entity, and id
62
- *
63
- * @param props
64
- * @returns
65
- */
66
- static generateASEID(props) {
67
- const namespace = props.namespace
68
- ? this.isASEID(props.namespace)
69
- ? this.parseASEID(props.namespace).id
70
- : props.namespace
71
- : process.env.A_NAMESPACE;
72
- const scope = typeof props.scope === 'number'
73
- ? A_Common_helper_1.A_CommonHelper.formatWithLeadingZeros(props.scope) :
74
- this.isASEID(props.scope)
75
- ? this.parseASEID(props.scope).id
76
- : props.scope;
77
- const entity = props.entity;
78
- const id = typeof props.id === 'number'
79
- ? A_Common_helper_1.A_CommonHelper.formatWithLeadingZeros(props.id)
80
- : props.id;
81
- const version = props.version;
82
- const shard = !props.shard ? undefined : props.shard;
83
- return `${namespace}@${scope}:${entity}:${shard ? (shard + '--' + id) : id}${version ? ('@' + version) : ''}`;
84
- }
85
- /**
86
- * Parse ASEID into its components
87
- *
88
- *
89
- * @param identity
90
- * @returns
91
- */
92
- static parseASEID(identity) {
93
- const [namespace, body, version] = identity.split('@');
94
- const [scope, entity, idCandidate] = body.split(':');
95
- const shard = idCandidate.includes('--') ? idCandidate.split('--')[0] : undefined;
96
- const id = idCandidate.includes('--') ? idCandidate.split('--')[1] : idCandidate;
97
- return {
98
- namespace,
99
- scope: scope,
100
- entity,
101
- id: id,
102
- version: version ? version : undefined,
103
- shard
104
- };
105
- }
106
- toString() {
107
- return ASEID.generateASEID({
108
- namespace: this._namespace,
109
- scope: this._scope,
110
- entity: this._entity,
111
- id: this._id,
112
- version: this._version,
113
- shard: this._shard
114
- });
115
- }
116
- toJSON() {
117
- return {
118
- namespace: this._namespace,
119
- scope: this._scope,
120
- entity: this._entity,
121
- id: this._id,
122
- version: this._version,
123
- shard: this._shard
124
- };
125
- }
126
- }
127
- exports.ASEID = ASEID;
128
- ASEID.regexp = new RegExp(`^[a-z|A-Z|0-9|-]+@[a-z|A-Z|0-9|-]+:[a-z|A-Z|0-9|-]+:[a-z|A-Z|0-9|-]+(@v[0-9]+|@lts)?$`);
129
- //# sourceMappingURL=ASEID.class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ASEID.class.js","sourceRoot":"","sources":["../../../src/global/ASEID.class.ts"],"names":[],"mappings":";;;AAAA,oEAA4E;AAC5E,gEAA4D;AAE5D,mDAA0C;AAG1C;;;;;;;;;;;GAWG;AACH,MAAa,KAAK;IAgDd,YAAY,MAA2C;QAEnD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,uBAAO,CAAC,8CAA2B,CAAC,aAAa,CAAC,CAAA;QAChE,CAAC;QAED,MAAM,WAAW,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAEtF,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAEvF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,GAAG,GA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AC7B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,MAAY;QACf,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;CACJ;AAnBD,gCAmBC"}
@@ -1,49 +0,0 @@
1
- import { A_TYPES__AEntity_JSON, A_TYPES__IAEntity } from "../types/A_Entity.types";
2
- import { ASEID } from "./ASEID.class";
3
- export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_TYPES__AEntity_JSON = A_TYPES__AEntity_JSON> implements A_TYPES__IAEntity {
4
- aseid: ASEID;
5
- constructor(aseid: string);
6
- constructor(aseid: ASEID);
7
- constructor(serialized: _SerializedType);
8
- constructor(newEntity: _ConstructorType);
9
- /**
10
- * Extracts the ID from the ASEID
11
- * ID is the unique identifier of the entity
12
- */
13
- get id(): string | number;
14
- /**
15
- * Extracts the namespace from the ASEID
16
- * namespace is an application specific identifier from where the entity is coming from
17
- */
18
- get namespace(): string;
19
- /**
20
- * Extracts the scope from the ASEID
21
- * scope is the scope of the entity from Application Namespace
22
- */
23
- get scope(): string;
24
- /**
25
- * Extracts the entity from the ASEID
26
- * entity is the name of the entity from Application Namespace
27
- */
28
- get entity(): string;
29
- /**
30
- * Extracts the version from the ASEID
31
- * version is the version of the entity
32
- */
33
- get version(): string | undefined;
34
- /**
35
- * Extracts the shard from the ASEID
36
- * shard is the shard of the entity
37
- */
38
- get shard(): string | undefined;
39
- protected fromNewEntity(newEntity: _ConstructorType): void;
40
- protected fromSerialized(serialized: _SerializedType): void;
41
- /**
42
- * Converts the entity to a JSON object
43
- *
44
- *
45
- * @returns
46
- */
47
- toJSON(): _SerializedType;
48
- toString(): string;
49
- }
@@ -1,94 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_Entity = void 0;
4
- const errors_constants_1 = require("../constants/errors.constants");
5
- const A_Error_class_1 = require("./A_Error.class");
6
- const ASEID_class_1 = require("./ASEID.class");
7
- class A_Entity {
8
- constructor(props) {
9
- switch (true) {
10
- case (typeof props === 'string' && ASEID_class_1.ASEID.isASEID(props)):
11
- this.aseid = new ASEID_class_1.ASEID(props);
12
- break;
13
- case (props instanceof ASEID_class_1.ASEID):
14
- this.aseid = props;
15
- break;
16
- case (typeof props === 'object' && props.aseid):
17
- this.fromSerialized(props);
18
- break;
19
- case (typeof props === 'object'):
20
- this.fromNewEntity(props);
21
- break;
22
- default:
23
- throw new A_Error_class_1.A_Error(errors_constants_1.A_CONSTANTS__DEFAULT_ERRORS.INCORRECT_A_ENTITY_CONSTRUCTOR);
24
- }
25
- }
26
- // ====================================================================
27
- // ================== DUPLICATED ASEID Getters ========================
28
- // ====================================================================
29
- /**
30
- * Extracts the ID from the ASEID
31
- * ID is the unique identifier of the entity
32
- */
33
- get id() {
34
- return this.aseid.id;
35
- }
36
- /**
37
- * Extracts the namespace from the ASEID
38
- * namespace is an application specific identifier from where the entity is coming from
39
- */
40
- get namespace() {
41
- return this.aseid.namespace;
42
- }
43
- /**
44
- * Extracts the scope from the ASEID
45
- * scope is the scope of the entity from Application Namespace
46
- */
47
- get scope() {
48
- return this.aseid.scope;
49
- }
50
- /**
51
- * Extracts the entity from the ASEID
52
- * entity is the name of the entity from Application Namespace
53
- */
54
- get entity() {
55
- return this.aseid.entity;
56
- }
57
- /**
58
- * Extracts the version from the ASEID
59
- * version is the version of the entity
60
- */
61
- get version() {
62
- return this.aseid.version;
63
- }
64
- /**
65
- * Extracts the shard from the ASEID
66
- * shard is the shard of the entity
67
- */
68
- get shard() {
69
- return this.aseid.shard;
70
- }
71
- fromNewEntity(newEntity) {
72
- return;
73
- }
74
- fromSerialized(serialized) {
75
- this.aseid = new ASEID_class_1.ASEID((serialized).aseid);
76
- return;
77
- }
78
- /**
79
- * Converts the entity to a JSON object
80
- *
81
- *
82
- * @returns
83
- */
84
- toJSON() {
85
- return {
86
- aseid: this.aseid.toString()
87
- };
88
- }
89
- toString() {
90
- return this.aseid.toString();
91
- }
92
- }
93
- exports.A_Entity = A_Entity;
94
- //# sourceMappingURL=A_Entity.class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Entity.class.js","sourceRoot":"","sources":["../../../src/global/A_Entity.class.ts"],"names":[],"mappings":";;;AAAA,oEAA4E;AAK5E,mDAA0C;AAC1C,+CAAsC;AAEtC,MAAa,QAAQ;IAqBjB,YAAY,KAA0D;QAElE,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBACpD,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAK,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM;YACV,KAAK,CAAC,KAAK,YAAY,mBAAK,CAAC;gBACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnB,MAAM;YACV,KAAK,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAK,KAAa,CAAC,KAAK,CAAC;gBACpD,IAAI,CAAC,cAAc,CAAC,KAAwB,CAAC,CAAC;gBAC9C,MAAM;YAEV,KAAK,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;gBAC5B,IAAI,CAAC,aAAa,CAAC,KAAyB,CAAC,CAAC;gBAC9C,MAAK;YAET;gBACI,MAAM,IAAI,uBAAO,CAAC,8CAA2B,CAAC,8BAA8B,CAAC,CAAC;QACtF,CAAC;IAEL,CAAC;IAED,uEAAuE;IACvE,uEAAuE;IACvE,uEAAuE;IAEvE;;;OAGG;IACH,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAA;IAC/B,CAAC;IAED;;;OAGG;IACH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;;OAGG;IAEH,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IAGS,aAAa,CAAC,SAA2B;QAC/C,OAAO;IACX,CAAC;IAES,cAAc,CAAC,UAA2B;QAChD,IAAI,CAAC,KAAK,GAAG,IAAI,mBAAK,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO;IACX,CAAC;IAGD;;;;;OAKG;IACH,MAAM;QACF,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;SACZ,CAAC;IACzB,CAAC;IAID,QAAQ;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;CACJ;AA7HD,4BA6HC"}
@@ -1,13 +0,0 @@
1
- import { AxiosError } from 'axios';
2
- import { A_TYPES__Error } from '../types/A_Error.types';
3
- export declare class A_Error extends Error {
4
- code: string;
5
- description: string;
6
- originalError?: Error | any;
7
- link?: string;
8
- constructor(params: A_TYPES__Error | Error | AxiosError | string | any);
9
- get id(): string | undefined;
10
- protected identifyErrorType(error: Error | AxiosError | A_TYPES__Error | string | any): void;
11
- get compilingData(): A_TYPES__Error;
12
- toJSON(): A_TYPES__Error;
13
- }
@@ -1,63 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_Error = void 0;
4
- const axios_1 = require("axios");
5
- const errors_constants_1 = require("../constants/errors.constants");
6
- class A_Error extends Error {
7
- constructor(params) {
8
- super(typeof params === 'string'
9
- ? params :
10
- (params === null || params === void 0 ? void 0 : params.message) || 'Oops... Something went wrong');
11
- this.identifyErrorType(params);
12
- }
13
- get id() {
14
- return this.code.split('@')[1];
15
- }
16
- identifyErrorType(error) {
17
- var _a, _b, _c;
18
- if (typeof error === 'string') {
19
- this.message = error;
20
- this.code = errors_constants_1.A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR;
21
- this.description = 'If you see this error please let us know.';
22
- this.link = 'https://support.adaas.org/error/' + this.id;
23
- return;
24
- }
25
- if (error.code &&
26
- error.description &&
27
- error.serverCode) {
28
- const target = error;
29
- this.message = target.message;
30
- this.code = target.code;
31
- this.description = target.description;
32
- this.originalError = target.originalError;
33
- this.link = target.link;
34
- }
35
- else if (error instanceof Error) {
36
- this.message = error.message;
37
- this.code = errors_constants_1.A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR;
38
- this.description = 'If you see this error please let us know.';
39
- this.originalError = error;
40
- this.link = 'https://support.adaas.org/error/' + this.id;
41
- }
42
- else if (error instanceof axios_1.AxiosError) {
43
- this.message = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data.message) || error.message;
44
- this.code = ((_b = error.response) === null || _b === void 0 ? void 0 : _b.data.code) || errors_constants_1.A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR;
45
- this.description = ((_c = error.response) === null || _c === void 0 ? void 0 : _c.data.description) || 'If you see this error please let us know.';
46
- this.originalError = error.response;
47
- this.link = 'https://support.adaas.org/error/' + this.id;
48
- }
49
- }
50
- get compilingData() {
51
- return {
52
- message: this.message,
53
- code: this.code,
54
- description: this.description,
55
- originalError: this.originalError
56
- };
57
- }
58
- toJSON() {
59
- return this.compilingData;
60
- }
61
- }
62
- exports.A_Error = A_Error;
63
- //# sourceMappingURL=A_Error.class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Error.class.js","sourceRoot":"","sources":["../../../src/global/A_Error.class.ts"],"names":[],"mappings":";;;AACA,iCAAmC;AAEnC,oEAAyE;AAGzE,MAAa,OAAQ,SAAQ,KAAK;IAQ9B,YACI,MAA0D;QAE1D,KAAK,CACD,OAAO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AC;4BAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;4BAClC,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;4BAC/D,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;4BACzD,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAQ,CAAC,CAAC,CAAC,CAAC;4BACzG,OAAO,OAAO,CAAC,GAAG,SAAS,IAAI,UAAU,EAAE,CAAC,CAAC;wBACjD,CAAC;wBAAC,OAAO,KAAK,EAAE,CAAC;4BACb,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;wBACzB,CAAC;oBACL,CAAC,CAAA,CAAC;iBACL,CAAC;YACN,CAAC;QACL,CAAC;KAAA;CAGJ;AAGY,QAAA,WAAW,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import { A_TYPES__ScheduleObjectConfig } from "../types/A_ScheduleObject.types";
2
- export declare class A_ScheduleObject<T> {
3
- private timeout;
4
- private deferred;
5
- private config;
6
- constructor(ms: number, action: () => Promise<T>, config?: A_TYPES__ScheduleObjectConfig);
7
- get promise(): Promise<T>;
8
- clear(): void;
9
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_ScheduleObject.class.js","sourceRoot":"","sources":["../../../src/global/A_ScheduleObject.class.ts"],"names":[],"mappings":";;;AACA,yDAAgD;AAChD,mDAA0C;AAE1C,MAAa,gBAAgB;IAezB,YACI,EAAU,EACV,MAAwB,EACxB,MAAsC;QAblC,WAAM,GAAkC;YAC5C;;;;;eAKG;YACH,cAAc,EAAE,KAAK;SACxB,CAAC;QAOE,IAAI,MAAM;YACN,IAAI,CAAC,MAAM,mCAAQ,IAAI,CAAC,MAAM,GAAK,MAAM,CAAE,CAAC;QAEhD,IAAI,CAAC,QAAQ,GAAG,IAAI,6BAAU,EAAK,CAAC;QAEpC,IAAI,CAAC,OAAO,GAAG,UAAU,CACrB,GAAG,EAAE,CAAC,MAAM,EAAE;aACT,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;aACjD,KAAK,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EACtD,EAAE,CACL,CAAC;IACN,CAAC;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IACjC,CAAC;IAED,KAAK;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAE3B,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc;gBAC1B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAc,CAAC,CAAC;;gBAEtC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,uBAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAC7D,CAAC;IACL,CAAC;CACJ;AA/CD,4CA+CC"}
@@ -1,13 +0,0 @@
1
- import { A_TYPES__ServerError } from '../types/A_ServerError.types';
2
- import { AxiosError } from 'axios';
3
- import { A_Error } from './A_Error.class';
4
- export declare class A_ServerError extends A_Error {
5
- code: string;
6
- description: string;
7
- serverCode: number;
8
- originalError: Error | any;
9
- constructor(params: A_TYPES__ServerError | Error | AxiosError | any);
10
- protected identifyErrorType(error: Error | AxiosError | A_TYPES__ServerError): void;
11
- get compilingData(): A_TYPES__ServerError;
12
- toJSON(): A_TYPES__ServerError;
13
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_ServerError = void 0;
4
- const axios_1 = require("axios");
5
- const A_Error_class_1 = require("./A_Error.class");
6
- const errors_constants_1 = require("../constants/errors.constants");
7
- class A_ServerError extends A_Error_class_1.A_Error {
8
- constructor(params) {
9
- super(params);
10
- this.serverCode = 500;
11
- this.identifyErrorType(params);
12
- }
13
- identifyErrorType(error) {
14
- var _a, _b, _c, _d;
15
- if (error.code &&
16
- error.description &&
17
- error.serverCode) {
18
- const target = error;
19
- this.message = target.message;
20
- this.code = target.code;
21
- this.description = target.description;
22
- this.serverCode = target.serverCode;
23
- this.originalError = target.originalError;
24
- this.link = target.link;
25
- }
26
- else if (error instanceof Error) {
27
- this.message = error.message;
28
- this.code = errors_constants_1.A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR;
29
- this.description = 'If you see this error please let us know.';
30
- this.serverCode = 500;
31
- this.originalError = error;
32
- this.link = 'https://support.adaas.org/error/' + this.id;
33
- }
34
- else if (error instanceof axios_1.AxiosError) {
35
- this.message = ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data.message) || error.message;
36
- this.code = ((_b = error.response) === null || _b === void 0 ? void 0 : _b.data.code) || errors_constants_1.A_CONSTANTS__ERROR_CODES.UNEXPECTED_ERROR;
37
- this.description = ((_c = error.response) === null || _c === void 0 ? void 0 : _c.data.description) || 'If you see this error please let us know.';
38
- this.serverCode = ((_d = error.response) === null || _d === void 0 ? void 0 : _d.status) || 500;
39
- this.originalError = error.response;
40
- this.link = 'https://support.adaas.org/error/' + this.id;
41
- }
42
- }
43
- get compilingData() {
44
- return {
45
- message: this.message,
46
- code: this.code,
47
- description: this.description,
48
- serverCode: this.serverCode,
49
- originalError: this.originalError
50
- };
51
- }
52
- toJSON() {
53
- return this.compilingData;
54
- }
55
- }
56
- exports.A_ServerError = A_ServerError;
57
- //# sourceMappingURL=A_ServerError.class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"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OAAO,GAAG,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,CAAC,OAAO,KAAI,KAAK,CAAC,OAAO,CAAC;YAC7D,IAAI,CAAC,IAAI,GAAG,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,CAAC,IAAI,KAAI,2CAAwB,CAAC,gBAAgB,CAAC;YACnF,IAAI,CAAC,WAAW,GAAG,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,CAAC,WAAW,KAAI,2CAA2C,CAAC;YACnG,IAAI,CAAC,UAAU,GAAG,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM,KAAI,GAAG,CAAC;YAChD,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,QAAQ,CAAC;YACpC,IAAI,CAAC,IAAI,GAAG,kCAAkC,GAAG,IAAI,CAAC,EAAE,CAAC;QAC7D,CAAC;IACL,CAAC;IAGD,IAAI,aAAa;QACb,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;SACpC,CAAA;IACL,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ;AA7DD,sCA6DC"}
@@ -1,42 +0,0 @@
1
- import { A_TYPES__DeepPartial } from "../types/A_Common.types";
2
- export declare class A_CommonHelper {
3
- static resolve(): Promise<void>;
4
- static omitArrayProperties<T, S extends string>(array: Array<T>, fields: string[]): Omit<T, S>[];
5
- static sanitizeHTML(html: string): string;
6
- /**
7
- * Check if a class is inherited from another class
8
- *
9
- * @param childClass
10
- * @param parentClass
11
- * @returns
12
- */
13
- static isInheritedFrom(childClass: any, parentClass: any): boolean;
14
- /**
15
- * Omit properties from an object or array with nested objects
16
- *
17
- * @param input
18
- * @param paths
19
- * @returns
20
- */
21
- static omitProperties<T, S extends string>(input: T, paths: string[]): Omit<T, S>;
22
- /**
23
- * Format a number with leading zeros to a fixed length
24
- *
25
- * @param number
26
- * @param maxZeros
27
- * @returns
28
- */
29
- static formatWithLeadingZeros(number: any, maxZeros?: number): string;
30
- /**
31
- * Remove leading zeros from a formatted number
32
- */
33
- static removeLeadingZeros(formattedNumber: any): string;
34
- static toUpperSnakeCase(str: string): string;
35
- static toCamelCase(str: string): string;
36
- static toPascalCase(str: string): string;
37
- static toKebabCase(str: string): string;
38
- static isObject(item: unknown): item is Record<string, any>;
39
- static deepMerge<T = any>(target: any, source: any, visited?: Map<any, any>): T;
40
- static deepClone<T>(target: T): T;
41
- static deepCloneAndMerge<T>(target: A_TYPES__DeepPartial<T>, source: T): T;
42
- }