@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
66 lines • 3.9 kB
JavaScript
;
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.WorkspaceDocuments = void 0;
const workspacesWorkspaceDocumentsAddWorkspaceDocument_js_1 = require("../funcs/workspacesWorkspaceDocumentsAddWorkspaceDocument.js");
const workspacesWorkspaceDocumentsDeleteWorkspaceDocument_js_1 = require("../funcs/workspacesWorkspaceDocumentsDeleteWorkspaceDocument.js");
const workspacesWorkspaceDocumentsGetWorkspaceDocument_js_1 = require("../funcs/workspacesWorkspaceDocumentsGetWorkspaceDocument.js");
const workspacesWorkspaceDocumentsGetWorkspaceDocumentContents_js_1 = require("../funcs/workspacesWorkspaceDocumentsGetWorkspaceDocumentContents.js");
const workspacesWorkspaceDocumentsGetWorkspaceDocuments_js_1 = require("../funcs/workspacesWorkspaceDocumentsGetWorkspaceDocuments.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class WorkspaceDocuments extends sdks_js_1.ClientSDK {
/**
* Get documents in the workspace accessible to the calling user
*
* @remarks
* This operation retrieves the documents in the workspace that are accessible to the calling user. Documents may be added directly or automatically through tasks such as envelopes. Documents may be used to create envelopes.
*
* 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 getWorkspaceDocuments(request, options) {
return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceDocumentsGetWorkspaceDocuments_js_1.workspacesWorkspaceDocumentsGetWorkspaceDocuments)(this, request, options));
}
/**
* Add a document to a workspace via file contents upload
*
* @remarks
* This operation adds a document to a workspace via file contents upload. The file is passed in the request body as a multipart/form-data file. The file name is used as the document name.
*
* Once added, it may be used to create an envelope associated with the workspace.
*/
async addWorkspaceDocument(request, options) {
return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceDocumentsAddWorkspaceDocument_js_1.workspacesWorkspaceDocumentsAddWorkspaceDocument)(this, request, options));
}
/**
* Get information about the document
*
* @remarks
* This operation retrieves information about the document. The response includes the document ID, name, and metadata.
*/
async getWorkspaceDocument(request, options) {
return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceDocumentsGetWorkspaceDocument_js_1.workspacesWorkspaceDocumentsGetWorkspaceDocument)(this, request, options));
}
/**
* Deletes a document in the workspace
*
* @remarks
* This operation permanently deletes a document by ID.
*/
async deleteWorkspaceDocument(request, options) {
return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceDocumentsDeleteWorkspaceDocument_js_1.workspacesWorkspaceDocumentsDeleteWorkspaceDocument)(this, request, options));
}
/**
* Get the file contents of the document
*
* @remarks
* This operation retrieves the file contents of the document. The file is returned as a stream in the response body. The Content-Disposition response header contains the document name as the `filename`.
*/
async getWorkspaceDocumentContents(request, options) {
return (0, fp_js_1.unwrapAsync)((0, workspacesWorkspaceDocumentsGetWorkspaceDocumentContents_js_1.workspacesWorkspaceDocumentsGetWorkspaceDocumentContents)(this, request, options));
}
}
exports.WorkspaceDocuments = WorkspaceDocuments;
//# sourceMappingURL=workspacedocuments.js.map