import { OrchestrationState } from "@dapr/durabletask-js/orchestration/orchestration-state"; import { WorkflowFailureDetails } from "./WorkflowFailureDetails"; import { WorkflowRuntimeStatus } from "../runtime/WorkflowRuntimeStatus"; /** * Represents the state of a workflow instance. */ export declare class WorkflowState { private readonly _orchestrationState; private readonly _workflowFailureDetails?; /** * Creates an instance of WorkflowState. * @param {OrchestrationState} orchestrationState - The state of the orchestration. * @throws {Error} Throws an error if orchestrationState is null. */ constructor(orchestrationState: OrchestrationState); /** * Gets the name of the workflow. * @returns {string} The name of the workflow. */ get name(): string; /** * Gets the unique ID of the workflow instance. * @returns {string} The unique ID of the workflow instance. */ get instanceId(): string; /** * Gets the current runtime status of the workflow instance. * @returns {WorkflowRuntimeStatus} The current runtime status. */ get runtimeStatus(): WorkflowRuntimeStatus; /** * Gets the workflow instance's creation time in UTC. * @returns {Date} The workflow instance's creation time in UTC. */ get createdAt(): Date; /** * Gets the workflow instance's last updated time in UTC. * @returns {Date} The workflow instance's last updated time in UTC. */ get lastUpdatedAt(): Date; /** * Gets the workflow instance's serialized input, if any, as a string value. * @returns {string | undefined} The workflow instance's serialized input or undefined. */ get serializedInput(): string | undefined; /** * Gets the workflow instance's serialized output, if any, as a string value. * @returns {string | undefined} The workflow instance's serialized output or undefined. */ get serializedOutput(): string | undefined; /** * Gets the failure details, if any, for the failed workflow instance. * This method returns data only if the workflow is in the FAILED state and * only if this instance metadata was fetched with the option to include output data. * @returns {WorkflowFailureDetails | undefined} The failure details of the failed workflow instance or undefined. */ get workflowFailureDetails(): WorkflowFailureDetails | undefined; /** * Gets the workflow instance's custom status, if any, as a string value. * @returns {string | undefined} The workflow instance's custom status or undefined. */ get customStatus(): string | undefined; }