@epilot/sdk 2.20.57 → 2.20.58

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 (136) hide show
  1. package/definitions/validation-rules-runtime.json +1 -1
  2. package/definitions/validation-rules.json +32 -18
  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/chat.cjs +6 -6
  24. package/dist/apis/chat.js +1 -1
  25. package/dist/apis/configuration-hub.cjs +6 -6
  26. package/dist/apis/configuration-hub.js +1 -1
  27. package/dist/apis/consent.cjs +6 -6
  28. package/dist/apis/consent.js +1 -1
  29. package/dist/apis/customer-portal.cjs +6 -6
  30. package/dist/apis/customer-portal.js +1 -1
  31. package/dist/apis/dashboard.cjs +6 -6
  32. package/dist/apis/dashboard.js +1 -1
  33. package/dist/apis/data-governance.cjs +6 -6
  34. package/dist/apis/data-governance.js +1 -1
  35. package/dist/apis/deduplication.cjs +6 -6
  36. package/dist/apis/deduplication.js +1 -1
  37. package/dist/apis/design.cjs +6 -6
  38. package/dist/apis/design.js +1 -1
  39. package/dist/apis/document.cjs +6 -6
  40. package/dist/apis/document.js +1 -1
  41. package/dist/apis/email-settings.cjs +6 -6
  42. package/dist/apis/email-settings.js +1 -1
  43. package/dist/apis/email-template.cjs +6 -6
  44. package/dist/apis/email-template.js +1 -1
  45. package/dist/apis/entity-mapping.cjs +6 -6
  46. package/dist/apis/entity-mapping.js +1 -1
  47. package/dist/apis/entity.cjs +6 -6
  48. package/dist/apis/entity.js +1 -1
  49. package/dist/apis/environments.cjs +6 -6
  50. package/dist/apis/environments.js +1 -1
  51. package/dist/apis/event-catalog.cjs +6 -6
  52. package/dist/apis/event-catalog.js +1 -1
  53. package/dist/apis/external-values.cjs +6 -6
  54. package/dist/apis/external-values.js +1 -1
  55. package/dist/apis/file.cjs +6 -6
  56. package/dist/apis/file.js +1 -1
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/identity.cjs +6 -6
  60. package/dist/apis/identity.js +1 -1
  61. package/dist/apis/integration-toolkit.cjs +6 -6
  62. package/dist/apis/integration-toolkit.js +1 -1
  63. package/dist/apis/journey.cjs +6 -6
  64. package/dist/apis/journey.js +1 -1
  65. package/dist/apis/kanban.cjs +6 -6
  66. package/dist/apis/kanban.js +1 -1
  67. package/dist/apis/message.cjs +6 -6
  68. package/dist/apis/message.js +1 -1
  69. package/dist/apis/metering.cjs +6 -6
  70. package/dist/apis/metering.js +1 -1
  71. package/dist/apis/notes.cjs +6 -6
  72. package/dist/apis/notes.js +1 -1
  73. package/dist/apis/notification.cjs +6 -6
  74. package/dist/apis/notification.js +1 -1
  75. package/dist/apis/organization.cjs +6 -6
  76. package/dist/apis/organization.js +1 -1
  77. package/dist/apis/partner-directory.cjs +6 -6
  78. package/dist/apis/partner-directory.js +1 -1
  79. package/dist/apis/permissions.cjs +6 -6
  80. package/dist/apis/permissions.js +1 -1
  81. package/dist/apis/phone-integration.cjs +6 -6
  82. package/dist/apis/phone-integration.js +1 -1
  83. package/dist/apis/pricing-tier.cjs +6 -6
  84. package/dist/apis/pricing-tier.js +1 -1
  85. package/dist/apis/pricing.cjs +6 -6
  86. package/dist/apis/pricing.js +1 -1
  87. package/dist/apis/purpose.cjs +6 -6
  88. package/dist/apis/purpose.js +1 -1
  89. package/dist/apis/query.cjs +6 -6
  90. package/dist/apis/query.js +1 -1
  91. package/dist/apis/sandbox.cjs +6 -6
  92. package/dist/apis/sandbox.js +1 -1
  93. package/dist/apis/sharing.cjs +6 -6
  94. package/dist/apis/sharing.js +1 -1
  95. package/dist/apis/snapshot.cjs +6 -6
  96. package/dist/apis/snapshot.js +1 -1
  97. package/dist/apis/submission.cjs +6 -6
  98. package/dist/apis/submission.js +1 -1
  99. package/dist/apis/target.cjs +6 -6
  100. package/dist/apis/target.js +1 -1
  101. package/dist/apis/targeting.cjs +6 -6
  102. package/dist/apis/targeting.js +1 -1
  103. package/dist/apis/template-variables.cjs +6 -6
  104. package/dist/apis/template-variables.js +1 -1
  105. package/dist/apis/user.cjs +6 -6
  106. package/dist/apis/user.js +1 -1
  107. package/dist/apis/validation-rules.cjs +8 -8
  108. package/dist/apis/validation-rules.d.cts +2 -2
  109. package/dist/apis/validation-rules.d.ts +2 -2
  110. package/dist/apis/validation-rules.js +2 -2
  111. package/dist/apis/webhooks.cjs +6 -6
  112. package/dist/apis/webhooks.js +1 -1
  113. package/dist/apis/workflow-definition.cjs +6 -6
  114. package/dist/apis/workflow-definition.js +1 -1
  115. package/dist/apis/workflow.cjs +6 -6
  116. package/dist/apis/workflow.js +1 -1
  117. package/dist/chunk-HRSCAD3W.cjs +14 -0
  118. package/dist/chunk-PPX45U34.js +14 -0
  119. package/dist/{chunk-IPYKWRRK.cjs → chunk-S5K3TLPQ.cjs} +2 -2
  120. package/dist/{chunk-7G7ZIF7P.js → chunk-VAC7N66U.js} +2 -2
  121. package/dist/index.cjs +10 -10
  122. package/dist/index.d.cts +1 -1
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.js +2 -2
  125. package/dist/validation-rules-2XSKTPDC.js +7 -0
  126. package/dist/validation-rules-PHF3RPTN.cjs +7 -0
  127. package/dist/{validation-rules-runtime-X7M3QE5I.cjs → validation-rules-runtime-DENVKYLF.cjs} +2 -2
  128. package/dist/{validation-rules-runtime-6MRCS5X2.js → validation-rules-runtime-VGLVHV36.js} +1 -1
  129. package/dist/{validation-rules.d-Bbo90IYn.d.cts → validation-rules.d-ChX2VKqg.d.cts} +105 -48
  130. package/dist/{validation-rules.d-Bbo90IYn.d.ts → validation-rules.d-ChX2VKqg.d.ts} +105 -48
  131. package/docs/validation-rules.md +301 -66
  132. package/package.json +1 -1
  133. package/dist/chunk-7IKQIVUS.js +0 -14
  134. package/dist/chunk-JIUTCNTB.cjs +0 -14
  135. package/dist/validation-rules-2JQLB6PH.cjs +0 -7
  136. package/dist/validation-rules-VQXUQSMC.js +0 -7
