UNPKG

@docusign/iam-sdk

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.

135 lines 8.3 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Workflows = void 0; const workflowBuilderWorkflowsGetWorkflowsList_js_1 = require("../funcs/workflowBuilderWorkflowsGetWorkflowsList.js"); const workflowBuilderWorkflowsGetWorkflowTriggerRequirements_js_1 = require("../funcs/workflowBuilderWorkflowsGetWorkflowTriggerRequirements.js"); const workflowBuilderWorkflowsPauseNewWorkflowInstances_js_1 = require("../funcs/workflowBuilderWorkflowsPauseNewWorkflowInstances.js"); const workflowBuilderWorkflowsResumePausedWorkflow_js_1 = require("../funcs/workflowBuilderWorkflowsResumePausedWorkflow.js"); const workflowBuilderWorkflowsTriggerWorkflow_js_1 = require("../funcs/workflowBuilderWorkflowsTriggerWorkflow.js"); const sdks_js_1 = require("../lib/sdks.js"); const fp_js_1 = require("../types/fp.js"); class Workflows extends sdks_js_1.ClientSDK { /** * Retrieve a list of available Workflow Builder workflows * * @remarks * This operation retrieves a list of all available Workflow Builder workflows. It returns basic information * about each workflow, including its unique identifier (`id`), name, description, and the input * schema required to trigger the workflow. * * The response provides key details that help users identify which workflows are available * and understand the input requirements for triggering each one. Each workflow entry also includes * metadata, such as when it was created, last modified, and by whom. * * This operation is useful for obtaining an overview of all workflows within the system, helping * users and systems know what workflows are defined, what inputs they require, and how they can * be triggered. * * ### Use Cases: * - Listing all available workflows in a system for manual or automated workflow initiation. * - Reviewing the input requirements for a workflow before triggering it programmatically. * - Gathering basic metadata about workflows for auditing, logging, or reporting purposes. * * ### Key Features: * - **Comprehensive Workflow Overview**: Provides a full list of workflows, giving visibility * into all the automated processes available within the Workflow Builder platform. * - **Input Schema Information**: Each workflow includes its trigger input schema, showing * what data must be provided when triggering the workflow. * - **Metadata for Tracking**: Useful metadata like creation time, last modification date, * and user details are included to support tracking and auditing workflows. * - **Future-Proof**: The operation is designed to be expandable as more workflows are added * or the platform grows, ensuring scalability in the workflow management process. */ async getWorkflowsList(request, options) { return (0, fp_js_1.unwrapAsync)((0, workflowBuilderWorkflowsGetWorkflowsList_js_1.workflowBuilderWorkflowsGetWorkflowsList)(this, request, options)); } /** * Retrieve trigger requirements for a specific Workflow Builder workflow * * @remarks * This operation retrieves the configuration and input requirements necessary to trigger a specific * Workflow Builder workflow. It provides detailed information about the `trigger_event_type`, such as HTTP * or other supported types, and specifies the required input schema, including field names, data types, * and any default values. * * This information is essential for understanding the data and parameters required to initiate the * workflow. It enables developers to prepare the necessary inputs and configuration before triggering * the workflow instance, ensuring seamless execution and compliance with workflow requirements. * * ### Use Cases: * - Identifying the required input fields and their data types to successfully trigger the workflow. * - Reviewing the trigger configuration for validation and compliance with expected input. * - Preparing and validating data in advance of triggering the workflow, minimizing runtime errors. * * ### Key Features: * - **Detailed Trigger Input Requirements**: Provides an exhaustive schema of required fields, * their data types, and optional default values for easy reference and data validation. * - **Trigger Event Type Information**: Specifies the type of event required to initiate the workflow * (e.g., HTTP), helping developers configure their systems to invoke the workflow appropriately. * - **Configurable for Custom Triggers**: Suitable for custom configurations, enabling flexibility * in how workflows can be triggered according to system needs. */ async getWorkflowTriggerRequirements(request, options) { return (0, fp_js_1.unwrapAsync)((0, workflowBuilderWorkflowsGetWorkflowTriggerRequirements_js_1.workflowBuilderWorkflowsGetWorkflowTriggerRequirements)(this, request, options)); } /** * Trigger a new instance of a Workflow Builder workflow * * @remarks * This operation triggers a new instance of a specified Workflow Builder workflow. When invoked, * the workflow is started based on the provided input data, and the workflow instance * begins executing according to its defined logic and configuration. * * The request requires an `instance_name` and any input data necessary to start the workflow, * as described by the workflow's `trigger_input_schema`. The `instance_name` is a user-defined * label for tracking the workflow run, while the input data fields should match the schema defined * in the workflow. * * The operation is event-driven and typically triggered by an external HTTP event or system call, * allowing for the automatic execution of complex processes that span multiple systems or components. * * Upon successful execution, the response returns the unique identifier (`id`) for the newly * created workflow instance, along with a URL (`workflow_instance_url`) that can be used to * interact with or track the running instance. * * ### Use Cases: * - Automating user registration workflows where input fields like `name` and `email` are provided. * - Processing financial transactions where details such as `amount` and `currency` are required. * - Sending notifications based on user interactions in other systems. * * ### Key Features: * - **Automated Execution**: Once triggered, the workflow runs until a step requires manual intervention. * - **Input-Driven**: Workflow execution is based on the provided input data, which is validated * against the workflow's input schema. * - **Real-Time Triggering**: Designed to be invoked as part of an event-driven architecture, * allowing for workflows to respond to external events. * - **Tracking and Interaction**: The response includes a URL that allows users to check the status * of the workflow instance or take further actions while it runs. */ async triggerWorkflow(request, options) { return (0, fp_js_1.unwrapAsync)((0, workflowBuilderWorkflowsTriggerWorkflow_js_1.workflowBuilderWorkflowsTriggerWorkflow)(this, request, options)); } /** * Pause an Active Workflow * * @remarks * This operation pauses new workflow instances from being created. Any running workflows instances will be unaffected. */ async pauseNewWorkflowInstances(request, options) { return (0, fp_js_1.unwrapAsync)((0, workflowBuilderWorkflowsPauseNewWorkflowInstances_js_1.workflowBuilderWorkflowsPauseNewWorkflowInstances)(this, request, options)); } /** * Resume a Paused Workflow * * @remarks * This operation enables new workflow instances to be created */ async resumePausedWorkflow(request, options) { return (0, fp_js_1.unwrapAsync)((0, workflowBuilderWorkflowsResumePausedWorkflow_js_1.workflowBuilderWorkflowsResumePausedWorkflow)(this, request, options)); } } exports.Workflows = Workflows; //# sourceMappingURL=workflows.js.map