@botpress/client 0.26.5 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
1
 
2
- > @botpress/client@0.26.5 build /home/runner/work/botpress/botpress/packages/client
2
+ > @botpress/client@0.27.0 build /home/runner/work/botpress/botpress/packages/client
3
3
  > pnpm build:type && pnpm build:node && pnpm build:browser && pnpm build:bundle
4
4
 
5
5
 
6
- > @botpress/client@0.26.5 build:type /home/runner/work/botpress/botpress/packages/client
6
+ > @botpress/client@0.27.0 build:type /home/runner/work/botpress/botpress/packages/client
7
7
  > tsup ./src/index.ts --dts-resolve --dts-only
8
8
 
9
9
  CLI Building entry: ./src/index.ts
10
10
  CLI Using tsconfig: tsconfig.json
11
11
  CLI tsup v8.0.2
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 3245ms
14
- DTS dist/index.d.ts 365.35 KB
13
+ DTS ⚡️ Build success in 3178ms
14
+ DTS dist/index.d.ts 365.38 KB
15
15
 
16
- > @botpress/client@0.26.5 build:node /home/runner/work/botpress/botpress/packages/client
16
+ > @botpress/client@0.27.0 build:node /home/runner/work/botpress/botpress/packages/client
17
17
  > ts-node -T ./build.ts --node
18
18
 
19
19
  Done
20
20
 
21
- > @botpress/client@0.26.5 build:browser /home/runner/work/botpress/botpress/packages/client
21
+ > @botpress/client@0.27.0 build:browser /home/runner/work/botpress/botpress/packages/client
22
22
  > ts-node -T ./build.ts --browser
23
23
 
24
24
  Done
25
25
 
26
- > @botpress/client@0.26.5 build:bundle /home/runner/work/botpress/botpress/packages/client
26
+ > @botpress/client@0.27.0 build:bundle /home/runner/work/botpress/botpress/packages/client
27
27
  > ts-node -T ./build.ts --bundle
28
28
 
29
29
  Done
@@ -1,5 +1,5 @@
1
1
 
2
- > @botpress/client@0.26.5 generate /home/runner/work/botpress/botpress/packages/client
2
+ > @botpress/client@0.27.0 generate /home/runner/work/botpress/botpress/packages/client
3
3
  > ts-node ./openapi.ts
4
4
 
5
5
  Generating models
