"use strict";var e=require("zod"),t=require("p-safe"),o=require("zod-request"),n=Object.create,s=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,d=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},p=(e,t,o)=>(o=null!=e?n(l(e)):{},((e,t,o,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of a(t))i.call(e,l)||l===o||s(e,l,{get:()=>t[l],enumerable:!(n=r(t,l))||n.enumerable});return e})(s(o,"default",{value:e,enumerable:!0}),e)),u=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"(e,t){t.exports=function(e,t){for(var o=-1,n=null==e?0:e.length,s=Array(n);++o-1}}}),g=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"(e,t){var o=m();t.exports=function(e,t){var n=this.__data__,s=o(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}}}),y=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(e,t){var o=c(),n=z(),s=_(),r=b(),a=g();function l(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}}}),_e=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js"(e,t){var o=S(),n=ze(),s=ie(),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,t.exports=function(e){return s(e)&&n(e.length)&&!!r[o(e)]}}}),be=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"(e,t){t.exports=function(e){return function(t){return e(t)}}}}),ge=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js"(e,t){var o=w(),n="object"==typeof e&&e&&!e.nodeType&&e,s=n&&"object"==typeof t&&t&&!t.nodeType&&t,r=s&&s.exports===n&&o.process,a=function(){try{var e=s&&s.require&&s.require("util").types;return e||r&&r.binding&&r.binding("util")}catch(e){}}();t.exports=a}}),ye=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"(e,t){var o=_e(),n=be(),s=ge(),r=s&&s.isTypedArray,a=r?n(r):o;t.exports=a}}),je=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js"(e,t){var o=le(),n=pe(),s=ue(),r=he(),a=me(),l=ye(),i=Object.prototype.hasOwnProperty;t.exports=function(e,t){var d=s(e),p=!d&&n(e),u=!d&&!p&&r(e),c=!d&&!p&&!u&&l(e),h=d||p||u||c,m=h?o(e.length,String):[],z=m.length;for(var _ in e)!t&&!i.call(e,_)||h&&("length"==_||u&&("offset"==_||"parent"==_)||c&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||a(_,z))||m.push(_);return m}}}),fe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js"(e,t){var o=Object.prototype;t.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||o)}}}),ve=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js"(e,t){t.exports=function(e,t){return function(o){return e(t(o))}}}}),xe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js"(e,t){var o=ve()(Object.keys,Object);t.exports=o}}),we=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js"(e,t){var o=fe(),n=xe(),s=Object.prototype.hasOwnProperty;t.exports=function(e){if(!o(e))return n(e);var t=[];for(var r in Object(e))s.call(e,r)&&"constructor"!=r&&t.push(r);return t}}}),Pe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"(e,t){var o=A(),n=ze();t.exports=function(e){return null!=e&&n(e.length)&&!o(e)}}}),ke=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js"(e,t){var o=je(),n=we(),s=Pe();t.exports=function(e){return s(e)?o(e):n(e)}}}),Oe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js"(e,t){var o=ae(),n=ke();t.exports=function(e,t){return e&&o(t,n(t),e)}}}),Te=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js"(e,t){t.exports=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}}}),Se=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js"(e,t){var o=E(),n=fe(),s=Te(),r=Object.prototype.hasOwnProperty;t.exports=function(e){if(!o(e))return s(e);var t=n(e),a=[];for(var l in e)("constructor"!=l||!t&&r.call(e,l))&&a.push(l);return a}}}),Ee=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js"(e,t){var o=je(),n=Se(),s=Pe();t.exports=function(e){return s(e)?o(e,!0):n(e)}}}),Ae=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js"(e,t){var o=ae(),n=Ee();t.exports=function(e,t){return e&&o(t,n(t),e)}}}),Ce=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cloneBuffer.js"(e,t){var o=P(),n="object"==typeof e&&e&&!e.nodeType&&e,s=n&&"object"==typeof t&&t&&!t.nodeType&&t,r=s&&s.exports===n?o.Buffer:void 0,a=r?r.allocUnsafe:void 0;t.exports=function(e,t){if(t)return e.slice();var o=e.length,n=a?a(o):new e.constructor(o);return e.copy(n),n}}}),Ie=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyArray.js"(e,t){t.exports=function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++os?0:s+t),(o=o>s?s:o)<0&&(o+=s),s=t>o?0:o-t>>>0,t>>>=0;for(var r=Array(s);++n0&&r(p)?s>1?e(p,s-1,r,a,l):o(l,p):a||(l[l.length]=p)}return l}}}),St=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js"(e,t){var o=Tt();t.exports=function(e){return(null==e?0:e.length)?o(e,1):[]}}}),Et=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js"(e,t){t.exports=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}}}),At=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js"(e,t){var o=Et(),n=Math.max;t.exports=function(e,t,s){return t=n(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,l=n(r.length-t,0),i=Array(l);++a0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}}}),Lt=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js"(e,t){var o=Gt(),n=Dt()(o);t.exports=n}}),Ut=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js"(e,t){var o=St(),n=At(),s=Lt();t.exports=function(e){return s(n(e,void 0,o),e+"")}}}),qt=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omit.js"(e,t){var o=u(),n=pt(),s=wt(),r=gt(),a=ae(),l=kt(),i=Ut(),d=Be(),p=i((function(e,t){var i={};if(null==e)return i;var p=!1;t=o(t,(function(t){return t=r(t,e),p||(p=t.length>1),t})),a(e,d(e),i),p&&(i=n(i,7,l));for(var u=t.length;u--;)s(i,t[u]);return i}));t.exports=p}}),Mt=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js"(e,t){var o=re(),n=gt(),s=me(),r=E(),a=jt();t.exports=function(e,t,l,i){if(!r(e))return e;for(var d=-1,p=(t=n(t,e)).length,u=p-1,c=e;null!=c&&++dt.trySafe((async()=>{const{method:t="GET",path:l,client:i,schema:d}=n,{strictSchema:p=!0,...u}=a,{url:c,input:h}=o.generateRequest(`${i.endpoint}/${i.apiVersion}${i.pathPrefix}${l}`,{method:t,...u,path:d?.path?(0,Wt.default)(r||{},Object.keys(d.path.shape)):void 0,params:d?.searchParams?(0,Wt.default)(r||{},Object.keys(d.searchParams.shape)):void 0,body:d?.body?d.body instanceof e.z.ZodObject?(0,Wt.default)(r||{},Object.keys(d.body.shape)):Xt((0,Ht.default)(r,Object.keys(d.searchParams?.shape||{}).concat(Object.keys(d.path?.shape||{})).concat(Object.keys(d.headers?.shape||{})))):void 0,headers:Xt(Object.assign({"X-Vault-Token":i.token,"X-Vault-Namespace":i.namespace},u.headers||{})),schema:d}),m=n.fetcher||i.fetcher||fetch,z=Object.assign(h,{url:new URL(c.toString().replace(///g,"/"))}),{url:_,...b}=n.refine?n.refine(z,r):z;b.body&&!Zt(b.body)&&(b.body=JSON.stringify(b.body));const g=await m(_,b);if(!1!==s)return{data:g};const{headers:y}=g,j=y.has("content-length")&&"0"!==y.get("content-length");if(!g.body&&!j)return{data:g.ok};const f=y.has("content-type")&&"application/json"===y.get("content-type");if(!p||!d.response||d.response instanceof e.z.ZodAny)return Yt(f?await g.json():eo(await g.text()));const v=new o.ZodResponse(g,d.response);return Yt(f?await v.json():eo(await v.text()))}))}function Yt(e){return"object"==typeof e&&"errors"in e?{error:new Jt(e.errors)}:{data:e}}function eo(e){const t=Zt(e);return t||e}var to=class extends Kt{get config(){return Qt({method:"POST",path:"/aws/config/root",client:this.client,schema:{body:e.z.object({max_retries:e.z.number().optional(),access_key:e.z.string().optional(),secret_key:e.z.string().optional(),role_arn:e.z.string().optional(),identity_token_audience:e.z.string().optional(),identity_token_ttl:e.z.string().optional(),region:e.z.string().optional(),iam_endpoint:e.z.string().optional(),sts_endpoint:e.z.string().optional(),username_template:e.z.string().optional()}),response:e.z.any()}})}get rootInfo(){return Qt({method:"GET",path:"/aws/config/root",client:this.client,schema:{response:e.z.any()}})}get rotateRoot(){return Qt({method:"POST",path:"/aws/config/rotate-root",client:this.client,schema:{response:e.z.any()}})}get configLease(){return Qt({method:"POST",path:"/aws/config/lease",client:this.client,schema:{body:e.z.object({lease:e.z.string(),lease_max:e.z.number()}),response:e.z.any()}})}get lease(){return Qt({method:"POST",path:"/aws/config/lease",client:this.client,schema:{response:e.z.any()}})}get role(){return Qt({method:"POST",path:"/aws/config/role",client:this.client,schema:{body:e.z.object({name:e.z.string(),credential_type:e.z.string(),role_arns:e.z.array(e.z.string()).optional(),policy_arns:e.z.array(e.z.string()).optional(),policy_document:e.z.string().optional(),iam_groups:e.z.array(e.z.string()).optional(),iam_tags:e.z.array(e.z.string()).optional(),default_sts_ttl:e.z.string().optional(),max_sts_ttl:e.z.string().optional(),user_path:e.z.string().optional(),permissions_boundary_arn:e.z.string().optional(),mfa_serial_number:e.z.string().optional(),policy:e.z.string().optional(),arn:e.z.string().optional()}),response:e.z.any()}})}get roleInfo(){return Qt({method:"GET",path:"/aws/roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:e.z.any()}})}get roles(){return Qt({method:"LIST",path:"/aws/roles",client:this.client,schema:{response:e.z.any()}})}get deleteRole(){return Qt({method:"DELETE",path:"/aws/roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:e.z.any()}})}get credentials(){return Qt({method:"GET",path:"/aws/creds/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),searchParams:oo,response:e.z.any()}})}get stsCredentials(){return Qt({method:"POST",path:"/aws/sts/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),body:oo,response:e.z.any()}})}get staticRole(){return Qt({method:"POST",path:"/aws/static-roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),body:e.z.object({username:e.z.string(),rotation_period:e.z.union([e.z.string(),e.z.number()])}),response:e.z.any()}})}get staticRoleInfo(){return Qt({method:"GET",path:"/aws/static-roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:e.z.any()}})}get deleteStaticRole(){return Qt({method:"DELETE",path:"/aws/static-roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:e.z.any()}})}get staticCredentials(){return Qt({method:"GET",path:"/aws/static-creds/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:e.z.any()}})}},oo=e.z.object({role_arn:e.z.string().optional(),role_session_name:e.z.string().optional(),ttl:e.z.string().optional(),mfa_code:e.z.string().optional()});e.z.object({client_token:e.z.string(),policies:e.z.array(e.z.string()),metadata:e.z.any(),lease_duration:e.z.number(),renewable:e.z.boolean()});var no=e.z.object({accessor:e.z.string(),config:e.z.record(e.z.any()).nullable(),description:e.z.string(),external_entropy_access:e.z.boolean(),local:e.z.boolean(),options:e.z.record(e.z.any()).nullable(),plugin_version:e.z.string(),running_plugin_version:e.z.string(),running_sha256:e.z.string(),seal_wrap:e.z.boolean(),type:e.z.string(),uuid:e.z.string()}),so=e.z.object({request_id:e.z.string(),lease_id:e.z.string(),renewable:e.z.boolean(),lease_duration:e.z.number(),wrap_info:e.z.record(e.z.any()).nullable(),warnings:e.z.record(e.z.any()).nullable(),auth:e.z.record(e.z.any()).nullable()}),ro=e.z.object({endpoint:e.z.string().optional(),apiVersion:e.z.string().optional(),pathPrefix:e.z.string().optional(),token:e.z.string().optional(),namespace:e.z.string().optional()}),ao=e.z.record(e.z.any()),lo=class extends Kt{get config(){return Qt({method:"POST",path:"/kubernetes/config",client:this.client,schema:{body:e.z.object({kubernetes_host:e.z.string().optional(),kubernetes_ca_cert:e.z.string().optional(),service_account_jwt:e.z.string().optional(),disable_local_ca_jwt:e.z.boolean().optional()}),response:ao}})}get readConfig(){return Qt({method:"GET",path:"/kubernetes/config",client:this.client,schema:{response:ao}})}get deleteConfig(){return Qt({method:"DELETE",path:"/kubernetes/config",client:this.client,schema:{response:e.z.boolean()}})}get createRole(){return Qt({method:"POST",path:"/kubernetes/roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),body:e.z.object({allowed_kubernetes_namespaces:e.z.array(e.z.string()).optional(),allowed_kubernetes_namespace_selector:e.z.string().optional(),token_max_ttl:e.z.string().optional(),token_default_ttl:e.z.string().optional(),token_default_audiences:e.z.string().optional(),service_account_name:e.z.string().optional(),kubernetes_role_name:e.z.string().optional(),kubernetes_role_type:e.z.string().optional(),generated_role_rules:e.z.string().optional(),name_template:e.z.string().optional(),extra_annotations:e.z.record(e.z.string()).optional(),extra_labels:e.z.record(e.z.string()).optional()}),response:ao}})}get role(){return Qt({method:"GET",path:"/kubernetes/roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:ao}})}get roles(){return Qt({method:"LIST",path:"/kubernetes/roles",client:this.client,schema:{response:ao}})}get deleteRole(){return Qt({method:"DELETE",path:"/kubernetes/roles/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),response:e.z.boolean()}})}get generateCreds(){return Qt({method:"POST",path:"/kubernetes/creds/{{name}}",client:this.client,schema:{path:e.z.object({name:e.z.string()}),body:e.z.object({role:e.z.string(),kubernetes_namespace:e.z.string().optional(),cluster_role_binding:e.z.boolean().optional(),ttl:e.z.string().optional(),audiences:e.z.string().optional()}),response:ao}})}},io=class extends Kt{get read(){return Qt({method:"GET",path:"/{{mountPath}}/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:so.extend({data:ao})}})}get list(){return Qt({method:"LIST",path:"/{{mountPath}}/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:so.extend({data:e.z.object({keys:e.z.array(e.z.string())})})}})}get write(){return Qt({method:"POST",path:"/{{mountPath}}/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:e.z.object({data:ao}),response:e.z.boolean()},refine:e=>(e.body=e.body&&e.body.data||{},e)})}get delete(){return Qt({method:"DELETE",path:"/{{mountPath}}/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:e.z.boolean()}})}get info(){return Qt({method:"GET",path:"/sys/mounts/{{mountPath}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string()}),response:so.extend({deprecation_status:e.z.string(),type:e.z.string(),description:e.z.string(),seal_wrap:e.z.boolean(),options:ao,running_plugin_version:e.z.string(),running_sha256:e.z.string(),config:e.z.object({default_lease_ttl:e.z.number(),force_no_cache:e.z.boolean(),max_lease_ttl:e.z.number()}),accessor:e.z.string(),local:e.z.boolean(),external_entropy_access:e.z.boolean(),uuid:e.z.string(),plugin_version:e.z.string(),data:e.z.object({accessor:e.z.string(),config:e.z.object({default_lease_ttl:e.z.number(),force_no_cache:e.z.boolean(),max_lease_ttl:e.z.number()}),deprecation_status:e.z.string(),description:e.z.string(),external_entropy_access:e.z.boolean(),local:e.z.boolean(),options:ao,plugin_version:e.z.string(),running_plugin_version:e.z.string(),running_sha256:e.z.string(),seal_wrap:e.z.boolean(),type:e.z.string(),uuid:e.z.string()})})}})}},po=class extends Kt{get config(){return Qt({method:"POST",path:"/{{mountPath}}/config",client:this.client,schema:{path:e.z.object({mountPath:e.z.string()}),body:e.z.object({max_versions:e.z.number().optional(),cas_required:e.z.boolean().optional(),delete_version_after:e.z.string().optional()}),response:e.z.boolean()}})}get readConfig(){return Qt({method:"GET",path:"/{{mountPath}}/config",client:this.client,schema:{path:e.z.object({mountPath:e.z.string()}),response:so.extend({data:e.z.object({cas_required:e.z.boolean(),delete_version_after:e.z.string(),max_versions:e.z.number()})})}})}get read(){return Qt({method:"GET",path:"/{{mountPath}}/data/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),searchParams:e.z.object({version:e.z.number().default(0).optional()}),response:so.extend({data:e.z.object({data:e.z.record(e.z.string()),metadata:uo})})}})}get write(){return Qt({method:"POST",path:"/{{mountPath}}/data/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:e.z.object({data:e.z.record(e.z.any()).default({}),options:ho.default({}).optional()}),response:so.extend({data:uo})}})}get patch(){return Qt({method:"PATCH",path:"/{{mountPath}}/data/{{path}}",client:this.client,refine:e=>(e.headers=Object.assign(e.headers||{},{"Content-Type":"application/merge-patch+json"}),e),schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:e.z.object({data:e.z.any(),options:ho}),response:e.z.object({data:uo})}})}get subKeys(){return Qt({method:"GET",path:"/{{mountPath}}/subkeys/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),searchParams:e.z.object({version:e.z.number().optional(),depth:e.z.number().optional()}),response:so.extend({data:e.z.object({metadata:uo,subkeys:e.z.record(e.z.any())})})}})}get deleteLatest(){return Qt({method:"DELETE",path:"/{{mountPath}}/data/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:e.z.boolean()}})}get delete(){return Qt({method:"POST",path:"/{{mountPath}}/delete/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:e.z.object({versions:e.z.array(e.z.number())}),response:e.z.boolean()}})}get undelete(){return Qt({method:"POST",path:"/{{mountPath}}/undelete/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:e.z.object({versions:e.z.array(e.z.number())}),response:e.z.boolean()}})}get destroy(){return Qt({method:"POST",path:"/{{mountPath}}/destroy/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:e.z.object({versions:e.z.array(e.z.number())}),response:e.z.boolean()}})}get list(){return Qt({method:"LIST",path:"/{{mountPath}}/metadata/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:so.extend({data:e.z.object({keys:e.z.array(e.z.string())})})}})}get readMetadata(){return Qt({method:"GET",path:"/{{mountPath}}/metadata/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:so.extend({data:e.z.object({cas_required:e.z.boolean(),created_time:e.z.string(),current_version:e.z.number(),custom_metadata:e.z.record(e.z.string()).nullable(),delete_version_after:e.z.string(),max_versions:e.z.number(),oldest_version:e.z.number(),updated_time:e.z.string(),versions:e.z.record(e.z.object({created_time:e.z.string(),deletion_time:e.z.string(),destroyed:e.z.boolean()}))})})}})}get writeMetadata(){return Qt({method:"POST",path:"/{{mountPath}}/metadata/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:co,response:e.z.boolean()}})}get patchMetadata(){return Qt({method:"PATCH",path:"/{{mountPath}}/metadata/{{path}}",client:this.client,refine:e=>(e.headers=Object.assign(e.headers||{},{"Content-Type":"application/merge-patch+json"}),e),schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),body:co,response:e.z.boolean()}})}get deleteMetadata(){return Qt({method:"DELETE",path:"/{{mountPath}}/metadata/{{path}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string(),path:e.z.string()}),response:e.z.boolean()}})}get info(){return Qt({method:"GET",path:"/sys/mounts/{{mountPath}}",client:this.client,schema:{path:e.z.object({mountPath:e.z.string()}),response:so.extend({local:e.z.boolean(),seal_wrap:e.z.boolean(),external_entropy_access:e.z.boolean(),options:ao,running_sha256:e.z.string(),deprecation_status:e.z.string(),config:e.z.object({default_lease_ttl:e.z.number(),force_no_cache:e.z.boolean(),max_lease_ttl:e.z.number()}),type:e.z.string(),description:e.z.string(),accessor:e.z.string(),uuid:e.z.string(),plugin_version:e.z.string(),running_plugin_version:e.z.string(),data:e.z.object({accessor:e.z.string(),config:e.z.object({default_lease_ttl:e.z.number(),force_no_cache:e.z.boolean(),max_lease_ttl:e.z.number()}),deprecation_status:e.z.string(),description:e.z.string(),external_entropy_access:e.z.boolean(),local:e.z.boolean(),options:ao,plugin_version:e.z.string(),running_plugin_version:e.z.string(),running_sha256:e.z.string(),seal_wrap:e.z.boolean(),type:e.z.string(),uuid:e.z.string()})})}})}},uo=e.z.object({created_time:e.z.string(),custom_metadata:e.z.record(e.z.string()).nullable(),deletion_time:e.z.string(),destroyed:e.z.boolean(),version:e.z.number()}),co=e.z.object({max_versions:e.z.number().optional(),cas_required:e.z.boolean().optional(),delete_version_after:e.z.string().optional(),custom_metadata:e.z.record(e.z.string()).nullable().optional()}),ho=e.z.object({cas:e.z.number().default(0),check_and_set:e.z.string().optional(),max_versions:e.z.number().optional(),prelease:e.z.number().optional(),version:e.z.number().optional()}),mo=class extends Kt{get accessors(){return Qt({method:"LIST",path:"/auth/token/accessors",client:this.client,schema:{response:e.z.object({auth:e.z.any(),warnings:e.z.any(),wrap_info:e.z.any(),data:e.z.object({keys:e.z.array(e.z.string())}),lease_duration:e.z.number(),renewable:e.z.boolean(),lease_id:e.z.string()})}})}get create(){return Qt({method:"POST",path:"/auth/token/create",client:this.client,schema:{body:e.z.object({id:e.z.string().optional(),role_name:e.z.string().optional(),policies:e.z.array(e.z.string()).optional(),meta:e.z.record(e.z.string(),e.z.string()).optional(),no_parent:e.z.boolean().optional(),no_default_policy:e.z.boolean().optional(),renewable:e.z.boolean().default(!0),lease:e.z.string().optional(),ttl:e.z.string().optional(),type:e.z.string().optional(),explicit_max_ttl:e.z.string().optional(),display_name:e.z.string().default("token"),num_uses:e.z.number().int().optional(),period:e.z.string().optional(),entity_alias:e.z.string().optional()}),response:e.z.object({request_id:e.z.string(),lease_id:e.z.string().nullable(),renewable:e.z.boolean(),lease_duration:e.z.number(),data:e.z.any().nullable(),wrap_info:e.z.any().nullable(),warnings:e.z.array(e.z.string()).nullable(),auth:e.z.object({client_token:e.z.string(),accessor:e.z.string(),policies:e.z.array(e.z.string()),token_policies:e.z.array(e.z.string()),metadata:e.z.record(e.z.string(),e.z.string()).nullable(),lease_duration:e.z.number(),renewable:e.z.boolean(),entity_id:e.z.string(),token_type:e.z.string(),orphan:e.z.boolean(),num_uses:e.z.number()}).nullable().default(null)})}})}get lookup(){return Qt({method:"POST",path:"/auth/token/lookup",client:this.client,schema:{body:e.z.object({token:e.z.string()}),response:e.z.object({data:e.z.object({accessor:e.z.string(),creation_time:e.z.number(),creation_ttl:e.z.number(),display_name:e.z.string(),entity_id:e.z.string(),expire_time:e.z.string().nullable(),explicit_max_ttl:e.z.number(),id:e.z.string(),identity_policies:e.z.array(e.z.string()).optional(),issue_time:e.z.string().optional(),meta:e.z.object({username:e.z.string()}).nullable(),num_uses:e.z.number(),orphan:e.z.boolean(),path:e.z.string(),policies:e.z.array(e.z.string()),renewable:e.z.boolean().optional(),ttl:e.z.number()})})}})}get lookupSelf(){return Qt({method:"GET",path:"/auth/token/lookup-self",client:this.client,schema:{response:e.z.object({data:e.z.object({accessor:e.z.string(),creation_time:e.z.number(),creation_ttl:e.z.number(),display_name:e.z.string(),entity_id:e.z.string(),expire_time:e.z.string().nullable(),explicit_max_ttl:e.z.number(),id:e.z.string(),identity_policies:e.z.array(e.z.string()).optional(),issue_time:e.z.string().optional(),meta:e.z.object({username:e.z.string()}).nullable(),num_uses:e.z.number(),orphan:e.z.boolean(),path:e.z.string(),policies:e.z.array(e.z.string()),renewable:e.z.boolean().optional(),ttl:e.z.number()})})}})}get lookupAccessor(){return Qt({method:"POST",path:"/auth/token/lookup-accessor",client:this.client,schema:{body:e.z.object({accessor:e.z.string()}),response:e.z.object({data:e.z.object({accessor:e.z.string(),creation_time:e.z.number(),creation_ttl:e.z.number(),display_name:e.z.string(),entity_id:e.z.string(),expire_time:e.z.string().nullable(),explicit_max_ttl:e.z.number(),id:e.z.string(),identity_policies:e.z.array(e.z.string()).optional(),issue_time:e.z.string().optional(),meta:e.z.object({username:e.z.string()}).nullable(),num_uses:e.z.number(),orphan:e.z.boolean(),path:e.z.string(),policies:e.z.array(e.z.string()),renewable:e.z.boolean().optional(),ttl:e.z.number()})})}})}get renew(){return Qt({method:"POST",path:"/auth/token/renew",client:this.client,schema:{body:e.z.object({token:e.z.string(),increment:e.z.string().optional()}),response:e.z.object({auth:e.z.object({client_token:e.z.string(),policies:e.z.array(e.z.string()).optional(),metadata:e.z.record(e.z.string(),e.z.string()).nullable(),lease_duration:e.z.number(),renewable:e.z.boolean()})})}})}get renewSelf(){return Qt({method:"POST",path:"/auth/token/renew-self",client:this.client,schema:{body:e.z.object({increment:e.z.string().optional()}),response:e.z.object({auth:e.z.object({client_token:e.z.string(),policies:e.z.array(e.z.string()).optional(),metadata:e.z.record(e.z.string(),e.z.string()).nullable(),lease_duration:e.z.number(),renewable:e.z.boolean()})})}})}get renewAccessor(){return Qt({method:"POST",path:"/auth/token/renew-accessor",client:this.client,schema:{body:e.z.object({accessor:e.z.string(),increment:e.z.string().optional()}),response:e.z.object({auth:e.z.object({client_token:e.z.string(),policies:e.z.array(e.z.string()).optional(),metadata:e.z.record(e.z.string(),e.z.string()).nullable(),lease_duration:e.z.number(),renewable:e.z.boolean()})})}})}get revoke(){return Qt({method:"POST",path:"/auth/token/revoke-orphan",client:this.client,schema:{body:e.z.object({token:e.z.string()})}})}get revokeSelf(){return Qt({method:"POST",path:"/auth/token/revoke-self",client:this.client,schema:{}})}get revokeAccessor(){return Qt({method:"POST",path:"/auth/token/revoke-accessor",client:this.client,schema:{body:e.z.object({accessor:e.z.string()})}})}get revokeOrphan(){return Qt({method:"POST",path:"/auth/token/revoke-orphan",client:this.client,schema:{body:e.z.object({token:e.z.string()})}})}get roleRead(){return Qt({method:"GET",path:"/auth/token/roles/{{role_name}}",client:this.client,schema:{path:e.z.object({role_name:e.z.string()}),response:e.z.object({request_id:e.z.string(),lease_id:e.z.string().optional(),lease_duration:e.z.number(),renewable:e.z.boolean(),data:e.z.object({allowed_entity_aliases:e.z.array(e.z.string()),allowed_policies:e.z.array(e.z.string()),disallowed_policies:e.z.array(e.z.string()),allowed_policies_glob:e.z.array(e.z.string()),disallowed_policies_glob:e.z.array(e.z.string()),explicit_max_ttl:e.z.number(),name:e.z.string(),orphan:e.z.boolean(),path_suffix:e.z.string(),period:e.z.number(),renewable:e.z.boolean(),token_explicit_max_ttl:e.z.number(),token_no_default_policy:e.z.boolean(),token_period:e.z.number(),token_type:e.z.string()}),warnings:e.z.any().nullable()})}})}get roles(){return Qt({method:"LIST",path:"/auth/token/roles",client:this.client,schema:{response:e.z.object({data:e.z.object({keys:e.z.array(e.z.string())}).optional()})}})}get roleCreateUpdate(){return Qt({method:"POST",path:"/auth/token/roles/{{role_name}}",client:this.client,schema:{path:e.z.object({role_name:e.z.string()}),body:e.z.object({name:e.z.string(),allowed_policies:e.z.array(e.z.string()).optional(),disallowed_policies:e.z.array(e.z.string()).optional(),allowed_policies_glob:e.z.array(e.z.string()).optional(),disallowed_policies_glob:e.z.array(e.z.string()).optional(),orphan:e.z.boolean().optional(),renewable:e.z.boolean().optional(),path_suffix:e.z.string().optional(),allowed_entity_aliases:e.z.union([e.z.string(),e.z.array(e.z.string())]).optional(),token_bound_cidrs:e.z.array(e.z.string()).optional(),token_explicit_max_ttl:e.z.union([e.z.number().nonnegative(),e.z.string()]).optional(),token_no_default_policy:e.z.boolean().optional(),token_num_uses:e.z.number().nonnegative().optional(),token_period:e.z.union([e.z.number().nonnegative(),e.z.string()]).optional(),token_type:e.z.string().optional()})}})}get roleDelete(){return Qt({method:"DELETE",path:"/auth/token/roles/{{role_name}}",client:this.client,schema:{path:e.z.object({role_name:e.z.string()})}})}get tidy(){return Qt({method:"POST",path:"/auth/token/tidy",client:this.client,schema:{}})}};exports.Client=class{constructor(e={}){this.opts=e;const{request:t,fetcher:o,...n}=e,s=ro.parse(n);this.endpoint=s.endpoint||process.env.VAULT_ADDR||"http://127.0.0.1:8200",this.apiVersion=s.apiVersion||"v1",this.pathPrefix=s.pathPrefix||"",this.namespace=s.namespace||process.env.VAULT_NAMESPACE,this.token=s.token||process.env.VAULT_TOKEN,this.fetcher=o,this.request=t}endpoint;apiVersion;pathPrefix;namespace;token;request;fetcher;get aws(){return new to(this)}get kubernetes(){return new lo(this)}get kv(){return new io(this)}get kv2(){return new po(this)}get tokens(){return new mo(this)}config=Qt({method:"POST",path:"/{{mountPath}}/config",client:this,schema:{path:e.z.object({mountPath:e.z.string()}),body:e.z.any(),response:e.z.any()}});read=Qt({method:"GET",path:"/{{path}}",client:this,schema:{path:e.z.object({path:e.z.string()}),response:ao}});write=Qt({method:"POST",path:"/{{path}}",client:this,schema:{path:e.z.object({path:e.z.string()}),body:e.z.object({data:ao}),response:e.z.union([ao,e.z.boolean()])},refine:e=>(e.body=e.body&&e.body.data||{},e)});delete=Qt({method:"DELETE",path:"/{{path}}",client:this,schema:{path:e.z.object({path:e.z.string()}),response:e.z.boolean()}});list=Qt({method:"LIST",path:"/{{path}}",client:this,schema:{path:e.z.object({path:e.z.string()}),response:ao}});get listDevices(){return Qt({method:"GET",path:"/sys/audit",client:this,schema:{response:so.extend({data:e.z.record(e.z.object({type:e.z.string(),description:e.z.string(),options:e.z.record(e.z.any())}))})}})}get disableDevice(){return Qt({method:"DELETE",path:"/sys/audit/{{path}}",client:this,schema:{path:e.z.object({path:e.z.string()}),response:e.z.boolean()}})}get enableDevice(){return Qt({method:"POST",path:"/sys/audit/{{path}}",client:this,schema:{path:e.z.object({path:e.z.string()}),response:e.z.boolean()}})}get queryCapabilities(){return Qt({method:"POST",path:"/sys/capabilities",client:this,schema:{body:e.z.object({token:e.z.string(),paths:e.z.array(e.z.string())}),response:e.z.boolean()}})}get sealStatus(){return Qt({method:"GET",path:"/sys/seal-status",client:this,schema:{response:e.z.object({type:e.z.string(),initialized:e.z.boolean(),sealed:e.z.boolean(),t:e.z.number(),n:e.z.number(),progress:e.z.number(),nonce:e.z.string(),version:e.z.string(),build_date:e.z.string(),migration:e.z.boolean(),recovery_seal:e.z.boolean(),storage_type:e.z.string()})}})}get initialized(){return Qt({method:"GET",path:"/sys/init",client:this,schema:{response:e.z.object({initialized:e.z.boolean()})}})}get init(){return Qt({method:"POST",path:"/sys/init",client:this,schema:{body:e.z.object({pgp_keys:e.z.array(e.z.string()).optional(),root_token_pgp_key:e.z.string().default("").optional(),secret_shares:e.z.number(),secret_threshold:e.z.number(),stored_shares:e.z.number().optional(),recovery_shares:e.z.number().default(0).optional(),recovery_threshold:e.z.number().default(0).optional(),recovery_pgp_keys:e.z.array(e.z.string()).optional()}),response:e.z.object({keys:e.z.array(e.z.string()),keys_base64:e.z.array(e.z.string()),root_token:e.z.string()})}})}get unseal(){return Qt({method:"POST",path:"/sys/unseal",client:this,schema:{body:e.z.object({key:e.z.string(),reset:e.z.boolean().default(!1).optional(),migrate:e.z.boolean().default(!1).optional()}),response:e.z.discriminatedUnion("sealed",[e.z.object({sealed:e.z.literal(!0),t:e.z.number(),n:e.z.number(),progress:e.z.number(),version:e.z.string()}),e.z.object({sealed:e.z.literal(!1),t:e.z.number(),n:e.z.number(),progress:e.z.number(),version:e.z.string(),cluster_name:e.z.string(),cluster_id:e.z.string()})])}})}get seal(){return Qt({method:"POST",path:"/sys/seal",client:this,schema:{response:e.z.boolean()}})}get getRootGenerationProgress(){return Qt({method:"GET",path:"/sys/generate-root/attempt",client:this,schema:{response:e.z.object({started:e.z.boolean(),nonce:e.z.string(),progress:e.z.number(),required:e.z.number(),encoded_token:e.z.string(),pgp_fingerprint:e.z.string(),otp_length:e.z.number(),complete:e.z.boolean()})}})}get startRootGeneration(){return Qt({method:"POST",path:"/sys/generate-root/attempt",client:this,schema:{body:e.z.object({otp:e.z.string()}),response:e.z.object({started:e.z.boolean(),nonce:e.z.string(),progress:e.z.number(),required:e.z.number(),encoded_token:e.z.string(),otp:e.z.string(),otp_length:e.z.number(),complete:e.z.boolean()})}})}get cancelRootGeneration(){return Qt({method:"DELETE",path:"/sys/generate-root/attempt",client:this,schema:{response:e.z.record(e.z.any())}})}get provideKeyShare(){return Qt({method:"POST",path:"/sys/generate-root/update",client:this,schema:{body:e.z.object({key:e.z.string(),nonce:e.z.string()}),response:e.z.object({started:e.z.boolean(),nonce:e.z.string(),progress:e.z.number(),required:e.z.number(),pgp_fingerprint:e.z.string(),complete:e.z.boolean(),encoded_token:e.z.string()})}})}get mounts(){return Qt({method:"GET",path:"/sys/mounts",client:this,schema:{response:e.z.object({request_id:e.z.string(),lease_id:e.z.string(),lease_duration:e.z.number(),renewable:e.z.boolean(),data:e.z.record(no),warnings:e.z.array(e.z.string()).nullable()})}})}get mount(){return Qt({method:"POST",path:"/sys/mounts/{{mountPath}}",client:this,schema:{path:e.z.object({mountPath:e.z.string()}),body:e.z.object({type:e.z.string(),description:e.z.string().optional(),config:e.z.record(e.z.string()).optional()})}})}get unmount(){return Qt({method:"DELETE",path:"/sys/mounts/{{mountPath}}",client:this,schema:{path:e.z.object({mountPath:e.z.string()})}})}get engineInfo(){return Qt({method:"GET",path:"/sys/mounts/{{mountPath}}",client:this,schema:{path:e.z.object({mountPath:e.z.string()}),response:ao}})}get tune(){return Qt({method:"GET",path:"/sys/mounts/{{mountPath}}/tune",client:this,schema:{path:e.z.object({mountPath:e.z.string()}),response:e.z.object({default_lease_ttl:e.z.number(),max_lease_ttl:e.z.number(),force_no_cache:e.z.boolean()})}})}get tuneMount(){return Qt({method:"POST",path:"/sys/mounts/{{mountPath}}/tune",client:this,schema:{path:e.z.object({mountPath:e.z.string()}),body:e.z.object({default_lease_ttl:e.z.number().optional(),max_lease_ttl:e.z.number().optional(),description:e.z.string().optional(),audit_non_hmac_request_keys:e.z.array(e.z.string()).optional(),audit_non_hmac_response_keys:e.z.array(e.z.string()).optional(),listing_visibility:e.z.string().optional(),passthrough_request_headers:e.z.array(e.z.string()).optional(),allowed_response_headers:e.z.array(e.z.string()).optional(),allowed_managed_keys:e.z.array(e.z.string()).optional(),plugin_version:e.z.string().optional()}),response:ao}})}get health(){return Qt({method:"GET",path:"/sys/health",client:this,schema:{response:e.z.object({initialized:e.z.boolean(),sealed:e.z.boolean(),standby:e.z.boolean(),performance_standby:e.z.boolean(),replication_performance_mode:e.z.string(),replication_dr_mode:e.z.string(),server_time_utc:e.z.number(),version:e.z.string(),cluster_name:e.z.string(),cluster_id:e.z.string()})}})}get hostInfo(){return Qt({method:"GET",path:"/sys/host-info",client:this,schema:{response:so.extend({data:e.z.object({cpu:e.z.array(e.z.object({cpu:e.z.number(),vendorId:e.z.string(),family:e.z.string(),model:e.z.string(),stepping:e.z.number(),physicalId:e.z.string(),coreId:e.z.string(),cores:e.z.number(),modelName:e.z.string(),mhz:e.z.number(),cacheSize:e.z.number(),flags:e.z.array(e.z.string()),microcode:e.z.string()})),cpu_times:e.z.array(e.z.object({cpu:e.z.string(),user:e.z.number(),system:e.z.number(),idle:e.z.number(),nice:e.z.number(),iowait:e.z.number(),irq:e.z.number(),softirq:e.z.number(),steal:e.z.number(),guest:e.z.number(),guestNice:e.z.number()})),disk:e.z.array(e.z.object({path:e.z.string(),fstype:e.z.string(),total:e.z.number(),free:e.z.number(),used:e.z.number(),usedPercent:e.z.number(),inodesTotal:e.z.number(),inodesUsed:e.z.number(),inodesFree:e.z.number(),inodesUsedPercent:e.z.number()})),host:e.z.object({hostname:e.z.string(),uptime:e.z.number(),bootTime:e.z.number(),procs:e.z.number(),os:e.z.string(),platform:e.z.string(),platformFamily:e.z.string(),platformVersion:e.z.string(),kernelVersion:e.z.string(),kernelArch:e.z.string(),virtualizationSystem:e.z.string(),virtualizationRole:e.z.string(),hostid:e.z.string()}),memory:e.z.object({total:e.z.number(),available:e.z.number(),used:e.z.number(),usedPercent:e.z.number(),free:e.z.number(),active:e.z.number(),inactive:e.z.number(),wired:e.z.number(),laundry:e.z.number(),buffers:e.z.number(),cached:e.z.number(),writeback:e.z.number(),dirty:e.z.number(),writebacktmp:e.z.number(),shared:e.z.number(),slab:e.z.number(),sreclaimable:e.z.number(),sunreclaim:e.z.number(),pagetables:e.z.number(),swapcached:e.z.number(),commitlimit:e.z.number(),committedas:e.z.number(),hightotal:e.z.number(),highfree:e.z.number(),lowtotal:e.z.number(),lowfree:e.z.number(),swaptotal:e.z.number(),swapfree:e.z.number(),mapped:e.z.number(),vmalloctotal:e.z.number(),vmallocused:e.z.number(),vmallocchunk:e.z.number(),hugepagestotal:e.z.number(),hugepagesfree:e.z.number(),hugepagesize:e.z.number()}),timestamp:e.z.string()})})}})}get policyList(){return Qt({method:"GET",path:"/sys/policy",client:this,schema:{response:e.z.object({policies:e.z.array(e.z.string())})}})}get policyCreateUpdate(){return Qt({method:"POST",path:"/sys/policy/{{name}}",client:this,schema:{path:e.z.object({name:e.z.string()}),body:e.z.object({policy:e.z.string()}),response:e.z.object({policies:e.z.array(e.z.string())})}})}get policyRead(){return Qt({method:"GET",path:"/sys/policy/{{name}}",client:this,schema:{path:e.z.object({name:e.z.string()}),response:e.z.object({name:e.z.string(),rules:e.z.string()})}})}get policyDelete(){return Qt({method:"DELETE",path:"/sys/policy/{{name}}",client:this,schema:{path:e.z.object({name:e.z.string()})}})}},exports.VaultError=Jt,exports.generateCommand=Qt;