@sanity/workflow-engine 0.8.0 → 0.9.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/dist/define.d.cts CHANGED
@@ -1955,7 +1955,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1955
1955
  [
1956
1956
  v.StrictObjectSchema<
1957
1957
  {
1958
- readonly type: v.PicklistSchema<
1958
+ type: v.PicklistSchema<
1959
1959
  readonly [
1960
1960
  "doc.ref",
1961
1961
  "doc.refs",
@@ -1973,17 +1973,17 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1973
1973
  ],
1974
1974
  `Invalid option: expected one of ${string}`
1975
1975
  >;
1976
- readonly name: v.SchemaWithPipe<
1976
+ name: v.SchemaWithPipe<
1977
1977
  readonly [
1978
1978
  v.StringSchema<undefined>,
1979
1979
  v.RegexAction<string, string>,
1980
1980
  ]
1981
1981
  >;
1982
- readonly title: v.OptionalSchema<
1982
+ title: v.OptionalSchema<
1983
1983
  v.StringSchema<undefined>,
1984
1984
  undefined
1985
1985
  >;
1986
- readonly description: v.OptionalSchema<
1986
+ description: v.OptionalSchema<
1987
1987
  v.StringSchema<undefined>,
1988
1988
  undefined
1989
1989
  >;
@@ -1994,11 +1994,44 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1994
1994
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
1995
1995
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
1996
1996
  */
1997
- readonly required: v.OptionalSchema<
1997
+ required: v.OptionalSchema<
1998
1998
  v.BooleanSchema<undefined>,
1999
1999
  undefined
2000
2000
  >;
2001
- readonly source: v.GenericSchema<SourceInternal>;
2001
+ source: v.GenericSchema<SourceInternal>;
2002
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
2003
+ editable: v.OptionalSchema<
2004
+ v.UnionSchema<
2005
+ [
2006
+ v.LiteralSchema<true, undefined>,
2007
+ v.ArraySchema<
2008
+ v.SchemaWithPipe<
2009
+ readonly [
2010
+ v.StringSchema<undefined>,
2011
+ v.MinLengthAction<
2012
+ string,
2013
+ 1,
2014
+ "must be a non-empty string"
2015
+ >,
2016
+ ]
2017
+ >,
2018
+ undefined
2019
+ >,
2020
+ v.SchemaWithPipe<
2021
+ readonly [
2022
+ v.StringSchema<undefined>,
2023
+ v.MinLengthAction<
2024
+ string,
2025
+ 1,
2026
+ "must be a non-empty string"
2027
+ >,
2028
+ ]
2029
+ >,
2030
+ ],
2031
+ undefined
2032
+ >,
2033
+ undefined
2034
+ >;
2002
2035
  },
2003
2036
  undefined
2004
2037
  >,
@@ -2515,7 +2548,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2515
2548
  [
2516
2549
  v.StrictObjectSchema<
2517
2550
  {
2518
- readonly type: v.PicklistSchema<
2551
+ type: v.PicklistSchema<
2519
2552
  readonly [
2520
2553
  "doc.ref",
2521
2554
  "doc.refs",
@@ -2533,17 +2566,14 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2533
2566
  ],
2534
2567
  `Invalid option: expected one of ${string}`
2535
2568
  >;
2536
- readonly name: v.SchemaWithPipe<
2569
+ name: v.SchemaWithPipe<
2537
2570
  readonly [
2538
2571
  v.StringSchema<undefined>,
2539
2572
  v.RegexAction<string, string>,
2540
2573
  ]
2541
2574
  >;
2542
- readonly title: v.OptionalSchema<
2543
- v.StringSchema<undefined>,
2544
- undefined
2545
- >;
2546
- readonly description: v.OptionalSchema<
2575
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2576
+ description: v.OptionalSchema<
2547
2577
  v.StringSchema<undefined>,
2548
2578
  undefined
2549
2579
  >;
@@ -2554,11 +2584,44 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2554
2584
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
2555
2585
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
2556
2586
  */
2557
- readonly required: v.OptionalSchema<
2587
+ required: v.OptionalSchema<
2558
2588
  v.BooleanSchema<undefined>,
2559
2589
  undefined
2560
2590
  >;
2561
- readonly source: v.GenericSchema<SourceInternal>;
2591
+ source: v.GenericSchema<SourceInternal>;
2592
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
2593
+ editable: v.OptionalSchema<
2594
+ v.UnionSchema<
2595
+ [
2596
+ v.LiteralSchema<true, undefined>,
2597
+ v.ArraySchema<
2598
+ v.SchemaWithPipe<
2599
+ readonly [
2600
+ v.StringSchema<undefined>,
2601
+ v.MinLengthAction<
2602
+ string,
2603
+ 1,
2604
+ "must be a non-empty string"
2605
+ >,
2606
+ ]
2607
+ >,
2608
+ undefined
2609
+ >,
2610
+ v.SchemaWithPipe<
2611
+ readonly [
2612
+ v.StringSchema<undefined>,
2613
+ v.MinLengthAction<
2614
+ string,
2615
+ 1,
2616
+ "must be a non-empty string"
2617
+ >,
2618
+ ]
2619
+ >,
2620
+ ],
2621
+ undefined
2622
+ >,
2623
+ undefined
2624
+ >;
2562
2625
  },
2563
2626
  undefined
2564
2627
  >,
@@ -2589,6 +2652,43 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2589
2652
  >,
2590
2653
  undefined
2591
2654
  >;
2655
+ /**
2656
+ * Tighten-only editability overrides for the time this stage holds, keyed
2657
+ * by an in-scope slot name. The slot's own `editable` is the ceiling; a
2658
+ * stage value is ANDed with it at runtime, so an override can only NARROW
2659
+ * (never open a slot the baseline left closed). An unlisted slot inherits
2660
+ * its baseline.
2661
+ */
2662
+ editable: v.OptionalSchema<
2663
+ v.RecordSchema<
2664
+ v.SchemaWithPipe<
2665
+ readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
2666
+ >,
2667
+ v.UnionSchema<
2668
+ [
2669
+ v.LiteralSchema<true, undefined>,
2670
+ v.ArraySchema<
2671
+ v.SchemaWithPipe<
2672
+ readonly [
2673
+ v.StringSchema<undefined>,
2674
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
2675
+ ]
2676
+ >,
2677
+ undefined
2678
+ >,
2679
+ v.SchemaWithPipe<
2680
+ readonly [
2681
+ v.StringSchema<undefined>,
2682
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
2683
+ ]
2684
+ >,
2685
+ ],
2686
+ undefined
2687
+ >,
2688
+ undefined
2689
+ >,
2690
+ undefined
2691
+ >;
2592
2692
  },
2593
2693
  undefined
2594
2694
  >;
@@ -2601,7 +2701,7 @@ declare const AuthoringStateEntrySchema: v.UnionSchema<
2601
2701
  [
2602
2702
  v.StrictObjectSchema<
2603
2703
  {
2604
- readonly type: v.PicklistSchema<
2704
+ type: v.PicklistSchema<
2605
2705
  readonly [
2606
2706
  "doc.ref",
2607
2707
  "doc.refs",
@@ -2619,14 +2719,11 @@ declare const AuthoringStateEntrySchema: v.UnionSchema<
2619
2719
  ],
2620
2720
  `Invalid option: expected one of ${string}`
2621
2721
  >;
2622
- readonly name: v.SchemaWithPipe<
2722
+ name: v.SchemaWithPipe<
2623
2723
  readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
2624
2724
  >;
2625
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2626
- readonly description: v.OptionalSchema<
2627
- v.StringSchema<undefined>,
2628
- undefined
2629
- >;
2725
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2726
+ description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2630
2727
  /**
2631
2728
  * When true, the caller MUST supply this entry at start (via
2632
2729
  * `initialState`) or spawn (via the parent's `subworkflows.with`). A
@@ -2634,11 +2731,33 @@ declare const AuthoringStateEntrySchema: v.UnionSchema<
2634
2731
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
2635
2732
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
2636
2733
  */
2637
- readonly required: v.OptionalSchema<
2638
- v.BooleanSchema<undefined>,
2734
+ required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2735
+ source: v.GenericSchema<SourceInternal>;
2736
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
2737
+ editable: v.OptionalSchema<
2738
+ v.UnionSchema<
2739
+ [
2740
+ v.LiteralSchema<true, undefined>,
2741
+ v.ArraySchema<
2742
+ v.SchemaWithPipe<
2743
+ readonly [
2744
+ v.StringSchema<undefined>,
2745
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
2746
+ ]
2747
+ >,
2748
+ undefined
2749
+ >,
2750
+ v.SchemaWithPipe<
2751
+ readonly [
2752
+ v.StringSchema<undefined>,
2753
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
2754
+ ]
2755
+ >,
2756
+ ],
2757
+ undefined
2758
+ >,
2639
2759
  undefined
2640
2760
  >;
2641
- readonly source: v.GenericSchema<SourceInternal>;
2642
2761
  },
2643
2762
  undefined
2644
2763
  >,
@@ -3750,7 +3869,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3750
3869
  [
3751
3870
  v.StrictObjectSchema<
3752
3871
  {
3753
- readonly type: v.PicklistSchema<
3872
+ type: v.PicklistSchema<
3754
3873
  readonly [
3755
3874
  "doc.ref",
3756
3875
  "doc.refs",
@@ -3768,17 +3887,14 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3768
3887
  ],
3769
3888
  `Invalid option: expected one of ${string}`
3770
3889
  >;
3771
- readonly name: v.SchemaWithPipe<
3890
+ name: v.SchemaWithPipe<
3772
3891
  readonly [
3773
3892
  v.StringSchema<undefined>,
3774
3893
  v.RegexAction<string, string>,
3775
3894
  ]
3776
3895
  >;
3777
- readonly title: v.OptionalSchema<
3778
- v.StringSchema<undefined>,
3779
- undefined
3780
- >;
3781
- readonly description: v.OptionalSchema<
3896
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
3897
+ description: v.OptionalSchema<
3782
3898
  v.StringSchema<undefined>,
3783
3899
  undefined
3784
3900
  >;
@@ -3789,11 +3905,44 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3789
3905
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
3790
3906
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
3791
3907
  */
3792
- readonly required: v.OptionalSchema<
3908
+ required: v.OptionalSchema<
3793
3909
  v.BooleanSchema<undefined>,
3794
3910
  undefined
3795
3911
  >;
3796
- readonly source: v.GenericSchema<SourceInternal>;
3912
+ source: v.GenericSchema<SourceInternal>;
3913
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
3914
+ editable: v.OptionalSchema<
3915
+ v.UnionSchema<
3916
+ [
3917
+ v.LiteralSchema<true, undefined>,
3918
+ v.ArraySchema<
3919
+ v.SchemaWithPipe<
3920
+ readonly [
3921
+ v.StringSchema<undefined>,
3922
+ v.MinLengthAction<
3923
+ string,
3924
+ 1,
3925
+ "must be a non-empty string"
3926
+ >,
3927
+ ]
3928
+ >,
3929
+ undefined
3930
+ >,
3931
+ v.SchemaWithPipe<
3932
+ readonly [
3933
+ v.StringSchema<undefined>,
3934
+ v.MinLengthAction<
3935
+ string,
3936
+ 1,
3937
+ "must be a non-empty string"
3938
+ >,
3939
+ ]
3940
+ >,
3941
+ ],
3942
+ undefined
3943
+ >,
3944
+ undefined
3945
+ >;
3797
3946
  },
3798
3947
  undefined
3799
3948
  >,
@@ -4185,7 +4334,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4185
4334
  [
4186
4335
  v.StrictObjectSchema<
4187
4336
  {
4188
- readonly type: v.PicklistSchema<
4337
+ type: v.PicklistSchema<
4189
4338
  readonly [
4190
4339
  "doc.ref",
4191
4340
  "doc.refs",
@@ -4203,17 +4352,14 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4203
4352
  ],
4204
4353
  `Invalid option: expected one of ${string}`
4205
4354
  >;
4206
- readonly name: v.SchemaWithPipe<
4355
+ name: v.SchemaWithPipe<
4207
4356
  readonly [
4208
4357
  v.StringSchema<undefined>,
4209
4358
  v.RegexAction<string, string>,
4210
4359
  ]
4211
4360
  >;
4212
- readonly title: v.OptionalSchema<
4213
- v.StringSchema<undefined>,
4214
- undefined
4215
- >;
4216
- readonly description: v.OptionalSchema<
4361
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
4362
+ description: v.OptionalSchema<
4217
4363
  v.StringSchema<undefined>,
4218
4364
  undefined
4219
4365
  >;
@@ -4224,11 +4370,44 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4224
4370
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
4225
4371
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
4226
4372
  */
4227
- readonly required: v.OptionalSchema<
4373
+ required: v.OptionalSchema<
4228
4374
  v.BooleanSchema<undefined>,
4229
4375
  undefined
4230
4376
  >;
4231
- readonly source: v.GenericSchema<SourceInternal>;
4377
+ source: v.GenericSchema<SourceInternal>;
4378
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
4379
+ editable: v.OptionalSchema<
4380
+ v.UnionSchema<
4381
+ [
4382
+ v.LiteralSchema<true, undefined>,
4383
+ v.ArraySchema<
4384
+ v.SchemaWithPipe<
4385
+ readonly [
4386
+ v.StringSchema<undefined>,
4387
+ v.MinLengthAction<
4388
+ string,
4389
+ 1,
4390
+ "must be a non-empty string"
4391
+ >,
4392
+ ]
4393
+ >,
4394
+ undefined
4395
+ >,
4396
+ v.SchemaWithPipe<
4397
+ readonly [
4398
+ v.StringSchema<undefined>,
4399
+ v.MinLengthAction<
4400
+ string,
4401
+ 1,
4402
+ "must be a non-empty string"
4403
+ >,
4404
+ ]
4405
+ >,
4406
+ ],
4407
+ undefined
4408
+ >,
4409
+ undefined
4410
+ >;
4232
4411
  },
4233
4412
  undefined
4234
4413
  >,
@@ -5524,7 +5703,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5524
5703
  [
5525
5704
  v.StrictObjectSchema<
5526
5705
  {
5527
- readonly type: v.PicklistSchema<
5706
+ type: v.PicklistSchema<
5528
5707
  readonly [
5529
5708
  "doc.ref",
5530
5709
  "doc.refs",
@@ -5542,17 +5721,17 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5542
5721
  ],
5543
5722
  `Invalid option: expected one of ${string}`
5544
5723
  >;
5545
- readonly name: v.SchemaWithPipe<
5724
+ name: v.SchemaWithPipe<
5546
5725
  readonly [
5547
5726
  v.StringSchema<undefined>,
5548
5727
  v.RegexAction<string, string>,
5549
5728
  ]
5550
5729
  >;
5551
- readonly title: v.OptionalSchema<
5730
+ title: v.OptionalSchema<
5552
5731
  v.StringSchema<undefined>,
5553
5732
  undefined
5554
5733
  >;
5555
- readonly description: v.OptionalSchema<
5734
+ description: v.OptionalSchema<
5556
5735
  v.StringSchema<undefined>,
5557
5736
  undefined
5558
5737
  >;
@@ -5563,11 +5742,44 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5563
5742
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
5564
5743
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
5565
5744
  */
5566
- readonly required: v.OptionalSchema<
5745
+ required: v.OptionalSchema<
5567
5746
  v.BooleanSchema<undefined>,
5568
5747
  undefined
5569
5748
  >;
5570
- readonly source: v.GenericSchema<SourceInternal>;
5749
+ source: v.GenericSchema<SourceInternal>;
5750
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
5751
+ editable: v.OptionalSchema<
5752
+ v.UnionSchema<
5753
+ [
5754
+ v.LiteralSchema<true, undefined>,
5755
+ v.ArraySchema<
5756
+ v.SchemaWithPipe<
5757
+ readonly [
5758
+ v.StringSchema<undefined>,
5759
+ v.MinLengthAction<
5760
+ string,
5761
+ 1,
5762
+ "must be a non-empty string"
5763
+ >,
5764
+ ]
5765
+ >,
5766
+ undefined
5767
+ >,
5768
+ v.SchemaWithPipe<
5769
+ readonly [
5770
+ v.StringSchema<undefined>,
5771
+ v.MinLengthAction<
5772
+ string,
5773
+ 1,
5774
+ "must be a non-empty string"
5775
+ >,
5776
+ ]
5777
+ >,
5778
+ ],
5779
+ undefined
5780
+ >,
5781
+ undefined
5782
+ >;
5571
5783
  },
5572
5784
  undefined
5573
5785
  >,
@@ -6147,7 +6359,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6147
6359
  [
6148
6360
  v.StrictObjectSchema<
6149
6361
  {
6150
- readonly type: v.PicklistSchema<
6362
+ type: v.PicklistSchema<
6151
6363
  readonly [
6152
6364
  "doc.ref",
6153
6365
  "doc.refs",
@@ -6165,17 +6377,17 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6165
6377
  ],
6166
6378
  `Invalid option: expected one of ${string}`
6167
6379
  >;
6168
- readonly name: v.SchemaWithPipe<
6380
+ name: v.SchemaWithPipe<
6169
6381
  readonly [
6170
6382
  v.StringSchema<undefined>,
6171
6383
  v.RegexAction<string, string>,
6172
6384
  ]
6173
6385
  >;
6174
- readonly title: v.OptionalSchema<
6386
+ title: v.OptionalSchema<
6175
6387
  v.StringSchema<undefined>,
6176
6388
  undefined
6177
6389
  >;
6178
- readonly description: v.OptionalSchema<
6390
+ description: v.OptionalSchema<
6179
6391
  v.StringSchema<undefined>,
6180
6392
  undefined
6181
6393
  >;
@@ -6186,11 +6398,44 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6186
6398
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
6187
6399
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
6188
6400
  */
6189
- readonly required: v.OptionalSchema<
6401
+ required: v.OptionalSchema<
6190
6402
  v.BooleanSchema<undefined>,
6191
6403
  undefined
6192
6404
  >;
6193
- readonly source: v.GenericSchema<SourceInternal>;
6405
+ source: v.GenericSchema<SourceInternal>;
6406
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
6407
+ editable: v.OptionalSchema<
6408
+ v.UnionSchema<
6409
+ [
6410
+ v.LiteralSchema<true, undefined>,
6411
+ v.ArraySchema<
6412
+ v.SchemaWithPipe<
6413
+ readonly [
6414
+ v.StringSchema<undefined>,
6415
+ v.MinLengthAction<
6416
+ string,
6417
+ 1,
6418
+ "must be a non-empty string"
6419
+ >,
6420
+ ]
6421
+ >,
6422
+ undefined
6423
+ >,
6424
+ v.SchemaWithPipe<
6425
+ readonly [
6426
+ v.StringSchema<undefined>,
6427
+ v.MinLengthAction<
6428
+ string,
6429
+ 1,
6430
+ "must be a non-empty string"
6431
+ >,
6432
+ ]
6433
+ >,
6434
+ ],
6435
+ undefined
6436
+ >,
6437
+ undefined
6438
+ >;
6194
6439
  },
6195
6440
  undefined
6196
6441
  >,
@@ -6221,6 +6466,54 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6221
6466
  >,
6222
6467
  undefined
6223
6468
  >;
6469
+ /**
6470
+ * Tighten-only editability overrides for the time this stage holds, keyed
6471
+ * by an in-scope slot name. The slot's own `editable` is the ceiling; a
6472
+ * stage value is ANDed with it at runtime, so an override can only NARROW
6473
+ * (never open a slot the baseline left closed). An unlisted slot inherits
6474
+ * its baseline.
6475
+ */
6476
+ editable: v.OptionalSchema<
6477
+ v.RecordSchema<
6478
+ v.SchemaWithPipe<
6479
+ readonly [
6480
+ v.StringSchema<undefined>,
6481
+ v.RegexAction<string, string>,
6482
+ ]
6483
+ >,
6484
+ v.UnionSchema<
6485
+ [
6486
+ v.LiteralSchema<true, undefined>,
6487
+ v.ArraySchema<
6488
+ v.SchemaWithPipe<
6489
+ readonly [
6490
+ v.StringSchema<undefined>,
6491
+ v.MinLengthAction<
6492
+ string,
6493
+ 1,
6494
+ "must be a non-empty string"
6495
+ >,
6496
+ ]
6497
+ >,
6498
+ undefined
6499
+ >,
6500
+ v.SchemaWithPipe<
6501
+ readonly [
6502
+ v.StringSchema<undefined>,
6503
+ v.MinLengthAction<
6504
+ string,
6505
+ 1,
6506
+ "must be a non-empty string"
6507
+ >,
6508
+ ]
6509
+ >,
6510
+ ],
6511
+ undefined
6512
+ >,
6513
+ undefined
6514
+ >,
6515
+ undefined
6516
+ >;
6224
6517
  },
6225
6518
  undefined
6226
6519
  >,
@@ -6563,6 +6856,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6563
6856
  description?: string | undefined;
6564
6857
  required?: boolean | undefined;
6565
6858
  source: SourceInternal;
6859
+ editable?: string | true | string[] | undefined;
6566
6860
  }
6567
6861
  | {
6568
6862
  type: "claim";
@@ -6705,6 +6999,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6705
6999
  description?: string | undefined;
6706
7000
  required?: boolean | undefined;
6707
7001
  source: SourceInternal;
7002
+ editable?: string | true | string[] | undefined;
6708
7003
  }
6709
7004
  | {
6710
7005
  type: "claim";
@@ -6714,6 +7009,11 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6714
7009
  }
6715
7010
  )[]
6716
7011
  | undefined;
7012
+ editable?:
7013
+ | {
7014
+ [x: string]: string | true | string[];
7015
+ }
7016
+ | undefined;
6717
7017
  }[],
6718
7018
  1,
6719
7019
  "must declare at least one stage"
@@ -6740,6 +7040,37 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6740
7040
  >,
6741
7041
  undefined
6742
7042
  >;
7043
+ /** Role aliasing for this definition — see {@link RoleAliasesSchema}. */
7044
+ roleAliases: v.OptionalSchema<
7045
+ v.RecordSchema<
7046
+ v.SchemaWithPipe<
7047
+ readonly [
7048
+ v.StringSchema<undefined>,
7049
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
7050
+ ]
7051
+ >,
7052
+ v.SchemaWithPipe<
7053
+ readonly [
7054
+ v.ArraySchema<
7055
+ v.SchemaWithPipe<
7056
+ readonly [
7057
+ v.StringSchema<undefined>,
7058
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
7059
+ ]
7060
+ >,
7061
+ undefined
7062
+ >,
7063
+ v.MinLengthAction<
7064
+ string[],
7065
+ 1,
7066
+ "a role alias must list at least one fulfilling role"
7067
+ >,
7068
+ ]
7069
+ >,
7070
+ undefined
7071
+ >,
7072
+ undefined
7073
+ >;
6743
7074
  },
6744
7075
  undefined
6745
7076
  >;
@@ -7096,7 +7427,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7096
7427
  v.ArraySchema<
7097
7428
  v.StrictObjectSchema<
7098
7429
  {
7099
- readonly type: v.PicklistSchema<
7430
+ type: v.PicklistSchema<
7100
7431
  readonly [
7101
7432
  "doc.ref",
7102
7433
  "doc.refs",
@@ -7114,20 +7445,14 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7114
7445
  ],
7115
7446
  `Invalid option: expected one of ${string}`
7116
7447
  >;
7117
- readonly name: v.SchemaWithPipe<
7448
+ name: v.SchemaWithPipe<
7118
7449
  readonly [
7119
7450
  v.StringSchema<undefined>,
7120
7451
  v.RegexAction<string, string>,
7121
7452
  ]
7122
7453
  >;
7123
- readonly title: v.OptionalSchema<
7124
- v.StringSchema<undefined>,
7125
- undefined
7126
- >;
7127
- readonly description: v.OptionalSchema<
7128
- v.StringSchema<undefined>,
7129
- undefined
7130
- >;
7454
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7455
+ description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7131
7456
  /**
7132
7457
  * When true, the caller MUST supply this entry at start (via
7133
7458
  * `initialState`) or spawn (via the parent's `subworkflows.with`). A
@@ -7135,11 +7460,28 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7135
7460
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
7136
7461
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
7137
7462
  */
7138
- readonly required: v.OptionalSchema<
7139
- v.BooleanSchema<undefined>,
7463
+ required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
7464
+ source: v.GenericSchema<SourceInternal>;
7465
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
7466
+ editable: v.OptionalSchema<
7467
+ v.UnionSchema<
7468
+ [
7469
+ v.LiteralSchema<true, undefined>,
7470
+ v.SchemaWithPipe<
7471
+ readonly [
7472
+ v.StringSchema<undefined>,
7473
+ v.MinLengthAction<
7474
+ string,
7475
+ 1,
7476
+ "must be a non-empty string"
7477
+ >,
7478
+ ]
7479
+ >,
7480
+ ],
7481
+ undefined
7482
+ >,
7140
7483
  undefined
7141
7484
  >;
7142
- readonly source: v.GenericSchema<SourceInternal>;
7143
7485
  },
7144
7486
  undefined
7145
7487
  >,
@@ -7991,7 +8333,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7991
8333
  v.ArraySchema<
7992
8334
  v.StrictObjectSchema<
7993
8335
  {
7994
- readonly type: v.PicklistSchema<
8336
+ type: v.PicklistSchema<
7995
8337
  readonly [
7996
8338
  "doc.ref",
7997
8339
  "doc.refs",
@@ -8009,17 +8351,17 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8009
8351
  ],
8010
8352
  `Invalid option: expected one of ${string}`
8011
8353
  >;
8012
- readonly name: v.SchemaWithPipe<
8354
+ name: v.SchemaWithPipe<
8013
8355
  readonly [
8014
8356
  v.StringSchema<undefined>,
8015
8357
  v.RegexAction<string, string>,
8016
8358
  ]
8017
8359
  >;
8018
- readonly title: v.OptionalSchema<
8360
+ title: v.OptionalSchema<
8019
8361
  v.StringSchema<undefined>,
8020
8362
  undefined
8021
8363
  >;
8022
- readonly description: v.OptionalSchema<
8364
+ description: v.OptionalSchema<
8023
8365
  v.StringSchema<undefined>,
8024
8366
  undefined
8025
8367
  >;
@@ -8030,11 +8372,31 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8030
8372
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
8031
8373
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
8032
8374
  */
8033
- readonly required: v.OptionalSchema<
8375
+ required: v.OptionalSchema<
8034
8376
  v.BooleanSchema<undefined>,
8035
8377
  undefined
8036
8378
  >;
8037
- readonly source: v.GenericSchema<SourceInternal>;
8379
+ source: v.GenericSchema<SourceInternal>;
8380
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
8381
+ editable: v.OptionalSchema<
8382
+ v.UnionSchema<
8383
+ [
8384
+ v.LiteralSchema<true, undefined>,
8385
+ v.SchemaWithPipe<
8386
+ readonly [
8387
+ v.StringSchema<undefined>,
8388
+ v.MinLengthAction<
8389
+ string,
8390
+ 1,
8391
+ "must be a non-empty string"
8392
+ >,
8393
+ ]
8394
+ >,
8395
+ ],
8396
+ undefined
8397
+ >,
8398
+ undefined
8399
+ >;
8038
8400
  },
8039
8401
  undefined
8040
8402
  >,
@@ -8478,7 +8840,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8478
8840
  v.ArraySchema<
8479
8841
  v.StrictObjectSchema<
8480
8842
  {
8481
- readonly type: v.PicklistSchema<
8843
+ type: v.PicklistSchema<
8482
8844
  readonly [
8483
8845
  "doc.ref",
8484
8846
  "doc.refs",
@@ -8496,17 +8858,17 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8496
8858
  ],
8497
8859
  `Invalid option: expected one of ${string}`
8498
8860
  >;
8499
- readonly name: v.SchemaWithPipe<
8861
+ name: v.SchemaWithPipe<
8500
8862
  readonly [
8501
8863
  v.StringSchema<undefined>,
8502
8864
  v.RegexAction<string, string>,
8503
8865
  ]
8504
8866
  >;
8505
- readonly title: v.OptionalSchema<
8867
+ title: v.OptionalSchema<
8506
8868
  v.StringSchema<undefined>,
8507
8869
  undefined
8508
8870
  >;
8509
- readonly description: v.OptionalSchema<
8871
+ description: v.OptionalSchema<
8510
8872
  v.StringSchema<undefined>,
8511
8873
  undefined
8512
8874
  >;
@@ -8517,11 +8879,31 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8517
8879
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
8518
8880
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
8519
8881
  */
8520
- readonly required: v.OptionalSchema<
8882
+ required: v.OptionalSchema<
8521
8883
  v.BooleanSchema<undefined>,
8522
8884
  undefined
8523
8885
  >;
8524
- readonly source: v.GenericSchema<SourceInternal>;
8886
+ source: v.GenericSchema<SourceInternal>;
8887
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
8888
+ editable: v.OptionalSchema<
8889
+ v.UnionSchema<
8890
+ [
8891
+ v.LiteralSchema<true, undefined>,
8892
+ v.SchemaWithPipe<
8893
+ readonly [
8894
+ v.StringSchema<undefined>,
8895
+ v.MinLengthAction<
8896
+ string,
8897
+ 1,
8898
+ "must be a non-empty string"
8899
+ >,
8900
+ ]
8901
+ >,
8902
+ ],
8903
+ undefined
8904
+ >,
8905
+ undefined
8906
+ >;
8525
8907
  },
8526
8908
  undefined
8527
8909
  >,
@@ -8529,6 +8911,41 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8529
8911
  >,
8530
8912
  undefined
8531
8913
  >;
8914
+ /**
8915
+ * Tighten-only editability overrides for the time this stage holds, keyed
8916
+ * by an in-scope slot name. The slot's own `editable` is the ceiling; a
8917
+ * stage value is ANDed with it at runtime, so an override can only NARROW
8918
+ * (never open a slot the baseline left closed). An unlisted slot inherits
8919
+ * its baseline.
8920
+ */
8921
+ editable: v.OptionalSchema<
8922
+ v.RecordSchema<
8923
+ v.SchemaWithPipe<
8924
+ readonly [
8925
+ v.StringSchema<undefined>,
8926
+ v.RegexAction<string, string>,
8927
+ ]
8928
+ >,
8929
+ v.UnionSchema<
8930
+ [
8931
+ v.LiteralSchema<true, undefined>,
8932
+ v.SchemaWithPipe<
8933
+ readonly [
8934
+ v.StringSchema<undefined>,
8935
+ v.MinLengthAction<
8936
+ string,
8937
+ 1,
8938
+ "must be a non-empty string"
8939
+ >,
8940
+ ]
8941
+ >,
8942
+ ],
8943
+ undefined
8944
+ >,
8945
+ undefined
8946
+ >,
8947
+ undefined
8948
+ >;
8532
8949
  },
