@epilot/sdk 2.18.32 → 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.
Files changed (128) hide show
  1. package/definitions/validation-rules-runtime.json +1 -1
  2. package/definitions/validation-rules.json +9 -3
  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.js +1 -1
  29. package/dist/apis/dashboard.cjs +6 -6
  30. package/dist/apis/dashboard.js +1 -1
  31. package/dist/apis/data-governance.cjs +6 -6
  32. package/dist/apis/data-governance.js +1 -1
  33. package/dist/apis/deduplication.cjs +6 -6
  34. package/dist/apis/deduplication.js +1 -1
  35. package/dist/apis/design.cjs +6 -6
  36. package/dist/apis/design.js +1 -1
  37. package/dist/apis/document.cjs +6 -6
  38. package/dist/apis/document.js +1 -1
  39. package/dist/apis/email-settings.cjs +6 -6
  40. package/dist/apis/email-settings.js +1 -1
  41. package/dist/apis/email-template.cjs +6 -6
  42. package/dist/apis/email-template.js +1 -1
  43. package/dist/apis/entity-mapping.cjs +6 -6
  44. package/dist/apis/entity-mapping.js +1 -1
  45. package/dist/apis/entity.cjs +6 -6
  46. package/dist/apis/entity.js +1 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/event-catalog.cjs +6 -6
  50. package/dist/apis/event-catalog.js +1 -1
  51. package/dist/apis/file.cjs +6 -6
  52. package/dist/apis/file.js +1 -1
  53. package/dist/apis/iban.cjs +6 -6
  54. package/dist/apis/iban.js +1 -1
  55. package/dist/apis/integration-toolkit.cjs +6 -6
  56. package/dist/apis/integration-toolkit.js +1 -1
  57. package/dist/apis/journey.cjs +6 -6
  58. package/dist/apis/journey.js +1 -1
  59. package/dist/apis/kanban.cjs +6 -6
  60. package/dist/apis/kanban.js +1 -1
  61. package/dist/apis/message.cjs +6 -6
  62. package/dist/apis/message.js +1 -1
  63. package/dist/apis/metering.cjs +6 -6
  64. package/dist/apis/metering.js +1 -1
  65. package/dist/apis/notes.cjs +6 -6
  66. package/dist/apis/notes.js +1 -1
  67. package/dist/apis/notification.cjs +6 -6
  68. package/dist/apis/notification.js +1 -1
  69. package/dist/apis/organization.cjs +6 -6
  70. package/dist/apis/organization.js +1 -1
  71. package/dist/apis/partner-directory.cjs +6 -6
  72. package/dist/apis/partner-directory.js +1 -1
  73. package/dist/apis/permissions.cjs +6 -6
  74. package/dist/apis/permissions.js +1 -1
  75. package/dist/apis/pricing-tier.cjs +6 -6
  76. package/dist/apis/pricing-tier.js +1 -1
  77. package/dist/apis/pricing.cjs +6 -6
  78. package/dist/apis/pricing.js +1 -1
  79. package/dist/apis/purpose.cjs +6 -6
  80. package/dist/apis/purpose.js +1 -1
  81. package/dist/apis/query.cjs +6 -6
  82. package/dist/apis/query.js +1 -1
  83. package/dist/apis/sandbox.cjs +6 -6
  84. package/dist/apis/sandbox.js +1 -1
  85. package/dist/apis/sharing.cjs +6 -6
  86. package/dist/apis/sharing.js +1 -1
  87. package/dist/apis/snapshot.cjs +6 -6
  88. package/dist/apis/snapshot.js +1 -1
  89. package/dist/apis/submission.cjs +6 -6
  90. package/dist/apis/submission.js +1 -1
  91. package/dist/apis/target.cjs +6 -6
  92. package/dist/apis/target.js +1 -1
  93. package/dist/apis/targeting.cjs +6 -6
  94. package/dist/apis/targeting.js +1 -1
  95. package/dist/apis/template-variables.cjs +6 -6
  96. package/dist/apis/template-variables.js +1 -1
  97. package/dist/apis/user.cjs +6 -6
  98. package/dist/apis/user.js +1 -1
  99. package/dist/apis/validation-rules.cjs +8 -8
  100. package/dist/apis/validation-rules.d.cts +2 -2
  101. package/dist/apis/validation-rules.d.ts +2 -2
  102. package/dist/apis/validation-rules.js +2 -2
  103. package/dist/apis/webhooks.cjs +6 -6
  104. package/dist/apis/webhooks.js +1 -1
  105. package/dist/apis/workflow-definition.cjs +6 -6
  106. package/dist/apis/workflow-definition.js +1 -1
  107. package/dist/apis/workflow.cjs +6 -6
  108. package/dist/apis/workflow.js +1 -1
  109. package/dist/{chunk-5A6KKQEZ.cjs → chunk-3GSQBFJZ.cjs} +2 -2
  110. package/dist/chunk-7IKQIVUS.js +14 -0
  111. package/dist/chunk-JIUTCNTB.cjs +14 -0
  112. package/dist/{chunk-Z3EVGVBQ.js → chunk-W636M2L3.js} +2 -2
  113. package/dist/index.cjs +10 -10
  114. package/dist/index.d.cts +1 -1
  115. package/dist/index.d.ts +1 -1
  116. package/dist/index.js +2 -2
  117. package/dist/validation-rules-B2KQKMLO.js +7 -0
  118. package/dist/validation-rules-GR2IVLGJ.cjs +7 -0
  119. package/dist/{validation-rules-runtime-VGLVHV36.js → validation-rules-runtime-6MRCS5X2.js} +1 -1
  120. package/dist/{validation-rules-runtime-DENVKYLF.cjs → validation-rules-runtime-X7M3QE5I.cjs} +2 -2
  121. package/dist/{validation-rules.d-MvjG-zzw.d.cts → validation-rules.d-CvGvBnMX.d.cts} +15 -5
  122. package/dist/{validation-rules.d-MvjG-zzw.d.ts → validation-rules.d-CvGvBnMX.d.ts} +15 -5
  123. package/docs/validation-rules.md +7 -6
  124. package/package.json +1 -1
  125. package/dist/chunk-HRSCAD3W.cjs +0 -14
  126. package/dist/chunk-PPX45U34.js +0 -14
  127. package/dist/validation-rules-G5BWXUWI.cjs +0 -7
  128. package/dist/validation-rules-NLHK2CD3.js +0 -7
