@sanity/workflow-engine 0.10.0 → 0.11.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/_chunks-cjs/schema.cjs +41 -5
- package/dist/_chunks-cjs/schema.cjs.map +1 -1
- package/dist/_chunks-es/schema.js +41 -5
- package/dist/_chunks-es/schema.js.map +1 -1
- package/dist/define.cjs +53 -2
- package/dist/define.cjs.map +1 -1
- package/dist/define.d.cts +380 -2
- package/dist/define.d.ts +380 -2
- package/dist/define.js +53 -2
- package/dist/define.js.map +1 -1
- package/dist/index.cjs +61 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +718 -2
- package/dist/index.d.ts +718 -2
- package/dist/index.js +62 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -847,6 +847,65 @@ declare const AuthoringFieldEntrySchema: v.UnionSchema<
|
|
|
847
847
|
undefined
|
|
848
848
|
>;
|
|
849
849
|
|
|
850
|
+
export declare type AuthoringManualTarget = v.InferOutput<
|
|
851
|
+
typeof AuthoringManualTargetSchema
|
|
852
|
+
>;
|
|
853
|
+
|
|
854
|
+
declare const AuthoringManualTargetSchema: v.VariantSchema<
|
|
855
|
+
"type",
|
|
856
|
+
[
|
|
857
|
+
v.StrictObjectSchema<
|
|
858
|
+
{
|
|
859
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
860
|
+
readonly url: v.SchemaWithPipe<
|
|
861
|
+
readonly [
|
|
862
|
+
v.StringSchema<undefined>,
|
|
863
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
864
|
+
v.CheckAction<string, "must be an http(s) URL">,
|
|
865
|
+
]
|
|
866
|
+
>;
|
|
867
|
+
},
|
|
868
|
+
undefined
|
|
869
|
+
>,
|
|
870
|
+
v.StrictObjectSchema<
|
|
871
|
+
{
|
|
872
|
+
readonly type: v.LiteralSchema<"field", undefined>;
|
|
873
|
+
readonly field: v.UnionSchema<
|
|
874
|
+
[
|
|
875
|
+
v.SchemaWithPipe<
|
|
876
|
+
readonly [
|
|
877
|
+
v.StringSchema<undefined>,
|
|
878
|
+
v.MinLengthAction<string, 1, "must be a non-empty string">,
|
|
879
|
+
]
|
|
880
|
+
>,
|
|
881
|
+
v.StrictObjectSchema<
|
|
882
|
+
{
|
|
883
|
+
readonly scope: v.OptionalSchema<
|
|
884
|
+
v.PicklistSchema<
|
|
885
|
+
readonly ["workflow", "stage", "task"],
|
|
886
|
+
`Invalid option: expected one of ${string}`
|
|
887
|
+
>,
|
|
888
|
+
undefined
|
|
889
|
+
>;
|
|
890
|
+
readonly field: v.SchemaWithPipe<
|
|
891
|
+
readonly [
|
|
892
|
+
v.StringSchema<undefined>,
|
|
893
|
+
v.MinLengthAction<string, 1, "must be a non-empty string">,
|
|
894
|
+
]
|
|
895
|
+
>;
|
|
896
|
+
},
|
|
897
|
+
undefined
|
|
898
|
+
>,
|
|
899
|
+
],
|
|
900
|
+
undefined
|
|
901
|
+
>;
|
|
902
|
+
},
|
|
903
|
+
undefined
|
|
904
|
+
>,
|
|
905
|
+
],
|
|
906
|
+
undefined
|
|
907
|
+
>;
|
|
908
|
+
|
|
850
909
|
export declare type AuthoringStage = v.InferOutput<typeof AuthoringStageSchema>;
|
|
851
910
|
|
|
852
911
|
declare const AuthoringStageSchema: v.StrictObjectSchema<
|
|
@@ -871,6 +930,86 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
|
|
|
871
930
|
>;
|
|
872
931
|
title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
873
932
|
description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
933
|
+
/**
|
|
934
|
+
* Advisory BPMN-aligned classification of this task by its executor (see
|
|
935
|
+
* {@link TASK_KINDS}). Optional and derived from the task's shape when
|
|
936
|
+
* omitted; declaring it lets deploy check the shape matches the lane.
|
|
937
|
+
* Changes no gating or resolution — a label for tooling, like `assignees`.
|
|
938
|
+
*/
|
|
939
|
+
kind: v.OptionalSchema<
|
|
940
|
+
v.PicklistSchema<
|
|
941
|
+
readonly ["user", "service", "script", "manual", "receive"],
|
|
942
|
+
`Invalid option: expected one of ${string}`
|
|
943
|
+
>,
|
|
944
|
+
undefined
|
|
945
|
+
>;
|
|
946
|
+
/** Deep-link target for a `kind: "manual"` task (off-system work). Render-only
|
|
947
|
+
* metadata; only valid on a manual task (deploy-checked). */
|
|
948
|
+
target: v.OptionalSchema<
|
|
949
|
+
v.VariantSchema<
|
|
950
|
+
"type",
|
|
951
|
+
[
|
|
952
|
+
v.StrictObjectSchema<
|
|
953
|
+
{
|
|
954
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
955
|
+
readonly url: v.SchemaWithPipe<
|
|
956
|
+
readonly [
|
|
957
|
+
v.StringSchema<undefined>,
|
|
958
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
959
|
+
v.CheckAction<string, "must be an http(s) URL">,
|
|
960
|
+
]
|
|
961
|
+
>;
|
|
962
|
+
},
|
|
963
|
+
undefined
|
|
964
|
+
>,
|
|
965
|
+
v.StrictObjectSchema<
|
|
966
|
+
{
|
|
967
|
+
readonly type: v.LiteralSchema<"field", undefined>;
|
|
968
|
+
readonly field: v.UnionSchema<
|
|
969
|
+
[
|
|
970
|
+
v.SchemaWithPipe<
|
|
971
|
+
readonly [
|
|
972
|
+
v.StringSchema<undefined>,
|
|
973
|
+
v.MinLengthAction<
|
|
974
|
+
string,
|
|
975
|
+
1,
|
|
976
|
+
"must be a non-empty string"
|
|
977
|
+
>,
|
|
978
|
+
]
|
|
979
|
+
>,
|
|
980
|
+
v.StrictObjectSchema<
|
|
981
|
+
{
|
|
982
|
+
readonly scope: v.OptionalSchema<
|
|
983
|
+
v.PicklistSchema<
|
|
984
|
+
readonly ["workflow", "stage", "task"],
|
|
985
|
+
`Invalid option: expected one of ${string}`
|
|
986
|
+
>,
|
|
987
|
+
undefined
|
|
988
|
+
>;
|
|
989
|
+
readonly field: v.SchemaWithPipe<
|
|
990
|
+
readonly [
|
|
991
|
+
v.StringSchema<undefined>,
|
|
992
|
+
v.MinLengthAction<
|
|
993
|
+
string,
|
|
994
|
+
1,
|
|
995
|
+
"must be a non-empty string"
|
|
996
|
+
>,
|
|
997
|
+
]
|
|
998
|
+
>;
|
|
999
|
+
},
|
|
1000
|
+
undefined
|
|
1001
|
+
>,
|
|
1002
|
+
],
|
|
1003
|
+
undefined
|
|
1004
|
+
>;
|
|
1005
|
+
},
|
|
1006
|
+
undefined
|
|
1007
|
+
>,
|
|
1008
|
+
],
|
|
1009
|
+
undefined
|
|
1010
|
+
>,
|
|
1011
|
+
undefined
|
|
1012
|
+
>;
|
|
874
1013
|
activation: v.OptionalSchema<
|
|
875
1014
|
v.PicklistSchema<
|
|
876
1015
|
readonly ["auto", "manual"],
|
|
@@ -2784,6 +2923,86 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
|
|
|
2784
2923
|
>;
|
|
2785
2924
|
title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2786
2925
|
description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2926
|
+
/**
|
|
2927
|
+
* Advisory BPMN-aligned classification of this task by its executor (see
|
|
2928
|
+
* {@link TASK_KINDS}). Optional and derived from the task's shape when
|
|
2929
|
+
* omitted; declaring it lets deploy check the shape matches the lane.
|
|
2930
|
+
* Changes no gating or resolution — a label for tooling, like `assignees`.
|
|
2931
|
+
*/
|
|
2932
|
+
kind: v.OptionalSchema<
|
|
2933
|
+
v.PicklistSchema<
|
|
2934
|
+
readonly ["user", "service", "script", "manual", "receive"],
|
|
2935
|
+
`Invalid option: expected one of ${string}`
|
|
2936
|
+
>,
|
|
2937
|
+
undefined
|
|
2938
|
+
>;
|
|
2939
|
+
/** Deep-link target for a `kind: "manual"` task (off-system work). Render-only
|
|
2940
|
+
* metadata; only valid on a manual task (deploy-checked). */
|
|
2941
|
+
target: v.OptionalSchema<
|
|
2942
|
+
v.VariantSchema<
|
|
2943
|
+
"type",
|
|
2944
|
+
[
|
|
2945
|
+
v.StrictObjectSchema<
|
|
2946
|
+
{
|
|
2947
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
2948
|
+
readonly url: v.SchemaWithPipe<
|
|
2949
|
+
readonly [
|
|
2950
|
+
v.StringSchema<undefined>,
|
|
2951
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
2952
|
+
v.CheckAction<string, "must be an http(s) URL">,
|
|
2953
|
+
]
|
|
2954
|
+
>;
|
|
2955
|
+
},
|
|
2956
|
+
undefined
|
|
2957
|
+
>,
|
|
2958
|
+
v.StrictObjectSchema<
|
|
2959
|
+
{
|
|
2960
|
+
readonly type: v.LiteralSchema<"field", undefined>;
|
|
2961
|
+
readonly field: v.UnionSchema<
|
|
2962
|
+
[
|
|
2963
|
+
v.SchemaWithPipe<
|
|
2964
|
+
readonly [
|
|
2965
|
+
v.StringSchema<undefined>,
|
|
2966
|
+
v.MinLengthAction<
|
|
2967
|
+
string,
|
|
2968
|
+
1,
|
|
2969
|
+
"must be a non-empty string"
|
|
2970
|
+
>,
|
|
2971
|
+
]
|
|
2972
|
+
>,
|
|
2973
|
+
v.StrictObjectSchema<
|
|
2974
|
+
{
|
|
2975
|
+
readonly scope: v.OptionalSchema<
|
|
2976
|
+
v.PicklistSchema<
|
|
2977
|
+
readonly ["workflow", "stage", "task"],
|
|
2978
|
+
`Invalid option: expected one of ${string}`
|
|
2979
|
+
>,
|
|
2980
|
+
undefined
|
|
2981
|
+
>;
|
|
2982
|
+
readonly field: v.SchemaWithPipe<
|
|
2983
|
+
readonly [
|
|
2984
|
+
v.StringSchema<undefined>,
|
|
2985
|
+
v.MinLengthAction<
|
|
2986
|
+
string,
|
|
2987
|
+
1,
|
|
2988
|
+
"must be a non-empty string"
|
|
2989
|
+
>,
|
|
2990
|
+
]
|
|
2991
|
+
>;
|
|
2992
|
+
},
|
|
2993
|
+
undefined
|
|
2994
|
+
>,
|
|
2995
|
+
],
|
|
2996
|
+
undefined
|
|
2997
|
+
>;
|
|
2998
|
+
},
|
|
2999
|
+
undefined
|
|
3000
|
+
>,
|
|
3001
|
+
],
|
|
3002
|
+
undefined
|
|
3003
|
+
>,
|
|
3004
|
+
undefined
|
|
3005
|
+
>;
|
|
2787
3006
|
activation: v.OptionalSchema<
|
|
2788
3007
|
v.PicklistSchema<
|
|
2789
3008
|
readonly ["auto", "manual"],
|
|
@@ -4471,6 +4690,105 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
|
|
|
4471
4690
|
v.StringSchema<undefined>,
|
|
4472
4691
|
undefined
|
|
4473
4692
|
>;
|
|
4693
|
+
/**
|
|
4694
|
+
* Advisory BPMN-aligned classification of this task by its executor (see
|
|
4695
|
+
* {@link TASK_KINDS}). Optional and derived from the task's shape when
|
|
4696
|
+
* omitted; declaring it lets deploy check the shape matches the lane.
|
|
4697
|
+
* Changes no gating or resolution — a label for tooling, like `assignees`.
|
|
4698
|
+
*/
|
|
4699
|
+
kind: v.OptionalSchema<
|
|
4700
|
+
v.PicklistSchema<
|
|
4701
|
+
readonly [
|
|
4702
|
+
"user",
|
|
4703
|
+
"service",
|
|
4704
|
+
"script",
|
|
4705
|
+
"manual",
|
|
4706
|
+
"receive",
|
|
4707
|
+
],
|
|
4708
|
+
`Invalid option: expected one of ${string}`
|
|
4709
|
+
>,
|
|
4710
|
+
undefined
|
|
4711
|
+
>;
|
|
4712
|
+
/** Deep-link target for a `kind: "manual"` task (off-system work). Render-only
|
|
4713
|
+
* metadata; only valid on a manual task (deploy-checked). */
|
|
4714
|
+
target: v.OptionalSchema<
|
|
4715
|
+
v.VariantSchema<
|
|
4716
|
+
"type",
|
|
4717
|
+
[
|
|
4718
|
+
v.StrictObjectSchema<
|
|
4719
|
+
{
|
|
4720
|
+
readonly type: v.LiteralSchema<
|
|
4721
|
+
"url",
|
|
4722
|
+
undefined
|
|
4723
|
+
>;
|
|
4724
|
+
readonly url: v.SchemaWithPipe<
|
|
4725
|
+
readonly [
|
|
4726
|
+
v.StringSchema<undefined>,
|
|
4727
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
4728
|
+
v.CheckAction<
|
|
4729
|
+
string,
|
|
4730
|
+
"must be an http(s) URL"
|
|
4731
|
+
>,
|
|
4732
|
+
]
|
|
4733
|
+
>;
|
|
4734
|
+
},
|
|
4735
|
+
undefined
|
|
4736
|
+
>,
|
|
4737
|
+
v.StrictObjectSchema<
|
|
4738
|
+
{
|
|
4739
|
+
readonly type: v.LiteralSchema<
|
|
4740
|
+
"field",
|
|
4741
|
+
undefined
|
|
4742
|
+
>;
|
|
4743
|
+
readonly field: v.UnionSchema<
|
|
4744
|
+
[
|
|
4745
|
+
v.SchemaWithPipe<
|
|
4746
|
+
readonly [
|
|
4747
|
+
v.StringSchema<undefined>,
|
|
4748
|
+
v.MinLengthAction<
|
|
4749
|
+
string,
|
|
4750
|
+
1,
|
|
4751
|
+
"must be a non-empty string"
|
|
4752
|
+
>,
|
|
4753
|
+
]
|
|
4754
|
+
>,
|
|
4755
|
+
v.StrictObjectSchema<
|
|
4756
|
+
{
|
|
4757
|
+
readonly scope: v.OptionalSchema<
|
|
4758
|
+
v.PicklistSchema<
|
|
4759
|
+
readonly [
|
|
4760
|
+
"workflow",
|
|
4761
|
+
"stage",
|
|
4762
|
+
"task",
|
|
4763
|
+
],
|
|
4764
|
+
`Invalid option: expected one of ${string}`
|
|
4765
|
+
>,
|
|
4766
|
+
undefined
|
|
4767
|
+
>;
|
|
4768
|
+
readonly field: v.SchemaWithPipe<
|
|
4769
|
+
readonly [
|
|
4770
|
+
v.StringSchema<undefined>,
|
|
4771
|
+
v.MinLengthAction<
|
|
4772
|
+
string,
|
|
4773
|
+
1,
|
|
4774
|
+
"must be a non-empty string"
|
|
4775
|
+
>,
|
|
4776
|
+
]
|
|
4777
|
+
>;
|
|
4778
|
+
},
|
|
4779
|
+
undefined
|
|
4780
|
+
>,
|
|
4781
|
+
],
|
|
4782
|
+
undefined
|
|
4783
|
+
>;
|
|
4784
|
+
},
|
|
4785
|
+
undefined
|
|
4786
|
+
>,
|
|
4787
|
+
],
|
|
4788
|
+
undefined
|
|
4789
|
+
>,
|
|
4790
|
+
undefined
|
|
4791
|
+
>;
|
|
4474
4792
|
activation: v.OptionalSchema<
|
|
4475
4793
|
v.PicklistSchema<
|
|
4476
4794
|
readonly ["auto", "manual"],
|
|
@@ -6524,7 +6842,29 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
|
|
|
6524
6842
|
name: string;
|
|
6525
6843
|
title?: string | undefined;
|
|
6526
6844
|
description?: string | undefined;
|
|
6527
|
-
|
|
6845
|
+
kind?:
|
|
6846
|
+
| "user"
|
|
6847
|
+
| "service"
|
|
6848
|
+
| "script"
|
|
6849
|
+
| "manual"
|
|
6850
|
+
| "receive"
|
|
6851
|
+
| undefined;
|
|
6852
|
+
target?:
|
|
6853
|
+
| {
|
|
6854
|
+
type: "url";
|
|
6855
|
+
url: string;
|
|
6856
|
+
}
|
|
6857
|
+
| {
|
|
6858
|
+
type: "field";
|
|
6859
|
+
field:
|
|
6860
|
+
| string
|
|
6861
|
+
| {
|
|
6862
|
+
scope?: "workflow" | "stage" | "task" | undefined;
|
|
6863
|
+
field: string;
|
|
6864
|
+
};
|
|
6865
|
+
}
|
|
6866
|
+
| undefined;
|
|
6867
|
+
activation?: "manual" | "auto" | undefined;
|
|
6528
6868
|
filter?: string | undefined;
|
|
6529
6869
|
requirements?:
|
|
6530
6870
|
| {
|
|
@@ -7466,6 +7806,17 @@ export declare interface DeployTarget {
|
|
|
7466
7806
|
workflowResource: WorkflowResource;
|
|
7467
7807
|
}
|
|
7468
7808
|
|
|
7809
|
+
/**
|
|
7810
|
+
* Classify a task from its shape, in precedence order: a task a person acts on
|
|
7811
|
+
* (`actions`) is `user`; otherwise an automated effect step is `service`;
|
|
7812
|
+
* otherwise a task that waits on a condition (`completeWhen` or a `subworkflows`
|
|
7813
|
+
* fan-out) is `receive`; otherwise an inline machine step is `script`.
|
|
7814
|
+
*
|
|
7815
|
+
* Never returns `manual` — off-system work reads identically to a `user` or
|
|
7816
|
+
* `receive` task by shape, so it is only ever an EXPLICIT {@link Task.kind}.
|
|
7817
|
+
*/
|
|
7818
|
+
export declare function deriveTaskKind(task: Task): TaskKind;
|
|
7819
|
+
|
|
7469
7820
|
/**
|
|
7470
7821
|
* The slice of an instance + its {@link WorkflowEvaluation} the classifier
|
|
7471
7822
|
* reads. Narrowed so callers (and tests) can craft an exact stuck permutation
|
|
@@ -7675,6 +8026,50 @@ export declare interface DrainEffectsResult {
|
|
|
7675
8026
|
skipped: PendingEffect[];
|
|
7676
8027
|
}
|
|
7677
8028
|
|
|
8029
|
+
/**
|
|
8030
|
+
* Driver-kind labels — the actor glyph for "who fired this action", recorded
|
|
8031
|
+
* on the `actionFired` history entry. Standalone for the same reason as
|
|
8032
|
+
* {@link TASK_KIND_DISPLAY}.
|
|
8033
|
+
*/
|
|
8034
|
+
export declare const DRIVER_KIND_DISPLAY: {
|
|
8035
|
+
person: {
|
|
8036
|
+
title: string;
|
|
8037
|
+
description: string;
|
|
8038
|
+
};
|
|
8039
|
+
agent: {
|
|
8040
|
+
title: string;
|
|
8041
|
+
description: string;
|
|
8042
|
+
};
|
|
8043
|
+
service: {
|
|
8044
|
+
title: string;
|
|
8045
|
+
description: string;
|
|
8046
|
+
};
|
|
8047
|
+
engine: {
|
|
8048
|
+
title: string;
|
|
8049
|
+
description: string;
|
|
8050
|
+
};
|
|
8051
|
+
};
|
|
8052
|
+
|
|
8053
|
+
export declare const DRIVER_KINDS: readonly [
|
|
8054
|
+
"person",
|
|
8055
|
+
"agent",
|
|
8056
|
+
"service",
|
|
8057
|
+
"engine",
|
|
8058
|
+
];
|
|
8059
|
+
|
|
8060
|
+
export declare type DriverKind = (typeof DRIVER_KINDS)[number];
|
|
8061
|
+
|
|
8062
|
+
/**
|
|
8063
|
+
* Classify the actor that drove an action for the audit-trail glyph: a human is
|
|
8064
|
+
* a `person`, an LLM is an `agent`, and a `system` actor is the `engine` itself
|
|
8065
|
+
* ({@link isEngineActor}) or otherwise an external `service`.
|
|
8066
|
+
*
|
|
8067
|
+
* Advisory and only as trustworthy as the {@link Actor} it reads — actor
|
|
8068
|
+
* identity is itself advisory in this engine (the lake/token is authoritative),
|
|
8069
|
+
* so this is a best-effort glyph, never an authorization signal.
|
|
8070
|
+
*/
|
|
8071
|
+
export declare function driverKind(actor: Actor): DriverKind;
|
|
8072
|
+
|
|
7678
8073
|
export declare type Editable = v.InferOutput<typeof StoredEditableSchema>;
|
|
7679
8074
|
|
|
7680
8075
|
/**
|
|
@@ -8850,6 +9245,12 @@ export declare type HistoryEntry =
|
|
|
8850
9245
|
task: TaskName;
|
|
8851
9246
|
action: ActionName;
|
|
8852
9247
|
actor?: Actor;
|
|
9248
|
+
/**
|
|
9249
|
+
* What KIND of driver fired the action, derived from {@link actor} at
|
|
9250
|
+
* fire time (see `../task-kind.ts`) — the audit-trail glyph's
|
|
9251
|
+
* person/agent/service/engine axis. Absent when no actor was supplied.
|
|
9252
|
+
*/
|
|
9253
|
+
driverKind?: DriverKind;
|
|
8853
9254
|
}
|
|
8854
9255
|
| {
|
|
8855
9256
|
_key: string;
|
|
@@ -9069,6 +9470,10 @@ export declare interface LoadedDoc {
|
|
|
9069
9470
|
|
|
9070
9471
|
export declare type LoggerFactory = (name: string) => EngineLogger;
|
|
9071
9472
|
|
|
9473
|
+
export declare type ManualTarget = v.InferOutput<
|
|
9474
|
+
typeof StoredManualTargetSchema
|
|
9475
|
+
>;
|
|
9476
|
+
|
|
9072
9477
|
/**
|
|
9073
9478
|
* Evaluate a grant's GROQ filter against a single document with the
|
|
9074
9479
|
* supplied identity. Returns true iff the document survives the filter.
|
|
@@ -10123,6 +10528,47 @@ declare const StoredFieldRefSchema: v.StrictObjectSchema<
|
|
|
10123
10528
|
undefined
|
|
10124
10529
|
>;
|
|
10125
10530
|
|
|
10531
|
+
declare const StoredManualTargetSchema: v.VariantSchema<
|
|
10532
|
+
"type",
|
|
10533
|
+
[
|
|
10534
|
+
v.StrictObjectSchema<
|
|
10535
|
+
{
|
|
10536
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
10537
|
+
readonly url: v.SchemaWithPipe<
|
|
10538
|
+
readonly [
|
|
10539
|
+
v.StringSchema<undefined>,
|
|
10540
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
10541
|
+
v.CheckAction<string, "must be an http(s) URL">,
|
|
10542
|
+
]
|
|
10543
|
+
>;
|
|
10544
|
+
},
|
|
10545
|
+
undefined
|
|
10546
|
+
>,
|
|
10547
|
+
v.StrictObjectSchema<
|
|
10548
|
+
{
|
|
10549
|
+
readonly type: v.LiteralSchema<"field", undefined>;
|
|
10550
|
+
readonly field: v.StrictObjectSchema<
|
|
10551
|
+
{
|
|
10552
|
+
readonly scope: v.PicklistSchema<
|
|
10553
|
+
readonly ["workflow", "stage", "task"],
|
|
10554
|
+
`Invalid option: expected one of ${string}`
|
|
10555
|
+
>;
|
|
10556
|
+
readonly field: v.SchemaWithPipe<
|
|
10557
|
+
readonly [
|
|
10558
|
+
v.StringSchema<undefined>,
|
|
10559
|
+
v.MinLengthAction<string, 1, "must be a non-empty string">,
|
|
10560
|
+
]
|
|
10561
|
+
>;
|
|
10562
|
+
},
|
|
10563
|
+
undefined
|
|
10564
|
+
>;
|
|
10565
|
+
},
|
|
10566
|
+
undefined
|
|
10567
|
+
>,
|
|
10568
|
+
],
|
|
10569
|
+
undefined
|
|
10570
|
+
>;
|
|
10571
|
+
|
|
10126
10572
|
declare const StoredOpSchema: v.VariantSchema<
|
|
10127
10573
|
"type",
|
|
10128
10574
|
[
|
|
@@ -10278,6 +10724,68 @@ declare const StoredStageSchema: v.StrictObjectSchema<
|
|
|
10278
10724
|
>;
|
|
10279
10725
|
title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
10280
10726
|
description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
10727
|
+
/**
|
|
10728
|
+
* Advisory BPMN-aligned classification of this task by its executor (see
|
|
10729
|
+
* {@link TASK_KINDS}). Optional and derived from the task's shape when
|
|
10730
|
+
* omitted; declaring it lets deploy check the shape matches the lane.
|
|
10731
|
+
* Changes no gating or resolution — a label for tooling, like `assignees`.
|
|
10732
|
+
*/
|
|
10733
|
+
kind: v.OptionalSchema<
|
|
10734
|
+
v.PicklistSchema<
|
|
10735
|
+
readonly ["user", "service", "script", "manual", "receive"],
|
|
10736
|
+
`Invalid option: expected one of ${string}`
|
|
10737
|
+
>,
|
|
10738
|
+
undefined
|
|
10739
|
+
>;
|
|
10740
|
+
/** Deep-link target for a `kind: "manual"` task (off-system work). Render-only
|
|
10741
|
+
* metadata; only valid on a manual task (deploy-checked). */
|
|
10742
|
+
target: v.OptionalSchema<
|
|
10743
|
+
v.VariantSchema<
|
|
10744
|
+
"type",
|
|
10745
|
+
[
|
|
10746
|
+
v.StrictObjectSchema<
|
|
10747
|
+
{
|
|
10748
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
10749
|
+
readonly url: v.SchemaWithPipe<
|
|
10750
|
+
readonly [
|
|
10751
|
+
v.StringSchema<undefined>,
|
|
10752
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
10753
|
+
v.CheckAction<string, "must be an http(s) URL">,
|
|
10754
|
+
]
|
|
10755
|
+
>;
|
|
10756
|
+
},
|
|
10757
|
+
undefined
|
|
10758
|
+
>,
|
|
10759
|
+
v.StrictObjectSchema<
|
|
10760
|
+
{
|
|
10761
|
+
readonly type: v.LiteralSchema<"field", undefined>;
|
|
10762
|
+
readonly field: v.StrictObjectSchema<
|
|
10763
|
+
{
|
|
10764
|
+
readonly scope: v.PicklistSchema<
|
|
10765
|
+
readonly ["workflow", "stage", "task"],
|
|
10766
|
+
`Invalid option: expected one of ${string}`
|
|
10767
|
+
>;
|
|
10768
|
+
readonly field: v.SchemaWithPipe<
|
|
10769
|
+
readonly [
|
|
10770
|
+
v.StringSchema<undefined>,
|
|
10771
|
+
v.MinLengthAction<
|
|
10772
|
+
string,
|
|
10773
|
+
1,
|
|
10774
|
+
"must be a non-empty string"
|
|
10775
|
+
>,
|
|
10776
|
+
]
|
|
10777
|
+
>;
|
|
10778
|
+
},
|
|
10779
|
+
undefined
|
|
10780
|
+
>;
|
|
10781
|
+
},
|
|
10782
|
+
undefined
|
|
10783
|
+
>,
|
|
10784
|
+
],
|
|
10785
|
+
undefined
|
|
10786
|
+
>,
|
|
10787
|
+
undefined
|
|
10788
|
+
>;
|
|
10281
10789
|
activation: v.OptionalSchema<
|
|
10282
10790
|
v.PicklistSchema<
|
|
10283
10791
|
readonly ["auto", "manual"],
|
|
@@ -11612,6 +12120,68 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
|
|
|
11612
12120
|
>;
|
|
11613
12121
|
title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
11614
12122
|
description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
12123
|
+
/**
|
|
12124
|
+
* Advisory BPMN-aligned classification of this task by its executor (see
|
|
12125
|
+
* {@link TASK_KINDS}). Optional and derived from the task's shape when
|
|
12126
|
+
* omitted; declaring it lets deploy check the shape matches the lane.
|
|
12127
|
+
* Changes no gating or resolution — a label for tooling, like `assignees`.
|
|
12128
|
+
*/
|
|
12129
|
+
kind: v.OptionalSchema<
|
|
12130
|
+
v.PicklistSchema<
|
|
12131
|
+
readonly ["user", "service", "script", "manual", "receive"],
|
|
12132
|
+
`Invalid option: expected one of ${string}`
|
|
12133
|
+
>,
|
|
12134
|
+
undefined
|
|
12135
|
+
>;
|
|
12136
|
+
/** Deep-link target for a `kind: "manual"` task (off-system work). Render-only
|
|
12137
|
+
* metadata; only valid on a manual task (deploy-checked). */
|
|
12138
|
+
target: v.OptionalSchema<
|
|
12139
|
+
v.VariantSchema<
|
|
12140
|
+
"type",
|
|
12141
|
+
[
|
|
12142
|
+
v.StrictObjectSchema<
|
|
12143
|
+
{
|
|
12144
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
12145
|
+
readonly url: v.SchemaWithPipe<
|
|
12146
|
+
readonly [
|
|
12147
|
+
v.StringSchema<undefined>,
|
|
12148
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
12149
|
+
v.CheckAction<string, "must be an http(s) URL">,
|
|
12150
|
+
]
|
|
12151
|
+
>;
|
|
12152
|
+
},
|
|
12153
|
+
undefined
|
|
12154
|
+
>,
|
|
12155
|
+
v.StrictObjectSchema<
|
|
12156
|
+
{
|
|
12157
|
+
readonly type: v.LiteralSchema<"field", undefined>;
|
|
12158
|
+
readonly field: v.StrictObjectSchema<
|
|
12159
|
+
{
|
|
12160
|
+
readonly scope: v.PicklistSchema<
|
|
12161
|
+
readonly ["workflow", "stage", "task"],
|
|
12162
|
+
`Invalid option: expected one of ${string}`
|
|
12163
|
+
>;
|
|
12164
|
+
readonly field: v.SchemaWithPipe<
|
|
12165
|
+
readonly [
|
|
12166
|
+
v.StringSchema<undefined>,
|
|
12167
|
+
v.MinLengthAction<
|
|
12168
|
+
string,
|
|
12169
|
+
1,
|
|
12170
|
+
"must be a non-empty string"
|
|
12171
|
+
>,
|
|
12172
|
+
]
|
|
12173
|
+
>;
|
|
12174
|
+
},
|
|
12175
|
+
undefined
|
|
12176
|
+
>;
|
|
12177
|
+
},
|
|
12178
|
+
undefined
|
|
12179
|
+
>,
|
|
12180
|
+
],
|
|
12181
|
+
undefined
|
|
12182
|
+
>,
|
|
12183
|
+
undefined
|
|
12184
|
+
>;
|
|
11615
12185
|
activation: v.OptionalSchema<
|
|
11616
12186
|
v.PicklistSchema<
|
|
11617
12187
|
readonly ["auto", "manual"],
|
|
@@ -12873,6 +13443,43 @@ export declare function tagScopeFilter(): string;
|
|
|
12873
13443
|
|
|
12874
13444
|
export declare type Task = v.InferOutput<typeof StoredTaskSchema>;
|
|
12875
13445
|
|
|
13446
|
+
/**
|
|
13447
|
+
* Task-kind labels — the per-kind renderer's heading + tooltip. Kept OUT of
|
|
13448
|
+
* the combined {@link DISPLAY} map: kinds are a classification axis a consumer
|
|
13449
|
+
* looks up deliberately, not a `_type`, and `"service"` collides with the
|
|
13450
|
+
* same-named {@link DRIVER_KIND_DISPLAY} key.
|
|
13451
|
+
*/
|
|
13452
|
+
export declare const TASK_KIND_DISPLAY: {
|
|
13453
|
+
user: {
|
|
13454
|
+
title: string;
|
|
13455
|
+
description: string;
|
|
13456
|
+
};
|
|
13457
|
+
service: {
|
|
13458
|
+
title: string;
|
|
13459
|
+
description: string;
|
|
13460
|
+
};
|
|
13461
|
+
script: {
|
|
13462
|
+
title: string;
|
|
13463
|
+
description: string;
|
|
13464
|
+
};
|
|
13465
|
+
manual: {
|
|
13466
|
+
title: string;
|
|
13467
|
+
description: string;
|
|
13468
|
+
};
|
|
13469
|
+
receive: {
|
|
13470
|
+
title: string;
|
|
13471
|
+
description: string;
|
|
13472
|
+
};
|
|
13473
|
+
};
|
|
13474
|
+
|
|
13475
|
+
export declare const TASK_KINDS: readonly [
|
|
13476
|
+
"user",
|
|
13477
|
+
"service",
|
|
13478
|
+
"script",
|
|
13479
|
+
"manual",
|
|
13480
|
+
"receive",
|
|
13481
|
+
];
|
|
13482
|
+
|
|
12876
13483
|
/**
|
|
12877
13484
|
* Leaf enums — the const arrays (and their derived union types) that both
|
|
12878
13485
|
* the authoring schema and the engine address by name.
|
|
@@ -12924,6 +13531,12 @@ export declare interface TaskEntry {
|
|
|
12924
13531
|
export declare interface TaskEvaluation {
|
|
12925
13532
|
task: Task;
|
|
12926
13533
|
status: TaskStatus;
|
|
13534
|
+
/**
|
|
13535
|
+
* The task's effective {@link TaskKind} — the explicit {@link Task.kind}, or
|
|
13536
|
+
* the shape-derived default when omitted. Advisory: a label so a consumer can
|
|
13537
|
+
* render each task as what it is (decision / wait / effect / off-system).
|
|
13538
|
+
*/
|
|
13539
|
+
kind: TaskKind;
|
|
12927
13540
|
/** Whether this task is the current actor's responsibility right now. */
|
|
12928
13541
|
pendingOnActor: boolean;
|
|
12929
13542
|
/**
|
|
@@ -12936,6 +13549,12 @@ export declare interface TaskEvaluation {
|
|
|
12936
13549
|
actions: ActionEvaluation[];
|
|
12937
13550
|
}
|
|
12938
13551
|
|
|
13552
|
+
export declare type TaskKind = (typeof TASK_KINDS)[number];
|
|
13553
|
+
|
|
13554
|
+
/** The effective kind of a task: the explicitly declared {@link Task.kind}, or
|
|
13555
|
+
* the shape-derived default when omitted. */
|
|
13556
|
+
export declare function taskKind(task: Task): TaskKind;
|
|
13557
|
+
|
|
12939
13558
|
export declare type TaskName = string;
|
|
12940
13559
|
|
|
12941
13560
|
export declare type TaskStatus = (typeof TASK_STATUSES)[number];
|
|
@@ -13628,6 +14247,83 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
|
|
|
13628
14247
|
v.StringSchema<undefined>,
|
|
13629
14248
|
undefined
|
|
13630
14249
|
>;
|
|
14250
|
+
/**
|
|
14251
|
+
* Advisory BPMN-aligned classification of this task by its executor (see
|
|
14252
|
+
* {@link TASK_KINDS}). Optional and derived from the task's shape when
|
|
14253
|
+
* omitted; declaring it lets deploy check the shape matches the lane.
|
|
14254
|
+
* Changes no gating or resolution — a label for tooling, like `assignees`.
|
|
14255
|
+
*/
|
|
14256
|
+
kind: v.OptionalSchema<
|
|
14257
|
+
v.PicklistSchema<
|
|
14258
|
+
readonly [
|
|
14259
|
+
"user",
|
|
14260
|
+
"service",
|
|
14261
|
+
"script",
|
|
14262
|
+
"manual",
|
|
14263
|
+
"receive",
|
|
14264
|
+
],
|
|
14265
|
+
`Invalid option: expected one of ${string}`
|
|
14266
|
+
>,
|
|
14267
|
+
undefined
|
|
14268
|
+
>;
|
|
14269
|
+
/** Deep-link target for a `kind: "manual"` task (off-system work). Render-only
|
|
14270
|
+
* metadata; only valid on a manual task (deploy-checked). */
|
|
14271
|
+
target: v.OptionalSchema<
|
|
14272
|
+
v.VariantSchema<
|
|
14273
|
+
"type",
|
|
14274
|
+
[
|
|
14275
|
+
v.StrictObjectSchema<
|
|
14276
|
+
{
|
|
14277
|
+
readonly type: v.LiteralSchema<
|
|
14278
|
+
"url",
|
|
14279
|
+
undefined
|
|
14280
|
+
>;
|
|
14281
|
+
readonly url: v.SchemaWithPipe<
|
|
14282
|
+
readonly [
|
|
14283
|
+
v.StringSchema<undefined>,
|
|
14284
|
+
v.UrlAction<string, "must be a valid URL">,
|
|
14285
|
+
v.CheckAction<
|
|
14286
|
+
string,
|
|
14287
|
+
"must be an http(s) URL"
|
|
14288
|
+
>,
|
|
14289
|
+
]
|
|
14290
|
+
>;
|
|
14291
|
+
},
|
|
14292
|
+
undefined
|
|
14293
|
+
>,
|
|
14294
|
+
v.StrictObjectSchema<
|
|
14295
|
+
{
|
|
14296
|
+
readonly type: v.LiteralSchema<
|
|
14297
|
+
"field",
|
|
14298
|
+
undefined
|
|
14299
|
+
>;
|
|
14300
|
+
readonly field: v.StrictObjectSchema<
|
|
14301
|
+
{
|
|
14302
|
+
readonly scope: v.PicklistSchema<
|
|
14303
|
+
readonly ["workflow", "stage", "task"],
|
|
14304
|
+
`Invalid option: expected one of ${string}`
|
|
14305
|
+
>;
|
|
14306
|
+
readonly field: v.SchemaWithPipe<
|
|
14307
|
+
readonly [
|
|
14308
|
+
v.StringSchema<undefined>,
|
|
14309
|
+
v.MinLengthAction<
|
|
14310
|
+
string,
|
|
14311
|
+
1,
|
|
14312
|
+
"must be a non-empty string"
|
|
14313
|
+
>,
|
|
14314
|
+
]
|
|
14315
|
+
>;
|
|
14316
|
+
},
|
|
14317
|
+
undefined
|
|
14318
|
+
>;
|
|
14319
|
+
},
|
|
14320
|
+
undefined
|
|
14321
|
+
>,
|
|
14322
|
+
],
|
|
14323
|
+
undefined
|
|
14324
|
+
>,
|
|
14325
|
+
undefined
|
|
14326
|
+
>;
|
|
13631
14327
|
activation: v.OptionalSchema<
|
|
13632
14328
|
v.PicklistSchema<
|
|
13633
14329
|
readonly ["auto", "manual"],
|
|
@@ -15062,7 +15758,27 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
|
|
|
15062
15758
|
name: string;
|
|
15063
15759
|
title?: string | undefined;
|
|
15064
15760
|
description?: string | undefined;
|
|
15065
|
-
|
|
15761
|
+
kind?:
|
|
15762
|
+
| "user"
|
|
15763
|
+
| "service"
|
|
15764
|
+
| "script"
|
|
15765
|
+
| "manual"
|
|
15766
|
+
| "receive"
|
|
15767
|
+
| undefined;
|
|
15768
|
+
target?:
|
|
15769
|
+
| {
|
|
15770
|
+
type: "url";
|
|
15771
|
+
url: string;
|
|
15772
|
+
}
|
|
15773
|
+
| {
|
|
15774
|
+
type: "field";
|
|
15775
|
+
field: {
|
|
15776
|
+
scope: "workflow" | "stage" | "task";
|
|
15777
|
+
field: string;
|
|
15778
|
+
};
|
|
15779
|
+
}
|
|
15780
|
+
| undefined;
|
|
15781
|
+
activation?: "manual" | "auto" | undefined;
|
|
15066
15782
|
filter?: string | undefined;
|
|
15067
15783
|
requirements?:
|
|
15068
15784
|
| {
|