@epilot/sdk 2.19.13 → 2.20.1
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/app-runtime.json +1 -1
- package/definitions/app.json +251 -4
- package/definitions/journey-runtime.json +1 -1
- package/definitions/journey.json +346 -26
- package/definitions/validation-rules.json +104 -5
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +8 -8
- package/dist/apis/app.d.cts +2 -2
- package/dist/apis/app.d.ts +2 -2
- package/dist/apis/app.js +2 -2
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +8 -8
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +2 -2
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.d.cts +2 -2
- package/dist/apis/validation-rules.d.ts +2 -2
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/app-E75NP2YE.js +7 -0
- package/dist/app-EI2PFRBV.cjs +7 -0
- package/dist/{app-runtime-T63JMR4T.js → app-runtime-ISNZMZHF.js} +1 -1
- package/dist/app-runtime-VC7HGAX3.cjs +5 -0
- package/dist/{app.d-BiknhSJo.d.cts → app.d-BHpFAvPW.d.cts} +197 -17
- package/dist/{app.d-BiknhSJo.d.ts → app.d-BHpFAvPW.d.ts} +197 -17
- package/dist/chunk-HP7PHGTJ.js +14 -0
- package/dist/{chunk-YZ2YWRG7.cjs → chunk-L7RZB4SO.cjs} +5 -5
- package/dist/{chunk-HS4W3GY7.js → chunk-LWW6JFX2.js} +5 -5
- package/dist/{chunk-HPSTDQ62.cjs → chunk-N2P6RELZ.cjs} +1 -1
- package/dist/{chunk-4MILKZOO.js → chunk-QHWCHWQT.js} +1 -1
- package/dist/chunk-T5KE6FXF.cjs +14 -0
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/journey-JS7SZKNJ.js +7 -0
- package/dist/journey-N7HRM2JJ.cjs +7 -0
- package/dist/{journey-runtime-G2O5C3N2.cjs → journey-runtime-JICGEAMK.cjs} +2 -2
- package/dist/{journey-runtime-RI2LJO5S.js → journey-runtime-WGTU2NGN.js} +1 -1
- package/dist/{journey.d-B1sOeMHw.d.ts → journey.d-B0Ju_TOw.d.cts} +778 -37
- package/dist/{journey.d-B1sOeMHw.d.cts → journey.d-B0Ju_TOw.d.ts} +778 -37
- package/dist/validation-rules-ETOO45CW.js +7 -0
- package/dist/validation-rules-MZZ7YMJM.cjs +7 -0
- package/dist/{validation-rules.d-CvGvBnMX.d.ts → validation-rules.d-D8X9MYTc.d.cts} +171 -20
- package/dist/{validation-rules.d-CvGvBnMX.d.cts → validation-rules.d-D8X9MYTc.d.ts} +171 -20
- package/docs/app.md +188 -12
- package/docs/journey.md +296 -100
- package/docs/validation-rules.md +277 -20
- package/package.json +1 -1
- package/dist/app-SJ7ITIY6.cjs +0 -7
- package/dist/app-WUPPTHZA.js +0 -7
- package/dist/app-runtime-2MEGUF3G.cjs +0 -5
- package/dist/chunk-JOUTFBLN.js +0 -14
- package/dist/chunk-LAWKCWVU.cjs +0 -14
- package/dist/journey-LHVSSVTG.cjs +0 -7
- package/dist/journey-NXL264XW.js +0 -7
- package/dist/validation-rules-B2KQKMLO.js +0 -7
- package/dist/validation-rules-GR2IVLGJ.cjs +0 -7
|
@@ -24,14 +24,36 @@ declare namespace Components {
|
|
|
24
24
|
*/
|
|
25
25
|
operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty";
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
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.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
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.
|
|
36
|
+
*
|
|
28
37
|
*/
|
|
29
|
-
|
|
38
|
+
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.
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
EnvironmentValue;
|
|
30
52
|
}
|
|
31
53
|
/**
|
|
32
54
|
* Declarative validation rule (schema version v2). Supports predefined comparison operators
|
|
33
|
-
* over number, date and text inputs, with static, dynamic (context path)
|
|
34
|
-
* comparison values.
|
|
55
|
+
* over number, date and text inputs, with static, dynamic (context path), relative-date and
|
|
56
|
+
* external (app-provided) comparison values.
|
|
35
57
|
*
|
|
36
58
|
*/
|
|
37
59
|
export interface ComparisonRuleType {
|
|
@@ -105,7 +127,33 @@ declare namespace Components {
|
|
|
105
127
|
* context requirement.
|
|
106
128
|
*
|
|
107
129
|
*/
|
|
108
|
-
ContextValue | /* A date relative to the evaluation moment, e.g. "today minus 30 days". Only valid for date rules. */ RelativeDateValue |
|
|
130
|
+
ContextValue | /* A date relative to the evaluation moment, e.g. "today minus 30 days". Only valid for date rules. */ RelativeDateValue | /**
|
|
131
|
+
* A comparison value resolved at evaluation time from an organisation environment variable
|
|
132
|
+
* (environments-api). The rule stores the key, never the value, so one change to the variable
|
|
133
|
+
* reaches every rule that references it and a blueprint install never overwrites the
|
|
134
|
+
* organisation's own value.
|
|
135
|
+
*
|
|
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.
|
|
138
|
+
* `String` and `SecretString` variables are rejected at write time. Write-time validation also
|
|
139
|
+
* checks that the variable exists in the organisation; a variable that exists without a value
|
|
140
|
+
* (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
EnvironmentValue | /**
|
|
144
|
+
* A comparison value produced at evaluation time by an External Values hook of an installed
|
|
145
|
+
* app (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is
|
|
146
|
+
* resolved server-side by the external-values-api, which executes the hook's HTTP call with
|
|
147
|
+
* the app's credentials and returns the typed result identified by `result_id`.
|
|
148
|
+
*
|
|
149
|
+
* Write-time validation checks that the app is installed in the organisation, that the hook
|
|
150
|
+
* and result exist, and that the result's type is compatible with the compared kind
|
|
151
|
+
* (`number` results for numeric comparisons, `text` for text, `date` for date). External values
|
|
152
|
+
* are resolved only for authenticated consumers (epilot 360 users and portal end customers);
|
|
153
|
+
* in public journeys the dependent conditions are skipped.
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
ExternalValue | /* A lower and upper bound for range operators (between, dateBetween, lengthBetween). Bounds are inclusive. */ RangeValue | /* No comparison value - used by unary operators such as notInFuture / notInPast. */ NoValue;
|
|
109
157
|
/**
|
|
110
158
|
* An entity context source the rule needs at evaluation time, referenced by `context`
|
|
111
159
|
* value paths via the schema slug as their first segment (e.g. `contract.installment_amount`).
|
|
@@ -164,8 +212,8 @@ declare namespace Components {
|
|
|
164
212
|
UsedBy[];
|
|
165
213
|
rule: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType | /**
|
|
166
214
|
* Declarative validation rule (schema version v2). Supports predefined comparison operators
|
|
167
|
-
* over number, date and text inputs, with static, dynamic (context path)
|
|
168
|
-
* comparison values.
|
|
215
|
+
* over number, date and text inputs, with static, dynamic (context path), relative-date and
|
|
216
|
+
* external (app-provided) comparison values.
|
|
169
217
|
*
|
|
170
218
|
*/
|
|
171
219
|
ComparisonRuleType;
|
|
@@ -185,6 +233,66 @@ declare namespace Components {
|
|
|
185
233
|
*/
|
|
186
234
|
ContextRequirement[];
|
|
187
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* A comparison value resolved at evaluation time from an organisation environment variable
|
|
238
|
+
* (environments-api). The rule stores the key, never the value, so one change to the variable
|
|
239
|
+
* reaches every rule that references it and a blueprint install never overwrites the
|
|
240
|
+
* organisation's own value.
|
|
241
|
+
*
|
|
242
|
+
* Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
|
|
243
|
+
* text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
|
|
244
|
+
* `String` and `SecretString` variables are rejected at write time. Write-time validation also
|
|
245
|
+
* checks that the variable exists in the organisation; a variable that exists without a value
|
|
246
|
+
* (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
|
|
247
|
+
*
|
|
248
|
+
*/
|
|
249
|
+
export interface EnvironmentValue {
|
|
250
|
+
source: "environment";
|
|
251
|
+
/**
|
|
252
|
+
* Environment variable key, e.g. `abschlag.max`.
|
|
253
|
+
*/
|
|
254
|
+
key: string; // ^[a-z0-9][a-z0-9_.\-]{0,127}$
|
|
255
|
+
adjust?: /**
|
|
256
|
+
* Adjusts a context-resolved numeric value before comparison, e.g. "context value plus 10 percent".
|
|
257
|
+
* Used to express tolerance bands such as "at most 10% above the current instalment amount".
|
|
258
|
+
*
|
|
259
|
+
*/
|
|
260
|
+
ValueAdjustment;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* A comparison value produced at evaluation time by an External Values hook of an installed
|
|
264
|
+
* app (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is
|
|
265
|
+
* resolved server-side by the external-values-api, which executes the hook's HTTP call with
|
|
266
|
+
* the app's credentials and returns the typed result identified by `result_id`.
|
|
267
|
+
*
|
|
268
|
+
* Write-time validation checks that the app is installed in the organisation, that the hook
|
|
269
|
+
* and result exist, and that the result's type is compatible with the compared kind
|
|
270
|
+
* (`number` results for numeric comparisons, `text` for text, `date` for date). External values
|
|
271
|
+
* are resolved only for authenticated consumers (epilot 360 users and portal end customers);
|
|
272
|
+
* in public journeys the dependent conditions are skipped.
|
|
273
|
+
*
|
|
274
|
+
*/
|
|
275
|
+
export interface ExternalValue {
|
|
276
|
+
source: "external";
|
|
277
|
+
/**
|
|
278
|
+
* ID of the installed app that provides the External Values component.
|
|
279
|
+
*/
|
|
280
|
+
app_id: string;
|
|
281
|
+
/**
|
|
282
|
+
* ID of the hook within the app's External Values component.
|
|
283
|
+
*/
|
|
284
|
+
hook_id: string; // ^[a-zA-Z0-9_-]+$
|
|
285
|
+
/**
|
|
286
|
+
* ID of the result entry within the hook whose value is compared.
|
|
287
|
+
*/
|
|
288
|
+
result_id: string; // ^[a-zA-Z0-9_-]+$
|
|
289
|
+
adjust?: /**
|
|
290
|
+
* Adjusts a context-resolved numeric value before comparison, e.g. "context value plus 10 percent".
|
|
291
|
+
* Used to express tolerance bands such as "at most 10% above the current instalment amount".
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
ValueAdjustment;
|
|
295
|
+
}
|
|
188
296
|
/**
|
|
189
297
|
* Response envelope for listing all validation rules within an organization.
|
|
190
298
|
*/
|
|
@@ -510,8 +618,8 @@ declare namespace Components {
|
|
|
510
618
|
*/
|
|
511
619
|
export interface RangeValue {
|
|
512
620
|
source: "range";
|
|
513
|
-
min: /* A single comparison value - static, resolved from context,
|
|
514
|
-
max: /* A single comparison value - static, resolved from context,
|
|
621
|
+
min: /* A single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value. */ ScalarValue;
|
|
622
|
+
max: /* A single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value. */ ScalarValue;
|
|
515
623
|
}
|
|
516
624
|
/**
|
|
517
625
|
* Condition definition for a regex-based validation rule (2 levels deep)
|
|
@@ -585,15 +693,41 @@ declare namespace Components {
|
|
|
585
693
|
anchor?: "today";
|
|
586
694
|
}
|
|
587
695
|
/**
|
|
588
|
-
* A single comparison value - static, resolved from context,
|
|
696
|
+
* A single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value.
|
|
589
697
|
*/
|
|
590
|
-
export type ScalarValue = /* A single comparison value - static, resolved from context,
|
|
698
|
+
export type ScalarValue = /* A single comparison value - static, resolved from context, a relative date, an organisation environment variable, or an external value. */ /* A fixed comparison value. */ StaticValue | /**
|
|
591
699
|
* A dynamic comparison value resolved from runtime context, e.g. `contract.installment_amount`
|
|
592
700
|
* or `previous_reading.value`. The first path segment must match the `name` of a declared
|
|
593
701
|
* context requirement.
|
|
594
702
|
*
|
|
595
703
|
*/
|
|
596
|
-
ContextValue | /* A date relative to the evaluation moment, e.g. "today minus 30 days". Only valid for date rules. */ RelativeDateValue
|
|
704
|
+
ContextValue | /* A date relative to the evaluation moment, e.g. "today minus 30 days". Only valid for date rules. */ RelativeDateValue | /**
|
|
705
|
+
* A comparison value resolved at evaluation time from an organisation environment variable
|
|
706
|
+
* (environments-api). The rule stores the key, never the value, so one change to the variable
|
|
707
|
+
* reaches every rule that references it and a blueprint install never overwrites the
|
|
708
|
+
* organisation's own value.
|
|
709
|
+
*
|
|
710
|
+
* Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
|
|
711
|
+
* text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
|
|
712
|
+
* `String` and `SecretString` variables are rejected at write time. Write-time validation also
|
|
713
|
+
* checks that the variable exists in the organisation; a variable that exists without a value
|
|
714
|
+
* (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
717
|
+
EnvironmentValue | /**
|
|
718
|
+
* A comparison value produced at evaluation time by an External Values hook of an installed
|
|
719
|
+
* app (component type `EXTERNAL_VALUES`). The rule stores the reference only; the value is
|
|
720
|
+
* resolved server-side by the external-values-api, which executes the hook's HTTP call with
|
|
721
|
+
* the app's credentials and returns the typed result identified by `result_id`.
|
|
722
|
+
*
|
|
723
|
+
* Write-time validation checks that the app is installed in the organisation, that the hook
|
|
724
|
+
* and result exist, and that the result's type is compatible with the compared kind
|
|
725
|
+
* (`number` results for numeric comparisons, `text` for text, `date` for date). External values
|
|
726
|
+
* are resolved only for authenticated consumers (epilot 360 users and portal end customers);
|
|
727
|
+
* in public journeys the dependent conditions are skipped.
|
|
728
|
+
*
|
|
729
|
+
*/
|
|
730
|
+
ExternalValue;
|
|
597
731
|
/**
|
|
598
732
|
* A fixed comparison value.
|
|
599
733
|
*/
|
|
@@ -627,8 +761,8 @@ declare namespace Components {
|
|
|
627
761
|
UsedBy[];
|
|
628
762
|
rule?: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType | /**
|
|
629
763
|
* Declarative validation rule (schema version v2). Supports predefined comparison operators
|
|
630
|
-
* over number, date and text inputs, with static, dynamic (context path)
|
|
631
|
-
* comparison values.
|
|
764
|
+
* over number, date and text inputs, with static, dynamic (context path), relative-date and
|
|
765
|
+
* external (app-provided) comparison values.
|
|
632
766
|
*
|
|
633
767
|
*/
|
|
634
768
|
ComparisonRuleType;
|
|
@@ -702,8 +836,8 @@ declare namespace Components {
|
|
|
702
836
|
UsedBy[];
|
|
703
837
|
rule?: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType | /**
|
|
704
838
|
* Declarative validation rule (schema version v2). Supports predefined comparison operators
|
|
705
|
-
* over number, date and text inputs, with static, dynamic (context path)
|
|
706
|
-
* comparison values.
|
|
839
|
+
* over number, date and text inputs, with static, dynamic (context path), relative-date and
|
|
840
|
+
* external (app-provided) comparison values.
|
|
707
841
|
*
|
|
708
842
|
*/
|
|
709
843
|
ComparisonRuleType;
|
|
@@ -774,8 +908,8 @@ declare namespace Components {
|
|
|
774
908
|
UsedBy[];
|
|
775
909
|
rule?: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType | /**
|
|
776
910
|
* Declarative validation rule (schema version v2). Supports predefined comparison operators
|
|
777
|
-
* over number, date and text inputs, with static, dynamic (context path)
|
|
778
|
-
* comparison values.
|
|
911
|
+
* over number, date and text inputs, with static, dynamic (context path), relative-date and
|
|
912
|
+
* external (app-provided) comparison values.
|
|
779
913
|
*
|
|
780
914
|
*/
|
|
781
915
|
ComparisonRuleType;
|
|
@@ -820,7 +954,20 @@ declare namespace Components {
|
|
|
820
954
|
* context requirement.
|
|
821
955
|
*
|
|
822
956
|
*/
|
|
823
|
-
ContextValue
|
|
957
|
+
ContextValue | /**
|
|
958
|
+
* A comparison value resolved at evaluation time from an organisation environment variable
|
|
959
|
+
* (environments-api). The rule stores the key, never the value, so one change to the variable
|
|
960
|
+
* reaches every rule that references it and a blueprint install never overwrites the
|
|
961
|
+
* organisation's own value.
|
|
962
|
+
*
|
|
963
|
+
* Only browser-safe variable types are allowed: `Number` for numeric comparisons, `Text` for
|
|
964
|
+
* text comparisons and for dates (ISO 8601 string), `Boolean` for `applies_when` values.
|
|
965
|
+
* `String` and `SecretString` variables are rejected at write time. Write-time validation also
|
|
966
|
+
* checks that the variable exists in the organisation; a variable that exists without a value
|
|
967
|
+
* (for example seeded by a blueprint install) is accepted and resolves as unavailable until set.
|
|
968
|
+
*
|
|
969
|
+
*/
|
|
970
|
+
EnvironmentValue;
|
|
824
971
|
direction: "increase" | "decrease";
|
|
825
972
|
/**
|
|
826
973
|
* Rounds the adjusted result to a whole number - `up` (ceiling) or `down` (floor).
|
|
@@ -897,6 +1044,7 @@ declare namespace Paths {
|
|
|
897
1044
|
* Invalid request body
|
|
898
1045
|
*/
|
|
899
1046
|
message?: string;
|
|
1047
|
+
code?: "external_value_not_found" | "external_value_incompatible";
|
|
900
1048
|
}
|
|
901
1049
|
export interface $401 {
|
|
902
1050
|
/**
|
|
@@ -1104,6 +1252,7 @@ declare namespace Paths {
|
|
|
1104
1252
|
* Invalid request body
|
|
1105
1253
|
*/
|
|
1106
1254
|
message?: string;
|
|
1255
|
+
code?: "external_value_not_found" | "external_value_incompatible";
|
|
1107
1256
|
}
|
|
1108
1257
|
export interface $401 {
|
|
1109
1258
|
/**
|
|
@@ -1318,6 +1467,8 @@ type ConditionValue = Components.Schemas.ConditionValue;
|
|
|
1318
1467
|
type ContextRequirement = Components.Schemas.ContextRequirement;
|
|
1319
1468
|
type ContextValue = Components.Schemas.ContextValue;
|
|
1320
1469
|
type CreateValidationRuleRequest = Components.Schemas.CreateValidationRuleRequest;
|
|
1470
|
+
type EnvironmentValue = Components.Schemas.EnvironmentValue;
|
|
1471
|
+
type ExternalValue = Components.Schemas.ExternalValue;
|
|
1321
1472
|
type GetValidationRulesResponse = Components.Schemas.GetValidationRulesResponse;
|
|
1322
1473
|
type NoValue = Components.Schemas.NoValue;
|
|
1323
1474
|
type NumericCondition = Components.Schemas.NumericCondition;
|
|
@@ -1343,4 +1494,4 @@ type ValidationRule = Components.Schemas.ValidationRule;
|
|
|
1343
1494
|
type ValidationRuleBase = Components.Schemas.ValidationRuleBase;
|
|
1344
1495
|
type ValueAdjustment = Components.Schemas.ValueAdjustment;
|
|
1345
1496
|
|
|
1346
|
-
export { type AppliesWhen as A, type Client as C, type GetValidationRulesResponse as G, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type
|
|
1497
|
+
export { type AppliesWhen as A, type ValueAdjustment as B, type Client as C, type EnvironmentValue as E, type GetValidationRulesResponse as G, type NoValue as N, type OperationMethods as O, Paths as P, type RangeValue as R, type ScalarValue as S, type UpdateValidationRuleRequest as U, type ValidationRule as V, Components as a, type PathsDictionary as b, type ComparisonRuleType as c, type Condition as d, type ConditionValue as e, type ContextRequirement as f, type ContextValue as g, type CreateValidationRuleRequest as h, type ExternalValue as i, type NumericCondition as j, type NumericFactCondition as k, type NumericNestedCondition as l, type NumericRuleType as m, type Operator as n, type PatternCondition as o, type PatternFactCondition as p, type PatternNestedCondition as q, type PatternRuleType as r, type RegexCondition as s, type RegexFactCondition as t, type RegexNestedCondition as u, type RegexRuleType as v, type RelativeDateValue as w, type StaticValue as x, type UsedBy as y, type ValidationRuleBase as z };
|
package/docs/app.md
CHANGED
|
@@ -83,6 +83,7 @@ const { data } = await appClient.getPublicFacingComponent(...)
|
|
|
83
83
|
- [`BaseComponentCommon`](#basecomponentcommon)
|
|
84
84
|
- [`BaseComponent`](#basecomponent)
|
|
85
85
|
- [`ApiProxyComponent`](#apiproxycomponent)
|
|
86
|
+
- [`ExternalValuesComponent`](#externalvaluescomponent)
|
|
86
87
|
- [`CustomCapabilityComponent`](#customcapabilitycomponent)
|
|
87
88
|
- [`CustomPageComponent`](#custompagecomponent)
|
|
88
89
|
- [`CustomPageConfig`](#custompageconfig)
|
|
@@ -133,6 +134,9 @@ const { data } = await appClient.getPublicFacingComponent(...)
|
|
|
133
134
|
- [`ConfigurationMetadata`](#configurationmetadata)
|
|
134
135
|
- [`ConfigurationVersion`](#configurationversion)
|
|
135
136
|
- [`ApiProxyConfig`](#apiproxyconfig)
|
|
137
|
+
- [`ExternalValuesConfig`](#externalvaluesconfig)
|
|
138
|
+
- [`ExternalValuesHook`](#externalvalueshook)
|
|
139
|
+
- [`ExternalValuesResult`](#externalvaluesresult)
|
|
136
140
|
- [`Grants`](#grants)
|
|
137
141
|
- [`BlueprintRef`](#blueprintref)
|
|
138
142
|
- [`Installation`](#installation)
|
|
@@ -1136,7 +1140,8 @@ const { data } = await client.patchVersion(
|
|
|
1136
1140
|
lifted: true,
|
|
1137
1141
|
value_updated_at: 'string'
|
|
1138
1142
|
}
|
|
1139
|
-
]
|
|
1143
|
+
],
|
|
1144
|
+
changelog: 'string'
|
|
1140
1145
|
},
|
|
1141
1146
|
)
|
|
1142
1147
|
```
|
|
@@ -1337,11 +1342,16 @@ Clone an existing app version to create a new version
|
|
|
1337
1342
|
`POST /v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}`
|
|
1338
1343
|
|
|
1339
1344
|
```ts
|
|
1340
|
-
const { data } = await client.cloneVersion(
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
+
const { data } = await client.cloneVersion(
|
|
1346
|
+
{
|
|
1347
|
+
appId: 'example',
|
|
1348
|
+
sourceVersion: 'example',
|
|
1349
|
+
targetVersion: 'example',
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
changelog: 'string'
|
|
1353
|
+
},
|
|
1354
|
+
)
|
|
1345
1355
|
```
|
|
1346
1356
|
|
|
1347
1357
|
<details>
|
|
@@ -2017,7 +2027,7 @@ type Role = {
|
|
|
2017
2027
|
|
|
2018
2028
|
### `Options`
|
|
2019
2029
|
|
|
2020
|
-
|
|
2030
|
+
An option declaration — a setting the installing org fills in. Declared at app level.
|
|
2021
2031
|
|
|
2022
2032
|
```ts
|
|
2023
2033
|
type Options = {
|
|
@@ -2093,7 +2103,7 @@ type S3Reference = {
|
|
|
2093
2103
|
Type of app component
|
|
2094
2104
|
|
|
2095
2105
|
```ts
|
|
2096
|
-
type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "APP_FUNCTION"
|
|
2106
|
+
type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "EXTERNAL_VALUES" | "APP_FUNCTION"
|
|
2097
2107
|
```
|
|
2098
2108
|
|
|
2099
2109
|
### `FunctionDefinition`
|
|
@@ -2238,6 +2248,34 @@ type ApiProxyComponent = {
|
|
|
2238
2248
|
}
|
|
2239
2249
|
```
|
|
2240
2250
|
|
|
2251
|
+
### `ExternalValuesComponent`
|
|
2252
|
+
|
|
2253
|
+
Exposes typed values resolved from an external system at runtime (e.g. a meter reading prediction). Consumers such as validation rules reference a hook and one of its results by id. Resolution is performed by the external-values-api on behalf of authenticated epilot 360 users and portal end customer
|
|
2254
|
+
|
|
2255
|
+
```ts
|
|
2256
|
+
type ExternalValuesComponent = {
|
|
2257
|
+
component_type: "EXTERNAL_VALUES"
|
|
2258
|
+
configuration: {
|
|
2259
|
+
hooks: Array<{
|
|
2260
|
+
id: { ... }
|
|
2261
|
+
name: { ... }
|
|
2262
|
+
description?: { ... }
|
|
2263
|
+
auth_type?: { ... }
|
|
2264
|
+
auth_header?: { ... }
|
|
2265
|
+
auth_secret?: { ... }
|
|
2266
|
+
auth?: { ... }
|
|
2267
|
+
call: { ... }
|
|
2268
|
+
result: { ... }
|
|
2269
|
+
timeout_ms?: { ... }
|
|
2270
|
+
on_unavailable?: { ... }
|
|
2271
|
+
cache?: { ... }
|
|
2272
|
+
use_static_ips?: { ... }
|
|
2273
|
+
secure_proxy?: { ... }
|
|
2274
|
+
}>
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
```
|
|
2278
|
+
|
|
2241
2279
|
### `CustomCapabilityComponent`
|
|
2242
2280
|
|
|
2243
2281
|
```ts
|
|
@@ -3712,6 +3750,144 @@ type ApiProxyConfig = {
|
|
|
3712
3750
|
}
|
|
3713
3751
|
```
|
|
3714
3752
|
|
|
3753
|
+
### `ExternalValuesConfig`
|
|
3754
|
+
|
|
3755
|
+
Configuration for an EXTERNAL_VALUES component
|
|
3756
|
+
|
|
3757
|
+
```ts
|
|
3758
|
+
type ExternalValuesConfig = {
|
|
3759
|
+
hooks: Array<{
|
|
3760
|
+
id: string
|
|
3761
|
+
name: {
|
|
3762
|
+
en?: { ... }
|
|
3763
|
+
de: { ... }
|
|
3764
|
+
}
|
|
3765
|
+
description?: {
|
|
3766
|
+
en?: { ... }
|
|
3767
|
+
de: { ... }
|
|
3768
|
+
}
|
|
3769
|
+
auth_type?: "none" | "header" | "bearer" | "hmac"
|
|
3770
|
+
auth_header?: string
|
|
3771
|
+
auth_secret?: string
|
|
3772
|
+
auth?: {
|
|
3773
|
+
method?: { ... }
|
|
3774
|
+
url: { ... }
|
|
3775
|
+
params?: { ... }
|
|
3776
|
+
headers?: { ... }
|
|
3777
|
+
body?: { ... }
|
|
3778
|
+
cache?: { ... }
|
|
3779
|
+
}
|
|
3780
|
+
call: {
|
|
3781
|
+
method?: { ... }
|
|
3782
|
+
url: { ... }
|
|
3783
|
+
headers?: { ... }
|
|
3784
|
+
params?: { ... }
|
|
3785
|
+
body?: { ... }
|
|
3786
|
+
}
|
|
3787
|
+
result: Array<{
|
|
3788
|
+
id: { ... }
|
|
3789
|
+
type: { ... }
|
|
3790
|
+
name: { ... }
|
|
3791
|
+
template?: { ... }
|
|
3792
|
+
path?: { ... }
|
|
3793
|
+
jsonata?: { ... }
|
|
3794
|
+
}>
|
|
3795
|
+
timeout_ms?: number
|
|
3796
|
+
on_unavailable?: "skip" | "block"
|
|
3797
|
+
cache?: {
|
|
3798
|
+
ttl_seconds: { ... }
|
|
3799
|
+
key?: { ... }
|
|
3800
|
+
}
|
|
3801
|
+
use_static_ips?: boolean
|
|
3802
|
+
secure_proxy?: {
|
|
3803
|
+
integration_id: { ... }
|
|
3804
|
+
use_case_slug: { ... }
|
|
3805
|
+
}
|
|
3806
|
+
}>
|
|
3807
|
+
}
|
|
3808
|
+
```
|
|
3809
|
+
|
|
3810
|
+
### `ExternalValuesHook`
|
|
3811
|
+
|
|
3812
|
+
One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.
|
|
3813
|
+
|
|
3814
|
+
|
|
3815
|
+
```ts
|
|
3816
|
+
type ExternalValuesHook = {
|
|
3817
|
+
id: string
|
|
3818
|
+
name: {
|
|
3819
|
+
en?: string
|
|
3820
|
+
de: string
|
|
3821
|
+
}
|
|
3822
|
+
description?: {
|
|
3823
|
+
en?: string
|
|
3824
|
+
de: string
|
|
3825
|
+
}
|
|
3826
|
+
auth_type?: "none" | "header" | "bearer" | "hmac"
|
|
3827
|
+
auth_header?: string
|
|
3828
|
+
auth_secret?: string
|
|
3829
|
+
auth?: {
|
|
3830
|
+
method?: string
|
|
3831
|
+
url: string
|
|
3832
|
+
params?: Record<string, string>
|
|
3833
|
+
headers?: Record<string, string>
|
|
3834
|
+
body?: Record<string, unknown>
|
|
3835
|
+
cache?: {
|
|
3836
|
+
key: { ... }
|
|
3837
|
+
ttl: { ... }
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
call: {
|
|
3841
|
+
method?: "GET" | "POST" | "PUT" | "PATCH"
|
|
3842
|
+
url: string
|
|
3843
|
+
headers?: Record<string, string>
|
|
3844
|
+
params?: Record<string, string>
|
|
3845
|
+
body?: Record<string, unknown>
|
|
3846
|
+
}
|
|
3847
|
+
result: Array<{
|
|
3848
|
+
id: string
|
|
3849
|
+
type: "number" | "text" | "date" | "boolean"
|
|
3850
|
+
name: {
|
|
3851
|
+
en?: { ... }
|
|
3852
|
+
de: { ... }
|
|
3853
|
+
}
|
|
3854
|
+
template?: string
|
|
3855
|
+
path?: string
|
|
3856
|
+
jsonata?: string
|
|
3857
|
+
}>
|
|
3858
|
+
timeout_ms?: number
|
|
3859
|
+
on_unavailable?: "skip" | "block"
|
|
3860
|
+
cache?: {
|
|
3861
|
+
ttl_seconds: number
|
|
3862
|
+
key?: string
|
|
3863
|
+
}
|
|
3864
|
+
use_static_ips?: boolean
|
|
3865
|
+
secure_proxy?: {
|
|
3866
|
+
integration_id: string // uuid
|
|
3867
|
+
use_case_slug: string
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3870
|
+
```
|
|
3871
|
+
|
|
3872
|
+
### `ExternalValuesResult`
|
|
3873
|
+
|
|
3874
|
+
A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.
|
|
3875
|
+
|
|
3876
|
+
|
|
3877
|
+
```ts
|
|
3878
|
+
type ExternalValuesResult = {
|
|
3879
|
+
id: string
|
|
3880
|
+
type: "number" | "text" | "date" | "boolean"
|
|
3881
|
+
name: {
|
|
3882
|
+
en?: string
|
|
3883
|
+
de: string
|
|
3884
|
+
}
|
|
3885
|
+
template?: string
|
|
3886
|
+
path?: string
|
|
3887
|
+
jsonata?: string
|
|
3888
|
+
}
|
|
3889
|
+
```
|
|
3890
|
+
|
|
3715
3891
|
### `Grants`
|
|
3716
3892
|
|
|
3717
3893
|
Required grants for the app in order to call APIs for the installing tenant
|
|
@@ -4083,7 +4259,7 @@ type BatchEventRequest = {
|
|
|
4083
4259
|
timestamp?: string
|
|
4084
4260
|
correlation_id?: string
|
|
4085
4261
|
event_type: "ERROR" | "WARNING" | "INFO"
|
|
4086
|
-
source: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "APP_FUNCTION"
|
|
4262
|
+
source: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "EXTERNAL_VALUES" | "APP_FUNCTION"
|
|
4087
4263
|
actor: {
|
|
4088
4264
|
org_id?: { ... }
|
|
4089
4265
|
user_id?: { ... }
|
|
@@ -4115,7 +4291,7 @@ type AppEventData = {
|
|
|
4115
4291
|
timestamp?: string
|
|
4116
4292
|
correlation_id?: string
|
|
4117
4293
|
event_type: "ERROR" | "WARNING" | "INFO"
|
|
4118
|
-
source: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "APP_FUNCTION"
|
|
4294
|
+
source: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "EXTERNAL_VALUES" | "APP_FUNCTION"
|
|
4119
4295
|
actor: {
|
|
4120
4296
|
org_id?: string
|
|
4121
4297
|
user_id?: string
|
|
@@ -4135,7 +4311,7 @@ type EventsQuery = {
|
|
|
4135
4311
|
preset?: "1h" | "6h" | "24h" | "7d" | "30d"
|
|
4136
4312
|
}
|
|
4137
4313
|
filters?: {
|
|
4138
|
-
source?: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "APP_FUNCTION"[]
|
|
4314
|
+
source?: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "EXTERNAL_VALUES" | "APP_FUNCTION"[]
|
|
4139
4315
|
component_id?: string[]
|
|
4140
4316
|
event_type?: "ERROR" | "WARNING" | "INFO"[]
|
|
4141
4317
|
correlation_id?: string
|
|
@@ -4231,7 +4407,7 @@ type RawEvents = {
|
|
|
4231
4407
|
timestamp?: string
|
|
4232
4408
|
correlation_id?: string
|
|
4233
4409
|
event_type: "ERROR" | "WARNING" | "INFO"
|
|
4234
|
-
source: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "APP_FUNCTION"
|
|
4410
|
+
source: "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "EXTERNAL_VALUES" | "APP_FUNCTION"
|
|
4235
4411
|
actor: {
|
|
4236
4412
|
org_id?: { ... }
|
|
4237
4413
|
user_id?: { ... }
|