@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,214 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_CommonHelper = void 0;
4
- const A_Error_class_1 = require("../global/A_Error.class");
5
- class A_CommonHelper {
6
- static resolve() {
7
- return new Promise((resolve) => resolve());
8
- }
9
- static omitArrayProperties(array, fields) {
10
- return array;
11
- }
12
- static sanitizeHTML(html) {
13
- // Define the regular expression pattern to match all tags except <span>
14
- const regex = /<(?!\/?span(?=>|\s.*>))\/?.*?>/g;
15
- // Replace all matched tags with an empty string
16
- return html.replace(regex, '');
17
- }
18
- /**
19
- * Check if a class is inherited from another class
20
- *
21
- * @param childClass
22
- * @param parentClass
23
- * @returns
24
- */
25
- static isInheritedFrom(childClass, parentClass) {
26
- let current = childClass;
27
- // Traverse the prototype chain
28
- while (current) {
29
- if (current === parentClass) {
30
- return true;
31
- }
32
- current = Object.getPrototypeOf(current);
33
- }
34
- return false;
35
- }
36
- /**
37
- * Omit properties from an object or array with nested objects
38
- *
39
- * @param input
40
- * @param paths
41
- * @returns
42
- */
43
- static omitProperties(input, paths) {
44
- // Deep clone the input object or array
45
- const result = JSON.parse(JSON.stringify(input));
46
- // Helper function to recursively remove properties
47
- function removeProperties(target, currPath) {
48
- const currKey = currPath[0];
49
- if (currPath.length === 1) {
50
- // If current path has only one key, delete the property
51
- delete target[currKey];
52
- }
53
- else if (target[currKey] !== undefined && typeof target[currKey] === 'object') {
54
- // If current key exists and is an object, recursively call removeProperties
55
- removeProperties(target[currKey], currPath.slice(1));
56
- }
57
- }
58
- // Iterate through each path and remove corresponding properties from the result
59
- paths.forEach(path => {
60
- const pathKeys = path.split('.');
61
- removeProperties(result, pathKeys);
62
- });
63
- return result;
64
- }
65
- /**
66
- * Format a number with leading zeros to a fixed length
67
- *
68
- * @param number
69
- * @param maxZeros
70
- * @returns
71
- */
72
- static formatWithLeadingZeros(number, maxZeros = 10) {
73
- const formattedNumber = String(number).padStart(maxZeros + 1, '0');
74
- return formattedNumber.slice(-maxZeros);
75
- }
76
- /**
77
- * Remove leading zeros from a formatted number
78
- */
79
- static removeLeadingZeros(formattedNumber) {
80
- return String(Number(formattedNumber)); // Convert to number and back to string to remove leading zeros
81
- }
82
- static toUpperSnakeCase(str) {
83
- return str
84
- .replace(/([a-z])([A-Z])/g, '$1_$2') // Handle lowercase followed by uppercase
85
- .replace(/[-\s]([A-Z])/g, '_$1') // Handle non-alphabetical followed by uppercase
86
- .replace(/-/g, '_')
87
- .toUpperCase();
88
- }
89
- static toCamelCase(str) {
90
- return str.toLowerCase().replace(/_([a-z])/g, (match, letter) => letter.toUpperCase());
91
- }
92
- static toPascalCase(str) {
93
- const camelCase = this.toCamelCase(str);
94
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
95
- }
96
- static toKebabCase(str) {
97
- return str
98
- .replace(/([a-z])([A-Z])/g, '$1-$2') // Handle lowercase followed by uppercase
99
- .replace(/[_\s]([A-Z])/g, '-$1') // Handle non-alphabetical followed by uppercase
100
- .replace(/_/g, '-')
101
- .toLowerCase();
102
- }
103
- static isObject(item) {
104
- return item !== null && typeof item === 'object' && !Array.isArray(item);
105
- }
106
- static deepMerge(target, source, visited = new Map()) {
107
- if (this.isObject(target) && this.isObject(source)) {
108
- for (const key in source) {
109
- if (this.isObject(source[key])) {
110
- if (!target[key]) {
111
- target[key] = {};
112
- }
113
- // Check if the source object has already been visited
114
- if (!visited.has(source[key])) {
115
- visited.set(source[key], {});
116
- this.deepMerge(target[key], source[key], visited);
117
- }
118
- else {
119
- target[key] = visited.get(source[key]);
120
- }
121
- }
122
- else {
123
- target[key] = source[key];
124
- }
125
- }
126
- }
127
- return target;
128
- }
129
- static deepClone(target) {
130
- // Check if the value is null or undefined
131
- if (target === null || target === undefined) {
132
- return target;
133
- }
134
- // Handle primitive types (string, number, boolean, etc.)
135
- if (typeof target !== 'object') {
136
- return target;
137
- }
138
- // Handle Date
139
- if (target instanceof Date) {
140
- return new Date(target.getTime());
141
- }
142
- // Handle Array
143
- if (Array.isArray(target)) {
144
- return target.map(item => this.deepClone(item));
145
- }
146
- // Handle Function
147
- if (typeof target === 'function') {
148
- return target;
149
- }
150
- // Handle Object
151
- if (target instanceof Object) {
152
- const clone = {};
153
- for (const key in target) {
154
- if (target.hasOwnProperty(key)) {
155
- clone[key] = this.deepClone(target[key]);
156
- }
157
- }
158
- return clone;
159
- }
160
- // For any other cases
161
- throw new Error('Unable to clone the object. Unsupported type.');
162
- }
163
- static deepCloneAndMerge(target, source) {
164
- if ((source === null || source === undefined) &&
165
- (target === null || target === undefined))
166
- return target;
167
- // Check if the value is null or undefined
168
- if ((target === null || target === undefined) &&
169
- source) {
170
- return this.deepClone(source);
171
- }
172
- // Handle primitive types (string, number, boolean, etc.)
173
- if (typeof target !== 'object') {
174
- return target;
175
- }
176
- // Handle Date
177
- if (target instanceof Date) {
178
- return new Date(target.getTime());
179
- }
180
- // Handle Array
181
- if (Array.isArray(target)) {
182
- return target.map(item => this.deepCloneAndMerge(item, source));
183
- }
184
- // Handle Function
185
- if (typeof target === 'function') {
186
- return target;
187
- }
188
- // Handle Object
189
- if (target instanceof Object) {
190
- const clone = {};
191
- for (const key in target) {
192
- if (source[key] !== null
193
- &&
194
- source[key] !== undefined)
195
- clone[key] = this.deepCloneAndMerge(target[key], source[key]);
196
- else
197
- clone[key] = this.deepClone(target[key]);
198
- }
199
- for (const key in source) {
200
- if (target[key] !== undefined
201
- &&
202
- target[key] !== null)
203
- clone[key] = this.deepCloneAndMerge(target[key], source[key]);
204
- else
205
- clone[key] = this.deepClone(source[key]);
206
- }
207
- return clone;
208
- }
209
- // For any other cases
210
- throw new A_Error_class_1.A_Error('Unable to clone the object. Unsupported type.');
211
- }
212
- }
213
- exports.A_CommonHelper = A_CommonHelper;
214
- //# sourceMappingURL=A_Common.helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Common.helper.js","sourceRoot":"","sources":["../../../src/helpers/A_Common.helper.ts"],"names":[],"mappings":";;;AAAA,2DAAkD;AAGlD,MAAa,cAAc;IAEvB,MAAM,CAAC,OAAO;QACV,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,mBAAmB,CAAsB,KAAe,EAAE,MAAgB;QAE7E,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAY;QAC5B,wEAAwE;QACxE,MAAM,KAAK,GAAG,iCAAiC,CAAC;QAEhD,gDAAgD;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACnC,CAAC;IAKD;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,UAAe,EAAE,WAAgB;QACpD,IAAI,OAAO,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,CAAC;YACxD,CAAC;YAED,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;gBACvB,IACI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS;;wBAEzB,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI;oBAEpB,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;;oBAE9D,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YACjD,CAAC;YACD,OAAO,KAAK,CAAC;QACjB,CAAC;QAED,sBAAsB;QACtB,MAAM,IAAI,uBAAO,CAAC,+CAA+C,CAAC,CAAC;IACvE,CAAC;CACJ;AArQD,wCAqQC"}
@@ -1,6 +0,0 @@
1
- import { A_ScheduleObject } from "../global/A_ScheduleObject.class";
2
- import { A_TYPES__ScheduleObjectConfig } from "../types/A_ScheduleObject.types";
3
- export declare class A_ScheduleHelper {
4
- static delay<T = void>(ms?: number, resolver?: Promise<T>): Promise<T>;
5
- static schedule<T = void>(ms: number | undefined, resolver: () => Promise<T>, config?: A_TYPES__ScheduleObjectConfig): A_ScheduleObject<T>;
6
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_ScheduleHelper = void 0;
4
- const A_ScheduleObject_class_1 = require("../global/A_ScheduleObject.class");
5
- class A_ScheduleHelper {
6
- static delay(ms = 1000, resolver) {
7
- return new Promise((resolve, reject) => setTimeout(() => {
8
- if (resolver) {
9
- resolver.then(resolve).catch(reject);
10
- }
11
- else {
12
- resolve(0);
13
- }
14
- }, ms));
15
- }
16
- static schedule(ms = 1000, resolver, config) {
17
- return new A_ScheduleObject_class_1.A_ScheduleObject(ms, resolver, config);
18
- }
19
- }
20
- exports.A_ScheduleHelper = A_ScheduleHelper;
21
- //# sourceMappingURL=A_Schedule.helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Schedule.helper.js","sourceRoot":"","sources":["../../../src/helpers/A_Schedule.helper.ts"],"names":[],"mappings":";;;AAAA,6EAAoE;AAGpE,MAAa,gBAAgB;IAEzB,MAAM,CAAC,KAAK,CAAW,EAAE,GAAG,IAAI,EAAE,QAAqB;QACnD,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE;YACvD,IAAI,QAAQ,EAAE,CAAC;gBACX,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;iBACI,CAAC;gBACF,OAAO,CAAC,CAAM,CAAC,CAAC;YACpB,CAAC;QACL,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IACX,CAAC;IAGD,MAAM,CAAC,QAAQ,CACX,EAAE,GAAG,IAAI,EACT,QAA0B,EAC1B,MAAsC;QAEtC,OAAO,IAAI,yCAAgB,CAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;CACJ;AArBD,4CAqBC"}
@@ -1,65 +0,0 @@
1
- export interface A_TYPES__ASEID_Constructor {
2
- /**
3
- * Namespace for the ASEID
4
- * Generally it is the application name or code, should correspond to the namespace of the application
5
- * Could be ID or ASEID
6
- */
7
- namespace?: string;
8
- /**
9
- * Entity Scope the primary location of the resource
10
- * Organization, or organization Unit
11
- * Could be ID or ASEID
12
- *
13
- */
14
- scope: number | string;
15
- /**
16
- * Entity Type the type of the resource
17
- */
18
- entity: string;
19
- /**
20
- * Entity ID the unique identifier of the resource
21
- */
22
- id: number | string;
23
- /**
24
- * Version of the entity (optional)
25
- */
26
- version?: string;
27
- /**
28
- * Shard of the entity (optional)
29
- */
30
- shard?: string;
31
- }
32
- export interface A_TYPES__ASEID_ConstructorConfig {
33
- /**
34
- * If true, the entity ASEID will be distributed across multiple shards.
35
- * In this case SHARD should be provided via Environment Variables (A_SHARD) or Configurations
36
- *
37
- */
38
- sharding?: boolean;
39
- }
40
- export type A_TYPES__ASEID_JSON = {
41
- /**
42
- * Namespace for the ASEID
43
- */
44
- namespace: string;
45
- /**
46
- * Entity Scope the primary location of the resource
47
- */
48
- scope: string;
49
- /**
50
- * Entity Type the type of the resource
51
- */
52
- entity: string;
53
- /**
54
- * Entity ID the unique identifier of the resource
55
- */
56
- id: string;
57
- /**
58
- * Version of the entity (optional)
59
- */
60
- version?: string;
61
- /**
62
- * Shard of the entity (optional)
63
- */
64
- shard?: string;
65
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"ASEID.types.js","sourceRoot":"","sources":["../../../src/types/ASEID.types.ts"],"names":[],"mappings":";;AAqCC,CAAC;AAYD,CAAC"}
@@ -1,59 +0,0 @@
1
- export type A_AUTH_RequestParam = {
2
- id?: string;
3
- /**
4
- * The issuer of the parameter. Could be system, custom, proxy, credentials or SIC to data provider service(e.g. CSS)
5
- */
6
- issuer?: 'system' | 'custom' | 'proxy' | 'credentials' | string;
7
- /**
8
- * Common internal value, uses for proper mapping
9
- */
10
- key?: string;
11
- /**
12
- * Allows to define the type of the parameter to convert input during the execution
13
- */
14
- type: 'json' | 'array' | 'number' | 'string' | 'boolean' | 'base_64' | 'file' | 'file_url';
15
- /**
16
- * The name of the parameter
17
- */
18
- name: string;
19
- /**
20
- * The value of the parameter
21
- */
22
- value: string;
23
- };
24
- type Decrement = [never, 0, 1, 2, 3, 4, 5];
25
- export type A_TYPES__DeepPartial<T, D extends number = 5> = {
26
- [P in keyof Required<T>]?: [
27
- D
28
- ] 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];
29
- };
30
- export type A_TYPES__ObjectKeyEnum<T, E> = {
31
- [P in keyof Required<T>]?: T[P] extends object ? A_TYPES__ObjectKeyEnum<T[P], E> : E;
32
- };
33
- export type A_TYPES__Dictionary<T> = {
34
- [Key: string]: T;
35
- };
36
- export type A_TYPES__NonObjectPaths<T> = T extends object ? {
37
- [K in keyof T]: `${Exclude<K, symbol>}${""}`;
38
- }[keyof T] : never;
39
- export type A_TYPES__Paths<T, D extends number = 5> = [D] extends [never] ? never : (T extends object ? {
40
- [K in keyof T]: `${Exclude<K, symbol>}${"" | `.${A_TYPES__Paths<T[K], Decrement[D]>}`}`;
41
- }[keyof T] : never);
42
- export type A_TYPES__UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
43
- export type A_TYPES__PathsToObject<_Obj, T extends readonly string[]> = A_TYPES__UnionToIntersection<{
44
- [K in keyof T]: T[K] extends `${infer Key}.${infer Rest}` ? {
45
- [P in Key]: P extends keyof _Obj ? A_TYPES__PathsToObject<Required<_Obj>[P], [Rest]> : any;
46
- } : {
47
- [P in T[K]]: `${T[K]}` extends keyof Required<_Obj> ? Required<_Obj>[`${T[K]}`] : never;
48
- };
49
- }[number]>;
50
- export type A_TYPES__Required<T, arr extends (A_TYPES__Paths<T>)[] = (A_TYPES__Paths<T>)[]> = A_TYPES__PathsToObject<T, arr> & T;
51
- export type A_TYPES__ExtractNested<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? {
52
- [Key in K]: A_TYPES__ExtractNested<T[K], Rest>;
53
- } : never : P extends keyof T ? {
54
- [Key in P]: T[P];
55
- } : never;
56
- export type A_TYPES__ExtractProperties<T, P extends A_TYPES__Paths<T>[]> = A_TYPES__UnionToIntersection<{
57
- [K in keyof P]: P[K] extends string ? A_TYPES__ExtractNested<T, P[K]> : never;
58
- }[number]>;
59
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A_Common.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Common.types.js","sourceRoot":"","sources":["../../../src/types/A_Common.types.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import { ASEID } from "../global/ASEID.class";
2
- export interface A_TYPES__IAEntity {
3
- /**
4
- * The ASEID of the entity
5
- */
6
- aseid: ASEID;
7
- }
8
- export type A_TYPES__AEntity_JSON = {
9
- /**
10
- * The ASEID of the entity
11
- */
12
- aseid: string;
13
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- ;
4
- //# sourceMappingURL=A_Entity.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Entity.types.js","sourceRoot":"","sources":["../../../src/types/A_Entity.types.ts"],"names":[],"mappings":";;AAOC,CAAC"}
@@ -1,7 +0,0 @@
1
- export type A_TYPES__Error = {
2
- message: string;
3
- code: string;
4
- description: string;
5
- link?: string;
6
- originalError?: Error | unknown;
7
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A_Error.type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Error.type.js","sourceRoot":"","sources":["../../../src/types/A_Error.type.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export type A_TYPES__Error = {
2
- message: string;
3
- code: string;
4
- description: string;
5
- link?: string;
6
- originalError?: Error | unknown;
7
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A_Error.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_Error.types.js","sourceRoot":"","sources":["../../../src/types/A_Error.types.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A_ScheduleObject.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_ScheduleObject.types.js","sourceRoot":"","sources":["../../../src/types/A_ScheduleObject.types.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { A_TYPES__Error } from "./A_Error.types";
2
- export type A_TYPES__ServerError = {
3
- serverCode: number;
4
- } & A_TYPES__Error;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A_ServerError.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A_ServerError.types.js","sourceRoot":"","sources":["../../../src/types/A_ServerError.types.ts"],"names":[],"mappings":""}