@botpress/client 0.38.2 → 0.39.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.38.2 build /home/runner/work/botpress/botpress/packages/client
2
+ > @botpress/client@0.39.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.38.2 build:type /home/runner/work/botpress/botpress/packages/client
6
+ > @botpress/client@0.39.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 4253ms
14
- DTS dist/index.d.ts 461.40 KB
13
+ DTS ⚡️ Build success in 4648ms
14
+ DTS dist/index.d.ts 461.44 KB
15
15
 
16
- > @botpress/client@0.38.2 build:node /home/runner/work/botpress/botpress/packages/client
16
+ > @botpress/client@0.39.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.38.2 build:browser /home/runner/work/botpress/botpress/packages/client
21
+ > @botpress/client@0.39.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.38.2 build:bundle /home/runner/work/botpress/botpress/packages/client
26
+ > @botpress/client@0.39.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.38.2 generate /home/runner/work/botpress/botpress/packages/client
2
+ > @botpress/client@0.39.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 r=new this(t);return s.forEach(n=>r.set(n)),r}static accessor(t){let r=(this[Rn]=this[Rn]={accessors:{}}).accessors,n=this.prototype;function o(p){let i=dt(p);r[i]||(Ef(n,p),r[i]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};Ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors(Ke.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[s]=r}}});l.freezeMethods(Ke);var D=Ke;function mt(e,t){let s=this||$e,r=t||s,n=D.from(r.headers),o=r.data;return l.forEach(e,function(i){o=i.call(s,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function gt(e){return!!(e&&e.__CANCEL__)}function qn(e,t,s){h.call(this,e??"canceled",h.ERR_CANCELED,t,s),this.name="CanceledError"}l.inherits(qn,h,{__CANCEL__:!0});var pe=qn;function ke(e,t,s){let r=s.config.validateStatus;!s.status||!r||r(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 cr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ur(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Ee(e,t){return e&&!cr(t)?ur(e,t):t}var no=G(kn(),1),oo=G(require("http"),1),io=G(require("https"),1),po=G(require("util"),1),co=G(jn(),1),ye=G(require("zlib"),1);var We="1.6.1";function ht(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var yy=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Rr(e,t,s){let r=s&&s.Blob||W.classes.Blob,n=ht(e);if(t===void 0&&r&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let o=yy.exec(e);if(!o)throw new h("Invalid URL",h.ERR_INVALID_URL);let p=o[1],i=o[2],a=o[3],u=Buffer.from(decodeURIComponent(a),i?"base64":"utf8");if(t){if(!r)throw new h("Blob is not supported",h.ERR_NOT_SUPPORT);return new r([u],{type:p})}return u}throw new h("Unsupported protocol "+n,h.ERR_NOT_SUPPORT)}var De=G(require("stream"),1);var Vn=G(require("stream"),1);function xy(e,t){let s=0,r=1e3/t,n=null;return function(p,i){let a=Date.now();if(p||a-s>r)return n&&(clearTimeout(n),n=null),s=a,e.apply(null,i);n||(n=setTimeout(()=>(n=null,s=Date.now(),e.apply(null,i)),r-(a-s)))}}var zn=xy;function hy(e,t){e=e||10;let s=new Array(e),r=new Array(e),n=0,o=0,p;return t=t!==void 0?t:1e3,function(a){let u=Date.now(),c=r[o];p||(p=u),s[n]=a,r[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 jt=hy;var zt=Symbol("internals"),qr=class extends Vn.default.Transform{constructor(t){t=l.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,a)=>!l.isUndefined(a[i])),super({readableHighWaterMark:t.chunkSize});let s=this,r=this[zt]={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=jt(r.ticksRate*t.samplesCount,r.timeWindow);this.on("newListener",i=>{i==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let o=0;r.updateProgress=zn(function(){let a=r.length,u=r.bytesSeen,c=u-o;if(!c||s.destroyed)return;let g=n(c);o=u,process.nextTick(()=>{s.emit("progress",{loaded:u,total:a,progress:a?u/a:void 0,bytes:c,rate:g||void 0,estimated:g&&a&&u<=a?(a-u)/g:void 0})})},r.ticksRate);let p=()=>{r.updateProgress(!0)};this.once("end",p),this.once("error",p)}_read(t){let s=this[zt];return s.onReadCallback&&s.onReadCallback(),super._read(t)}_transform(t,s,r){let n=this,o=this[zt],p=o.maxRate,i=this.readableHighWaterMark,a=o.timeWindow,u=1e3/a,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,T,B=0;if(p){let U=Date.now();(!o.ts||(B=U-o.ts)>=a)&&(o.ts=U,T=c-o.bytes,o.bytes=T<0?-T:0,B=0),T=c-o.bytes}if(p){if(T<=0)return setTimeout(()=>{x(null,f)},a-B);T<P&&(P=T)}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 r(x);v?b(v,f):r(null)})}setLength(t){return this[zt].length=+t,this}},vr=qr;var uo=G(require("events"),1);var Kn=require("util"),Jn=require("stream");var{asyncIterator:$n}=Symbol,by=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[$n]?yield*e[$n]():yield e},Vt=by;var Ry=l.ALPHABET.ALPHA_DIGIT+"-_",bt=new Kn.TextEncoder,we=`\r
12
12
  `,qy=bt.encode(we),vy=2,kr=class{constructor(t,s){let{escapeName:r}=this.constructor,n=l.isString(s),o=`Content-Disposition: form-data; name="${r(t)}"${!n&&s.name?`; filename="${r(s.name)}"`:""}${we}`;n?s=bt.encode(String(s).replace(/\r?\n|\r\n?/g,we)):o+=`Content-Type: ${s.type||"application/octet-stream"}${we}`,this.headers=bt.encode(o+we),this.contentLength=n?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+vy,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;l.isTypedArray(t)?yield t:yield*Vt(t),yield qy}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},ky=(e,t,s)=>{let{tag:r="form-data-boundary",size:n=25,boundary:o=r+"-"+l.generateString(n,Ry)}=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=bt.encode("--"+o+we),i=bt.encode("--"+o+"--"+we+we),a=i.byteLength,u=Array.from(e.entries()).map(([g,y])=>{let b=new kr(g,y);return a+=b.size,b});a+=p.byteLength*u.length,a=l.toFiniteNumber(a);let c={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(a)&&(c["Content-Length"]=a),t&&t(c),Jn.Readable.from(async function*(){for(let g of u)yield p,yield*g.encode();yield i}())},Yn=ky;var Xn=G(require("stream"),1),Ir=class extends Xn.default.Transform{__transform(t,s,r){this.push(t),r()}_transform(t,s,r){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,r)}},Zn=Ir;var Iy=(e,t)=>l.isAsyncFn(e)?function(...s){let r=s.pop();e.apply(this,s).then(n=>{try{t?r(null,...t(n)):r(null,n)}catch(o){r(o)}},r)}:e,eo=Iy;var to={flush:ye.default.constants.Z_SYNC_FLUSH,finishFlush:ye.default.constants.Z_SYNC_FLUSH},wy={flush:ye.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ye.default.constants.BROTLI_OPERATION_FLUSH},so=l.isFunction(ye.default.createBrotliDecompress),{http:Py,https:Ty}=co.default,Ay=/https:?/,ro=W.protocols.map(e=>e+":");function Cy(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function lo(e,t,s){let r=t;if(!r&&r!==!1){let n=(0,no.getProxyForUrl)(s);n&&(r=new URL(n))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let o=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=r.hostname||r.host;e.hostname=n,e.host=n,e.port=r.port,e.path=s,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(o){lo(o,t,o.href)}}var By=typeof process<"u"&&l.kindOf(process)==="process",Uy=e=>new Promise((t,s)=>{let r,n,o=(a,u)=>{n||(n=!0,r&&r(a,u))},p=a=>{o(a),t(a)},i=a=>{o(a,!0),s(a)};e(p,i,a=>r=a).catch(i)}),Ly=({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)}},ao=(e,t)=>Ly(l.isObject(e)?e:{address:e,family:t}),mo=By&&function(t){return Uy(async function(r,n,o){let{data:p,lookup:i,family:a}=t,{responseType:u,responseEncoding:c}=t,g=t.method.toUpperCase(),y,b=!1,f;if(i){let I=eo(i,k=>l.isArray(k)?k:[k]);i=(k,_,Ne)=>{I(k,_,(V,qe,Fs)=>{let ue=l.isArray(qe)?qe.map(oe=>ao(oe)):[ao(qe,Fs)];_.all?Ne(V,ue):Ne(V,ue[0].address,ue[0].family)})}}let x=new uo.default,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(R),t.signal&&t.signal.removeEventListener("abort",R),x.removeAllListeners()};o((I,k)=>{y=!0,k&&(b=!0,v())});function R(I){x.emit("abort",!I||I.type?new pe(null,t,f):I)}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=Ee(t.baseURL,t.url),T=new URL(P,"http://localhost"),B=T.protocol||ro[0];if(B==="data:"){let I;if(g!=="GET")return ke(r,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{I=Rr(t.url,u==="blob",{Blob:t.env&&t.env.Blob})}catch(k){throw h.from(k,h.ERR_BAD_REQUEST,t)}return u==="text"?(I=I.toString(c),(!c||c==="utf8")&&(I=l.stripBOM(I))):u==="stream"&&(I=De.default.Readable.from(I)),ke(r,n,{data:I,status:200,statusText:"OK",headers:new D,config:t})}if(ro.indexOf(B)===-1)return n(new h("Unsupported protocol "+B,h.ERR_BAD_REQUEST,t));let U=D.from(t.headers).normalize();U.set("User-Agent","axios/"+We,!1);let Y=t.onDownloadProgress,X=t.onUploadProgress,Z=t.maxRate,z,ce;if(l.isSpecCompliantForm(p)){let I=U.getContentType(/boundary=([-_\w\d]{10,70})/i);p=Yn(p,k=>{U.set(k)},{tag:`axios-${We}-boundary`,boundary:I&&I[1]||void 0})}else if(l.isFormData(p)&&l.isFunction(p.getHeaders)){if(U.set(p.getHeaders()),!U.hasContentLength())try{let I=await po.default.promisify(p.getLength).call(p);Number.isFinite(I)&&I>=0&&U.setContentLength(I)}catch{}}else if(l.isBlob(p))p.size&&U.setContentType(p.type||"application/octet-stream"),U.setContentLength(p.size||0),p=De.default.Readable.from(Vt(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 ge=l.toFiniteNumber(U.getContentLength());l.isArray(Z)?(z=Z[0],ce=Z[1]):z=ce=Z,p&&(X||z)&&(l.isStream(p)||(p=De.default.Readable.from(p,{objectMode:!1})),p=De.default.pipeline([p,new vr({length:ge,maxRate:l.toFiniteNumber(z)})],l.noop),X&&p.on("progress",I=>{X(Object.assign(I,{upload:!0}))}));let re;if(t.auth){let I=t.auth.username||"",k=t.auth.password||"";re=I+":"+k}if(!re&&T.username){let I=T.username,k=T.password;re=I+":"+k}re&&U.delete("authorization");let ee;try{ee=Le(T.pathname+T.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(I){let k=new Error(I.message);return k.config=t,k.url=t.url,k.exists=!0,n(k)}U.set("Accept-Encoding","gzip, compress, deflate"+(so?", br":""),!1);let L={path:ee,method:g,headers:U.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:re,protocol:B,family:a,beforeRedirect:Cy,beforeRedirects:{}};!l.isUndefined(i)&&(L.lookup=i),t.socketPath?L.socketPath=t.socketPath:(L.hostname=T.hostname,L.port=T.port,lo(L,t.proxy,B+"//"+T.hostname+(T.port?":"+T.port:"")+L.path));let K,fe=Ay.test(L.protocol);if(L.agent=fe?t.httpsAgent:t.httpAgent,t.transport?K=t.transport:t.maxRedirects===0?K=fe?io.default:oo.default:(t.maxRedirects&&(L.maxRedirects=t.maxRedirects),t.beforeRedirect&&(L.beforeRedirects.config=t.beforeRedirect),K=fe?Ty:Py),t.maxBodyLength>-1?L.maxBodyLength=t.maxBodyLength:L.maxBodyLength=1/0,t.insecureHTTPParser&&(L.insecureHTTPParser=t.insecureHTTPParser),f=K.request(L,function(k){if(f.destroyed)return;let _=[k],Ne=+k.headers["content-length"];if(Y){let oe=new vr({length:l.toFiniteNumber(Ne),maxRate:l.toFiniteNumber(ce)});Y&&oe.on("progress",Ct=>{Y(Object.assign(Ct,{download:!0}))}),_.push(oe)}let V=k,qe=k.req||f;if(t.decompress!==!1&&k.headers["content-encoding"])switch((g==="HEAD"||k.statusCode===204)&&delete k.headers["content-encoding"],(k.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":_.push(ye.default.createUnzip(to)),delete k.headers["content-encoding"];break;case"deflate":_.push(new Zn),_.push(ye.default.createUnzip(to)),delete k.headers["content-encoding"];break;case"br":so&&(_.push(ye.default.createBrotliDecompress(wy)),delete k.headers["content-encoding"])}V=_.length>1?De.default.pipeline(_,l.noop):_[0];let Fs=De.default.finished(V,()=>{Fs(),v()}),ue={status:k.statusCode,statusText:k.statusMessage,headers:new D(k.headers),config:t,request:qe};if(u==="stream")ue.data=V,ke(r,n,ue);else{let oe=[],Ct=0;V.on("data",function($){oe.push($),Ct+=$.length,t.maxContentLength>-1&&Ct>t.maxContentLength&&(b=!0,V.destroy(),n(new h("maxContentLength size of "+t.maxContentLength+" exceeded",h.ERR_BAD_RESPONSE,t,qe)))}),V.on("aborted",function(){if(b)return;let $=new h("maxContentLength size of "+t.maxContentLength+" exceeded",h.ERR_BAD_RESPONSE,t,qe);V.destroy($),n($)}),V.on("error",function($){f.destroyed||n(h.from($,null,t,qe))}),V.on("end",function(){try{let $=oe.length===1?oe[0]:Buffer.concat(oe);u!=="arraybuffer"&&($=$.toString(c),(!c||c==="utf8")&&($=l.stripBOM($))),ue.data=$}catch($){return n(h.from($,null,t,ue.request,ue))}ke(r,n,ue)})}x.once("abort",oe=>{V.destroyed||(V.emit("error",oe),V.destroy())})}),x.once("abort",I=>{n(I),f.destroy(I)}),f.on("error",function(k){n(h.from(k,null,t,f))}),f.on("socket",function(k){k.setKeepAlive(!0,1e3*60)}),t.timeout){let I=parseInt(t.timeout,10);if(Number.isNaN(I)){n(new h("error trying to parse `config.timeout` to int",h.ERR_BAD_OPTION_VALUE,t,f));return}f.setTimeout(I,function(){if(y)return;let _=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Ne=t.transitional||Ve;t.timeoutErrorMessage&&(_=t.timeoutErrorMessage),n(new h(_,Ne.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,f)),R()})}if(l.isStream(p)){let I=!1,k=!1;p.on("end",()=>{I=!0}),p.once("error",_=>{k=!0,f.destroy(_)}),p.on("close",()=>{!I&&!k&&R(new pe("Request stream has been aborted",t,f))}),p.pipe(f)}else f.end(p)})};var go=W.hasStandardBrowserEnv?function(){return{write:function(s,r,n,o,p,i){let a=[];a.push(s+"="+encodeURIComponent(r)),l.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),l.isString(o)&&a.push("path="+o),l.isString(p)&&a.push("domain="+p),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(s){let r=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var fo=W.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),r;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 r=n(window.location.href),function(p){let i=l.isString(p)?n(p):p;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}();function yo(e,t){let s=0,r=jt(50,250);return n=>{let o=n.loaded,p=n.lengthComputable?n.total:void 0,i=o-s,a=r(i),u=o<=p;s=o;let c={loaded:o,total:p,progress:p?o/p:void 0,bytes:i,rate:a||void 0,estimated:a&&p&&u?(p-o)/a:void 0,event:n};c[t?"download":"upload"]=!0,e(c)}}var Ey=typeof XMLHttpRequest<"u",xo=Ey&&function(e){return new Promise(function(s,r){let n=e.data,o=D.from(e.headers).normalize(),p=e.responseType,i;function a(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}let u;if(l.isFormData(n)){if(W.hasStandardBrowserEnv||W.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=Ee(e.baseURL,e.url);c.open(e.method.toUpperCase(),Le(g,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function y(){if(!c)return;let f=D.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};ke(function(P){s(P),a()},function(P){r(P),a()},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&&(r(new h("Request aborted",h.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(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||Ve;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),r(new h(x,v.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,c)),c=null},W.hasStandardBrowserEnv){let f=fo(g)&&e.xsrfCookieName&&go.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",yo(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",yo(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=f=>{c&&(r(!f||f.type?new pe(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=ht(g);if(b&&W.protocols.indexOf(b)===-1){r(new h("Unsupported protocol "+b+":",h.ERR_BAD_REQUEST,e));return}c.send(n||null)})};var wr={http:mo,xhr:xo};l.forEach(wr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var ho=e=>`- ${e}`,_y=e=>l.isFunction(e)||e===null||e===!1,$t={getAdapter:e=>{e=l.isArray(e)?e:[e];let{length:t}=e,s,r,n={};for(let o=0;o<t;o++){s=e[o];let p;if(r=s,!_y(s)&&(r=wr[(p=String(s)).toLowerCase()],r===void 0))throw new h(`Unknown adapter '${p}'`);if(r)break;n[p||"#"+o]=r}if(!r){let o=Object.entries(n).map(([i,a])=>`adapter ${i} `+(a===!1?"is not supported by the environment":"is not available in the build")),p=t?o.length>1?`since :
13
13
  `+o.map(ho).join(`
14
- `):" "+ho(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:wr};function Pr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function Kt(e){return Pr(e),e.headers=D.from(e.headers),e.data=mt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$t.getAdapter(e.adapter||$e.adapter)(e).then(function(r){return Pr(e),r.data=mt.call(e,e.transformResponse,r),r.headers=D.from(r.headers),r},function(r){return gt(r)||(Pr(e),r&&r.response&&(r.response.data=mt.call(e,e.transformResponse,r.response),r.response.headers=D.from(r.response.headers))),Promise.reject(r)})}var bo=e=>e instanceof D?e.toJSON():e;function xe(e,t){t=t||{};let s={};function r(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 r(void 0,u,g)}else return r(u,c,g)}function o(u,c){if(!l.isUndefined(c))return r(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function i(u,c,g){if(g in t)return r(u,c);if(g in e)return r(void 0,u)}let a={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(bo(u),bo(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let g=a[c]||n,y=g(e[c],t[c],c);l.isUndefined(y)&&g!==i||(s[c]=y)}),s}var Tr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Ro={};Tr.transitional=function(t,s,r){function n(o,p){return"[Axios v"+We+"] Transitional option '"+o+"'"+p+(r?". "+r:"")}return(o,p,i)=>{if(t===!1)throw new h(n(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!Ro[p]&&(Ro[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 Sy(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),n=r.length;for(;n-- >0;){let o=r[n],p=t[o];if(p){let i=e[o],a=i===void 0||p(i,o,e);if(a!==!0)throw new h("option "+o+" must be "+a,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var Jt={assertOptions:Sy,validators:Tr};var Pe=Jt.validators,et=class{constructor(t){this.defaults=t,this.interceptors={request:new ar,response:new ar}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=xe(this.defaults,s);let{transitional:r,paramsSerializer:n,headers:o}=s;r!==void 0&&Jt.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),n!=null&&(l.isFunction(n)?s.paramsSerializer={serialize:n}:Jt.assertOptions(n,{encode:Pe.function,serialize:Pe.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=D.concat(p,o);let i=[],a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(a=a&&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(!a){let f=[Kt.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=Kt.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=xe(this.defaults,t);let s=Ee(t.baseURL,t.url);return Le(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){et.prototype[t]=function(s,r){return this.request(xe(r||{},{method:t,url:s,data:(r||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(r){return function(o,p,i){return this.request(xe(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}et.prototype[t]=s(),et.prototype[t+"Form"]=s(!0)});var Rt=et;var qt=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 r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o,p=new Promise(i=>{r.subscribe(i),o=i}).then(n);return p.cancel=function(){r.unsubscribe(o)},p},t(function(o,p,i){r.reason||(r.reason=new pe(o,p,i),s(r.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 qt(function(n){t=n}),cancel:t}}},qo=qt;function Ar(e){return function(s){return e.apply(null,s)}}function Cr(e){return l.isObject(e)&&e.isAxiosError===!0}var Br={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(Br).forEach(([e,t])=>{Br[t]=e});var vo=Br;function ko(e){let t=new Rt(e),s=ct(Rt.prototype.request,t);return l.extend(s,Rt.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(n){return ko(xe(e,n))},s}var S=ko($e);S.Axios=Rt;S.CanceledError=pe;S.CancelToken=qo;S.isCancel=gt;S.VERSION=We;S.toFormData=ve;S.AxiosError=h;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=Ar;S.isAxiosError=Cr;S.mergeConfig=xe;S.AxiosHeaders=D;S.formToJSON=e=>Ot(l.isHTMLForm(e)?new FormData(e):e);S.getAdapter=$t.getAdapter;S.HttpStatusCode=vo;S.default=S;var he=S;var{Axios:Gy,AxiosError:Wy,CanceledError:Dy,isCancel:Oy,CancelToken:Hy,VERSION:Fy,all:Qy,Cancel:My,isAxiosError:Ny,spread:jy,toFormData:zy,AxiosHeaders:Vy,HttpStatusCode:$y,formToJSON:Ky,getAdapter:Jy,mergeConfig:Yy}=he;var Gr={};Ut(Gr,{DEFAULT_OPTIONS:()=>Lo,default:()=>Sr,exponentialDelay:()=>Bo,isIdempotentRequestError:()=>Er,isNetworkError:()=>Lr,isNetworkOrIdempotentRequestError:()=>_r,isRetryableError:()=>Xt,isSafeRequestError:()=>Co,linearDelay:()=>Uo,namespace:()=>Yt,retryAfter:()=>Zt});var To=G(wo(),1),Yt="axios-retry";function Lr(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,To.default)(e)}var Ao=["get","head","options"],Zy=Ao.concat(["put","delete"]);function Xt(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function Co(e){return e.config?.method?Xt(e)&&Ao.indexOf(e.config.method)!==-1:!1}function Er(e){return e.config?.method?Xt(e)&&Zy.indexOf(e.config.method)!==-1:!1}function _r(e){return Lr(e)||Er(e)}function Zt(e=void 0){let t=e?.response?.headers["retry-after"];if(!t)return 0;let s=(Number(t)||0)*1e3;return s===0&&(s=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,s)}function ex(e=0,t=void 0){return Math.max(0,Zt(t))}function Bo(e=0,t=void 0,s=100){let r=2**e*s,n=Math.max(r,Zt(t)),o=n*.2*Math.random();return n+o}function Uo(e=100){return(t=0,s=void 0)=>{let r=t*e;return Math.max(r,Zt(s))}}var Lo={retries:3,retryCondition:_r,retryDelay:ex,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function tx(e,t){return{...Lo,...t,...e[Yt]}}function Po(e,t,s=!1){let r=tx(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||s)&&(r.lastRequestTime=Date.now()),e[Yt]=r,r}function sx(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function rx(e,t){let{retries:s,retryCondition:r}=e,n=(e.retryCount||0)<s&&r(t);if(typeof n=="object")try{return await n!==!1}catch{return!1}return n}async function ax(e,t,s,r){t.retryCount+=1;let{retryDelay:n,shouldResetTimeout:o,onRetry:p}=t,i=n(t.retryCount,s);if(sx(e,r),!o&&r.timeout&&t.lastRequestTime){let a=Date.now()-t.lastRequestTime,u=r.timeout-a-i;if(u<=0)return Promise.reject(s);r.timeout=u}return r.transformRequest=[a=>a],await p(t.retryCount,s,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(a=>{let u=()=>{clearTimeout(c),a(e(r))},c=setTimeout(()=>{a(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener("abort",u)},i);r.signal?.addEventListener&&r.signal.addEventListener("abort",u,{once:!0})})}async function nx(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var Te=(e,t)=>{let s=e.interceptors.request.use(n=>(Po(n,t,!0),n[Yt]?.validateResponse&&(n.validateStatus=()=>!1),n)),r=e.interceptors.response.use(null,async n=>{let{config:o}=n;if(!o)return Promise.reject(n);let p=Po(o,t);return n.response&&p.validateResponse?.(n.response)?n.response:await rx(p,n)?ax(e,p,n,o):(await nx(p,n),Promise.reject(n))});return{requestInterceptorId:s,responseInterceptorId:r}};Te.isNetworkError=Lr;Te.isSafeRequestError=Co;Te.isIdempotentRequestError=Er;Te.isNetworkOrIdempotentRequestError=_r;Te.exponentialDelay=Bo;Te.linearDelay=Uo;Te.isRetryableError=Xt;var Sr=Te;var Eo=G(require("crypto"));var ox={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Wr=typeof window<"u"&&typeof window.document<"u"?window.crypto:Eo.default;Wr.getRandomValues||(Wr=ox);var C=class extends Error{constructor(s,r,n,o,p,i){super(o);this.code=s;this.description=r;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(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(Wr.getRandomValues(new Uint8Array(n))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},ix=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,_o=e=>e instanceof C||ix(e)&&e.isApiError===!0,Ae=class extends C{constructor(t,s,r){super(500,"An unknown error occurred","Unknown",t,s,r)}},es=class extends C{constructor(t,s,r){super(500,"An internal error occurred","Internal",t,s,r)}},ts=class extends C{constructor(t,s,r){super(401,"The request requires to be authenticated.","Unauthorized",t,s,r)}},ss=class extends C{constructor(t,s,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,r)}},rs=class extends C{constructor(t,s,r){super(413,"The request payload is too large.","PayloadTooLarge",t,s,r)}},as=class extends C{constructor(t,s,r){super(400,"The request payload is invalid.","InvalidPayload",t,s,r)}},ns=class extends C{constructor(t,s,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,r)}},os=class extends C{constructor(t,s,r){super(405,"The requested method does not exist.","MethodNotFound",t,s,r)}},is=class extends C{constructor(t,s,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,r)}},ps=class extends C{constructor(t,s,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,r)}},cs=class extends C{constructor(t,s,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,r)}},us=class extends C{constructor(t,s,r){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,r)}},ls=class extends C{constructor(t,s,r){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,r)}},ds=class extends C{constructor(t,s,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,r)}},ms=class extends C{constructor(t,s,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,r)}},gs=class extends C{constructor(t,s,r){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,r)}},fs=class extends C{constructor(t,s,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,r)}},ys=class extends C{constructor(t,s,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,r)}},xs=class extends C{constructor(t,s,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,r)}},hs=class extends C{constructor(t,s,r){super(429,"The request has been rate limited.","RateLimited",t,s,r)}},bs=class extends C{constructor(t,s,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,r)}},Rs=class extends C{constructor(t,s,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,r)}},qs=class extends C{constructor(t,s,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,r)}},vs=class extends C{constructor(t,s,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,r)}},ks=class extends C{constructor(t,s,r){super(502,"The upstream provider returned an error or is currently unavailable.","UpstreamProvider",t,s,r)}},px={Unknown:Ae,Internal:es,Unauthorized:ts,Forbidden:ss,PayloadTooLarge:rs,InvalidPayload:as,UnsupportedMediaType:ns,MethodNotFound:os,ResourceNotFound:is,InvalidJsonSchema:ps,InvalidDataFormat:cs,InvalidIdentifier:us,RelationConflict:ls,ReferenceConstraint:ds,ResourceLockedConflict:ms,ReferenceNotFound:gs,InvalidQuery:fs,Runtime:ys,AlreadyExists:xs,RateLimited:hs,PaymentRequired:bs,QuotaExceeded:Rs,LimitExceeded:qs,BreakingChanges:vs,UpstreamProvider:ks},Is=e=>_o(e)?e:e instanceof Error?new Ae(e.message,e):typeof e=="string"?new Ae(e):cx(e);function cx(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=px[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Ae(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ae("An invalid error occurred: "+JSON.stringify(e))}var be=class extends Error{constructor(s,r,n){super(s);this.innerError=r;this.file=n;this.name="FileUploadError"}};var da=G(Dr()),Vm=G(require("http")),$m=G(require("https"));var vt=G(Dr()),xx="https://api.botpress.cloud",hx=6e4,bx="BP_API_URL",Rx="BP_BOT_ID",qx="BP_INTEGRATION_ID",vx="BP_WORKSPACE_ID",kx="BP_TOKEN";function So(e){let t=Ix(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 r=t.apiUrl??xx,n=t.timeout??hx;return{apiUrl:r,timeout:n,withCredentials:vt.isBrowser,headers:s}}function Ix(e){return vt.isBrowser?e:vt.isNode?wx(e):e}function wx(e){let t={...e,apiUrl:e.apiUrl??process.env[bx],botId:e.botId??process.env[Rx],integrationId:e.integrationId??process.env[qx],workspaceId:e.workspaceId??process.env[vx]},s=t.token??process.env[kx];return s&&(t.token=s),t}var Rp=G(bp()),Pb=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:r,headers:n,body:o}=e,p=Object.entries(n).filter(Pb),i=Object.fromEntries(p),a=Rp.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=a?[s,a].join("?"):s;return{method:t,url:u,headers:i,data:o}};var qp=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var kp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var wp=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,channel:e.channel},params:{},body:{}});var Tp=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Cp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Up=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ep=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Sp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Wp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Op=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Fp=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 Mp=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var jp=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 Vp=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 Kp=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 Yp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var tc=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var rc=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var nc=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var ic=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var cc=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var lc=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 mc=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 fc=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var xc=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/expiry`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{expiry:e.expiry}});var bc=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 qc=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 kc=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 wc=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 Tc=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Cc=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Uc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ec=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 Sc=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 Wc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Oc=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 Fc=e=>({path:"/v1/chat/workflows",headers:{},query:{},params:{},body:{name:e.name,input:e.input,parentWorkflowId:e.parentWorkflowId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags,status:e.status,eventId:e.eventId}});var Mc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var jc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{output:e.output,timeoutAt:e.timeoutAt,status:e.status,failureReason:e.failureReason,tags:e.tags,userId:e.userId,eventId:e.eventId}});var Vc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Kc=e=>({path:"/v1/chat/workflows",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentWorkflowId:e.parentWorkflowId,statuses:e.statuses,name:e.name},params:{},body:{}});var Yc=e=>({path:"/v1/chat/workflows/get-or-create",headers:{},query:{},params:{},body:{name:e.name,input:e.input,parentWorkflowId:e.parentWorkflowId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags,status:e.status,eventId:e.eventId}});var Zc=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var tu=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var ru=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var nu=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var iu=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var cu=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var lu=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var mu=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var fu=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var xu=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var bu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var qu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var ku=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,tags:e.tags,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var wu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,tags:e.tags,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 Tu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var Cu=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var Uu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Eu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Su=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 Wu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ou=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Fu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Mu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var ju=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Vu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Ku=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var Yu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var Zu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var tl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var rl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var nl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var il=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var cl=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var ll=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var ml=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var fl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var xl=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 bl=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var ql=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var kl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var wl=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 Tl=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Cl=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Ul=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var El=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Sl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Wl=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Ol=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Fl=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ml=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var jl=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var Vl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Kl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Yl=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zl=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,configurations:e.configurations,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,interfaces:e.interfaces,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 td=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,configurations:e.configurations,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 rd=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var nd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var id=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 cd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var ld=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var md=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var fd=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,entities:e.entities,events:e.events,actions:e.actions,channels:e.channels,nameTemplate:e.nameTemplate}});var xd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var bd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var qd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{entities:e.entities,events:e.events,actions:e.actions,channels:e.channels,nameTemplate:e.nameTemplate}});var kd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var wd=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Td=e=>({path:"/v1/admin/plugins",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,code:e.code}});var Cd=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ud=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Ed=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,code:e.code}});var Sd=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Wd=e=>({path:"/v1/admin/plugins",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Od=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Fd=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var Md=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var jd=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/activity`,headers:{},query:{type:e.type,nextToken:e.nextToken},params:{id:e.id},body:{}});var Vd=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Kd=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Yd=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Zd=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,indexing:e.indexing,accessPolicies:e.accessPolicies,contentType:e.contentType,expiresAt:e.expiresAt,publicContentImmediatelyAccessible:e.publicContentImmediatelyAccessible,metadata:e.metadata}});var tm=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rm=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags,ids:e.ids},params:{},body:{}});var nm=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var im=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{metadata:e.metadata,tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}});var cm=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,consolidate:e.consolidate,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}});var lm=e=>({path:`/v1/files/${encodeURIComponent(e.id)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{id:e.id},body:{}});var mm=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var fm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var xm=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 bm=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 qm=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 km=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/export`,headers:{},query:{format:e.format,compress:e.compress},params:{table:e.table},body:{}});var wm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/jobs`,headers:{},query:{},params:{table:e.table},body:{}});var Tm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/import`,headers:{},query:{},params:{table:e.table},body:{fileId:e.fileId}});var Cm=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 Um=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var Em=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Sm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var Wm=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 Om=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Fm=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 Mm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var jm=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 Os=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:r,query:n,body:o}=qp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getConversation=async t=>{let{path:s,headers:r,query:n,body:o}=kp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listConversations=async t=>{let{path:s,headers:r,query:n,body:o}=wp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateConversation=async t=>{let{path:s,headers:r,query:n,body:o}=Tp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateConversation=async t=>{let{path:s,headers:r,query:n,body:o}=Cp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteConversation=async t=>{let{path:s,headers:r,query:n,body:o}=Up(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listParticipants=async t=>{let{path:s,headers:r,query:n,body:o}=Ep(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};addParticipant=async t=>{let{path:s,headers:r,query:n,body:o}=Sp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getParticipant=async t=>{let{path:s,headers:r,query:n,body:o}=Wp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};removeParticipant=async t=>{let{path:s,headers:r,query:n,body:o}=Op(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createEvent=async t=>{let{path:s,headers:r,query:n,body:o}=Fp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getEvent=async t=>{let{path:s,headers:r,query:n,body:o}=Mp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listEvents=async t=>{let{path:s,headers:r,query:n,body:o}=jp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Vp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Kp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Yp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Zp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listMessages=async t=>{let{path:s,headers:r,query:n,body:o}=tc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteMessage=async t=>{let{path:s,headers:r,query:n,body:o}=rc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createUser=async t=>{let{path:s,headers:r,query:n,body:o}=nc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getUser=async t=>{let{path:s,headers:r,query:n,body:o}=ic(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listUsers=async t=>{let{path:s,headers:r,query:n,body:o}=cc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateUser=async t=>{let{path:s,headers:r,query:n,body:o}=lc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateUser=async t=>{let{path:s,headers:r,query:n,body:o}=mc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteUser=async t=>{let{path:s,headers:r,query:n,body:o}=fc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};setStateExpiry=async t=>{let{path:s,headers:r,query:n,body:o}=xc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getState=async t=>{let{path:s,headers:r,query:n,body:o}=bc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};setState=async t=>{let{path:s,headers:r,query:n,body:o}=qc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrSetState=async t=>{let{path:s,headers:r,query:n,body:o}=kc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};patchState=async t=>{let{path:s,headers:r,query:n,body:o}=wc(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};callAction=async t=>{let{path:s,headers:r,query:n,body:o}=Tc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};configureIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=Cc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTask=async t=>{let{path:s,headers:r,query:n,body:o}=Uc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createTask=async t=>{let{path:s,headers:r,query:n,body:o}=Ec(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateTask=async t=>{let{path:s,headers:r,query:n,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteTask=async t=>{let{path:s,headers:r,query:n,body:o}=Wc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listTasks=async t=>{let{path:s,headers:r,query:n,body:o}=Oc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Fc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Mc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=jc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Vc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkflows=async t=>{let{path:s,headers:r,query:n,body:o}=Kc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Yc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};trackAnalytics=async t=>{let{path:s,headers:r,query:n,body:o}=Zc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};runVrl=async t=>{let{path:s,headers:r,query:n,body:o}=tu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAccount=async t=>{let{path:s,headers:r,query:n,body:o}=ru(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateAccount=async t=>{let{path:s,headers:r,query:n,body:o}=nu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPersonalAccessTokens=async t=>{let{path:s,headers:r,query:n,body:o}=iu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createPersonalAccessToken=async t=>{let{path:s,headers:r,query:n,body:o}=cu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deletePersonalAccessToken=async t=>{let{path:s,headers:r,query:n,body:o}=lu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};setAccountPreference=async t=>{let{path:s,headers:r,query:n,body:o}=mu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAccountPreference=async t=>{let{path:s,headers:r,query:n,body:o}=fu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPublicIntegrations=async t=>{let{path:s,headers:r,query:n,body:o}=xu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPublicIntegrationById=async t=>{let{path:s,headers:r,query:n,body:o}=bu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPublicIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=qu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createBot=async t=>{let{path:s,headers:r,query:n,body:o}=ku(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateBot=async t=>{let{path:s,headers:r,query:n,body:o}=wu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};transferBot=async t=>{let{path:s,headers:r,query:n,body:o}=Tu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBots=async t=>{let{path:s,headers:r,query:n,body:o}=Cu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBot=async t=>{let{path:s,headers:r,query:n,body:o}=Uu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteBot=async t=>{let{path:s,headers:r,query:n,body:o}=Eu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotLogs=async t=>{let{path:s,headers:r,query:n,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotWebchat=async t=>{let{path:s,headers:r,query:n,body:o}=Wu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotAnalytics=async t=>{let{path:s,headers:r,query:n,body:o}=Ou(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotIssue=async t=>{let{path:s,headers:r,query:n,body:o}=Fu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBotIssues=async t=>{let{path:s,headers:r,query:n,body:o}=Mu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteBotIssue=async t=>{let{path:s,headers:r,query:n,body:o}=ju(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBotIssueEvents=async t=>{let{path:s,headers:r,query:n,body:o}=Vu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBotVersions=async t=>{let{path:s,headers:r,query:n,body:o}=Ku(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotVersion=async t=>{let{path:s,headers:r,query:n,body:o}=Yu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createBotVersion=async t=>{let{path:s,headers:r,query:n,body:o}=Zu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deployBotVersion=async t=>{let{path:s,headers:r,query:n,body:o}=tl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceInvoices=async t=>{let{path:s,headers:r,query:n,body:o}=rl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getUpcomingInvoice=async t=>{let{path:s,headers:r,query:n,body:o}=nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:r,query:n,body:o}=il(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=cl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPublicWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=ll(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=ml(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceUsages=async t=>{let{path:s,headers:r,query:n,body:o}=fl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:r,query:n,body:o}=xl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:r,query:n,body:o}=bl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkspaceQuota=async t=>{let{path:s,headers:r,query:n,body:o}=ql(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceQuotas=async t=>{let{path:s,headers:r,query:n,body:o}=kl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=wl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};checkHandleAvailability=async t=>{let{path:s,headers:r,query:n,body:o}=Tl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaces=async t=>{let{path:s,headers:r,query:n,body:o}=Cl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPublicWorkspaces=async t=>{let{path:s,headers:r,query:n,body:o}=Ul(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=El(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAuditRecords=async t=>{let{path:s,headers:r,query:n,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceMembers=async t=>{let{path:s,headers:r,query:n,body:o}=Wl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=Ol(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=Fl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=Ml(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=jl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listIntegrationApiKeys=async t=>{let{path:s,headers:r,query:n,body:o}=Vl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createIntegrationApiKey=async t=>{let{path:s,headers:r,query:n,body:o}=Kl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:r,query:n,body:o}=Yl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=Zl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=td(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listIntegrations=async t=>{let{path:s,headers:r,query:n,body:o}=rd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=nd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getIntegrationLogs=async t=>{let{path:s,headers:r,query:n,body:o}=id(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getIntegrationByName=async t=>{let{path:s,headers:r,query:n,body:o}=cd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=ld(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};requestIntegrationVerification=async t=>{let{path:s,headers:r,query:n,body:o}=md(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createInterface=async t=>{let{path:s,headers:r,query:n,body:o}=fd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getInterface=async t=>{let{path:s,headers:r,query:n,body:o}=xd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getInterfaceByName=async t=>{let{path:s,headers:r,query:n,body:o}=bd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateInterface=async t=>{let{path:s,headers:r,query:n,body:o}=qd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteInterface=async t=>{let{path:s,headers:r,query:n,body:o}=kd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listInterfaces=async t=>{let{path:s,headers:r,query:n,body:o}=wd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createPlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Td(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Cd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPluginByName=async t=>{let{path:s,headers:r,query:n,body:o}=Ud(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updatePlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Ed(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deletePlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Sd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPlugins=async t=>{let{path:s,headers:r,query:n,body:o}=Wd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getUsage=async t=>{let{path:s,headers:r,query:n,body:o}=Od(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getMultipleUsages=async t=>{let{path:s,headers:r,query:n,body:o}=Fd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listUsageHistory=async t=>{let{path:s,headers:r,query:n,body:o}=Md(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listUsageActivity=async t=>{let{path:s,headers:r,query:n,body:o}=jd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};changeAISpendQuota=async t=>{let{path:s,headers:r,query:n,body:o}=Vd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listActivities=async t=>{let{path:s,headers:r,query:n,body:o}=Kd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};introspect=async t=>{let{path:s,headers:r,query:n,body:o}=Yd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};upsertFile=async t=>{let{path:s,headers:r,query:n,body:o}=Zd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteFile=async t=>{let{path:s,headers:r,query:n,body:o}=tm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listFiles=async t=>{let{path:s,headers:r,query:n,body:o}=rm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getFile=async t=>{let{path:s,headers:r,query:n,body:o}=nm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateFileMetadata=async t=>{let{path:s,headers:r,query:n,body:o}=im(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};searchFiles=async t=>{let{path:s,headers:r,query:n,body:o}=cm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listFilePassages=async t=>{let{path:s,headers:r,query:n,body:o}=lm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listTables=async t=>{let{path:s,headers:r,query:n,body:o}=mm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTable=async t=>{let{path:s,headers:r,query:n,body:o}=fm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateTable=async t=>{let{path:s,headers:r,query:n,body:o}=xm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createTable=async t=>{let{path:s,headers:r,query:n,body:o}=bm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};duplicateTable=async t=>{let{path:s,headers:r,query:n,body:o}=qm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};exportTable=async t=>{let{path:s,headers:r,query:n,body:o}=km(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTableJobs=async t=>{let{path:s,headers:r,query:n,body:o}=wm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};importTable=async t=>{let{path:s,headers:r,query:n,body:o}=Tm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateTable=async t=>{let{path:s,headers:r,query:n,body:o}=Cm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};renameTableColumn=async t=>{let{path:s,headers:r,query:n,body:o}=Um(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteTable=async t=>{let{path:s,headers:r,query:n,body:o}=Em(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTableRow=async t=>{let{path:s,headers:r,query:n,body:o}=Sm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};findTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Wm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Om(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Fm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Mm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};upsertTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=jm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})}};function m(e){return he.isAxiosError(e)&&e.response?.data?Is(e.response.data):Is(e)}var O=class{constructor(t){this._list=t}async*[Symbol.asyncIterator](){let t;do{let{items:s,meta:r}=await this._list({nextToken:t});t=r.nextToken;for(let n of s)yield n}while(t)}async collect(t={}){let s=t.limit??Number.POSITIVE_INFINITY,r=[],n=0;for await(let o of this)if(r.push(o),n++,n>=s)break;return r}},Hs=class{constructor(t){this._client=t}conversations=t=>new O(({nextToken:s})=>this._client.listConversations({nextToken:s,...t}).then(r=>({...r,items:r.conversations})));participants=t=>new O(({nextToken:s})=>this._client.listParticipants({nextToken:s,...t}).then(r=>({...r,items:r.participants})));events=t=>new O(({nextToken:s})=>this._client.listEvents({nextToken:s,...t}).then(r=>({...r,items:r.events})));messages=t=>new O(({nextToken:s})=>this._client.listMessages({nextToken:s,...t}).then(r=>({...r,items:r.messages})));users=t=>new O(({nextToken:s})=>this._client.listUsers({nextToken:s,...t}).then(r=>({...r,items:r.users})));tasks=t=>new O(({nextToken:s})=>this._client.listTasks({nextToken:s,...t}).then(r=>({...r,items:r.tasks})));publicIntegrations=t=>new O(({nextToken:s})=>this._client.listPublicIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));bots=t=>new O(({nextToken:s})=>this._client.listBots({nextToken:s,...t}).then(r=>({...r,items:r.bots})));botIssues=t=>new O(({nextToken:s})=>this._client.listBotIssues({nextToken:s,...t}).then(r=>({...r,items:r.issues})));workspaces=t=>new O(({nextToken:s})=>this._client.listWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));publicWorkspaces=t=>new O(({nextToken:s})=>this._client.listPublicWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));workspaceMembers=t=>new O(({nextToken:s})=>this._client.listWorkspaceMembers({nextToken:s,...t}).then(r=>({...r,items:r.members})));integrations=t=>new O(({nextToken:s})=>this._client.listIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));interfaces=t=>new O(({nextToken:s})=>this._client.listInterfaces({nextToken:s,...t}).then(r=>({...r,items:r.interfaces})));activities=t=>new O(({nextToken:s})=>this._client.listActivities({nextToken:s,...t}).then(r=>({...r,items:r.activities})));files=t=>new O(({nextToken:s})=>this._client.listFiles({nextToken:s,...t}).then(r=>({...r,items:r.files})));filePassages=t=>new O(({nextToken:s})=>this._client.listFilePassages({nextToken:s,...t}).then(r=>({...r,items:r.passages})))};var Km=100*1024*1024,Ab=Km,Cb=Km,ma=class extends Os{config;constructor(t={}){let s=So(t),{apiUrl:r,headers:n,withCredentials:o,timeout:p}=s,i=he.create({baseURL:r,headers:n,withCredentials:o,timeout:p,maxBodyLength:Ab,maxContentLength:Cb,httpAgent:da.isNode?new Vm.default.Agent({keepAlive:!0}):void 0,httpsAgent:da.isNode?new $m.default.Agent({keepAlive:!0}):void 0});super(i),t.retry&&Sr(i,t.retry),this.config=s}get list(){return new Hs(this)}uploadFile=async({key:t,index:s,tags:r,contentType:n,accessPolicies:o,content:p,url:i,indexing:a,expiresAt:u,publicContentImmediatelyAccessible:c})=>{if(i&&p)throw new be("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await he.get(i,{responseType:"arraybuffer"}).then(x=>x.data).catch(x=>{throw new be(`Failed to download file from provided URL: ${x.message}`,x)})),!p)throw new be("No content was provided for the file");let g,y;if(typeof p=="string"){let v=new TextEncoder().encode(p);g=v,y=v.byteLength}else if(p instanceof Uint8Array)g=p,y=g.byteLength;else if(p instanceof ArrayBuffer)g=p,y=g.byteLength;else if(p instanceof Blob)g=p,y=p.size;else throw new be("The provided content is not supported");let{file:b}=await this.upsertFile({key:t,tags:r,index:s,accessPolicies:o,contentType:n,size:y,expiresAt:u,indexing:a,publicContentImmediatelyAccessible:c}),f={"Content-Type":b.contentType};c&&(f["x-amz-tagging"]="public=true");try{await he.put(b.uploadUrl,g,{maxBodyLength:1/0,headers:f})}catch(x){throw new be(`Failed to upload file: ${x.message}`,x,b)}return{file:{...b,size:y}}}};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,UpstreamProviderError,axios,axiosRetry,errorFrom,isApiError});
14
+ `):" "+ho(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:wr};function Pr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function Kt(e){return Pr(e),e.headers=D.from(e.headers),e.data=mt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$t.getAdapter(e.adapter||$e.adapter)(e).then(function(r){return Pr(e),r.data=mt.call(e,e.transformResponse,r),r.headers=D.from(r.headers),r},function(r){return gt(r)||(Pr(e),r&&r.response&&(r.response.data=mt.call(e,e.transformResponse,r.response),r.response.headers=D.from(r.response.headers))),Promise.reject(r)})}var bo=e=>e instanceof D?e.toJSON():e;function xe(e,t){t=t||{};let s={};function r(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 r(void 0,u,g)}else return r(u,c,g)}function o(u,c){if(!l.isUndefined(c))return r(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function i(u,c,g){if(g in t)return r(u,c);if(g in e)return r(void 0,u)}let a={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(bo(u),bo(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let g=a[c]||n,y=g(e[c],t[c],c);l.isUndefined(y)&&g!==i||(s[c]=y)}),s}var Tr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Ro={};Tr.transitional=function(t,s,r){function n(o,p){return"[Axios v"+We+"] Transitional option '"+o+"'"+p+(r?". "+r:"")}return(o,p,i)=>{if(t===!1)throw new h(n(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!Ro[p]&&(Ro[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 Sy(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),n=r.length;for(;n-- >0;){let o=r[n],p=t[o];if(p){let i=e[o],a=i===void 0||p(i,o,e);if(a!==!0)throw new h("option "+o+" must be "+a,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var Jt={assertOptions:Sy,validators:Tr};var Pe=Jt.validators,et=class{constructor(t){this.defaults=t,this.interceptors={request:new ar,response:new ar}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=xe(this.defaults,s);let{transitional:r,paramsSerializer:n,headers:o}=s;r!==void 0&&Jt.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),n!=null&&(l.isFunction(n)?s.paramsSerializer={serialize:n}:Jt.assertOptions(n,{encode:Pe.function,serialize:Pe.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=D.concat(p,o);let i=[],a=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(a=a&&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(!a){let f=[Kt.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=Kt.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=xe(this.defaults,t);let s=Ee(t.baseURL,t.url);return Le(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){et.prototype[t]=function(s,r){return this.request(xe(r||{},{method:t,url:s,data:(r||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(r){return function(o,p,i){return this.request(xe(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}et.prototype[t]=s(),et.prototype[t+"Form"]=s(!0)});var Rt=et;var qt=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 r=this;this.promise.then(n=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](n);r._listeners=null}),this.promise.then=n=>{let o,p=new Promise(i=>{r.subscribe(i),o=i}).then(n);return p.cancel=function(){r.unsubscribe(o)},p},t(function(o,p,i){r.reason||(r.reason=new pe(o,p,i),s(r.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 qt(function(n){t=n}),cancel:t}}},qo=qt;function Ar(e){return function(s){return e.apply(null,s)}}function Cr(e){return l.isObject(e)&&e.isAxiosError===!0}var Br={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(Br).forEach(([e,t])=>{Br[t]=e});var vo=Br;function ko(e){let t=new Rt(e),s=ct(Rt.prototype.request,t);return l.extend(s,Rt.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(n){return ko(xe(e,n))},s}var S=ko($e);S.Axios=Rt;S.CanceledError=pe;S.CancelToken=qo;S.isCancel=gt;S.VERSION=We;S.toFormData=ve;S.AxiosError=h;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=Ar;S.isAxiosError=Cr;S.mergeConfig=xe;S.AxiosHeaders=D;S.formToJSON=e=>Ot(l.isHTMLForm(e)?new FormData(e):e);S.getAdapter=$t.getAdapter;S.HttpStatusCode=vo;S.default=S;var he=S;var{Axios:Gy,AxiosError:Wy,CanceledError:Dy,isCancel:Oy,CancelToken:Hy,VERSION:Fy,all:Qy,Cancel:My,isAxiosError:Ny,spread:jy,toFormData:zy,AxiosHeaders:Vy,HttpStatusCode:$y,formToJSON:Ky,getAdapter:Jy,mergeConfig:Yy}=he;var Gr={};Ut(Gr,{DEFAULT_OPTIONS:()=>Lo,default:()=>Sr,exponentialDelay:()=>Bo,isIdempotentRequestError:()=>Er,isNetworkError:()=>Lr,isNetworkOrIdempotentRequestError:()=>_r,isRetryableError:()=>Xt,isSafeRequestError:()=>Co,linearDelay:()=>Uo,namespace:()=>Yt,retryAfter:()=>Zt});var To=G(wo(),1),Yt="axios-retry";function Lr(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,To.default)(e)}var Ao=["get","head","options"],Zy=Ao.concat(["put","delete"]);function Xt(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function Co(e){return e.config?.method?Xt(e)&&Ao.indexOf(e.config.method)!==-1:!1}function Er(e){return e.config?.method?Xt(e)&&Zy.indexOf(e.config.method)!==-1:!1}function _r(e){return Lr(e)||Er(e)}function Zt(e=void 0){let t=e?.response?.headers["retry-after"];if(!t)return 0;let s=(Number(t)||0)*1e3;return s===0&&(s=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,s)}function ex(e=0,t=void 0){return Math.max(0,Zt(t))}function Bo(e=0,t=void 0,s=100){let r=2**e*s,n=Math.max(r,Zt(t)),o=n*.2*Math.random();return n+o}function Uo(e=100){return(t=0,s=void 0)=>{let r=t*e;return Math.max(r,Zt(s))}}var Lo={retries:3,retryCondition:_r,retryDelay:ex,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function tx(e,t){return{...Lo,...t,...e[Yt]}}function Po(e,t,s=!1){let r=tx(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||s)&&(r.lastRequestTime=Date.now()),e[Yt]=r,r}function sx(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function rx(e,t){let{retries:s,retryCondition:r}=e,n=(e.retryCount||0)<s&&r(t);if(typeof n=="object")try{return await n!==!1}catch{return!1}return n}async function ax(e,t,s,r){t.retryCount+=1;let{retryDelay:n,shouldResetTimeout:o,onRetry:p}=t,i=n(t.retryCount,s);if(sx(e,r),!o&&r.timeout&&t.lastRequestTime){let a=Date.now()-t.lastRequestTime,u=r.timeout-a-i;if(u<=0)return Promise.reject(s);r.timeout=u}return r.transformRequest=[a=>a],await p(t.retryCount,s,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(a=>{let u=()=>{clearTimeout(c),a(e(r))},c=setTimeout(()=>{a(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener("abort",u)},i);r.signal?.addEventListener&&r.signal.addEventListener("abort",u,{once:!0})})}async function nx(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var Te=(e,t)=>{let s=e.interceptors.request.use(n=>(Po(n,t,!0),n[Yt]?.validateResponse&&(n.validateStatus=()=>!1),n)),r=e.interceptors.response.use(null,async n=>{let{config:o}=n;if(!o)return Promise.reject(n);let p=Po(o,t);return n.response&&p.validateResponse?.(n.response)?n.response:await rx(p,n)?ax(e,p,n,o):(await nx(p,n),Promise.reject(n))});return{requestInterceptorId:s,responseInterceptorId:r}};Te.isNetworkError=Lr;Te.isSafeRequestError=Co;Te.isIdempotentRequestError=Er;Te.isNetworkOrIdempotentRequestError=_r;Te.exponentialDelay=Bo;Te.linearDelay=Uo;Te.isRetryableError=Xt;var Sr=Te;var Eo=G(require("crypto"));var ox={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Wr=typeof window<"u"&&typeof window.document<"u"?window.crypto:Eo.default;Wr.getRandomValues||(Wr=ox);var C=class extends Error{constructor(s,r,n,o,p,i){super(o);this.code=s;this.description=r;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(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(Wr.getRandomValues(new Uint8Array(n))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},ix=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,_o=e=>e instanceof C||ix(e)&&e.isApiError===!0,Ae=class extends C{constructor(t,s,r){super(500,"An unknown error occurred","Unknown",t,s,r)}},es=class extends C{constructor(t,s,r){super(500,"An internal error occurred","Internal",t,s,r)}},ts=class extends C{constructor(t,s,r){super(401,"The request requires to be authenticated.","Unauthorized",t,s,r)}},ss=class extends C{constructor(t,s,r){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,r)}},rs=class extends C{constructor(t,s,r){super(413,"The request payload is too large.","PayloadTooLarge",t,s,r)}},as=class extends C{constructor(t,s,r){super(400,"The request payload is invalid.","InvalidPayload",t,s,r)}},ns=class extends C{constructor(t,s,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,r)}},os=class extends C{constructor(t,s,r){super(405,"The requested method does not exist.","MethodNotFound",t,s,r)}},is=class extends C{constructor(t,s,r){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,r)}},ps=class extends C{constructor(t,s,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,r)}},cs=class extends C{constructor(t,s,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,r)}},us=class extends C{constructor(t,s,r){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,r)}},ls=class extends C{constructor(t,s,r){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,r)}},ds=class extends C{constructor(t,s,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,r)}},ms=class extends C{constructor(t,s,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,r)}},gs=class extends C{constructor(t,s,r){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,r)}},fs=class extends C{constructor(t,s,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,r)}},ys=class extends C{constructor(t,s,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,r)}},xs=class extends C{constructor(t,s,r){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,r)}},hs=class extends C{constructor(t,s,r){super(429,"The request has been rate limited.","RateLimited",t,s,r)}},bs=class extends C{constructor(t,s,r){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,r)}},Rs=class extends C{constructor(t,s,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,r)}},qs=class extends C{constructor(t,s,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,r)}},vs=class extends C{constructor(t,s,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,r)}},ks=class extends C{constructor(t,s,r){super(424,"The upstream provider returned an error or is currently unavailable.","UpstreamProvider",t,s,r)}},px={Unknown:Ae,Internal:es,Unauthorized:ts,Forbidden:ss,PayloadTooLarge:rs,InvalidPayload:as,UnsupportedMediaType:ns,MethodNotFound:os,ResourceNotFound:is,InvalidJsonSchema:ps,InvalidDataFormat:cs,InvalidIdentifier:us,RelationConflict:ls,ReferenceConstraint:ds,ResourceLockedConflict:ms,ReferenceNotFound:gs,InvalidQuery:fs,Runtime:ys,AlreadyExists:xs,RateLimited:hs,PaymentRequired:bs,QuotaExceeded:Rs,LimitExceeded:qs,BreakingChanges:vs,UpstreamProvider:ks},Is=e=>_o(e)?e:e instanceof Error?new Ae(e.message,e):typeof e=="string"?new Ae(e):cx(e);function cx(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=px[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Ae(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ae("An invalid error occurred: "+JSON.stringify(e))}var be=class extends Error{constructor(s,r,n){super(s);this.innerError=r;this.file=n;this.name="FileUploadError"}};var da=G(Dr()),Vm=G(require("http")),$m=G(require("https"));var vt=G(Dr()),xx="https://api.botpress.cloud",hx=6e4,bx="BP_API_URL",Rx="BP_BOT_ID",qx="BP_INTEGRATION_ID",vx="BP_WORKSPACE_ID",kx="BP_TOKEN";function So(e){let t=Ix(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 r=t.apiUrl??xx,n=t.timeout??hx;return{apiUrl:r,timeout:n,withCredentials:vt.isBrowser,headers:s}}function Ix(e){return vt.isBrowser?e:vt.isNode?wx(e):e}function wx(e){let t={...e,apiUrl:e.apiUrl??process.env[bx],botId:e.botId??process.env[Rx],integrationId:e.integrationId??process.env[qx],workspaceId:e.workspaceId??process.env[vx]},s=t.token??process.env[kx];return s&&(t.token=s),t}var Rp=G(bp()),Pb=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:r,headers:n,body:o}=e,p=Object.entries(n).filter(Pb),i=Object.fromEntries(p),a=Rp.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=a?[s,a].join("?"):s;return{method:t,url:u,headers:i,data:o}};var qp=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var kp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var wp=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,channel:e.channel},params:{},body:{}});var Tp=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Cp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Up=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ep=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Sp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Wp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Op=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Fp=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 Mp=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var jp=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 Vp=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 Kp=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 Yp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var tc=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var rc=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var nc=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var ic=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var cc=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var lc=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 mc=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 fc=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var xc=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/expiry`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{expiry:e.expiry}});var bc=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 qc=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 kc=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 wc=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 Tc=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Cc=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Uc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ec=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 Sc=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 Wc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Oc=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 Fc=e=>({path:"/v1/chat/workflows",headers:{},query:{},params:{},body:{name:e.name,input:e.input,parentWorkflowId:e.parentWorkflowId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags,status:e.status,eventId:e.eventId}});var Mc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var jc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{output:e.output,timeoutAt:e.timeoutAt,status:e.status,failureReason:e.failureReason,tags:e.tags,userId:e.userId,eventId:e.eventId}});var Vc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Kc=e=>({path:"/v1/chat/workflows",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentWorkflowId:e.parentWorkflowId,statuses:e.statuses,name:e.name},params:{},body:{}});var Yc=e=>({path:"/v1/chat/workflows/get-or-create",headers:{},query:{},params:{},body:{name:e.name,input:e.input,parentWorkflowId:e.parentWorkflowId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags,status:e.status,eventId:e.eventId}});var Zc=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var tu=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var ru=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var nu=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var iu=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var cu=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var lu=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var mu=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var fu=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var xu=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var bu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var qu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var ku=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,tags:e.tags,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var wu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,tags:e.tags,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 Tu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var Cu=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var Uu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Eu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Su=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 Wu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ou=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Fu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Mu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var ju=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Vu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Ku=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var Yu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var Zu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var tl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var rl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var nl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var il=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var cl=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var ll=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var ml=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var fl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var xl=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 bl=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var ql=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var kl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var wl=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 Tl=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Cl=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Ul=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var El=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Sl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Wl=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Ol=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Fl=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ml=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var jl=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var Vl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Kl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Yl=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Zl=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,configurations:e.configurations,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,interfaces:e.interfaces,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 td=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,configurations:e.configurations,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 rd=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var nd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var id=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 cd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var ld=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var md=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var fd=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,entities:e.entities,events:e.events,actions:e.actions,channels:e.channels,nameTemplate:e.nameTemplate}});var xd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var bd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var qd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{entities:e.entities,events:e.events,actions:e.actions,channels:e.channels,nameTemplate:e.nameTemplate}});var kd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var wd=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Td=e=>({path:"/v1/admin/plugins",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,code:e.code}});var Cd=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ud=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Ed=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,code:e.code}});var Sd=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Wd=e=>({path:"/v1/admin/plugins",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Od=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Fd=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var Md=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var jd=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/activity`,headers:{},query:{type:e.type,nextToken:e.nextToken},params:{id:e.id},body:{}});var Vd=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Kd=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Yd=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Zd=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,indexing:e.indexing,accessPolicies:e.accessPolicies,contentType:e.contentType,expiresAt:e.expiresAt,publicContentImmediatelyAccessible:e.publicContentImmediatelyAccessible,metadata:e.metadata}});var tm=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rm=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags,ids:e.ids},params:{},body:{}});var nm=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var im=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{metadata:e.metadata,tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}});var cm=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,consolidate:e.consolidate,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}});var lm=e=>({path:`/v1/files/${encodeURIComponent(e.id)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{id:e.id},body:{}});var mm=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var fm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var xm=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 bm=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 qm=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 km=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/export`,headers:{},query:{format:e.format,compress:e.compress},params:{table:e.table},body:{}});var wm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/jobs`,headers:{},query:{},params:{table:e.table},body:{}});var Tm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/import`,headers:{},query:{},params:{table:e.table},body:{fileId:e.fileId}});var Cm=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 Um=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var Em=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Sm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var Wm=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 Om=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Fm=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 Mm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var jm=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 Os=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:r,query:n,body:o}=qp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getConversation=async t=>{let{path:s,headers:r,query:n,body:o}=kp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listConversations=async t=>{let{path:s,headers:r,query:n,body:o}=wp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateConversation=async t=>{let{path:s,headers:r,query:n,body:o}=Tp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateConversation=async t=>{let{path:s,headers:r,query:n,body:o}=Cp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteConversation=async t=>{let{path:s,headers:r,query:n,body:o}=Up(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listParticipants=async t=>{let{path:s,headers:r,query:n,body:o}=Ep(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};addParticipant=async t=>{let{path:s,headers:r,query:n,body:o}=Sp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getParticipant=async t=>{let{path:s,headers:r,query:n,body:o}=Wp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};removeParticipant=async t=>{let{path:s,headers:r,query:n,body:o}=Op(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createEvent=async t=>{let{path:s,headers:r,query:n,body:o}=Fp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getEvent=async t=>{let{path:s,headers:r,query:n,body:o}=Mp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listEvents=async t=>{let{path:s,headers:r,query:n,body:o}=jp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Vp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Kp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Yp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateMessage=async t=>{let{path:s,headers:r,query:n,body:o}=Zp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listMessages=async t=>{let{path:s,headers:r,query:n,body:o}=tc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteMessage=async t=>{let{path:s,headers:r,query:n,body:o}=rc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createUser=async t=>{let{path:s,headers:r,query:n,body:o}=nc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getUser=async t=>{let{path:s,headers:r,query:n,body:o}=ic(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listUsers=async t=>{let{path:s,headers:r,query:n,body:o}=cc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateUser=async t=>{let{path:s,headers:r,query:n,body:o}=lc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateUser=async t=>{let{path:s,headers:r,query:n,body:o}=mc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteUser=async t=>{let{path:s,headers:r,query:n,body:o}=fc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};setStateExpiry=async t=>{let{path:s,headers:r,query:n,body:o}=xc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getState=async t=>{let{path:s,headers:r,query:n,body:o}=bc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};setState=async t=>{let{path:s,headers:r,query:n,body:o}=qc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrSetState=async t=>{let{path:s,headers:r,query:n,body:o}=kc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};patchState=async t=>{let{path:s,headers:r,query:n,body:o}=wc(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};callAction=async t=>{let{path:s,headers:r,query:n,body:o}=Tc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};configureIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=Cc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTask=async t=>{let{path:s,headers:r,query:n,body:o}=Uc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createTask=async t=>{let{path:s,headers:r,query:n,body:o}=Ec(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateTask=async t=>{let{path:s,headers:r,query:n,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteTask=async t=>{let{path:s,headers:r,query:n,body:o}=Wc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listTasks=async t=>{let{path:s,headers:r,query:n,body:o}=Oc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Fc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Mc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=jc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Vc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkflows=async t=>{let{path:s,headers:r,query:n,body:o}=Kc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateWorkflow=async t=>{let{path:s,headers:r,query:n,body:o}=Yc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};trackAnalytics=async t=>{let{path:s,headers:r,query:n,body:o}=Zc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};runVrl=async t=>{let{path:s,headers:r,query:n,body:o}=tu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAccount=async t=>{let{path:s,headers:r,query:n,body:o}=ru(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateAccount=async t=>{let{path:s,headers:r,query:n,body:o}=nu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPersonalAccessTokens=async t=>{let{path:s,headers:r,query:n,body:o}=iu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createPersonalAccessToken=async t=>{let{path:s,headers:r,query:n,body:o}=cu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deletePersonalAccessToken=async t=>{let{path:s,headers:r,query:n,body:o}=lu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};setAccountPreference=async t=>{let{path:s,headers:r,query:n,body:o}=mu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAccountPreference=async t=>{let{path:s,headers:r,query:n,body:o}=fu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPublicIntegrations=async t=>{let{path:s,headers:r,query:n,body:o}=xu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPublicIntegrationById=async t=>{let{path:s,headers:r,query:n,body:o}=bu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPublicIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=qu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createBot=async t=>{let{path:s,headers:r,query:n,body:o}=ku(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateBot=async t=>{let{path:s,headers:r,query:n,body:o}=wu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};transferBot=async t=>{let{path:s,headers:r,query:n,body:o}=Tu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBots=async t=>{let{path:s,headers:r,query:n,body:o}=Cu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBot=async t=>{let{path:s,headers:r,query:n,body:o}=Uu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteBot=async t=>{let{path:s,headers:r,query:n,body:o}=Eu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotLogs=async t=>{let{path:s,headers:r,query:n,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotWebchat=async t=>{let{path:s,headers:r,query:n,body:o}=Wu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotAnalytics=async t=>{let{path:s,headers:r,query:n,body:o}=Ou(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotIssue=async t=>{let{path:s,headers:r,query:n,body:o}=Fu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBotIssues=async t=>{let{path:s,headers:r,query:n,body:o}=Mu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteBotIssue=async t=>{let{path:s,headers:r,query:n,body:o}=ju(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBotIssueEvents=async t=>{let{path:s,headers:r,query:n,body:o}=Vu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listBotVersions=async t=>{let{path:s,headers:r,query:n,body:o}=Ku(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getBotVersion=async t=>{let{path:s,headers:r,query:n,body:o}=Yu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createBotVersion=async t=>{let{path:s,headers:r,query:n,body:o}=Zu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deployBotVersion=async t=>{let{path:s,headers:r,query:n,body:o}=tl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceInvoices=async t=>{let{path:s,headers:r,query:n,body:o}=rl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getUpcomingInvoice=async t=>{let{path:s,headers:r,query:n,body:o}=nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:r,query:n,body:o}=il(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=cl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPublicWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=ll(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=ml(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceUsages=async t=>{let{path:s,headers:r,query:n,body:o}=fl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:r,query:n,body:o}=xl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:r,query:n,body:o}=bl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkspaceQuota=async t=>{let{path:s,headers:r,query:n,body:o}=ql(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceQuotas=async t=>{let{path:s,headers:r,query:n,body:o}=kl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=wl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};checkHandleAvailability=async t=>{let{path:s,headers:r,query:n,body:o}=Tl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaces=async t=>{let{path:s,headers:r,query:n,body:o}=Cl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPublicWorkspaces=async t=>{let{path:s,headers:r,query:n,body:o}=Ul(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteWorkspace=async t=>{let{path:s,headers:r,query:n,body:o}=El(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getAuditRecords=async t=>{let{path:s,headers:r,query:n,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listWorkspaceMembers=async t=>{let{path:s,headers:r,query:n,body:o}=Wl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=Ol(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=Fl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=Ml(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateWorkspaceMember=async t=>{let{path:s,headers:r,query:n,body:o}=jl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listIntegrationApiKeys=async t=>{let{path:s,headers:r,query:n,body:o}=Vl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createIntegrationApiKey=async t=>{let{path:s,headers:r,query:n,body:o}=Kl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:r,query:n,body:o}=Yl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=Zl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=td(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listIntegrations=async t=>{let{path:s,headers:r,query:n,body:o}=rd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=nd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getIntegrationLogs=async t=>{let{path:s,headers:r,query:n,body:o}=id(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getIntegrationByName=async t=>{let{path:s,headers:r,query:n,body:o}=cd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteIntegration=async t=>{let{path:s,headers:r,query:n,body:o}=ld(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};requestIntegrationVerification=async t=>{let{path:s,headers:r,query:n,body:o}=md(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createInterface=async t=>{let{path:s,headers:r,query:n,body:o}=fd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getInterface=async t=>{let{path:s,headers:r,query:n,body:o}=xd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getInterfaceByName=async t=>{let{path:s,headers:r,query:n,body:o}=bd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateInterface=async t=>{let{path:s,headers:r,query:n,body:o}=qd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteInterface=async t=>{let{path:s,headers:r,query:n,body:o}=kd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listInterfaces=async t=>{let{path:s,headers:r,query:n,body:o}=wd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createPlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Td(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Cd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getPluginByName=async t=>{let{path:s,headers:r,query:n,body:o}=Ud(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updatePlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Ed(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deletePlugin=async t=>{let{path:s,headers:r,query:n,body:o}=Sd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listPlugins=async t=>{let{path:s,headers:r,query:n,body:o}=Wd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getUsage=async t=>{let{path:s,headers:r,query:n,body:o}=Od(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getMultipleUsages=async t=>{let{path:s,headers:r,query:n,body:o}=Fd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listUsageHistory=async t=>{let{path:s,headers:r,query:n,body:o}=Md(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listUsageActivity=async t=>{let{path:s,headers:r,query:n,body:o}=jd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};changeAISpendQuota=async t=>{let{path:s,headers:r,query:n,body:o}=Vd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listActivities=async t=>{let{path:s,headers:r,query:n,body:o}=Kd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};introspect=async t=>{let{path:s,headers:r,query:n,body:o}=Yd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};upsertFile=async t=>{let{path:s,headers:r,query:n,body:o}=Zd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteFile=async t=>{let{path:s,headers:r,query:n,body:o}=tm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listFiles=async t=>{let{path:s,headers:r,query:n,body:o}=rm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getFile=async t=>{let{path:s,headers:r,query:n,body:o}=nm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateFileMetadata=async t=>{let{path:s,headers:r,query:n,body:o}=im(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};searchFiles=async t=>{let{path:s,headers:r,query:n,body:o}=cm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listFilePassages=async t=>{let{path:s,headers:r,query:n,body:o}=lm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};listTables=async t=>{let{path:s,headers:r,query:n,body:o}=mm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTable=async t=>{let{path:s,headers:r,query:n,body:o}=fm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getOrCreateTable=async t=>{let{path:s,headers:r,query:n,body:o}=xm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createTable=async t=>{let{path:s,headers:r,query:n,body:o}=bm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};duplicateTable=async t=>{let{path:s,headers:r,query:n,body:o}=qm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};exportTable=async t=>{let{path:s,headers:r,query:n,body:o}=km(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTableJobs=async t=>{let{path:s,headers:r,query:n,body:o}=wm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};importTable=async t=>{let{path:s,headers:r,query:n,body:o}=Tm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateTable=async t=>{let{path:s,headers:r,query:n,body:o}=Cm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};renameTableColumn=async t=>{let{path:s,headers:r,query:n,body:o}=Um(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteTable=async t=>{let{path:s,headers:r,query:n,body:o}=Em(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};getTableRow=async t=>{let{path:s,headers:r,query:n,body:o}=Sm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};findTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Wm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};createTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Om(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};deleteTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Fm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};updateTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=Mm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})};upsertTableRows=async t=>{let{path:s,headers:r,query:n,body:o}=jm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw m(a)})}};function m(e){return he.isAxiosError(e)&&e.response?.data?Is(e.response.data):Is(e)}var O=class{constructor(t){this._list=t}async*[Symbol.asyncIterator](){let t;do{let{items:s,meta:r}=await this._list({nextToken:t});t=r.nextToken;for(let n of s)yield n}while(t)}async collect(t={}){let s=t.limit??Number.POSITIVE_INFINITY,r=[],n=0;for await(let o of this)if(r.push(o),n++,n>=s)break;return r}},Hs=class{constructor(t){this._client=t}conversations=t=>new O(({nextToken:s})=>this._client.listConversations({nextToken:s,...t}).then(r=>({...r,items:r.conversations})));participants=t=>new O(({nextToken:s})=>this._client.listParticipants({nextToken:s,...t}).then(r=>({...r,items:r.participants})));events=t=>new O(({nextToken:s})=>this._client.listEvents({nextToken:s,...t}).then(r=>({...r,items:r.events})));messages=t=>new O(({nextToken:s})=>this._client.listMessages({nextToken:s,...t}).then(r=>({...r,items:r.messages})));users=t=>new O(({nextToken:s})=>this._client.listUsers({nextToken:s,...t}).then(r=>({...r,items:r.users})));tasks=t=>new O(({nextToken:s})=>this._client.listTasks({nextToken:s,...t}).then(r=>({...r,items:r.tasks})));publicIntegrations=t=>new O(({nextToken:s})=>this._client.listPublicIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));bots=t=>new O(({nextToken:s})=>this._client.listBots({nextToken:s,...t}).then(r=>({...r,items:r.bots})));botIssues=t=>new O(({nextToken:s})=>this._client.listBotIssues({nextToken:s,...t}).then(r=>({...r,items:r.issues})));workspaces=t=>new O(({nextToken:s})=>this._client.listWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));publicWorkspaces=t=>new O(({nextToken:s})=>this._client.listPublicWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));workspaceMembers=t=>new O(({nextToken:s})=>this._client.listWorkspaceMembers({nextToken:s,...t}).then(r=>({...r,items:r.members})));integrations=t=>new O(({nextToken:s})=>this._client.listIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));interfaces=t=>new O(({nextToken:s})=>this._client.listInterfaces({nextToken:s,...t}).then(r=>({...r,items:r.interfaces})));activities=t=>new O(({nextToken:s})=>this._client.listActivities({nextToken:s,...t}).then(r=>({...r,items:r.activities})));files=t=>new O(({nextToken:s})=>this._client.listFiles({nextToken:s,...t}).then(r=>({...r,items:r.files})));filePassages=t=>new O(({nextToken:s})=>this._client.listFilePassages({nextToken:s,...t}).then(r=>({...r,items:r.passages})))};var Km=100*1024*1024,Ab=Km,Cb=Km,ma=class extends Os{config;constructor(t={}){let s=So(t),{apiUrl:r,headers:n,withCredentials:o,timeout:p}=s,i=he.create({baseURL:r,headers:n,withCredentials:o,timeout:p,maxBodyLength:Ab,maxContentLength:Cb,httpAgent:da.isNode?new Vm.default.Agent({keepAlive:!0}):void 0,httpsAgent:da.isNode?new $m.default.Agent({keepAlive:!0}):void 0});super(i),t.retry&&Sr(i,t.retry),this.config=s}get list(){return new Hs(this)}uploadFile=async({key:t,index:s,tags:r,contentType:n,accessPolicies:o,content:p,url:i,indexing:a,expiresAt:u,publicContentImmediatelyAccessible:c})=>{if(i&&p)throw new be("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await he.get(i,{responseType:"arraybuffer"}).then(x=>x.data).catch(x=>{throw new be(`Failed to download file from provided URL: ${x.message}`,x)})),!p)throw new be("No content was provided for the file");let g,y;if(typeof p=="string"){let v=new TextEncoder().encode(p);g=v,y=v.byteLength}else if(p instanceof Uint8Array)g=p,y=g.byteLength;else if(p instanceof ArrayBuffer)g=p,y=g.byteLength;else if(p instanceof Blob)g=p,y=p.size;else throw new be("The provided content is not supported");let{file:b}=await this.upsertFile({key:t,tags:r,index:s,accessPolicies:o,contentType:n,size:y,expiresAt:u,indexing:a,publicContentImmediatelyAccessible:c}),f={"Content-Type":b.contentType};c&&(f["x-amz-tagging"]="public=true");try{await he.put(b.uploadUrl,g,{maxBodyLength:1/0,headers:f})}catch(x){throw new be(`Failed to upload file: ${x.message}`,x,b)}return{file:{...b,size:y}}}};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,UpstreamProviderError,axios,axiosRetry,errorFrom,isApiError});
15
15
  /*! Bundled license information:
16
16
 
17
17
  mime-db/index.js: