@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
76 lines • 3.52 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { authGetTokenFromConfidentialAuthCode } from "../funcs/authGetTokenFromConfidentialAuthCode.js";
import { authGetTokenFromJwtGrant } from "../funcs/authGetTokenFromJwtGrant.js";
import { authGetTokenFromPublicAuthCode } from "../funcs/authGetTokenFromPublicAuthCode.js";
import { authGetTokenFromRefreshToken } from "../funcs/authGetTokenFromRefreshToken.js";
import { authGetUserInfo } from "../funcs/authGetUserInfo.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Auth extends 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 unwrapAsync(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 unwrapAsync(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 unwrapAsync(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 unwrapAsync(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 unwrapAsync(authGetUserInfo(this, options));
}
}
//# sourceMappingURL=auth.js.map