import type { BasicMetaSysProps, DefaultElements, GetSpaceEnvironmentParams, GetWorkflowParams, Link, MakeRequest, PaginationQueryOptions, SysLink } from '../common-types'; export type WorkflowSysProps = Pick & { type: 'Workflow'; space: SysLink; environment: SysLink; completedBy?: SysLink; completedAt?: string; deletedBy?: SysLink; deletedAt?: string; entity: Link<'Entry'>; workflowDefinition: Link<'WorkflowDefinition'>; }; export type WorkflowProps = { sys: WorkflowSysProps; stepId?: string; }; export type CreateWorkflowProps = Omit & { entity: Link<'Entry'>; workflowDefinition: Link<'WorkflowDefinition'>; }; export type UpdateWorkflowProps = Omit & { sys: Pick; }; export type CreateWorkflowParams = GetSpaceEnvironmentParams; export type UpdateWorkflowParams = GetWorkflowParams; export type DeleteWorkflowParams = GetWorkflowParams & { version: number; }; export type CompleteWorkflowParams = DeleteWorkflowParams; type WorkflowApi = { update(): Promise; delete(): Promise; complete(): Promise; }; type OrderQueryParam = 'sys.updatedAt' | '-sys.updatedAt' | 'sys.createdAt' | '-sys.createdAt'; export interface Workflow extends WorkflowProps, DefaultElements, WorkflowApi { } export type WorkflowQueryOptions = Omit & { 'stepId[in]'?: string; /** Find workflows filtered by the Entity type (Entry) */ 'sys.entity.sys.linkType'?: string; /** Find workflows containing the specified, comma-separated entities. Requires `sys.entity.sys.linkType` */ 'sys.entity.sys.id[in]'?: string; 'sys.workflowDefinition.sys.id'?: string; /** * Order workflows by * @default -sys.createdAt * */ order?: OrderQueryParam; }; /** * @private */ export default function createWorkflowApi(makeRequest: MakeRequest): WorkflowApi; /** * @private */ export declare function wrapWorkflow(makeRequest: MakeRequest, data: WorkflowProps): Workflow; /** * @private */ export declare const wrapWorkflowCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp) => import("../common-types").Collection; export {};