@@ -6,25 +6,25 @@ var _chunkADX7IYB3cjs = require('../chunk-ADX7IYB3.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk5A6KKQEZcjs = require('../chunk-5A6KKQEZ.cjs');
9
+ var _chunk3GSQBFJZcjs = require('../chunk-3GSQBFJZ.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/workflow-definition.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkADX7IYB3cjs.require_workflow_definition_runtime.call(void 0, );
15
- return _chunk5A6KKQEZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunk3GSQBFJZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk5A6KKQEZcjs.createApiClient.call(void 0, { definition: def, apiName: "workflowDefinition" });
21
+ _instance = _chunk3GSQBFJZcjs.createApiClient.call(void 0, { definition: def, apiName: "workflowDefinition" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk5A6KKQEZcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunk3GSQBFJZcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk5A6KKQEZcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflowDefinition" }),
27
+ createClient: () => _chunk3GSQBFJZcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflowDefinition" }),
28
28
  apiName: "workflowDefinition"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var workflowDefinition = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.authorize = _chunk5A6KKQEZcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflowDefinition = workflowDefinition;
38
+ exports.authorize = _chunk3GSQBFJZcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflowDefinition = workflowDefinition;
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-Z3EVGVBQ.js";
9
+ } from "../chunk-W636M2L3.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/workflow-definition.ts
@@ -6,25 +6,25 @@ var _chunkPM25LLETcjs = require('../chunk-PM25LLET.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk5A6KKQEZcjs = require('../chunk-5A6KKQEZ.cjs');
9
+ var _chunk3GSQBFJZcjs = require('../chunk-3GSQBFJZ.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/workflow.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkPM25LLETcjs.require_workflow_runtime.call(void 0, );
15
- return _chunk5A6KKQEZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunk3GSQBFJZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk5A6KKQEZcjs.createApiClient.call(void 0, { definition: def, apiName: "workflow" });
21
+ _instance = _chunk3GSQBFJZcjs.createApiClient.call(void 0, { definition: def, apiName: "workflow" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk5A6KKQEZcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunk3GSQBFJZcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk5A6KKQEZcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflow" }),
27
+ createClient: () => _chunk3GSQBFJZcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "workflow" }),
28
28
  apiName: "workflow"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var workflow = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.authorize = _chunk5A6KKQEZcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflow = workflow;
38
+ exports.authorize = _chunk3GSQBFJZcjs.authorize; exports.createClient = createClient; exports.getClient = getClient; exports.workflow = workflow;
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-Z3EVGVBQ.js";
9
+ } from "../chunk-W636M2L3.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/workflow.ts
@@ -78,7 +78,7 @@ var globImport_docs = _chunkNJK5F5TFcjs.__glob.call(void 0, {
78
78
  "./docs/targeting.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./targeting-CSGKITGV.cjs"))),
79
79
  "./docs/template-variables.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./template-variables-I72B5WS6.cjs"))),
