File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -466,4 +466,29 @@ declare namespace tailor.workflow {
466466 implementation.
467467 */
468468 function triggerJobFunction ( job_name : string , args ?: any ) : any ;
469+
470+ /**
471+ * Suspends the current workflow execution and waits for an external signal to resume.
472+ * The workflow will be parked in "Waiting" status until resolved via `resolve()`.
473+ *
474+ * @param key - A unique key identifying this wait point. Must match `^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$`.
475+ * @param payload - Optional JSON-serializable payload persisted with the wait. Accessible by the resolve callback.
476+ * @returns The result provided by the `resolve()` callback when the workflow resumes.
477+ */
478+ function wait ( key : string , payload ?: any ) : any ;
479+
480+ /**
481+ * Resolves a waiting workflow execution, causing it to resume.
482+ * The callback receives the wait payload and must return a JSON-serializable result
483+ * that will be passed back to the `wait()` caller.
484+ *
485+ * @param executionId - The workflow execution ID to resolve
486+ * @param key - The wait key that was used in the `wait()` call
487+ * @param callback - A function that receives the wait payload and returns a result
488+ */
489+ function resolve (
490+ executionId : string ,
491+ key : string ,
492+ callback : ( waitPayload : any ) => any
493+ ) : Promise < void > ;
469494}
You can’t perform that action at this time.
0 commit comments