package/dist/bundle.cjs CHANGED
@@ -11,7 +11,7 @@
11
11
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){let a=new this(t);return s.forEach(n=>a.set(n)),a}static accessor(t){let a=(this[en]=this[en]={accessors:{}}).accessors,n=this.prototype;function o(p){let i=ut(p);a[i]||(eg(n,p),a[i]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};Ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors(Ve.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[s]=a}}});l.freezeMethods(Ve);var W=Ve;function lt(e,t){let s=this||ze,a=t||s,n=W.from(a.headers),o=a.data;return l.forEach(e,function(i){o=i.call(s,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function dt(e){return!!(e&&e.__CANCEL__)}function tn(e,t,s){h.call(this,e??"canceled",h.ERR_CANCELED,t,s),this.name="CanceledError"}l.inherits(tn,h,{__CANCEL__:!0});var ie=tn;function qe(e,t,s){let a=s.config.validateStatus;!s.status||!a||a(s.status)?e(s):t(new h("Request failed with status code "+s.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Xs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ue(e,t){return e&&!Xs(t)?Zs(e,t):t}var Fn=D(an(),1),Hn=D(require("http"),1),Mn=D(require("https"),1),Qn=D(require("util"),1),jn=D(Pn(),1),fe=D(require("zlib"),1);var _e="1.6.1";function yt(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var Wg=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function ca(e,t,s){let a=s&&s.Blob||E.classes.Blob,n=yt(e);if(t===void 0&&a&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let o=Wg.exec(e);if(!o)throw new h("Invalid URL",h.ERR_INVALID_URL);let p=o[1],i=o[2],r=o[3],u=Buffer.from(decodeURIComponent(r),i?"base64":"utf8");if(t){if(!a)throw new h("Blob is not supported",h.ERR_NOT_SUPPORT);return new a([u],{type:p})}return u}throw new h("Unsupported protocol "+n,h.ERR_NOT_SUPPORT)}var Ee=D(require("stream"),1);var Tn=D(require("stream"),1);function Dg(e,t){let s=0,a=1e3/t,n=null;return function(p,i){let r=Date.now();if(p||r-s>a)return n&&(clearTimeout(n),n=null),s=r,e.apply(null,i);n||(n=setTimeout(()=>(n=null,s=Date.now(),e.apply(null,i)),a-(r-s)))}}var An=Dg;function Og(e,t){e=e||10;let s=new Array(e),a=new Array(e),n=0,o=0,p;return t=t!==void 0?t:1e3,function(r){let u=Date.now(),c=a[o];p||(p=u),s[n]=r,a[n]=u;let g=o,y=0;for(;g!==n;)y+=s[g++],g=g%e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),u-p<t)return;let b=c&&u-c;return b?Math.round(y*1e3/b):void 0}}var Ht=Og;var Mt=Symbol("internals"),ua=class extends Tn.default.Transform{constructor(t){t=l.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,r)=>!l.isUndefined(r[i])),super({readableHighWaterMark:t.chunkSize});let s=this,a=this[Mt]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Ht(a.ticksRate*t.samplesCount,a.timeWindow);this.on("newListener",i=>{i==="progress"&&(a.isCaptured||(a.isCaptured=!0))});let o=0;a.updateProgress=An(function(){let r=a.length,u=a.bytesSeen,c=u-o;if(!c||s.destroyed)return;let g=n(c);o=u,process.nextTick(()=>{s.emit("progress",{loaded:u,total:r,progress:r?u/r:void 0,bytes:c,rate:g||void 0,estimated:g&&r&&u<=r?(r-u)/g:void 0})})},a.ticksRate);let p=()=>{a.updateProgress(!0)};this.once("end",p),this.once("error",p)}_read(t){let s=this[Mt];return s.onReadCallback&&s.onReadCallback(),super._read(t)}_transform(t,s,a){let n=this,o=this[Mt],p=o.maxRate,i=this.readableHighWaterMark,r=o.timeWindow,u=1e3/r,c=p/u,g=o.minChunkSize!==!1?Math.max(o.minChunkSize,c*.01):0;function y(f,x){let v=Buffer.byteLength(f);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&o.updateProgress(),n.push(f)?process.nextTick(x):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(x)}}let b=(f,x)=>{let v=Buffer.byteLength(f),R=null,P=i,A,B=0;if(p){let U=Date.now();(!o.ts||(B=U-o.ts)>=r)&&(o.ts=U,A=c-o.bytes,o.bytes=A<0?-A:0,B=0),A=c-o.bytes}if(p){if(A<=0)return setTimeout(()=>{x(null,f)},r-B);A<P&&(P=A)}P&&v>P&&v-P>g&&(R=f.subarray(P),f=f.subarray(0,P)),y(f,R?()=>{process.nextTick(x,null,R)}:x)};b(t,function f(x,v){if(x)return a(x);v?b(v,f):a(null)})}setLength(t){return this[Mt].length=+t,this}},la=ua;var Nn=D(require("events"),1);var Bn=require("util"),Un=require("stream");var{asyncIterator:Cn}=Symbol,Fg=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Cn]?yield*e[Cn]():yield e},Qt=Fg;var Hg=l.ALPHABET.ALPHA_DIGIT+"-_",xt=new Bn.TextEncoder,Ie=`\r
12
12
  `,Mg=xt.encode(Ie),Qg=2,da=class{constructor(t,s){let{escapeName:a}=this.constructor,n=l.isString(s),o=`Content-Disposition: form-data; name="${a(t)}"${!n&&s.name?`; filename="${a(s.name)}"`:""}${Ie}`;n?s=xt.encode(String(s).replace(/\r?\n|\r\n?/g,Ie)):o+=`Content-Type: ${s.type||"application/octet-stream"}${Ie}`,this.headers=xt.encode(o+Ie),this.contentLength=n?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+Qg,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;l.isTypedArray(t)?yield t:yield*Qt(t),yield Mg}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},jg=(e,t,s)=>{let{tag:a="form-data-boundary",size:n=25,boundary:o=a+"-"+l.generateString(n,Hg)}=s||{};if(!l.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let p=xt.encode("--"+o+Ie),i=xt.encode("--"+o+"--"+Ie+Ie),r=i.byteLength,u=Array.from(e.entries()).map(([g,y])=>{let b=new da(g,y);return r+=b.size,b});r+=p.byteLength*u.length,r=l.toFiniteNumber(r);let c={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(r)&&(c["Content-Length"]=r),t&&t(c),Un.Readable.from(async function*(){for(let g of u)yield p,yield*g.encode();yield i}())},Ln=jg;var Sn=D(require("stream"),1),ma=class extends Sn.default.Transform{__transform(t,s,a){this.push(t),a()}_transform(t,s,a){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,s)}this.__transform(t,s,a)}},Gn=ma;var Ng=(e,t)=>l.isAsyncFn(e)?function(...s){let a=s.pop();e.apply(this,s).then(n=>{try{t?a(null,...t(n)):a(null,n)}catch(o){a(o)}},a)}:e,_n=Ng;var En={flush:fe.default.constants.Z_SYNC_FLUSH,finishFlush:fe.default.constants.Z_SYNC_FLUSH},zg={flush:fe.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:fe.default.constants.BROTLI_OPERATION_FLUSH},Wn=l.isFunction(fe.default.createBrotliDecompress),{http:Vg,https:$g}=jn.default,Kg=/https:?/,Dn=E.protocols.map(e=>e+":");function Jg(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function zn(e,t,s){let a=t;if(!a&&a!==!1){let n=(0,Fn.getProxyForUrl)(s);n&&(a=new URL(n))}if(a){if(a.username&&(a.auth=(a.username||"")+":"+(a.password||"")),a.auth){(a.auth.username||a.auth.password)&&(a.auth=(a.auth.username||"")+":"+(a.auth.password||""));let o=Buffer.from(a.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=a.hostname||a.host;e.hostname=n,e.host=n,e.port=a.port,e.path=s,a.protocol&&(e.protocol=a.protocol.includes(":")?a.protocol:`${a.protocol}:`)}e.beforeRedirects.proxy=function(o){zn(o,t,o.href)}}var Yg=typeof process<"u"&&l.kindOf(process)==="process",Xg=e=>new Promise((t,s)=>{let a,n,o=(r,u)=>{n||(n=!0,a&&a(r,u))},p=r=>{o(r),t(r)},i=r=>{o(r,!0),s(r)};e(p,i,r=>a=r).catch(i)}),Zg=({address:e,family:t})=>{if(!l.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},On=(e,t)=>Zg(l.isObject(e)?e:{address:e,family:t}),Vn=Yg&&function(t){return Xg(async function(a,n,o){let{data:p,lookup:i,family:r}=t,{responseType:u,responseEncoding:c}=t,g=t.method.toUpperCase(),y,b=!1,f;if(i){let k=_n(i,q=>l.isArray(q)?q:[q]);i=(q,G,Me)=>{k(q,G,(z,Re,Cs)=>{let ce=l.isArray(Re)?Re.map(ne=>On(ne)):[On(Re,Cs)];G.all?Me(z,ce):Me(z,ce[0].address,ce[0].family)})}}let x=new Nn.default,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(R),t.signal&&t.signal.removeEventListener("abort",R),x.removeAllListeners()};o((k,q)=>{y=!0,q&&(b=!0,v())});function R(k){x.emit("abort",!k||k.type?new ie(null,t,f):k)}x.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(R),t.signal&&(t.signal.aborted?R():t.signal.addEventListener("abort",R)));let P=Ue(t.baseURL,t.url),A=new URL(P,"http://localhost"),B=A.protocol||Dn[0];if(B==="data:"){let k;if(g!=="GET")return qe(a,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{k=ca(t.url,u==="blob",{Blob:t.env&&t.env.Blob})}catch(q){throw h.from(q,h.ERR_BAD_REQUEST,t)}return u==="text"?(k=k.toString(c),(!c||c==="utf8")&&(k=l.stripBOM(k))):u==="stream"&&(k=Ee.default.Readable.from(k)),qe(a,n,{data:k,status:200,statusText:"OK",headers:new W,config:t})}if(Dn.indexOf(B)===-1)return n(new h("Unsupported protocol "+B,h.ERR_BAD_REQUEST,t));let U=W.from(t.headers).normalize();U.set("User-Agent","axios/"+_e,!1);let J=t.onDownloadProgress,Y=t.onUploadProgress,X=t.maxRate,N,pe;if(l.isSpecCompliantForm(p)){let k=U.getContentType(/boundary=([-_\w\d]{10,70})/i);p=Ln(p,q=>{U.set(q)},{tag:`axios-${_e}-boundary`,boundary:k&&k[1]||void 0})}else if(l.isFormData(p)&&l.isFunction(p.getHeaders)){if(U.set(p.getHeaders()),!U.hasContentLength())try{let k=await Qn.default.promisify(p.getLength).call(p);Number.isFinite(k)&&k>=0&&U.setContentLength(k)}catch{}}else if(l.isBlob(p))p.size&&U.setContentType(p.type||"application/octet-stream"),U.setContentLength(p.size||0),p=Ee.default.Readable.from(Qt(p));else if(p&&!l.isStream(p)){if(!Buffer.isBuffer(p))if(l.isArrayBuffer(p))p=Buffer.from(new Uint8Array(p));else if(l.isString(p))p=Buffer.from(p,"utf-8");else return n(new h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",h.ERR_BAD_REQUEST,t));if(U.setContentLength(p.length,!1),t.maxBodyLength>-1&&p.length>t.maxBodyLength)return n(new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,t))}let me=l.toFiniteNumber(U.getContentLength());l.isArray(X)?(N=X[0],pe=X[1]):N=pe=X,p&&(Y||N)&&(l.isStream(p)||(p=Ee.default.Readable.from(p,{objectMode:!1})),p=Ee.default.pipeline([p,new la({length:me,maxRate:l.toFiniteNumber(N)})],l.noop),Y&&p.on("progress",k=>{Y(Object.assign(k,{upload:!0}))}));let se;if(t.auth){let k=t.auth.username||"",q=t.auth.password||"";se=k+":"+q}if(!se&&A.username){let k=A.username,q=A.password;se=k+":"+q}se&&U.delete("authorization");let Z;try{Z=Be(A.pathname+A.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(k){let q=new Error(k.message);return q.config=t,q.url=t.url,q.exists=!0,n(q)}U.set("Accept-Encoding","gzip, compress, deflate"+(Wn?", br":""),!1);let L={path:Z,method:g,headers:U.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:se,protocol:B,family:r,beforeRedirect:Jg,beforeRedirects:{}};!l.isUndefined(i)&&(L.lookup=i),t.socketPath?L.socketPath=t.socketPath:(L.hostname=A.hostname,L.port=A.port,zn(L,t.proxy,B+"//"+A.hostname+(A.port?":"+A.port:"")+L.path));let $,ge=Kg.test(L.protocol);if(L.agent=ge?t.httpsAgent:t.httpAgent,t.transport?$=t.transport:t.maxRedirects===0?$=ge?Mn.default:Hn.default:(t.maxRedirects&&(L.maxRedirects=t.maxRedirects),t.beforeRedirect&&(L.beforeRedirects.config=t.beforeRedirect),$=ge?$g:Vg),t.maxBodyLength>-1?L.maxBodyLength=t.maxBodyLength:L.maxBodyLength=1/0,t.insecureHTTPParser&&(L.insecureHTTPParser=t.insecureHTTPParser),f=$.request(L,function(q){if(f.destroyed)return;let G=[q],Me=+q.headers["content-length"];if(J){let ne=new la({length:l.toFiniteNumber(Me),maxRate:l.toFiniteNumber(pe)});J&&ne.on("progress",Pt=>{J(Object.assign(Pt,{download:!0}))}),G.push(ne)}let z=q,Re=q.req||f;if(t.decompress!==!1&&q.headers["content-encoding"])switch((g==="HEAD"||q.statusCode===204)&&delete q.headers["content-encoding"],(q.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":G.push(fe.default.createUnzip(En)),delete q.headers["content-encoding"];break;case"deflate":G.push(new Gn),G.push(fe.default.createUnzip(En)),delete q.headers["content-encoding"];break;case"br":Wn&&(G.push(fe.default.createBrotliDecompress(zg)),delete q.headers["content-encoding"])}z=G.length>1?Ee.default.pipeline(G,l.noop):G[0];let Cs=Ee.default.finished(z,()=>{Cs(),v()}),ce={status:q.statusCode,statusText:q.statusMessage,headers:new W(q.headers),config:t,request:Re};if(u==="stream")ce.data=z,qe(a,n,ce);else{let ne=[],Pt=0;z.on("data",function(V){ne.push(V),Pt+=V.length,t.maxContentLength>-1&&Pt>t.maxContentLength&&(b=!0,z.destroy(),n(new h("maxContentLength size of "+t.maxContentLength+" exceeded",h.ERR_BAD_RESPONSE,t,Re)))}),z.on("aborted",function(){if(b)return;let V=new h("maxContentLength size of "+t.maxContentLength+" exceeded",h.ERR_BAD_RESPONSE,t,Re);z.destroy(V),n(V)}),z.on("error",function(V){f.destroyed||n(h.from(V,null,t,Re))}),z.on("end",function(){try{let V=ne.length===1?ne[0]:Buffer.concat(ne);u!=="arraybuffer"&&(V=V.toString(c),(!c||c==="utf8")&&(V=l.stripBOM(V))),ce.data=V}catch(V){return n(h.from(V,null,t,ce.request,ce))}qe(a,n,ce)})}x.once("abort",ne=>{z.destroyed||(z.emit("error",ne),z.destroy())})}),x.once("abort",k=>{n(k),f.destroy(k)}),f.on("error",function(q){n(h.from(q,null,t,f))}),f.on("socket",function(q){q.setKeepAlive(!0,1e3*60)}),t.timeout){let k=parseInt(t.timeout,10);if(Number.isNaN(k)){n(new h("error trying to parse `config.timeout` to int",h.ERR_BAD_OPTION_VALUE,t,f));return}f.setTimeout(k,function(){if(y)return;let G=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Me=t.transitional||Ne;t.timeoutErrorMessage&&(G=t.timeoutErrorMessage),n(new h(G,Me.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,f)),R()})}if(l.isStream(p)){let k=!1,q=!1;p.on("end",()=>{k=!0}),p.once("error",G=>{q=!0,f.destroy(G)}),p.on("close",()=>{!k&&!q&&R(new ie("Request stream has been aborted",t,f))}),p.pipe(f)}else f.end(p)})};var $n=E.hasStandardBrowserEnv?function(){return{write:function(s,a,n,o,p,i){let r=[];r.push(s+"="+encodeURIComponent(a)),l.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),l.isString(o)&&r.push("path="+o),l.isString(p)&&r.push("domain="+p),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read:function(s){let a=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var Kn=E.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),a;function n(o){let p=o;return t&&(s.setAttribute("href",p),p=s.href),s.setAttribute("href",p),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return a=n(window.location.href),function(p){let i=l.isString(p)?n(p):p;return i.protocol===a.protocol&&i.host===a.host}}():function(){return function(){return!0}}();function Jn(e,t){let s=0,a=Ht(50,250);return n=>{let o=n.loaded,p=n.lengthComputable?n.total:void 0,i=o-s,r=a(i),u=o<=p;s=o;let c={loaded:o,total:p,progress:p?o/p:void 0,bytes:i,rate:r||void 0,estimated:r&&p&&u?(p-o)/r:void 0,event:n};c[t?"download":"upload"]=!0,e(c)}}var ef=typeof XMLHttpRequest<"u",Yn=ef&&function(e){return new Promise(function(s,a){let n=e.data,o=W.from(e.headers).normalize(),p=e.responseType,i;function r(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}let u;if(l.isFormData(n)){if(E.hasStandardBrowserEnv||E.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){let[f,...x]=u?u.split(";").map(v=>v.trim()).filter(Boolean):[];o.setContentType([f||"multipart/form-data",...x].join("; "))}}let c=new XMLHttpRequest;if(e.auth){let f=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+x))}let g=Ue(e.baseURL,e.url);c.open(e.method.toUpperCase(),Be(g,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function y(){if(!c)return;let f=W.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!p||p==="text"||p==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:f,config:e,request:c};qe(function(P){s(P),r()},function(P){a(P),r()},v),c=null}if("onloadend"in c?c.onloadend=y:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(y)},c.onabort=function(){c&&(a(new h("Request aborted",h.ECONNABORTED,e,c)),c=null)},c.onerror=function(){a(new h("Network Error",h.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",v=e.transitional||Ne;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),a(new h(x,v.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,c)),c=null},E.hasStandardBrowserEnv){let f=Kn(g)&&e.xsrfCookieName&&$n.read(e.xsrfCookieName);f&&o.set(e.xsrfHeaderName,f)}n===void 0&&o.setContentType(null),"setRequestHeader"in c&&l.forEach(o.toJSON(),function(x,v){c.setRequestHeader(v,x)}),l.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),p&&p!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Jn(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Jn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=f=>{c&&(a(!f||f.type?new ie(null,e,c):f),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));let b=yt(g);if(b&&E.protocols.indexOf(b)===-1){a(new h("Unsupported protocol "+b+":",h.ERR_BAD_REQUEST,e));return}c.send(n||null)})};var ga={http:Vn,xhr:Yn};l.forEach(ga,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Xn=e=>`- ${e}`,tf=e=>l.isFunction(e)||e===null||e===!1,jt={getAdapter:e=>{e=l.isArray(e)?e:[e];let{length:t}=e,s,a,n={};for(let o=0;o<t;o++){s=e[o];let p;if(a=s,!tf(s)&&(a=ga[(p=String(s)).toLowerCase()],a===void 0))throw new h(`Unknown adapter '${p}'`);if(a)break;n[p||"#"+o]=a}if(!a){let o=Object.entries(n).map(([i,r])=>`adapter ${i} `+(r===!1?"is not supported by the environment":"is not available in the build")),p=t?o.length>1?`since :
13
13
  `+o.map(Xn).join(`
14
- `):" "+Xn(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return a},adapters:ga};function fa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ie(null,e)}function Nt(e){return fa(e),e.headers=W.from(e.headers),e.data=lt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jt.getAdapter(e.adapter||ze.adapter)(e).then(function(a){return fa(e),a.data=lt.call(e,e.transformResponse,a),a.headers=W.from(a.headers),a},function(a){return dt(a)||(fa(e),a&&a.response&&(a.response.data=lt.call(e,e.transformResponse,a.response),a.response.headers=W.from(a.response.headers))),Promise.reject(a)})}var Zn=e=>e instanceof W?e.toJSON():e;function ye(e,t){t=t||{};let s={};function a(u,c,g){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:g},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function n(u,c,g){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u,g)}else return a(u,c,g)}function o(u,c){if(!l.isUndefined(c))return a(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u)}else return a(void 0,c)}function i(u,c,g){if(g in t)return a(u,c);if(g in e)return a(void 0,u)}let r={url:o,method:o,data:o,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:i,headers:(u,c)=>n(Zn(u),Zn(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let g=r[c]||n,y=g(e[c],t[c],c);l.isUndefined(y)&&g!==i||(s[c]=y)}),s}var ya={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ya[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});var eo={};ya.transitional=function(t,s,a){function n(o,p){return"[Axios v"+_e+"] Transitional option '"+o+"'"+p+(a?". "+a:"")}return(o,p,i)=>{if(t===!1)throw new h(n(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!eo[p]&&(eo[p]=!0,console.warn(n(p," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(o,p,i):!0}};function sf(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),n=a.length;for(;n-- >0;){let o=a[n],p=t[o];if(p){let i=e[o],r=i===void 0||p(i,o,e);if(r!==!0)throw new h("option "+o+" must be "+r,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var zt={assertOptions:sf,validators:ya};var we=zt.validators,Xe=class{constructor(t){this.defaults=t,this.interceptors={request:new Vs,response:new Vs}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=ye(this.defaults,s);let{transitional:a,paramsSerializer:n,headers:o}=s;a!==void 0&&zt.assertOptions(a,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean)},!1),n!=null&&(l.isFunction(n)?s.paramsSerializer={serialize:n}:zt.assertOptions(n,{encode:we.function,serialize:we.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let p=o&&l.merge(o.common,o[s.method]);o&&l.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),s.headers=W.concat(p,o);let i=[],r=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(r=r&&x.synchronous,i.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,g=0,y;if(!r){let f=[Nt.bind(this),void 0];for(f.unshift.apply(f,i),f.push.apply(f,u),y=f.length,c=Promise.resolve(s);g<y;)c=c.then(f[g++],f[g++]);return c}y=i.length;let b=s;for(g=0;g<y;){let f=i[g++],x=i[g++];try{b=f(b)}catch(v){x.call(this,v);break}}try{c=Nt.call(this,b)}catch(f){return Promise.reject(f)}for(g=0,y=u.length;g<y;)c=c.then(u[g++],u[g++]);return c}getUri(t){t=ye(this.defaults,t);let s=Ue(t.baseURL,t.url);return Be(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){Xe.prototype[t]=function(s,a){return this.request(ye(a||{},{method:t,url:s,data:(a||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(a){return function(o,p,i){return this.request(ye(i||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}Xe.prototype[t]=s(),Xe.prototype[t+"Form"]=s(!0)});var ht=Xe;var bt=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});let a=this;this.promise.then(n=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](n);a._listeners=null}),this.promise.then=n=>{let o,p=new Promise(i=>{a.subscribe(i),o=i}).then(n);return p.cancel=function(){a.unsubscribe(o)},p},t(function(o,p,i){a.reason||(a.reason=new ie(o,p,i),s(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new bt(function(n){t=n}),cancel:t}}},to=bt;function xa(e){return function(s){return e.apply(null,s)}}function ha(e){return l.isObject(e)&&e.isAxiosError===!0}var ba={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ba).forEach(([e,t])=>{ba[t]=e});var so=ba;function ao(e){let t=new ht(e),s=it(ht.prototype.request,t);return l.extend(s,ht.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(n){return ao(ye(e,n))},s}var _=ao(ze);_.Axios=ht;_.CanceledError=ie;_.CancelToken=to;_.isCancel=dt;_.VERSION=_e;_.toFormData=ve;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=xa;_.isAxiosError=ha;_.mergeConfig=ye;_.AxiosHeaders=W;_.formToJSON=e=>_t(l.isHTMLForm(e)?new FormData(e):e);_.getAdapter=jt.getAdapter;_.HttpStatusCode=so;_.default=_;var xe=_;var{Axios:af,AxiosError:rf,CanceledError:nf,isCancel:of,CancelToken:pf,VERSION:cf,all:uf,Cancel:lf,isAxiosError:df,spread:mf,toFormData:gf,AxiosHeaders:ff,HttpStatusCode:yf,formToJSON:xf,getAdapter:hf,mergeConfig:bf}=xe;var ro=D(require("crypto"));var Rf={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},va=typeof window<"u"&&typeof window.document<"u"?window.crypto:ro.default;va.getRandomValues||(va=Rf);var C=class extends Error{constructor(s,a,n,o,p,i){super(o);this.code=s;this.description=a;this.type=n;this.message=o;this.error=p;this.id=i;this.id||(this.id=C.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(va.getRandomValues(new Uint8Array(n))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},vf=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,no=e=>e instanceof C||vf(e)&&e.isApiError===!0,Pe=class extends C{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},Vt=class extends C{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},$t=class extends C{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Kt=class extends C{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},Jt=class extends C{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},Yt=class extends C{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},Xt=class extends C{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},Zt=class extends C{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},es=class extends C{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},ts=class extends C{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},ss=class extends C{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},as=class extends C{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},rs=class extends C{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ns=class extends C{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},os=class extends C{constructor(t,s,a){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,a)}},is=class extends C{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},ps=class extends C{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},cs=class extends C{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},us=class extends C{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},ls=class extends C{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},ds=class extends C{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},ms=class extends C{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},gs=class extends C{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},fs=class extends C{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},qf={Unknown:Pe,Internal:Vt,Unauthorized:$t,Forbidden:Kt,PayloadTooLarge:Jt,InvalidPayload:Yt,UnsupportedMediaType:Xt,MethodNotFound:Zt,ResourceNotFound:es,InvalidJsonSchema:ts,InvalidDataFormat:ss,InvalidIdentifier:as,RelationConflict:rs,ReferenceConstraint:ns,ResourceLockedConflict:os,ReferenceNotFound:is,InvalidQuery:ps,Runtime:cs,AlreadyExists:us,RateLimited:ls,PaymentRequired:ds,QuotaExceeded:ms,LimitExceeded:gs,BreakingChanges:fs},ys=e=>no(e)?e:e instanceof Error?new Pe(e.message,e):typeof e=="string"?new Pe(e):kf(e);function kf(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=qf[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Pe(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Pe("An invalid error occurred: "+JSON.stringify(e))}var he=class extends Error{constructor(s,a,n){super(s);this.innerError=a;this.file=n;this.name="FileUploadError"}};var Va=D(qa()),fd=D(require("http")),yd=D(require("https"));var Rt=D(qa()),Uf="https://api.botpress.cloud",Lf=6e4,Sf="BP_API_URL",Gf="BP_BOT_ID",_f="BP_INTEGRATION_ID",Ef="BP_WORKSPACE_ID",Wf="BP_TOKEN";function oo(e){let t=Df(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Uf,n=t.timeout??Lf;return{apiUrl:a,timeout:n,withCredentials:Rt.isBrowser,headers:s}}function Df(e){return Rt.isBrowser?e:Rt.isNode?Of(e):e}function Of(e){let t={...e,apiUrl:e.apiUrl??process.env[Sf],botId:e.botId??process.env[Gf],integrationId:e.integrationId??process.env[_f],workspaceId:e.workspaceId??process.env[Ef]},s=t.token??process.env[Wf];return s&&(t.token=s),t}var Ri=D(bi()),qx=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:a,headers:n,body:o}=e,p=Object.entries(n).filter(qx),i=Object.fromEntries(p),r=Ri.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=r?[s,r].join("?"):s;return{method:t,url:u,headers:i,data:o}};var vi=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var ki=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var wi=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var Ai=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Ci=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Ui=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Si=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var _i=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Wi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Oi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Hi=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}});var Qi=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ni=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}});var Vi=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Ki=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Yi=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zi=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var tp=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var ap=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var np=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var ip=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var cp=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var lp=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var mp=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}});var fp=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var xp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var bp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var vp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var kp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}});var wp=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Ap=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Cp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Up=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Sp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var _p=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Wp=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}});var Op=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var Hp=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var Qp=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var Np=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var Vp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var Kp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Yp=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zp=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var tc=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var ac=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var nc=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ic=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var cc=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var lc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var mc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var fc=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var xc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var bc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var kc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var wc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Ac=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Cc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Uc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Sc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var _c=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var Wc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var Oc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var Hc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var Qc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var Nc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var Vc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var Kc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var Yc=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var Zc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var tu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var au=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var nu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var iu=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var cu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var lu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var mu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}});var fu=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var xu=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var bu=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var vu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ku=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var wu=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Au=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Cu=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Uu=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Su=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var _u=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Wu=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Ou=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Hu=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,interfaces:e.interfaces,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Qu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,interfaces:e.interfaces,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var Nu=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var Vu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ku=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var Yu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Zu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var tl=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var al=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}});var nl=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var il=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var cl=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}});var ll=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ml=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var fl=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var xl=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var bl=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var vl=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var kl=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var wl=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Al=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType,expiresAt:e.expiresAt}});var Cl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ul=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var Sl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var _l=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}});var Wl=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}});var Ol=e=>({path:`/v1/files/${encodeURIComponent(e.fileId)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{fileId:e.fileId},body:{}});var Hl=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Ql=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Nl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Vl=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Kl=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}});var Yl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Zl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var td=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var ad=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var nd=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}});var id=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var cd=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}});var ld=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var md=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}});var Ts=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:n,body:o}=vi(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getConversation=async t=>{let{path:s,headers:a,query:n,body:o}=ki(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listConversations=async t=>{let{path:s,headers:a,query:n,body:o}=wi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ai(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ci(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ui(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listParticipants=async t=>{let{path:s,headers:a,query:n,body:o}=Si(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};addParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=_i(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Wi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Oi(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Hi(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Qi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Ni(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Vi(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Ki(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Yi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Zi(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listMessages=async t=>{let{path:s,headers:a,query:n,body:o}=tp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:n,body:o}=ap(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createUser=async t=>{let{path:s,headers:a,query:n,body:o}=np(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUser=async t=>{let{path:s,headers:a,query:n,body:o}=ip(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsers=async t=>{let{path:s,headers:a,query:n,body:o}=cp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:n,body:o}=lp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateUser=async t=>{let{path:s,headers:a,query:n,body:o}=mp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteUser=async t=>{let{path:s,headers:a,query:n,body:o}=fp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getState=async t=>{let{path:s,headers:a,query:n,body:o}=xp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setState=async t=>{let{path:s,headers:a,query:n,body:o}=bp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:n,body:o}=vp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};patchState=async t=>{let{path:s,headers:a,query:n,body:o}=kp(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};callAction=async t=>{let{path:s,headers:a,query:n,body:o}=wp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Ap(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTask=async t=>{let{path:s,headers:a,query:n,body:o}=Cp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTask=async t=>{let{path:s,headers:a,query:n,body:o}=Up(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTask=async t=>{let{path:s,headers:a,query:n,body:o}=Sp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTask=async t=>{let{path:s,headers:a,query:n,body:o}=_p(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTasks=async t=>{let{path:s,headers:a,query:n,body:o}=Wp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=Op(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};runVrl=async t=>{let{path:s,headers:a,query:n,body:o}=Hp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccount=async t=>{let{path:s,headers:a,query:n,body:o}=Qp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateAccount=async t=>{let{path:s,headers:a,query:n,body:o}=Np(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:n,body:o}=Vp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=Kp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=Yp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=Zp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=tc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=ac(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:n,body:o}=nc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=ic(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBot=async t=>{let{path:s,headers:a,query:n,body:o}=cc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateBot=async t=>{let{path:s,headers:a,query:n,body:o}=lc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};transferBot=async t=>{let{path:s,headers:a,query:n,body:o}=mc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBots=async t=>{let{path:s,headers:a,query:n,body:o}=fc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBot=async t=>{let{path:s,headers:a,query:n,body:o}=xc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBot=async t=>{let{path:s,headers:a,query:n,body:o}=bc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:n,body:o}=vc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:n,body:o}=kc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=wc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Ac(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:n,body:o}=Cc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Uc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotVersions=async t=>{let{path:s,headers:a,query:n,body:o}=_c(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Wc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Oc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deployBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Hc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:n,body:o}=Qc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=Nc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:n,body:o}=Vc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=Kc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=Yc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=Zc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=tu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:n,body:o}=au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:n,body:o}=nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:n,body:o}=iu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:n,body:o}=cu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:n,body:o}=lu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=mu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:n,body:o}=fu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=xu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=bu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=vu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:n,body:o}=ku(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:n,body:o}=wu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Cu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Uu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:n,body:o}=_u(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=Wu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=Ou(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Hu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Qu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=Nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Vu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:n,body:o}=Ku(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:n,body:o}=Yu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Zu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};requestIntegrationVerification=async t=>{let{path:s,headers:a,query:n,body:o}=tl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createInterface=async t=>{let{path:s,headers:a,query:n,body:o}=al(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterface=async t=>{let{path:s,headers:a,query:n,body:o}=nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterfaceByName=async t=>{let{path:s,headers:a,query:n,body:o}=il(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateInterface=async t=>{let{path:s,headers:a,query:n,body:o}=cl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteInterface=async t=>{let{path:s,headers:a,query:n,body:o}=ll(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listInterfaces=async t=>{let{path:s,headers:a,query:n,body:o}=ml(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUsage=async t=>{let{path:s,headers:a,query:n,body:o}=fl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMultipleUsages=async t=>{let{path:s,headers:a,query:n,body:o}=xl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:n,body:o}=bl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:n,body:o}=vl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listActivities=async t=>{let{path:s,headers:a,query:n,body:o}=kl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};introspect=async t=>{let{path:s,headers:a,query:n,body:o}=wl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertFile=async t=>{let{path:s,headers:a,query:n,body:o}=Al(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteFile=async t=>{let{path:s,headers:a,query:n,body:o}=Cl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFiles=async t=>{let{path:s,headers:a,query:n,body:o}=Ul(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getFile=async t=>{let{path:s,headers:a,query:n,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateFileMetadata=async t=>{let{path:s,headers:a,query:n,body:o}=_l(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};searchFiles=async t=>{let{path:s,headers:a,query:n,body:o}=Wl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFilePassages=async t=>{let{path:s,headers:a,query:n,body:o}=Ol(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTables=async t=>{let{path:s,headers:a,query:n,body:o}=Hl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTable=async t=>{let{path:s,headers:a,query:n,body:o}=Ql(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:n,body:o}=Nl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTable=async t=>{let{path:s,headers:a,query:n,body:o}=Vl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:n,body:o}=Kl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTable=async t=>{let{path:s,headers:a,query:n,body:o}=Yl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:n,body:o}=Zl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTable=async t=>{let{path:s,headers:a,query:n,body:o}=td(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTableRow=async t=>{let{path:s,headers:a,query:n,body:o}=ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};findTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=nd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=id(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=cd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=ld(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=md(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})}};function m(e){return xe.isAxiosError(e)&&e.response?.data?ys(e.response.data):ys(e)}var xd=100*1024*1024,Ix=xd,wx=xd,$a=class extends Ts{config;constructor(t={}){let s=oo(t),{apiUrl:a,headers:n,withCredentials:o,timeout:p}=s,i=xe.create({baseURL:a,headers:n,withCredentials:o,timeout:p,maxBodyLength:Ix,maxContentLength:wx,httpAgent:Va.isNode?new fd.default.Agent({keepAlive:!0}):void 0,httpsAgent:Va.isNode?new yd.default.Agent({keepAlive:!0}):void 0});super(i),this.config=s}uploadFile=async({key:t,index:s,tags:a,contentType:n,accessPolicies:o,content:p,url:i,expiresAt:r})=>{if(i&&p)throw new he("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await xe.get(i,{responseType:"arraybuffer"}).then(y=>y.data).catch(y=>{throw new he(`Failed to download file from provided URL: ${y.message}`,y)})),!p)throw new he("No content was provided for the file");let u,c;if(typeof p=="string"){let b=new TextEncoder().encode(p);u=b,c=b.byteLength}else if(p instanceof Uint8Array)u=p,c=u.byteLength;else if(p instanceof ArrayBuffer)u=p,c=u.byteLength;else if(p instanceof Blob)u=p,c=p.size;else throw new he("The provided content is not supported");let{file:g}=await this.upsertFile({key:t,tags:a,index:s,accessPolicies:o,contentType:n,size:c,expiresAt:r});try{await xe.put(g.uploadUrl,u,{maxBodyLength:1/0,headers:{"Content-Type":g.contentType}})}catch(y){throw new he(`Failed to upload file: ${y.message}`,y,g)}return{file:g}}};0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceLockedConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,UploadFileError,axios,errorFrom,isApiError});
14
+ `):" "+Xn(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return a},adapters:ga};function fa(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ie(null,e)}function Nt(e){return fa(e),e.headers=W.from(e.headers),e.data=lt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jt.getAdapter(e.adapter||ze.adapter)(e).then(function(a){return fa(e),a.data=lt.call(e,e.transformResponse,a),a.headers=W.from(a.headers),a},function(a){return dt(a)||(fa(e),a&&a.response&&(a.response.data=lt.call(e,e.transformResponse,a.response),a.response.headers=W.from(a.response.headers))),Promise.reject(a)})}var Zn=e=>e instanceof W?e.toJSON():e;function ye(e,t){t=t||{};let s={};function a(u,c,g){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:g},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function n(u,c,g){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u,g)}else return a(u,c,g)}function o(u,c){if(!l.isUndefined(c))return a(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u)}else return a(void 0,c)}function i(u,c,g){if(g in t)return a(u,c);if(g in e)return a(void 0,u)}let r={url:o,method:o,data:o,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:i,headers:(u,c)=>n(Zn(u),Zn(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let g=r[c]||n,y=g(e[c],t[c],c);l.isUndefined(y)&&g!==i||(s[c]=y)}),s}var ya={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ya[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});var eo={};ya.transitional=function(t,s,a){function n(o,p){return"[Axios v"+_e+"] Transitional option '"+o+"'"+p+(a?". "+a:"")}return(o,p,i)=>{if(t===!1)throw new h(n(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!eo[p]&&(eo[p]=!0,console.warn(n(p," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(o,p,i):!0}};function sf(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),n=a.length;for(;n-- >0;){let o=a[n],p=t[o];if(p){let i=e[o],r=i===void 0||p(i,o,e);if(r!==!0)throw new h("option "+o+" must be "+r,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var zt={assertOptions:sf,validators:ya};var we=zt.validators,Xe=class{constructor(t){this.defaults=t,this.interceptors={request:new Vs,response:new Vs}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=ye(this.defaults,s);let{transitional:a,paramsSerializer:n,headers:o}=s;a!==void 0&&zt.assertOptions(a,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean)},!1),n!=null&&(l.isFunction(n)?s.paramsSerializer={serialize:n}:zt.assertOptions(n,{encode:we.function,serialize:we.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let p=o&&l.merge(o.common,o[s.method]);o&&l.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),s.headers=W.concat(p,o);let i=[],r=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(r=r&&x.synchronous,i.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,g=0,y;if(!r){let f=[Nt.bind(this),void 0];for(f.unshift.apply(f,i),f.push.apply(f,u),y=f.length,c=Promise.resolve(s);g<y;)c=c.then(f[g++],f[g++]);return c}y=i.length;let b=s;for(g=0;g<y;){let f=i[g++],x=i[g++];try{b=f(b)}catch(v){x.call(this,v);break}}try{c=Nt.call(this,b)}catch(f){return Promise.reject(f)}for(g=0,y=u.length;g<y;)c=c.then(u[g++],u[g++]);return c}getUri(t){t=ye(this.defaults,t);let s=Ue(t.baseURL,t.url);return Be(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){Xe.prototype[t]=function(s,a){return this.request(ye(a||{},{method:t,url:s,data:(a||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(a){return function(o,p,i){return this.request(ye(i||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}Xe.prototype[t]=s(),Xe.prototype[t+"Form"]=s(!0)});var ht=Xe;var bt=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});let a=this;this.promise.then(n=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](n);a._listeners=null}),this.promise.then=n=>{let o,p=new Promise(i=>{a.subscribe(i),o=i}).then(n);return p.cancel=function(){a.unsubscribe(o)},p},t(function(o,p,i){a.reason||(a.reason=new ie(o,p,i),s(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new bt(function(n){t=n}),cancel:t}}},to=bt;function xa(e){return function(s){return e.apply(null,s)}}function ha(e){return l.isObject(e)&&e.isAxiosError===!0}var ba={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ba).forEach(([e,t])=>{ba[t]=e});var so=ba;function ao(e){let t=new ht(e),s=it(ht.prototype.request,t);return l.extend(s,ht.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(n){return ao(ye(e,n))},s}var _=ao(ze);_.Axios=ht;_.CanceledError=ie;_.CancelToken=to;_.isCancel=dt;_.VERSION=_e;_.toFormData=ve;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=xa;_.isAxiosError=ha;_.mergeConfig=ye;_.AxiosHeaders=W;_.formToJSON=e=>_t(l.isHTMLForm(e)?new FormData(e):e);_.getAdapter=jt.getAdapter;_.HttpStatusCode=so;_.default=_;var xe=_;var{Axios:af,AxiosError:rf,CanceledError:nf,isCancel:of,CancelToken:pf,VERSION:cf,all:uf,Cancel:lf,isAxiosError:df,spread:mf,toFormData:gf,AxiosHeaders:ff,HttpStatusCode:yf,formToJSON:xf,getAdapter:hf,mergeConfig:bf}=xe;var ro=D(require("crypto"));var Rf={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},va=typeof window<"u"&&typeof window.document<"u"?window.crypto:ro.default;va.getRandomValues||(va=Rf);var C=class extends Error{constructor(s,a,n,o,p,i){super(o);this.code=s;this.description=a;this.type=n;this.message=o;this.error=p;this.id=i;this.id||(this.id=C.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(va.getRandomValues(new Uint8Array(n))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},vf=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,no=e=>e instanceof C||vf(e)&&e.isApiError===!0,Pe=class extends C{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},Vt=class extends C{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},$t=class extends C{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Kt=class extends C{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},Jt=class extends C{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},Yt=class extends C{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},Xt=class extends C{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},Zt=class extends C{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},es=class extends C{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},ts=class extends C{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},ss=class extends C{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},as=class extends C{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},rs=class extends C{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ns=class extends C{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},os=class extends C{constructor(t,s,a){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,a)}},is=class extends C{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},ps=class extends C{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},cs=class extends C{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},us=class extends C{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},ls=class extends C{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},ds=class extends C{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},ms=class extends C{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},gs=class extends C{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},fs=class extends C{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},qf={Unknown:Pe,Internal:Vt,Unauthorized:$t,Forbidden:Kt,PayloadTooLarge:Jt,InvalidPayload:Yt,UnsupportedMediaType:Xt,MethodNotFound:Zt,ResourceNotFound:es,InvalidJsonSchema:ts,InvalidDataFormat:ss,InvalidIdentifier:as,RelationConflict:rs,ReferenceConstraint:ns,ResourceLockedConflict:os,ReferenceNotFound:is,InvalidQuery:ps,Runtime:cs,AlreadyExists:us,RateLimited:ls,PaymentRequired:ds,QuotaExceeded:ms,LimitExceeded:gs,BreakingChanges:fs},ys=e=>no(e)?e:e instanceof Error?new Pe(e.message,e):typeof e=="string"?new Pe(e):kf(e);function kf(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){let t=qf[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Pe(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Pe("An invalid error occurred: "+JSON.stringify(e))}var he=class extends Error{constructor(s,a,n){super(s);this.innerError=a;this.file=n;this.name="FileUploadError"}};var Va=D(qa()),fd=D(require("http")),yd=D(require("https"));var Rt=D(qa()),Uf="https://api.botpress.cloud",Lf=6e4,Sf="BP_API_URL",Gf="BP_BOT_ID",_f="BP_INTEGRATION_ID",Ef="BP_WORKSPACE_ID",Wf="BP_TOKEN";function oo(e){let t=Df(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Uf,n=t.timeout??Lf;return{apiUrl:a,timeout:n,withCredentials:Rt.isBrowser,headers:s}}function Df(e){return Rt.isBrowser?e:Rt.isNode?Of(e):e}function Of(e){let t={...e,apiUrl:e.apiUrl??process.env[Sf],botId:e.botId??process.env[Gf],integrationId:e.integrationId??process.env[_f],workspaceId:e.workspaceId??process.env[Ef]},s=t.token??process.env[Wf];return s&&(t.token=s),t}var Ri=D(bi()),qx=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:a,headers:n,body:o}=e,p=Object.entries(n).filter(qx),i=Object.fromEntries(p),r=Ri.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=r?[s,r].join("?"):s;return{method:t,url:u,headers:i,data:o}};var vi=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var ki=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var wi=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var Ai=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Ci=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Ui=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Si=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var _i=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Wi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Oi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Hi=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}});var Qi=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ni=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}});var Vi=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Ki=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Yi=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zi=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var tp=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var ap=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var np=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var ip=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var cp=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var lp=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var mp=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}});var fp=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var xp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var bp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var vp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}});var kp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}});var wp=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Ap=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Cp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Up=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Sp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var _p=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Wp=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}});var Op=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var Hp=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var Qp=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var Np=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var Vp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var Kp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Yp=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zp=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var tc=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var ac=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var nc=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ic=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var cc=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var lc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var mc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var fc=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var xc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var bc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var kc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var wc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Ac=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Cc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Uc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Sc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var _c=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var Wc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var Oc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var Hc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var Qc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var Nc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var Vc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var Kc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var Yc=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var Zc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var tu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var au=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var nu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var iu=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var cu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var lu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var mu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}});var fu=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var xu=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var bu=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var vu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ku=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var wu=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Au=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Cu=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Uu=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Su=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var _u=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Wu=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Ou=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Hu=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,interfaces:e.interfaces,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Qu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,interfaces:e.interfaces,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var Nu=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var Vu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ku=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var Yu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Zu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var tl=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var al=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}});var nl=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var il=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var cl=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}});var ll=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ml=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var fl=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var xl=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var bl=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var vl=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var kl=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var wl=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Al=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType,expiresAt:e.expiresAt}});var Cl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ul=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var Sl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var _l=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}});var Wl=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}});var Ol=e=>({path:`/v1/files/${encodeURIComponent(e.fileId)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{fileId:e.fileId},body:{}});var Hl=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Ql=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Nl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Vl=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Kl=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}});var Yl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var Zl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var td=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var ad=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var nd=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}});var id=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var cd=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}});var ld=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var md=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}});var Ts=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:n,body:o}=vi(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getConversation=async t=>{let{path:s,headers:a,query:n,body:o}=ki(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listConversations=async t=>{let{path:s,headers:a,query:n,body:o}=wi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ai(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ci(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ui(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listParticipants=async t=>{let{path:s,headers:a,query:n,body:o}=Si(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};addParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=_i(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Wi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Oi(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Hi(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Qi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Ni(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Vi(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Ki(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Yi(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Zi(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listMessages=async t=>{let{path:s,headers:a,query:n,body:o}=tp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:n,body:o}=ap(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createUser=async t=>{let{path:s,headers:a,query:n,body:o}=np(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUser=async t=>{let{path:s,headers:a,query:n,body:o}=ip(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsers=async t=>{let{path:s,headers:a,query:n,body:o}=cp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:n,body:o}=lp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateUser=async t=>{let{path:s,headers:a,query:n,body:o}=mp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteUser=async t=>{let{path:s,headers:a,query:n,body:o}=fp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getState=async t=>{let{path:s,headers:a,query:n,body:o}=xp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setState=async t=>{let{path:s,headers:a,query:n,body:o}=bp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:n,body:o}=vp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};patchState=async t=>{let{path:s,headers:a,query:n,body:o}=kp(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};callAction=async t=>{let{path:s,headers:a,query:n,body:o}=wp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Ap(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTask=async t=>{let{path:s,headers:a,query:n,body:o}=Cp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTask=async t=>{let{path:s,headers:a,query:n,body:o}=Up(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTask=async t=>{let{path:s,headers:a,query:n,body:o}=Sp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTask=async t=>{let{path:s,headers:a,query:n,body:o}=_p(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTasks=async t=>{let{path:s,headers:a,query:n,body:o}=Wp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=Op(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};runVrl=async t=>{let{path:s,headers:a,query:n,body:o}=Hp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccount=async t=>{let{path:s,headers:a,query:n,body:o}=Qp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateAccount=async t=>{let{path:s,headers:a,query:n,body:o}=Np(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:n,body:o}=Vp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=Kp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=Yp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=Zp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=tc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=ac(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:n,body:o}=nc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=ic(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBot=async t=>{let{path:s,headers:a,query:n,body:o}=cc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateBot=async t=>{let{path:s,headers:a,query:n,body:o}=lc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};transferBot=async t=>{let{path:s,headers:a,query:n,body:o}=mc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBots=async t=>{let{path:s,headers:a,query:n,body:o}=fc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBot=async t=>{let{path:s,headers:a,query:n,body:o}=xc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBot=async t=>{let{path:s,headers:a,query:n,body:o}=bc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:n,body:o}=vc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:n,body:o}=kc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=wc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Ac(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:n,body:o}=Cc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Uc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotVersions=async t=>{let{path:s,headers:a,query:n,body:o}=_c(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Wc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Oc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deployBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Hc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:n,body:o}=Qc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=Nc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:n,body:o}=Vc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=Kc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=Yc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=Zc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=tu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:n,body:o}=au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:n,body:o}=nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:n,body:o}=iu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:n,body:o}=cu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:n,body:o}=lu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=mu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:n,body:o}=fu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=xu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=bu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=vu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:n,body:o}=ku(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:n,body:o}=wu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Cu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Uu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:n,body:o}=_u(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=Wu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=Ou(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Hu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Qu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=Nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Vu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:n,body:o}=Ku(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:n,body:o}=Yu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Zu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};requestIntegrationVerification=async t=>{let{path:s,headers:a,query:n,body:o}=tl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createInterface=async t=>{let{path:s,headers:a,query:n,body:o}=al(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterface=async t=>{let{path:s,headers:a,query:n,body:o}=nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterfaceByName=async t=>{let{path:s,headers:a,query:n,body:o}=il(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateInterface=async t=>{let{path:s,headers:a,query:n,body:o}=cl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteInterface=async t=>{let{path:s,headers:a,query:n,body:o}=ll(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listInterfaces=async t=>{let{path:s,headers:a,query:n,body:o}=ml(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUsage=async t=>{let{path:s,headers:a,query:n,body:o}=fl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMultipleUsages=async t=>{let{path:s,headers:a,query:n,body:o}=xl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:n,body:o}=bl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:n,body:o}=vl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listActivities=async t=>{let{path:s,headers:a,query:n,body:o}=kl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};introspect=async t=>{let{path:s,headers:a,query:n,body:o}=wl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertFile=async t=>{let{path:s,headers:a,query:n,body:o}=Al(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteFile=async t=>{let{path:s,headers:a,query:n,body:o}=Cl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFiles=async t=>{let{path:s,headers:a,query:n,body:o}=Ul(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getFile=async t=>{let{path:s,headers:a,query:n,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateFileMetadata=async t=>{let{path:s,headers:a,query:n,body:o}=_l(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};searchFiles=async t=>{let{path:s,headers:a,query:n,body:o}=Wl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFilePassages=async t=>{let{path:s,headers:a,query:n,body:o}=Ol(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTables=async t=>{let{path:s,headers:a,query:n,body:o}=Hl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTable=async t=>{let{path:s,headers:a,query:n,body:o}=Ql(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:n,body:o}=Nl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTable=async t=>{let{path:s,headers:a,query:n,body:o}=Vl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:n,body:o}=Kl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTable=async t=>{let{path:s,headers:a,query:n,body:o}=Yl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:n,body:o}=Zl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTable=async t=>{let{path:s,headers:a,query:n,body:o}=td(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTableRow=async t=>{let{path:s,headers:a,query:n,body:o}=ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};findTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=nd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=id(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=cd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=ld(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=md(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})}};function m(e){return xe.isAxiosError(e)&&e.response?.data?ys(e.response.data):ys(e)}var xd=100*1024*1024,Ix=xd,wx=xd,$a=class extends Ts{config;constructor(t={}){let s=oo(t),{apiUrl:a,headers:n,withCredentials:o,timeout:p}=s,i=xe.create({baseURL:a,headers:n,withCredentials:o,timeout:p,maxBodyLength:Ix,maxContentLength:wx,httpAgent:Va.isNode?new fd.default.Agent({keepAlive:!0}):void 0,httpsAgent:Va.isNode?new yd.default.Agent({keepAlive:!0}):void 0});super(i),this.config=s}uploadFile=async({key:t,index:s,tags:a,contentType:n,accessPolicies:o,content:p,url:i,expiresAt:r})=>{if(i&&p)throw new he("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await xe.get(i,{responseType:"arraybuffer"}).then(y=>y.data).catch(y=>{throw new he(`Failed to download file from provided URL: ${y.message}`,y)})),!p)throw new he("No content was provided for the file");let u,c;if(typeof p=="string"){let b=new TextEncoder().encode(p);u=b,c=b.byteLength}else if(p instanceof Uint8Array)u=p,c=u.byteLength;else if(p instanceof ArrayBuffer)u=p,c=u.byteLength;else if(p instanceof Blob)u=p,c=p.size;else throw new he("The provided content is not supported");let{file:g}=await this.upsertFile({key:t,tags:a,index:s,accessPolicies:o,contentType:n,size:c,expiresAt:r});try{await xe.put(g.uploadUrl,u,{maxBodyLength:1/0,headers:{"Content-Type":g.contentType}})}catch(y){throw new he(`Failed to upload file: ${y.message}`,y,g)}return{file:g}}};0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceLockedConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,UploadFileError,axios,errorFrom,isApiError});
15
15
  /*! Bundled license information:
16
16
 
17
17
  mime-db/index.js: