import type { Schema, FieldsParam, Entity, ListParams, Workflow, WorkflowLog, WorkflowRule } from "../../types"; import { ResourceApi } from "../common"; type WorkflowSchema = Schema; type WorkflowLogSchema = Schema; type WorkflowRuleSchema = Schema; type WorkflowEntity = Entity; type WorkflowLogEntity = Entity; type WorkflowRuleEntity = Entity; export declare class WorkflowsApi extends ResourceApi { /** * Get a list of all workflows in the system. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of entries to return. Use -1 for all entries. * @param params.$skip - Optional. Number of entries to skip before returning the first one. * @param params.query - Optional. Filter workflows by language (e.g., "language:JS,mps"). * @returns A promise that resolves to a list of Workflow entities. */ getWorkflows(params?: FieldsParam & ListParams & { query?: string; }): Promise[]>; /** * Get workflow by id. * @param params - Optional parameters for response filtering. * @param params.fields - A list of attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @returns A promise that resolves to a Workflow entity. */ getWorkflowById(workflowId: string, params?: FieldsParam): Promise>; /** * Download a workflow as a zip file. * @param workflowName - The name of the workflow to download. * @returns A promise that resolves to a Blob containing the workflow zip file. */ downloadWorkflow(workflowName: string): Promise; /** * Upload a workflow from a zip file. * @param workflowName - The name of the workflow (used for the filename). * @param file - The zip file containing the workflow data. * @returns A promise that resolves when the workflow is successfully uploaded. */ uploadWorkflow(workflowName: string, file: File | Blob): Promise; /** * Get workflow rule execution logs. * @param workflowId - The ID of the workflow. * @param ruleId - The ID of the workflow rule. * @param params - Optional parameters for response filtering. * @param params.fields - A list of WorkflowLog attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of log entries to return. Use -1 for all entries. * @param params.query - Optional. Timestamp to filter logs from (logs newer than this timestamp). * @returns A promise that resolves to a list of WorkflowLog entities. */ getWorkflowLogs(workflowId: string, ruleId: string, params?: FieldsParam & { $top?: number; query?: string; }): Promise[]>; /** * Get a specific workflow rule by workflow ID and rule ID. * @param workflowId - The ID of the workflow containing the rule. * @param ruleId - The ID of the rule to retrieve. * @param params - Optional parameters for response filtering. * @param params.fields - A list of WorkflowRule attributes that should be returned in the response. If no field is specified, only the entityId is returned. * @param params.$top - Optional. Maximum number of entries to return. Use -1 for all entries. * @param params.query - Optional. Filter query (e.g., "language:JS,visual,mps"). * @returns A promise that resolves to a WorkflowRule entity. */ getWorkflowRule(workflowId: string, ruleId: string, params?: FieldsParam & { $top?: number; query?: string; }): Promise>; } export {};