@degenerate/rules 0.0.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 (188) hide show
  1. package/README.md +3 -0
  2. package/dist/generic/src/_settings/cryptography-settings.d.ts +27 -0
  3. package/dist/generic/src/_settings/cryptography-settings.d.ts.map +1 -0
  4. package/dist/generic/src/_settings/cryptography-settings.js +27 -0
  5. package/dist/generic/src/crypto/calculate-combined-hash.d.ts +13 -0
  6. package/dist/generic/src/crypto/calculate-combined-hash.d.ts.map +1 -0
  7. package/dist/generic/src/crypto/calculate-combined-hash.js +44 -0
  8. package/dist/generic/src/crypto/calculate-hash.d.ts +7 -0
  9. package/dist/generic/src/crypto/calculate-hash.d.ts.map +1 -0
  10. package/dist/generic/src/crypto/calculate-hash.js +37 -0
  11. package/dist/generic/src/crypto/index.d.ts +13 -0
  12. package/dist/generic/src/crypto/index.d.ts.map +1 -0
  13. package/dist/generic/src/crypto/index.js +34 -0
  14. package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-mnemonic.d.ts +12 -0
  15. package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-mnemonic.d.ts.map +1 -0
  16. package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-mnemonic.js +44 -0
  17. package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-private-key.d.ts +11 -0
  18. package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-private-key.d.ts.map +1 -0
  19. package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-private-key.js +40 -0
  20. package/dist/generic/src/crypto/private-public-keys/generation/create-256-private-key-from-mnemonic.d.ts +11 -0
  21. package/dist/generic/src/crypto/private-public-keys/generation/create-256-private-key-from-mnemonic.d.ts.map +1 -0
  22. package/dist/generic/src/crypto/private-public-keys/generation/create-256-private-key-from-mnemonic.js +45 -0
  23. package/dist/generic/src/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.d.ts +10 -0
  24. package/dist/generic/src/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.d.ts.map +1 -0
  25. package/dist/generic/src/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.js +40 -0
  26. package/dist/generic/src/crypto/private-public-keys/generation/create-random-256-private-key.d.ts +8 -0
  27. package/dist/generic/src/crypto/private-public-keys/generation/create-random-256-private-key.d.ts.map +1 -0
  28. package/dist/generic/src/crypto/private-public-keys/generation/create-random-256-private-key.js +41 -0
  29. package/dist/generic/src/crypto/private-public-keys/generation/generate-key-pair.d.ts +11 -0
  30. package/dist/generic/src/crypto/private-public-keys/generation/generate-key-pair.d.ts.map +1 -0
  31. package/dist/generic/src/crypto/private-public-keys/generation/generate-key-pair.js +39 -0
  32. package/dist/generic/src/crypto/private-public-keys/generation/get-private-public-key-from-keypair.d.ts +15 -0
  33. package/dist/generic/src/crypto/private-public-keys/generation/get-private-public-key-from-keypair.d.ts.map +1 -0
  34. package/dist/generic/src/crypto/private-public-keys/generation/get-private-public-key-from-keypair.js +21 -0
  35. package/dist/generic/src/crypto/signature/create-crypto-signature.d.ts +9 -0
  36. package/dist/generic/src/crypto/signature/create-crypto-signature.d.ts.map +1 -0
  37. package/dist/generic/src/crypto/signature/create-crypto-signature.js +13 -0
  38. package/dist/generic/src/crypto/signature/verify-crypto-signature-by-data.d.ts +13 -0
  39. package/dist/generic/src/crypto/signature/verify-crypto-signature-by-data.d.ts.map +1 -0
  40. package/dist/generic/src/crypto/signature/verify-crypto-signature-by-data.js +45 -0
  41. package/dist/generic/src/crypto/signature/verify-crypto-signature-by-hash.d.ts +13 -0
  42. package/dist/generic/src/crypto/signature/verify-crypto-signature-by-hash.d.ts.map +1 -0
  43. package/dist/generic/src/crypto/signature/verify-crypto-signature-by-hash.js +42 -0
  44. package/dist/generic/src/errors/base-error.d.ts +23 -0
  45. package/dist/generic/src/errors/base-error.d.ts.map +1 -0
  46. package/dist/generic/src/errors/base-error.js +34 -0
  47. package/dist/generic/src/errors/generic/generic-errors.d.ts +35 -0
  48. package/dist/generic/src/errors/generic/generic-errors.d.ts.map +1 -0
  49. package/dist/generic/src/errors/generic/generic-errors.js +47 -0
  50. package/dist/generic/src/errors/index.d.ts +7 -0
  51. package/dist/generic/src/errors/index.d.ts.map +1 -0
  52. package/dist/generic/src/errors/index.js +22 -0
  53. package/dist/generic/src/errors/request/request-errors.d.ts +89 -0
  54. package/dist/generic/src/errors/request/request-errors.d.ts.map +1 -0
  55. package/dist/generic/src/errors/request/request-errors.js +120 -0
  56. package/dist/generic/src/errors/safe/safe-rules-errors.d.ts +11 -0
  57. package/dist/generic/src/errors/safe/safe-rules-errors.d.ts.map +1 -0
  58. package/dist/generic/src/errors/safe/safe-rules-errors.js +17 -0
  59. package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts +8 -0
  60. package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts.map +1 -0
  61. package/dist/generic/src/errors/scheduler/scheduler-errors.js +14 -0
  62. package/dist/generic/src/errors/share-data/share-data-errors.d.ts +49 -0
  63. package/dist/generic/src/errors/share-data/share-data-errors.d.ts.map +1 -0
  64. package/dist/generic/src/errors/share-data/share-data-errors.js +66 -0
  65. package/dist/generic/src/helpers/array/array-helpers.d.ts +8 -0
  66. package/dist/generic/src/helpers/array/array-helpers.d.ts.map +1 -0
  67. package/dist/generic/src/helpers/array/array-helpers.js +14 -0
  68. package/dist/generic/src/helpers/data/data-helpers.d.ts +46 -0
  69. package/dist/generic/src/helpers/data/data-helpers.d.ts.map +1 -0
  70. package/dist/generic/src/helpers/data/data-helpers.js +106 -0
  71. package/dist/generic/src/helpers/file/file-helpers.d.ts +12 -0
  72. package/dist/generic/src/helpers/file/file-helpers.d.ts.map +1 -0
  73. package/dist/generic/src/helpers/file/file-helpers.js +39 -0
  74. package/dist/generic/src/helpers/id-helpers.d.ts +8 -0
  75. package/dist/generic/src/helpers/id-helpers.d.ts.map +1 -0
  76. package/dist/generic/src/helpers/id-helpers.js +19 -0
  77. package/dist/generic/src/helpers/index.d.ts +11 -0
  78. package/dist/generic/src/helpers/index.d.ts.map +1 -0
  79. package/dist/generic/src/helpers/index.js +31 -0
  80. package/dist/generic/src/helpers/lodash/lodash-helpers.d.ts +14 -0
  81. package/dist/generic/src/helpers/lodash/lodash-helpers.d.ts.map +1 -0
  82. package/dist/generic/src/helpers/lodash/lodash-helpers.js +28 -0
  83. package/dist/generic/src/helpers/object-helpers.d.ts +23 -0
  84. package/dist/generic/src/helpers/object-helpers.d.ts.map +1 -0
  85. package/dist/generic/src/helpers/object-helpers.js +54 -0
  86. package/dist/generic/src/helpers/object-validation-helpers.d.ts +59 -0
  87. package/dist/generic/src/helpers/object-validation-helpers.d.ts.map +1 -0
  88. package/dist/generic/src/helpers/object-validation-helpers.js +233 -0
  89. package/dist/generic/src/helpers/request/params-object-helpers.d.ts +38 -0
  90. package/dist/generic/src/helpers/request/params-object-helpers.d.ts.map +1 -0
  91. package/dist/generic/src/helpers/request/params-object-helpers.js +54 -0
  92. package/dist/generic/src/helpers/request/query-object-helpers.d.ts +12 -0
  93. package/dist/generic/src/helpers/request/query-object-helpers.d.ts.map +1 -0
  94. package/dist/generic/src/helpers/request/query-object-helpers.js +25 -0
  95. package/dist/generic/src/helpers/request/request-object-helpers.d.ts +19 -0
  96. package/dist/generic/src/helpers/request/request-object-helpers.d.ts.map +1 -0
  97. package/dist/generic/src/helpers/request/request-object-helpers.js +28 -0
  98. package/dist/generic/src/index.d.ts +6 -0
  99. package/dist/generic/src/index.d.ts.map +1 -0
  100. package/dist/generic/src/index.js +23 -0
  101. package/dist/generic/src/models/data/data-models.d.ts +24 -0
  102. package/dist/generic/src/models/data/data-models.d.ts.map +1 -0
  103. package/dist/generic/src/models/data/data-models.js +3 -0
  104. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts +9 -0
  105. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -0
  106. package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.js +2 -0
  107. package/dist/generic/src/models/events/share-event-models.d.ts +65 -0
  108. package/dist/generic/src/models/events/share-event-models.d.ts.map +1 -0
  109. package/dist/generic/src/models/events/share-event-models.js +70 -0
  110. package/dist/generic/src/models/functions/share-data-function-models.d.ts +86 -0
  111. package/dist/generic/src/models/functions/share-data-function-models.d.ts.map +1 -0
  112. package/dist/generic/src/models/functions/share-data-function-models.js +17 -0
  113. package/dist/generic/src/models/generic/request-response-models.d.ts +8 -0
  114. package/dist/generic/src/models/generic/request-response-models.d.ts.map +1 -0
  115. package/dist/generic/src/models/generic/request-response-models.js +2 -0
  116. package/dist/generic/src/models/index.d.ts +8 -0
  117. package/dist/generic/src/models/index.d.ts.map +1 -0
  118. package/dist/generic/src/models/index.js +24 -0
  119. package/dist/generic/src/models/rules/share-rule-models.d.ts +277 -0
  120. package/dist/generic/src/models/rules/share-rule-models.d.ts.map +1 -0
  121. package/dist/generic/src/models/rules/share-rule-models.js +107 -0
  122. package/dist/generic/src/models/share-data/share-data.d.ts +55 -0
  123. package/dist/generic/src/models/share-data/share-data.d.ts.map +1 -0
  124. package/dist/generic/src/models/share-data/share-data.js +19 -0
  125. package/dist/rules/jest.config.d.ts +8 -0
  126. package/dist/rules/jest.config.d.ts.map +1 -0
  127. package/dist/rules/jest.config.js +44 -0
  128. package/dist/rules/src/evaluation/check-function-integrity.d.ts +7 -0
  129. package/dist/rules/src/evaluation/check-function-integrity.d.ts.map +1 -0
  130. package/dist/rules/src/evaluation/check-function-integrity.js +14 -0
  131. package/dist/rules/src/evaluation/check-if-proposal-is-valid.d.ts +11 -0
  132. package/dist/rules/src/evaluation/check-if-proposal-is-valid.d.ts.map +1 -0
  133. package/dist/rules/src/evaluation/check-if-proposal-is-valid.js +15 -0
  134. package/dist/rules/src/evaluation/conditions/boolean-conditions.d.ts +15 -0
  135. package/dist/rules/src/evaluation/conditions/boolean-conditions.d.ts.map +1 -0
  136. package/dist/rules/src/evaluation/conditions/boolean-conditions.js +29 -0
  137. package/dist/rules/src/evaluation/conditions/contains-conditions.d.ts +16 -0
  138. package/dist/rules/src/evaluation/conditions/contains-conditions.d.ts.map +1 -0
  139. package/dist/rules/src/evaluation/conditions/contains-conditions.js +27 -0
  140. package/dist/rules/src/evaluation/conditions/empty-conditions.d.ts +15 -0
  141. package/dist/rules/src/evaluation/conditions/empty-conditions.d.ts.map +1 -0
  142. package/dist/rules/src/evaluation/conditions/empty-conditions.js +50 -0
  143. package/dist/rules/src/evaluation/conditions/equality-conditions.d.ts +15 -0
  144. package/dist/rules/src/evaluation/conditions/equality-conditions.d.ts.map +1 -0
  145. package/dist/rules/src/evaluation/conditions/equality-conditions.js +24 -0
  146. package/dist/rules/src/evaluation/conditions/null-conditions.d.ts +15 -0
  147. package/dist/rules/src/evaluation/conditions/null-conditions.d.ts.map +1 -0
  148. package/dist/rules/src/evaluation/conditions/null-conditions.js +24 -0
  149. package/dist/rules/src/evaluation/conditions/range-conditions.d.ts +15 -0
  150. package/dist/rules/src/evaluation/conditions/range-conditions.d.ts.map +1 -0
  151. package/dist/rules/src/evaluation/conditions/range-conditions.js +28 -0
  152. package/dist/rules/src/evaluation/conditions/special-conditions.d.ts +15 -0
  153. package/dist/rules/src/evaluation/conditions/special-conditions.d.ts.map +1 -0
  154. package/dist/rules/src/evaluation/conditions/special-conditions.js +47 -0
  155. package/dist/rules/src/evaluation/conditions/starts-end-with-conditions.d.ts +16 -0
  156. package/dist/rules/src/evaluation/conditions/starts-end-with-conditions.d.ts.map +1 -0
  157. package/dist/rules/src/evaluation/conditions/starts-end-with-conditions.js +25 -0
  158. package/dist/rules/src/evaluation/conditions/typeof-rule-conditions.d.ts +16 -0
  159. package/dist/rules/src/evaluation/conditions/typeof-rule-conditions.d.ts.map +1 -0
  160. package/dist/rules/src/evaluation/conditions/typeof-rule-conditions.js +56 -0
  161. package/dist/rules/src/evaluation/determine-if-data-has-changed.d.ts +11 -0
  162. package/dist/rules/src/evaluation/determine-if-data-has-changed.d.ts.map +1 -0
  163. package/dist/rules/src/evaluation/determine-if-data-has-changed.js +14 -0
  164. package/dist/rules/src/evaluation/evaluate-rule-conditions.d.ts +10 -0
  165. package/dist/rules/src/evaluation/evaluate-rule-conditions.d.ts.map +1 -0
  166. package/dist/rules/src/evaluation/evaluate-rule-conditions.js +66 -0
  167. package/dist/rules/src/evaluation/evaluate-rule.d.ts +13 -0
  168. package/dist/rules/src/evaluation/evaluate-rule.d.ts.map +1 -0
  169. package/dist/rules/src/evaluation/evaluate-rule.js +50 -0
  170. package/dist/rules/src/evaluation/evaluate-rules.d.ts +12 -0
  171. package/dist/rules/src/evaluation/evaluate-rules.d.ts.map +1 -0
  172. package/dist/rules/src/evaluation/evaluate-rules.js +50 -0
  173. package/dist/rules/src/evaluation/get-data-changed-information.d.ts +11 -0
  174. package/dist/rules/src/evaluation/get-data-changed-information.d.ts.map +1 -0
  175. package/dist/rules/src/evaluation/get-data-changed-information.js +31 -0
  176. package/dist/rules/src/evaluation/get-root-property-results.d.ts +14 -0
  177. package/dist/rules/src/evaluation/get-root-property-results.d.ts.map +1 -0
  178. package/dist/rules/src/evaluation/get-root-property-results.js +27 -0
  179. package/dist/rules/src/evaluation/index.d.ts +10 -0
  180. package/dist/rules/src/evaluation/index.d.ts.map +1 -0
  181. package/dist/rules/src/evaluation/index.js +27 -0
  182. package/dist/rules/src/evaluation/start-rule-evaluation.d.ts +13 -0
  183. package/dist/rules/src/evaluation/start-rule-evaluation.d.ts.map +1 -0
  184. package/dist/rules/src/evaluation/start-rule-evaluation.js +42 -0
  185. package/dist/rules/src/index.d.ts +2 -0
  186. package/dist/rules/src/index.d.ts.map +1 -0
  187. package/dist/rules/src/index.js +17 -0
  188. package/package.json +38 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-crypto-signature.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/crypto/signature/create-crypto-signature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC;;;;GAIG;AACH,QAAA,MAAM,8BAA8B,YAAa,QAAQ,CAAC,EAAE,CAAC,OAAO,cAAc,MAAM,KAAG,MAG1F,CAAC;AAEF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createEllipticalCurveSignature = void 0;
