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OAAE,EAAM,KAAE,EAAI,QAAE,GAAY,EAE/C,EAAM,GAAG,KAAY,OAAO,cAAc,MAAM,IAChD,MAAM,EAAU,CACd,IAAK,EACL,OAAQ,OAAO,cAAc,GAC7B,QAAS,CACP,gBAAiB,GAEnB,KAAM,CACJ,SAAU,EAAO,SACjB,SAAU,EAAO,SACjB,SAAU,EAAO,SACjB,IAAK,EAAO,QACZ,IAAK,EAAO,IACZ,OAAQ,EAAO,OACf,aAAc,EAAO,aACrB,OAAQ,EAAO,OACf,UAAW,EAAO,UAClB,OAAQ,EAAO,OACf,KAAM,EAAO,KACb,QAAS,EAAO,UAIpB,IACE,MAAM,QAAiB,KAAK,SAAS,GACrC,OAAO,mBAAmB,EAC5B,CAAE,MAAM,GACN,MAAM,gBAAgB,EACxB,CACD,CAQC,iBAAM,CAAY,EAAO,EAAM,GAC7B,OAAO,EAAO,mDACd,OAAO,EAAM,kDACb,IAAI,EAAM,GACN,EAAW,GAEb,EADE,IAEO,KAAK,SACH,KAAK,SAEL,OAAO,cAGpB,EAAM,GAAG,KAAY,OAAO,YAAY,MAAM,IAC9C,MAAM,EAAU,CACd,IAAK,EACL,OAAQ,OAAO,YAAY,GAC3B,QAAS,CACP,gBAAiB,IAIrB,IACE,MAAM,QAAiB,KAAK,SAAS,GACrC,OAAO,mBAAmB,EAC5B,CAAE,MAAM,GACN,MAAM,gBAAgB,EACxB,CACD","file":"/npm/hashi-vault-js@0.5.1/src/Vault.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/hashi-vault-js@0.5.1/src/Vault.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*\n * The accompanying program is provided under the terms of the MIT license (\"agreement\").\n * Written by Rod Anami <rod.anami@kyndryl.com>, June 2020.\n*/\n// Go to strict mode to be safer\n\"use strict\";\nimport { config } from './Config.js';\n// I personally prefer request, but it's deprecated now\nimport axios from 'axios';\n//const _ = require('underscore');\nimport https from 'https';\nimport fs from 'fs';\nimport assert from 'assert';\n\n// Internal function - create new https agent\nconst getHttpsAgent = function(certificate, key, cacert) {\n  const options = {}\n  if(cacert) {\n    // CA cert from Hashicorp Vault PKI\n    options.ca = fs.readFileSync(cacert)\n  }\n  if(certificate || key) {\n    // Client certificate\n    options.cert = fs.readFileSync(certificate)\n    options.key = fs.readFileSync(key)\n  }\n  return new https.Agent(options);\n}\n\n// Internal function - creates new axios instance\nconst getAxiosInstance = function(baseurl, timeout, agent, proxy, namespace) {\n  return axios.create({\n      baseURL: baseurl,\n      timeout: timeout,\n      headers: {\n        'X-Application-Name': config.appName,\n        'X-Vault-Namespace': namespace,\n      },\n      httpsAgent: agent,\n      proxy: proxy\n  });\n}\n\n// Internal function - parse axios response\nconst parseAxiosResponse = function(response){\n  let message = {};\n  if (response.data.auth) {\n    message = response.data.auth;\n  } else if (response.data.data){\n    message = response.data.data;\n  } else if (response.data) {\n    message = response.data;\n  } else {\n    message['status']= response.status;\n    message['statusText'] = response.statusText;\n  }\n  return message;\n}\n\n// Internal function - parse axios error\nconst parseAxiosError = function(error){\n  let helpMessage = \"\";\n  // Fix the stack\n  // passing parseAxiosError as the second param will leave this function out of the trace\n  Error.captureStackTrace(error, parseAxiosError);\n  // Verify if it's a Vault error\n  // https://www.vaultproject.io/api-docs#error-response\n  if (error.response && error.response.status) {\n    error.isVaultError = true;\n    switch(error.response.status){\n        case 400:\n          helpMessage = \"Invalid request, missing or invalid data.\";\n          break;\n        case 403:\n          helpMessage = \"Forbidden, your authentication details are either incorrect, you don't have access to this feature, or - if CORS is enabled - you made a cross-origin request from an origin that is not allowed to make such requests.\";\n          break;\n        case 404:\n          helpMessage = \"Invalid path. This can both mean that the path truly doesn't exist or that you don't have permission to view a specific path. We use 404 in some cases to avoid state leakage.\";\n          break;\n        case 429:\n          helpMessage = \"Default return code for health status of standby nodes. This will likely change in the future.\";\n          break;\n        case 473:\n          helpMessage = \"Default return code for health status of performance standby nodes.\";\n          break;\n        case 500:\n          helpMessage = \"Internal server error. An internal error has occurred, try again later. If the error persists, report a bug.\";\n          break;\n        case 502:\n          helpMessage = \"A request to Vault required Vault making a request to a third party; the third party responded with an error of some kind.\";\n          break;\n        case 503:\n          helpMessage = \"Vault is down for maintenance or is currently sealed. Unseal it or Try again later.\";\n          break;\n        default:\n          helpMessage = \"Unkown error code or helper is not implemented yet.\";\n    }\n    error.vaultHelpMessage = helpMessage;\n  }\n  return error;\n}\n\n// main class constructor\n/**\n* @constructor\n* @param {boolean} [params.https=false]\n* @param {string} [params.cert]\n* @param {string} [params.key]\n* @param {string} [params.cacert]\n* @param {string} [params.baseUrl]\n* @param {string} [params.rootPath]\n* @param {number} [params.timeout=1000]\n* @param {boolean} [params.proxy=false]\n* @param {string} [params.namespace]\n*/\nexport default class Vault {\n  constructor(params) {\n    /** @type {boolean} */\n    this.https = params.https || false;\n    /** @type {string} */\n    this.cert = params.cert;\n    /** @type {string} */\n    this.key = params.key;\n    /** @type {string} */\n    this.cacert = params.cacert;\n    /** @type {string} */\n    this.baseUrl = params.baseUrl || config.baseUrl;\n    /** @type {string} */\n    this.rootPath = params.rootPath;\n    /** @type {number} */\n    this.timeout = params.timeout || config.timeout;\n    /** @type {Object} */\n    this.proxy = params.proxy || config.proxy;\n    /** @type {string} */\n    this.namespace = params.namespace || config.namespace;\n    try {\n      if (this.https) {\n        /** @type {Object | boolean} */\n        this.agent = getHttpsAgent(this.cert, this.key, this.cacert);\n      }\n      else {\n        this.agent = false;\n      }\n      /** @type {Object} */\n      this.instance = getAxiosInstance(this.baseUrl, this.timeout, this.agent, this.proxy, this.namespace);\n    } catch (error) {\n      console.error('Error initiating Vault class:\\n', error);\n    }\n  }\n\n  // /sys API endpoints\n  /**\n  * @param {Object} [params] \n  * @returns {PromiseLike<Object>}\n  */\n  async healthCheck(params){\n    const Options = {\n      url: config.sysHealth,\n      method: 'get',\n      params: params,\n      headers: {\n        \"X-Vault-Namespace\": '' // https://www.vaultproject.io/docs/enterprise/namespaces#root-only-api-paths\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @returns {PromiseLike<Object>}\n  */\n  async sealStatus(){\n    const Options = {\n      url: config.sysSealStatus,\n      method: 'get'\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @returns {PromiseLike<Object>}\n  */\n  async sysHostInfo(sudoToken){\n    const Options = {\n      url: config.sysHostInfo,\n      method: 'get',\n      headers: {\n        \"X-Vault-Token\": sudoToken,\n        \"X-Vault-Namespace\": '' // https://www.vaultproject.io/docs/enterprise/namespaces#root-only-api-paths\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {string} token\n  * @param {string[]} paths\n  * @returns {PromiseLike<Object>}\n  */\n  async sysCapabilities(sudoToken, token, paths){\n    const Options = {\n      url: config.sysCapabilities,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      },\n      data: {\n        token: token,\n        paths: paths\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string[]} paths\n  * @returns {PromiseLike<Object>}\n  */\n  async sysCapabilitiesSelf(token, paths){\n    const Options = {\n      url: config.sysCapabilitiesSelf,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        paths: paths\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {string} type\n  * @returns {PromiseLike<Object>}\n  */\n  async sysInternalCounters(sudoToken, type) {\n    let message = {};\n    if (config.sysCounterTypes.includes(type)) {\n      const Options = {\n        url: `${config.sysInternalCounters}/${type}`,\n        method: 'get',\n        headers: {\n          \"X-Vault-Token\": sudoToken\n        }\n      };\n\n      try {\n        const response = await this.instance(Options);\n        return parseAxiosResponse(response);\n      } catch(err) {\n        throw parseAxiosError(err);\n      }\n\n    } else {\n      message['status']= 400;\n      message['statusText'] = 'Bad request: Counter type error';\n      reject(new Error(message));\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {string} [format]\n  * @returns {PromiseLike<Object>}\n  */\n  async sysMetrics(sudoToken, format){\n    const Options = {\n      url: '',\n      method: 'get',\n      headers: {\n        \"X-Vault-Token\": sudoToken,\n        \"X-Vault-Namespace\": '' // https://www.vaultproject.io/docs/enterprise/namespaces#root-only-api-paths\n      }\n    };\n    if (config.sysMetricFormats.includes(format)) {\n      Options.url= `${config.sysMetrics}?format=${format}`;\n    }\n    else {\n      Options.url= `${config.sysMetrics}`;\n    }\n    const xvn = this.instance.defaults.headers['X-Vault-Namespace'];\n    this.instance.defaults.headers['X-Vault-Namespace'] = '';\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    } finally {\n      this.instance.defaults.headers['X-Vault-Namespace'] = xvn;\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @returns {PromiseLike<Object>}\n  */\n  async sysSeal(sudoToken){\n    const Options = {\n      url: config.sysSeal,\n      method: 'put',\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {string} key\n  * @param {boolean} reset\n  * @param {boolean} migrate\n  * @returns {PromiseLike<Object>}\n  */\n  async sysUnseal(sudoToken, key, reset, migrate){\n    const Options = {\n      url: config.sysUnseal,\n      method: 'put',\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      },\n      data: {\n        \"key\": key,\n        \"reset\": reset,\n        \"migrate\": migrate\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  //\n  // Token auth method API endpoints\n  // The token method is built-in and automatically available at /auth/token.\n  //\n\n  /**\n  * @param {string} vaultToken\n  * @param {Object} [params]\n  * @param {string} [params.id]\n  * @param {string} [params.role_name]\n  * @param {string} [params.policies]\n  * @param {Object} [params.meta]\n  * @param {boolean} [params.no_narent=false]\n  * @param {boolean} [params.no_default_policy=false]\n  * @param {boolean} [params.renewable=true]\n  * @param {string} [params.ttl]\n  * @param {string} [params.type=service]\n  * @param {string} [params.explicit_max_ttl]\n  * @param {string} [params.display_name]\n  * @param {number} [params.num_uses]\n  * @param {string} [params.period]\n  * @param {string} [params.entity_alias]\n  * @returns {PromiseLike<Object>}\n  */\n\n  async createToken(vaultToken, params) {\n    assert(vaultToken, 'createToken: required parameter missing: vaultToken');\n\n    // Defaults - most are probably already defaults from Vault itself\n    params = {\n      no_parent: false,\n      no_default_policy: false,\n      renewable: true,\n      type: 'service',\n      // display_name: '',\n\n      ...params\n    };\n\n    const { id, role_name, policies, meta, no_parent,\n      no_default_policy, renewable, ttl, type, explicit_max_ttl, display_name,\n      num_uses, period, entity_alias } = params;\n\n    const url = role_name ? `${config.tokenCreate}/${role_name}` : config.tokenCreate;\n\n    const Options = {\n      url,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        id, policies, meta, no_parent,\n        no_default_policy, renewable, ttl, type, explicit_max_ttl, display_name,\n        num_uses, period, entity_alias\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} vaultToken\n  * @param {string} clientToken\n  * @returns {PromiseLike<Object>}\n  */\n  async revokeToken(vaultToken, clientToken) {\n    const Options = {\n      url: config.tokenRevoke,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        token: clientToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} clientToken\n  * @returns {PromiseLike<Object>}\n  */\n  async revokeSelfToken(clientToken) {\n    const Options = {\n      url: config.tokenRevokeSelf,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": clientToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} vaultToken\n  * @param {string} clientToken\n  * @returns {PromiseLike<Object>}\n  */\n  async lookupToken(vaultToken, clientToken) {\n    const Options = {\n      url: config.tokenLookup,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        token: clientToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} clientToken\n  * @returns {PromiseLike<Object>}\n  */\n  async lookupSelfToken(clientToken) {\n    const Options = {\n      url: config.tokenLookupSelf,\n      method: 'get',\n      headers: {\n        \"X-Vault-Token\": clientToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} vaultToken\n  * @param {string} clientToken\n  * @param {string} increment\n  * @returns {PromiseLike<Object>}\n  */\n  async renewToken(vaultToken, clientToken, increment) {\n    const Options = {\n      url: config.tokenRenew,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        token: clientToken,\n        increment: increment\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} clientToken\n  * @param {string} increment\n  * @returns {PromiseLike<Object>}\n  */\n  async renewSelfToken(clientToken, increment) {\n    const Options = {\n      url: config.tokenRenewSelf,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": clientToken\n      },\n      data: {\n        increment: increment\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @returns {PromiseLike<Object>}\n  */\n  async listAccessors(sudoToken) {\n    const Options = {\n      url: config.tokenListAccessors,\n      method: 'list',\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} vaultToken\n  * @param {string} accessor\n  * @returns {PromiseLike<Object>}\n  */\n  async lookupAccessor(vaultToken, accessor) {\n    const Options = {\n      url: config.tokenLookupAccessor,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        accessor: accessor\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} vaultToken\n  * @param {string} accessor\n  * @param {string} increment\n  * @returns {PromiseLike<Object>}\n  */\n  async renewAccessor(vaultToken, accessor, increment) {\n    const Options = {\n      url: config.tokenRenewAccessor,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        accessor: accessor,\n        increment: increment || null\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} vaultToken\n  * @param {string} accessor\n  * @returns {PromiseLike<Object>}\n  */\n  async revokeAccessor(vaultToken, accessor) {\n    const Options = {\n      url: config.tokenRevokeAccessor,\n      method: 'post',\n      headers: {\n        \"X-Vault-Token\": vaultToken\n      },\n      data: {\n        accessor: accessor\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  //\n  // ldap auth method API endpoints\n  //\n\n  /**\n  * @param {string} username\n  * @param {string} password\n  * @param {string} [mount]\n  * @returns {Object}\n  */\n  async loginWithLdap(username, password, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapLogin[0]}/${username}`,\n      method: config.ldapLogin[1],\n      data: {\n        password: password\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string[]} policies\n  * @param {string} groups\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async createLdapUser(token, username, policies, groups, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapCreateUser[0]}/${username}`,\n      method: config.ldapCreateUser[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        policies: policies,\n        groups: groups\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string[]} policies\n  * @param {string} groups\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateLdapUser(token, username, policies, groups, mount) {\n    return await this.createLdapUser(token, username, policies, groups, mount);\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} group\n  * @param {string[]} policies\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async createLdapGroup(token, group, policies, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapCreateGroup[0]}/${group}`,\n      method: config.ldapCreateGroup[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        policies: policies\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} group\n  * @param {string[]} policies\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateLdapGroup(token, group, policies, mount) {\n    return await this.createLdapGroup(token, group, policies, mount);\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} group\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readLdapGroup(token, group, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapReadGroup[0]}/${group}`,\n      method: config.ldapReadGroup[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readLdapUser(token, username, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapReadUser[0]}/${username}`,\n      method: config.ldapReadUser[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async listLdapUsers(token, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapListUsers[0]}`,\n      method: config.ldapListUsers[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async listLdapGroups(token, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapListGroups[0]}`,\n      method: config.ldapListGroups[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deleteLdapUser(token, username, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapDeleteUser[0]}/${username}`,\n      method: config.ldapDeleteUser[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} group\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deleteLdapGroup(token, group, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapDeleteGroup[0]}/${group}`,\n      method: config.ldapDeleteGroup[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readLdapConfig(token, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapReadConfig[0]}`,\n      method: config.ldapReadConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @param {Object} [params]\n  * @param {string} params.url\n  * @param {boolean} params.case_sensitive_names\n  * @param {number} params.request_timeout\n  * @param {boolean} params.starttls\n  * @param {string} params.tls_min_version\n  * @param {string} params.tls_max_version\n  * @param {boolean} params.insecure_tls\n  * @param {string} params.certificate\n  * @param {string} params.client_tls_cert\n  * @param {string} params.client_tls_key\n  * @param {string} params.binddn\n  * @param {string} params.bindpass\n  * @param {string} params.userdn\n  * @param {string} params.userattr\n  * @param {boolean} params.discoverdn\n  * @param {boolean} params.deny_null_bind\n  * @param {string} params.upndomain\n  * @param {string} params.userfilter\n  * @param {boolean} params.anonymous_group_search\n  * @param {string} params.groupfilter\n  * @param {string} params.groupdn\n  * @param {string} params.groupattr\n  * @param {boolean} params.username_as_alias\n  * @param {number} params.token_ttl\n  * @param {number} params.token_max_ttl\n  * @param {string[]} params.token_policies\n  * @param {string[]} params.token_bound_cidrs\n  * @param {number} params.token_explicit_max_ttl\n  * @param {boolean} params.token_no_default_policy\n  * @param {number} params.token_num_uses\n  * @param {number} params.token_period\n  * @param {string} params.token_type\n  * @returns {PromiseLike<Object>}\n  */\n  async setLdapConfig(token, params, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.ldapRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.ldapSetConfig[0]}`,\n      method: config.ldapSetConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        url: params.url,\n        case_sensitive_names: params.case_sensitive_names,\n        request_timeout: params.request_timeout,\n        starttls: params.starttls,\n        tls_min_version: params.tls_min_version,\n        tls_max_version: params.tls_max_version,\n        insecure_tls: params.insecure_tls,\n        certificate: params.certificate,\n        client_tls_cert: params.client_tls_cert,\n        client_tls_key: params.client_tls_key,\n        binddn: params.binddn,\n        bindpass: params.bindpass,\n        userdn: params.userdn,\n        userattr: params.userattr,\n        discoverdn: params.discoverdn,\n        deny_null_bind: params.deny_null_bind,\n        upndomain: params.upndomain,\n        userfilter: params.userfilter,\n        anonymous_group_search: params.anonymous_group_search,\n        groupfilter: params.groupfilter,\n        groupdn: params.groupdn,\n        groupattr: params.groupattr,\n        username_as_alias: params.username_as_alias,\n        token_ttl: params.token_ttl,\n        token_max_ttl: params.token_max_ttl,\n        token_policies: params.token_policies,\n        token_bound_cidrs: params.token_bound_cidrs,\n        token_explicit_max_ttl: params.token_explicit_max_ttl,\n        token_no_default_policy: params.token_no_default_policy,\n        token_num_uses: params.token_num_uses,\n        token_period: params.token_period,\n        token_type: params.token_type\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  //\n  // TLS Certificate auth method API endpoints\n  //\n\n  /**\n  * @param {string} [mount]\n  * @param {string} certName\n  * @returns {PromiseLike<Object>}\n  */\n   async loginWithCert(certName, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.certRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.certLogin[0]}`,\n      method: config.certLogin[1],\n      data: {\n        name: certName\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  //\n  // Userpass auth method API endpoints\n  //\n\n  /**\n  * @param {string} username\n  * @param {string} password\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async loginWithUserpass(username, password, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassLogin[0]}/${username}`,\n      method: config.userpassLogin[1],\n      data: {\n        password: password\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} password\n  * @param {string[]} policies\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async createUserpassUser(token, username, password, policies, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassCreateUser[0]}/${username}`,\n      method: config.userpassCreateUser[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        policies: policies,\n        password: password\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} password\n  * @param {string[]} policies\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateUserpassUser(token, username, password, policies, mount) {\n    return await this.createUserpassUser(token, username, password, policies, mount);\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readUserpassUser(token, username, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassReadUser[0]}/${username}`,\n      method: config.userpassReadUser[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deleteUserpassUser(token, username, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassDeleteUser[0]}/${username}`,\n      method: config.userpassDeleteUser[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string} password\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateUserpassPassword(token, username, password, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassUpdatePass[0]}/${username}/password`,\n      method: config.userpassUpdatePass[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        password: password\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} username\n  * @param {string[]} policies\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateUserpassPolicies(token, username, policies, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassUpdatePolicies[0]}/${username}/policies`,\n      method: config.userpassUpdatePolicies[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        policies: policies\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async listUserpassUsers(token, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.userpassRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.userpassListUsers[0]}`,\n      method: config.userpassListUsers[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n\n  //\n  // Kubernetes auth method API endpoints\n  //\n\n  /**\n   * @param {string} role\n   * @param {string} jwt\n   * @param {string} [mount]\n   * @returns {Object}\n   */\n  async loginWithK8s(role, jwt, mount) {\n\n    assert(role, 'loginWithK8s: required parameter missing: role');\n    assert(jwt, 'loginWithK8s: required parameter missing: jwt');\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.k8sLogin[0]}`,\n      method: config.k8sLogin[1],\n      data: {\n        role: role,\n        jwt: jwt\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {Object} params\n   * @param {string} params.kubernetes_host\n   * @param {string} params.kubernetes_ca_cert\n   * @param {string} params.token_reviewer_jwt\n   * @param {Object} [params.pem_keys]\n   * @param {string} params.issuer\n   * @param {boolean} params.disable_iss_validation\n   * @param {boolean} params.disable_local_ca_jwt\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async updateK8sConfig(token, params, mount) {\n\n    assert(token, 'updateK8sConfig: required parameter missing: vault token');\n\n    // Defaults - most are probably already defaults from Vault itself\n    params = {\n      disable_iss_validation: false,\n      disable_local_ca_jwt: false,\n      ...params\n    };\n\n    const { kubernetes_host, kubernetes_ca_cert, token_reviewer_jwt, pem_keys, issuer,\n    disable_iss_validation, disable_local_ca_jwt } = params;\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n\n    const Options = {\n      url: `${rootPath}/${config.k8sUpdateConfig[0]}`,\n      method: config.k8sUpdateConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        kubernetes_host, kubernetes_ca_cert, token_reviewer_jwt, pem_keys, issuer,\n        disable_iss_validation, disable_local_ca_jwt\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} [mount]\n   * @returns {Object}\n   */\n  async readK8sConfig(token, mount) {\n\n    assert(token, 'readK8sConfig: required parameter missing: Vault admin token');\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.k8sReadConfig[0]}`,\n      method: config.k8sReadConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} role\n   * @param {Object} params\n   * @param {Object} [params.bound_service_account_names]\n   * @param {Object} [params.bound_service_account_namespaces]\n   * @param {string} params.audience\n   * @param {number | string} params.token_ttl\n   * @param {number | string} params.token_max_ttl\n   * @param {Object} [params.token_policies]\n   * @param {Object} [params.token_bound_cidrs]\n   * @param {number | string} params.token_explicit_max_ttl\n   * @param {boolean} params.token_no_default_policy\n   * @param {number} params.token_num_uses\n   * @param {number | string} params.token_period\n   * @param {string} params.token_type\n   * @param {string} [mount]\n   * @returns {Object}\n   */\n  async createK8sRole(token, role, params, mount) {\n\n    assert(token, 'createK8sRole: required parameter missing: Vault admin token');\n    assert(role, 'createK8sRole: required parameter missing: role');\n\n    // Defaults - most are probably already defaults from Vault itself\n    params = {\n      token_no_default_policy: false,\n      token_num_uses: 0,\n      ...params\n    };\n\n    const { bound_service_account_names, bound_service_account_namespaces, audience,\n    token_ttl, token_max_ttl, token_policies, token_bound_cidrs, token_explicit_max_ttl,\n    token_no_default_policy, token_num_uses, token_period, token_type } = params;\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.k8sCreateRole[0]}/${role}`,\n      method: config.k8sCreateRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        bound_service_account_names, bound_service_account_namespaces, audience,\n        token_ttl, token_max_ttl, token_policies, token_bound_cidrs, token_explicit_max_ttl,\n        token_no_default_policy, token_num_uses, token_period, token_type\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} role\n   * @param {string} [mount]\n   * @returns {Object}\n   */\n  async readK8sRole(token, role, mount) {\n\n    assert(token, 'readK8sRole: required parameter missing: Vault admin token');\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.k8sReadRole[0]}/${role}`,\n      method: config.k8sReadRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} [mount]\n   * @returns {Object}\n   */\n  async listK8sRoles(token, mount) {\n\n    assert(token, 'listK8sRoles: required parameter missing: Vault admin token');\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.k8sListRoles[0]}`,\n      method: config.k8sListRoles[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} role\n   * @param {string} [mount]\n   * @returns {Object}\n   */\n  async deleteK8sRole(token, role, mount) {\n\n    assert(token, 'deleteK8sRole: required parameter missing: Vault admin token');\n\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.k8sRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.k8sDeleteRole[0]}/${role}`,\n      method: config.k8sDeleteRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n\n  //\n  // AppRole auth method API endpoints\n  //\n\n  /**\n  * @param {string} roleId\n  * @param {string} secretId\n  * @param {string} [mount]\n  * @returns {Object}\n  */\n  async loginWithAppRole(roleId, secretId, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.appRoleRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.appRoleLogin[0]}`,\n      method: config.appRoleLogin[1],\n      data: {\n        role_id: roleId,\n        secret_id: secretId\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} appRole\n  * @param {string} [metadata]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async generateAppRoleSecretId(token, appRole, metadata, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.appRoleRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.appRoleCreateSecret[0]}/${appRole}/${config.appRoleCreateSecret[1]}`,\n      method: config.appRoleCreateSecret[2],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        metadata: metadata\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} appRole\n  * @param {string} secretId\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readAppRoleSecretId(token, appRole, secretId, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.appRoleRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.appRoleReadSecret[0]}/${appRole}/${config.appRoleReadSecret[1]}`,\n      method: config.appRoleReadSecret[2],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        secret_id: secretId\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} appRole\n  * @param {string} secretId\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async destroyAppRoleSecretId(token, appRole, secretId, mount) {\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.appRoleRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.appRoleDestroySecret[0]}/${appRole}/${config.appRoleDestroySecret[1]}`,\n      method: config.appRoleDestroySecret[2],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        secret_id: secretId\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  //\n  // PKI secret engine API endpoints\n  //\n\n  /**\n  * @param {string} format - certificate format either 'der' or 'pem'\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async readCACertificate(format, mount) {\n    let url = \"\";\n    let rootPath= \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    if (format === 'pem') {\n      url = `${rootPath}/${config.pkiReadCACert[0]}/pem`;\n    } else {\n      url = `${rootPath}/${config.pkiReadCACert[0]}`;\n    }\n    const Options = {\n      url: url,\n      method: config.pkiReadCACert[1]\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} format - certificate format either 'der' or 'pem'\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async readPkiCrl(format, mount) {\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    if (format === 'pem') {\n      url = `${rootPath}/${config.pkiReadCrl[0]}/pem`;\n    } else {\n      url = config.pkiReadCrl[0];\n    }\n    const Options = {\n      url: url,\n      method: config.pkiReadCrl[1]\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async readCAChain(mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiReadCAChain[0]}`,\n      method: config.pkiReadCAChain[1]\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} serial\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readCertificate(serial, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiReadCert[0]}/${serial}`,\n      method: config.pkiReadCert[1]\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async listCertificates(token, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiListCerts[0]}`,\n      method: config.pkiListCerts[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} pemBundle\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async setCACertificate(token, pemBundle, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiSetCACert[0]}`,\n      method: config.pkiSetCACert[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        pem_bundle: pemBundle\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readCrlConfig(token, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiReadCrlConf[0]}`,\n      method: config.pkiReadCrlConf[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [expiry]\n  * @param {boolean} [disable]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async setCrlConfig(token, expiry, disable, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiSetCrlConf[0]}`,\n      method: config.pkiSetCrlConf[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        expiry: expiry,\n        disable: disable\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readPkiUrls(token, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiReadUrls[0]}`,\n      method: config.pkiReadUrls[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string[]} [issuingCertificates]\n  * @param {string[]} [crlDistributionPoints]\n  * @param {string[]} [oscpServers]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async setPkiUrls(token, issuingCertificates, crlDistributionPoints, oscpServers, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiSetUrls[0]}`,\n      method: config.pkiSetUrls[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        issuing_certificates: issuingCertificates,\n        crl_distribution_points: crlDistributionPoints,\n        ocsp_servers: oscpServers\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async rotatePkiCrl(token, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiRotateCrl[0]}`,\n      method: config.pkiRotateCrl[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {Object} params\n  * @param {string} params.type - root CA type either 'internal' or 'exported'\n  * @param {string} params.commonName\n  * @param {string} params.altNames\n  * @param {string} params.ipSans\n  * @param {string} params.uriSans\n  * @param {string} params.otherSans\n  * @param {string} params.ttl\n  * @param {string} params.format - certificate format either 'der', 'pem' or 'pem_bundle'\n  * @param {string} params.pkFormat - private key format either 'der' or 'pkcs8'\n  * @param {string} params.keyType - key type either 'rsa' or 'ec'\n  * @param {number} params.keyBits\n  * @param {boolean} params.excludeCnFromSans\n  * @param {number} params.maxPathLength\n  * @param {string} params.permittedDnsDomains\n  * @param {string} params.ou\n  * @param {string} params.organization\n  * @param {string} params.country\n  * @param {string} params.locality\n  * @param {string} params.province\n  * @param {string} params.streetAddress\n  * @param {string} params.postalCode\n  * @param {string} params.serialNumber\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async generateRootCA(sudoToken, params, mount) {\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    if (params.type === 'exported') {\n      url = `${rootPath}/${config.pkiGenerateRoot[0]}/exported`;\n    } else {\n      url = `${rootPath}/${config.pkiGenerateRoot[0]}/internal`;\n    }\n    const Options = {\n      url: url,\n      method: config.pkiGenerateRoot[1],\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      },\n      data: {\n        common_name: params.commonName,\n        alt_names: params.altNames,\n        ip_sans: params.ipSans,\n        uri_sans: params.uriSans,\n        other_sans: params.otherSans,\n        ttl: params.ttl,\n        format: params.format,\n        private_key_format: params.pkFormat,\n        key_type: params.keyType,\n        key_bits: params.keyBits,\n        max_path_length: params.maxPathLength,\n        exclude_cn_from_sans: params.excludeCnFromSans,\n        permitted_dns_domains: params.permittedDnsDomains,\n        ou: params.ou,\n        organization: params.organization,\n        country: params.country,\n        locality: params.locality,\n        province: params.province,\n        street_address: params.streetAddress,\n        postal_code: params.postalCode,\n        serial_number: params.serialNumber\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deleteRootCA(sudoToken, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiDeleteRoot[0]}`,\n      method: config.pkiDeleteRoot[1],\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n  * @param {string} token\n  * @param {string} params.type - intermediate CA type either 'internal' or 'exported'\n  * @param {Object} params\n  * @param {string} params.commonName\n  * @param {string} [params.altNames]\n  * @param {string} [params.ipSans]\n  * @param {string} [params.uriSans]\n  * @param {string} [params.otherSans]\n  * @param {string} [params.format] - certificate format either 'der', 'pem' or 'pem_bundle'\n  * @param {string} [params.pkFormat] - private key format either 'der' or 'pkcs8'\n  * @param {string} [params.keyType] - key type either 'rsa' or 'ec'\n  * @param {number} [params.keyBits]\n  * @param {boolean} [params.excludeCnFromSans]\n  * @param {string} [params.ou]\n  * @param {string} [params.organization]\n  * @param {string} [params.country]\n  * @param {string} [params.locality]\n  * @param {string} [params.province]\n  * @param {string} [params.streetAddress]\n  * @param {string} [params.postalCode]\n  * @param {string} [params.serialNumber]\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async genIntermediateCA(token, params, mount) {\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    if (params.type === 'exported') {\n      url = `${rootPath}/${config.pkiGenIntermediate[0]}/exported`;\n    } else {\n      url = `${rootPath}/${config.pkiGenIntermediate[0]}/internal`;\n    }\n    const Options = {\n      url: url,\n      method: config.pkiGenIntermediate[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        common_name: params.commonName,\n        alt_names: params.altNames,\n        ip_sans: params.ipSans,\n        uri_sans: params.uriSans,\n        other_sans: params.otherSans,\n        format: params.format,\n        private_key_format: params.pkFormat,\n        key_type: params.keyType,\n        key_bits: params.keyBits,\n        exclude_cn_from_sans: params.excludeCnFromSans,\n        ou: params.ou,\n        organization: params.organization,\n        country: params.country,\n        locality: params.locality,\n        province: params.province,\n        street_address: params.streetAddress,\n        postal_code: params.postalCode,\n        serial_number: params.serialNumber\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} sudoToken\n  * @param {Object} params\n  * @param {string} params.csr\n  * @param {string} params.commonName\n  * @param {string} [params.altNames]\n  * @param {string} [params.ipSans]\n  * @param {string} [params.uriSans]\n  * @param {string} [params.otherSans]\n  * @param {string} [params.ttl]\n  * @param {string} [params.format] - certificate format either 'der', 'pem' or 'pem_bundle'\n  * @param {number} [params.maxPathLength]\n  * @param {boolean} [params.excludeCnFromSans]\n  * @param {boolean} [params.useCsrValues]\n  * @param {string} [params.permittedDnsDomains]\n  * @param {string} [params.ou]\n  * @param {string} [params.organization]\n  * @param {string} [params.country]\n  * @param {string} [params.locality]\n  * @param {string} [params.province]\n  * @param {string} [params.streetAddress]\n  * @param {string} [params.postalCode]\n  * @param {string} [params.serialNumber]\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async signIntermediateCA(sudoToken, params, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiSignIntermediate[0]}`,\n      method: config.pkiSignIntermediate[1],\n      headers: {\n        \"X-Vault-Token\": sudoToken\n      },\n      data: {\n        csr: params.csr,\n        common_name: params.commonName,\n        alt_names: params.altNames,\n        ip_sans: params.ipSans,\n        uri_sans: params.uriSans,\n        other_sans: params.otherSans,\n        format: params.format || 'pem',\n        max_path_length: params.maxPathLength,\n        exclude_cn_from_sans: params.excludeCnFromSans,\n        use_csr_values: params.useCsrValues,\n        permitted_dns_domains: params.permittedDnsDomains,\n        ou: params.ou,\n        organization: params.organization,\n        country: params.country,\n        locality: params.locality,\n        province: params.province,\n        street_address: params.streetAddress,\n        postal_code: params.postalCode,\n        serial_number: params.serialNumber\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} certificate\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async setIntermediateCA(token, certificate, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiSetIntermediate[0]}`,\n      method: config.pkiSetIntermediate[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        certificate: certificate\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {Object} params\n  * @param {string} params.role - intermediate CA role type either 'internal' or 'exported'\n  * @param {string} params.commonName\n  * @param {string} [params.altNames]\n  * @param {string} [params.ipSans]\n  * @param {string} [params.uriSans]\n  * @param {string} [params.otherSans]\n  * @param {string} [params.ttl]\n  * @param {string} params.format - certificate format either 'der', 'pem' or 'pem_bundle'\n  * @param {string} [params.pkFormat] - private key format either 'der' or 'pkcs8'\n  * @param {boolean} [params.excludeCnFromSans]\n  * @param {string} [mount]\n  * @returns {PromiseLike<string>}\n  */\n  async genPkiCertificate(token, params, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiGenerateCertificate[0]}/${params.role}`,\n      method: config.pkiGenerateCertificate[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        common_name: params.commonName,\n        alt_names: params.altNames,\n        ip_sans: params.ipSans,\n        uri_sans: params.uriSans,\n        other_sans: params.otherSans,\n        ttl: params.ttl,\n        format: params.format,\n        private_key_format: params.pkFormat,\n        exclude_cn_from_sans: params.excludeCnFromSans\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} serialNumber\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async revokePkiCertificate(token, serialNumber, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiRevokeCertificate[0]}`,\n      method: config.pkiRevokeCertificate[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        serial_number: serialNumber\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {Object} params\n  * @param {string} params.name\n  * @param {string} [params.ttl]\n  * @param {string} [params.maxTtl]\n  * @param {boolean} [params.allowLocalhost]\n  * @param {string[]} [params.allowedDomains]\n  * @param {boolean} [params.allowedDomainsTemplate]\n  * @param {boolean} [params.allowBareDomains]\n  * @param {boolean} [params.allowSubdomains]\n  * @param {boolean} [params.allowGlobDomains]\n  * @param {boolean} [params.allowAnyName]\n  * @param {boolean} [params.enforceHostnames]\n  * @param {string} [params.allowIpSans]\n  * @param {string} [params.allowedUriSans]\n  * @param {string} [params.allowedOtherSans]\n  * @param {boolean} [params.serverFlag]\n  * @param {boolean} [params.clientFlag]\n  * @param {boolean} [params.codeSigningFlag]\n  * @param {boolean} [params.emailProtectionFlag]\n  * @param {string} [params.keyType] - key type either 'rsa' or 'ec'\n  * @param {number} [params.keyBits]\n  * @param {string[]} [params.keyUsage]\n  * @param {string[]} [params.externalKeyUsage]\n  * @param {string} [params.extKeyUsageOids]\n  * @param {boolean} [params.useCsrCommonName]\n  * @param {boolean} [params.useCsrSans]\n  * @param {string} [params.ou]\n  * @param {string} [params.organization]\n  * @param {string} [params.country]\n  * @param {string} [params.locality]\n  * @param {string} [params.province]\n  * @param {string} [params.streetAddress]\n  * @param {string} [params.postalCode]\n  * @param {string} [params.serialNumber]\n  * @param {boolean} [params.generateLease]\n  * @param {boolean} [params.noStore]\n  * @param {boolean} [params.requireCn]\n  * @param {string[]} [params.policyIdentifiers]\n  * @param {boolean} [params.basicConstraintsValidForNonCa]\n  * @param {string} [params.notBeforeDuration]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async createPkiRole(token, params, mount) {\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiCreateRole[0]}/${params.name}`,\n      method: config.pkiCreateRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        ttl: params.ttl,\n        max_ttl: params.maxTtl,\n        allow_localhost: params.allowLocalhost,\n        allowed_domains: params.allowedDomains,\n        allowed_domains_template: params.allowedDomainsTemplate,\n        allow_bare_domains: params.allowBareDomains,\n        allow_subdomains: params.allowSubdomains,\n        allow_glob_domains: params.allowGlobDomains,\n        allow_any_name: params.allowAnyName,\n        enforce_hostnames: params.enforceHostnames,\n        allow_ip_sans: params.allowIpSans,\n        allowed_uri_sans: params.allowedUriSans,\n        allowed_other_sans: params.allowedOtherSans,\n        server_flag: params.serverFlag,\n        client_flag: params.clientFlag,\n        code_signing_flag: params.codeSigningFlag,\n        email_protection_flag: params.emailProtectionFlag,\n        key_type: params.keyType,\n        key_bits: params.keyBits,\n        key_usage: params.keyUsage,\n        external_key_usage: params.externalKeyUsage,\n        ext_key_usage_oids: params.extKeyUsageOids,\n        use_csr_common_name: params.useCsrCommonName,\n        use_csr_sans: params.useCsrSans,\n        ou: params.ou,\n        organization: params.organization,\n        country: params.country,\n        locality: params.locality,\n        province: params.province,\n        street_address: params.streetAddress,\n        postal_code: params.postalCode,\n        serial_number: params.serialNumber,\n        generate_lease: params.generateLease,\n        no_store: params.noStore,\n        require_cn: params.requireCn,\n        policy_identifiers: params.policyIdentifiers,\n        basic_constraints_valid_for_non_ca: params.basicConstraintsValidForNonCa,\n        not_before_duration: params.notBeforeDuration\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {Object} params\n  * @param {string} params.name\n  * @param {string} [params.ttl]\n  * @param {string} [params.maxTtl]\n  * @param {boolean} [params.allowLocalhost]\n  * @param {string[]} [params.allowedDomains]\n  * @param {boolean} [params.allowedDomainsTemplate]\n  * @param {boolean} [params.allowBareDomains]\n  * @param {boolean} [params.allowSubdomains]\n  * @param {boolean} [params.allowGlobDomains]\n  * @param {boolean} [params.allowAnyName]\n  * @param {boolean} [params.enforceHostnames]\n  * @param {string} [params.allowIpSans]\n  * @param {string} [params.allowedUriSans]\n  * @param {string} [params.allowedOtherSans]\n  * @param {boolean} [params.serverFlag]\n  * @param {boolean} [params.clientFlag]\n  * @param {boolean} [params.codeSigningFlag]\n  * @param {boolean} [params.emailProtectionFlag]\n  * @param {string} [params.keyType] - The type of key to generate. Can be either \"rsa\" or \"ec\".\n  * @param {number} [params.keyBits]\n  * @param {string[]} [params.keyUsage]\n  * @param {string[]} [params.externalKeyUsage]\n  * @param {string} [params.extKeyUsageOids]\n  * @param {boolean} [params.useCsrCommonName]\n  * @param {boolean} [params.useCsrSans]\n  * @param {string} [params.ou]\n  * @param {string} [params.organization]\n  * @param {string} [params.country]\n  * @param {string} [params.locality]\n  * @param {string} [params.province]\n  * @param {string} [params.streetAddress]\n  * @param {string} [params.postalCode]\n  * @param {string} [params.serialNumber]\n  * @param {boolean} [params.generateLease]\n  * @param {boolean} [params.noStore]\n  * @param {boolean} [params.requireCn]\n  * @param {string[]} [params.policyIdentifiers]\n  * @param {boolean} [params.basicConstraintsValidForNonCa]\n  * @param {string} [params.notBeforeDuration]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updatePkiRole(token, params, mount) {\n    return await this.createPkiRole(token, params, mount);\n  }\n\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readPkiRole(token, name, mount) {\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiReadRole[0]}/${name}`,\n      method: config.pkiReadRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async listPkiRoles(token, mount) {\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiListRoles[0]}`,\n      method: config.pkiListRoles[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deletePkiRole(token, name, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.pkiRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.pkiDeleteRole[0]}/${name}`,\n      method: config.pkiDeleteRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  //\n  // Active Directory secret engine API endpoints\n  //\n\n  /**\n   * @param {string} token\n   * @param {Object} params\n   * @param {number} [params.ttl]\n   * @param {number} [params.max_ttl]\n   * @param {string} [params.password_policy]\n   * @param {string} [params.url]\n   * @param {string} [params.request_timeout]\n   * @param {boolean} [params.starttls]\n   * @param {boolean} [params.insecure_tls]\n   * @param {string} [params.certificate]\n   * @param {string} params.binddn\n   * @param {string} params.bindpass\n   * @param {string} [params.userdn]\n   * @param {string} [params.upndomain]\n   * @param {string} [params.last_rotation_tolerance]\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async setADConfig(token, params, mount) {\n    assert(token, 'setADConfig: required parameter missing - token');\n\n    const { ttl, max_ttl, password_policy, url, request_timeout,\n      starttls, insecure_tls, certificate, binddn, bindpass,\n      userdn, upndomain, last_rotation_tolerance } = params;\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adSetConfig[0]}`,\n      method: config.adSetConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        ttl, max_ttl, password_policy, url,\n        request_timeout, starttls, insecure_tls,\n        certificate, binddn, bindpass, userdn,\n        upndomain, last_rotation_tolerance\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {Object} params\n   * @param {number} [params.ttl]\n   * @param {number} [params.max_ttl]\n   * @param {string} [params.password_policy]\n   * @param {string} [params.url]\n   * @param {string} [params.request_timeout]\n   * @param {boolean} [params.starttls]\n   * @param {boolean} [params.insecure_tls]\n   * @param {string} [params.certificate]\n   * @param {string} params.binddn\n   * @param {string} params.bindpass\n   * @param {string} [params.userdn]\n   * @param {string} [params.upndomain]\n   * @param {string} [params.last_rotation_tolerance]\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async updateADConfig(token, params, mount) {\n    assert(token, 'updateADConfig: required parameter missing - token');\n    return await this.setADConfig(token, params, mount);\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async readADConfig(token, mount) {\n    assert(token, 'readADConfig: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adReadConfig[0]}`,\n      method: config.adReadConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async deleteADConfig(token, mount) {\n    assert(token, 'deleteADConfig: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adDeleteConfig[0]}`,\n      method: config.adDeleteConfig[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n   * @param {string} token\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async listADRoles(token, mount) {\n    assert(token, 'listADRoles: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adListRoles[0]}`,\n      method: config.adListRoles[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {Object} params \n   * @param {string} params.name\n   * @param {string} params.service_account_name\n   * @param {string} [params.ttl]\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async createADRole(token, params, mount) {\n    assert(token, 'createADRole: required parameter missing - token');\n    assert(params, 'createADRole: required parameter missing - params');\n\n    const { name, service_account_name, ttl  } = params;\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adCreateRole[0]}/${name}`,\n      method: config.adCreateRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        service_account_name,\n        ttl\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {Object} params\n   * @param {string} params.name\n   * @param {string} params.service_account_name\n   * @param {string} [params.ttl]\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n   async updateADRole(token, params, mount) {\n     assert(token, 'updateADRole: required parameter missing - token');\n     assert(params, 'updateADRole: required parameter missing - params');\n     return await this.createADRole(token, params, mount);\n   }\n\n  /**\n   * @param {string} token\n   * @param {string} roleName\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async readADRole(token, roleName, mount) {\n    assert(token, 'readADRole: required parameter missing - token');\n    assert(roleName, 'readADRole: required parameter missing - roleName');\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adReadRole[0]}/${roleName}`,\n      method: config.adReadRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} roleName\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async deleteADRole(token, roleName, mount) {\n    assert(token, 'deleteADRole: required parameter missing - token');\n    assert(roleName, 'deleteADRole: required parameter missing - roleName');\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adDeleteRole[0]}/${roleName}`,\n      method: config.adDeleteRole[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n   * @param {string} token\n   * @param {string} roleName\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async getADRoleCred(token, roleName, mount) {\n    assert(token, 'getADRoleCred: required parameter missing - token');\n    assert(roleName, 'getADRoleCred: required parameter missing - roleName');\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adGetCred[0]}/${roleName}`,\n      method: config.adGetCred[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} roleName\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async rotateADRoleCred(token, roleName, mount) {\n    assert(token, 'rotateADRoleCred: required parameter missing - token');\n    assert(roleName, 'rotateADRoleCred: required parameter missing - roleName');\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adRotateCred[0]}/${roleName}`,\n      method: config.adRotateCred[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n   * @param {string} token\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async listADLibraries(token, mount) {\n    assert(token, 'listADLibraries: required parameter missing - token');\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adListLibraries[0]}`,\n      method: config.adListLibraries[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n\n  /**\n   * @param {string} token\n   * @param {string} setName\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async readADLibrary(token, setName, mount) {\n    assert(token, 'readADLibrary: required parameter missing - token');\n    assert(setName, 'readADLibrary: required parameter missing - setName');\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adReadLibrary[0]}/${setName}`,\n      method: config.adReadLibrary[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {Object} params\n   * @param {string} params.name\n   * @param {string[]} params.service_account_names\n   * @param {string} [params.ttl]\n   * @param {string} [params.max_ttl]\n   * @param {boolean} [params.disable_check_in_enforcement]\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async createADLibrary(token, params, mount) {\n    assert(token, 'createADLibrary: required parameter missing - token');\n    assert(params, 'createADLibrary: required parameter missing - params');\n\n    const { name, service_account_names, ttl, max_ttl, disable_check_in_enforcement  } = params;\n\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.adRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.adCreateLibrary[0]}/${name}`,\n      method: config.adCreateLibrary[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        service_account_names,\n        ttl,\n        max_ttl,\n        disable_check_in_enforcement\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {Object} params \n   * @param {string} params.name\n   * @param {string[]} params.service_account_names\n   * @param {string} [params.ttl]\n   * @param {string} [params.max_ttl]\n   * @param {boolean} [params.disable_check_in_enforcement]\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n   async updateADLibrary(token, params, mount) {\n     assert(token, 'updateADLibrary: required parameter missing - token');\n     assert(params, 'updateADLibrary: required parameter missing - params');\n     return await this.createADLibrary(token, params, mount);\n   }\n\n   /**\n    * @param {string} token\n    * @param {string} setName\n    * @param {string} [mount]\n    * @returns {PromiseLike<Object>}\n    */\n   async deleteADLibrary(token, setName, mount) {\n     assert(token, 'deleteADLibrary: required parameter missing - token');\n     assert(setName, 'deleteADLibrary: required parameter missing - setName');\n\n     let rootPath = \"\";\n     if (mount) {\n       rootPath = mount;\n     } else if (this.rootPath) {\n       rootPath = this.rootPath;\n     } else {\n       rootPath = config.adRootPath;\n     }\n     const Options = {\n       url: `${rootPath}/${config.adDeleteLibrary[0]}/${setName}`,\n       method: config.adDeleteLibrary[1],\n       headers: {\n         \"X-Vault-Token\": token\n       }\n     };\n\n     try {\n       const response = await this.instance(Options);\n       return parseAxiosResponse(response);\n     } catch(err) {\n       throw parseAxiosError(err);\n     }\n   }\n\n   /**\n    * @param {string} token\n    * @param {Object} params \n    * @param {string} params.name\n    * @param {string} [params.ttl]\n    * @param {string} [mount]\n    * @returns {PromiseLike<Object>}\n    */\n   async checkADCredOut(token, params, mount) {\n     assert(token, 'checkADCredOut: required parameter missing - token');\n     assert(params, 'checkADCredOut: required parameter missing - params');\n\n     const { name, ttl } = params;\n\n     let rootPath = \"\";\n     if (mount) {\n       rootPath = mount;\n     } else if (this.rootPath) {\n       rootPath = this.rootPath;\n     } else {\n       rootPath = config.adRootPath;\n     }\n     const Options = {\n       url: `${rootPath}/${config.adCheckCredOut[0]}/${name}/${config.adCheckCredOut[1]}`,\n       method: config.adCheckCredOut[2],\n       headers: {\n         \"X-Vault-Token\": token\n       },\n       data: {\n         ttl\n       }\n     };\n\n     try {\n       const response = await this.instance(Options);\n       return parseAxiosResponse(response);\n     } catch(err) {\n       throw parseAxiosError(err);\n     }\n   }\n\n   /**\n    * @param {string} token\n    * @param {Object} params\n    * @param {string} params.name\n    * @param {string[]} [params.service_account_names]\n    * @param {boolean} [forceMode]\n    * @param {string} [mount]\n    * @returns {PromiseLike<Object>}\n    */\n   async checkADCredIn(token, params, forceMode, mount) {\n     assert(token, 'checkADCredIn: required parameter missing - token');\n     assert(params, 'checkADCredIn: required parameter missing - params');\n\n     const { name, service_account_names } = params;\n\n     let rootPath = \"\";\n     if (mount) {\n       rootPath = mount;\n     } else if (this.rootPath) {\n       rootPath = this.rootPath;\n     } else {\n       rootPath = config.adRootPath;\n     }\n     const Mode = forceMode ? `manage/${name}` : `${name}`;\n     const Options = {\n       url: `${rootPath}/${config.adCheckCredIn[0]}/${Mode}/${config.adCheckCredIn[1]}`,\n       method: config.adCheckCredIn[2],\n       headers: {\n         \"X-Vault-Token\": token\n       },\n       data: {\n         service_account_names\n       }\n     };\n\n     try {\n       const response = await this.instance(Options);\n       return parseAxiosResponse(response);\n     } catch(err) {\n       throw parseAxiosError(err);\n     }\n   }\n\n\n   /**\n    * @param {string} token\n    * @param {string} setName\n    * @param {string} [mount]\n    * @returns {PromiseLike<Object>}\n    */\n   async getADCredSatus(token, setName, mount) {\n     assert(token, 'getADCredSatus: required parameter missing - token');\n     assert(setName, 'getADCredSatus: required parameter missing - setName');\n\n     let rootPath = \"\";\n     if (mount) {\n       rootPath = mount;\n     } else if (this.rootPath) {\n       rootPath = this.rootPath;\n     } else {\n       rootPath = config.adRootPath;\n     }\n     const Options = {\n       url: `${rootPath}/${config.adGetCredStatus[0]}/${setName}/${config.adGetCredStatus[1]}`,\n       method: config.adGetCredStatus[2],\n       headers: {\n         \"X-Vault-Token\": token\n       }\n     };\n\n     try {\n       const response = await this.instance(Options);\n       return parseAxiosResponse(response);\n     } catch(err) {\n       throw parseAxiosError(err);\n     }\n   }\n\n\n  //\n  // KV secret engine API endpoints\n  //\n\n  /**\n   * @param {string} token\n   * @param {Object} data\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async updateKVEngineConfig(token, data, mount) {\n    assert(token, 'updateKVEngineConfig: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvUpdateEngine[0]}`,\n      method: config.kvUpdateEngine[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: data\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readKVEngineConfig(token, mount) {\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvReadEngine[0]}`,\n      method: config.kvReadEngine[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {Object} secrets\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async createKVSecret(token, name, secrets, mount) {\n    assert(token, 'createKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvCreateSecret[0]}/${name}`,\n      method: config.kvCreateSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        options: {\n          \"cas\": 0\n        },\n        data: secrets\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {Object} secrets\n  * @param {number} version\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateKVSecret(token, name, secrets, version, mount) {\n    assert(token, 'updateKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvUpdateSecret[0]}/${name}`,\n      method: config.kvUpdateSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        options: {\n          cas: version\n        },\n        data: secrets\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      console.log(err.response);\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {number} [version]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readKVSecret(token, name, version, mount) {\n    assert(token, 'readKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const suffix = version ? `?version=${version}` : \"\";\n    const Options = {\n      url: `${rootPath}/${config.kvReadSecret[0]}/${name}${suffix}`,\n      method: config.kvReadSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deleteLatestVerKVSecret(token, name, mount) {\n    assert(token, 'deleteLatestVerKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvDeleteLatestSecret[0]}/${name}`,\n      method: config.kvDeleteLatestSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {number[]} versions\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async deleteVersionsKVSecret(token, name, versions, mount) {\n    assert(token, 'deleteVersionsKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvDeleteSecret[0]}/${name}`,\n      method: config.kvDeleteSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        versions: versions\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {number[]} versions\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async undeleteVersionsKVSecret(token, name, versions, mount) {\n    assert(token, 'undeleteVersionsKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvUndeleteSecret[0]}/${name}`,\n      method: config.kvUndeleteSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        versions: versions\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {number[]} versions\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async destroyVersionsKVSecret(token, name, versions, mount) {\n    assert(token, 'destroyVersionsKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvDestroySecret[0]}/${name}`,\n      method: config.kvDestroySecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: {\n        versions: versions\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n   * @param {string} token\n   * @param {string} name\n   * @param {string} [mount]\n   * @returns {PromiseLike<Object>}\n   */\n  async eliminateKVSecret(token, name, mount) {\n    assert(token, 'eliminateKVSecret: required parameter missing - token');\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    const Options = {\n      url: `${rootPath}/${config.kvEliminateSecret[0]}/${name}`,\n      method: config.kvEliminateSecret[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [folder]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async listKVSecrets(token, folder, mount) {\n    assert(token, 'listKVSecrets: required parameter missing - token');\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    if (folder) {\n      url = `${rootPath}/${config.kvListSecrets[0]}/${folder}`;\n    } else {\n      url = `${rootPath}/${config.kvListSecrets[0]}`;\n    }\n    const Options = {\n      url: url,\n      method: config.kvListSecrets[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} [path]\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readKVSecretMeta(token, path, mount) {\n    assert(token, 'readKVSecretMeta: required parameter missing - token');\n    assert(path, 'readKVSecretMeta: required parameter missing - path');\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    url = `${rootPath}/${config.kvReadSecretMeta[0]}/${path}`;\n    const Options = {\n      url: url,\n      method: config.kvReadSecretMeta[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} path\n  * @param {string} metadata \n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async createKVSecretMeta(token, path, metadata, mount) {\n    assert(token, 'createKVSecretMeta: required parameter missing - token');\n    assert(path, 'createKVSecretMeta: required parameter missing - path');\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.kvRootPath;\n    }\n    url = `${rootPath}/${config.kvCreateSecretMeta[0]}/${path}`;\n    const Options = {\n      url: url,\n      method: config.kvCreateSecretMeta[1],\n      headers: {\n        \"X-Vault-Token\": token\n      },\n      data: metadata\n    };\n\n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} path\n  * @param {string} metadata \n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async updateKVSecretMeta(token, path, metadata, mount) {\n    return await this.createKVSecretMeta(token, path, metadata, mount);\n  }\n\n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {Object} params\n  * @param {boolean} params.generate\n  * @param {boolean} [params.exported] - whether the key is exportable as QR code\n  * @param {number} [params.key_size=20]\n  * @param {string} [params.key_url]\n  * @param {string} [params.key]\n  * @param {string} [params.issuer] - key issuing entity\n  * @param {string} [params.account_name]\n  * @param {number} [params.period=30] - length of time for the counter on the code calculation\n  * @param {string} [params.algorithm=sha1] - code generator algorithm, either \"SHA1\", \"SHA256\", or \"SHA512\"\n  * @param {number} [params.digits] - number of code digits, either 6 or 8\n  * @param {number} [params.skew=1] - number of delay periods valid for code validation, either 0 or 1\n  * @param {number} [params.gr_size=200] - pixel size of the QR code image\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n async createTOTPKey(token, name, params, mount) {\n  assert(token, 'createTOTPKey: required parameter missing - token');\n  assert(name, 'createTOTPKey: required parameter missing - name');\n  let url = \"\";\n  let rootPath = \"\";\n  if (mount) {\n    rootPath = mount;\n  } else if (this.rootPath) {\n    rootPath = this.rootPath;\n  } else {\n    rootPath = config.totpRootPath;\n  }\n\n  // Defaults - most are probably already defaults from Vault itself\n  params = {\n    generate: true,\n    account_name: \"vault\",\n    issuer: \"vault\",\n    ...params\n  };\n\n  const { generate, exported, key_size, key_url, key, issuer, account_name, \n    period, algorithm, digits, skew, gr_size } = params;\n  \n  url = `${rootPath}/${config.totpCreateKey[0]}/${name}`;\n  const Options = {\n    url: url,\n    method: config.totpCreateKey[1],\n    headers: {\n      \"X-Vault-Token\": token\n    },\n    data: {\n      generate: params.generate,\n      exported: params.exported,\n      key_size: params.key_size,\n      url: params.key_url,\n      key: params.key,\n      issuer: params.issuer,\n      account_name: params.account_name,\n      period: params.period,\n      algorithm: params.algorithm,\n      digits: params.digits,\n      skew: params.skew,\n      gr_size: params.gr_size\n    }\n  };\n\n  try {\n    const response = await this.instance(Options);\n    return parseAxiosResponse(response);\n  } catch(err) {\n    throw parseAxiosError(err);\n  }\n }\n  \n  /**\n  * @param {string} token\n  * @param {string} name\n  * @param {string} [mount]\n  * @returns {PromiseLike<Object>}\n  */\n  async readTOTPKey(token, name, mount) {\n    assert(token, 'readTOTPKey: required parameter missing - token');\n    assert(name, 'readTOTPKey: required parameter missing - name');\n    let url = \"\";\n    let rootPath = \"\";\n    if (mount) {\n      rootPath = mount;\n    } else if (this.rootPath) {\n      rootPath = this.rootPath;\n    } else {\n      rootPath = config.totpRootPath;\n    }\n    \n    url = `${rootPath}/${config.totpReadKey[0]}/${name}`;\n    const Options = {\n      url: url,\n      method: config.totpReadKey[1],\n      headers: {\n        \"X-Vault-Token\": token\n      }\n    };\n  \n    try {\n      const response = await this.instance(Options);\n      return parseAxiosResponse(response);\n    } catch(err) {\n      throw parseAxiosError(err);\n    }\n   }\n\n}\n"]}