@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
223 lines • 8.73 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
* The type of event that triggers the workflow. In this case, the workflow is initiated
*
* @remarks
* by an HTTP request. Future iterations may support additional event types beyond HTTP.
*/
export declare const TriggerEventType: {
readonly Http: "HTTP";
};
/**
* The type of event that triggers the workflow. In this case, the workflow is initiated
*
* @remarks
* by an HTTP request. Future iterations may support additional event types beyond HTTP.
*/
export type TriggerEventType = ClosedEnum<typeof TriggerEventType>;
/**
* The HTTP method used to trigger the workflow. This defines the type of request
*
* @remarks
* that will initiate the workflow (e.g., GET, POST).
*/
export declare const MethodResponse: {
readonly Get: "GET";
readonly Post: "POST";
readonly Put: "PUT";
readonly Patch: "PATCH";
readonly Delete: "DELETE";
};
/**
* The HTTP method used to trigger the workflow. This defines the type of request
*
* @remarks
* that will initiate the workflow (e.g., GET, POST).
*/
export type MethodResponse = ClosedEnum<typeof MethodResponse>;
/**
* Configuration details specific to HTTP-triggered workflows. This object describes the
*
* @remarks
* HTTP method and URL that will trigger the workflow, providing the endpoint and method
* that should be used to initiate the workflow.
*/
export type TriggerHttpConfig = {
/**
* The HTTP method used to trigger the workflow. This defines the type of request
*
* @remarks
* that will initiate the workflow (e.g., GET, POST).
*/
method?: MethodResponse | undefined;
/**
* The URL that is associated with the trigger event. This is the endpoint that must be
*
* @remarks
* called using the specified HTTP method to start the workflow.
*/
url?: string | null | undefined;
};
/**
* The default value for the input field if one is provided. This can be a string, number,
*
* @remarks
* boolean, object, or array. If no value is provided during the trigger, the workflow may
* use this default value.
*/
export type DefaultValue = string | number | boolean | {
[k: string]: any;
} | Array<any>;
/**
* Array of fields required as inputs to trigger the workflow, including field names, data types, and default values.
*/
export type TriggerInputSchema = {
/**
* The name of the input field expected by the workflow. This key must match the name
*
* @remarks
* provided in the `trigger_inputs` when triggering the workflow.
*/
fieldName?: string | undefined;
/**
* The data type expected for the input field. This indicates whether the input should
*
* @remarks
* be a string, number, boolean, object, or array, ensuring the data is passed in the
* correct format.
*/
fieldDataType?: string | undefined;
/**
* The default value for the input field if one is provided. This can be a string, number,
*
* @remarks
* boolean, object, or array. If no value is provided during the trigger, the workflow may
* use this default value.
*/
defaultValue?: string | number | boolean | {
[k: string]: any;
} | Array<any> | undefined;
};
/**
* Metadata related to the workflow definition, including details about when the workflow was
*
* @remarks
* created, who created it, when it was last modified, and by whom. This information is useful
* for tracking changes to the workflow over time and identifying the user or system responsible
* for creating or modifying the workflow.
*/
export type MetadataResponse = {
/**
* Timestamp when the agreement document was created.
*/
createdAt?: Date | null | undefined;
/**
* User ID of the person who created the agreement document.
*/
createdBy?: string | null | undefined;
/**
* Timestamp when the agreement document was last modified.
*/
modifiedAt?: Date | null | undefined;
/**
* User ID of the person who last modified the agreement document.
*/
modifiedBy?: string | null | undefined;
/**
* Unique identifier for the request, useful for tracking and debugging.
*/
requestId?: string | null | undefined;
/**
* The timestamp indicating when the response was generated.
*/
responseTimestamp?: Date | null | undefined;
/**
* The duration of time, in milliseconds, that the server took to process and respond
*
* @remarks
* to the request. This is measured from the time the server received the request
* until the time the response was sent.
*/
responseDurationMs?: number | null | undefined;
};
/**
* Control information and metadata for the response.
*/
export type WorkflowTriggerRequirementsSuccess = {
triggerId: string;
/**
* The type of event that triggers the workflow. In this case, the workflow is initiated
*
* @remarks
* by an HTTP request. Future iterations may support additional event types beyond HTTP.
*/
triggerEventType?: TriggerEventType | undefined;
/**
* Configuration details specific to HTTP-triggered workflows. This object describes the
*
* @remarks
* HTTP method and URL that will trigger the workflow, providing the endpoint and method
* that should be used to initiate the workflow.
*/
triggerHttpConfig?: TriggerHttpConfig | undefined;
/**
* A list of input fields that define the structure of the data required to trigger the workflow.
*
* @remarks
* Each item describes a field that must be included in the request when the workflow is triggered.
* The schema includes the field name, expected data type, and any default values for the input.
*/
triggerInputSchema?: Array<TriggerInputSchema> | undefined;
/**
* Metadata related to the workflow definition, including details about when the workflow was
*
* @remarks
* created, who created it, when it was last modified, and by whom. This information is useful
* for tracking changes to the workflow over time and identifying the user or system responsible
* for creating or modifying the workflow.
*/
metadata?: MetadataResponse | undefined;
/**
* The maximum number of items that can be returned in a single page.
*/
pageLimit: number | null;
/**
* Unique identifier for the request, useful for tracking and debugging.
*/
requestId: string | null;
/**
* The timestamp indicating when the response was generated.
*/
responseTimestamp: Date | null;
/**
* The duration of time, in milliseconds, that the server took to process and respond
*
* @remarks
* to the request. This is measured from the time the server received the request
* until the time the response was sent.
*/
responseDurationMs: number | null;
};
/** @internal */
export declare const TriggerEventType$inboundSchema: z.ZodNativeEnum<typeof TriggerEventType>;
/** @internal */
export declare const MethodResponse$inboundSchema: z.ZodNativeEnum<typeof MethodResponse>;
/** @internal */
export declare const TriggerHttpConfig$inboundSchema: z.ZodType<TriggerHttpConfig, z.ZodTypeDef, unknown>;
export declare function triggerHttpConfigFromJSON(jsonString: string): SafeParseResult<TriggerHttpConfig, SDKValidationError>;
/** @internal */
export declare const DefaultValue$inboundSchema: z.ZodType<DefaultValue, z.ZodTypeDef, unknown>;
export declare function defaultValueFromJSON(jsonString: string): SafeParseResult<DefaultValue, SDKValidationError>;
/** @internal */
export declare const TriggerInputSchema$inboundSchema: z.ZodType<TriggerInputSchema, z.ZodTypeDef, unknown>;
export declare function triggerInputSchemaFromJSON(jsonString: string): SafeParseResult<TriggerInputSchema, SDKValidationError>;
/** @internal */
export declare const MetadataResponse$inboundSchema: z.ZodType<MetadataResponse, z.ZodTypeDef, unknown>;
export declare function metadataResponseFromJSON(jsonString: string): SafeParseResult<MetadataResponse, SDKValidationError>;
/** @internal */
export declare const WorkflowTriggerRequirementsSuccess$inboundSchema: z.ZodType<WorkflowTriggerRequirementsSuccess, z.ZodTypeDef, unknown>;
export declare function workflowTriggerRequirementsSuccessFromJSON(jsonString: string): SafeParseResult<WorkflowTriggerRequirementsSuccess, SDKValidationError>;
//# sourceMappingURL=workflowtriggerrequirementssuccess.d.ts.map