1- package obelisk : webhook @ 5.2 .0;
1+ package obelisk : webhook @ 5.3 .0;
22
33@since (version = 5.0.0 )
44interface webhook-support {
@@ -36,6 +36,9 @@ interface webhook-support {
3636 }
3737
3838 /// The status of an execution.
39+ ///
40+ /// Superseded by `execution-status-v2` , which additionally reports the
41+ /// `cancelling` state. Kept unchanged for backwards compatibility.
3942 @since (version = 5.0.0 )
4043 variant execution-status {
4144 /// Execution is scheduled to run at a specific time.
@@ -50,6 +53,23 @@ interface webhook-support {
5053 finished (execution-status-finished ),
5154 }
5255
56+ /// The status of an execution, including cancellation.
57+ @since (version = 5.3.0 )
58+ variant execution-status-v2 {
59+ /// Execution is scheduled to run at a specific time.
60+ pending-at (datetime ),
61+ /// Execution is currently being processed.
62+ locked ,
63+ /// Execution is currently paused.
64+ paused ,
65+ /// Execution is waiting for child executions to complete (workflows only).
66+ blocked-by-join-set ,
67+ /// Cancellation has been requested; the execution is being torn down.
68+ cancelling ,
69+ /// Execution has finished.
70+ finished (execution-status-finished ),
71+ }
72+
5373 /// The finished status of an execution.
5474 @since (version = 5.0.0 )
5575 variant execution-status-finished {
@@ -91,10 +111,18 @@ interface webhook-support {
91111 @since (version = 5.0.0 )
92112 schedule-json : func (execution-id : execution-id , schedule-at : schedule-at , function : function , params : string , config : option <submit-config >, backtrace : option <wasm-backtrace >) -> result <_ , schedule-json-error >;
93113
94- /// Get the current status of an execution.
114+ /// Use `get-status-v2` , which additionally reports the `cancelling` state.
115+ // TODO: Remove this deprecated function (and `execution-status`) on the next
116+ // major version bump of this package.
95117 @since (version = 5.0.0 )
118+ @deprecated (version = 5.3.0 )
96119 get-status : func (execution-id : execution-id , backtrace : option <wasm-backtrace >) -> result <execution-status , get-status-error >;
97120
121+ /// Get the current status of an execution.
122+ /// Additionally reports the `cancelling` state for cancellable workflows.
123+ @since (version = 5.3.0 )
124+ get-status-v2 : func (execution-id : execution-id , backtrace : option <wasm-backtrace >) -> result <execution-status-v2 , get-status-error >;
125+
98126 /// Get the result of an execution, blocking until it finishes.
99127 /// Returns Ok(Some(json)) for successful result with value,
100128 /// Ok(None) for successful result with no value,
0 commit comments