UNPKG

@docusign/iam-sdk

Version:

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

80 lines 3.93 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Auth = void 0; const authGetTokenFromConfidentialAuthCode_js_1 = require("../funcs/authGetTokenFromConfidentialAuthCode.js"); const authGetTokenFromJwtGrant_js_1 = require("../funcs/authGetTokenFromJwtGrant.js"); const authGetTokenFromPublicAuthCode_js_1 = require("../funcs/authGetTokenFromPublicAuthCode.js"); const authGetTokenFromRefreshToken_js_1 = require("../funcs/authGetTokenFromRefreshToken.js"); const authGetUserInfo_js_1 = require("../funcs/authGetUserInfo.js"); const sdks_js_1 = require("../lib/sdks.js"); const fp_js_1 = require("../types/fp.js"); class Auth extends sdks_js_1.ClientSDK { /** * Obtains an access token from the Docusign API using an authorization code. * * @remarks * Obtains an access token from the Docusign API using the confidential flow. * For the developer environment, the URI is https://account-d.docusign.com/oauth/token * For the production environment, the URI is https://account.docusign.com/oauth/token * You do not need an integration key to obtain an access token. */ async getTokenFromConfidentialAuthCode(security, request, options) { return (0, fp_js_1.unwrapAsync)((0, authGetTokenFromConfidentialAuthCode_js_1.authGetTokenFromConfidentialAuthCode)(this, security, request, options)); } /** * Obtains an access token from the Docusign API using an authorization code. * * @remarks * Obtains an access token from the Docusign API using the confidential flow. * For the developer environment, the URI is https://account-d.docusign.com/oauth/token * For the production environment, the URI is https://account.docusign.com/oauth/token * You do not need an integration key to obtain an access token. */ async getTokenFromPublicAuthCode(request, options) { return (0, fp_js_1.unwrapAsync)((0, authGetTokenFromPublicAuthCode_js_1.authGetTokenFromPublicAuthCode)(this, request, options)); } /** * Obtains an access token from the Docusign API using a JWT grant. * * @remarks * Obtains an access token from the Docusign API. * * For the developer environment, the URI is https://account-d.docusign.com/oauth/token * * For the production environment, the URI is https://account.docusign.com/oauth/token * * You do not need an integration key to obtain an access token. */ async getTokenFromJwtGrant(request, options) { return (0, fp_js_1.unwrapAsync)((0, authGetTokenFromJwtGrant_js_1.authGetTokenFromJwtGrant)(this, request, options)); } /** * Obtains an access token from the Docusign API using an authorization code. * * @remarks * Obtains an access token from the Docusign API. * For the developer environment, the URI is https://account-d.docusign.com/oauth/token * For the production environment, the URI is https://account.docusign.com/oauth/token * * You do not need an integration key to obtain an access token. */ async getTokenFromRefreshToken(request, security, options) { return (0, fp_js_1.unwrapAsync)((0, authGetTokenFromRefreshToken_js_1.authGetTokenFromRefreshToken)(this, request, security, options)); } /** * Get user information * * @remarks * This endpoint retrieves user information from the Docusign API using an access token. * For the developer environment, the URI is https://account-d.docusign.com/oauth/userinfo * For the production environment, the URI is https://account.docusign.com/oauth/userinfo */ async getUserInfo(options) { return (0, fp_js_1.unwrapAsync)((0, authGetUserInfo_js_1.authGetUserInfo)(this, options)); } } exports.Auth = Auth; //# sourceMappingURL=auth.js.map