"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},u=(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)),p=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}}}),f=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(e,t){var o=c(),n=_(),s=z(),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}}}),ze=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js"(e,t){var o=k(),n=_e(),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=P(),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}}),fe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"(e,t){var o=ze(),n=be(),s=ge(),r=s&&s.isTypedArray,a=r?n(r):o;t.exports=a}}),ye=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js"(e,t){var o=le(),n=ue(),s=pe(),r=he(),a=me(),l=fe(),i=Object.prototype.hasOwnProperty;t.exports=function(e,t){var d=s(e),u=!d&&n(e),p=!d&&!u&&r(e),c=!d&&!u&&!p&&l(e),h=d||u||p||c,m=h?o(e.length,String):[],_=m.length;for(var z in e)!t&&!i.call(e,z)||h&&("length"==z||p&&("offset"==z||"parent"==z)||c&&("buffer"==z||"byteLength"==z||"byteOffset"==z)||a(z,_))||m.push(z);return m}}}),je=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}}),Pe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js"(e,t){var o=je(),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}}}),Oe=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"(e,t){var o=E(),n=_e();t.exports=function(e){return null!=e&&n(e.length)&&!o(e)}}}),we=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js"(e,t){var o=ye(),n=Pe(),s=Oe();t.exports=function(e){return s(e)?o(e):n(e)}}}),Te=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssign.js"(e,t){var o=ae(),n=we();t.exports=function(e,t){return e&&o(t,n(t),e)}}}),Se=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}}}),ke=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js"(e,t){var o=A(),n=je(),s=Se(),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}}}),Ae=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js"(e,t){var o=ye(),n=ke(),s=Oe();t.exports=function(e){return s(e)?o(e,!0):n(e)}}}),Ee=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignIn.js"(e,t){var o=ae(),n=Ae();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=O(),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(u)?s>1?e(u,s-1,r,a,l):o(l,u):a||(l[l.length]=u)}return l}}}),kt=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js"(e,t){var o=St();t.exports=function(e){return(null==e?0:e.length)?o(e,1):[]}}}),At=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)}}}),Et=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js"(e,t){var o=At(),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}}),Mt=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js"(e,t){var o=kt(),n=Et(),s=Lt();t.exports=function(e){return s(n(e,void 0,o),e+"")}}}),Ut=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omit.js"(e,t){var o=p(),n=ut(),s=Pt(),r=gt(),a=ae(),l=wt(),i=Mt(),d=Be(),u=i((function(e,t){var i={};if(null==e)return i;var u=!1;t=o(t,(function(t){return t=r(t,e),u||(u=t.length>1),t})),a(e,d(e),i),u&&(i=n(i,7,l));for(var p=t.length;p--;)s(i,t[p]);return i}));t.exports=u}}),qt=d({"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js"(e,t){var o=re(),n=gt(),s=me(),r=A(),a=yt();t.exports=function(e,t,l,i){if(!r(e))return e;for(var d=-1,u=(t=n(t,e)).length,p=u-1,c=e;null!=c&&++dt.trySafe((async()=>{const{method:t="GET",path:l,client:i,schema:d}=n,{strictSchema:u=!0,...p}=a,{url:c,input:h}=o.generateRequest(`${i.endpoint}/${i.apiVersion}${i.pathPrefix}${l}`,{method:t,...p,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},p.headers||{})),schema:d}),m=n.fetcher||i.fetcher||fetch,_=Object.assign(h,{url:new URL(c.toString().replace(///g,"/"))}),{url:z,...b}=n.refine?n.refine(_,r):_;b.body&&!Zt(b.body)&&(b.body=JSON.stringify(b.body));const g=await m(z,b);if(!1!==s)return{data:g};const{headers:f}=g,y=f.has("content-length")&&"0"!==f.get("content-length");if(!g.body&&!y)return{data:g.ok};const j=f.has("content-type")&&"application/json"===f.get("content-type");if(!u||!d.response||d.response instanceof e.z.ZodAny)return Yt(j?await g.json():eo(await g.text()));const v=new o.ZodResponse(g,d.response);return Yt(j?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()})})}})}},uo=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:po})})}})}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:po})}})}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:po})}})}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:po,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()})})}})}},po=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()});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 uo(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()})})}})}},exports.VaultError=Jt,exports.generateCommand=Qt;