4
+ /**
5
+ * This function creates a signature for a hash using an elliptical curve.
6
+ * @param keyPair the key pair to use for signing.
7
+ * @param hashToSign the hash to sign.
8
+ */
9
+ const createEllipticalCurveSignature = (keyPair, hashToSign) => {
10
+ const signature = keyPair.sign(hashToSign).toDER('hex');
11
+ return signature;
12
+ };
13
+ exports.createEllipticalCurveSignature = createEllipticalCurveSignature;
@@ -0,0 +1,13 @@
1
+ import { EllipticalCurvesSigning, EllipticalCurvesEncryption } from '../../_settings/cryptography-settings';
2
+ /**
3
+ * This function verifies the signature of the data using the public key
4
+ *
5
+ * @param curve the curve used for the signature
6
+ * @param data the data to verify
7
+ * @param signature the signature to verify
8
+ * @param publicKey the public key to verify the signature
9
+ * @returns
10
+ */
11
+ declare const verifyCryptoSignatureByData: (curve: EllipticalCurvesSigning | EllipticalCurvesEncryption, data: any, signature: string, publicKey: string) => Promise<boolean>;
12
+ export { verifyCryptoSignatureByData };
13
+ //# sourceMappingURL=verify-crypto-signature-by-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-crypto-signature-by-data.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/crypto/signature/verify-crypto-signature-by-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAE5G;;;;;;;;GAQG;AACH,QAAA,MAAM,2BAA2B,UAAiB,uBAAuB,GAAG,0BAA0B,QAAQ,GAAG,aAAa,MAAM,aACrH,MAAM,KAAG,OAAO,CAAC,OAAO,CAMtC,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.verifyCryptoSignatureByData = void 0;
27
+ /* eslint-disable @typescript-eslint/no-explicit-any */
28
+ const elliptic = __importStar(require("elliptic"));
29
+ /**
30
+ * This function verifies the signature of the data using the public key
31
+ *
32
+ * @param curve the curve used for the signature
33
+ * @param data the data to verify
34
+ * @param signature the signature to verify
35
+ * @param publicKey the public key to verify the signature
36
+ * @returns
37
+ */
38
+ const verifyCryptoSignatureByData = async (curve, data, signature, publicKey) => {
39
+ // convert data to a string.
40
+ const hash = JSON.stringify(data);
41
+ // eslint-disable-next-line new-cap
42
+ const key = new elliptic.ec(curve).keyFromPublic(publicKey, 'hex');
43
+ return key.verify(hash, signature);
44
+ };
45
+ exports.verifyCryptoSignatureByData = verifyCryptoSignatureByData;
@@ -0,0 +1,13 @@
1
+ import { EllipticalCurvesSigning, EllipticalCurvesEncryption } from '../../_settings/cryptography-settings';
2
+ /**
3
+ * This function verifies the signature of the data using the public key
4
+ *
5
+ * @param curve the curve used for the signature
6
+ * @param hash the hash to verify
7
+ * @param signature the signature to verify
8
+ * @param publicKey the public key to verify the signature
9
+ * @returns
10
+ */
11
+ declare const verifyCryptoSignatureByHash: (curve: EllipticalCurvesSigning | EllipticalCurvesEncryption, hash: string, signature: string, publicKey: string) => Promise<boolean>;
12
+ export { verifyCryptoSignatureByHash };
13
+ //# sourceMappingURL=verify-crypto-signature-by-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-crypto-signature-by-hash.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/crypto/signature/verify-crypto-signature-by-hash.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAE5G;;;;;;;;GAQG;AACH,QAAA,MAAM,2BAA2B,UAAiB,uBAAuB,GAAG,0BAA0B,QAAQ,MAAM,aAAa,MAAM,aACxH,MAAM,KAAG,OAAO,CAAC,OAAO,CAItC,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.verifyCryptoSignatureByHash = void 0;
27
+ const elliptic = __importStar(require("elliptic"));
28
+ /**
29
+ * This function verifies the signature of the data using the public key
30
+ *
31
+ * @param curve the curve used for the signature
32
+ * @param hash the hash to verify
33
+ * @param signature the signature to verify
34
+ * @param publicKey the public key to verify the signature
35
+ * @returns
36
+ */
37
+ const verifyCryptoSignatureByHash = async (curve, hash, signature, publicKey) => {
38
+ // eslint-disable-next-line new-cap
39
+ const key = new elliptic.ec(curve).keyFromPublic(publicKey, 'hex');
40
+ return key.verify(hash, signature);
41
+ };
42
+ exports.verifyCryptoSignatureByHash = verifyCryptoSignatureByHash;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This is the base error class that all other errors should extend from.
3
+ */
4
+ export declare class BaseError extends Error {
5
+ errorCode?: number;
6
+ /**
7
+ * This is the base error type for the application.
8
+ *
9
+ * @param message the message to include.
10
+ * @param errorCode the error code if we want to include one.
11
+ */
12
+ constructor(message: string, errorCode?: number);
13
+ /**
14
+ * This function returns the error as a JSON object.
15
+ */
16
+ toJSON(): {
17
+ message: string;
18
+ errorType: string;
19
+ errorCode: number | undefined;
20
+ stack: string | undefined;
21
+ };
22
+ }
23
+ //# sourceMappingURL=base-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-error.d.ts","sourceRoot":"","sources":["../../../../../generic/src/errors/base-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;gBACS,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAU/C;;OAEG;IACI,MAAM;;;;;;CAQhB"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseError = void 0;
4
+ /**
5
+ * This is the base error class that all other errors should extend from.
6
+ */
7
+ class BaseError extends Error {
8
+ /**
9
+ * This is the base error type for the application.
10
+ *
11
+ * @param message the message to include.
12
+ * @param errorCode the error code if we want to include one.
13
+ */
14
+ constructor(message, errorCode) {
15
+ super(message); // Pass the message to the Error constructor
16
+ this.name = this.constructor.name; // Set the name of the error
17
+ this.errorCode = errorCode; // Set the error code
18
+ // This line is needed to restore the correct prototype chain.
19
+ // (see note below)
20
+ Object.setPrototypeOf(this, new.target.prototype);
21
+ }
22
+ /**
23
+ * This function returns the error as a JSON object.
24
+ */
25
+ toJSON() {
26
+ return {
27
+ message: this.message,
28
+ errorType: this.name,
29
+ errorCode: this.errorCode,
30
+ stack: this.stack,
31
+ };
32
+ }
33
+ }
34
+ exports.BaseError = BaseError;
@@ -0,0 +1,35 @@
1
+ import { BaseError } from '../base-error';
2
+ /**
3
+ * This file contains all the errors that are more generic in nature.
4
+ */
5
+ /**
6
+ * This is used for when function data was not received.
7
+ */
8
+ export declare class FunctionDataNotReceivedError extends BaseError {
9
+ /**
10
+ * This is used for when function data was not received.
11
+ */
12
+ constructor();
13
+ }
14
+ /**
15
+ * This is used for when an item can not have a searchable index created for it.
16
+ */
17
+ export declare class UnableToCreateSearchableIndexError extends BaseError {
18
+ /**
19
+ * This is used for when an item can not have a searchable index created for it.
20
+ *
21
+ * @param item
22
+ */
23
+ constructor(item: any);
24
+ }
25
+ /**
26
+ * This is used for when a function is not implemented.
27
+ */
28
+ export declare class NotImplementedError extends BaseError {
29
+ /**
30
+ * This is used for when a function is not implemented.
31
+ *
32
+ */
33
+ constructor();
34
+ }
35
+ //# sourceMappingURL=generic-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generic-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/generic/generic-errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AAEH;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IACvD;;OAEG;;CAIN;AAED;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,SAAS;IAC7D;;;;OAIG;gBACS,IAAI,EAAE,GAAG;CAGxB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,SAAS;IAC9C;;;OAGG;;CAIN"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotImplementedError = exports.UnableToCreateSearchableIndexError = exports.FunctionDataNotReceivedError = void 0;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+ const base_error_1 = require("../base-error");
6
+ /**
7
+ * This file contains all the errors that are more generic in nature.
8
+ */
9
+ /**
10
+ * This is used for when function data was not received.
11
+ */
12
+ class FunctionDataNotReceivedError extends base_error_1.BaseError {
13
+ /**
14
+ * This is used for when function data was not received.
15
+ */
16
+ constructor() {
17
+ super('Data required for the functions to run was not received.');
18
+ }
19
+ }
20
+ exports.FunctionDataNotReceivedError = FunctionDataNotReceivedError;
21
+ /**
22
+ * This is used for when an item can not have a searchable index created for it.
23
+ */
24
+ class UnableToCreateSearchableIndexError extends base_error_1.BaseError {
25
+ /**
26
+ * This is used for when an item can not have a searchable index created for it.
27
+ *
28
+ * @param item
29
+ */
30
+ constructor(item) {
31
+ super(`The item ${item} can not have a searchable index created for it.`);
32
+ }
33
+ }
34
+ exports.UnableToCreateSearchableIndexError = UnableToCreateSearchableIndexError;
35
+ /**
36
+ * This is used for when a function is not implemented.
37
+ */
38
+ class NotImplementedError extends base_error_1.BaseError {
39
+ /**
40
+ * This is used for when a function is not implemented.
41
+ *
42
+ */
43
+ constructor() {
44
+ super('This function / feature is not implemented.');
45
+ }
46
+ }
47
+ exports.NotImplementedError = NotImplementedError;
@@ -0,0 +1,7 @@
1
+ export * from './base-error';
2
+ export * from './generic/generic-errors';
3
+ export * from './request/request-errors';
4
+ export * from './safe/safe-rules-errors';
5
+ export * from './scheduler/scheduler-errors';
6
+ export * from './share-data/share-data-errors';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../generic/src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
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
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./base-error"), exports);
18
+ __exportStar(require("./generic/generic-errors"), exports);
19
+ __exportStar(require("./request/request-errors"), exports);
20
+ __exportStar(require("./safe/safe-rules-errors"), exports);
21
+ __exportStar(require("./scheduler/scheduler-errors"), exports);
22
+ __exportStar(require("./share-data/share-data-errors"), exports);
@@ -0,0 +1,89 @@
1
+ import { BaseError } from '../base-error';
2
+ /**
3
+ * This is thrown when the request object is not valid.
4
+ */
5
+ export declare class RequestObjectValidationFailedError extends BaseError {
6
+ /**
7
+ * This is thrown when the request object is not valid.
8
+ * @param objectToValidate the object that is not valid
9
+ * @param validationType the type of validation that failed
10
+ */
11
+ constructor(objectToValidate: any, validationObject: string, validationType: string);
12
+ }
13
+ /**
14
+ * This is throw when the request object has too many properties.
15
+ */
16
+ export declare class RequestObjectTooManyPropertiesError extends BaseError {
17
+ /**
18
+ * This is throw when the request object has too many properties.
19
+ * @param objectToValidate the object that is not valid
20
+ * @param validationOject the object property text that is being validated
21
+ * @param totalProperties the total properties on the object
22
+ * @param maxProperties the max properties allowed on the object
23
+ */
24
+ constructor(objectToValidate: any, validationOject: string, totalProperties: number, maxProperties: number);
25
+ }
26
+ /**
27
+ * This is thrown when the request object has too few properties.
28
+ */
29
+ export declare class RequestObjectTooFewPropertiesError extends BaseError {
30
+ /**
31
+ * This is thrown when the request object has too few properties.
32
+ * @param objectToValidate the object that is not valid
33
+ * @param validationOject the object property text that is being validated
34
+ * @param totalProperties the total properties on the object
35
+ * @param minProperties the min properties allowed on the object
36
+ */
37
+ constructor(objectToValidate: any, validationOject: string, totalProperties: number, minProperties: number);
38
+ }
39
+ /**
40
+ * This is thrown when the request object should only have a certain number of properties.
41
+ */
42
+ export declare class RequestObjectShouldOnlyHaveXPropertiesError extends BaseError {
43
+ /**
44
+ * This is thrown when the request object should only have a certain number of properties.
45
+ * @param objectToValidate the object that is not valid
46
+ * @param validationOject the object property text that is being validated
47
+ * @param totalProperties the total properties on the object
48
+ * @param expectedProperties the expected properties on the object
49
+ */
50
+ constructor(objectToValidate: any, validationOject: string, totalProperties: number, expectedProperties: number);
51
+ }
52
+ /**
53
+ * This is throw when the request object has a property that does not match the param property.
54
+ */
55
+ export declare class RequestObjectPropertyNotMatchingParamProperty extends BaseError {
56
+ /**
57
+ * This is thrown when the request object doesnot match the param property.
58
+ * @param requestPropertyName the property in the request object
59
+ * @param requestPropertyValue the value of the property in the request object
60
+ * @param paramPropertyName the property in the param object
61
+ * @param paramPropertyValue the value of the property in the param object
62
+ */
63
+ constructor(requestPropertyName: string, requestPropertyValue: any, paramPropertyName: string, paramPropertyValue: any);
64
+ }
65
+ /**
66
+ * This is thrown when the query object is not valid.
67
+ */
68
+ export declare class RequestQueryNotValidError extends BaseError {
69
+ /**
70
+ * This is thrown when the query object is not valid.
71
+ * @param queryObjectName the name of the query object
72
+ * @param queryValue the value of the query object
73
+ * @param expectedType the expected type of the query object
74
+ */
75
+ constructor(queryObjectName: string, queryValue: any, expectedType: string);
76
+ }
77
+ /**
78
+ * This is thrown when the param object is not valid.
79
+ */
80
+ export declare class RequestParamNotValidError extends BaseError {
81
+ /**
82
+ * This is thrown when the param object is not valid.
83
+ * @param paramName the name of the param object
84
+ * @param paramValue the value of the param object
85
+ * @param expectedType the expected type of the param object
86
+ */
87
+ constructor(paramName: string, paramValue: any, expectedType: string, allParams: any);
88
+ }
89
+ //# sourceMappingURL=request-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/request/request-errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI1C;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,SAAS;IAC7D;;;;OAIG;gBACS,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;CAGtF;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,SAAS;IAC9D;;;;;;OAMG;gBACS,gBAAgB,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;CAG7G;AAED;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,SAAS;IAC7D;;;;;;OAMG;gBACS,gBAAgB,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;CAG7G;AAED;;GAEG;AACH,qBAAa,2CAA4C,SAAQ,SAAS;IACtE;;;;;;OAMG;gBACS,gBAAgB,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM;CAGlH;AAED;;GAEG;AACH,qBAAa,6CAA8C,SAAQ,SAAS;IACxE;;;;;;OAMG;gBACS,mBAAmB,EAAE,MAAM,EAAE,oBAAoB,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG;CAGzH;AAMD;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACpD;;;;;OAKG;gBACS,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM;CAG7E;AAMD;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACpD;;;;;OAKG;gBACS,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG;CAGvF"}
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RequestParamNotValidError = exports.RequestQueryNotValidError = exports.RequestObjectPropertyNotMatchingParamProperty = exports.RequestObjectShouldOnlyHaveXPropertiesError = exports.RequestObjectTooFewPropertiesError = exports.RequestObjectTooManyPropertiesError = exports.RequestObjectValidationFailedError = void 0;
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+ // This file contains the errors that are thrown when the request object is not valid.
6
+ const base_error_1 = require("../base-error");
7
+ //#region Request Body Errors
8
+ /**
9
+ * This is thrown when the request object is not valid.
10
+ */
11
+ class RequestObjectValidationFailedError extends base_error_1.BaseError {
12
+ /**
13
+ * This is thrown when the request object is not valid.
14
+ * @param objectToValidate the object that is not valid
15
+ * @param validationType the type of validation that failed
16
+ */
17
+ constructor(objectToValidate, validationObject, validationType) {
18
+ super(`The object ${objectToValidate} in the node ${validationObject} is not a valid ${validationType}`);
19
+ }
20
+ }
21
+ exports.RequestObjectValidationFailedError = RequestObjectValidationFailedError;
22
+ /**
23
+ * This is throw when the request object has too many properties.
24
+ */
25
+ class RequestObjectTooManyPropertiesError extends base_error_1.BaseError {
26
+ /**
27
+ * This is throw when the request object has too many properties.
28
+ * @param objectToValidate the object that is not valid
29
+ * @param validationOject the object property text that is being validated
30
+ * @param totalProperties the total properties on the object
31
+ * @param maxProperties the max properties allowed on the object
32
+ */
33
+ constructor(objectToValidate, validationOject, totalProperties, maxProperties) {
34
+ super(`The object ${objectToValidate} which is property ${validationOject} has too many properties. It has ${totalProperties} and the max is ${maxProperties}`);
35
+ }
36
+ }
37
+ exports.RequestObjectTooManyPropertiesError = RequestObjectTooManyPropertiesError;
38
+ /**
39
+ * This is thrown when the request object has too few properties.
40
+ */
41
+ class RequestObjectTooFewPropertiesError extends base_error_1.BaseError {
42
+ /**
43
+ * This is thrown when the request object has too few properties.
44
+ * @param objectToValidate the object that is not valid
45
+ * @param validationOject the object property text that is being validated
46
+ * @param totalProperties the total properties on the object
47
+ * @param minProperties the min properties allowed on the object
48
+ */
49
+ constructor(objectToValidate, validationOject, totalProperties, minProperties) {
50
+ super(`The object ${objectToValidate} which is property ${validationOject} has too few properties. It has ${totalProperties} and the min is ${minProperties}`);
51
+ }
52
+ }
53
+ exports.RequestObjectTooFewPropertiesError = RequestObjectTooFewPropertiesError;
54
+ /**
55
+ * This is thrown when the request object should only have a certain number of properties.
56
+ */
57
+ class RequestObjectShouldOnlyHaveXPropertiesError extends base_error_1.BaseError {
58
+ /**
59
+ * This is thrown when the request object should only have a certain number of properties.
60
+ * @param objectToValidate the object that is not valid
61
+ * @param validationOject the object property text that is being validated
62
+ * @param totalProperties the total properties on the object
63
+ * @param expectedProperties the expected properties on the object
64
+ */
65
+ constructor(objectToValidate, validationOject, totalProperties, expectedProperties) {
66
+ super(`The object ${objectToValidate} which is property ${validationOject} should only have ${expectedProperties} properties. It has ${totalProperties}`);
67
+ }
68
+ }
69
+ exports.RequestObjectShouldOnlyHaveXPropertiesError = RequestObjectShouldOnlyHaveXPropertiesError;
70
+ /**
71
+ * This is throw when the request object has a property that does not match the param property.
72
+ */
73
+ class RequestObjectPropertyNotMatchingParamProperty extends base_error_1.BaseError {
74
+ /**
75
+ * This is thrown when the request object doesnot match the param property.
76
+ * @param requestPropertyName the property in the request object
77
+ * @param requestPropertyValue the value of the property in the request object
78
+ * @param paramPropertyName the property in the param object
79
+ * @param paramPropertyValue the value of the property in the param object
80
+ */
81
+ constructor(requestPropertyName, requestPropertyValue, paramPropertyName, paramPropertyValue) {
82
+ super(`The request object property ${requestPropertyName} with value ${requestPropertyValue} does not match the param property ${paramPropertyName} with value ${paramPropertyValue}`);
83
+ }
84
+ }
85
+ exports.RequestObjectPropertyNotMatchingParamProperty = RequestObjectPropertyNotMatchingParamProperty;
86
+ //#endregion Request Body Errors
87
+ //#region Request Query Errors
88
+ /**
89
+ * This is thrown when the query object is not valid.
90
+ */
91
+ class RequestQueryNotValidError extends base_error_1.BaseError {
92
+ /**
93
+ * This is thrown when the query object is not valid.
94
+ * @param queryObjectName the name of the query object
95
+ * @param queryValue the value of the query object
96
+ * @param expectedType the expected type of the query object
97
+ */
98
+ constructor(queryObjectName, queryValue, expectedType) {
99
+ super(`The query object ${queryObjectName} with value ${queryValue} is not a valid ${expectedType}`);
100
+ }
101
+ }
102
+ exports.RequestQueryNotValidError = RequestQueryNotValidError;
103
+ //#endregion Request Query Errors
104
+ //#region Request Param Errors
105
+ /**
106
+ * This is thrown when the param object is not valid.
107
+ */
108
+ class RequestParamNotValidError extends base_error_1.BaseError {
109
+ /**
110
+ * This is thrown when the param object is not valid.
111
+ * @param paramName the name of the param object
112
+ * @param paramValue the value of the param object
113
+ * @param expectedType the expected type of the param object
114
+ */
115
+ constructor(paramName, paramValue, expectedType, allParams) {
116
+ super(`The param object ${paramName} with value ${paramValue} is not a valid ${expectedType}. All params: ${JSON.stringify(allParams)}`);
117
+ }
118
+ }
119
+ exports.RequestParamNotValidError = RequestParamNotValidError;
120
+ //#endregion Request Param Errors
@@ -0,0 +1,11 @@
1
+ import { BaseError } from '../base-error';
2
+ /**
3
+ * This error is thrown when a speical condition pattern is not valid
4
+ */
5
+ export declare class SafeRuleEvaluationSpecialConditionPatternError extends BaseError {
6
+ /**
7
+ * This error is thrown when a speical condition pattern is not valid
8
+ */
9
+ constructor(dataValue: unknown, conditionValue: unknown);
10
+ }
11
+ //# sourceMappingURL=safe-rules-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safe-rules-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/safe/safe-rules-errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,qBAAa,8CAA+C,SAAQ,SAAS;IACzE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;CAG1D"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SafeRuleEvaluationSpecialConditionPatternError = void 0;
4
+ // This file contains the errors for the share data rules.
5
+ const base_error_1 = require("../base-error");
6
+ /**
7
+ * This error is thrown when a speical condition pattern is not valid
8
+ */
9
+ class SafeRuleEvaluationSpecialConditionPatternError extends base_error_1.BaseError {
10
+ /**
11
+ * This error is thrown when a speical condition pattern is not valid
12
+ */
13
+ constructor(dataValue, conditionValue) {
14
+ super(`Share Rule special condition pattern evaluation failed to execute. dataValue ${dataValue} and conditionValue: ${conditionValue}`);
15
+ }
16
+ }
17
+ exports.SafeRuleEvaluationSpecialConditionPatternError = SafeRuleEvaluationSpecialConditionPatternError;
@@ -0,0 +1,8 @@
1
+ import { BaseError } from '../base-error';
2
+ /**
3
+ * This error is thrown when a task is not found in the scheduler
4
+ */
5
+ export declare class TaskNotFoundError extends BaseError {
6
+ constructor(taskId: string);
7
+ }
8
+ //# sourceMappingURL=scheduler-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/scheduler/scheduler-errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;gBAChC,MAAM,EAAE,MAAM;CAG7B"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // this file contains all the errors that can be thrown by the scheduler
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TaskNotFoundError = void 0;
5
+ const base_error_1 = require("../base-error");
6
+ /**
7
+ * This error is thrown when a task is not found in the scheduler
8
+ */
9
+ class TaskNotFoundError extends base_error_1.BaseError {
10
+ constructor(taskId) {
11
+ super(`An error occurred while trying to remove task ${taskId}.`);
12
+ }
13
+ }
14
+ exports.TaskNotFoundError = TaskNotFoundError;