UNPKG

@docusign/iam-sdk

Version:

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

66 lines 4.28 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkspaceUsers = void 0; const workspacesWorkspaceUsersAddWorkspaceUser_js_1 = require("../funcs/workspacesWorkspaceUsersAddWorkspaceUser.js"); const workspacesWorkspaceUsersGetWorkspaceUsers_js_1 = require("../funcs/workspacesWorkspaceUsersGetWorkspaceUsers.js"); const workspacesWorkspaceUsersRestoreWorkspaceUserAccess_js_1 = require("../funcs/workspacesWorkspaceUsersRestoreWorkspaceUserAccess.js"); const workspacesWorkspaceUsersRevokeWorkspaceUserAccess_js_1 = require("../funcs/workspacesWorkspaceUsersRevokeWorkspaceUserAccess.js"); const workspacesWorkspaceUsersUpdateWorkspaceUser_js_1 = require("../funcs/workspacesWorkspaceUsersUpdateWorkspaceUser.js"); const sdks_js_1 = require("../lib/sdks.js"); const fp_js_1 = require("../types/fp.js"); class WorkspaceUsers extends sdks_js_1.ClientSDK { /** * Retrieves the list of users in the given workspace * * @remarks * This operations retrieves the users in a workspace. Users sent envelopes or assigned tasks will automatically be added to the workspace with the Participate role. * * 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 getWorkspaceUsers(request, options) { return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceUsersGetWorkspaceUsers_js_1.workspacesWorkspaceUsersGetWorkspaceUsers)(this, request, options)); } /** * Adds a user to the workspace by email address * * @remarks * This operation manually adds an internal or external user to a specific workspace by email address. 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 the Participate role. This operation is not typically needed for adding external participants to a Workspace as they will be automatically added as tasks are assigned. * * Available role IDs can be retrieved via the Assignable Roles operation on a workspace. If the `role_id` is not passed, the user is added with the Participate role. */ async addWorkspaceUser(request, options) { return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceUsersAddWorkspaceUser_js_1.workspacesWorkspaceUsersAddWorkspaceUser)(this, request, options)); } /** * Updates the specified user's role * * @remarks * This operation updates the specified user's role in the workspace. 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. */ async updateWorkspaceUser(request, options) { return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceUsersUpdateWorkspaceUser_js_1.workspacesWorkspaceUsersUpdateWorkspaceUser)(this, request, options)); } /** * Revokes the specified user's access to the workspace * * @remarks * This operation revokes the specified user's access to the workspace. The optional `revocation_date` may be set to schedule revocation in the future. If not specified, the revocation will be immediate. */ async revokeWorkspaceUserAccess(request, options) { return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceUsersRevokeWorkspaceUserAccess_js_1.workspacesWorkspaceUsersRevokeWorkspaceUserAccess)(this, request, options)); } /** * Restores the specified user's access to the workspace * * @remarks * This operation restores the specified user's access to the workspace. The user must have been previously revoked from the workspace. The access is immediately restored. */ async restoreWorkspaceUserAccess(request, options) { return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceUsersRestoreWorkspaceUserAccess_js_1.workspacesWorkspaceUsersRestoreWorkspaceUserAccess)(this, request, options)); } } exports.WorkspaceUsers = WorkspaceUsers; //# sourceMappingURL=workspaceusers.js.map