@degenerate/rules 0.1.2 → 0.1.3
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.
- package/dist/generic/src/_settings/cryptography-settings.d.ts +27 -0
- package/dist/generic/src/_settings/cryptography-settings.d.ts.map +1 -0
- package/dist/generic/src/_settings/cryptography-settings.js +27 -0
- package/dist/generic/src/crypto/calculate-combined-hash.d.ts +13 -0
- package/dist/generic/src/crypto/calculate-combined-hash.d.ts.map +1 -0
- package/dist/generic/src/crypto/calculate-combined-hash.js +44 -0
- package/dist/generic/src/crypto/calculate-hash.d.ts +7 -0
- package/dist/generic/src/crypto/calculate-hash.d.ts.map +1 -0
- package/dist/generic/src/crypto/calculate-hash.js +37 -0
- package/dist/generic/src/crypto/index.d.ts +13 -0
- package/dist/generic/src/crypto/index.d.ts.map +1 -0
- package/dist/generic/src/crypto/index.js +34 -0
- package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-mnemonic.d.ts +12 -0
- package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-mnemonic.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-mnemonic.js +44 -0
- package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-private-key.d.ts +11 -0
- package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-private-key.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/create-key-pair-from-private-key.js +40 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-256-private-key-from-mnemonic.d.ts +11 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-256-private-key-from-mnemonic.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-256-private-key-from-mnemonic.js +45 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.d.ts +10 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-entropy-for-elliptical-curve.js +40 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-random-256-private-key.d.ts +8 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-random-256-private-key.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/generation/create-random-256-private-key.js +41 -0
- package/dist/generic/src/crypto/private-public-keys/generation/generate-key-pair.d.ts +11 -0
- package/dist/generic/src/crypto/private-public-keys/generation/generate-key-pair.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/generation/generate-key-pair.js +39 -0
- package/dist/generic/src/crypto/private-public-keys/generation/get-private-public-key-from-keypair.d.ts +15 -0
- package/dist/generic/src/crypto/private-public-keys/generation/get-private-public-key-from-keypair.d.ts.map +1 -0
- package/dist/generic/src/crypto/private-public-keys/generation/get-private-public-key-from-keypair.js +21 -0
- package/dist/generic/src/crypto/signature/create-crypto-signature.d.ts +9 -0
- package/dist/generic/src/crypto/signature/create-crypto-signature.d.ts.map +1 -0
- package/dist/generic/src/crypto/signature/create-crypto-signature.js +13 -0
- package/dist/generic/src/crypto/signature/verify-crypto-signature-by-data.d.ts +13 -0
- package/dist/generic/src/crypto/signature/verify-crypto-signature-by-data.d.ts.map +1 -0
- package/dist/generic/src/crypto/signature/verify-crypto-signature-by-data.js +45 -0
- package/dist/generic/src/crypto/signature/verify-crypto-signature-by-hash.d.ts +13 -0
- package/dist/generic/src/crypto/signature/verify-crypto-signature-by-hash.d.ts.map +1 -0
- package/dist/generic/src/crypto/signature/verify-crypto-signature-by-hash.js +42 -0
- package/dist/generic/src/errors/audit-log/audit-log-errors.d.ts +20 -0
- package/dist/generic/src/errors/audit-log/audit-log-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/audit-log/audit-log-errors.js +31 -0
- package/dist/generic/src/errors/base-error.d.ts +23 -0
- package/dist/generic/src/errors/base-error.d.ts.map +1 -0
- package/dist/generic/src/errors/base-error.js +34 -0
- package/dist/generic/src/errors/database/database-errors.d.ts +24 -0
- package/dist/generic/src/errors/database/database-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/database/database-errors.js +33 -0
- package/dist/generic/src/errors/generic/generic-errors.d.ts +35 -0
- package/dist/generic/src/errors/generic/generic-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/generic/generic-errors.js +47 -0
- package/dist/generic/src/errors/index.d.ts +9 -0
- package/dist/generic/src/errors/index.d.ts.map +1 -0
- package/dist/generic/src/errors/index.js +25 -0
- package/dist/generic/src/errors/request/request-errors.d.ts +89 -0
- package/dist/generic/src/errors/request/request-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/request/request-errors.js +120 -0
- package/dist/generic/src/errors/safe/safe-rules-errors.d.ts +102 -0
- package/dist/generic/src/errors/safe/safe-rules-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/safe/safe-rules-errors.js +152 -0
- package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts +8 -0
- package/dist/generic/src/errors/scheduler/scheduler-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/scheduler/scheduler-errors.js +14 -0
- package/dist/generic/src/errors/share-data/share-data-errors.d.ts +67 -0
- package/dist/generic/src/errors/share-data/share-data-errors.d.ts.map +1 -0
- package/dist/generic/src/errors/share-data/share-data-errors.js +92 -0
- package/dist/generic/src/helpers/array/array-helpers.d.ts +16 -0
- package/dist/generic/src/helpers/array/array-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/array/array-helpers.js +25 -0
- package/dist/generic/src/helpers/data/data-helpers.d.ts +46 -0
- package/dist/generic/src/helpers/data/data-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/data/data-helpers.js +106 -0
- package/dist/generic/src/helpers/file/file-helpers.d.ts +13 -0
- package/dist/generic/src/helpers/file/file-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/file/file-helpers.js +43 -0
- package/dist/generic/src/helpers/id-helpers.d.ts +8 -0
- package/dist/generic/src/helpers/id-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/id-helpers.js +19 -0
- package/dist/generic/src/helpers/index.d.ts +11 -0
- package/dist/generic/src/helpers/index.d.ts.map +1 -0
- package/dist/generic/src/helpers/index.js +31 -0
- package/dist/generic/src/helpers/lodash/lodash-helpers.d.ts +14 -0
- package/dist/generic/src/helpers/lodash/lodash-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/lodash/lodash-helpers.js +28 -0
- package/dist/generic/src/helpers/object-helpers.d.ts +23 -0
- package/dist/generic/src/helpers/object-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/object-helpers.js +54 -0
- package/dist/generic/src/helpers/object-validation-helpers.d.ts +59 -0
- package/dist/generic/src/helpers/object-validation-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/object-validation-helpers.js +233 -0
- package/dist/generic/src/helpers/request/params-object-helpers.d.ts +38 -0
- package/dist/generic/src/helpers/request/params-object-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/request/params-object-helpers.js +54 -0
- package/dist/generic/src/helpers/request/query-object-helpers.d.ts +12 -0
- package/dist/generic/src/helpers/request/query-object-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/request/query-object-helpers.js +25 -0
- package/dist/generic/src/helpers/request/request-object-helpers.d.ts +19 -0
- package/dist/generic/src/helpers/request/request-object-helpers.d.ts.map +1 -0
- package/dist/generic/src/helpers/request/request-object-helpers.js +28 -0
- package/dist/generic/src/index.d.ts +6 -0
- package/dist/generic/src/index.d.ts.map +1 -0
- package/dist/generic/src/index.js +23 -0
- package/dist/generic/src/models/data/data-models.d.ts +24 -0
- package/dist/generic/src/models/data/data-models.d.ts.map +1 -0
- package/dist/generic/src/models/data/data-models.js +3 -0
- package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts +9 -0
- package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.d.ts.map +1 -0
- package/dist/generic/src/models/dynamic-execution/dynamic-execution-models.js +2 -0
- package/dist/generic/src/models/events/share-event-models.d.ts +65 -0
- package/dist/generic/src/models/events/share-event-models.d.ts.map +1 -0
- package/dist/generic/src/models/events/share-event-models.js +70 -0
- package/dist/generic/src/models/functions/share-data-function-models.d.ts +86 -0
- package/dist/generic/src/models/functions/share-data-function-models.d.ts.map +1 -0
- package/dist/generic/src/models/functions/share-data-function-models.js +17 -0
- package/dist/generic/src/models/generic/request-response-models.d.ts +8 -0
- package/dist/generic/src/models/generic/request-response-models.d.ts.map +1 -0
- package/dist/generic/src/models/generic/request-response-models.js +2 -0
- package/dist/generic/src/models/index.d.ts +8 -0
- package/dist/generic/src/models/index.d.ts.map +1 -0
- package/dist/generic/src/models/index.js +24 -0
- package/dist/generic/src/models/rules/share-rule-models.d.ts +303 -0
- package/dist/generic/src/models/rules/share-rule-models.d.ts.map +1 -0
- package/dist/generic/src/models/rules/share-rule-models.js +93 -0
- package/dist/generic/src/models/share-data/share-data.d.ts +55 -0
- package/dist/generic/src/models/share-data/share-data.d.ts.map +1 -0
- package/dist/generic/src/models/share-data/share-data.js +19 -0
- package/dist/rules/src/__testdata__/conditions/current-conditions.test-data.d.ts.map +1 -0
- package/dist/{__testdata__ → rules/src/__testdata__}/conditions/current-conditions.test-data.js +5 -5
- package/dist/{__testdata__ → rules/src/__testdata__}/rules/rules.test-data.d.ts +8 -5
- package/dist/rules/src/__testdata__/rules/rules.test-data.d.ts.map +1 -0
- package/dist/rules/src/__testdata__/rules/rules.test-data.js +390 -0
- package/dist/rules/src/create/conditions/create-boolean-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-contains-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-empty-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-equality-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-null-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-range-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-special-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-starts-end-with-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/conditions/create-typeof-conditions.d.ts.map +1 -0
- package/dist/rules/src/create/create-share-rule-applied.d.ts.map +1 -0
- package/dist/rules/src/create/create-share-rule-group.d.ts +11 -0
- package/dist/rules/src/create/create-share-rule-group.d.ts.map +1 -0
- package/dist/rules/src/create/create-share-rule-group.js +16 -0
- package/dist/rules/src/create/create-share-rule-id.d.ts.map +1 -0
- package/dist/rules/src/create/create-share-rule-set.d.ts +13 -0
- package/dist/rules/src/create/create-share-rule-set.d.ts.map +1 -0
- package/dist/rules/src/create/create-share-rule-set.js +37 -0
- package/dist/rules/src/create/create-share-rule.d.ts.map +1 -0
- package/dist/{create → rules/src/create}/index.d.ts +2 -0
- package/dist/rules/src/create/index.d.ts.map +1 -0
- package/dist/{create → rules/src/create}/index.js +2 -0
- package/dist/rules/src/evaluation/check-function-integrity.d.ts.map +1 -0
- package/dist/rules/src/evaluation/check-if-proposal-is-valid.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/boolean-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/contains-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/empty-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/equality-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/null-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/range-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/special-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/starts-end-with-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/conditions/typeof-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/determine-if-data-has-changed.d.ts.map +1 -0
- package/dist/rules/src/evaluation/evaluate-rule-conditions.d.ts.map +1 -0
- package/dist/rules/src/evaluation/evaluate-rule.d.ts.map +1 -0
- package/dist/rules/src/evaluation/evaluate-rules.d.ts.map +1 -0
- package/dist/rules/src/evaluation/get-data-changed-information.d.ts.map +1 -0
- package/dist/rules/src/evaluation/get-root-property-results.d.ts.map +1 -0
- package/dist/rules/src/evaluation/index.d.ts.map +1 -0
- package/dist/rules/src/evaluation/start-rule-evaluation.d.ts.map +1 -0
- package/dist/rules/src/index.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-base.d.ts +9 -0
- package/dist/rules/src/validation/conditions/validate-condition-base.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-base.js +29 -0
- package/dist/rules/src/validation/conditions/validate-condition-boolean.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-boolean.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-boolean.js +26 -0
- package/dist/rules/src/validation/conditions/validate-condition-contains.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-contains.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-contains.js +44 -0
- package/dist/rules/src/validation/conditions/validate-condition-empty.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-empty.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-empty.js +23 -0
- package/dist/rules/src/validation/conditions/validate-condition-equality.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-equality.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-equality.js +26 -0
- package/dist/rules/src/validation/conditions/validate-condition-null.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-null.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-null.js +23 -0
- package/dist/rules/src/validation/conditions/validate-condition-qualifier.d.ts +9 -0
- package/dist/rules/src/validation/conditions/validate-condition-qualifier.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-qualifier.js +19 -0
- package/dist/rules/src/validation/conditions/validate-condition-range.d.ts +9 -0
- package/dist/rules/src/validation/conditions/validate-condition-range.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-range.js +35 -0
- package/dist/rules/src/validation/conditions/validate-condition-share-rule.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-share-rule.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-share-rule.js +34 -0
- package/dist/rules/src/validation/conditions/validate-condition-special.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-special.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-special.js +30 -0
- package/dist/rules/src/validation/conditions/validate-condition-starts-ends-with.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-starts-ends-with.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-starts-ends-with.js +31 -0
- package/dist/rules/src/validation/conditions/validate-condition-type-of.d.ts +10 -0
- package/dist/rules/src/validation/conditions/validate-condition-type-of.d.ts.map +1 -0
- package/dist/rules/src/validation/conditions/validate-condition-type-of.js +30 -0
- package/dist/rules/src/validation/determine-condition-to-validate.d.ts +9 -0
- package/dist/rules/src/validation/determine-condition-to-validate.d.ts.map +1 -0
- package/dist/rules/src/validation/determine-condition-to-validate.js +56 -0
- package/dist/rules/src/validation/index.d.ts +15 -0
- package/dist/rules/src/validation/index.d.ts.map +1 -0
- package/dist/rules/src/validation/index.js +32 -0
- package/dist/rules/src/validation/validate-share-rule.d.ts +9 -0
- package/dist/rules/src/validation/validate-share-rule.d.ts.map +1 -0
- package/dist/rules/src/validation/validate-share-rule.js +52 -0
- package/package.json +3 -3
- package/dist/__testdata__/conditions/current-conditions.test-data.d.ts.map +0 -1
- package/dist/__testdata__/rules/rules.test-data.d.ts.map +0 -1
- package/dist/__testdata__/rules/rules.test-data.js +0 -339
- package/dist/create/conditions/create-boolean-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-contains-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-empty-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-equality-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-null-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-range-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-special-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-starts-end-with-conditions.d.ts.map +0 -1
- package/dist/create/conditions/create-typeof-conditions.d.ts.map +0 -1
- package/dist/create/create-share-rule-applied.d.ts.map +0 -1
- package/dist/create/create-share-rule-id.d.ts.map +0 -1
- package/dist/create/create-share-rule.d.ts.map +0 -1
- package/dist/create/index.d.ts.map +0 -1
- package/dist/evaluation/check-function-integrity.d.ts.map +0 -1
- package/dist/evaluation/check-if-proposal-is-valid.d.ts.map +0 -1
- package/dist/evaluation/conditions/boolean-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/contains-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/empty-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/equality-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/null-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/range-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/special-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/starts-end-with-conditions.d.ts.map +0 -1
- package/dist/evaluation/conditions/typeof-conditions.d.ts.map +0 -1
- package/dist/evaluation/determine-if-data-has-changed.d.ts.map +0 -1
- package/dist/evaluation/evaluate-rule-conditions.d.ts.map +0 -1
- package/dist/evaluation/evaluate-rule.d.ts.map +0 -1
- package/dist/evaluation/evaluate-rules.d.ts.map +0 -1
- package/dist/evaluation/get-data-changed-information.d.ts.map +0 -1
- package/dist/evaluation/get-root-property-results.d.ts.map +0 -1
- package/dist/evaluation/index.d.ts.map +0 -1
- package/dist/evaluation/start-rule-evaluation.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- /package/dist/{__testdata__ → rules/src/__testdata__}/conditions/current-conditions.test-data.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-boolean-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-boolean-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-contains-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-contains-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-empty-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-empty-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-equality-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-equality-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-null-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-null-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-range-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-range-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-special-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-special-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-starts-end-with-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-starts-end-with-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-typeof-conditions.d.ts +0 -0
- /package/dist/{create → rules/src/create}/conditions/create-typeof-conditions.js +0 -0
- /package/dist/{create → rules/src/create}/create-share-rule-applied.d.ts +0 -0
- /package/dist/{create → rules/src/create}/create-share-rule-applied.js +0 -0
- /package/dist/{create → rules/src/create}/create-share-rule-id.d.ts +0 -0
- /package/dist/{create → rules/src/create}/create-share-rule-id.js +0 -0
- /package/dist/{create → rules/src/create}/create-share-rule.d.ts +0 -0
- /package/dist/{create → rules/src/create}/create-share-rule.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/check-function-integrity.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/check-function-integrity.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/check-if-proposal-is-valid.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/check-if-proposal-is-valid.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/boolean-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/boolean-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/contains-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/contains-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/empty-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/empty-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/equality-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/equality-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/null-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/null-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/range-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/range-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/special-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/special-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/starts-end-with-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/starts-end-with-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/typeof-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/conditions/typeof-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/determine-if-data-has-changed.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/determine-if-data-has-changed.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/evaluate-rule-conditions.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/evaluate-rule-conditions.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/evaluate-rule.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/evaluate-rule.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/evaluate-rules.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/evaluate-rules.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/get-data-changed-information.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/get-data-changed-information.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/get-root-property-results.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/get-root-property-results.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/index.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/index.js +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/start-rule-evaluation.d.ts +0 -0
- /package/dist/{evaluation → rules/src/evaluation}/start-rule-evaluation.js +0 -0
- /package/dist/{index.d.ts → rules/src/index.d.ts} +0 -0
- /package/dist/{index.js → rules/src/index.js} +0 -0
|
@@ -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,102 @@
|
|
|
1
|
+
import { ConditionType } from '../../models';
|
|
2
|
+
import { BaseError } from '../base-error';
|
|
3
|
+
/**
|
|
4
|
+
* This error is thrown when a evaluation condition data value is not valid
|
|
5
|
+
*/
|
|
6
|
+
export declare class SafeRuleEvaluationConditionDataValueError extends BaseError {
|
|
7
|
+
/**
|
|
8
|
+
* This error is thrown when a evaluation condition data value is not valid
|
|
9
|
+
*/
|
|
10
|
+
constructor(dataValue: unknown, conditionValue: unknown, conditionType: ConditionType);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This error is thrown when a evaluation condition value is not valid
|
|
14
|
+
*/
|
|
15
|
+
export declare class SafeRuleEvaluationConditionValueError extends BaseError {
|
|
16
|
+
/**
|
|
17
|
+
* This error is thrown when a evaluation condition value is not valid
|
|
18
|
+
*/
|
|
19
|
+
constructor(dataValue: unknown, conditionValue: unknown, conditionType: ConditionType);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* This error is thrown when a speical condition pattern is not valid
|
|
23
|
+
*/
|
|
24
|
+
export declare class SafeRuleEvaluationSpecialConditionPatternError extends BaseError {
|
|
25
|
+
/**
|
|
26
|
+
* This error is thrown when a speical condition pattern is not valid
|
|
27
|
+
*/
|
|
28
|
+
constructor(dataValue: unknown, conditionValue: unknown);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* This error is thrown when a rule set has no rule groups
|
|
32
|
+
*/
|
|
33
|
+
export declare class SafeRuleRuleSetNoRuleGroupsError extends BaseError {
|
|
34
|
+
/**
|
|
35
|
+
* This error is thrown when a rule set has no rule groups
|
|
36
|
+
*/
|
|
37
|
+
constructor(name: string, description?: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class SafeRuleConditionNotTypeOfError extends BaseError {
|
|
40
|
+
constructor(conditionType: ConditionType, expectedType: string);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* This error is thrown when a rule condition is not an object
|
|
44
|
+
*/
|
|
45
|
+
export declare class SafeRuleConditionNotObjectError extends BaseError {
|
|
46
|
+
constructor(incomingObject: unknown);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* This error is thrown when a rule condition is missing or has an extra property
|
|
50
|
+
*/
|
|
51
|
+
export declare class SafeRuleConditionHasMismatchingProperties extends BaseError {
|
|
52
|
+
constructor(incomingObject: unknown, expectedPropertyCount: number, actualPropertyCount: number);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* This error is thrown when the safe condition qualifier is not valid
|
|
56
|
+
*/
|
|
57
|
+
export declare class SafeRuleConditionQualifierError extends BaseError {
|
|
58
|
+
constructor(conditionQualifier: unknown);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* This error is thrown when a rule condition property is missing
|
|
62
|
+
*/
|
|
63
|
+
export declare class SafeRuleConditionPropertyMissingError extends BaseError {
|
|
64
|
+
constructor(missingProperty: string);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* This error is thrown when a rule condition value is not valid
|
|
68
|
+
*/
|
|
69
|
+
export declare class SafeRuleConditionValueWrongType extends BaseError {
|
|
70
|
+
constructor(conditionValue: unknown, expectedType: string);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* This error is thrown when a rule condition type is not valid
|
|
74
|
+
*/
|
|
75
|
+
export declare class SafeRuleConditionTypeNotValidError extends BaseError {
|
|
76
|
+
constructor(conditionType: unknown);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* This error is thrown when a safe rule is not an object
|
|
80
|
+
*/
|
|
81
|
+
export declare class SafeRuleNotObjectError extends BaseError {
|
|
82
|
+
constructor(incomingObject: unknown);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* This error is thrown when a safe rule is missing or has an extra property
|
|
86
|
+
*/
|
|
87
|
+
export declare class SafeRuleHasMismatchingProperties extends BaseError {
|
|
88
|
+
constructor(incomingObject: unknown, expectedPropertyCount: number, actualPropertyCount: number);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* This error is thrown when a safe rule is missing property
|
|
92
|
+
*/
|
|
93
|
+
export declare class SafeRuleHasMissingProperty extends BaseError {
|
|
94
|
+
constructor(incomingObject: unknown, expectedProperty: string);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* This error is thrown when a safe rule property is not valid
|
|
98
|
+
*/
|
|
99
|
+
export declare class SafeRulePropertyValueWrongType extends BaseError {
|
|
100
|
+
constructor(propertyName: string, propertyValue: unknown, expectedType: string);
|
|
101
|
+
}
|
|
102
|
+
//# 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,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,qBAAa,yCAA0C,SAAQ,SAAS;IACpE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa;CAGxF;AAED;;GAEG;AACH,qBAAa,qCAAsC,SAAQ,SAAS;IAChE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa;CAGxF;AAED;;GAEG;AACH,qBAAa,8CAA+C,SAAQ,SAAS;IACzE;;OAEG;gBACS,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;CAG1D;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,SAAS;IAC3D;;OAEG;gBACS,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;CAGjD;AAKD,qBAAa,+BAAgC,SAAQ,SAAS;gBAC9C,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM;CAGjE;AAGD;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,SAAS;gBAC9C,cAAc,EAAE,OAAO;CAGtC;AAED;;GAEG;AACH,qBAAa,yCAA0C,SAAQ,SAAS;gBACxD,cAAc,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM;CAGlG;AAED;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,SAAS;gBAC9C,kBAAkB,EAAE,OAAO;CAG1C;AAGD;;GAEG;AACH,qBAAa,qCAAsC,SAAQ,SAAS;gBACpD,eAAe,EAAE,MAAM;CAGtC;AAED;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,SAAS;gBAC9C,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM;CAG5D;AAED;;GAEG;AACH,qBAAa,kCAAmC,SAAQ,SAAS;gBACjD,aAAa,EAAE,OAAO;CAGrC;AAMD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;gBACrC,cAAc,EAAE,OAAO;CAGtC;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,SAAS;gBAC/C,cAAc,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM;CAGlG;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,SAAS;gBACzC,cAAc,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM;CAGhE;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,SAAS;gBAC7C,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM;CAGjF"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SafeRulePropertyValueWrongType = exports.SafeRuleHasMissingProperty = exports.SafeRuleHasMismatchingProperties = exports.SafeRuleNotObjectError = exports.SafeRuleConditionTypeNotValidError = exports.SafeRuleConditionValueWrongType = exports.SafeRuleConditionPropertyMissingError = exports.SafeRuleConditionQualifierError = exports.SafeRuleConditionHasMismatchingProperties = exports.SafeRuleConditionNotObjectError = exports.SafeRuleConditionNotTypeOfError = exports.SafeRuleRuleSetNoRuleGroupsError = exports.SafeRuleEvaluationSpecialConditionPatternError = exports.SafeRuleEvaluationConditionValueError = exports.SafeRuleEvaluationConditionDataValueError = void 0;
|
|
4
|
+
const base_error_1 = require("../base-error");
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown when a evaluation condition data value is not valid
|
|
7
|
+
*/
|
|
8
|
+
class SafeRuleEvaluationConditionDataValueError extends base_error_1.BaseError {
|
|
9
|
+
/**
|
|
10
|
+
* This error is thrown when a evaluation condition data value is not valid
|
|
11
|
+
*/
|
|
12
|
+
constructor(dataValue, conditionValue, conditionType) {
|
|
13
|
+
super(`Share Rule condition evaluation for type ${conditionType} failed to execute. dataValue: ${dataValue} is incorrect for conditionValue: ${conditionValue}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.SafeRuleEvaluationConditionDataValueError = SafeRuleEvaluationConditionDataValueError;
|
|
17
|
+
/**
|
|
18
|
+
* This error is thrown when a evaluation condition value is not valid
|
|
19
|
+
*/
|
|
20
|
+
class SafeRuleEvaluationConditionValueError extends base_error_1.BaseError {
|
|
21
|
+
/**
|
|
22
|
+
* This error is thrown when a evaluation condition value is not valid
|
|
23
|
+
*/
|
|
24
|
+
constructor(dataValue, conditionValue, conditionType) {
|
|
25
|
+
super(`Share Rule condition evaluation for type ${conditionType} failed to execute. conditionValue: ${conditionValue} is incorrect for dataValue: ${dataValue}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.SafeRuleEvaluationConditionValueError = SafeRuleEvaluationConditionValueError;
|
|
29
|
+
/**
|
|
30
|
+
* This error is thrown when a speical condition pattern is not valid
|
|
31
|
+
*/
|
|
32
|
+
class SafeRuleEvaluationSpecialConditionPatternError extends base_error_1.BaseError {
|
|
33
|
+
/**
|
|
34
|
+
* This error is thrown when a speical condition pattern is not valid
|
|
35
|
+
*/
|
|
36
|
+
constructor(dataValue, conditionValue) {
|
|
37
|
+
super(`Share Rule special condition pattern evaluation failed to execute. dataValue ${dataValue} and conditionValue: ${conditionValue}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.SafeRuleEvaluationSpecialConditionPatternError = SafeRuleEvaluationSpecialConditionPatternError;
|
|
41
|
+
/**
|
|
42
|
+
* This error is thrown when a rule set has no rule groups
|
|
43
|
+
*/
|
|
44
|
+
class SafeRuleRuleSetNoRuleGroupsError extends base_error_1.BaseError {
|
|
45
|
+
/**
|
|
46
|
+
* This error is thrown when a rule set has no rule groups
|
|
47
|
+
*/
|
|
48
|
+
constructor(name, description) {
|
|
49
|
+
super(`Share Rule set ${name} with description ${description} has no rule groups`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.SafeRuleRuleSetNoRuleGroupsError = SafeRuleRuleSetNoRuleGroupsError;
|
|
53
|
+
//#region Condition Validation Errors
|
|
54
|
+
class SafeRuleConditionNotTypeOfError extends base_error_1.BaseError {
|
|
55
|
+
constructor(conditionType, expectedType) {
|
|
56
|
+
super(`Share Rule condition type ${conditionType} is not of type ${expectedType}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.SafeRuleConditionNotTypeOfError = SafeRuleConditionNotTypeOfError;
|
|
60
|
+
/**
|
|
61
|
+
* This error is thrown when a rule condition is not an object
|
|
62
|
+
*/
|
|
63
|
+
class SafeRuleConditionNotObjectError extends base_error_1.BaseError {
|
|
64
|
+
constructor(incomingObject) {
|
|
65
|
+
super(`Share Rule condition object ${incomingObject} is not an object`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.SafeRuleConditionNotObjectError = SafeRuleConditionNotObjectError;
|
|
69
|
+
/**
|
|
70
|
+
* This error is thrown when a rule condition is missing or has an extra property
|
|
71
|
+
*/
|
|
72
|
+
class SafeRuleConditionHasMismatchingProperties extends base_error_1.BaseError {
|
|
73
|
+
constructor(incomingObject, expectedPropertyCount, actualPropertyCount) {
|
|
74
|
+
super(`Share Rule condition object ${incomingObject} has mismatching properties, expected ${expectedPropertyCount} but got ${actualPropertyCount}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.SafeRuleConditionHasMismatchingProperties = SafeRuleConditionHasMismatchingProperties;
|
|
78
|
+
/**
|
|
79
|
+
* This error is thrown when the safe condition qualifier is not valid
|
|
80
|
+
*/
|
|
81
|
+
class SafeRuleConditionQualifierError extends base_error_1.BaseError {
|
|
82
|
+
constructor(conditionQualifier) {
|
|
83
|
+
super(`Share Rule condition qualifier ${conditionQualifier} is not valid`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.SafeRuleConditionQualifierError = SafeRuleConditionQualifierError;
|
|
87
|
+
/**
|
|
88
|
+
* This error is thrown when a rule condition property is missing
|
|
89
|
+
*/
|
|
90
|
+
class SafeRuleConditionPropertyMissingError extends base_error_1.BaseError {
|
|
91
|
+
constructor(missingProperty) {
|
|
92
|
+
super(`Share Rule condition property ${missingProperty} is missing`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.SafeRuleConditionPropertyMissingError = SafeRuleConditionPropertyMissingError;
|
|
96
|
+
/**
|
|
97
|
+
* This error is thrown when a rule condition value is not valid
|
|
98
|
+
*/
|
|
99
|
+
class SafeRuleConditionValueWrongType extends base_error_1.BaseError {
|
|
100
|
+
constructor(conditionValue, expectedType) {
|
|
101
|
+
super(`Share Rule condition value ${conditionValue} is not of type ${expectedType}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.SafeRuleConditionValueWrongType = SafeRuleConditionValueWrongType;
|
|
105
|
+
/**
|
|
106
|
+
* This error is thrown when a rule condition type is not valid
|
|
107
|
+
*/
|
|
108
|
+
class SafeRuleConditionTypeNotValidError extends base_error_1.BaseError {
|
|
109
|
+
constructor(conditionType) {
|
|
110
|
+
super(`Share Rule condition type ${conditionType} is not valid`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.SafeRuleConditionTypeNotValidError = SafeRuleConditionTypeNotValidError;
|
|
114
|
+
//#endregion Condition Validation Errors
|
|
115
|
+
//#region Rule Validation Errors
|
|
116
|
+
/**
|
|
117
|
+
* This error is thrown when a safe rule is not an object
|
|
118
|
+
*/
|
|
119
|
+
class SafeRuleNotObjectError extends base_error_1.BaseError {
|
|
120
|
+
constructor(incomingObject) {
|
|
121
|
+
super(`Share Rule object ${incomingObject} is not an object`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.SafeRuleNotObjectError = SafeRuleNotObjectError;
|
|
125
|
+
/**
|
|
126
|
+
* This error is thrown when a safe rule is missing or has an extra property
|
|
127
|
+
*/
|
|
128
|
+
class SafeRuleHasMismatchingProperties extends base_error_1.BaseError {
|
|
129
|
+
constructor(incomingObject, expectedPropertyCount, actualPropertyCount) {
|
|
130
|
+
super(`Share Rule object ${incomingObject} has mismatching properties, expected ${expectedPropertyCount} but got ${actualPropertyCount}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.SafeRuleHasMismatchingProperties = SafeRuleHasMismatchingProperties;
|
|
134
|
+
/**
|
|
135
|
+
* This error is thrown when a safe rule is missing property
|
|
136
|
+
*/
|
|
137
|
+
class SafeRuleHasMissingProperty extends base_error_1.BaseError {
|
|
138
|
+
constructor(incomingObject, expectedProperty) {
|
|
139
|
+
super(`Share Rule object ${incomingObject} is missing property ${expectedProperty}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
exports.SafeRuleHasMissingProperty = SafeRuleHasMissingProperty;
|
|
143
|
+
/**
|
|
144
|
+
* This error is thrown when a safe rule property is not valid
|
|
145
|
+
*/
|
|
146
|
+
class SafeRulePropertyValueWrongType extends base_error_1.BaseError {
|
|
147
|
+
constructor(propertyName, propertyValue, expectedType) {
|
|
148
|
+
super(`Share Rule property ${propertyName} with value ${propertyValue} is not of type ${expectedType}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.SafeRulePropertyValueWrongType = SafeRulePropertyValueWrongType;
|
|
152
|
+
//#endregion Rule Validation Errors
|
|
@@ -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;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { BaseError } from '../base-error';
|
|
2
|
+
import { ShareDataTypes } from '../../models/share-data/share-data';
|
|
3
|
+
import { IShareDataFunction } from '../../models/functions/share-data-function-models';
|
|
4
|
+
/**
|
|
5
|
+
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ShareDataIsLockedError extends BaseError {
|
|
8
|
+
/**
|
|
9
|
+
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
10
|
+
*/
|
|
11
|
+
constructor(shareDataId: string, shareDataType: ShareDataTypes);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ShareDataCurrentAndProposalDataMatchesError extends BaseError {
|
|
17
|
+
/**
|
|
18
|
+
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
19
|
+
*/
|
|
20
|
+
constructor(shareDataId: string);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* This error is thrown when the share data integrity check fails.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ShareDataIntegrityError extends BaseError {
|
|
26
|
+
/**
|
|
27
|
+
* This error is thrown when the share data integrity check fails.
|
|
28
|
+
*/
|
|
29
|
+
constructor(shareDataId: string);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
33
|
+
*/
|
|
34
|
+
export declare class ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError extends BaseError {
|
|
35
|
+
/**
|
|
36
|
+
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
37
|
+
*/
|
|
38
|
+
constructor(shareDataId: string, functionName: string, functionId: string);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This error is thrown when the function hash is not valid.
|
|
42
|
+
*/
|
|
43
|
+
export declare class ShareDataFunctionHashNotValid extends BaseError {
|
|
44
|
+
/**
|
|
45
|
+
* This error is thrown when the function hash is not valid.
|
|
46
|
+
*/
|
|
47
|
+
constructor(shareDataId: string, shareDataFunction: IShareDataFunction, calculatedHash: string);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* This is thrown when a rule doesn't have current conditions present.
|
|
51
|
+
*/
|
|
52
|
+
export declare class ShareRuleCurrentConditionsNotPresentError extends BaseError {
|
|
53
|
+
/**
|
|
54
|
+
* This is thrown when a rule doesn't have a before or after conditions.
|
|
55
|
+
*/
|
|
56
|
+
constructor(ruleId: string);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* This is thrown when a rule doesn't have proposed conditions present.
|
|
60
|
+
*/
|
|
61
|
+
export declare class ShareRuleProposedConditionsNotPresentError extends BaseError {
|
|
62
|
+
/**
|
|
63
|
+
* This is thrown when a rule doesn't have a before or after conditions.
|
|
64
|
+
*/
|
|
65
|
+
constructor(ruleId: string);
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=share-data-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share-data-errors.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/errors/share-data/share-data-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AAEvF;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS;IACjD;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc;CAGjE;AAED;;GAEG;AACH,qBAAa,2CAA4C,SAAQ,SAAS;IACtE;;OAEG;gBACS,WAAW,EAAE,MAAM;CAGlC;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,SAAS;IAClD;;OAEG;gBACS,WAAW,EAAE,MAAM;CAGlC;AAED;;GAEG;AACH,qBAAa,yDAA0D,SAAQ,SAAS;IACpF;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAI5E;AAGD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,SAAS;IACxD;;OAEG;gBACS,WAAW,EAAE,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM;CAIjG;AAKD;;GAEG;AACH,qBAAa,yCAA0C,SAAQ,SAAS;IACpE;;OAEG;gBACS,MAAM,EAAE,MAAM;CAG7B;AAED;;GAEG;AACH,qBAAa,0CAA2C,SAAQ,SAAS;IACrE;;OAEG;gBACS,MAAM,EAAE,MAAM;CAG7B"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShareRuleProposedConditionsNotPresentError = exports.ShareRuleCurrentConditionsNotPresentError = exports.ShareDataFunctionHashNotValid = exports.ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError = exports.ShareDataIntegrityError = exports.ShareDataCurrentAndProposalDataMatchesError = exports.ShareDataIsLockedError = void 0;
|
|
4
|
+
const base_error_1 = require("../base-error");
|
|
5
|
+
/**
|
|
6
|
+
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
7
|
+
*/
|
|
8
|
+
class ShareDataIsLockedError extends base_error_1.BaseError {
|
|
9
|
+
/**
|
|
10
|
+
* This error is thrown when a function is tried to be applied to the share data thats state is locked.
|
|
11
|
+
*/
|
|
12
|
+
constructor(shareDataId, shareDataType) {
|
|
13
|
+
super(`Share data with id ${shareDataId} and type ${shareDataType} is locked and cannot be modified.`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ShareDataIsLockedError = ShareDataIsLockedError;
|
|
17
|
+
/**
|
|
18
|
+
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
19
|
+
*/
|
|
20
|
+
class ShareDataCurrentAndProposalDataMatchesError extends base_error_1.BaseError {
|
|
21
|
+
/**
|
|
22
|
+
* This error is thrown when a data proposal matches the current data in the rules evaluation service.
|
|
23
|
+
*/
|
|
24
|
+
constructor(shareDataId) {
|
|
25
|
+
super(`Share data with id ${shareDataId} current and proposal data matches.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.ShareDataCurrentAndProposalDataMatchesError = ShareDataCurrentAndProposalDataMatchesError;
|
|
29
|
+
/**
|
|
30
|
+
* This error is thrown when the share data integrity check fails.
|
|
31
|
+
*/
|
|
32
|
+
class ShareDataIntegrityError extends base_error_1.BaseError {
|
|
33
|
+
/**
|
|
34
|
+
* This error is thrown when the share data integrity check fails.
|
|
35
|
+
*/
|
|
36
|
+
constructor(shareDataId) {
|
|
37
|
+
super(`Share data with id ${shareDataId} failed the integrity check.`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.ShareDataIntegrityError = ShareDataIntegrityError;
|
|
41
|
+
/**
|
|
42
|
+
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
43
|
+
*/
|
|
44
|
+
class ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError extends base_error_1.BaseError {
|
|
45
|
+
/**
|
|
46
|
+
* This error is thrown when the attemping to be applied function does not exist on the share data.
|
|
47
|
+
*/
|
|
48
|
+
constructor(shareDataId, functionName, functionId) {
|
|
49
|
+
super(`On share data with id ${shareDataId} the function with id: ${functionId} & name: ${functionName} that is trying to be executed, ` +
|
|
50
|
+
'but does not exist in the authorized functions for the share data.');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError = ShareDataFunctionBeingAppliedDoesNotExistOnShareDataError;
|
|
54
|
+
/**
|
|
55
|
+
* This error is thrown when the function hash is not valid.
|
|
56
|
+
*/
|
|
57
|
+
class ShareDataFunctionHashNotValid extends base_error_1.BaseError {
|
|
58
|
+
/**
|
|
59
|
+
* This error is thrown when the function hash is not valid.
|
|
60
|
+
*/
|
|
61
|
+
constructor(shareDataId, shareDataFunction, calculatedHash) {
|
|
62
|
+
super(`On share data with id ${shareDataId} the function with current hash: ${shareDataFunction.currentHash} & previous hase: ${shareDataFunction.previousHash}` +
|
|
63
|
+
` that is trying to be executed does not meet the generated hash ${calculatedHash}. This makes it an authorized function execution.`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.ShareDataFunctionHashNotValid = ShareDataFunctionHashNotValid;
|
|
67
|
+
//#region Rules
|
|
68
|
+
/**
|
|
69
|
+
* This is thrown when a rule doesn't have current conditions present.
|
|
70
|
+
*/
|
|
71
|
+
class ShareRuleCurrentConditionsNotPresentError extends base_error_1.BaseError {
|
|
72
|
+
/**
|
|
73
|
+
* This is thrown when a rule doesn't have a before or after conditions.
|
|
74
|
+
*/
|
|
75
|
+
constructor(ruleId) {
|
|
76
|
+
super(`Rule with id ${ruleId} does not have any current conditions present.`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.ShareRuleCurrentConditionsNotPresentError = ShareRuleCurrentConditionsNotPresentError;
|
|
80
|
+
/**
|
|
81
|
+
* This is thrown when a rule doesn't have proposed conditions present.
|
|
82
|
+
*/
|
|
83
|
+
class ShareRuleProposedConditionsNotPresentError extends base_error_1.BaseError {
|
|
84
|
+
/**
|
|
85
|
+
* This is thrown when a rule doesn't have a before or after conditions.
|
|
86
|
+
*/
|
|
87
|
+
constructor(ruleId) {
|
|
88
|
+
super(`Rule with id ${ruleId} does not have any proposed conditions present.`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.ShareRuleProposedConditionsNotPresentError = ShareRuleProposedConditionsNotPresentError;
|
|
92
|
+
//#endregion Rules
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* this gets a random item from an array.
|
|
3
|
+
*
|
|
4
|
+
* @param incomingArray the incoming array to get a random item from.
|
|
5
|
+
*/
|
|
6
|
+
declare const getRandomItemFromArray: <T>(incomingArray: T[]) => T;
|
|
7
|
+
/**
|
|
8
|
+
* This ensures that all items in an array are of the same type.
|
|
9
|
+
*
|
|
10
|
+
* @param array the array to check
|
|
11
|
+
* @param type the type to check against
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
declare const checkIfAllItemsInAnArrayAreSameType: (array: unknown[], type: string) => boolean;
|
|
15
|
+
export { getRandomItemFromArray, checkIfAllItemsInAnArrayAreSameType, };
|
|
16
|
+
//# sourceMappingURL=array-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array-helpers.d.ts","sourceRoot":"","sources":["../../../../../../generic/src/helpers/array/array-helpers.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,GAAI,CAAC,iBAAiB,CAAC,EAAE,KAAG,CAGvD,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,mCAAmC,UAAW,OAAO,EAAE,QAAQ,MAAM,KAAG,OAE7E,CAAC;AAEF,OAAO,EACH,sBAAsB,EACtB,mCAAmC,GACtC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file contains the helper functions for arrays.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.checkIfAllItemsInAnArrayAreSameType = exports.getRandomItemFromArray = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* this gets a random item from an array.
|
|
7
|
+
*
|
|
8
|
+
* @param incomingArray the incoming array to get a random item from.
|
|
9
|
+
*/
|
|
10
|
+
const getRandomItemFromArray = (incomingArray) => {
|
|
11
|
+
const randomIndex = Math.floor(Math.random() * incomingArray.length);
|
|
12
|
+
return incomingArray[randomIndex];
|
|
13
|
+
};
|
|
14
|
+
exports.getRandomItemFromArray = getRandomItemFromArray;
|
|
15
|
+
/**
|
|
16
|
+
* This ensures that all items in an array are of the same type.
|
|
17
|
+
*
|
|
18
|
+
* @param array the array to check
|
|
19
|
+
* @param type the type to check against
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
const checkIfAllItemsInAnArrayAreSameType = (array, type) => {
|
|
23
|
+
return array.every(item => typeof item === type);
|
|
24
|
+
};
|
|
25
|
+
exports.checkIfAllItemsInAnArrayAreSameType = checkIfAllItemsInAnArrayAreSameType;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IGenericData, ISearchableIndex } from '../../models/data/data-models';
|
|
2
|
+
/**
|
|
3
|
+
* This adds the generic data to the object.
|
|
4
|
+
*
|
|
5
|
+
* @param incomingObject the object to add the generic data to.
|
|
6
|
+
* @param userId the user ID to add the generic data to.
|
|
7
|
+
* @param versionNumber the version number to add to the generic data.
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
declare const addGenericDataToObject: <T>(incomingObject: any, userId: string, versionNumber?: number) => T;
|
|
11
|
+
/**
|
|
12
|
+
* This creates the generic data record for the database
|
|
13
|
+
*
|
|
14
|
+
* @param userId the user ID to create the generic data for.
|
|
15
|
+
* @param versionNumber the version number to create the generic data for.
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
declare const createGenericData: (userId: string, versionNumber?: number) => IGenericData;
|
|
19
|
+
/**
|
|
20
|
+
* This takes an incoming string and creates a searchable index object.
|
|
21
|
+
* @param itemForSearchableIndex the item for a searchable index to be created on
|
|
22
|
+
*/
|
|
23
|
+
declare const createSearchableIndex: (itemForSearchableIndex: string) => ISearchableIndex;
|
|
24
|
+
/**
|
|
25
|
+
* This removed all the generic data from an object.
|
|
26
|
+
*
|
|
27
|
+
* @param data
|
|
28
|
+
*/
|
|
29
|
+
declare const deleteGenericDataOnObject: (data: any) => any;
|
|
30
|
+
/**
|
|
31
|
+
* This function removes all whitespace from a string
|
|
32
|
+
*
|
|
33
|
+
* @param str the string to remove whitespace from
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
declare const removeWhitespaceFromObject: (str: string) => string;
|
|
37
|
+
/**
|
|
38
|
+
* This function updates the generic data on an object.
|
|
39
|
+
* @param data the data to update the generic data on
|
|
40
|
+
* @param userId the user Id to update the object with
|
|
41
|
+
*
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
declare const updateGenericDataOnObject: <T>(data: T, userId: string) => any;
|
|
45
|
+
export { addGenericDataToObject, createGenericData, createSearchableIndex, deleteGenericDataOnObject, removeWhitespaceFromObject, updateGenericDataOnObject, };
|
|
46
|
+
//# sourceMappingURL=data-helpers.d.ts.map
|