@epilot/sdk 2.20.56 → 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.
- package/definitions/integration-toolkit.json +133 -16
- package/definitions/validation-rules-runtime.json +1 -1
- package/definitions/validation-rules.json +32 -18
- package/dist/apis/access-token.cjs +11 -7
- package/dist/apis/access-token.js +7 -3
- package/dist/apis/address-suggestions.cjs +11 -7
- package/dist/apis/address-suggestions.js +7 -3
- package/dist/apis/address.cjs +11 -7
- package/dist/apis/address.js +7 -3
- package/dist/apis/ai-agents.cjs +11 -7
- package/dist/apis/ai-agents.js +7 -3
- package/dist/apis/app.cjs +11 -7
- package/dist/apis/app.js +7 -3
- package/dist/apis/audit-logs.cjs +11 -7
- package/dist/apis/audit-logs.js +7 -3
- package/dist/apis/automation.cjs +11 -7
- package/dist/apis/automation.js +7 -3
- package/dist/apis/billing.cjs +11 -7
- package/dist/apis/billing.js +7 -3
- package/dist/apis/blueprint-manifest.cjs +11 -7
- package/dist/apis/blueprint-manifest.js +7 -3
- package/dist/apis/calendar.cjs +11 -7
- package/dist/apis/calendar.js +7 -3
- package/dist/apis/chat.cjs +11 -7
- package/dist/apis/chat.js +7 -3
- package/dist/apis/configuration-hub.cjs +11 -7
- package/dist/apis/configuration-hub.js +7 -3
- package/dist/apis/consent.cjs +11 -7
- package/dist/apis/consent.js +7 -3
- package/dist/apis/customer-portal.cjs +11 -7
- package/dist/apis/customer-portal.js +7 -3
- package/dist/apis/dashboard.cjs +11 -7
- package/dist/apis/dashboard.js +7 -3
- package/dist/apis/data-governance.cjs +11 -7
- package/dist/apis/data-governance.js +7 -3
- package/dist/apis/deduplication.cjs +11 -7
- package/dist/apis/deduplication.js +7 -3
- package/dist/apis/design.cjs +11 -7
- package/dist/apis/design.js +7 -3
- package/dist/apis/document.cjs +11 -7
- package/dist/apis/document.js +7 -3
- package/dist/apis/email-settings.cjs +11 -7
- package/dist/apis/email-settings.js +7 -3
- package/dist/apis/email-template.cjs +11 -7
- package/dist/apis/email-template.js +7 -3
- package/dist/apis/entity-mapping.cjs +11 -7
- package/dist/apis/entity-mapping.js +7 -3
- package/dist/apis/entity.cjs +11 -7
- package/dist/apis/entity.js +7 -3
- package/dist/apis/environments.cjs +11 -7
- package/dist/apis/environments.js +7 -3
- package/dist/apis/event-catalog.cjs +11 -7
- package/dist/apis/event-catalog.js +7 -3
- package/dist/apis/external-values.cjs +11 -7
- package/dist/apis/external-values.js +7 -3
- package/dist/apis/file.cjs +11 -7
- package/dist/apis/file.js +7 -3
- package/dist/apis/iban.cjs +11 -7
- package/dist/apis/iban.js +7 -3
- package/dist/apis/identity.cjs +11 -7
- package/dist/apis/identity.js +7 -3
- package/dist/apis/integration-toolkit.cjs +11 -7
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- package/dist/apis/integration-toolkit.js +7 -3
- package/dist/apis/journey.cjs +11 -7
- package/dist/apis/journey.js +7 -3
- package/dist/apis/kanban.cjs +11 -7
- package/dist/apis/kanban.js +7 -3
- package/dist/apis/message.cjs +11 -7
- package/dist/apis/message.js +7 -3
- package/dist/apis/metering.cjs +11 -7
- package/dist/apis/metering.js +7 -3
- package/dist/apis/notes.cjs +11 -7
- package/dist/apis/notes.js +7 -3
- package/dist/apis/notification.cjs +11 -7
- package/dist/apis/notification.js +7 -3
- package/dist/apis/organization.cjs +11 -7
- package/dist/apis/organization.js +7 -3
- package/dist/apis/partner-directory.cjs +11 -7
- package/dist/apis/partner-directory.js +7 -3
- package/dist/apis/permissions.cjs +11 -7
- package/dist/apis/permissions.js +7 -3
- package/dist/apis/phone-integration.cjs +11 -7
- package/dist/apis/phone-integration.js +7 -3
- package/dist/apis/pricing-tier.cjs +11 -7
- package/dist/apis/pricing-tier.js +7 -3
- package/dist/apis/pricing.cjs +11 -7
- package/dist/apis/pricing.js +7 -3
- package/dist/apis/purpose.cjs +11 -7
- package/dist/apis/purpose.js +7 -3
- package/dist/apis/query.cjs +11 -7
- package/dist/apis/query.js +7 -3
- package/dist/apis/sandbox.cjs +11 -7
- package/dist/apis/sandbox.js +7 -3
- package/dist/apis/sharing.cjs +11 -7
- package/dist/apis/sharing.js +7 -3
- package/dist/apis/snapshot.cjs +11 -7
- package/dist/apis/snapshot.js +7 -3
- package/dist/apis/submission.cjs +11 -7
- package/dist/apis/submission.js +7 -3
- package/dist/apis/target.cjs +11 -7
- package/dist/apis/target.js +7 -3
- package/dist/apis/targeting.cjs +11 -7
- package/dist/apis/targeting.js +7 -3
- package/dist/apis/template-variables.cjs +11 -7
- package/dist/apis/template-variables.js +7 -3
- package/dist/apis/user.cjs +11 -7
- package/dist/apis/user.js +7 -3
- package/dist/apis/validation-rules.cjs +12 -8
- package/dist/apis/validation-rules.d.cts +2 -2
- package/dist/apis/validation-rules.d.ts +2 -2
- package/dist/apis/validation-rules.js +8 -4
- package/dist/apis/webhooks.cjs +11 -7
- package/dist/apis/webhooks.js +7 -3
- package/dist/apis/workflow-definition.cjs +11 -7
- package/dist/apis/workflow-definition.js +7 -3
- package/dist/apis/workflow.cjs +11 -7
- package/dist/apis/workflow.js +7 -3
- package/dist/chunk-HRSCAD3W.cjs +14 -0
- package/dist/chunk-PPX45U34.js +14 -0
- package/dist/{chunk-GMONLMVN.cjs → chunk-S5K3TLPQ.cjs} +3 -3
- package/dist/{chunk-A73AZOKT.js → chunk-VAC7N66U.js} +3 -3
- package/dist/index.cjs +19 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -4
- package/dist/integration-toolkit-3J7KVCK7.cjs +7 -0
- package/dist/integration-toolkit-CV2AU2R7.js +7 -0
- package/dist/{integration-toolkit.d-CLlaZx6b.d.cts → integration-toolkit.d-DWslwG3c.d.cts} +71 -6
- package/dist/{integration-toolkit.d-CLlaZx6b.d.ts → integration-toolkit.d-DWslwG3c.d.ts} +71 -6
- package/dist/validation-rules-2XSKTPDC.js +7 -0
- package/dist/validation-rules-PHF3RPTN.cjs +7 -0
- package/dist/{validation-rules-runtime-X7M3QE5I.cjs → validation-rules-runtime-DENVKYLF.cjs} +2 -2
- package/dist/{validation-rules-runtime-6MRCS5X2.js → validation-rules-runtime-VGLVHV36.js} +1 -1
- package/dist/{validation-rules.d-Bbo90IYn.d.cts → validation-rules.d-ChX2VKqg.d.cts} +105 -48
- package/dist/{validation-rules.d-Bbo90IYn.d.ts → validation-rules.d-ChX2VKqg.d.ts} +105 -48
- package/docs/integration-toolkit.md +41 -7
- package/docs/validation-rules.md +301 -66
- package/package.json +1 -1
- package/dist/chunk-7IKQIVUS.js +0 -14
- package/dist/chunk-JIUTCNTB.cjs +0 -14
- package/dist/integration-toolkit-CG6SFVKC.cjs +0 -7
- package/dist/integration-toolkit-TLIEE3DY.js +0 -7
- package/dist/validation-rules-2JQLB6PH.cjs +0 -7
- package/dist/validation-rules-VQXUQSMC.js +0 -7
|
@@ -2990,8 +2990,23 @@ declare namespace Components {
|
|
|
2990
2990
|
* individual rows.
|
|
2991
2991
|
*
|
|
2992
2992
|
* `code` is the translation key and the other fields are its parameters — there is
|
|
2993
|
-
* deliberately no message to display. Each code appears at most once
|
|
2994
|
-
* everything it has to say aggregated
|
|
2993
|
+
* deliberately no message to display. Each code appears at most once (once per
|
|
2994
|
+
* `expected` for `VALUE_FORMAT_INVALID`), with everything it has to say aggregated
|
|
2995
|
+
* into that one entry.
|
|
2996
|
+
*
|
|
2997
|
+
* `VALUE_FORMAT_INVALID` — the mapping produces values in a format the entity schema
|
|
2998
|
+
* does not store; `expected` says which format, and `columns` names every column
|
|
2999
|
+
* (or, for a value built by an expression, the attribute) that holds one.
|
|
3000
|
+
*
|
|
3001
|
+
* `MAPPING_EXPRESSION_FAILED` (a warning) — a mapping expression failed for some rows,
|
|
3002
|
+
* including `$number()` on a value it cannot convert such as `12,50` or on a blank cell,
|
|
3003
|
+
* so importing anyway leaves those values out; `attributes` names the attribute it fills.
|
|
3004
|
+
*
|
|
3005
|
+
* `FROM_ROWS_EXPRESSION_FAILED` — an expression in a `conditional.from_rows` item failed
|
|
3006
|
+
* for some rows. Blocking, unlike a field: the import would skip every entry of that
|
|
3007
|
+
* target built in the same chunk, not one value; `attributes` names the list attribute.
|
|
3008
|
+
*
|
|
3009
|
+
* `lines` points at up to five file lines an issue was seen on, as examples.
|
|
2995
3010
|
*
|
|
2996
3011
|
* The conditional codes describe a file that cannot be written as variants:
|
|
2997
3012
|
*
|
|
@@ -3019,7 +3034,7 @@ declare namespace Components {
|
|
|
3019
3034
|
* Enum of possible issue codes.
|
|
3020
3035
|
*
|
|
3021
3036
|
*/
|
|
3022
|
-
code: "UNIQUE_ID_COLUMN_MISSING" | "MAPPED_COLUMN_MISSING" | "MALFORMED_ROW" | "INVALID_ENCODING" | "EMPTY_FILE" | "TOO_MANY_ROWS" | "BLANK_ROWS_SKIPPED" | "TIER_ROWS_NOT_GROUPED" | "TIER_BANDS_CONFLICT" | "CONDITION_VALUE_MISSING" | "VARIANT_VALUE_CONFLICT" | "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_NOT_IN_SCHEMA" | "IS_CONDITIONAL_NOT_CONSTANT" | "SCHEMA_NOT_CONDITIONABLE" | "SCHEMA_NOT_FOUND" | "SCHEMA_DECLARES_NO_CONDITIONS" | "GROUPING_KEY_NOT_A_COLUMN" | "GROUPING_KEY_IS_SORT_COLUMN" | "CONDITIONAL_TARGET_MODE_UNSUPPORTED";
|
|
3037
|
+
code: "UNIQUE_ID_COLUMN_MISSING" | "MAPPED_COLUMN_MISSING" | "MALFORMED_ROW" | "INVALID_ENCODING" | "EMPTY_FILE" | "TOO_MANY_ROWS" | "BLANK_ROWS_SKIPPED" | "TIER_ROWS_NOT_GROUPED" | "TIER_BANDS_CONFLICT" | "CONDITION_VALUE_MISSING" | "VARIANT_VALUE_CONFLICT" | "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_NOT_IN_SCHEMA" | "IS_CONDITIONAL_NOT_CONSTANT" | "SCHEMA_NOT_CONDITIONABLE" | "SCHEMA_NOT_FOUND" | "SCHEMA_DECLARES_NO_CONDITIONS" | "GROUPING_KEY_NOT_A_COLUMN" | "GROUPING_KEY_IS_SORT_COLUMN" | "CONDITIONAL_TARGET_MODE_UNSUPPORTED" | "VALUE_FORMAT_INVALID" | "MAPPING_EXPRESSION_FAILED" | "FROM_ROWS_EXPRESSION_FAILED";
|
|
3023
3038
|
severity: "warning" | "blocking";
|
|
3024
3039
|
/**
|
|
3025
3040
|
* The columns this issue is about, at most one entry per column per entity.
|
|
@@ -3035,14 +3050,33 @@ declare namespace Components {
|
|
|
3035
3050
|
*/
|
|
3036
3051
|
entity?: string;
|
|
3037
3052
|
}[];
|
|
3053
|
+
/**
|
|
3054
|
+
* The mapping fields this issue is about, where the value is not a file column as it is: an expression builds it, or the expression fails. VALUE_FORMAT_INVALID (beside `columns`, which holds the values taken from a column as they are), MAPPING_EXPRESSION_FAILED and FROM_ROWS_EXPRESSION_FAILED.
|
|
3055
|
+
*/
|
|
3056
|
+
attributes?: {
|
|
3057
|
+
/**
|
|
3058
|
+
* The attribute the mapping writes, like `unit_amount_decimal`.
|
|
3059
|
+
*/
|
|
3060
|
+
name: string;
|
|
3061
|
+
}[];
|
|
3062
|
+
/**
|
|
3063
|
+
* Up to five lines of the file this issue was seen on, as examples rather than the full list. The header is line 1. BLANK_ROWS_SKIPPED, VALUE_FORMAT_INVALID, MAPPING_EXPRESSION_FAILED, FROM_ROWS_EXPRESSION_FAILED, TIER_ROWS_NOT_GROUPED (where a variant's rows start again), TIER_BANDS_CONFLICT and VARIANT_VALUE_CONFLICT (the row at odds with the first).
|
|
3064
|
+
*/
|
|
3065
|
+
lines?: number[];
|
|
3038
3066
|
/**
|
|
3039
3067
|
* What the issue is about — an attribute, an entity type slug, or an "attribute reads column" pair — to substitute into the client's copy for the code. Independent of `columns`; a code can carry both.
|
|
3040
3068
|
*/
|
|
3041
3069
|
subject?: string;
|
|
3042
3070
|
/**
|
|
3043
|
-
* The offending
|
|
3071
|
+
* The offending row's line in the file, the header being line 1 — the number a spreadsheet or text editor shows, and the same numbering as `lines`. MALFORMED_ROW only.
|
|
3044
3072
|
*/
|
|
3045
3073
|
row?: number;
|
|
3074
|
+
/**
|
|
3075
|
+
* The format the values should have had. VALUE_FORMAT_INVALID only.
|
|
3076
|
+
* - `number` — a JSON number; the mapping produces text (wrap the column in `$number()`). - `text` — text; the mapping produces a number. - `decimal` — a plain number with a dot as text, like `12.50`. - `date` — a date like `2026-01-01`, optionally with a time and offset like
|
|
3077
|
+
* `2026-01-01T08:00:00Z`.
|
|
3078
|
+
*/
|
|
3079
|
+
expected?: "number" | "text" | "decimal" | "date";
|
|
3046
3080
|
}
|
|
3047
3081
|
export interface ErpImportJob {
|
|
3048
3082
|
/**
|
|
@@ -3158,8 +3192,23 @@ declare namespace Components {
|
|
|
3158
3192
|
* individual rows.
|
|
3159
3193
|
*
|
|
3160
3194
|
* `code` is the translation key and the other fields are its parameters — there is
|
|
3161
|
-
* deliberately no message to display. Each code appears at most once
|
|
3162
|
-
* everything it has to say aggregated
|
|
3195
|
+
* deliberately no message to display. Each code appears at most once (once per
|
|
3196
|
+
* `expected` for `VALUE_FORMAT_INVALID`), with everything it has to say aggregated
|
|
3197
|
+
* into that one entry.
|
|
3198
|
+
*
|
|
3199
|
+
* `VALUE_FORMAT_INVALID` — the mapping produces values in a format the entity schema
|
|
3200
|
+
* does not store; `expected` says which format, and `columns` names every column
|
|
3201
|
+
* (or, for a value built by an expression, the attribute) that holds one.
|
|
3202
|
+
*
|
|
3203
|
+
* `MAPPING_EXPRESSION_FAILED` (a warning) — a mapping expression failed for some rows,
|
|
3204
|
+
* including `$number()` on a value it cannot convert such as `12,50` or on a blank cell,
|
|
3205
|
+
* so importing anyway leaves those values out; `attributes` names the attribute it fills.
|
|
3206
|
+
*
|
|
3207
|
+
* `FROM_ROWS_EXPRESSION_FAILED` — an expression in a `conditional.from_rows` item failed
|
|
3208
|
+
* for some rows. Blocking, unlike a field: the import would skip every entry of that
|
|
3209
|
+
* target built in the same chunk, not one value; `attributes` names the list attribute.
|
|
3210
|
+
*
|
|
3211
|
+
* `lines` points at up to five file lines an issue was seen on, as examples.
|
|
3163
3212
|
*
|
|
3164
3213
|
* The conditional codes describe a file that cannot be written as variants:
|
|
3165
3214
|
*
|
|
@@ -8940,6 +8989,7 @@ declare namespace Paths {
|
|
|
8940
8989
|
export type $200 = Components.Responses.GetAssociatedMonitoringEventsResponse;
|
|
8941
8990
|
export type $400 = Components.Responses.BadRequest;
|
|
8942
8991
|
export type $401 = Components.Responses.Unauthorized;
|
|
8992
|
+
export type $403 = Components.Responses.Forbidden;
|
|
8943
8993
|
export type $500 = Components.Responses.InternalServerError;
|
|
8944
8994
|
}
|
|
8945
8995
|
}
|
|
@@ -9049,6 +9099,7 @@ declare namespace Paths {
|
|
|
9049
9099
|
export type $200 = Components.Responses.GetMonitoringStatsResponse;
|
|
9050
9100
|
export type $400 = Components.Responses.BadRequest;
|
|
9051
9101
|
export type $401 = Components.Responses.Unauthorized;
|
|
9102
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9052
9103
|
export type $404 = Components.Responses.NotFound;
|
|
9053
9104
|
export type $500 = Components.Responses.InternalServerError;
|
|
9054
9105
|
}
|
|
@@ -9065,6 +9116,7 @@ declare namespace Paths {
|
|
|
9065
9116
|
export type $200 = Components.Responses.GetMonitoringStatsV2Response;
|
|
9066
9117
|
export type $400 = Components.Responses.BadRequest;
|
|
9067
9118
|
export type $401 = Components.Responses.Unauthorized;
|
|
9119
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9068
9120
|
export type $404 = Components.Responses.NotFound;
|
|
9069
9121
|
export type $500 = Components.Responses.InternalServerError;
|
|
9070
9122
|
}
|
|
@@ -9081,6 +9133,7 @@ declare namespace Paths {
|
|
|
9081
9133
|
export type $200 = Components.Responses.GetMonitoringTimeSeriesResponse;
|
|
9082
9134
|
export type $400 = Components.Responses.BadRequest;
|
|
9083
9135
|
export type $401 = Components.Responses.Unauthorized;
|
|
9136
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9084
9137
|
export type $404 = Components.Responses.NotFound;
|
|
9085
9138
|
export type $500 = Components.Responses.InternalServerError;
|
|
9086
9139
|
}
|
|
@@ -9097,6 +9150,7 @@ declare namespace Paths {
|
|
|
9097
9150
|
export type $200 = Components.Responses.GetMonitoringTimeSeriesV2Response;
|
|
9098
9151
|
export type $400 = Components.Responses.BadRequest;
|
|
9099
9152
|
export type $401 = Components.Responses.Unauthorized;
|
|
9153
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9100
9154
|
export type $404 = Components.Responses.NotFound;
|
|
9101
9155
|
export type $500 = Components.Responses.InternalServerError;
|
|
9102
9156
|
}
|
|
@@ -9148,6 +9202,7 @@ declare namespace Paths {
|
|
|
9148
9202
|
namespace Responses {
|
|
9149
9203
|
export type $200 = Components.Schemas.OutboundStatusResponse;
|
|
9150
9204
|
export type $401 = Components.Responses.Unauthorized;
|
|
9205
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9151
9206
|
export type $404 = Components.Responses.NotFound;
|
|
9152
9207
|
export type $500 = Components.Responses.InternalServerError;
|
|
9153
9208
|
}
|
|
@@ -9501,6 +9556,7 @@ declare namespace Paths {
|
|
|
9501
9556
|
export type $200 = Components.Responses.QueryAccessLogsResponse;
|
|
9502
9557
|
export type $400 = Components.Responses.BadRequest;
|
|
9503
9558
|
export type $401 = Components.Responses.Unauthorized;
|
|
9559
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9504
9560
|
export type $404 = Components.Responses.NotFound;
|
|
9505
9561
|
export type $500 = Components.Responses.InternalServerError;
|
|
9506
9562
|
}
|
|
@@ -9533,6 +9589,7 @@ declare namespace Paths {
|
|
|
9533
9589
|
export type $200 = Components.Responses.QueryInboundMonitoringEventsResponse;
|
|
9534
9590
|
export type $400 = Components.Responses.BadRequest;
|
|
9535
9591
|
export type $401 = Components.Responses.Unauthorized;
|
|
9592
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9536
9593
|
export type $404 = Components.Responses.NotFound;
|
|
9537
9594
|
export type $500 = Components.Responses.InternalServerError;
|
|
9538
9595
|
}
|
|
@@ -9549,6 +9606,7 @@ declare namespace Paths {
|
|
|
9549
9606
|
export type $200 = Components.Responses.QueryMonitoringEventsV2Response;
|
|
9550
9607
|
export type $400 = Components.Responses.BadRequest;
|
|
9551
9608
|
export type $401 = Components.Responses.Unauthorized;
|
|
9609
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9552
9610
|
export type $404 = Components.Responses.NotFound;
|
|
9553
9611
|
export type $500 = Components.Responses.InternalServerError;
|
|
9554
9612
|
}
|
|
@@ -9565,6 +9623,7 @@ declare namespace Paths {
|
|
|
9565
9623
|
export type $200 = Components.Responses.QueryOutboundMonitoringEventsResponse;
|
|
9566
9624
|
export type $400 = Components.Responses.BadRequest;
|
|
9567
9625
|
export type $401 = Components.Responses.Unauthorized;
|
|
9626
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9568
9627
|
export type $404 = Components.Responses.NotFound;
|
|
9569
9628
|
export type $500 = Components.Responses.InternalServerError;
|
|
9570
9629
|
}
|
|
@@ -10602,6 +10661,9 @@ interface OperationMethods {
|
|
|
10602
10661
|
* Query monitoring events from the unified erp_monitoring_v2 table.
|
|
10603
10662
|
* Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
|
|
10604
10663
|
* Replaces the separate v1 inbound-events and outbound-events endpoints.
|
|
10664
|
+
* Requires the `integration:view` grant for the integration: event
|
|
10665
|
+
* details can carry customer data (a mapped poll message's delivered
|
|
10666
|
+
* payload, for example).
|
|
10605
10667
|
*
|
|
10606
10668
|
*/
|
|
10607
10669
|
'queryMonitoringEventsV2'(
|
|
@@ -11658,6 +11720,9 @@ interface PathsDictionary {
|
|
|
11658
11720
|
* Query monitoring events from the unified erp_monitoring_v2 table.
|
|
11659
11721
|
* Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
|
|
11660
11722
|
* Replaces the separate v1 inbound-events and outbound-events endpoints.
|
|
11723
|
+
* Requires the `integration:view` grant for the integration: event
|
|
11724
|
+
* details can carry customer data (a mapped poll message's delivered
|
|
11725
|
+
* payload, for example).
|
|
11661
11726
|
*
|
|
11662
11727
|
*/
|
|
11663
11728
|
'post'(
|
|
@@ -2990,8 +2990,23 @@ declare namespace Components {
|
|
|
2990
2990
|
* individual rows.
|
|
2991
2991
|
*
|
|
2992
2992
|
* `code` is the translation key and the other fields are its parameters — there is
|
|
2993
|
-
* deliberately no message to display. Each code appears at most once
|
|
2994
|
-
* everything it has to say aggregated
|
|
2993
|
+
* deliberately no message to display. Each code appears at most once (once per
|
|
2994
|
+
* `expected` for `VALUE_FORMAT_INVALID`), with everything it has to say aggregated
|
|
2995
|
+
* into that one entry.
|
|
2996
|
+
*
|
|
2997
|
+
* `VALUE_FORMAT_INVALID` — the mapping produces values in a format the entity schema
|
|
2998
|
+
* does not store; `expected` says which format, and `columns` names every column
|
|
2999
|
+
* (or, for a value built by an expression, the attribute) that holds one.
|
|
3000
|
+
*
|
|
3001
|
+
* `MAPPING_EXPRESSION_FAILED` (a warning) — a mapping expression failed for some rows,
|
|
3002
|
+
* including `$number()` on a value it cannot convert such as `12,50` or on a blank cell,
|
|
3003
|
+
* so importing anyway leaves those values out; `attributes` names the attribute it fills.
|
|
3004
|
+
*
|
|
3005
|
+
* `FROM_ROWS_EXPRESSION_FAILED` — an expression in a `conditional.from_rows` item failed
|
|
3006
|
+
* for some rows. Blocking, unlike a field: the import would skip every entry of that
|
|
3007
|
+
* target built in the same chunk, not one value; `attributes` names the list attribute.
|
|
3008
|
+
*
|
|
3009
|
+
* `lines` points at up to five file lines an issue was seen on, as examples.
|
|
2995
3010
|
*
|
|
2996
3011
|
* The conditional codes describe a file that cannot be written as variants:
|
|
2997
3012
|
*
|
|
@@ -3019,7 +3034,7 @@ declare namespace Components {
|
|
|
3019
3034
|
* Enum of possible issue codes.
|
|
3020
3035
|
*
|
|
3021
3036
|
*/
|
|
3022
|
-
code: "UNIQUE_ID_COLUMN_MISSING" | "MAPPED_COLUMN_MISSING" | "MALFORMED_ROW" | "INVALID_ENCODING" | "EMPTY_FILE" | "TOO_MANY_ROWS" | "BLANK_ROWS_SKIPPED" | "TIER_ROWS_NOT_GROUPED" | "TIER_BANDS_CONFLICT" | "CONDITION_VALUE_MISSING" | "VARIANT_VALUE_CONFLICT" | "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_NOT_IN_SCHEMA" | "IS_CONDITIONAL_NOT_CONSTANT" | "SCHEMA_NOT_CONDITIONABLE" | "SCHEMA_NOT_FOUND" | "SCHEMA_DECLARES_NO_CONDITIONS" | "GROUPING_KEY_NOT_A_COLUMN" | "GROUPING_KEY_IS_SORT_COLUMN" | "CONDITIONAL_TARGET_MODE_UNSUPPORTED";
|
|
3037
|
+
code: "UNIQUE_ID_COLUMN_MISSING" | "MAPPED_COLUMN_MISSING" | "MALFORMED_ROW" | "INVALID_ENCODING" | "EMPTY_FILE" | "TOO_MANY_ROWS" | "BLANK_ROWS_SKIPPED" | "TIER_ROWS_NOT_GROUPED" | "TIER_BANDS_CONFLICT" | "CONDITION_VALUE_MISSING" | "VARIANT_VALUE_CONFLICT" | "ATTRIBUTE_NOT_OVERRIDABLE" | "ATTRIBUTE_NOT_IN_SCHEMA" | "IS_CONDITIONAL_NOT_CONSTANT" | "SCHEMA_NOT_CONDITIONABLE" | "SCHEMA_NOT_FOUND" | "SCHEMA_DECLARES_NO_CONDITIONS" | "GROUPING_KEY_NOT_A_COLUMN" | "GROUPING_KEY_IS_SORT_COLUMN" | "CONDITIONAL_TARGET_MODE_UNSUPPORTED" | "VALUE_FORMAT_INVALID" | "MAPPING_EXPRESSION_FAILED" | "FROM_ROWS_EXPRESSION_FAILED";
|
|
3023
3038
|
severity: "warning" | "blocking";
|
|
3024
3039
|
/**
|
|
3025
3040
|
* The columns this issue is about, at most one entry per column per entity.
|
|
@@ -3035,14 +3050,33 @@ declare namespace Components {
|
|
|
3035
3050
|
*/
|
|
3036
3051
|
entity?: string;
|
|
3037
3052
|
}[];
|
|
3053
|
+
/**
|
|
3054
|
+
* The mapping fields this issue is about, where the value is not a file column as it is: an expression builds it, or the expression fails. VALUE_FORMAT_INVALID (beside `columns`, which holds the values taken from a column as they are), MAPPING_EXPRESSION_FAILED and FROM_ROWS_EXPRESSION_FAILED.
|
|
3055
|
+
*/
|
|
3056
|
+
attributes?: {
|
|
3057
|
+
/**
|
|
3058
|
+
* The attribute the mapping writes, like `unit_amount_decimal`.
|
|
3059
|
+
*/
|
|
3060
|
+
name: string;
|
|
3061
|
+
}[];
|
|
3062
|
+
/**
|
|
3063
|
+
* Up to five lines of the file this issue was seen on, as examples rather than the full list. The header is line 1. BLANK_ROWS_SKIPPED, VALUE_FORMAT_INVALID, MAPPING_EXPRESSION_FAILED, FROM_ROWS_EXPRESSION_FAILED, TIER_ROWS_NOT_GROUPED (where a variant's rows start again), TIER_BANDS_CONFLICT and VARIANT_VALUE_CONFLICT (the row at odds with the first).
|
|
3064
|
+
*/
|
|
3065
|
+
lines?: number[];
|
|
3038
3066
|
/**
|
|
3039
3067
|
* What the issue is about — an attribute, an entity type slug, or an "attribute reads column" pair — to substitute into the client's copy for the code. Independent of `columns`; a code can carry both.
|
|
3040
3068
|
*/
|
|
3041
3069
|
subject?: string;
|
|
3042
3070
|
/**
|
|
3043
|
-
* The offending
|
|
3071
|
+
* The offending row's line in the file, the header being line 1 — the number a spreadsheet or text editor shows, and the same numbering as `lines`. MALFORMED_ROW only.
|
|
3044
3072
|
*/
|
|
3045
3073
|
row?: number;
|
|
3074
|
+
/**
|
|
3075
|
+
* The format the values should have had. VALUE_FORMAT_INVALID only.
|
|
3076
|
+
* - `number` — a JSON number; the mapping produces text (wrap the column in `$number()`). - `text` — text; the mapping produces a number. - `decimal` — a plain number with a dot as text, like `12.50`. - `date` — a date like `2026-01-01`, optionally with a time and offset like
|
|
3077
|
+
* `2026-01-01T08:00:00Z`.
|
|
3078
|
+
*/
|
|
3079
|
+
expected?: "number" | "text" | "decimal" | "date";
|
|
3046
3080
|
}
|
|
3047
3081
|
export interface ErpImportJob {
|
|
3048
3082
|
/**
|
|
@@ -3158,8 +3192,23 @@ declare namespace Components {
|
|
|
3158
3192
|
* individual rows.
|
|
3159
3193
|
*
|
|
3160
3194
|
* `code` is the translation key and the other fields are its parameters — there is
|
|
3161
|
-
* deliberately no message to display. Each code appears at most once
|
|
3162
|
-
* everything it has to say aggregated
|
|
3195
|
+
* deliberately no message to display. Each code appears at most once (once per
|
|
3196
|
+
* `expected` for `VALUE_FORMAT_INVALID`), with everything it has to say aggregated
|
|
3197
|
+
* into that one entry.
|
|
3198
|
+
*
|
|
3199
|
+
* `VALUE_FORMAT_INVALID` — the mapping produces values in a format the entity schema
|
|
3200
|
+
* does not store; `expected` says which format, and `columns` names every column
|
|
3201
|
+
* (or, for a value built by an expression, the attribute) that holds one.
|
|
3202
|
+
*
|
|
3203
|
+
* `MAPPING_EXPRESSION_FAILED` (a warning) — a mapping expression failed for some rows,
|
|
3204
|
+
* including `$number()` on a value it cannot convert such as `12,50` or on a blank cell,
|
|
3205
|
+
* so importing anyway leaves those values out; `attributes` names the attribute it fills.
|
|
3206
|
+
*
|
|
3207
|
+
* `FROM_ROWS_EXPRESSION_FAILED` — an expression in a `conditional.from_rows` item failed
|
|
3208
|
+
* for some rows. Blocking, unlike a field: the import would skip every entry of that
|
|
3209
|
+
* target built in the same chunk, not one value; `attributes` names the list attribute.
|
|
3210
|
+
*
|
|
3211
|
+
* `lines` points at up to five file lines an issue was seen on, as examples.
|
|
3163
3212
|
*
|
|
3164
3213
|
* The conditional codes describe a file that cannot be written as variants:
|
|
3165
3214
|
*
|
|
@@ -8940,6 +8989,7 @@ declare namespace Paths {
|
|
|
8940
8989
|
export type $200 = Components.Responses.GetAssociatedMonitoringEventsResponse;
|
|
8941
8990
|
export type $400 = Components.Responses.BadRequest;
|
|
8942
8991
|
export type $401 = Components.Responses.Unauthorized;
|
|
8992
|
+
export type $403 = Components.Responses.Forbidden;
|
|
8943
8993
|
export type $500 = Components.Responses.InternalServerError;
|
|
8944
8994
|
}
|
|
8945
8995
|
}
|
|
@@ -9049,6 +9099,7 @@ declare namespace Paths {
|
|
|
9049
9099
|
export type $200 = Components.Responses.GetMonitoringStatsResponse;
|
|
9050
9100
|
export type $400 = Components.Responses.BadRequest;
|
|
9051
9101
|
export type $401 = Components.Responses.Unauthorized;
|
|
9102
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9052
9103
|
export type $404 = Components.Responses.NotFound;
|
|
9053
9104
|
export type $500 = Components.Responses.InternalServerError;
|
|
9054
9105
|
}
|
|
@@ -9065,6 +9116,7 @@ declare namespace Paths {
|
|
|
9065
9116
|
export type $200 = Components.Responses.GetMonitoringStatsV2Response;
|
|
9066
9117
|
export type $400 = Components.Responses.BadRequest;
|
|
9067
9118
|
export type $401 = Components.Responses.Unauthorized;
|
|
9119
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9068
9120
|
export type $404 = Components.Responses.NotFound;
|
|
9069
9121
|
export type $500 = Components.Responses.InternalServerError;
|
|
9070
9122
|
}
|
|
@@ -9081,6 +9133,7 @@ declare namespace Paths {
|
|
|
9081
9133
|
export type $200 = Components.Responses.GetMonitoringTimeSeriesResponse;
|
|
9082
9134
|
export type $400 = Components.Responses.BadRequest;
|
|
9083
9135
|
export type $401 = Components.Responses.Unauthorized;
|
|
9136
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9084
9137
|
export type $404 = Components.Responses.NotFound;
|
|
9085
9138
|
export type $500 = Components.Responses.InternalServerError;
|
|
9086
9139
|
}
|
|
@@ -9097,6 +9150,7 @@ declare namespace Paths {
|
|
|
9097
9150
|
export type $200 = Components.Responses.GetMonitoringTimeSeriesV2Response;
|
|
9098
9151
|
export type $400 = Components.Responses.BadRequest;
|
|
9099
9152
|
export type $401 = Components.Responses.Unauthorized;
|
|
9153
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9100
9154
|
export type $404 = Components.Responses.NotFound;
|
|
9101
9155
|
export type $500 = Components.Responses.InternalServerError;
|
|
9102
9156
|
}
|
|
@@ -9148,6 +9202,7 @@ declare namespace Paths {
|
|
|
9148
9202
|
namespace Responses {
|
|
9149
9203
|
export type $200 = Components.Schemas.OutboundStatusResponse;
|
|
9150
9204
|
export type $401 = Components.Responses.Unauthorized;
|
|
9205
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9151
9206
|
export type $404 = Components.Responses.NotFound;
|
|
9152
9207
|
export type $500 = Components.Responses.InternalServerError;
|
|
9153
9208
|
}
|
|
@@ -9501,6 +9556,7 @@ declare namespace Paths {
|
|
|
9501
9556
|
export type $200 = Components.Responses.QueryAccessLogsResponse;
|
|
9502
9557
|
export type $400 = Components.Responses.BadRequest;
|
|
9503
9558
|
export type $401 = Components.Responses.Unauthorized;
|
|
9559
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9504
9560
|
export type $404 = Components.Responses.NotFound;
|
|
9505
9561
|
export type $500 = Components.Responses.InternalServerError;
|
|
9506
9562
|
}
|
|
@@ -9533,6 +9589,7 @@ declare namespace Paths {
|
|
|
9533
9589
|
export type $200 = Components.Responses.QueryInboundMonitoringEventsResponse;
|
|
9534
9590
|
export type $400 = Components.Responses.BadRequest;
|
|
9535
9591
|
export type $401 = Components.Responses.Unauthorized;
|
|
9592
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9536
9593
|
export type $404 = Components.Responses.NotFound;
|
|
9537
9594
|
export type $500 = Components.Responses.InternalServerError;
|
|
9538
9595
|
}
|
|
@@ -9549,6 +9606,7 @@ declare namespace Paths {
|
|
|
9549
9606
|
export type $200 = Components.Responses.QueryMonitoringEventsV2Response;
|
|
9550
9607
|
export type $400 = Components.Responses.BadRequest;
|
|
9551
9608
|
export type $401 = Components.Responses.Unauthorized;
|
|
9609
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9552
9610
|
export type $404 = Components.Responses.NotFound;
|
|
9553
9611
|
export type $500 = Components.Responses.InternalServerError;
|
|
9554
9612
|
}
|
|
@@ -9565,6 +9623,7 @@ declare namespace Paths {
|
|
|
9565
9623
|
export type $200 = Components.Responses.QueryOutboundMonitoringEventsResponse;
|
|
9566
9624
|
export type $400 = Components.Responses.BadRequest;
|
|
9567
9625
|
export type $401 = Components.Responses.Unauthorized;
|
|
9626
|
+
export type $403 = Components.Responses.Forbidden;
|
|
9568
9627
|
export type $404 = Components.Responses.NotFound;
|
|
9569
9628
|
export type $500 = Components.Responses.InternalServerError;
|
|
9570
9629
|
}
|
|
@@ -10602,6 +10661,9 @@ interface OperationMethods {
|
|
|
10602
10661
|
* Query monitoring events from the unified erp_monitoring_v2 table.
|
|
10603
10662
|
* Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
|
|
10604
10663
|
* Replaces the separate v1 inbound-events and outbound-events endpoints.
|
|
10664
|
+
* Requires the `integration:view` grant for the integration: event
|
|
10665
|
+
* details can carry customer data (a mapped poll message's delivered
|
|
10666
|
+
* payload, for example).
|
|
10605
10667
|
*
|
|
10606
10668
|
*/
|
|
10607
10669
|
'queryMonitoringEventsV2'(
|
|
@@ -11658,6 +11720,9 @@ interface PathsDictionary {
|
|
|
11658
11720
|
* Query monitoring events from the unified erp_monitoring_v2 table.
|
|
11659
11721
|
* Returns all event types (inbound, outbound, file_proxy, etc.) in a single list.
|
|
11660
11722
|
* Replaces the separate v1 inbound-events and outbound-events endpoints.
|
|
11723
|
+
* Requires the `integration:view` grant for the integration: event
|
|
11724
|
+
* details can carry customer data (a mapped poll message's delivered
|
|
11725
|
+
* payload, for example).
|
|
11661
11726
|
*
|
|
11662
11727
|
*/
|
|
11663
11728
|
'post'(
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/validation-rules.json
|
|
4
|
+
var validation_rules_default = '# Validation Rules API\n\n- **Full API Docs:** [https://docs.epilot.io/api/validation-rules](https://docs.epilot.io/api/validation-rules)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.validationRules.getValidationRules(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/validation-rules\'\n\nconst validationRulesClient = getClient()\nauthorize(validationRulesClient, () => \'<token>\')\nconst { data } = await validationRulesClient.getValidationRules(...)\n```\n\n## Operations\n\n**Validation Rules**\n- [`getValidationRules`](#getvalidationrules)\n- [`createValidationRule`](#createvalidationrule)\n- [`getValidationRuleById`](#getvalidationrulebyid)\n- [`updateValidationRule`](#updatevalidationrule)\n- [`deleteValidationRule`](#deletevalidationrule)\n- [`addUsedByReference`](#addusedbyreference)\n- [`removeUsedByReference`](#removeusedbyreference)\n\n**Schemas**\n- [`GetValidationRulesResponse`](#getvalidationrulesresponse)\n- [`CreateValidationRuleRequest`](#createvalidationrulerequest)\n- [`UpdateValidationRuleRequest`](#updatevalidationrulerequest)\n- [`ValidationRuleBase`](#validationrulebase)\n- [`ValidationRule`](#validationrule)\n- [`UsedBy`](#usedby)\n- [`RegexRuleType`](#regexruletype)\n- [`PatternRuleType`](#patternruletype)\n- [`NumericRuleType`](#numericruletype)\n- [`RegexCondition`](#regexcondition)\n- [`RegexNestedCondition`](#regexnestedcondition)\n- [`RegexFactCondition`](#regexfactcondition)\n- [`PatternCondition`](#patterncondition)\n- [`PatternNestedCondition`](#patternnestedcondition)\n- [`PatternFactCondition`](#patternfactcondition)\n- [`NumericCondition`](#numericcondition)\n- [`NumericNestedCondition`](#numericnestedcondition)\n- [`NumericFactCondition`](#numericfactcondition)\n- [`ComparisonRuleType`](#comparisonruletype)\n- [`Condition`](#condition)\n- [`Operator`](#operator)\n- [`ConditionValue`](#conditionvalue)\n- [`ScalarValue`](#scalarvalue)\n- [`ValueReference`](#valuereference)\n- [`EnvironmentValue`](#environmentvalue)\n- [`ExternalValue`](#externalvalue)\n- [`StaticValue`](#staticvalue)\n- [`ContextValue`](#contextvalue)\n- [`ValueAdjustment`](#valueadjustment)\n- [`RelativeDateValue`](#relativedatevalue)\n- [`RangeValue`](#rangevalue)\n- [`NoValue`](#novalue)\n- [`DocumentRuleType`](#documentruletype)\n- [`DocumentCheck`](#documentcheck)\n- [`DocumentCondition`](#documentcondition)\n- [`DocumentOperator`](#documentoperator)\n- [`DocumentConditionValue`](#documentconditionvalue)\n- [`FileTypesValue`](#filetypesvalue)\n- [`CriteriaValue`](#criteriavalue)\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 input_type: "document"\n check: {\n level: { ... }\n }\n conditions: Array<{\n id: { ... }\n operator: { ... }\n value: { ... }\n error_message: { ... }\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 input_type: "document"\n check: {\n level: { ... }\n }\n conditions: Array<{\n id: { ... }\n operator: { ... }\n value: { ... }\n error_message: { ... }\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), relative-date and\nexternal (app-provided) comparison 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 key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\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 source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n // ...\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "relative_date"\n offset: number | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n} | {\n source: "environment"\n key: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n // ...\n}\n```\n\n### `ScalarValue`\n\nA single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value.\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "relative_date"\n offset: number | {\n source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n} | {\n source: "environment"\n key: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n // ...\n}\n```\n\n### `ValueReference`\n\nA value resolved at evaluation time instead of written into the rule, identified by\n`source`. Each field that accepts a reference lists the sources it allows; a rule using\nany other source is rejected when it is saved.\n\n\n```ts\ntype ValueReference = {\n source: "context"\n path: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "environment"\n key: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n} | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n}\n```\n\n### `EnvironmentValue`\n\nA comparison value resolved at evaluation time from an organisation environment variable\n(environments-api). The rule stores the key, never the value, so one change to the variable\nreaches every rule that references it and a blueprint install never overwrites the\norganisation\'s own value.\n\nOnly brow\n\n```ts\ntype EnvironmentValue = {\n source: "environment"\n key: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\n}\n```\n\n### `ExternalValue`\n\nA comparison value produced at evaluation time by an External Values hook of an installed\napp (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is\nresolved server-side by the external-values-api, which executes the hook\'s HTTP call with\nthe app\'s credentials and retur\n\n```ts\ntype ExternalValue = {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: "percent" | "absolute"\n value: number | {\n source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n direction: "increase" | "decrease"\n rounding?: "up" | "down"\n }\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\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 source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: 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 source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n }\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 source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\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 source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\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### `DocumentRuleType`\n\nDeclarative validation rule (schema version v2) for uploaded files. The rule declares how deep\nthe check goes (`check.level`) and the conditions the file must satisfy. Property conditions\n(file type, size, page count, image resolution, blank and password-protected detection) are\ndeterministic and av\n\n```ts\ntype DocumentRuleType = {\n input_type: "document"\n check: {\n level: "basic" | "standard" | "advanced"\n }\n conditions: Array<{\n id: string\n operator: "fileTypeIn" | "sizeBelow" | "pageCountBetween" | "resolutionAtLeast" | "resolutionAtMost" | "isNotBlank" | "isNotPasswordProtected" | "meetsCriteria"\n value: {\n source: { ... }\n data: { ... }\n } | {\n source: { ... }\n min: { ... }\n max: { ... }\n } | {\n source: { ... }\n } | {\n source: { ... }\n types: { ... }\n } | {\n source: { ... }\n text: { ... }\n }\n error_message: string\n allow_failure?: boolean\n }>\n}\n```\n\n### `DocumentCheck`\n\nHow deep the document check goes. Levels are cumulative.\n\n```ts\ntype DocumentCheck = {\n level: "basic" | "standard" | "advanced"\n}\n```\n\n### `DocumentCondition`\n\nA single check the uploaded file must satisfy.\n\n```ts\ntype DocumentCondition = {\n id: string\n operator: "fileTypeIn" | "sizeBelow" | "pageCountBetween" | "resolutionAtLeast" | "resolutionAtMost" | "isNotBlank" | "isNotPasswordProtected" | "meetsCriteria"\n value: {\n source: "static"\n data: number | string | boolean\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\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 source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n } | {\n source: "none"\n } | {\n source: "file_types"\n types: "image" | "pdf" | "document" | "spreadsheet"[]\n } | {\n source: "criteria"\n text: string\n }\n error_message: string\n allow_failure?: boolean\n}\n```\n\n### `DocumentOperator`\n\nPredefined document check. Value compatibility (enforced at write time):\n- fileTypeIn: `file_types` value listing the accepted file categories.\n- sizeBelow: static integer, maximum file size in bytes.\n- pageCountBetween: `range` of static non-negative integers (inclusive).\n- resolutionAtLeast / reso\n\n```ts\ntype DocumentOperator = "fileTypeIn" | "sizeBelow" | "pageCountBetween" | "resolutionAtLeast" | "resolutionAtMost" | "isNotBlank" | "isNotPasswordProtected" | "meetsCriteria"\n```\n\n### `DocumentConditionValue`\n\nThe value of a document condition - a static scalar, a range, nothing, accepted file categories, or a free-text criterion.\n\n```ts\ntype DocumentConditionValue = {\n source: "static"\n data: number | string | boolean\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 source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\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 source: { ... }\n path: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n key: { ... }\n adjust?: { ... }\n } | {\n source: { ... }\n app_id: { ... }\n hook_id: { ... }\n result_id: { ... }\n adjust?: { ... }\n }\n unit: "days" | "months" | "years"\n anchor?: "today"\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n // ...\n}\n```\n\n### `FileTypesValue`\n\nAccepted file categories; each category expands to a mime list at check time.\n\n```ts\ntype FileTypesValue = {\n source: "file_types"\n types: "image" | "pdf" | "document" | "spreadsheet"[]\n}\n```\n\n### `CriteriaValue`\n\nA free-text requirement judged against the document\'s extracted content, e.g. "The photo shows\nan electricity meter with the meter number and the current reading fully legible." One requirement\nper condition keeps results specific and lets each requirement be graded separately.\n\n\n```ts\ntype CriteriaValue = {\n source: "criteria"\n text: string\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 source: "context"\n path: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "environment"\n key: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n } | {\n source: "external"\n app_id: string\n hook_id: string\n result_id: string\n adjust?: {\n type: { ... }\n value: { ... }\n direction: { ... }\n rounding?: { ... }\n }\n }\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
|
+
};
|