@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
178 lines • 6.62 kB
TypeScript
import * as z from "zod";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { TriggerInputs, TriggerInputs$Outbound } from "./triggerinputs.js";
/**
* Additional metadata related to this workflow instance
*/
export type Metadata = {
/**
* Identifier of the user who originally created the workflow definition
*/
workflowCreatedBy?: string | undefined;
/**
* Version string of the deployed workflow
*/
workflowVersion?: string | undefined;
/**
* Identifier for workflow definition metadata in the system
*/
workflowMetadataId?: string | undefined;
};
export type WorkflowInstance = {
/**
* Unique identifier for the workflow instance
*/
id?: string | undefined;
/**
* Human-readable name for the workflow instance
*/
name?: string | undefined;
/**
* Current status of the workflow (e.g. In Progress, Completed, Canceled)
*/
workflowStatus?: string | undefined;
/**
* Identifier linking this instance to a workflow template
*/
templateId?: string | undefined;
/**
* Account under which this workflow instance was initiated
*/
accountId?: string | undefined;
/**
* Date and time when the workflow was started
*/
startedAt?: Date | undefined;
/**
* User or system identifier that started this workflow
*/
startedBy?: string | undefined;
/**
* Display name of the user who started this workflow
*/
startedByName?: string | undefined;
/**
* Role of the user who started this workflow (e.g. Preparer)
*/
startedByRole?: string | undefined;
/**
* Date and time when the workflow completed
*/
endedAt?: Date | null | undefined;
/**
* Date and time after which the workflow expires
*/
expiresAt?: Date | null | undefined;
/**
* Date and time when the workflow instance was last modified
*/
lastModifiedAt?: Date | undefined;
/**
* Date and time when the workflow was canceled (if applicable)
*/
canceledAt?: Date | null | undefined;
/**
* User or system identifier that canceled this workflow (if applicable)
*/
canceledBy?: string | null | undefined;
/**
* Key-value pairs representing the input data required to trigger the workflow.
*
* @remarks
* The keys correspond to the `field_name` values defined in the `trigger_input_schema` of the workflow definition.
* The values should match the specified `field_data_type` (e.g., string, number, boolean).
* Example: {"name": "John Doe", "email": "johndoe@example.com"}
*/
triggerInputs?: {
[k: string]: TriggerInputs;
} | undefined;
/**
* Total number of steps configured in the workflow
*/
totalSteps?: number | undefined;
/**
* The index of the most recently completed step
*/
lastCompletedStep?: number | undefined;
/**
* The name of the most recently completed step
*/
lastCompletedStepName?: string | null | undefined;
/**
* Custom tags for organization or filtering
*/
tags?: Array<string> | undefined;
/**
* Additional metadata related to this workflow instance
*/
metadata?: Metadata | undefined;
};
/** @internal */
export declare const Metadata$inboundSchema: z.ZodType<Metadata, z.ZodTypeDef, unknown>;
/** @internal */
export type Metadata$Outbound = {
workflow_created_by?: string | undefined;
workflow_version?: string | undefined;
workflow_metadata_id?: string | undefined;
};
/** @internal */
export declare const Metadata$outboundSchema: z.ZodType<Metadata$Outbound, z.ZodTypeDef, Metadata>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace Metadata$ {
/** @deprecated use `Metadata$inboundSchema` instead. */
const inboundSchema: z.ZodType<Metadata, z.ZodTypeDef, unknown>;
/** @deprecated use `Metadata$outboundSchema` instead. */
const outboundSchema: z.ZodType<Metadata$Outbound, z.ZodTypeDef, Metadata>;
/** @deprecated use `Metadata$Outbound` instead. */
type Outbound = Metadata$Outbound;
}
export declare function metadataToJSON(metadata: Metadata): string;
export declare function metadataFromJSON(jsonString: string): SafeParseResult<Metadata, SDKValidationError>;
/** @internal */
export declare const WorkflowInstance$inboundSchema: z.ZodType<WorkflowInstance, z.ZodTypeDef, unknown>;
/** @internal */
export type WorkflowInstance$Outbound = {
id?: string | undefined;
name?: string | undefined;
workflow_status?: string | undefined;
template_id?: string | undefined;
account_id?: string | undefined;
started_at?: string | undefined;
started_by?: string | undefined;
started_by_name?: string | undefined;
started_by_role?: string | undefined;
ended_at?: string | null | undefined;
expires_at?: string | null | undefined;
last_modified_at?: string | undefined;
canceled_at?: string | null | undefined;
canceled_by?: string | null | undefined;
trigger_inputs?: {
[k: string]: TriggerInputs$Outbound;
} | undefined;
total_steps?: number | undefined;
last_completed_step?: number | undefined;
last_completed_step_name?: string | null | undefined;
tags?: Array<string> | undefined;
metadata?: Metadata$Outbound | undefined;
};
/** @internal */
export declare const WorkflowInstance$outboundSchema: z.ZodType<WorkflowInstance$Outbound, z.ZodTypeDef, WorkflowInstance>;
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export declare namespace WorkflowInstance$ {
/** @deprecated use `WorkflowInstance$inboundSchema` instead. */
const inboundSchema: z.ZodType<WorkflowInstance, z.ZodTypeDef, unknown>;
/** @deprecated use `WorkflowInstance$outboundSchema` instead. */
const outboundSchema: z.ZodType<WorkflowInstance$Outbound, z.ZodTypeDef, WorkflowInstance>;
/** @deprecated use `WorkflowInstance$Outbound` instead. */
type Outbound = WorkflowInstance$Outbound;
}
export declare function workflowInstanceToJSON(workflowInstance: WorkflowInstance): string;
export declare function workflowInstanceFromJSON(jsonString: string): SafeParseResult<WorkflowInstance, SDKValidationError>;
//# sourceMappingURL=workflowinstance.d.ts.map