@@ -24,31 +24,28 @@ declare namespace Components {
24
24
  */
25
25
  operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty";
26
26
  /**
27
- * Comparison value for binary operators: a static number, string or boolean, or an
28
- * organisation environment variable (`Number`, `Text` or `Boolean`) so a precondition
29
- * can act as a per-organisation switch or threshold.
27
+ * Comparison value for binary operators: a static number, string or boolean, or a
28
+ * reference resolved at evaluation time. Accepted reference source: `environment` (a
29
+ * `Number`, `Text` or `Boolean` organisation environment variable), so a precondition
30
+ * can act as a per-organisation switch or threshold. Any other source is rejected at
31
+ * write time, and the reference must not carry an `adjust`.
30
32
  *
31
33
  */
32
34
  value?: /**
33
- * Comparison value for binary operators: a static number, string or boolean, or an
34
- * organisation environment variable (`Number`, `Text` or `Boolean`) so a precondition
35
- * can act as a per-organisation switch or threshold.
35
+ * Comparison value for binary operators: a static number, string or boolean, or a
36
+ * reference resolved at evaluation time. Accepted reference source: `environment` (a
37
+ * `Number`, `Text` or `Boolean` organisation environment variable), so a precondition
38
+ * can act as a per-organisation switch or threshold. Any other source is rejected at
39
+ * write time, and the reference must not carry an `adjust`.
36
40
  *
37
41
  */
38
42
  number | string | boolean | /**
39
- * A comparison value resolved at evaluation time from an organisation environment variable
40
- * (environments-api). The rule stores the key, never the value, so one change to the variable
41
- * reaches every rule that references it and a blueprint install never overwrites the
42
- * organisation's own value.
43
- *
44
- * Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
45
- * text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
46
- * `String` and `SecretString` variables are rejected at write time. Write-time validation also
47
- * checks that the variable exists in the organisation; a variable that exists without a value
48
- * (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
43
+ * A value resolved at evaluation time instead of written into the rule, identified by
44
+ * `source`. Each field that accepts a reference lists the sources it allows; a rule using
45
+ * any other source is rejected when it is saved.
49
46
  *
50
47
  */
51
- EnvironmentValue;
48
+ ValueReference;
52
49
  }
