@epilot/sdk 2.18.24 → 2.18.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/definitions/customer-portal.json +56 -7
  2. package/definitions/validation-rules.json +67 -2
  3. package/dist/apis/access-token.cjs +6 -6
  4. package/dist/apis/access-token.js +1 -1
  5. package/dist/apis/address-suggestions.cjs +6 -6
  6. package/dist/apis/address-suggestions.js +1 -1
  7. package/dist/apis/address.cjs +6 -6
  8. package/dist/apis/address.js +1 -1
  9. package/dist/apis/ai-agents.cjs +6 -6
  10. package/dist/apis/ai-agents.js +1 -1
  11. package/dist/apis/app.cjs +6 -6
  12. package/dist/apis/app.js +1 -1
  13. package/dist/apis/audit-logs.cjs +6 -6
  14. package/dist/apis/audit-logs.js +1 -1
  15. package/dist/apis/automation.cjs +6 -6
  16. package/dist/apis/automation.js +1 -1
  17. package/dist/apis/billing.cjs +6 -6
  18. package/dist/apis/billing.js +1 -1
  19. package/dist/apis/blueprint-manifest.cjs +6 -6
  20. package/dist/apis/blueprint-manifest.js +1 -1
  21. package/dist/apis/calendar.cjs +6 -6
  22. package/dist/apis/calendar.js +1 -1
  23. package/dist/apis/configuration-hub.cjs +6 -6
  24. package/dist/apis/configuration-hub.js +1 -1
  25. package/dist/apis/consent.cjs +6 -6
  26. package/dist/apis/consent.js +1 -1
  27. package/dist/apis/customer-portal.cjs +6 -6
  28. package/dist/apis/customer-portal.d.cts +2 -2
  29. package/dist/apis/customer-portal.d.ts +2 -2
  30. package/dist/apis/customer-portal.js +1 -1
  31. package/dist/apis/dashboard.cjs +6 -6
  32. package/dist/apis/dashboard.js +1 -1
  33. package/dist/apis/data-governance.cjs +6 -6
  34. package/dist/apis/data-governance.js +1 -1
  35. package/dist/apis/deduplication.cjs +6 -6
  36. package/dist/apis/deduplication.js +1 -1
  37. package/dist/apis/design.cjs +6 -6
  38. package/dist/apis/design.js +1 -1
  39. package/dist/apis/document.cjs +6 -6
  40. package/dist/apis/document.js +1 -1
  41. package/dist/apis/email-settings.cjs +6 -6
  42. package/dist/apis/email-settings.js +1 -1
  43. package/dist/apis/email-template.cjs +6 -6
  44. package/dist/apis/email-template.js +1 -1
  45. package/dist/apis/entity-mapping.cjs +6 -6
  46. package/dist/apis/entity-mapping.js +1 -1
  47. package/dist/apis/entity.cjs +6 -6
  48. package/dist/apis/entity.js +1 -1
  49. package/dist/apis/environments.cjs +6 -6
  50. package/dist/apis/environments.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/file.cjs +6 -6
  54. package/dist/apis/file.js +1 -1
  55. package/dist/apis/iban.cjs +6 -6
  56. package/dist/apis/iban.js +1 -1
  57. package/dist/apis/integration-toolkit.cjs +6 -6
  58. package/dist/apis/integration-toolkit.js +1 -1
  59. package/dist/apis/journey.cjs +6 -6
  60. package/dist/apis/journey.js +1 -1
  61. package/dist/apis/kanban.cjs +6 -6
  62. package/dist/apis/kanban.js +1 -1
  63. package/dist/apis/message.cjs +6 -6
  64. package/dist/apis/message.js +1 -1
  65. package/dist/apis/metering.cjs +6 -6
  66. package/dist/apis/metering.js +1 -1
  67. package/dist/apis/notes.cjs +6 -6
  68. package/dist/apis/notes.js +1 -1
  69. package/dist/apis/notification.cjs +6 -6
  70. package/dist/apis/notification.js +1 -1
  71. package/dist/apis/organization.cjs +6 -6
  72. package/dist/apis/organization.js +1 -1
  73. package/dist/apis/partner-directory.cjs +6 -6
  74. package/dist/apis/partner-directory.js +1 -1
  75. package/dist/apis/permissions.cjs +6 -6
  76. package/dist/apis/permissions.js +1 -1
  77. package/dist/apis/pricing-tier.cjs +6 -6
  78. package/dist/apis/pricing-tier.js +1 -1
  79. package/dist/apis/pricing.cjs +6 -6
  80. package/dist/apis/pricing.js +1 -1
  81. package/dist/apis/purpose.cjs +6 -6
  82. package/dist/apis/purpose.js +1 -1
  83. package/dist/apis/query.cjs +6 -6
  84. package/dist/apis/query.js +1 -1
  85. package/dist/apis/sandbox.cjs +6 -6
  86. package/dist/apis/sandbox.js +1 -1
  87. package/dist/apis/sharing.cjs +6 -6
  88. package/dist/apis/sharing.js +1 -1
  89. package/dist/apis/snapshot.cjs +6 -6
  90. package/dist/apis/snapshot.js +1 -1
  91. package/dist/apis/submission.cjs +6 -6
  92. package/dist/apis/submission.js +1 -1
  93. package/dist/apis/target.cjs +6 -6
  94. package/dist/apis/target.js +1 -1
  95. package/dist/apis/targeting.cjs +6 -6
  96. package/dist/apis/targeting.js +1 -1
  97. package/dist/apis/template-variables.cjs +6 -6
  98. package/dist/apis/template-variables.js +1 -1
  99. package/dist/apis/user.cjs +6 -6
  100. package/dist/apis/user.js +1 -1
  101. package/dist/apis/validation-rules.cjs +6 -6
  102. package/dist/apis/validation-rules.d.cts +2 -2
  103. package/dist/apis/validation-rules.d.ts +2 -2
  104. package/dist/apis/validation-rules.js +1 -1
  105. package/dist/apis/webhooks.cjs +6 -6
  106. package/dist/apis/webhooks.js +1 -1
  107. package/dist/apis/workflow-definition.cjs +6 -6
  108. package/dist/apis/workflow-definition.js +1 -1
  109. package/dist/apis/workflow.cjs +6 -6
  110. package/dist/apis/workflow.js +1 -1
  111. package/dist/{chunk-XQAZPM6D.cjs → chunk-5XEB5OBL.cjs} +2 -2
  112. package/dist/{chunk-HOPMN6R2.js → chunk-CYNIYYYS.js} +2 -2
  113. package/dist/customer-portal-FCUPDA7V.cjs +7 -0
  114. package/dist/customer-portal-GRWXQYKT.js +7 -0
  115. package/dist/{customer-portal.d-D44zeiJ4.d.cts → customer-portal.d-DTnk0yQf.d.cts} +51 -9
  116. package/dist/{customer-portal.d-D44zeiJ4.d.ts → customer-portal.d-DTnk0yQf.d.ts} +51 -9
  117. package/dist/index.cjs +8 -8
  118. package/dist/index.d.cts +2 -2
  119. package/dist/index.d.ts +2 -2
  120. package/dist/index.js +1 -1
  121. package/dist/validation-rules-G5BWXUWI.cjs +7 -0
  122. package/dist/validation-rules-NLHK2CD3.js +7 -0
  123. package/dist/{validation-rules.d-BBy6Cw2O.d.cts → validation-rules.d-MvjG-zzw.d.cts} +58 -2
  124. package/dist/{validation-rules.d-BBy6Cw2O.d.ts → validation-rules.d-MvjG-zzw.d.ts} +58 -2
  125. package/docs/customer-portal.md +65 -3
  126. package/docs/validation-rules.md +63 -4
  127. package/package.json +1 -1
  128. package/dist/customer-portal-FOLTI3GK.cjs +0 -7
  129. package/dist/customer-portal-HQ3DJCGO.js +0 -7
  130. package/dist/validation-rules-CU5JJKDV.cjs +0 -7
  131. package/dist/validation-rules-M2JVIR7U.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- **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"\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"\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- date: dateBefore, dateOnOrBefore, dateAfter, dateOnOrAfter, dateBetween, notInFuture, notInPast, regexMatch\n- text:\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"\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