8533
8950
  undefined
8534
8951
  >,
@@ -8761,6 +9178,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8761
9178
  description?: string | undefined;
8762
9179
  required?: boolean | undefined;
8763
9180
  source: SourceInternal;
9181
+ editable?: string | true | undefined;
8764
9182
  }[]
8765
9183
  | undefined;
8766
9184
  }[]
@@ -8881,8 +9299,14 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8881
9299
  description?: string | undefined;
8882
9300
  required?: boolean | undefined;
8883
9301
  source: SourceInternal;
9302
+ editable?: string | true | undefined;
8884
9303
  }[]
8885
9304
  | undefined;
9305
+ editable?:
9306
+ | {
9307
+ [x: string]: string | true;
9308
+ }
9309
+ | undefined;
8886
9310
  }[],
8887
9311
  1,
8888
9312
  "must declare at least one stage"
@@ -8909,6 +9333,37 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8909
9333
  >,
8910
9334
  undefined
8911
9335
  >;
9336
+ /** Role aliasing for this definition — see {@link RoleAliasesSchema}. */
9337
+ roleAliases: v.OptionalSchema<
9338
+ v.RecordSchema<
9339
+ v.SchemaWithPipe<
9340
+ readonly [
9341
+ v.StringSchema<undefined>,
9342
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
9343
+ ]
9344
+ >,
9345
+ v.SchemaWithPipe<
9346
+ readonly [
9347
+ v.ArraySchema<
9348
+ v.SchemaWithPipe<
9349
+ readonly [
9350
+ v.StringSchema<undefined>,
9351
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
9352
+ ]
9353
+ >,
9354
+ undefined
9355
+ >,
9356
+ v.MinLengthAction<
9357
+ string[],
9358
+ 1,
9359
+ "a role alias must list at least one fulfilling role"
9360
+ >,
9361
+ ]
9362
+ >,
9363
+ undefined
9364
+ >,
9365
+ undefined
9366
+ >;
8912
9367
  },
8913
9368
  undefined
8914
9369
  >;