cloudflare
Version:
The official TypeScript library for the Cloudflare API
43 lines • 1.41 kB
TypeScript
import { APIResource } from "../../../core/resource.js";
import { APIPromise } from "../../../core/api-promise.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class BaseEvents extends APIResource {
static readonly _key: readonly ['workflows', 'instances', 'events'];
/**
* Sends an event to a running workflow instance to trigger state transitions.
*/
create(eventType: string, params: EventCreateParams, options?: RequestOptions): APIPromise<EventCreateResponse>;
}
export declare class Events extends BaseEvents {
}
export interface EventCreateResponse {
instanceId: string;
/**
* Accepts ISO 8601 with no timezone offsets and in UTC.
*/
timestamp: string;
}
export interface EventCreateParams {
/**
* Path param
*/
account_id: string;
/**
* Path param
*/
workflow_name: string;
/**
* Path param: Instance identifier. User-created instances match
* `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances
* can use a longer, system-generated id derived from the cron expression.
*/
instance_id: string;
/**
* Body param
*/
body: unknown;
}
export declare namespace Events {
export { type EventCreateResponse as EventCreateResponse, type EventCreateParams as EventCreateParams };
}
//# sourceMappingURL=events.d.ts.map