+ };
@@ -5,6 +5,29 @@ import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, Ope
5
5
 
6
6
  declare namespace Components {
7
7
  namespace Schemas {
8
+ /**
9
+ * Optional precondition on a condition: the condition only takes part in the
10
+ * validation when this comparison over context holds. Examples: apply the
11
+ * dual-tariff reference only when `contract.htnt` is not empty, or run a
12
+ * plausibility check only when a context value reaches a threshold.
13
+ *
14
+ */
15
+ export interface AppliesWhen {
16
+ /**
17
+ * Dot-separated context path whose first segment must match a declared context schema.
18
+ */
19
+ path: string; // ^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z0-9_]+)*$
20
+ /**
21
+ * Comparison applied to the resolved context value. `isEmpty` / `isNotEmpty`
22
+ * take no `value`; all other operators require one.
23
+ *
24
+ */
25
+ operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty";
26
+ /**
27
+ * Static comparison value for binary operators.
28
+ */
29
+ value?: /* Static comparison value for binary operators. */ number | string | boolean;
30
+ }
8
31
  /**
9
32
  * Declarative validation rule (schema version v2). Supports predefined comparison operators
10
33
  * over number, date and text inputs, with static, dynamic (context path) and relative-date
@@ -51,6 +74,14 @@ declare namespace Components {
51
74
  * Message shown to the end user when this condition fails.
52
75
  */
53
76
  error_message: string;
77
+ applies_when?: /**
78
+ * Optional precondition on a condition: the condition only takes part in the
79
+ * validation when this comparison over context holds. Examples: apply the
80
+ * dual-tariff reference only when `contract.htnt` is not empty, or run a
81
+ * plausibility check only when a context value reaches a threshold.
82
+ *
83
+ */
84
+ AppliesWhen;
54
85
  /**
55
86
  * When true, the condition is advisory: it is always evaluated and reported
56
87
  * when it fails, but it never takes part in the validity verdict.
@@ -761,8 +792,32 @@ declare namespace Components {
761
792
  */
762
793
  export interface ValueAdjustment {
763
794
  type: "percent" | "absolute";
764
- value: number;
795
+ /**
796
+ * The adjustment amount - a fixed number, or a context path resolving to a number
797
+ * (e.g. a per-contract percentage limit). Contextual adjustment values must not
798
+ * carry a nested adjustment.
799
+ *
800
+ */
801
+ value: /**
802
+ * The adjustment amount - a fixed number, or a context path resolving to a number
803
+ * (e.g. a per-contract percentage limit). Contextual adjustment values must not
804
+ * carry a nested adjustment.
805
+ *
806
+ */
807
+ number | /**
808
+ * A dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`
809
+ * or `previous_reading.value`. The first path segment must match the `name` of a declared
810
+ * context requirement.
811
+ *
812
+ */
813
+ ContextValue;
765
814
  direction: "increase" | "decrease";
815
+ /**
816
+ * Rounds the adjusted result to a whole number - `up` (ceiling) or `down` (floor).
817
+ * Omitted means no rounding. Used for bounds like "round up(current × 0.9) to whole euros".
818
+ *
819
+ */
820
+ rounding?: "up" | "down";
766
821
  }
767
822
  }
768
823
  }
