@sanity/workflow-engine 0.18.0 → 0.20.0
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/CHANGELOG.md +112 -0
- package/DATAMODEL.md +53 -0
- package/dist/_chunks-cjs/invariants.cjs +138 -28
- package/dist/_chunks-es/invariants.js +138 -28
- package/dist/define.d.cts +232 -30
- package/dist/define.d.ts +232 -30
- package/dist/index.cjs +2586 -1930
- package/dist/index.d.cts +545 -75
- package/dist/index.d.ts +545 -75
- package/dist/index.js +2607 -1967
- package/package.json +3 -2
package/dist/define.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ declare const ActionParamSchema: v.SchemaWithPipe<
|
|
|
49
49
|
"doc.refs",
|
|
50
50
|
"json",
|
|
51
51
|
],
|
|
52
|
-
|
|
52
|
+
string
|
|
53
53
|
>;
|
|
54
54
|
readonly name: v.SchemaWithPipe<
|
|
55
55
|
readonly [
|
|
@@ -233,10 +233,7 @@ declare type AuthoringFieldRef = v.InferOutput<typeof AuthoringFieldRefSchema>;
|
|
|
233
233
|
declare const AuthoringFieldRefSchema: v.StrictObjectSchema<
|
|
234
234
|
{
|
|
235
235
|
readonly scope: v.OptionalSchema<
|
|
236
|
-
v.PicklistSchema<
|
|
237
|
-
readonly ["workflow", "stage", "activity"],
|
|
238
|
-
`Invalid option: expected one of ${string}`
|
|
239
|
-
>,
|
|
236
|
+
v.PicklistSchema<readonly ["workflow", "stage", "activity"], string>,
|
|
240
237
|
undefined
|
|
241
238
|
>;
|
|
242
239
|
readonly field: v.SchemaWithPipe<
|
|
@@ -402,7 +399,7 @@ declare const AuthoringGuardSchema: v.StrictObjectSchema<
|
|
|
402
399
|
v.ArraySchema<
|
|
403
400
|
v.PicklistSchema<
|
|
404
401
|
readonly ["create", "update", "delete", "publish", "unpublish"],
|
|
405
|
-
|
|
402
|
+
string
|
|
406
403
|
>,
|
|
407
404
|
undefined
|
|
408
405
|
>,
|
|
@@ -577,7 +574,7 @@ declare const AuthoringManualTargetSchema: v.VariantSchema<
|
|
|
577
574
|
readonly scope: v.OptionalSchema<
|
|
578
575
|
v.PicklistSchema<
|
|
579
576
|
readonly ["workflow", "stage", "activity"],
|
|
580
|
-
|
|
577
|
+
string
|
|
581
578
|
>,
|
|
582
579
|
undefined
|
|
583
580
|
>;
|
|
@@ -613,7 +610,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
613
610
|
readonly scope: v.OptionalSchema<
|
|
614
611
|
v.PicklistSchema<
|
|
615
612
|
readonly ["workflow", "stage", "activity"],
|
|
616
|
-
|
|
613
|
+
string
|
|
617
614
|
>,
|
|
618
615
|
undefined
|
|
619
616
|
>;
|
|
@@ -638,7 +635,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
638
635
|
readonly scope: v.OptionalSchema<
|
|
639
636
|
v.PicklistSchema<
|
|
640
637
|
readonly ["workflow", "stage", "activity"],
|
|
641
|
-
|
|
638
|
+
string
|
|
642
639
|
>,
|
|
643
640
|
undefined
|
|
644
641
|
>;
|
|
@@ -662,7 +659,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
662
659
|
readonly scope: v.OptionalSchema<
|
|
663
660
|
v.PicklistSchema<
|
|
664
661
|
readonly ["workflow", "stage", "activity"],
|
|
665
|
-
|
|
662
|
+
string
|
|
666
663
|
>,
|
|
667
664
|
undefined
|
|
668
665
|
>;
|
|
@@ -687,7 +684,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
687
684
|
readonly scope: v.OptionalSchema<
|
|
688
685
|
v.PicklistSchema<
|
|
689
686
|
readonly ["workflow", "stage", "activity"],
|
|
690
|
-
|
|
687
|
+
string
|
|
691
688
|
>,
|
|
692
689
|
undefined
|
|
693
690
|
>;
|
|
@@ -718,7 +715,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
718
715
|
readonly scope: v.OptionalSchema<
|
|
719
716
|
v.PicklistSchema<
|
|
720
717
|
readonly ["workflow", "stage", "activity"],
|
|
721
|
-
|
|
718
|
+
string
|
|
722
719
|
>,
|
|
723
720
|
undefined
|
|
724
721
|
>;
|
|
@@ -754,7 +751,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
754
751
|
>;
|
|
755
752
|
readonly status: v.PicklistSchema<
|
|
756
753
|
readonly ["active", "done", "skipped", "failed"],
|
|
757
|
-
|
|
754
|
+
string
|
|
758
755
|
>;
|
|
759
756
|
},
|
|
760
757
|
undefined
|
|
@@ -767,7 +764,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
|
|
|
767
764
|
readonly scope: v.OptionalSchema<
|
|
768
765
|
v.PicklistSchema<
|
|
769
766
|
readonly ["workflow", "stage", "activity"],
|
|
770
|
-
|
|
767
|
+
string
|
|
771
768
|
>,
|
|
772
769
|
undefined
|
|
773
770
|
>;
|
|
@@ -1156,6 +1153,7 @@ declare const FIELD_VALUE_KINDS: readonly [
|
|
|
1156
1153
|
"string",
|
|
1157
1154
|
"text",
|
|
1158
1155
|
"number",
|
|
1156
|
+
"progress",
|
|
1159
1157
|
"boolean",
|
|
1160
1158
|
"date",
|
|
1161
1159
|
"datetime",
|
|
@@ -1355,7 +1353,7 @@ declare const GuardSchema: v.StrictObjectSchema<
|
|
|
1355
1353
|
v.ArraySchema<
|
|
1356
1354
|
v.PicklistSchema<
|
|
1357
1355
|
readonly ["create", "update", "delete", "publish", "unpublish"],
|
|
1358
|
-
|
|
1356
|
+
string
|
|
1359
1357
|
>,
|
|
1360
1358
|
undefined
|
|
1361
1359
|
>,
|
|
@@ -1587,7 +1585,7 @@ declare const StoredManualTargetSchema: v.VariantSchema<
|
|
|
1587
1585
|
{
|
|
1588
1586
|
readonly scope: v.PicklistSchema<
|
|
1589
1587
|
readonly ["workflow", "stage", "activity"],
|
|
1590
|
-
|
|
1588
|
+
string
|
|
1591
1589
|
>;
|
|
1592
1590
|
readonly field: v.SchemaWithPipe<
|
|
1593
1591
|
readonly [
|
|
@@ -1615,7 +1613,7 @@ declare const StoredOpSchema: v.VariantSchema<
|
|
|
1615
1613
|
{
|
|
1616
1614
|
readonly scope: v.PicklistSchema<
|
|
1617
1615
|
readonly ["workflow", "stage", "activity"],
|
|
1618
|
-
|
|
1616
|
+
string
|
|
1619
1617
|
>;
|
|
1620
1618
|
readonly field: v.SchemaWithPipe<
|
|
1621
1619
|
readonly [
|
|
@@ -1637,7 +1635,7 @@ declare const StoredOpSchema: v.VariantSchema<
|
|
|
1637
1635
|
{
|
|
1638
1636
|
readonly scope: v.PicklistSchema<
|
|
1639
1637
|
readonly ["workflow", "stage", "activity"],
|
|
1640
|
-
|
|
1638
|
+
string
|
|
1641
1639
|
>;
|
|
1642
1640
|
readonly field: v.SchemaWithPipe<
|
|
1643
1641
|
readonly [
|
|
@@ -1658,7 +1656,7 @@ declare const StoredOpSchema: v.VariantSchema<
|
|
|
1658
1656
|
{
|
|
1659
1657
|
readonly scope: v.PicklistSchema<
|
|
1660
1658
|
readonly ["workflow", "stage", "activity"],
|
|
1661
|
-
|
|
1659
|
+
string
|
|
1662
1660
|
>;
|
|
1663
1661
|
readonly field: v.SchemaWithPipe<
|
|
1664
1662
|
readonly [
|
|
@@ -1680,7 +1678,7 @@ declare const StoredOpSchema: v.VariantSchema<
|
|
|
1680
1678
|
{
|
|
1681
1679
|
readonly scope: v.PicklistSchema<
|
|
1682
1680
|
readonly ["workflow", "stage", "activity"],
|
|
1683
|
-
|
|
1681
|
+
string
|
|
1684
1682
|
>;
|
|
1685
1683
|
readonly field: v.SchemaWithPipe<
|
|
1686
1684
|
readonly [
|
|
@@ -1708,7 +1706,7 @@ declare const StoredOpSchema: v.VariantSchema<
|
|
|
1708
1706
|
{
|
|
1709
1707
|
readonly scope: v.PicklistSchema<
|
|
1710
1708
|
readonly ["workflow", "stage", "activity"],
|
|
1711
|
-
|
|
1709
|
+
string
|
|
1712
1710
|
>;
|
|
1713
1711
|
readonly field: v.SchemaWithPipe<
|
|
1714
1712
|
readonly [
|
|
@@ -1739,7 +1737,7 @@ declare const StoredOpSchema: v.VariantSchema<
|
|
|
1739
1737
|
>;
|
|
1740
1738
|
readonly status: v.PicklistSchema<
|
|
1741
1739
|
readonly ["active", "done", "skipped", "failed"],
|
|
1742
|
-
|
|
1740
|
+
string
|
|
1743
1741
|
>;
|
|
1744
1742
|
},
|
|
1745
1743
|
undefined
|
|
@@ -1846,10 +1844,7 @@ declare const SubworkflowsSchema: v.StrictObjectSchema<
|
|
|
1846
1844
|
* `$subworkflows`) decide.
|
|
1847
1845
|
*/
|
|
1848
1846
|
readonly onExit: v.OptionalSchema<
|
|
1849
|
-
v.PicklistSchema<
|
|
1850
|
-
readonly ["detach", "abort"],
|
|
1851
|
-
`Invalid option: expected one of ${string}`
|
|
1852
|
-
>,
|
|
1847
|
+
v.PicklistSchema<readonly ["detach", "abort"], string>,
|
|
1853
1848
|
undefined
|
|
1854
1849
|
>;
|
|
1855
1850
|
},
|
|
@@ -1927,7 +1922,11 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
|
|
|
1927
1922
|
readonly name: v.SchemaWithPipe<
|
|
1928
1923
|
readonly [
|
|
1929
1924
|
v.StringSchema<undefined>,
|
|
1930
|
-
v.NonEmptyAction<string,
|
|
1925
|
+
v.NonEmptyAction<string, undefined>,
|
|
1926
|
+
v.CheckAction<
|
|
1927
|
+
string,
|
|
1928
|
+
`invalid ${string} \u2014 ASCII lowercase + digits + dashes, no leading dash, no dots`
|
|
1929
|
+
>,
|
|
1931
1930
|
]
|
|
1932
1931
|
>;
|
|
1933
1932
|
readonly expectedMinReaderModel: v.OptionalSchema<
|
|
@@ -1940,7 +1939,7 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
|
|
|
1940
1939
|
v.NonEmptyAction<string, undefined>,
|
|
1941
1940
|
v.CheckAction<
|
|
1942
1941
|
string,
|
|
1943
|
-
|
|
1942
|
+
`invalid ${string} \u2014 ASCII lowercase + digits + dashes, no leading dash, no dots`
|
|
1944
1943
|
>,
|
|
1945
1944
|
]
|
|
1946
1945
|
>;
|
|
@@ -2141,7 +2140,30 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
|
|
|
2141
2140
|
id: string;
|
|
2142
2141
|
};
|
|
2143
2142
|
}[],
|
|
2144
|
-
|
|
2143
|
+
(
|
|
2144
|
+
issue: v.CheckIssue<
|
|
2145
|
+
{
|
|
2146
|
+
name: string;
|
|
2147
|
+
resource:
|
|
2148
|
+
| {
|
|
2149
|
+
type: "dataset";
|
|
2150
|
+
id: string;
|
|
2151
|
+
}
|
|
2152
|
+
| {
|
|
2153
|
+
type: "canvas";
|
|
2154
|
+
id: string;
|
|
2155
|
+
}
|
|
2156
|
+
| {
|
|
2157
|
+
type: "media-library";
|
|
2158
|
+
id: string;
|
|
2159
|
+
}
|
|
2160
|
+
| {
|
|
2161
|
+
type: "dashboard";
|
|
2162
|
+
id: string;
|
|
2163
|
+
};
|
|
2164
|
+
}[]
|
|
2165
|
+
>,
|
|
2166
|
+
) => string
|
|
2145
2167
|
>,
|
|
2146
2168
|
]
|
|
2147
2169
|
>,
|
|
@@ -2311,7 +2333,187 @@ declare const WorkflowConfigSchema: v.ObjectSchema<
|
|
|
2311
2333
|
roleAliases?: RoleAliases | undefined;
|
|
2312
2334
|
}[];
|
|
2313
2335
|
}[],
|
|
2314
|
-
|
|
2336
|
+
(
|
|
2337
|
+
issue: v.CheckIssue<
|
|
2338
|
+
{
|
|
2339
|
+
name: string;
|
|
2340
|
+
expectedMinReaderModel?: 2 | undefined;
|
|
2341
|
+
tag: string;
|
|
2342
|
+
workflowResource:
|
|
2343
|
+
| {
|
|
2344
|
+
type: "dataset";
|
|
2345
|
+
id: string;
|
|
2346
|
+
}
|
|
2347
|
+
| {
|
|
2348
|
+
type: "canvas";
|
|
2349
|
+
id: string;
|
|
2350
|
+
}
|
|
2351
|
+
| {
|
|
2352
|
+
type: "media-library";
|
|
2353
|
+
id: string;
|
|
2354
|
+
}
|
|
2355
|
+
| {
|
|
2356
|
+
type: "dashboard";
|
|
2357
|
+
id: string;
|
|
2358
|
+
};
|
|
2359
|
+
resourceAliases?:
|
|
2360
|
+
| {
|
|
2361
|
+
name: string;
|
|
2362
|
+
resource:
|
|
2363
|
+
| {
|
|
2364
|
+
type: "dataset";
|
|
2365
|
+
id: string;
|
|
2366
|
+
}
|
|
2367
|
+
| {
|
|
2368
|
+
type: "canvas";
|
|
2369
|
+
id: string;
|
|
2370
|
+
}
|
|
2371
|
+
| {
|
|
2372
|
+
type: "media-library";
|
|
2373
|
+
id: string;
|
|
2374
|
+
}
|
|
2375
|
+
| {
|
|
2376
|
+
type: "dashboard";
|
|
2377
|
+
id: string;
|
|
2378
|
+
};
|
|
2379
|
+
}[]
|
|
2380
|
+
| undefined;
|
|
2381
|
+
definitions: {
|
|
2382
|
+
name: string;
|
|
2383
|
+
title: string;
|
|
2384
|
+
description?: string | undefined;
|
|
2385
|
+
groups?: Group[] | undefined;
|
|
2386
|
+
lifecycle?: WorkflowLifecycle | undefined;
|
|
2387
|
+
start?: StartBlock | undefined;
|
|
2388
|
+
initialStage: string;
|
|
2389
|
+
fields?: FieldEntry[] | undefined;
|
|
2390
|
+
stages: Stage[];
|
|
2391
|
+
predicates?: Record<string, string> | undefined;
|
|
2392
|
+
roleAliases?: RoleAliases | undefined;
|
|
2393
|
+
}[];
|
|
2394
|
+
}[]
|
|
2395
|
+
>,
|
|
2396
|
+
) => string
|
|
2397
|
+
>,
|
|
2398
|
+
v.CheckAction<
|
|
2399
|
+
{
|
|
2400
|
+
name: string;
|
|
2401
|
+
expectedMinReaderModel?: 2 | undefined;
|
|
2402
|
+
tag: string;
|
|
2403
|
+
workflowResource:
|
|
2404
|
+
| {
|
|
2405
|
+
type: "dataset";
|
|
2406
|
+
id: string;
|
|
2407
|
+
}
|
|
2408
|
+
| {
|
|
2409
|
+
type: "canvas";
|
|
2410
|
+
id: string;
|
|
2411
|
+
}
|
|
2412
|
+
| {
|
|
2413
|
+
type: "media-library";
|
|
2414
|
+
id: string;
|
|
2415
|
+
}
|
|
2416
|
+
| {
|
|
2417
|
+
type: "dashboard";
|
|
2418
|
+
id: string;
|
|
2419
|
+
};
|
|
2420
|
+
resourceAliases?:
|
|
2421
|
+
| {
|
|
2422
|
+
name: string;
|
|
2423
|
+
resource:
|
|
2424
|
+
| {
|
|
2425
|
+
type: "dataset";
|
|
2426
|
+
id: string;
|
|
2427
|
+
}
|
|
2428
|
+
| {
|
|
2429
|
+
type: "canvas";
|
|
2430
|
+
id: string;
|
|
2431
|
+
}
|
|
2432
|
+
| {
|
|
2433
|
+
type: "media-library";
|
|
2434
|
+
id: string;
|
|
2435
|
+
}
|
|
2436
|
+
| {
|
|
2437
|
+
type: "dashboard";
|
|
2438
|
+
id: string;
|
|
2439
|
+
};
|
|
2440
|
+
}[]
|
|
2441
|
+
| undefined;
|
|
2442
|
+
definitions: {
|
|
2443
|
+
name: string;
|
|
2444
|
+
title: string;
|
|
2445
|
+
description?: string | undefined;
|
|
2446
|
+
groups?: Group[] | undefined;
|
|
2447
|
+
lifecycle?: WorkflowLifecycle | undefined;
|
|
2448
|
+
start?: StartBlock | undefined;
|
|
2449
|
+
initialStage: string;
|
|
2450
|
+
fields?: FieldEntry[] | undefined;
|
|
2451
|
+
stages: Stage[];
|
|
2452
|
+
predicates?: Record<string, string> | undefined;
|
|
2453
|
+
roleAliases?: RoleAliases | undefined;
|
|
2454
|
+
}[];
|
|
2455
|
+
}[],
|
|
2456
|
+
(
|
|
2457
|
+
issue: v.CheckIssue<
|
|
2458
|
+
{
|
|
2459
|
+
name: string;
|
|
2460
|
+
expectedMinReaderModel?: 2 | undefined;
|
|
2461
|
+
tag: string;
|
|
2462
|
+
workflowResource:
|
|
2463
|
+
| {
|
|
2464
|
+
type: "dataset";
|
|
2465
|
+
id: string;
|
|
2466
|
+
}
|
|
2467
|
+
| {
|
|
2468
|
+
type: "canvas";
|
|
2469
|
+
id: string;
|
|
2470
|
+
}
|
|
2471
|
+
| {
|
|
2472
|
+
type: "media-library";
|
|
2473
|
+
id: string;
|
|
2474
|
+
}
|
|
2475
|
+
| {
|
|
2476
|
+
type: "dashboard";
|
|
2477
|
+
id: string;
|
|
2478
|
+
};
|
|
2479
|
+
resourceAliases?:
|
|
2480
|
+
| {
|
|
2481
|
+
name: string;
|
|
2482
|
+
resource:
|
|
2483
|
+
| {
|
|
2484
|
+
type: "dataset";
|
|
2485
|
+
id: string;
|
|
2486
|
+
}
|
|
2487
|
+
| {
|
|
2488
|
+
type: "canvas";
|
|
2489
|
+
id: string;
|
|
2490
|
+
}
|
|
2491
|
+
| {
|
|
2492
|
+
type: "media-library";
|
|
2493
|
+
id: string;
|
|
2494
|
+
}
|
|
2495
|
+
| {
|
|
2496
|
+
type: "dashboard";
|
|
2497
|
+
id: string;
|
|
2498
|
+
};
|
|
2499
|
+
}[]
|
|
2500
|
+
| undefined;
|
|
2501
|
+
definitions: {
|
|
2502
|
+
name: string;
|
|
2503
|
+
title: string;
|
|
2504
|
+
description?: string | undefined;
|
|
2505
|
+
groups?: Group[] | undefined;
|
|
2506
|
+
lifecycle?: WorkflowLifecycle | undefined;
|
|
2507
|
+
start?: StartBlock | undefined;
|
|
2508
|
+
initialStage: string;
|
|
2509
|
+
fields?: FieldEntry[] | undefined;
|
|
2510
|
+
stages: Stage[];
|
|
2511
|
+
predicates?: Record<string, string> | undefined;
|
|
2512
|
+
roleAliases?: RoleAliases | undefined;
|
|
2513
|
+
}[];
|
|
2514
|
+
}[]
|
|
2515
|
+
>,
|
|
2516
|
+
) => string
|
|
2315
2517
|
>,
|
|
2316
2518
|
]
|
|
2317
2519
|
>;
|