53
50
  /**
54
51
  * Declarative validation rule (schema version v2). Supports predefined comparison operators
@@ -133,8 +130,9 @@ declare namespace Components {
133
130
  * reaches every rule that references it and a blueprint install never overwrites the
134
131
  * organisation's own value.
135
132
  *
136
- * Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
137
- * text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
133
+ * Only browser-safe variable types are allowed: `Number` for numeric comparisons, adjustment
134
+ * amounts and relative-date offsets, `Text` for text comparisons and for dates (ISO 8601
135
+ * string), `Boolean` for `applies_when` values.
138
136
  * `String` and `SecretString` variables are rejected at write time. Write-time validation also
139
137
  * checks that the variable exists in the organisation; a variable that exists without a value
140
138
  * (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
@@ -354,8 +352,9 @@ declare namespace Components {
354
352
  * reaches every rule that references it and a blueprint install never overwrites the
355
353
  * organisation's own value.
356
354
  *
357
- * Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
358
- * text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
355
+ * Only browser-safe variable types are allowed: `Number` for numeric comparisons, adjustment
356
+ * amounts and relative-date offsets, `Text` for text comparisons and for dates (ISO 8601
357
+ * string), `Boolean` for `applies_when` values.
359
358
  * `String` and `SecretString` variables are rejected at write time. Write-time validation also
360
359
  * checks that the variable exists in the organisation; a variable that exists without a value
361
360
  * (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
@@ -812,8 +811,27 @@ declare namespace Components {
812
811
  source: "relative_date";
813
812
  /**
814
813
  * Offset from the anchor. Negative values are in the past, positive in the future, 0 is the anchor itself.
814
+ * Either a fixed whole number, or a reference resolved at evaluation time. Accepted reference source:
815
+ * `environment` (a `Number` organisation environment variable). Any other source is rejected at write
816
+ * time, and the reference must not carry an `adjust`. If the referenced value is missing or is not a
817
+ * whole number within ±36500, the comparison is unresolved.
818
+ *
819
+ */
820
+ offset: /**
821
+ * Offset from the anchor. Negative values are in the past, positive in the future, 0 is the anchor itself.
822
+ * Either a fixed whole number, or a reference resolved at evaluation time. Accepted reference source:
823
+ * `environment` (a `Number` organisation environment variable). Any other source is rejected at write
824
+ * time, and the reference must not carry an `adjust`. If the referenced value is missing or is not a
825
+ * whole number within ±36500, the comparison is unresolved.
826
+ *
827
+ */
828
+ number | /**
829
+ * A value resolved at evaluation time instead of written into the rule, identified by
830
+ * `source`. Each field that accepts a reference lists the sources it allows; a rule using
831
+ * any other source is rejected when it is saved.
832
+ *
815
833
  */
816
- offset: number;
834
+ ValueReference;
817
835
  unit: "days" | "months" | "years";
