UNPKG

@docusign/iam-sdk

Version:

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

20 lines 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.initHooks = initHooks; const oauth_token_request_hook_js_1 = require("./custom/oauth-token-request-hook.js"); const user_agent_hook_js_1 = require("./custom/user-agent-hook.js"); /* * This file is only ever generated once on the first generation and then is free to be modified. * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them * in this file or in separate files in the hooks folder. */ function initHooks(hooks) { // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook // with an instance of a hook that implements that specific Hook interface // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance const oauthTokenRequestHook = new oauth_token_request_hook_js_1.OAuthTokenRequestHook(); hooks.registerBeforeRequestHook(oauthTokenRequestHook); const userAgentHook = new user_agent_hook_js_1.UserAgentHook(); hooks.registerBeforeRequestHook(userAgentHook); } //# sourceMappingURL=registration.js.map