@@ -1246,6 +1301,7 @@ interface PathsDictionary {
1246
1301
  type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1247
1302
 
1248
1303
 
1304
+ type AppliesWhen = Components.Schemas.AppliesWhen;
1249
1305
  type ComparisonRuleType = Components.Schemas.ComparisonRuleType;
1250
1306
  type Condition = Components.Schemas.Condition;
1251
1307
  type ConditionValue = Components.Schemas.ConditionValue;
@@ -1277,4 +1333,4 @@ type ValidationRule = Components.Schemas.ValidationRule;
1277
1333
  type ValidationRuleBase = Components.Schemas.ValidationRuleBase;
1278
1334
  type ValueAdjustment = Components.Schemas.ValueAdjustment;
1279
1335
 
1280
- export { type Client as C, type GetValidationRulesResponse as G, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type NumericCondition as i, type NumericFactCondition as j, type NumericNestedCondition as k, type NumericRuleType as l, type Operator as m, type PatternCondition as n, type PatternFactCondition as o, type PatternNestedCondition as p, type PatternRuleType as q, type RegexCondition as r, type RegexFactCondition as s, type RegexNestedCondition as t, type RegexRuleType as u, type RelativeDateValue as v, type StaticValue as w, type UsedBy as x, type ValidationRuleBase as y, type ValueAdjustment as z };
1336
+ export { type AppliesWhen as A, type Client as C, type GetValidationRulesResponse as G, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type NumericCondition as i, type NumericFactCondition as j, type NumericNestedCondition as k, type NumericRuleType as l, type Operator as m, type PatternCondition as n, type PatternFactCondition as o, type PatternNestedCondition as p, type PatternRuleType as q, type RegexCondition as r, type RegexFactCondition as s, type RegexNestedCondition as t, type RegexRuleType as u, type RelativeDateValue as v, type StaticValue as w, type UsedBy as x, type ValidationRuleBase as y, type ValueAdjustment as z };
@@ -5,6 +5,29 @@ import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, Ope
5
5
 
6
6
  declare namespace Components {
7
7
  namespace Schemas {
8
+ /**
9
+ * Optional precondition on a condition: the condition only takes part in the
10
+ * validation when this comparison over context holds. Examples: apply the
11
+ * dual-tariff reference only when `contract.htnt` is not empty, or run a
12
+ * plausibility check only when a context value reaches a threshold.
13
+ *
14
+ */
15
+ export interface AppliesWhen {
16
+ /**
17
+ * Dot-separated context path whose first segment must match a declared context schema.
18
+ */
19
+ path: string; // ^[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z0-9_]+)*$
20
+ /**
21
+ * Comparison applied to the resolved context value. `isEmpty` / `isNotEmpty`
22
+ * take no `value`; all other operators require one.
23
+ *
24
+ */
25
+ operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty";
26
+ /**
27
+ * Static comparison value for binary operators.
28
+ */
29
+ value?: /* Static comparison value for binary operators. */ number | string | boolean;
30
+ }
8
31
  /**
9
32
  * Declarative validation rule (schema version v2). Supports predefined comparison operators
10
33
  * over number, date and text inputs, with static, dynamic (context path) and relative-date
@@ -51,6 +74,14 @@ declare namespace Components {
51
74
  * Message shown to the end user when this condition fails.
52
75
  */
53
76
  error_message: string;
77
+ applies_when?: /**
78
+ * Optional precondition on a condition: the condition only takes part in the
79
+ * validation when this comparison over context holds. Examples: apply the
80
+ * dual-tariff reference only when `contract.htnt` is not empty, or run a
81
+ * plausibility check only when a context value reaches a threshold.
82
+ *
83
+ */
84
+ AppliesWhen;
54
85
  /**
55
86
  * When true, the condition is advisory: it is always evaluated and reported
56
87
  * when it fails, but it never takes part in the validity verdict.
@@ -761,8 +792,32 @@ declare namespace Components {
761
792
  */
762
793
  export interface ValueAdjustment {
763
794
  type: "percent" | "absolute";
764
- value: number;
795
+ /**
796
+ * The adjustment amount - a fixed number, or a context path resolving to a number
797
+ * (e.g. a per-contract percentage limit). Contextual adjustment values must not
798
+ * carry a nested adjustment.
799
+ *
800
+ */
801
+ value: /**
802
+ * The adjustment amount - a fixed number, or a context path resolving to a number
803
+ * (e.g. a per-contract percentage limit). Contextual adjustment values must not
804
+ * carry a nested adjustment.
805
+ *
806
+ */
807
+ number | /**
808
+ * A dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`
809
+ * or `previous_reading.value`. The first path segment must match the `name` of a declared
810
+ * context requirement.
811
+ *
812
+ */
813
+ ContextValue;
765
814
  direction: "increase" | "decrease";
815
+ /**
816
+ * Rounds the adjusted result to a whole number - `up` (ceiling) or `down` (floor).
817
+ * Omitted means no rounding. Used for bounds like "round up(current × 0.9) to whole euros".
818
+ *
819
+ */
820
+ rounding?: "up" | "down";
766
821
  }
767
822
  }
768
823
  }
@@ -1246,6 +1301,7 @@ interface PathsDictionary {
1246
1301
  type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1247
1302
 
1248
1303
 
1304
+ type AppliesWhen = Components.Schemas.AppliesWhen;
1249
1305
  type ComparisonRuleType = Components.Schemas.ComparisonRuleType;
1250
1306
  type Condition = Components.Schemas.Condition;
1251
1307
  type ConditionValue = Components.Schemas.ConditionValue;
@@ -1277,4 +1333,4 @@ type ValidationRule = Components.Schemas.ValidationRule;
1277
1333
  type ValidationRuleBase = Components.Schemas.ValidationRuleBase;
1278
1334
  type ValueAdjustment = Components.Schemas.ValueAdjustment;
1279
1335
 
1280
- export { type Client as C, type GetValidationRulesResponse as G, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type NumericCondition as i, type NumericFactCondition as j, type NumericNestedCondition as k, type NumericRuleType as l, type Operator as m, type PatternCondition as n, type PatternFactCondition as o, type PatternNestedCondition as p, type PatternRuleType as q, type RegexCondition as r, type RegexFactCondition as s, type RegexNestedCondition as t, type RegexRuleType as u, type RelativeDateValue as v, type StaticValue as w, type UsedBy as x, type ValidationRuleBase as y, type ValueAdjustment as z };
1336
+ export { type AppliesWhen as A, type Client as C, type GetValidationRulesResponse as G, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type NumericCondition as i, type NumericFactCondition as j, type NumericNestedCondition as k, type NumericRuleType as l, type Operator as m, type PatternCondition as n, type PatternFactCondition as o, type PatternNestedCondition as p, type PatternRuleType as q, type RegexCondition as r, type RegexFactCondition as s, type RegexNestedCondition as t, type RegexRuleType as u, type RelativeDateValue as v, type StaticValue as w, type UsedBy as x, type ValidationRuleBase as y, type ValueAdjustment as z };
@@ -229,6 +229,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
229
229
  - [`Exists`](#exists)
230
230
  - [`EntitySlug`](#entityslug)
231
231
  - [`EntitySlugConfig`](#entityslugconfig)
232
+ - [`TemplatesRef`](#templatesref)
232
233
  - [`EntityId`](#entityid)
233
234
  - [`BaseEntity`](#baseentity)
234
235
  - [`Schema`](#schema)
@@ -5285,7 +5286,13 @@ const { data } = await client.getContractWithTemplates(
5285
5286
  id: '123e4567-e89b-12d3-a456-426614174000',
5286
5287
  },
5287
5288
  {
5288
- templates: {}
5289
+ templates: {},
5290
+ templates_ref: {
5291
+ page_id: 'string',
5292
+ block_id: 'string',
5293
+ config_id: 'string',
5294
+ global_search_config_id: 'string'
5295
+ }
5289
5296
  },
5290
5297
  )
5291
5298
  ```
@@ -6217,6 +6224,12 @@ const { data } = await client.getPortalUserEntity(
6217
6224
  subtitle: '{{contract.contract_number}}'
6218
6225
  }
6219
6226
  },
6227
+ templates_ref: {
6228
+ page_id: 'string',
6229
+ block_id: 'string',
6230
+ config_id: 'string',
6231
+ global_search_config_id: 'string'
6232
+ },
6220
6233
  filters: [
6221
6234
  {
6222
6235
  term: {
@@ -6310,6 +6323,12 @@ const { data } = await client.searchPortalUserEntities(
6310
6323
  main_content_name: '{{contract.contract_name}} ({{contract.contract_number}})',
6311
6324
  content_bottom_name: '{{custom_contract_delivery_address}}'
6312
6325
  },
6326
+ templates_ref: {
6327
+ page_id: 'string',
6328
+ block_id: 'string',
6329
+ config_id: 'string',
6330
+ global_search_config_id: 'string'
6331
+ },
6313
6332
  filters: [
6314
6333
  {
6315
6334
  term: {
@@ -6939,7 +6958,13 @@ const { data } = await client.getMeterReadings(
6939
6958
  from: 0,
6940
6959
  size: 10,
6941
6960
  templates: {},
6942
- counter_templates: {}
6961
+ counter_templates: {},
6962
+ templates_ref: {
6963
+ page_id: 'string',
6964
+ block_id: 'string',
6965
+ config_id: 'string',
6966
+ global_search_config_id: 'string'
6967
+ }
6943
6968
  },
6944
6969
  )
6945
6970
  ```
@@ -7493,7 +7518,7 @@ const { data } = await client.getPublicPages({
7493
7518
 
7494
7519
  ### `interpolatePortalPages`
7495
7520
 
7496
- Interpolate template variables in portal pages without reading from the database. Accepts pages in the request body and returns them with templates resolved.
7521
+ Interpolate template variables in portal pages without reading from the database. Accepts pages in the request body and returns them with templates resolved. Portal Builder preview only: requires a 36
7497
7522
 
7498
7523
  `POST /v2/portal/pages/interpolate`
7499
7524
 
@@ -11834,6 +11859,25 @@ type EntitySlugConfig = {
11834
11859
  slug: string
11835
11860
  targets?: string // uuid[]
11836
11861
  templates?: Record<string, string>
11862
+ templates_ref?: {
11863
+ page_id?: string
11864
+ block_id?: string
11865
+ config_id?: string
11866
+ global_search_config_id?: string
11867
+ }
11868
+ }
11869
+ ```
11870
+
11871
+ ### `TemplatesRef`
11872
+
11873
+ Reference to admin-authored portal configuration (a page block or a global search configuration item) from which the API derives Handlebars templates server-side. This replaces client-supplied template strings so portal users can never submit arbitrary templates for resolution. When both a reference
11874
+
11875
+ ```ts
11876
+ type TemplatesRef = {
11877
+ page_id?: string
11878
+ block_id?: string
11879
+ config_id?: string
11880
+ global_search_config_id?: string
11837
11881
  }
11838
11882
  ```
11839
11883
 
@@ -12753,6 +12797,12 @@ type EntityGetParams = {
12753
12797
  hydrate?: boolean
12754
12798
  fields?: string[]
12755
12799
  templates?: Record<string, string | Record<string, string>>
12800
+ templates_ref?: {
12801
+ page_id?: string
12802
+ block_id?: string
12803
+ config_id?: string
12804
+ global_search_config_id?: string
12805
+ }
12756
12806
  filters?: object[]
12757
12807
  filters_context?: Record<string, boolean | string>[]
12758
12808
  targets?: string // uuid[]
@@ -12767,6 +12817,12 @@ type EntitySearchParams = {
12767
12817
  slug: string
12768
12818
  targets?: string // uuid[]
12769
12819
  templates?: Record<string, string>
12820
+ templates_ref?: {
12821
+ page_id?: { ... }
12822
+ block_id?: { ... }
12823
+ config_id?: { ... }
12824
+ global_search_config_id?: { ... }
12825
+ }
12770
12826
  }>
12771
12827
  q?: string
12772
12828
  q_fields?: string[]
@@ -12781,6 +12837,12 @@ type EntitySearchParams = {
12781
12837
  hydrate?: boolean
12782
12838
  fields?: string[]
12783
12839
  templates?: Record<string, string>
12840
+ templates_ref?: {
12841
+ page_id?: string
12842
+ block_id?: string
12843
+ config_id?: string
12844
+ global_search_config_id?: string
12845
+ }
12784
12846
  filters?: object[]
12785
12847
  filters_context?: Record<string, boolean | string>[]
12786
12848
  targets?: string // uuid[]
@@ -62,6 +62,7 @@ const { data } = await validationRulesClient.getValidationRules(...)
62
62
  - [`RelativeDateValue`](#relativedatevalue)
63
63
  - [`RangeValue`](#rangevalue)
64
64
  - [`NoValue`](#novalue)
65
+ - [`AppliesWhen`](#applieswhen)
65
66
  - [`ContextRequirement`](#contextrequirement)
66
67
 
67
68
  ### `getValidationRules`
@@ -675,6 +676,7 @@ type UpdateValidationRuleRequest = {
675
676
  operator: { ... }
676
677
  value: { ... }
677
678
  error_message: { ... }
679
+ applies_when?: { ... }
678
680
  allow_failure?: { ... }
679
681
  }>
680
682
  }
@@ -729,6 +731,7 @@ type ValidationRuleBase = {
729
731
  operator: { ... }
730
732
  value: { ... }
731
733
  error_message: { ... }
734
+ applies_when?: { ... }
732
735
  allow_failure?: { ... }
733
736
  }>
734
737
  }
@@ -1696,6 +1699,11 @@ type ComparisonRuleType = {
1696
1699
  source: { ... }
1697
1700
  }
1698
1701
  error_message: string
1702
+ applies_when?: {
1703
+ path: { ... }
1704
+ operator: { ... }
1705
+ value?: { ... }
1706
+ }
1699
1707
  allow_failure?: boolean
1700
1708
  }>
1701
1709
  }
@@ -1719,6 +1727,7 @@ type Condition = {
1719
1727
  type: { ... }
1720
1728
  value: { ... }
1721
1729
  direction: { ... }
1730
+ rounding?: { ... }
1722
1731
  }
1723
1732
  } | {
1724
1733
  source: "relative_date"
@@ -1757,6 +1766,11 @@ type Condition = {
1757
1766
  source: "none"
1758
1767
  }
1759
1768
  error_message: string
1769
+ applies_when?: {
1770
+ path: string
1771
+ operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"
1772
+ value?: number | string | boolean
1773
+ }
1760
1774
  allow_failure?: boolean
1761
1775
  }
1762
1776
  ```
@@ -1785,8 +1799,13 @@ type ConditionValue = {
1785
1799
  path: string
1786
1800
  adjust?: {
1787
1801
  type: "percent" | "absolute"
1788
- value: number
1802
+ value: number | {
1803
+ source: { ... }
1804
+ path: { ... }
1805
+ adjust?: { ... }
1806
+ }
1789
1807
  direction: "increase" | "decrease"
1808
+ rounding?: "up" | "down"
1790
1809
  }
1791
1810
  } | {
1792
1811
  source: "relative_date"
@@ -1805,6 +1824,7 @@ type ConditionValue = {
1805
1824
  type: { ... }
1806
1825
  value: { ... }
1807
1826
  direction: { ... }
1827
+ rounding?: { ... }
1808
1828
  }
1809
1829
  } | {
1810
1830
  source: "relative_date"
@@ -1822,6 +1842,7 @@ type ConditionValue = {
1822
1842
  type: { ... }
1823
1843
  value: { ... }
1824
1844
  direction: { ... }
1845
+ rounding?: { ... }
1825
1846
  }
1826
1847
  } | {
1827
1848
  source: "relative_date"
@@ -1847,8 +1868,13 @@ type ScalarValue = {
1847
1868
  path: string
1848
1869
  adjust?: {
1849
1870
  type: "percent" | "absolute"
1850
- value: number
1871
+ value: number | {
1872
+ source: { ... }
1873
+ path: { ... }
1874
+ adjust?: { ... }
1875
+ }
1851
1876
  direction: "increase" | "decrease"
1877
+ rounding?: "up" | "down"
1852
1878
  }
1853
1879
  } | {
1854
1880
  source: "relative_date"
@@ -1882,8 +1908,13 @@ type ContextValue = {
1882
1908
  path: string
1883
1909
  adjust?: {
1884
1910
  type: "percent" | "absolute"
1885
- value: number
1911
+ value: number | {
1912
+ source: { ... }
1913
+ path: { ... }
1914
+ adjust?: { ... }
1915
+ }
1886
1916
  direction: "increase" | "decrease"
1917
+ rounding?: "up" | "down"
1887
1918
  }
1888
1919
  }
1889
1920
  ```
@@ -1897,8 +1928,18 @@ Used to express tolerance bands such as "at most 10% above the current instalmen
1897
1928
  ```ts
1898
1929
  type ValueAdjustment = {
1899
1930
  type: "percent" | "absolute"
1900
- value: number
1931
+ value: number | {
1932
+ source: "context"
1933
+ path: string
1934
+ adjust?: {
1935
+ type: { ... }
1936
+ value: { ... }
1937
+ direction: { ... }
1938
+ rounding?: { ... }
1939
+ }
1940
+ }
1901
1941
  direction: "increase" | "decrease"
1942
+ rounding?: "up" | "down"
1902
1943
  }
1903
1944
  ```
1904
1945
 
@@ -1932,6 +1973,7 @@ type RangeValue = {
1932
1973
  type: { ... }
1933
1974
  value: { ... }
1934
1975
  direction: { ... }
1976
+ rounding?: { ... }
1935
1977
  }
1936
1978
  } | {
1937
1979
  source: "relative_date"
@@ -1949,6 +1991,7 @@ type RangeValue = {
1949
1991
  type: { ... }
1950
1992
  value: { ... }
1951
1993
  direction: { ... }
1994
+ rounding?: { ... }
1952
1995
  }
1953
1996
  } | {
1954
1997
  source: "relative_date"
@@ -1969,6 +2012,22 @@ type NoValue = {
1969
2012
  }
1970
2013
  ```
1971
2014
 
2015
+ ### `AppliesWhen`
2016
+
2017
+ Optional precondition on a condition: the condition only takes part in the
2018
+ validation when this comparison over context holds. Examples: apply the
2019
+ dual-tariff reference only when `contract.htnt` is not empty, or run a
2020
+ plausibility check only when a context value reaches a threshold.
2021
+
2022
+
2023
+ ```ts
2024
+ type AppliesWhen = {
2025
+ path: string
2026
+ operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"
2027
+ value?: number | string | boolean
2028
+ }
2029
+ ```
2030
+
1972
2031
  ### `ContextRequirement`
1973
2032
 
1974
2033
  An entity context source the rule needs at evaluation time, referenced by `context`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.18.24",
3
+ "version": "2.18.26",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",