818
836
  anchor?: "today";
819
837
  }
@@ -832,8 +850,9 @@ declare namespace Components {
832
850
  * reaches every rule that references it and a blueprint install never overwrites the
833
851
  * organisation's own value.
834
852
  *
835
- * Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
836
- * text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
853
+ * Only browser-safe variable types are allowed: `Number` for numeric comparisons, adjustment
854
+ * amounts and relative-date offsets, `Text` for text comparisons and for dates (ISO 8601
855
+ * string), `Boolean` for `applies_when` values.
837
856
  * `String` and `SecretString` variables are rejected at write time. Write-time validation also
838
857
  * checks that the variable exists in the organisation; a variable that exists without a value
839
858
  * (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
@@ -1101,37 +1120,28 @@ declare namespace Components {
1101
1120
  export interface ValueAdjustment {
1102
1121
  type: "percent" | "absolute";
1103
1122
  /**
1104
- * The adjustment amount - a fixed number, or a context path resolving to a number
1105
- * (e.g. a per-contract percentage limit). Contextual adjustment values must not
1106
- * carry a nested adjustment.
1123
+ * The adjustment amount - a fixed non-negative number, or a reference resolving to a
1124
+ * number at evaluation time. Accepted reference sources: `context` (e.g. a per-contract
1125
+ * percentage limit) and `environment` (a `Number` organisation environment variable).
1126
+ * Any other source is rejected at write time, and the reference must not carry its own
1127
+ * `adjust`.
1107
1128
  *
1108
1129
  */
1109
1130
  value: /**
1110
- * The adjustment amount - a fixed number, or a context path resolving to a number
1111
- * (e.g. a per-contract percentage limit). Contextual adjustment values must not
1112
- * carry a nested adjustment.
1131
+ * The adjustment amount - a fixed non-negative number, or a reference resolving to a
1132
+ * number at evaluation time. Accepted reference sources: `context` (e.g. a per-contract
1133
+ * percentage limit) and `environment` (a `Number` organisation environment variable).
1134
+ * Any other source is rejected at write time, and the reference must not carry its own
1135
+ * `adjust`.
1113
1136
  *
1114
1137
  */
1115
1138
  number | /**
1116
- * A dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`
1117
- * or `previous_reading.value`. The first path segment must match the `name` of a declared
1118
- * context requirement.
1119
- *
1120
- */
1121
- ContextValue | /**
1122
- * A comparison value resolved at evaluation time from an organisation environment variable
1123
- * (environments-api). The rule stores the key, never the value, so one change to the variable
1124
- * reaches every rule that references it and a blueprint install never overwrites the
1125
- * organisation's own value.
1126
- *
1127
- * Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
1128
- * text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
1129
- * `String` and `SecretString` variables are rejected at write time. Write-time validation also
1130
- * checks that the variable exists in the organisation; a variable that exists without a value
1131
- * (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
1139
+ * A value resolved at evaluation time instead of written into the rule, identified by
1140
+ * `source`. Each field that accepts a reference lists the sources it allows; a rule using
1141
+ * any other source is rejected when it is saved.
1132
1142
  *
1133
1143
  */
1134
- EnvironmentValue;
1144
+ ValueReference;
1135
1145
  direction: "increase" | "decrease";
1136
1146
  /**
1137
1147
  * Rounds the adjusted result to a whole number - `up` (ceiling) or `down` (floor).
@@ -1140,6 +1150,52 @@ declare namespace Components {
1140
1150
  */
1141
1151
  rounding?: "up" | "down";
1142
1152
  }
1153
+ /**
1154
+ * A value resolved at evaluation time instead of written into the rule, identified by
1155
+ * `source`. Each field that accepts a reference lists the sources it allows; a rule using
1156
+ * any other source is rejected when it is saved.
1157
+ *
1158
+ */
1159
+ export type ValueReference = /**
1160
+ * A value resolved at evaluation time instead of written into the rule, identified by
1161
+ * `source`. Each field that accepts a reference lists the sources it allows; a rule using
1162
+ * any other source is rejected when it is saved.
1163
+ *
1164
+ */
1165
+ /**
1166
+ * A dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`
1167
+ * or `previous_reading.value`. The first path segment must match the `name` of a declared
1168
+ * context requirement.
1169
+ *
1170
+ */
1171
+ ContextValue | /**
1172
+ * A comparison value resolved at evaluation time from an organisation environment variable
1173
+ * (environments-api). The rule stores the key, never the value, so one change to the variable
1174
+ * reaches every rule that references it and a blueprint install never overwrites the
1175
+ * organisation's own value.
1176
+ *
1177
+ * Only browser-safe variable types are allowed: `Number` for numeric comparisons, adjustment
1178
+ * amounts and relative-date offsets, `Text` for text comparisons and for dates (ISO 8601
1179
+ * string), `Boolean` for `applies_when` values.
1180
+ * `String` and `SecretString` variables are rejected at write time. Write-time validation also
1181
+ * checks that the variable exists in the organisation; a variable that exists without a value
1182
+ * (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
1183
+ *
1184
+ */
1185
+ EnvironmentValue | /**
1186
+ * A comparison value produced at evaluation time by an External Values hook of an installed
1187
+ * app (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is
1188
+ * resolved server-side by the external-values-api, which executes the hook's HTTP call with
1189
+ * the app's credentials and returns the typed result identified by `result_id`.
1190
+ *
1191
+ * Write-time validation checks that the app is installed in the organisation, that the hook
1192
+ * and result exist, and that the result's type is compatible with the compared kind
1193
+ * (`number` results for numeric comparisons, `text` for text, `date` for date). External values
1194
+ * are resolved only for authenticated consumers (epilot 360 users and portal end customers);
1195
+ * in public journeys the dependent conditions are skipped.
1196
+ *
1197
+ */
1198
+ ExternalValue;
1143
1199
  }
1144
1200
  }
1145
1201
  declare namespace Paths {
@@ -1664,5 +1720,6 @@ type UsedBy = Components.Schemas.UsedBy;
1664
1720
  type ValidationRule = Components.Schemas.ValidationRule;
1665
1721
  type ValidationRuleBase = Components.Schemas.ValidationRuleBase;
1666
1722
  type ValueAdjustment = Components.Schemas.ValueAdjustment;
1723
+ type ValueReference = Components.Schemas.ValueReference;
1667
1724
 
1668
- export { type AppliesWhen as A, type RegexRuleType as B, type Client as C, type DocumentCheck as D, type EnvironmentValue as E, type FileTypesValue as F, type GetValidationRulesResponse as G, type RelativeDateValue as H, type StaticValue as I, type UsedBy as J, type ValidationRuleBase as K, type ValueAdjustment as L, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type CriteriaValue as i, type DocumentCondition as j, type DocumentConditionValue as k, type DocumentOperator as l, type DocumentRuleType as m, type ExternalValue as n, type NumericCondition as o, type NumericFactCondition as p, type NumericNestedCondition as q, type NumericRuleType as r, type Operator as s, type PatternCondition as t, type PatternFactCondition as u, type PatternNestedCondition as v, type PatternRuleType as w, type RegexCondition as x, type RegexFactCondition as y, type RegexNestedCondition as z };
1725
+ export { type AppliesWhen as A, type RegexRuleType as B, type Client as C, type DocumentCheck as D, type EnvironmentValue as E, type FileTypesValue as F, type GetValidationRulesResponse as G, type RelativeDateValue as H, type StaticValue as I, type UsedBy as J, type ValidationRuleBase as K, type ValueAdjustment as L, type ValueReference as M, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type CriteriaValue as i, type DocumentCondition as j, type DocumentConditionValue as k, type DocumentOperator as l, type DocumentRuleType as m, type ExternalValue as n, type NumericCondition as o, type NumericFactCondition as p, type NumericNestedCondition as q, type NumericRuleType as r, type Operator as s, type PatternCondition as t, type PatternFactCondition as u, type PatternNestedCondition as v, type PatternRuleType as w, type RegexCondition as x, type RegexFactCondition as y, type RegexNestedCondition as z };