80
80
  "./docs/user.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./user-DR7IAWFI.cjs"))),
81
- "./docs/validation-rules.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-G5BWXUWI.cjs"))),
81
+ "./docs/validation-rules.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-GR2IVLGJ.cjs"))),
82
82
  "./docs/webhooks.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./webhooks-PNLMQFE2.cjs"))),
83
83
  "./docs/workflow-definition.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-definition-XTWO4RMY.cjs"))),
84
84
  "./docs/workflow.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./workflow-JQT3F5NJ.cjs")))
@@ -192,7 +192,7 @@ var globImport_definitions_json = _chunkNJK5F5TFcjs.__glob.call(void 0, {
192
192
  "./definitions/template-variables.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./template-variables-JYHE2VCH.cjs"))),
193
193
  "./definitions/user-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./user-runtime-6TSL4RZN.cjs"))),
194
194
  "./definitions/user.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./user-DKA6DDPX.cjs"))),
195
- "./definitions/validation-rules-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-runtime-DENVKYLF.cjs"))),
195
+ "./definitions/validation-rules-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-runtime-X7M3QE5I.cjs"))),
196
196
  "./definitions/validation-rules.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./validation-rules-AYCAOVDZ.cjs"))),
197
197
  "./definitions/webhooks-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./webhooks-runtime-EXBZXG37.cjs"))),
198
198
  "./definitions/webhooks.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./webhooks-L3FXPRKT.cjs"))),
