@epilot/sdk 2.20.8-alpha.0 → 2.20.8
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/environments.json +3 -211
- package/definitions/validation-rules.json +184 -6
- 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 +6 -6
- package/dist/apis/app.js +1 -1
- 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.d.cts +2 -2
- package/dist/apis/environments.d.ts +2 -2
- 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 +6 -6
- package/dist/apis/journey.js +1 -1
- 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/bin/cli.js +1 -1
- package/dist/{chunk-PFO4HNPR.js → chunk-OOMP6BYJ.js} +2 -2
- package/dist/{chunk-4FP7EKQT.cjs → chunk-VAM7ZIAF.cjs} +2 -2
- package/dist/environments-EAVUY4FC.cjs +7 -0
- package/dist/environments-RNOROUFZ.js +7 -0
- package/dist/{environments.d-Cr-oj1fN.d.cts → environments.d-C_BTxz4W.d.cts} +22 -193
- package/dist/{environments.d-Cr-oj1fN.d.ts → environments.d-C_BTxz4W.d.ts} +22 -193
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
- package/dist/validation-rules-2JQLB6PH.cjs +7 -0
- package/dist/validation-rules-VQXUQSMC.js +7 -0
- package/dist/{validation-rules.d-D8X9MYTc.d.ts → validation-rules.d-Bbo90IYn.d.cts} +178 -7
- package/dist/{validation-rules.d-D8X9MYTc.d.cts → validation-rules.d-Bbo90IYn.d.ts} +178 -7
- package/docs/environments.md +11 -252
- package/docs/validation-rules.md +286 -0
- package/package.json +1 -1
- package/dist/environments-DBHM4GKI.cjs +0 -7
- package/dist/environments-JVPK6LSD.js +0 -7
- package/dist/validation-rules-ETOO45CW.js +0 -7
- package/dist/validation-rules-MZZ7YMJM.cjs +0 -7
package/docs/environments.md
CHANGED
|
@@ -41,14 +41,6 @@ const { data } = await environmentsClient.listEnvironmentVariables(...)
|
|
|
41
41
|
- [`MapValue`](#mapvalue)
|
|
42
42
|
- [`JsonValue`](#jsonvalue)
|
|
43
43
|
- [`LinkValue`](#linkvalue)
|
|
44
|
-
- [`LinkFields`](#linkfields)
|
|
45
|
-
- [`ListItemType`](#listitemtype)
|
|
46
|
-
- [`ListOfText`](#listoftext)
|
|
47
|
-
- [`ListOfNumber`](#listofnumber)
|
|
48
|
-
- [`ListOfBoolean`](#listofboolean)
|
|
49
|
-
- [`ListOfJson`](#listofjson)
|
|
50
|
-
- [`ListOfLink`](#listoflink)
|
|
51
|
-
- [`ListValue`](#listvalue)
|
|
52
44
|
- [`EnvironmentValue`](#environmentvalue)
|
|
53
45
|
- [`EnvironmentVariable`](#environmentvariable)
|
|
54
46
|
- [`EnvironmentVariableListItem`](#environmentvariablelistitem)
|
|
@@ -302,12 +294,12 @@ const { data } = await client.deleteEnvironmentVariable({
|
|
|
302
294
|
### `EnvironmentValueType`
|
|
303
295
|
|
|
304
296
|
The structure a variable's value holds. `SecretString` is encrypted at rest and
|
|
305
|
-
its value is never returned. `Text`, `Number`, `Boolean`, `Map`, `JSON
|
|
306
|
-
|
|
297
|
+
its value is never returned. `Text`, `Number`, `Boolean`, `Map`, `JSON` and `Link`
|
|
298
|
+
may be served to browser-facing consumers; `String` and `SecretString` may not.
|
|
307
299
|
|
|
308
300
|
|
|
309
301
|
```ts
|
|
310
|
-
type EnvironmentValueType = "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
302
|
+
type EnvironmentValueType = "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
311
303
|
```
|
|
312
304
|
|
|
313
305
|
### `StringTranslations`
|
|
@@ -377,130 +369,13 @@ type LinkValue = {
|
|
|
377
369
|
}
|
|
378
370
|
```
|
|
379
371
|
|
|
380
|
-
### `LinkFields`
|
|
381
|
-
|
|
382
|
-
The fields of a link, without a fallback language — the shape a `List`
|
|
383
|
-
item carries. Inside a list the fallback belongs to the wrapper, which
|
|
384
|
-
owns the language tabs for every row.
|
|
385
|
-
|
|
386
|
-
Restated rather than composed with `LinkValue`: `allOf` plus
|
|
387
|
-
`additionalProperties: false` is rejected by most validato
|
|
388
|
-
|
|
389
|
-
```ts
|
|
390
|
-
type LinkFields = {
|
|
391
|
-
url: string
|
|
392
|
-
label: string | Record<string, string>
|
|
393
|
-
description?: string | Record<string, string>
|
|
394
|
-
}
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
### `ListItemType`
|
|
398
|
-
|
|
399
|
-
The element type a `List` holds. `String` and `SecretString` are absent
|
|
400
|
-
deliberately: they are the two types never served to browser-facing
|
|
401
|
-
consumers, and a `List` is. `Map` is already a keyed collection, and a
|
|
402
|
-
list of lists has no consumer.
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
```ts
|
|
406
|
-
type ListItemType = "Text" | "Number" | "Boolean" | "JSON" | "Link"
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
### `ListOfText`
|
|
410
|
-
|
|
411
|
-
```ts
|
|
412
|
-
type ListOfText = {
|
|
413
|
-
itemType: "Text"
|
|
414
|
-
items: string[]
|
|
415
|
-
}
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
### `ListOfNumber`
|
|
419
|
-
|
|
420
|
-
```ts
|
|
421
|
-
type ListOfNumber = {
|
|
422
|
-
itemType: "Number"
|
|
423
|
-
items: number[]
|
|
424
|
-
}
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
### `ListOfBoolean`
|
|
428
|
-
|
|
429
|
-
```ts
|
|
430
|
-
type ListOfBoolean = {
|
|
431
|
-
itemType: "Boolean"
|
|
432
|
-
items: boolean[]
|
|
433
|
-
}
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
### `ListOfJson`
|
|
437
|
-
|
|
438
|
-
```ts
|
|
439
|
-
type ListOfJson = {
|
|
440
|
-
itemType: "JSON"
|
|
441
|
-
items: Record<string, unknown>[]
|
|
442
|
-
}
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
### `ListOfLink`
|
|
446
|
-
|
|
447
|
-
A list of links. `fallbackLanguage` applies to every item's translated
|
|
448
|
-
`label` and `description`; items may mix plain and translated fields
|
|
449
|
-
freely, since a plain string is a complete answer for any language.
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
```ts
|
|
453
|
-
type ListOfLink = {
|
|
454
|
-
itemType: "Link"
|
|
455
|
-
fallbackLanguage?: string
|
|
456
|
-
items: Array<{
|
|
457
|
-
url: string
|
|
458
|
-
label: string | Record<string, string>
|
|
459
|
-
description?: string | Record<string, string>
|
|
460
|
-
}>
|
|
461
|
-
}
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
### `ListValue`
|
|
465
|
-
|
|
466
|
-
An ordered collection of one declared element type. Items round-trip in
|
|
467
|
-
the order written; nothing sorts them. Holds at most 100 items.
|
|
468
|
-
|
|
469
|
-
The whole value is limited to 32768 characters when serialised — the
|
|
470
|
-
server enforces this, and it is not expressible per-property here.
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
```ts
|
|
474
|
-
type ListValue = {
|
|
475
|
-
itemType: "Text"
|
|
476
|
-
items: string[]
|
|
477
|
-
} | {
|
|
478
|
-
itemType: "Number"
|
|
479
|
-
items: number[]
|
|
480
|
-
} | {
|
|
481
|
-
itemType: "Boolean"
|
|
482
|
-
items: boolean[]
|
|
483
|
-
} | {
|
|
484
|
-
itemType: "JSON"
|
|
485
|
-
items: Record<string, unknown>[]
|
|
486
|
-
} | {
|
|
487
|
-
itemType: "Link"
|
|
488
|
-
fallbackLanguage?: string
|
|
489
|
-
items: Array<{
|
|
490
|
-
url: string
|
|
491
|
-
label: string | Record<string, string>
|
|
492
|
-
description?: string | Record<string, string>
|
|
493
|
-
}>
|
|
494
|
-
}
|
|
495
|
-
```
|
|
496
|
-
|
|
497
372
|
### `EnvironmentValue`
|
|
498
373
|
|
|
499
374
|
A variable's value. The JSON type corresponds to the variable's `type`:
|
|
500
375
|
`String`, `SecretString` and `Text` are strings, `Number` is a number,
|
|
501
|
-
`Boolean` is a boolean, and `Map`, `JSON
|
|
502
|
-
|
|
503
|
-
|
|
376
|
+
`Boolean` is a boolean, and `Map`, `JSON` and `Link` are objects. Numbers are
|
|
377
|
+
IEEE 754 doubles; integers above 2^53 may lose precision on round-trip.
|
|
378
|
+
|
|
504
379
|
|
|
505
380
|
```ts
|
|
506
381
|
type EnvironmentValue = string | number | boolean | {
|
|
@@ -514,26 +389,6 @@ type EnvironmentValue = string | number | boolean | {
|
|
|
514
389
|
label: string | Record<string, string>
|
|
515
390
|
description?: string | Record<string, string>
|
|
516
391
|
fallbackLanguage?: string
|
|
517
|
-
} | {
|
|
518
|
-
itemType: "Text"
|
|
519
|
-
items: string[]
|
|
520
|
-
} | {
|
|
521
|
-
itemType: "Number"
|
|
522
|
-
items: number[]
|
|
523
|
-
} | {
|
|
524
|
-
itemType: "Boolean"
|
|
525
|
-
items: boolean[]
|
|
526
|
-
} | {
|
|
527
|
-
itemType: "JSON"
|
|
528
|
-
items: Record<string, unknown>[]
|
|
529
|
-
} | {
|
|
530
|
-
itemType: "Link"
|
|
531
|
-
fallbackLanguage?: string
|
|
532
|
-
items: Array<{
|
|
533
|
-
url: string
|
|
534
|
-
label: string | Record<string, string>
|
|
535
|
-
description?: string | Record<string, string>
|
|
536
|
-
}>
|
|
537
392
|
}
|
|
538
393
|
```
|
|
539
394
|
|
|
@@ -542,7 +397,7 @@ type EnvironmentValue = string | number | boolean | {
|
|
|
542
397
|
```ts
|
|
543
398
|
type EnvironmentVariable = {
|
|
544
399
|
key: string
|
|
545
|
-
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
400
|
+
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
546
401
|
description?: string
|
|
547
402
|
group?: string
|
|
548
403
|
value?: string | number | boolean | {
|
|
@@ -556,26 +411,6 @@ type EnvironmentVariable = {
|
|
|
556
411
|
label: string | Record<string, string>
|
|
557
412
|
description?: string | Record<string, string>
|
|
558
413
|
fallbackLanguage?: string
|
|
559
|
-
} | {
|
|
560
|
-
itemType: "Text"
|
|
561
|
-
items: string[]
|
|
562
|
-
} | {
|
|
563
|
-
itemType: "Number"
|
|
564
|
-
items: number[]
|
|
565
|
-
} | {
|
|
566
|
-
itemType: "Boolean"
|
|
567
|
-
items: boolean[]
|
|
568
|
-
} | {
|
|
569
|
-
itemType: "JSON"
|
|
570
|
-
items: Record<string, unknown>[]
|
|
571
|
-
} | {
|
|
572
|
-
itemType: "Link"
|
|
573
|
-
fallbackLanguage?: string
|
|
574
|
-
items: Array<{
|
|
575
|
-
url: { ... }
|
|
576
|
-
label: { ... }
|
|
577
|
-
description?: { ... }
|
|
578
|
-
}>
|
|
579
414
|
}
|
|
580
415
|
protected?: boolean
|
|
581
416
|
created_at: string // date-time
|
|
@@ -588,7 +423,7 @@ type EnvironmentVariable = {
|
|
|
588
423
|
```ts
|
|
589
424
|
type EnvironmentVariableListItem = {
|
|
590
425
|
key: string
|
|
591
|
-
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
426
|
+
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
592
427
|
description?: string
|
|
593
428
|
group?: string
|
|
594
429
|
value?: string | number | boolean | {
|
|
@@ -602,26 +437,6 @@ type EnvironmentVariableListItem = {
|
|
|
602
437
|
label: string | Record<string, string>
|
|
603
438
|
description?: string | Record<string, string>
|
|
604
439
|
fallbackLanguage?: string
|
|
605
|
-
} | {
|
|
606
|
-
itemType: "Text"
|
|
607
|
-
items: string[]
|
|
608
|
-
} | {
|
|
609
|
-
itemType: "Number"
|
|
610
|
-
items: number[]
|
|
611
|
-
} | {
|
|
612
|
-
itemType: "Boolean"
|
|
613
|
-
items: boolean[]
|
|
614
|
-
} | {
|
|
615
|
-
itemType: "JSON"
|
|
616
|
-
items: Record<string, unknown>[]
|
|
617
|
-
} | {
|
|
618
|
-
itemType: "Link"
|
|
619
|
-
fallbackLanguage?: string
|
|
620
|
-
items: Array<{
|
|
621
|
-
url: { ... }
|
|
622
|
-
label: { ... }
|
|
623
|
-
description?: { ... }
|
|
624
|
-
}>
|
|
625
440
|
}
|
|
626
441
|
protected?: boolean
|
|
627
442
|
created_at: string // date-time
|
|
@@ -635,7 +450,7 @@ type EnvironmentVariableListItem = {
|
|
|
635
450
|
type EnvironmentVariableList = {
|
|
636
451
|
items: Array<{
|
|
637
452
|
key: string
|
|
638
|
-
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
453
|
+
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
639
454
|
description?: string
|
|
640
455
|
group?: string
|
|
641
456
|
value?: string | number | boolean | {
|
|
@@ -646,22 +461,6 @@ type EnvironmentVariableList = {
|
|
|
646
461
|
label: { ... }
|
|
647
462
|
description?: { ... }
|
|
648
463
|
fallbackLanguage?: { ... }
|
|
649
|
-
} | {
|
|
650
|
-
itemType: { ... }
|
|
651
|
-
items: { ... }
|
|
652
|
-
} | {
|
|
653
|
-
itemType: { ... }
|
|
654
|
-
items: { ... }
|
|
655
|
-
} | {
|
|
656
|
-
itemType: { ... }
|
|
657
|
-
items: { ... }
|
|
658
|
-
} | {
|
|
659
|
-
itemType: { ... }
|
|
660
|
-
items: { ... }
|
|
661
|
-
} | {
|
|
662
|
-
itemType: { ... }
|
|
663
|
-
fallbackLanguage?: { ... }
|
|
664
|
-
items: { ... }
|
|
665
464
|
}
|
|
666
465
|
protected?: boolean
|
|
667
466
|
created_at: string // date-time
|
|
@@ -675,7 +474,7 @@ type EnvironmentVariableList = {
|
|
|
675
474
|
```ts
|
|
676
475
|
type EnvironmentVariableCreateRequest = {
|
|
677
476
|
key: string
|
|
678
|
-
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
477
|
+
type: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
679
478
|
description?: string
|
|
680
479
|
group?: string
|
|
681
480
|
value?: string | number | boolean | {
|
|
@@ -689,26 +488,6 @@ type EnvironmentVariableCreateRequest = {
|
|
|
689
488
|
label: string | Record<string, string>
|
|
690
489
|
description?: string | Record<string, string>
|
|
691
490
|
fallbackLanguage?: string
|
|
692
|
-
} | {
|
|
693
|
-
itemType: "Text"
|
|
694
|
-
items: string[]
|
|
695
|
-
} | {
|
|
696
|
-
itemType: "Number"
|
|
697
|
-
items: number[]
|
|
698
|
-
} | {
|
|
699
|
-
itemType: "Boolean"
|
|
700
|
-
items: boolean[]
|
|
701
|
-
} | {
|
|
702
|
-
itemType: "JSON"
|
|
703
|
-
items: Record<string, unknown>[]
|
|
704
|
-
} | {
|
|
705
|
-
itemType: "Link"
|
|
706
|
-
fallbackLanguage?: string
|
|
707
|
-
items: Array<{
|
|
708
|
-
url: { ... }
|
|
709
|
-
label: { ... }
|
|
710
|
-
description?: { ... }
|
|
711
|
-
}>
|
|
712
491
|
}
|
|
713
492
|
protected?: boolean
|
|
714
493
|
}
|
|
@@ -718,7 +497,7 @@ type EnvironmentVariableCreateRequest = {
|
|
|
718
497
|
|
|
719
498
|
```ts
|
|
720
499
|
type EnvironmentVariableUpdateRequest = {
|
|
721
|
-
type?: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
500
|
+
type?: "String" | "SecretString" | "Text" | "Number" | "Boolean" | "Map" | "JSON" | "Link"
|
|
722
501
|
value?: string | number | boolean | {
|
|
723
502
|
fallbackLanguage?: string
|
|
724
503
|
options: Array<{
|
|
@@ -730,26 +509,6 @@ type EnvironmentVariableUpdateRequest = {
|
|
|
730
509
|
label: string | Record<string, string>
|
|
731
510
|
description?: string | Record<string, string>
|
|
732
511
|
fallbackLanguage?: string
|
|
733
|
-
} | {
|
|
734
|
-
itemType: "Text"
|
|
735
|
-
items: string[]
|
|
736
|
-
} | {
|
|
737
|
-
itemType: "Number"
|
|
738
|
-
items: number[]
|
|
739
|
-
} | {
|
|
740
|
-
itemType: "Boolean"
|
|
741
|
-
items: boolean[]
|
|
742
|
-
} | {
|
|
743
|
-
itemType: "JSON"
|
|
744
|
-
items: Record<string, unknown>[]
|
|
745
|
-
} | {
|
|
746
|
-
itemType: "Link"
|
|
747
|
-
fallbackLanguage?: string
|
|
748
|
-
items: Array<{
|
|
749
|
-
url: { ... }
|
|
750
|
-
label: { ... }
|
|
751
|
-
description?: { ... }
|
|
752
|
-
}>
|
|
753
512
|
}
|
|
754
513
|
description?: string
|
|
755
514
|
group?: string
|
package/docs/validation-rules.md
CHANGED
|
@@ -65,6 +65,13 @@ const { data } = await validationRulesClient.getValidationRules(...)
|
|
|
65
65
|
- [`RelativeDateValue`](#relativedatevalue)
|
|
66
66
|
- [`RangeValue`](#rangevalue)
|
|
67
67
|
- [`NoValue`](#novalue)
|
|
68
|
+
- [`DocumentRuleType`](#documentruletype)
|
|
69
|
+
- [`DocumentCheck`](#documentcheck)
|
|
70
|
+
- [`DocumentCondition`](#documentcondition)
|
|
71
|
+
- [`DocumentOperator`](#documentoperator)
|
|
72
|
+
- [`DocumentConditionValue`](#documentconditionvalue)
|
|
73
|
+
- [`FileTypesValue`](#filetypesvalue)
|
|
74
|
+
- [`CriteriaValue`](#criteriavalue)
|
|
68
75
|
- [`AppliesWhen`](#applieswhen)
|
|
69
76
|
- [`ContextRequirement`](#contextrequirement)
|
|
70
77
|
|
|
@@ -682,6 +689,18 @@ type UpdateValidationRuleRequest = {
|
|
|
682
689
|
applies_when?: { ... }
|
|
683
690
|
allow_failure?: { ... }
|
|
684
691
|
}>
|
|
692
|
+
} | {
|
|
693
|
+
input_type: "document"
|
|
694
|
+
check: {
|
|
695
|
+
level: { ... }
|
|
696
|
+
}
|
|
697
|
+
conditions: Array<{
|
|
698
|
+
id: { ... }
|
|
699
|
+
operator: { ... }
|
|
700
|
+
value: { ... }
|
|
701
|
+
error_message: { ... }
|
|
702
|
+
allow_failure?: { ... }
|
|
703
|
+
}>
|
|
685
704
|
}
|
|
686
705
|
contexts?: Array<{
|
|
687
706
|
schema: string
|
|
@@ -737,6 +756,18 @@ type ValidationRuleBase = {
|
|
|
737
756
|
applies_when?: { ... }
|
|
738
757
|
allow_failure?: { ... }
|
|
739
758
|
}>
|
|
759
|
+
} | {
|
|
760
|
+
input_type: "document"
|
|
761
|
+
check: {
|
|
762
|
+
level: { ... }
|
|
763
|
+
}
|
|
764
|
+
conditions: Array<{
|
|
765
|
+
id: { ... }
|
|
766
|
+
operator: { ... }
|
|
767
|
+
value: { ... }
|
|
768
|
+
error_message: { ... }
|
|
769
|
+
allow_failure?: { ... }
|
|
770
|
+
}>
|
|
740
771
|
}
|
|
741
772
|
contexts?: Array<{
|
|
742
773
|
schema: string
|
|
@@ -2261,6 +2292,261 @@ type NoValue = {
|
|
|
2261
2292
|
}
|
|
2262
2293
|
```
|
|
2263
2294
|
|
|
2295
|
+
### `DocumentRuleType`
|
|
2296
|
+
|
|
2297
|
+
Declarative validation rule (schema version v2) for uploaded files. The rule declares how deep
|
|
2298
|
+
the check goes (`check.level`) and the conditions the file must satisfy. Property conditions
|
|
2299
|
+
(file type, size, page count, image resolution, blank and password-protected detection) are
|
|
2300
|
+
deterministic and av
|
|
2301
|
+
|
|
2302
|
+
```ts
|
|
2303
|
+
type DocumentRuleType = {
|
|
2304
|
+
input_type: "document"
|
|
2305
|
+
check: {
|
|
2306
|
+
level: "basic" | "standard" | "advanced"
|
|
2307
|
+
}
|
|
2308
|
+
conditions: Array<{
|
|
2309
|
+
id: string
|
|
2310
|
+
operator: "fileTypeIn" | "sizeBelow" | "pageCountBetween" | "resolutionAtLeast" | "resolutionAtMost" | "isNotBlank" | "isNotPasswordProtected" | "meetsCriteria"
|
|
2311
|
+
value: {
|
|
2312
|
+
source: { ... }
|
|
2313
|
+
data: { ... }
|
|
2314
|
+
} | {
|
|
2315
|
+
source: { ... }
|
|
2316
|
+
min: { ... }
|
|
2317
|
+
max: { ... }
|
|
2318
|
+
} | {
|
|
2319
|
+
source: { ... }
|
|
2320
|
+
} | {
|
|
2321
|
+
source: { ... }
|
|
2322
|
+
types: { ... }
|
|
2323
|
+
} | {
|
|
2324
|
+
source: { ... }
|
|
2325
|
+
text: { ... }
|
|
2326
|
+
}
|
|
2327
|
+
error_message: string
|
|
2328
|
+
allow_failure?: boolean
|
|
2329
|
+
}>
|
|
2330
|
+
}
|
|
2331
|
+
```
|
|
2332
|
+
|
|
2333
|
+
### `DocumentCheck`
|
|
2334
|
+
|
|
2335
|
+
How deep the document check goes. Levels are cumulative.
|
|
2336
|
+
|
|
2337
|
+
```ts
|
|
2338
|
+
type DocumentCheck = {
|
|
2339
|
+
level: "basic" | "standard" | "advanced"
|
|
2340
|
+
}
|
|
2341
|
+
```
|
|
2342
|
+
|
|
2343
|
+
### `DocumentCondition`
|
|
2344
|
+
|
|
2345
|
+
A single check the uploaded file must satisfy.
|
|
2346
|
+
|
|
2347
|
+
```ts
|
|
2348
|
+
type DocumentCondition = {
|
|
2349
|
+
id: string
|
|
2350
|
+
operator: "fileTypeIn" | "sizeBelow" | "pageCountBetween" | "resolutionAtLeast" | "resolutionAtMost" | "isNotBlank" | "isNotPasswordProtected" | "meetsCriteria"
|
|
2351
|
+
value: {
|
|
2352
|
+
source: "static"
|
|
2353
|
+
data: number | string | boolean
|
|
2354
|
+
} | {
|
|
2355
|
+
source: "range"
|
|
2356
|
+
min: {
|
|
2357
|
+
source: { ... }
|
|
2358
|
+
data: { ... }
|
|
2359
|
+
} | {
|
|
2360
|
+
source: { ... }
|
|
2361
|
+
path: { ... }
|
|
2362
|
+
adjust?: { ... }
|
|
2363
|
+
} | {
|
|
2364
|
+
source: { ... }
|
|
2365
|
+
offset: { ... }
|
|
2366
|
+
unit: { ... }
|
|
2367
|
+
anchor?: { ... }
|
|
2368
|
+
} | {
|
|
2369
|
+
source: { ... }
|
|
2370
|
+
key: { ... }
|
|
2371
|
+
adjust?: { ... }
|
|
2372
|
+
} | {
|
|
2373
|
+
source: { ... }
|
|
2374
|
+
app_id: { ... }
|
|
2375
|
+
hook_id: { ... }
|
|
2376
|
+
result_id: { ... }
|
|
2377
|
+
adjust?: { ... }
|
|
2378
|
+
}
|
|
2379
|
+
max: {
|
|
2380
|
+
source: { ... }
|
|
2381
|
+
data: { ... }
|
|
2382
|
+
} | {
|
|
2383
|
+
source: { ... }
|
|
2384
|
+
path: { ... }
|
|
2385
|
+
adjust?: { ... }
|
|
2386
|
+
} | {
|
|
2387
|
+
source: { ... }
|
|
2388
|
+
offset: { ... }
|
|
2389
|
+
unit: { ... }
|
|
2390
|
+
anchor?: { ... }
|
|
2391
|
+
} | {
|
|
2392
|
+
source: { ... }
|
|
2393
|
+
key: { ... }
|
|
2394
|
+
adjust?: { ... }
|
|
2395
|
+
} | {
|
|
2396
|
+
source: { ... }
|
|
2397
|
+
app_id: { ... }
|
|
2398
|
+
hook_id: { ... }
|
|
2399
|
+
result_id: { ... }
|
|
2400
|
+
adjust?: { ... }
|
|
2401
|
+
}
|
|
2402
|
+
} | {
|
|
2403
|
+
source: "none"
|
|
2404
|
+
} | {
|
|
2405
|
+
source: "file_types"
|
|
2406
|
+
types: "image" | "pdf" | "document" | "spreadsheet"[]
|
|
2407
|
+
} | {
|
|
2408
|
+
source: "criteria"
|
|
2409
|
+
text: string
|
|
2410
|
+
}
|
|
2411
|
+
error_message: string
|
|
2412
|
+
allow_failure?: boolean
|
|
2413
|
+
}
|
|
2414
|
+
```
|
|
2415
|
+
|
|
2416
|
+
### `DocumentOperator`
|
|
2417
|
+
|
|
2418
|
+
Predefined document check. Value compatibility (enforced at write time):
|
|
2419
|
+
- fileTypeIn: `file_types` value listing the accepted file categories.
|
|
2420
|
+
- sizeBelow: static integer, maximum file size in bytes.
|
|
2421
|
+
- pageCountBetween: `range` of static non-negative integers (inclusive).
|
|
2422
|
+
- resolutionAtLeast / reso
|
|
2423
|
+
|
|
2424
|
+
```ts
|
|
2425
|
+
type DocumentOperator = "fileTypeIn" | "sizeBelow" | "pageCountBetween" | "resolutionAtLeast" | "resolutionAtMost" | "isNotBlank" | "isNotPasswordProtected" | "meetsCriteria"
|
|
2426
|
+
```
|
|
2427
|
+
|
|
2428
|
+
### `DocumentConditionValue`
|
|
2429
|
+
|
|
2430
|
+
The value of a document condition - a static scalar, a range, nothing, accepted file categories, or a free-text criterion.
|
|
2431
|
+
|
|
2432
|
+
```ts
|
|
2433
|
+
type DocumentConditionValue = {
|
|
2434
|
+
source: "static"
|
|
2435
|
+
data: number | string | boolean
|
|
2436
|
+
} | {
|
|
2437
|
+
source: "range"
|
|
2438
|
+
min: {
|
|
2439
|
+
source: "static"
|
|
2440
|
+
data: number | string | boolean
|
|
2441
|
+
} | {
|
|
2442
|
+
source: "context"
|
|
2443
|
+
path: string
|
|
2444
|
+
adjust?: {
|
|
2445
|
+
type: { ... }
|
|
2446
|
+
value: { ... }
|
|
2447
|
+
direction: { ... }
|
|
2448
|
+
rounding?: { ... }
|
|
2449
|
+
}
|
|
2450
|
+
} | {
|
|
2451
|
+
source: "relative_date"
|
|
2452
|
+
offset: number
|
|
2453
|
+
unit: "days" | "months" | "years"
|
|
2454
|
+
anchor?: "today"
|
|
2455
|
+
} | {
|
|
2456
|
+
source: "environment"
|
|
2457
|
+
key: string
|
|
2458
|
+
adjust?: {
|
|
2459
|
+
type: { ... }
|
|
2460
|
+
value: { ... }
|
|
2461
|
+
direction: { ... }
|
|
2462
|
+
rounding?: { ... }
|
|
2463
|
+
}
|
|
2464
|
+
} | {
|
|
2465
|
+
source: "external"
|
|
2466
|
+
app_id: string
|
|
2467
|
+
hook_id: string
|
|
2468
|
+
result_id: string
|
|
2469
|
+
adjust?: {
|
|
2470
|
+
type: { ... }
|
|
2471
|
+
value: { ... }
|
|
2472
|
+
direction: { ... }
|
|
2473
|
+
rounding?: { ... }
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
max: {
|
|
2477
|
+
source: "static"
|
|
2478
|
+
data: number | string | boolean
|
|
2479
|
+
} | {
|
|
2480
|
+
source: "context"
|
|
2481
|
+
path: string
|
|
2482
|
+
adjust?: {
|
|
2483
|
+
type: { ... }
|
|
2484
|
+
value: { ... }
|
|
2485
|
+
direction: { ... }
|
|
2486
|
+
rounding?: { ... }
|
|
2487
|
+
}
|
|
2488
|
+
} | {
|
|
2489
|
+
source: "relative_date"
|
|
2490
|
+
offset: number
|
|
2491
|
+
unit: "days" | "months" | "years"
|
|
2492
|
+
anchor?: "today"
|
|
2493
|
+
} | {
|
|
2494
|
+
source: "environment"
|
|
2495
|
+
key: string
|
|
2496
|
+
adjust?: {
|
|
2497
|
+
type: { ... }
|
|
2498
|
+
value: { ... }
|
|
2499
|
+
direction: { ... }
|
|
2500
|
+
rounding?: { ... }
|
|
2501
|
+
}
|
|
2502
|
+
} | {
|
|
2503
|
+
source: "external"
|
|
2504
|
+
app_id: string
|
|
2505
|
+
hook_id: string
|
|
2506
|
+
result_id: string
|
|
2507
|
+
adjust?: {
|
|
2508
|
+
type: { ... }
|
|
2509
|
+
value: { ... }
|
|
2510
|
+
direction: { ... }
|
|
2511
|
+
rounding?: { ... }
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
} | {
|
|
2515
|
+
source: "none"
|
|
2516
|
+
} | {
|
|
2517
|
+
source: "file_types"
|
|
2518
|
+
types: "image" | "pdf" | "document" | "spreadsheet"[]
|
|
2519
|
+
} | {
|
|
2520
|
+
source: "criteria"
|
|
2521
|
+
text: string
|
|
2522
|
+
}
|
|
2523
|
+
```
|
|
2524
|
+
|
|
2525
|
+
### `FileTypesValue`
|
|
2526
|
+
|
|
2527
|
+
Accepted file categories; each category expands to a mime list at check time.
|
|
2528
|
+
|
|
2529
|
+
```ts
|
|
2530
|
+
type FileTypesValue = {
|
|
2531
|
+
source: "file_types"
|
|
2532
|
+
types: "image" | "pdf" | "document" | "spreadsheet"[]
|
|
2533
|
+
}
|
|
2534
|
+
```
|
|
2535
|
+
|
|
2536
|
+
### `CriteriaValue`
|
|
2537
|
+
|
|
2538
|
+
A free-text requirement judged against the document's extracted content, e.g. "The photo shows
|
|
2539
|
+
an electricity meter with the meter number and the current reading fully legible." One requirement
|
|
2540
|
+
per condition keeps results specific and lets each requirement be graded separately.
|
|
2541
|
+
|
|
2542
|
+
|
|
2543
|
+
```ts
|
|
2544
|
+
type CriteriaValue = {
|
|
2545
|
+
source: "criteria"
|
|
2546
|
+
text: string
|
|
2547
|
+
}
|
|
2548
|
+
```
|
|
2549
|
+
|
|
2264
2550
|
### `AppliesWhen`
|
|
2265
2551
|
|
|
2266
2552
|
Optional precondition on a condition: the condition only takes part in the
|