@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
96 lines • 6.07 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { workspacesWorkspacesCreateWorkspace } from "../funcs/workspacesWorkspacesCreateWorkspace.js";
import { workspacesWorkspacesCreateWorkspaceEnvelope } from "../funcs/workspacesWorkspacesCreateWorkspaceEnvelope.js";
import { workspacesWorkspacesGetWorkspace } from "../funcs/workspacesWorkspacesGetWorkspace.js";
import { workspacesWorkspacesGetWorkspaceAssignableRoles } from "../funcs/workspacesWorkspacesGetWorkspaceAssignableRoles.js";
import { workspacesWorkspacesGetWorkspaceEnvelopes } from "../funcs/workspacesWorkspacesGetWorkspaceEnvelopes.js";
import { workspacesWorkspacesGetWorkspaces } from "../funcs/workspacesWorkspacesGetWorkspaces.js";
import { workspacesWorkspacesUpdateWorkspace } from "../funcs/workspacesWorkspacesUpdateWorkspace.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Workspaces2 extends ClientSDK {
/**
* Gets workspaces available to the calling user
*
* @remarks
* This operation retrieves a list of workspaces available to the calling user. It returns basic information about each workspace, including its unique identifier (ID), name, and metadata such as when it was created and by whom.
*
* Pagination is supported by passing `start_position` and `count` in the request. The response will include `resultSetSize`, `start_position`, and `end_position` which may be utilized for subsequent requests.
*/
async getWorkspaces(request, options) {
return unwrapAsync(workspacesWorkspacesGetWorkspaces(this, request, options));
}
/**
* Creates a new workspace
*
* @remarks
* This operation creates a new workspace. The calling user is automatically added as a member of the workspace with the role of Manage.
*
* Once created, the `workspace_id` is utilized to associate tasks such as envelopes. Participants on tasks will automatically be added to the workspace with the Participate role.
*/
async createWorkspace(request, options) {
return unwrapAsync(workspacesWorkspacesCreateWorkspace(this, request, options));
}
/**
* Updates an existing workspace
*
* @remarks
* This operation updates details about a specific workspace. It returns the workspace's unique identifier (ID), name, and metadata such as when it was created and by whom.
*/
async updateWorkspace(request, options) {
return unwrapAsync(workspacesWorkspacesUpdateWorkspace(this, request, options));
}
/**
* Returns details about the workspace
*
* @remarks
* This operation retrieves details about a specific workspace. It returns the workspace's unique identifier (ID), name, and metadata such as when it was created and by whom.
*/
async getWorkspace(request, options) {
return unwrapAsync(workspacesWorkspacesGetWorkspace(this, request, options));
}
/**
* Returns the roles the caller can assign to workspace users
*
* @remarks
* This operation returns roles that are assignable to users in the workspace based on the caller's role in the workspace. Roles available include Manage (internal) and Participate (external). Participate is the default role.
*
* Users within the account are considered "Internal" and may be assigned any role. Users outside the account are considered "External" and may only be assigned "External" roles.
*
* Pagination is supported by passing `start_position` and `count` in the request. The response will include `resultSetSize`, `start_position`, and `end_position` which may be utilized for subsequent requests.
*/
async getWorkspaceAssignableRoles(request, options) {
return unwrapAsync(workspacesWorkspacesGetWorkspaceAssignableRoles(this, request, options));
}
/**
* Creates an envelope with the given documents. Returns the ID of the created envelope
*
* @remarks
* This operation creates an envelope associated with the workspace. Using the `envelope_id` from the response, the [eSignature API](https://developers.docusign.com/docs/esign-rest-api/) may be utilized to modify the envelope and ultimately send it.
*
* Envelope recipients will automatically be granted Participate access to the workspace. Envelope recipients will receive consolidated notifications from Docusign Workspaces rather than standard individual envelope notifications.
*
* Docusign Connect events may be utilized to receive updates to individual envelope events.
*
* The `envelopes` operation on the workspace may be utilized to query the status of all the envelopes in the workspace.
*
* When `document_ids` is empty or excluded, the envelope is created without any documents from the workspace. eSignature API calls, including adding documents and templates, may be utilized to modify the envelope before it is sent. The eSignature API must be utilized to send the envelope.
*/
async createWorkspaceEnvelope(request, options) {
return unwrapAsync(workspacesWorkspacesCreateWorkspaceEnvelope(this, request, options));
}
/**
* Returns the envelopes associated with the given workspace
*
* @remarks
* This operation retrieves a list of all associated workspace envelopes. The [`status`](https://support.docusign.com/s/document-item?bundleId=oeq1643226594604&topicId=wdm1578456348227.html) on each envelope can be used to track envelope progress. Statuses are formatted as ProperCase. e.g. `Sent`, `WaitingForOthers`, `Completed`, etc.
*
* Based on the permissions of the caller, additional envelope details may be retrieved from the [eSignature API](https://developers.docusign.com/docs/esign-rest-api/) using the `envelope_id`.
*/
async getWorkspaceEnvelopes(request, options) {
return unwrapAsync(workspacesWorkspacesGetWorkspaceEnvelopes(this, request, options));
}
}
//# sourceMappingURL=workspaces2.js.map