@@ -0,0 +1,14 @@
1
+ import {
2
+ __commonJS
3
+ } from "./chunk-YPSWSI3M.js";
4
+
5
+ // src/definitions/validation-rules-runtime.json
6
+ var require_validation_rules_runtime = __commonJS({
7
+ "src/definitions/validation-rules-runtime.json"(exports, module) {
8
+ module.exports = { s: "https://validation-rules.sls.epilot.io", o: [["getValidationRules", "get", "/v1/validation-rules"], ["createValidationRule", "post", "/v1/validation-rules", null, 1], ["getValidationRuleById", "get", "/v1/validation-rules/{ruleId}", [["ruleId", "p", true]]], ["updateValidationRule", "patch", "/v1/validation-rules/{ruleId}", [["ruleId", "p", true]], 1], ["deleteValidationRule", "delete", "/v1/validation-rules/{ruleId}", [["ruleId", "p", true]]], ["addUsedByReference", "post", "/v1/validation-rules/{ruleId}/used-by", [["ruleId", "p", true]], 1], ["removeUsedByReference", "delete", "/v1/validation-rules/{ruleId}/used-by", [["ruleId", "p", true]], 1]], v: "3.0.3" };
9
+ }
10
+ });
11
+
12
+ export {
13
+ require_validation_rules_runtime
14
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
4
+
5
+ // src/definitions/validation-rules-runtime.json
6
+ var require_validation_rules_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
7
+ "src/definitions/validation-rules-runtime.json"(exports, module) {
8
+ module.exports = { s: "https://validation-rules.sls.epilot.io", o: [["getValidationRules", "get", "/v1/validation-rules"], ["createValidationRule", "post", "/v1/validation-rules", null, 1], ["getValidationRuleById", "get", "/v1/validation-rules/{ruleId}", [["ruleId", "p", true]]], ["updateValidationRule", "patch", "/v1/validation-rules/{ruleId}", [["ruleId", "p", true]], 1], ["deleteValidationRule", "delete", "/v1/validation-rules/{ruleId}", [["ruleId", "p", true]]], ["addUsedByReference", "post", "/v1/validation-rules/{ruleId}/used-by", [["ruleId", "p", true]], 1], ["removeUsedByReference", "delete", "/v1/validation-rules/{ruleId}/used-by", [["ruleId", "p", true]], 1]], v: "3.0.3" };
9
+ }
10
+ });
11
+
12
+
13
+
14
+ exports.require_validation_rules_runtime = require_validation_rules_runtime;
@@ -78,7 +78,7 @@ var globImport_docs = __glob({
78
78
  "./docs/targeting.json": () => import("./targeting-A2X6X7BF.js"),
79
79
  "./docs/template-variables.json": () => import("./template-variables-6CLOG67C.js"),
80
80
  "./docs/user.json": () => import("./user-7W5JUUKB.js"),
81
- "./docs/validation-rules.json": () => import("./validation-rules-NLHK2CD3.js"),
81
+ "./docs/validation-rules.json": () => import("./validation-rules-B2KQKMLO.js"),
82
82
  "./docs/webhooks.json": () => import("./webhooks-QYVT2NUP.js"),
83
83
  "./docs/workflow-definition.json": () => import("./workflow-definition-MSO4JDA3.js"),
84
84
  "./docs/workflow.json": () => import("./workflow-Q6FAE5OL.js")
@@ -192,7 +192,7 @@ var globImport_definitions_json = __glob({
192
192
  "./definitions/template-variables.json": () => import("./template-variables-XLIW4GY6.js"),
193
193
  "./definitions/user-runtime.json": () => import("./user-runtime-UPFER72E.js"),
194
194
  "./definitions/user.json": () => import("./user-O4JDAIRO.js"),
195
- "./definitions/validation-rules-runtime.json": () => import("./validation-rules-runtime-VGLVHV36.js"),
195
+ "./definitions/validation-rules-runtime.json": () => import("./validation-rules-runtime-6MRCS5X2.js"),
196
196
  "./definitions/validation-rules.json": () => import("./validation-rules-GCI64B57.js"),
197
197
  "./definitions/webhooks-runtime.json": () => import("./webhooks-runtime-7WUVZ67Z.js"),
198
198
  "./definitions/webhooks.json": () => import("./webhooks-XXLU2KWP.js"),
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  var _chunkX2LMHC5Rcjs = require('./chunk-X2LMHC5R.cjs');
4
4
 
5
5
 
6
- var _chunkHRSCAD3Wcjs = require('./chunk-HRSCAD3W.cjs');
6
+ var _chunkJIUTCNTBcjs = require('./chunk-JIUTCNTB.cjs');
7
7
 
8
8
 
9
9
  var _chunkNGGI52NVcjs = require('./chunk-NGGI52NV.cjs');
@@ -158,7 +158,7 @@ var _chunkADSWGLIVcjs = require('./chunk-ADSWGLIV.cjs');
158
158
 
159
159
 
160
160
 
161
- var _chunk5A6KKQEZcjs = require('./chunk-5A6KKQEZ.cjs');
161
+ var _chunk3GSQBFJZcjs = require('./chunk-3GSQBFJZ.cjs');
162
162
 
163
163
 
164
164
  var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
@@ -225,7 +225,7 @@ var resolveClient = (params) => {
225
225
  }
226
226
  if (!entry.instance) {
227
227
  const definition = entry.loader();
228
- entry.instance = _chunk5A6KKQEZcjs.createApiClient.call(void 0, {
228
+ entry.instance = _chunk3GSQBFJZcjs.createApiClient.call(void 0, {
229
229
  definition,
230
230
  token: state.token,
231
231
  headers: state.globalHeaders,
@@ -258,7 +258,7 @@ var resetAllClients = (registry) => {
258
258
  };
259
259
 
260
260
  // src/apis/_registry.ts
261
- var expandDef = (mod) => _chunk5A6KKQEZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
261
+ var expandDef = (mod) => _chunk3GSQBFJZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
262
262
  var registerBuiltinApis = (registry) => {
263
263
  registerApi({
264
264
  registry,
@@ -498,7 +498,7 @@ var registerBuiltinApis = (registry) => {
498
498
  registerApi({
499
499
  registry,
500
500
  name: "validationRules",
501
- loader: () => expandDef(_chunkHRSCAD3Wcjs.require_validation_rules_runtime.call(void 0, ))
501
+ loader: () => expandDef(_chunkJIUTCNTBcjs.require_validation_rules_runtime.call(void 0, ))
502
502
  });
503
503
  registerApi({
504
504
  registry,
@@ -601,9 +601,9 @@ var createSDK = () => {
601
601
  const available = [...registry.keys()].join(", ");
602
602
  throw new Error(`Unknown API: "${name}". Available: ${available}`);
603
603
  }
604
- return _chunk5A6KKQEZcjs.createApiHandle.call(void 0, {
604
+ return _chunk3GSQBFJZcjs.createApiHandle.call(void 0, {
605
605
  resolveClient: () => resolveClient({ registry, name, state }),
606
- createClient: () => _chunk5A6KKQEZcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
606
+ createClient: () => _chunk3GSQBFJZcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
607
607
  apiName: name
608
608
  });
609
609
  };
@@ -651,9 +651,9 @@ var createSDK = () => {
651
651
  return interceptorUse;
652
652
  }
653
653
  case "help":
654
- return (apiName) => _chunk5A6KKQEZcjs.help.call(void 0, apiName);
654
+ return (apiName) => _chunk3GSQBFJZcjs.help.call(void 0, apiName);
655
655
  case "openapi":
656
- return (apiName) => _chunk5A6KKQEZcjs.openapi.call(void 0, apiName);
656
+ return (apiName) => _chunk3GSQBFJZcjs.openapi.call(void 0, apiName);
657
657
  case "then":
658
658
  case "catch":
659
659
  case "finally":
@@ -683,4 +683,4 @@ var epilot = createSDK();
683
683
 
684
684
 
685
685
 
686
- exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunk5A6KKQEZcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunk5A6KKQEZcjs.help; exports.openapi = _chunk5A6KKQEZcjs.openapi;
686
+ exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunk3GSQBFJZcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunk3GSQBFJZcjs.help; exports.openapi = _chunk3GSQBFJZcjs.openapi;
package/dist/index.d.cts CHANGED
@@ -50,7 +50,7 @@ import { C as Client$H } from './submission.d-BamwfhXw.cjs';
50
50
  import { C as Client$I } from './targeting.d-DaK3kwZg.cjs';
51
51
  import { C as Client$J } from './template-variables.d-Ble9TSBa.cjs';
52
52
  import { C as Client$K } from './user.d-rqYtwsCz.cjs';
53
- import { C as Client$L } from './validation-rules.d-MvjG-zzw.cjs';
53
+ import { C as Client$L } from './validation-rules.d-CvGvBnMX.cjs';
54
54
  import { C as Client$M } from './webhooks.d-DqOEzFsp.cjs';
55
55
  import { C as Client$N } from './workflow.d-5cyNJgVQ.cjs';
56
56
  import { C as Client$O } from './workflow-definition.d-CweGhhBU.cjs';
package/dist/index.d.ts CHANGED
@@ -50,7 +50,7 @@ import { C as Client$H } from './submission.d-BamwfhXw.js';
50
50
  import { C as Client$I } from './targeting.d-DaK3kwZg.js';
51
51
  import { C as Client$J } from './template-variables.d-Ble9TSBa.js';
52
52
  import { C as Client$K } from './user.d-rqYtwsCz.js';
53
- import { C as Client$L } from './validation-rules.d-MvjG-zzw.js';
53
+ import { C as Client$L } from './validation-rules.d-CvGvBnMX.js';
54
54
  import { C as Client$M } from './webhooks.d-DqOEzFsp.js';
55
55
  import { C as Client$N } from './workflow.d-5cyNJgVQ.js';
56
56
  import { C as Client$O } from './workflow-definition.d-CweGhhBU.js';
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-N254AABZ.js";
4
4
  import {
5
5
  require_validation_rules_runtime
6
- } from "./chunk-PPX45U34.js";
6
+ } from "./chunk-7IKQIVUS.js";
7
7
  import {
8
8
  require_webhooks_runtime
9
9
  } from "./chunk-OV4MYZR5.js";
@@ -158,7 +158,7 @@ import {
158
158
  expand,
159
159
  help,
160
160
  openapi
161
- } from "./chunk-Z3EVGVBQ.js";
161
+ } from "./chunk-W636M2L3.js";
162
162
  import {
163
163
  __require
164
164
  } from "./chunk-YPSWSI3M.js";
@@ -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;
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_validation_rules_runtime
3
- } from "./chunk-PPX45U34.js";
3
+ } from "./chunk-7IKQIVUS.js";
4
4
  import "./chunk-YPSWSI3M.js";
5
5
  export default require_validation_rules_runtime();
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkHRSCAD3Wcjs = require('./chunk-HRSCAD3W.cjs');
3
+ var _chunkJIUTCNTBcjs = require('./chunk-JIUTCNTB.cjs');
4
4
  require('./chunk-NJK5F5TF.cjs');
5
- exports. default = _chunkHRSCAD3Wcjs.require_validation_rules_runtime.call(void 0, );
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
  */