@epilot/sdk 2.18.31 → 2.18.33
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/definitions/integration-toolkit-runtime.json +1 -1
- package/definitions/integration-toolkit.json +942 -45
- package/definitions/validation-rules-runtime.json +1 -1
- package/definitions/validation-rules.json +9 -3
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +8 -8
- package/dist/apis/integration-toolkit.js +2 -2
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +8 -8
- package/dist/apis/validation-rules.d.cts +2 -2
- package/dist/apis/validation-rules.d.ts +2 -2
- package/dist/apis/validation-rules.js +2 -2
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/chunk-2WGN6U22.cjs +14 -0
- package/dist/{chunk-JZBUH4RD.cjs → chunk-3GSQBFJZ.cjs} +4 -4
- package/dist/chunk-7IKQIVUS.js +14 -0
- package/dist/chunk-ECZ337CC.js +14 -0
- package/dist/chunk-JIUTCNTB.cjs +14 -0
- package/dist/{chunk-RKEGU6OW.js → chunk-W636M2L3.js} +4 -4
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/integration-toolkit-RVVT6BCK.cjs +7 -0
- package/dist/integration-toolkit-X64BK3WX.js +7 -0
- package/dist/{integration-toolkit-runtime-ZWS4WRKI.cjs → integration-toolkit-runtime-AL7GHT6B.cjs} +2 -2
- package/dist/{integration-toolkit-runtime-3RZRSZCW.js → integration-toolkit-runtime-M3GLLRLF.js} +1 -1
- package/dist/validation-rules-B2KQKMLO.js +7 -0
- package/dist/validation-rules-GR2IVLGJ.cjs +7 -0
- package/dist/{validation-rules-runtime-VGLVHV36.js → validation-rules-runtime-6MRCS5X2.js} +1 -1
- package/dist/{validation-rules-runtime-DENVKYLF.cjs → validation-rules-runtime-X7M3QE5I.cjs} +2 -2
- package/dist/{validation-rules.d-MvjG-zzw.d.cts → validation-rules.d-CvGvBnMX.d.cts} +15 -5
- package/dist/{validation-rules.d-MvjG-zzw.d.ts → validation-rules.d-CvGvBnMX.d.ts} +15 -5
- package/docs/integration-toolkit.md +545 -19
- package/docs/validation-rules.md +7 -6
- package/package.json +1 -1
- package/dist/chunk-HRSCAD3W.cjs +0 -14
- package/dist/chunk-ILRZHW2E.cjs +0 -14
- package/dist/chunk-PPX45U34.js +0 -14
- package/dist/chunk-VA34RFFR.js +0 -14
- package/dist/integration-toolkit-2WF2P4OX.cjs +0 -7
- package/dist/integration-toolkit-RDFELVKR.js +0 -7
- package/dist/validation-rules-G5BWXUWI.cjs +0 -7
- package/dist/validation-rules-NLHK2CD3.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/validation-rules.json
|
|
4
|
+
var validation_rules_default = '# Validation Rules API\n\n- **Base URL:** `https://validation-rules.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/validation-rules](https://docs.epilot.io/api/validation-rules)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.validationRules.getValidationRules(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/validation-rules\'\n\nconst validationRulesClient = getClient()\nauthorize(validationRulesClient, () => \'<token>\')\nconst { data } = await validationRulesClient.getValidationRules(...)\n```\n\n## Operations\n\n**Validation Rules**\n- [`getValidationRules`](#getvalidationrules)\n- [`createValidationRule`](#createvalidationrule)\n- [`getValidationRuleById`](#getvalidationrulebyid)\n- [`updateValidationRule`](#updatevalidationrule)\n- [`deleteValidationRule`](#deletevalidationrule)\n- [`addUsedByReference`](#addusedbyreference)\n- [`removeUsedByReference`](#removeusedbyreference)\n\n**Schemas**\n- [`GetValidationRulesResponse`](#getvalidationrulesresponse)\n- [`CreateValidationRuleRequest`](#createvalidationrulerequest)\n- [`UpdateValidationRuleRequest`](#updatevalidationrulerequest)\n- [`ValidationRuleBase`](#validationrulebase)\n- [`ValidationRule`](#validationrule)\n- [`UsedBy`](#usedby)\n- [`RegexRuleType`](#regexruletype)\n- [`PatternRuleType`](#patternruletype)\n- [`NumericRuleType`](#numericruletype)\n- [`RegexCondition`](#regexcondition)\n- [`RegexNestedCondition`](#regexnestedcondition)\n- [`RegexFactCondition`](#regexfactcondition)\n- [`PatternCondition`](#patterncondition)\n- [`PatternNestedCondition`](#patternnestedcondition)\n- [`PatternFactCondition`](#patternfactcondition)\n- [`NumericCondition`](#numericcondition)\n- [`NumericNestedCondition`](#numericnestedcondition)\n- [`NumericFactCondition`](#numericfactcondition)\n- [`ComparisonRuleType`](#comparisonruletype)\n- [`Condition`](#condition)\n- [`Operator`](#operator)\n- [`ConditionValue`](#conditionvalue)\n- [`ScalarValue`](#scalarvalue)\n- [`StaticValue`](#staticvalue)\n- [`ContextValue`](#contextvalue)\n- [`ValueAdjustment`](#valueadjustment)\n- [`RelativeDateValue`](#relativedatevalue)\n- [`RangeValue`](#rangevalue)\n- [`NoValue`](#novalue)\n- [`AppliesWhen`](#applieswhen)\n- [`ContextRequirement`](#contextrequirement)\n\n### `getValidationRules`\n\nReturns all validation rules belonging to the authenticated user\'s organization.\n\n`GET /v1/validation-rules`\n\n```ts\nconst { data } = await client.getValidationRules()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createValidationRule`\n\nCreates a new validation rule for the authenticated organization.\n\n`POST /v1/validation-rules`\n\n```ts\nconst { data } = await client.createValidationRule(\n null,\n {\n title: \'string\',\n placeholder: \'string\',\n used_by: [\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n }\n ],\n rule: {\n type: \'regex\',\n conditions: {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n },\n {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n }\n ]\n }\n ]\n }\n },\n contexts: [\n {\n schema: \'contract\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getValidationRuleById`\n\nRetrieves a specific validation rule by its unique ID.\n\n`GET /v1/validation-rules/{ruleId}`\n\n```ts\nconst { data } = await client.getValidationRuleById({\n ruleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateValidationRule`\n\nPartially updates an existing validation rule by ID. Only the fields provided in the request body are updated.\n\n`PATCH /v1/validation-rules/{ruleId}`\n\n```ts\nconst { data } = await client.updateValidationRule(\n {\n ruleId: \'example\',\n },\n {\n title: \'string\',\n placeholder: \'string\',\n used_by: [\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n }\n ],\n rule: {\n type: \'regex\',\n conditions: {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n },\n {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n }\n ]\n }\n ]\n }\n },\n contexts: [\n {\n schema: \'contract\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteValidationRule`\n\nPermanently deletes a validation rule by ID. Any journeys or entity attributes referencing this rule should be updated before deletion.\n\n`DELETE /v1/validation-rules/{ruleId}`\n\n```ts\nconst { data } = await client.deleteValidationRule({\n ruleId: \'example\',\n})\n```\n\n---\n\n### `addUsedByReference`\n\nAdds a single `used_by` reference to an existing validation rule.\n\n`POST /v1/validation-rules/{ruleId}/used-by`\n\n```ts\nconst { data } = await client.addUsedByReference(\n {\n ruleId: \'example\',\n },\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `removeUsedByReference`\n\nRemoves a specific `used_by` reference from an existing validation rule.\n\n`DELETE /v1/validation-rules/{ruleId}/used-by`\n\n```ts\nconst { data } = await client.removeUsedByReference(\n {\n ruleId: \'example\',\n },\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `GetValidationRulesResponse`\n\nResponse envelope for listing all validation rules within an organization.\n\n```ts\ntype GetValidationRulesResponse = {\n results?: Array<{\n _schema_version: string\n _id: string\n _organization_id: string\n created_at: string\n updated_at: string\n created_by: string\n updated_by: string\n }>\n}\n```\n\n### `CreateValidationRuleRequest`\n\n```ts\ntype CreateValidationRuleRequest = object\n```\n\n### `UpdateValidationRuleRequest`\n\n```ts\ntype UpdateValidationRuleRequest = {\n title?: string\n placeholder?: string\n used_by?: Array<{\n type: "journey" | "entity"\n schema_slug?: string\n source_id?: string\n }>\n rule?: {\n type: "regex"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "pattern"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "numeric"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n input_type: "number" | "date" | "text"\n conditions: Array<{\n id: { ... }\n operator: { ... }\n value: { ... }\n error_message: { ... }\n applies_when?: { ... }\n allow_failure?: { ... }\n }>\n }\n contexts?: Array<{\n schema: string\n }>\n}\n```\n\n### `ValidationRuleBase`\n\n```ts\ntype ValidationRuleBase = {\n title?: string\n placeholder?: string\n used_by?: Array<{\n type: "journey" | "entity"\n schema_slug?: string\n source_id?: string\n }>\n rule?: {\n type: "regex"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "pattern"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "numeric"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n input_type: "number" | "date" | "text"\n conditions: Array<{\n id: { ... }\n operator: { ... }\n value: { ... }\n error_message: { ... }\n applies_when?: { ... }\n allow_failure?: { ... }\n }>\n }\n contexts?: Array<{\n schema: string\n }>\n}\n```\n\n### `ValidationRule`\n\nThe Validation rule definition.\n\n```ts\ntype ValidationRule = {\n _schema_version: string\n _id: string\n _organization_id: string\n created_at: string\n updated_at: string\n created_by: string\n updated_by: string\n}\n```\n\n### `UsedBy`\n\nDescribes where and how a validation rule is applied. Used to track associations between rules and the journeys or entity schemas that reference them.\n\n```ts\ntype UsedBy = {\n type: "journey" | "entity"\n schema_slug?: string\n source_id?: string\n}\n```\n\n### `RegexRuleType`\n\nValidation rule that uses a regular expression to validate input.\n\n```ts\ntype RegexRuleType = {\n type: "regex"\n conditions: {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n }\n}\n```\n\n### `PatternRuleType`\n\nValidation rule that uses a sequence of patterns to validate input.\n\n```ts\ntype PatternRuleType = {\n type: "pattern"\n conditions: {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n }\n}\n```\n\n### `NumericRuleType`\n\nValidation rule for numeric values, supporting range and digit count constraints.\n\n```ts\ntype NumericRuleType = {\n type: "numeric"\n conditions: {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n }\n}\n```\n\n### `RegexCondition`\n\nCondition definition for a regex-based validation rule (2 levels deep)\n\n```ts\ntype RegexCondition = {\n all: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }>\n} | {\n not: {\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }\n}\n```\n\n### `RegexNestedCondition`\n\nNested condition with logical operators (level 2 only)\n\n```ts\ntype RegexNestedCondition = {\n all: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n not: {\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n }\n}\n```\n\n### `RegexFactCondition`\n\nFact-based condition for regex validation\n\n```ts\ntype RegexFactCondition = {\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: string\n }\n}\n```\n\n### `PatternCondition`\n\nCondition definition for a pattern-based validation rule (2 levels deep)\n\n```ts\ntype PatternCondition = {\n all: Array<{\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n // ...\n}\n```\n\n### `PatternNestedCondition`\n\nNested condition with logical operators (level 2 only)\n\n```ts\ntype PatternNestedCondition = {\n all: Array<{\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n }>\n} | {\n not: {\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n // ...\n}\n```\n\n### `PatternFactCondition`\n\nFact-based condition for pattern validation\n\n```ts\ntype PatternFactCondition = {\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n} | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n} | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n} | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n}\n```\n\n### `NumericCondition`\n\nCondition definition for a numeric-based validation rule (2 levels deep)\n\n```ts\ntype NumericCondition = {\n all: Array<{\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "numeric-value" | "total-length"\n // ...\n}\n```\n\n### `NumericNestedCondition`\n\nNested condition with logical operators (level 2 only)\n\n```ts\ntype NumericNestedCondition = {\n all: Array<{\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n not: {\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n }\n}\n```\n\n### `NumericFactCondition`\n\nFact-based condition for numeric validation\n\n```ts\ntype NumericFactCondition = {\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: string\n }\n} | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: string\n allowLeadingZeroes?: boolean\n }\n} | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: string\n }\n} | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: string\n }\n}\n```\n\n### `ComparisonRuleType`\n\nDeclarative validation rule (schema version v2). Supports predefined comparison operators\nover number, date and text inputs, with static, dynamic (context path) and relative-date\ncomparison values.\n\n\n```ts\ntype ComparisonRuleType = {\n input_type: "number" | "date" | "text"\n conditions: Array<{\n id: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals"\n value: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n offset: { ... }\n unit: { ... }\n anchor?: { ... }\n } | {\n source: { ... }\n min: { ... }\n max: { ... }\n } | {\n source: { ... }\n }\n error_message: string\n applies_when?: {\n path: { ... }\n operator: { ... }\n value?: { ... }\n }\n allow_failure?: boolean\n }>\n}\n```\n\n### `Condition`\n\nA single comparison the input value must satisfy.\n\n```ts\ntype Condition = {\n id: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals"\n value: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "range"\n min: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n offset: { ... }\n unit: { ... }\n anchor?: { ... }\n }\n max: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n offset: { ... }\n unit: { ... }\n anchor?: { ... }\n }\n } | {\n source: "none"\n }\n error_message: string\n applies_when?: {\n path: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"\n value?: number | string | boolean\n }\n allow_failure?: boolean\n}\n```\n\n### `Operator`\n\nPredefined comparison operator. Compatibility (enforced at write time):\n- number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch,\n maxDigits, maxDecimals\n- date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, not\n\n```ts\ntype Operator = "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals"\n```\n\n### `ConditionValue`\n\nThe comparison value of a condition - a scalar, a range of scalars, or nothing (unary operators).\n\n```ts\ntype ConditionValue = {\n source: "static"\n data: number | string | boolean\n} | {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n} | {\n source: "range"\n min: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n max: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n} | {\n source: "none"\n}\n```\n\n### `ScalarValue`\n\nA single comparison value - static, resolved from context, or a relative date.\n\n```ts\ntype ScalarValue = {\n source: "static"\n data: number | string | boolean\n} | {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n}\n```\n\n### `StaticValue`\n\nA fixed comparison value.\n\n```ts\ntype StaticValue = {\n source: "static"\n data: number | string | boolean\n}\n```\n\n### `ContextValue`\n\nA dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`\nor `previous_reading.value`. The first path segment must match the `name` of a declared\ncontext requirement.\n\n\n```ts\ntype ContextValue = {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n}\n```\n\n### `ValueAdjustment`\n\nAdjusts a context-resolved numeric value before comparison, e.g. "context value plus 10 percent".\nUsed to express tolerance bands such as "at most 10% above the current instalment amount".\n\n\n```ts\ntype ValueAdjustment = {\n type: "percent" | "absolute"\n value: number | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n}\n```\n\n### `RelativeDateValue`\n\nA date relative to the evaluation moment, e.g. "today minus 30 days". Only valid for date rules.\n\n```ts\ntype RelativeDateValue = {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n}\n```\n\n### `RangeValue`\n\nA lower and upper bound for range operators (between, dateBetween, lengthBetween). Bounds are inclusive.\n\n```ts\ntype RangeValue = {\n source: "range"\n min: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n max: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n}\n```\n\n### `NoValue`\n\nNo comparison value - used by unary operators such as notInFuture / notInPast.\n\n```ts\ntype NoValue = {\n source: "none"\n}\n```\n\n### `AppliesWhen`\n\nOptional precondition on a condition: the condition only takes part in the\nvalidation when this comparison over context holds. Examples: apply the\ndual-tariff reference only when `contract.htnt` is not empty, or run a\nplausibility check only when a context value reaches a threshold.\n\n\n```ts\ntype AppliesWhen = {\n path: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"\n value?: number | string | boolean\n}\n```\n\n### `ContextRequirement`\n\nAn entity context source the rule needs at evaluation time, referenced by `context`\nvalue paths via the schema slug as their first segment (e.g. `contract.installment_amount`).\nHow the source is resolved (which entity instance) is decided by the consuming surface,\nnot by the rule. Meter reading comp\n\n```ts\ntype ContextRequirement = {\n schema: string\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
validation_rules_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/validation-rules.json
|
|
4
|
+
var validation_rules_default = '# Validation Rules API\n\n- **Base URL:** `https://validation-rules.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/validation-rules](https://docs.epilot.io/api/validation-rules)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.validationRules.getValidationRules(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/validation-rules\'\n\nconst validationRulesClient = getClient()\nauthorize(validationRulesClient, () => \'<token>\')\nconst { data } = await validationRulesClient.getValidationRules(...)\n```\n\n## Operations\n\n**Validation Rules**\n- [`getValidationRules`](#getvalidationrules)\n- [`createValidationRule`](#createvalidationrule)\n- [`getValidationRuleById`](#getvalidationrulebyid)\n- [`updateValidationRule`](#updatevalidationrule)\n- [`deleteValidationRule`](#deletevalidationrule)\n- [`addUsedByReference`](#addusedbyreference)\n- [`removeUsedByReference`](#removeusedbyreference)\n\n**Schemas**\n- [`GetValidationRulesResponse`](#getvalidationrulesresponse)\n- [`CreateValidationRuleRequest`](#createvalidationrulerequest)\n- [`UpdateValidationRuleRequest`](#updatevalidationrulerequest)\n- [`ValidationRuleBase`](#validationrulebase)\n- [`ValidationRule`](#validationrule)\n- [`UsedBy`](#usedby)\n- [`RegexRuleType`](#regexruletype)\n- [`PatternRuleType`](#patternruletype)\n- [`NumericRuleType`](#numericruletype)\n- [`RegexCondition`](#regexcondition)\n- [`RegexNestedCondition`](#regexnestedcondition)\n- [`RegexFactCondition`](#regexfactcondition)\n- [`PatternCondition`](#patterncondition)\n- [`PatternNestedCondition`](#patternnestedcondition)\n- [`PatternFactCondition`](#patternfactcondition)\n- [`NumericCondition`](#numericcondition)\n- [`NumericNestedCondition`](#numericnestedcondition)\n- [`NumericFactCondition`](#numericfactcondition)\n- [`ComparisonRuleType`](#comparisonruletype)\n- [`Condition`](#condition)\n- [`Operator`](#operator)\n- [`ConditionValue`](#conditionvalue)\n- [`ScalarValue`](#scalarvalue)\n- [`StaticValue`](#staticvalue)\n- [`ContextValue`](#contextvalue)\n- [`ValueAdjustment`](#valueadjustment)\n- [`RelativeDateValue`](#relativedatevalue)\n- [`RangeValue`](#rangevalue)\n- [`NoValue`](#novalue)\n- [`AppliesWhen`](#applieswhen)\n- [`ContextRequirement`](#contextrequirement)\n\n### `getValidationRules`\n\nReturns all validation rules belonging to the authenticated user\'s organization.\n\n`GET /v1/validation-rules`\n\n```ts\nconst { data } = await client.getValidationRules()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createValidationRule`\n\nCreates a new validation rule for the authenticated organization.\n\n`POST /v1/validation-rules`\n\n```ts\nconst { data } = await client.createValidationRule(\n null,\n {\n title: \'string\',\n placeholder: \'string\',\n used_by: [\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n }\n ],\n rule: {\n type: \'regex\',\n conditions: {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n },\n {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n }\n ]\n }\n ]\n }\n },\n contexts: [\n {\n schema: \'contract\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getValidationRuleById`\n\nRetrieves a specific validation rule by its unique ID.\n\n`GET /v1/validation-rules/{ruleId}`\n\n```ts\nconst { data } = await client.getValidationRuleById({\n ruleId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateValidationRule`\n\nPartially updates an existing validation rule by ID. Only the fields provided in the request body are updated.\n\n`PATCH /v1/validation-rules/{ruleId}`\n\n```ts\nconst { data } = await client.updateValidationRule(\n {\n ruleId: \'example\',\n },\n {\n title: \'string\',\n placeholder: \'string\',\n used_by: [\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n }\n ],\n rule: {\n type: \'regex\',\n conditions: {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n },\n {\n all: [\n {\n fact: \'inputValue\',\n operator: \'regexMatch\',\n value: \'string\',\n params: {\n errorMessage: \'string\'\n }\n }\n ]\n }\n ]\n }\n },\n contexts: [\n {\n schema: \'contract\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `deleteValidationRule`\n\nPermanently deletes a validation rule by ID. Any journeys or entity attributes referencing this rule should be updated before deletion.\n\n`DELETE /v1/validation-rules/{ruleId}`\n\n```ts\nconst { data } = await client.deleteValidationRule({\n ruleId: \'example\',\n})\n```\n\n---\n\n### `addUsedByReference`\n\nAdds a single `used_by` reference to an existing validation rule.\n\n`POST /v1/validation-rules/{ruleId}/used-by`\n\n```ts\nconst { data } = await client.addUsedByReference(\n {\n ruleId: \'example\',\n },\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `removeUsedByReference`\n\nRemoves a specific `used_by` reference from an existing validation rule.\n\n`DELETE /v1/validation-rules/{ruleId}/used-by`\n\n```ts\nconst { data } = await client.removeUsedByReference(\n {\n ruleId: \'example\',\n },\n {\n type: \'journey\',\n source_id: \'journey-xyz789\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "title": "string",\n "placeholder": "string",\n "used_by": [\n {\n "type": "journey",\n "source_id": "journey-xyz789"\n }\n ],\n "rule": {\n "type": "regex",\n "conditions": {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n },\n {\n "all": [\n {\n "fact": "inputValue",\n "operator": "regexMatch",\n "value": "string",\n "params": {\n "errorMessage": "string"\n }\n }\n ]\n }\n ]\n }\n },\n "contexts": [\n {\n "schema": "contract"\n }\n ],\n "_schema_version": "string",\n "_id": "string",\n "_organization_id": "string",\n "created_at": "string",\n "updated_at": "string",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `GetValidationRulesResponse`\n\nResponse envelope for listing all validation rules within an organization.\n\n```ts\ntype GetValidationRulesResponse = {\n results?: Array<{\n _schema_version: string\n _id: string\n _organization_id: string\n created_at: string\n updated_at: string\n created_by: string\n updated_by: string\n }>\n}\n```\n\n### `CreateValidationRuleRequest`\n\n```ts\ntype CreateValidationRuleRequest = object\n```\n\n### `UpdateValidationRuleRequest`\n\n```ts\ntype UpdateValidationRuleRequest = {\n title?: string\n placeholder?: string\n used_by?: Array<{\n type: "journey" | "entity"\n schema_slug?: string\n source_id?: string\n }>\n rule?: {\n type: "regex"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "pattern"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "numeric"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n input_type: "number" | "date" | "text"\n conditions: Array<{\n id: { ... }\n operator: { ... }\n value: { ... }\n error_message: { ... }\n applies_when?: { ... }\n allow_failure?: { ... }\n }>\n }\n contexts?: Array<{\n schema: string\n }>\n}\n```\n\n### `ValidationRuleBase`\n\n```ts\ntype ValidationRuleBase = {\n title?: string\n placeholder?: string\n used_by?: Array<{\n type: "journey" | "entity"\n schema_slug?: string\n source_id?: string\n }>\n rule?: {\n type: "regex"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "pattern"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n type: "numeric"\n conditions: {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n } | {\n input_type: "number" | "date" | "text"\n conditions: Array<{\n id: { ... }\n operator: { ... }\n value: { ... }\n error_message: { ... }\n applies_when?: { ... }\n allow_failure?: { ... }\n }>\n }\n contexts?: Array<{\n schema: string\n }>\n}\n```\n\n### `ValidationRule`\n\nThe Validation rule definition.\n\n```ts\ntype ValidationRule = {\n _schema_version: string\n _id: string\n _organization_id: string\n created_at: string\n updated_at: string\n created_by: string\n updated_by: string\n}\n```\n\n### `UsedBy`\n\nDescribes where and how a validation rule is applied. Used to track associations between rules and the journeys or entity schemas that reference them.\n\n```ts\ntype UsedBy = {\n type: "journey" | "entity"\n schema_slug?: string\n source_id?: string\n}\n```\n\n### `RegexRuleType`\n\nValidation rule that uses a regular expression to validate input.\n\n```ts\ntype RegexRuleType = {\n type: "regex"\n conditions: {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n }\n}\n```\n\n### `PatternRuleType`\n\nValidation rule that uses a sequence of patterns to validate input.\n\n```ts\ntype PatternRuleType = {\n type: "pattern"\n conditions: {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n }\n}\n```\n\n### `NumericRuleType`\n\nValidation rule for numeric values, supporting range and digit count constraints.\n\n```ts\ntype NumericRuleType = {\n type: "numeric"\n conditions: {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n all: { ... }\n } | {\n any: { ... }\n } | {\n not: { ... }\n }\n }\n}\n```\n\n### `RegexCondition`\n\nCondition definition for a regex-based validation rule (2 levels deep)\n\n```ts\ntype RegexCondition = {\n all: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }>\n} | {\n not: {\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }\n}\n```\n\n### `RegexNestedCondition`\n\nNested condition with logical operators (level 2 only)\n\n```ts\ntype RegexNestedCondition = {\n all: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n not: {\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: { ... }\n }\n }\n}\n```\n\n### `RegexFactCondition`\n\nFact-based condition for regex validation\n\n```ts\ntype RegexFactCondition = {\n fact: "inputValue"\n operator: "regexMatch"\n value: string\n params?: {\n errorMessage?: string\n }\n}\n```\n\n### `PatternCondition`\n\nCondition definition for a pattern-based validation rule (2 levels deep)\n\n```ts\ntype PatternCondition = {\n all: Array<{\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n // ...\n}\n```\n\n### `PatternNestedCondition`\n\nNested condition with logical operators (level 2 only)\n\n```ts\ntype PatternNestedCondition = {\n all: Array<{\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n }>\n} | {\n not: {\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n start?: { ... }\n end?: { ... }\n }\n } | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n // ...\n}\n```\n\n### `PatternFactCondition`\n\nFact-based condition for pattern validation\n\n```ts\ntype PatternFactCondition = {\n fact: "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n} | {\n fact: "static-check" | "total-length"\n operator: "exactlyNDigits"\n value: number\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n} | {\n fact: "static-check"\n operator: "in" | "notIn" | "contains" | "doesNotContain"\n value: string[]\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n} | {\n fact: "static-check"\n operator: "equal" | "notEqual"\n value: string\n params?: {\n errorMessage?: string\n start?: number\n end?: number\n }\n}\n```\n\n### `NumericCondition`\n\nCondition definition for a numeric-based validation rule (2 levels deep)\n\n```ts\ntype NumericCondition = {\n all: Array<{\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n } | {\n all: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n any: Array<{\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }>\n } | {\n not: {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n } | {\n fact: { ... }\n operator: { ... }\n value: { ... }\n params?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "numeric-value" | "total-length"\n // ...\n}\n```\n\n### `NumericNestedCondition`\n\nNested condition with logical operators (level 2 only)\n\n```ts\ntype NumericNestedCondition = {\n all: Array<{\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n any: Array<{\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n }>\n} | {\n not: {\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n allowLeadingZeroes?: { ... }\n }\n } | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: { ... }\n }\n } | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: { ... }\n }\n }\n}\n```\n\n### `NumericFactCondition`\n\nFact-based condition for numeric validation\n\n```ts\ntype NumericFactCondition = {\n fact: "numeric-value" | "total-length"\n operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"\n value: number\n params?: {\n errorMessage?: string\n }\n} | {\n fact: "integer-digits-count"\n operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"\n value: number\n params?: {\n errorMessage?: string\n allowLeadingZeroes?: boolean\n }\n} | {\n fact: "decimal-digits-count"\n operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"\n value: number\n params?: {\n errorMessage?: string\n }\n} | {\n fact: "has-leading-zeroes"\n operator: "equal" | "notAllowed"\n value: boolean\n params?: {\n errorMessage?: string\n }\n}\n```\n\n### `ComparisonRuleType`\n\nDeclarative validation rule (schema version v2). Supports predefined comparison operators\nover number, date and text inputs, with static, dynamic (context path) and relative-date\ncomparison values.\n\n\n```ts\ntype ComparisonRuleType = {\n input_type: "number" | "date" | "text"\n conditions: Array<{\n id: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals"\n value: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n offset: { ... }\n unit: { ... }\n anchor?: { ... }\n } | {\n source: { ... }\n min: { ... }\n max: { ... }\n } | {\n source: { ... }\n }\n error_message: string\n applies_when?: {\n path: { ... }\n operator: { ... }\n value?: { ... }\n }\n allow_failure?: boolean\n }>\n}\n```\n\n### `Condition`\n\nA single comparison the input value must satisfy.\n\n```ts\ntype Condition = {\n id: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals"\n value: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "range"\n min: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n offset: { ... }\n unit: { ... }\n anchor?: { ... }\n }\n max: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n offset: { ... }\n unit: { ... }\n anchor?: { ... }\n }\n } | {\n source: "none"\n }\n error_message: string\n applies_when?: {\n path: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"\n value?: number | string | boolean\n }\n allow_failure?: boolean\n}\n```\n\n### `Operator`\n\nPredefined comparison operator. Compatibility (enforced at write time):\n- number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch,\n maxDigits, maxDecimals\n- date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, not\n\n```ts\ntype Operator = "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals"\n```\n\n### `ConditionValue`\n\nThe comparison value of a condition - a scalar, a range of scalars, or nothing (unary operators).\n\n```ts\ntype ConditionValue = {\n source: "static"\n data: number | string | boolean\n} | {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n} | {\n source: "range"\n min: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n max: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n} | {\n source: "none"\n}\n```\n\n### `ScalarValue`\n\nA single comparison value - static, resolved from context, or a relative date.\n\n```ts\ntype ScalarValue = {\n source: "static"\n data: number | string | boolean\n} | {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n}\n```\n\n### `StaticValue`\n\nA fixed comparison value.\n\n```ts\ntype StaticValue = {\n source: "static"\n data: number | string | boolean\n}\n```\n\n### `ContextValue`\n\nA dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`\nor `previous_reading.value`. The first path segment must match the `name` of a declared\ncontext requirement.\n\n\n```ts\ntype ContextValue = {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n}\n```\n\n### `ValueAdjustment`\n\nAdjusts a context-resolved numeric value before comparison, e.g. "context value plus 10 percent".\nUsed to express tolerance bands such as "at most 10% above the current instalment amount".\n\n\n```ts\ntype ValueAdjustment = {\n type: "percent" | "absolute"\n value: number | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n}\n```\n\n### `RelativeDateValue`\n\nA date relative to the evaluation moment, e.g. "today minus 30 days". Only valid for date rules.\n\n```ts\ntype RelativeDateValue = {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n}\n```\n\n### `RangeValue`\n\nA lower and upper bound for range operators (between, dateBetween, lengthBetween). Bounds are inclusive.\n\n```ts\ntype RangeValue = {\n source: "range"\n min: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n max: {\n source: "static"\n data: number | string | boolean\n } | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "relative_date"\n offset: number\n unit: "days" | "months" | "years"\n anchor?: "today"\n }\n}\n```\n\n### `NoValue`\n\nNo comparison value - used by unary operators such as notInFuture / notInPast.\n\n```ts\ntype NoValue = {\n source: "none"\n}\n```\n\n### `AppliesWhen`\n\nOptional precondition on a condition: the condition only takes part in the\nvalidation when this comparison over context holds. Examples: apply the\ndual-tariff reference only when `contract.htnt` is not empty, or run a\nplausibility check only when a context value reaches a threshold.\n\n\n```ts\ntype AppliesWhen = {\n path: string\n operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"\n value?: number | string | boolean\n}\n```\n\n### `ContextRequirement`\n\nAn entity context source the rule needs at evaluation time, referenced by `context`\nvalue paths via the schema slug as their first segment (e.g. `contract.installment_amount`).\nHow the source is resolved (which entity instance) is decided by the consuming surface,\nnot by the rule. Meter reading comp\n\n```ts\ntype ContextRequirement = {\n schema: string\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = validation_rules_default;
|
package/dist/{validation-rules-runtime-DENVKYLF.cjs → validation-rules-runtime-X7M3QE5I.cjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJIUTCNTBcjs = require('./chunk-JIUTCNTB.cjs');
|
|
4
4
|
require('./chunk-NJK5F5TF.cjs');
|
|
5
|
-
exports. default =
|
|
5
|
+
exports. default = _chunkJIUTCNTBcjs.require_validation_rules_runtime.call(void 0, );
|
|
@@ -57,15 +57,20 @@ declare namespace Components {
|
|
|
57
57
|
id: string;
|
|
58
58
|
operator: /**
|
|
59
59
|
* Predefined comparison operator. Compatibility (enforced at write time):
|
|
60
|
-
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch
|
|
60
|
+
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch,
|
|
61
|
+
* maxDigits, maxDecimals
|
|
61
62
|
* - date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, notInPast, regexMatch
|
|
62
63
|
* - text: equal, notEqual, contains, doesNotContain, startsWith, endsWith, regexMatch, lengthBetween,
|
|
63
|
-
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between
|
|
64
|
+
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, maxDigits, maxDecimals
|
|
64
65
|
* Range operators (between, dateBetween, lengthBetween) require a `range` value;
|
|
65
66
|
* unary operators (notInFuture, notInPast) require a `none` value; all others require a scalar value.
|
|
66
67
|
* regexMatch validates the raw input string's format and always takes a static string pattern.
|
|
67
68
|
* Numeric comparison operators on text rules parse the input as a number at evaluation time
|
|
68
69
|
* (free-text fields often hold numbers); unparsable input fails the condition.
|
|
70
|
+
* maxDigits limits how many digits the written input may contain in total (grouping
|
|
71
|
+
* separators, sign and the decimal separator are not counted); maxDecimals limits how many
|
|
72
|
+
* digits may follow the decimal separator. Both take a non-negative integer comparison value
|
|
73
|
+
* and, like the other numeric operators, are also allowed on text rules.
|
|
69
74
|
*
|
|
70
75
|
*/
|
|
71
76
|
Operator;
|
|
@@ -326,18 +331,23 @@ declare namespace Components {
|
|
|
326
331
|
}
|
|
327
332
|
/**
|
|
328
333
|
* Predefined comparison operator. Compatibility (enforced at write time):
|
|
329
|
-
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch
|
|
334
|
+
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch,
|
|
335
|
+
* maxDigits, maxDecimals
|
|
330
336
|
* - date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, notInPast, regexMatch
|
|
331
337
|
* - text: equal, notEqual, contains, doesNotContain, startsWith, endsWith, regexMatch, lengthBetween,
|
|
332
|
-
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between
|
|
338
|
+
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, maxDigits, maxDecimals
|
|
333
339
|
* Range operators (between, dateBetween, lengthBetween) require a `range` value;
|
|
334
340
|
* unary operators (notInFuture, notInPast) require a `none` value; all others require a scalar value.
|
|
335
341
|
* regexMatch validates the raw input string's format and always takes a static string pattern.
|
|
336
342
|
* Numeric comparison operators on text rules parse the input as a number at evaluation time
|
|
337
343
|
* (free-text fields often hold numbers); unparsable input fails the condition.
|
|
344
|
+
* maxDigits limits how many digits the written input may contain in total (grouping
|
|
345
|
+
* separators, sign and the decimal separator are not counted); maxDecimals limits how many
|
|
346
|
+
* digits may follow the decimal separator. Both take a non-negative integer comparison value
|
|
347
|
+
* and, like the other numeric operators, are also allowed on text rules.
|
|
338
348
|
*
|
|
339
349
|
*/
|
|
340
|
-
export type Operator = "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween";
|
|
350
|
+
export type Operator = "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals";
|
|
341
351
|
/**
|
|
342
352
|
* Condition definition for a pattern-based validation rule (2 levels deep)
|
|
343
353
|
*/
|
|
@@ -57,15 +57,20 @@ declare namespace Components {
|
|
|
57
57
|
id: string;
|
|
58
58
|
operator: /**
|
|
59
59
|
* Predefined comparison operator. Compatibility (enforced at write time):
|
|
60
|
-
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch
|
|
60
|
+
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch,
|
|
61
|
+
* maxDigits, maxDecimals
|
|
61
62
|
* - date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, notInPast, regexMatch
|
|
62
63
|
* - text: equal, notEqual, contains, doesNotContain, startsWith, endsWith, regexMatch, lengthBetween,
|
|
63
|
-
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between
|
|
64
|
+
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, maxDigits, maxDecimals
|
|
64
65
|
* Range operators (between, dateBetween, lengthBetween) require a `range` value;
|
|
65
66
|
* unary operators (notInFuture, notInPast) require a `none` value; all others require a scalar value.
|
|
66
67
|
* regexMatch validates the raw input string's format and always takes a static string pattern.
|
|
67
68
|
* Numeric comparison operators on text rules parse the input as a number at evaluation time
|
|
68
69
|
* (free-text fields often hold numbers); unparsable input fails the condition.
|
|
70
|
+
* maxDigits limits how many digits the written input may contain in total (grouping
|
|
71
|
+
* separators, sign and the decimal separator are not counted); maxDecimals limits how many
|
|
72
|
+
* digits may follow the decimal separator. Both take a non-negative integer comparison value
|
|
73
|
+
* and, like the other numeric operators, are also allowed on text rules.
|
|
69
74
|
*
|
|
70
75
|
*/
|
|
71
76
|
Operator;
|
|
@@ -326,18 +331,23 @@ declare namespace Components {
|
|
|
326
331
|
}
|
|
327
332
|
/**
|
|
328
333
|
* Predefined comparison operator. Compatibility (enforced at write time):
|
|
329
|
-
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch
|
|
334
|
+
* - number: equal, notEqual, greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, regexMatch,
|
|
335
|
+
* maxDigits, maxDecimals
|
|
330
336
|
* - date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, notInPast, regexMatch
|
|
331
337
|
* - text: equal, notEqual, contains, doesNotContain, startsWith, endsWith, regexMatch, lengthBetween,
|
|
332
|
-
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between
|
|
338
|
+
* greaterThan, greaterThanInclusive, lessThan, lessThanInclusive, between, maxDigits, maxDecimals
|
|
333
339
|
* Range operators (between, dateBetween, lengthBetween) require a `range` value;
|
|
334
340
|
* unary operators (notInFuture, notInPast) require a `none` value; all others require a scalar value.
|
|
335
341
|
* regexMatch validates the raw input string's format and always takes a static string pattern.
|
|
336
342
|
* Numeric comparison operators on text rules parse the input as a number at evaluation time
|
|
337
343
|
* (free-text fields often hold numbers); unparsable input fails the condition.
|
|
344
|
+
* maxDigits limits how many digits the written input may contain in total (grouping
|
|
345
|
+
* separators, sign and the decimal separator are not counted); maxDecimals limits how many
|
|
346
|
+
* digits may follow the decimal separator. Both take a non-negative integer comparison value
|
|
347
|
+
* and, like the other numeric operators, are also allowed on text rules.
|
|
338
348
|
*
|
|
339
349
|
*/
|
|
340
|
-
export type Operator = "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween";
|
|
350
|
+
export type Operator = "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "between" | "dateBefore" | "dateOnOrBefore" | "dateAfter" | "dateOnOrAfter" | "dateBetween" | "notInFuture" | "notInPast" | "contains" | "doesNotContain" | "startsWith" | "endsWith" | "regexMatch" | "lengthBetween" | "maxDigits" | "maxDecimals";
|
|
341
351
|
/**
|
|
342
352
|
* Condition definition for a pattern-based validation rule (2 levels deep)
|
|
343
353
|
*/
|