cloudflare
Version:
The official TypeScript library for the Cloudflare API
101 lines • 2.69 kB
text/typescript
import { APIResource } from "../../../core/resource.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class BaseStatus extends APIResource {
static readonly _key: readonly ['workflows', 'instances', 'status'];
/**
* Changes the execution status of a workflow instance (e.g., pause, resume,
* terminate).
*/
edit(instanceID: string, params: StatusEditParams, options?: RequestOptions): APIPromise<StatusEditResponse>;
}
export declare class Status extends BaseStatus {
}
export interface StatusEditResponse {
status: 'queued' | 'running' | 'paused' | 'errored' | 'terminated' | 'complete' | 'waitingForPause' | 'waiting' | 'rollingBack';
/**
* Accepts ISO 8601 with no timezone offsets and in UTC.
*/
timestamp: string;
}
export type StatusEditParams = StatusEditParams.Variant0 | StatusEditParams.Variant1 | StatusEditParams.Variant2 | StatusEditParams.Variant3;
export declare namespace StatusEditParams {
interface Variant0 {
/**
* Path param
*/
account_id: string;
/**
* Path param
*/
workflow_name: string;
/**
* Body param
*/
status: 'pause';
}
interface Variant1 {
/**
* Path param
*/
account_id: string;
/**
* Path param
*/
workflow_name: string;
/**
* Body param
*/
status: 'resume';
}
interface Variant2 {
/**
* Path param
*/
account_id: string;
/**
* Path param
*/
workflow_name: string;
/**
* Body param
*/
status: 'terminate';
/**
* Body param: Run rollback before terminating.
*/
rollback?: boolean;
}
interface Variant3 {
/**
* Path param
*/
account_id: string;
/**
* Path param
*/
workflow_name: string;
/**
* Body param
*/
status: 'restart';
/**
* Body param: Step to restart from.
*/
from?: Variant3.From;
}
namespace Variant3 {
/**
* Step to restart from.
*/
interface From {
name: string;
count?: number;
type?: 'do' | 'sleep' | 'waitForEvent';
}
}
}
export declare namespace Status {
export { type StatusEditResponse as StatusEditResponse, type StatusEditParams as StatusEditParams };
}
//# sourceMappingURL=status.d.mts.map