@botpress/client 0.35.0 → 0.36.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.
- package/.turbo/turbo-build.log +7 -7
- package/.turbo/turbo-generate.log +1 -1
- package/dist/bundle.cjs +1 -1
- package/dist/bundle.cjs.map +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +61 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +2 -2
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/client@0.
|
|
2
|
+
> @botpress/client@0.36.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.
|
|
6
|
+
> @botpress/client@0.36.0 build:type /home/runner/work/botpress/botpress/packages/client
|
|
7
7
|
> tsup ./src/index.ts --dts-resolve --dts-only
|
|
8
8
|
|
|
9
9
|
[34mCLI[39m Building entry: ./src/index.ts
|
|
10
10
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
11
11
|
[34mCLI[39m tsup v8.0.2
|
|
12
12
|
[34mDTS[39m Build start
|
|
13
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
13
|
+
[32mDTS[39m ⚡️ Build success in 3570ms
|
|
14
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m429.22 KB[39m
|
|
15
15
|
|
|
16
|
-
> @botpress/client@0.
|
|
16
|
+
> @botpress/client@0.36.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.
|
|
21
|
+
> @botpress/client@0.36.0 build:browser /home/runner/work/botpress/botpress/packages/client
|
|
22
22
|
> ts-node -T ./build.ts --browser
|
|
23
23
|
|
|
24
24
|
Done
|
|
25
25
|
|
|
26
|
-
> @botpress/client@0.
|
|
26
|
+
> @botpress/client@0.36.0 build:bundle /home/runner/work/botpress/botpress/packages/client
|
|
27
27
|
> ts-node -T ./build.ts --bundle
|
|
28
28
|
|
|
29
29
|
Done
|
package/dist/bundle.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){let a=new this(t);return s.forEach(n=>a.set(n)),a}static accessor(t){let a=(this[hn]=this[hn]={accessors:{}}).accessors,n=this.prototype;function o(p){let i=dt(p);a[i]||(df(n,p),a[i]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors($e.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[s]=a}}});l.freezeMethods($e);var D=$e;function mt(e,t){let s=this||Ve,a=t||s,n=D.from(a.headers),o=a.data;return l.forEach(e,function(i){o=i.call(s,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function gt(e){return!!(e&&e.__CANCEL__)}function bn(e,t,s){h.call(this,e??"canceled",h.ERR_CANCELED,t,s),this.name="CanceledError"}l.inherits(bn,h,{__CANCEL__:!0});var ie=bn;function ke(e,t,s){let a=s.config.validateStatus;!s.status||!a||a(s.status)?e(s):t(new h("Request failed with status code "+s.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function pa(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ca(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Le(e,t){return e&&!pa(t)?ca(e,t):t}var so=G(qn(),1),ao=G(require("http"),1),ro=G(require("https"),1),no=G(require("util"),1),oo=G(Qn(),1),ye=G(require("zlib"),1);var Ge="1.6.1";function ht(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var Jf=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function ha(e,t,s){let a=s&&s.Blob||W.classes.Blob,n=ht(e);if(t===void 0&&a&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let o=Jf.exec(e);if(!o)throw new h("Invalid URL",h.ERR_INVALID_URL);let p=o[1],i=o[2],r=o[3],u=Buffer.from(decodeURIComponent(r),i?"base64":"utf8");if(t){if(!a)throw new h("Blob is not supported",h.ERR_NOT_SUPPORT);return new a([u],{type:p})}return u}throw new h("Unsupported protocol "+n,h.ERR_NOT_SUPPORT)}var We=G(require("stream"),1);var Nn=G(require("stream"),1);function Yf(e,t){let s=0,a=1e3/t,n=null;return function(p,i){let r=Date.now();if(p||r-s>a)return n&&(clearTimeout(n),n=null),s=r,e.apply(null,i);n||(n=setTimeout(()=>(n=null,s=Date.now(),e.apply(null,i)),a-(r-s)))}}var Mn=Yf;function Xf(e,t){e=e||10;let s=new Array(e),a=new Array(e),n=0,o=0,p;return t=t!==void 0?t:1e3,function(r){let u=Date.now(),c=a[o];p||(p=u),s[n]=r,a[n]=u;let f=o,y=0;for(;f!==n;)y+=s[f++],f=f%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=Xf;var zt=Symbol("internals"),ba=class extends Nn.default.Transform{constructor(t){t=l.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,r)=>!l.isUndefined(r[i])),super({readableHighWaterMark:t.chunkSize});let s=this,a=this[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(a.ticksRate*t.samplesCount,a.timeWindow);this.on("newListener",i=>{i==="progress"&&(a.isCaptured||(a.isCaptured=!0))});let o=0;a.updateProgress=Mn(function(){let r=a.length,u=a.bytesSeen,c=u-o;if(!c||s.destroyed)return;let f=n(c);o=u,process.nextTick(()=>{s.emit("progress",{loaded:u,total:r,progress:r?u/r:void 0,bytes:c,rate:f||void 0,estimated:f&&r&&u<=r?(r-u)/f:void 0})})},a.ticksRate);let p=()=>{a.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,a){let n=this,o=this[zt],p=o.maxRate,i=this.readableHighWaterMark,r=o.timeWindow,u=1e3/r,c=p/u,f=o.minChunkSize!==!1?Math.max(o.minChunkSize,c*.01):0;function y(g,x){let v=Buffer.byteLength(g);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&o.updateProgress(),n.push(g)?process.nextTick(x):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(x)}}let b=(g,x)=>{let v=Buffer.byteLength(g),R=null,A=i,T,B=0;if(p){let U=Date.now();(!o.ts||(B=U-o.ts)>=r)&&(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,g)},r-B);T<A&&(A=T)}A&&v>A&&v-A>f&&(R=g.subarray(A),g=g.subarray(0,A)),y(g,R?()=>{process.nextTick(x,null,R)}:x)};b(t,function g(x,v){if(x)return a(x);v?b(v,g):a(null)})}setLength(t){return this[zt].length=+t,this}},Ra=ba;var io=G(require("events"),1);var zn=require("util"),Vn=require("stream");var{asyncIterator:jn}=Symbol,Zf=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[jn]?yield*e[jn]():yield e},Vt=Zf;var ey=l.ALPHABET.ALPHA_DIGIT+"-_",bt=new zn.TextEncoder,Ie=`\r
|
|
12
12
|
`,ty=bt.encode(Ie),sy=2,qa=class{constructor(t,s){let{escapeName:a}=this.constructor,n=l.isString(s),o=`Content-Disposition: form-data; name="${a(t)}"${!n&&s.name?`; filename="${a(s.name)}"`:""}${Ie}`;n?s=bt.encode(String(s).replace(/\r?\n|\r\n?/g,Ie)):o+=`Content-Type: ${s.type||"application/octet-stream"}${Ie}`,this.headers=bt.encode(o+Ie),this.contentLength=n?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+sy,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;l.isTypedArray(t)?yield t:yield*Vt(t),yield ty}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},ay=(e,t,s)=>{let{tag:a="form-data-boundary",size:n=25,boundary:o=a+"-"+l.generateString(n,ey)}=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+Ie),i=bt.encode("--"+o+"--"+Ie+Ie),r=i.byteLength,u=Array.from(e.entries()).map(([f,y])=>{let b=new qa(f,y);return r+=b.size,b});r+=p.byteLength*u.length,r=l.toFiniteNumber(r);let c={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(r)&&(c["Content-Length"]=r),t&&t(c),Vn.Readable.from(async function*(){for(let f of u)yield p,yield*f.encode();yield i}())},$n=ay;var Kn=G(require("stream"),1),va=class extends Kn.default.Transform{__transform(t,s,a){this.push(t),a()}_transform(t,s,a){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,s)}this.__transform(t,s,a)}},Jn=va;var ry=(e,t)=>l.isAsyncFn(e)?function(...s){let a=s.pop();e.apply(this,s).then(n=>{try{t?a(null,...t(n)):a(null,n)}catch(o){a(o)}},a)}:e,Yn=ry;var Xn={flush:ye.default.constants.Z_SYNC_FLUSH,finishFlush:ye.default.constants.Z_SYNC_FLUSH},ny={flush:ye.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ye.default.constants.BROTLI_OPERATION_FLUSH},Zn=l.isFunction(ye.default.createBrotliDecompress),{http:oy,https:iy}=oo.default,py=/https:?/,eo=W.protocols.map(e=>e+":");function cy(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function po(e,t,s){let a=t;if(!a&&a!==!1){let n=(0,so.getProxyForUrl)(s);n&&(a=new URL(n))}if(a){if(a.username&&(a.auth=(a.username||"")+":"+(a.password||"")),a.auth){(a.auth.username||a.auth.password)&&(a.auth=(a.auth.username||"")+":"+(a.auth.password||""));let o=Buffer.from(a.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=a.hostname||a.host;e.hostname=n,e.host=n,e.port=a.port,e.path=s,a.protocol&&(e.protocol=a.protocol.includes(":")?a.protocol:`${a.protocol}:`)}e.beforeRedirects.proxy=function(o){po(o,t,o.href)}}var uy=typeof process<"u"&&l.kindOf(process)==="process",ly=e=>new Promise((t,s)=>{let a,n,o=(r,u)=>{n||(n=!0,a&&a(r,u))},p=r=>{o(r),t(r)},i=r=>{o(r,!0),s(r)};e(p,i,r=>a=r).catch(i)}),dy=({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)}},to=(e,t)=>dy(l.isObject(e)?e:{address:e,family:t}),co=uy&&function(t){return ly(async function(a,n,o){let{data:p,lookup:i,family:r}=t,{responseType:u,responseEncoding:c}=t,f=t.method.toUpperCase(),y,b=!1,g;if(i){let I=Yn(i,k=>l.isArray(k)?k:[k]);i=(k,S,Me)=>{I(k,S,(V,qe,Hs)=>{let ue=l.isArray(qe)?qe.map(ne=>to(ne)):[to(qe,Hs)];S.all?Me(V,ue):Me(V,ue[0].address,ue[0].family)})}}let x=new io.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 ie(null,t,g):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 A=Le(t.baseURL,t.url),T=new URL(A,"http://localhost"),B=T.protocol||eo[0];if(B==="data:"){let I;if(f!=="GET")return ke(a,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{I=ha(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=We.default.Readable.from(I)),ke(a,n,{data:I,status:200,statusText:"OK",headers:new D,config:t})}if(eo.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/"+Ge,!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=$n(p,k=>{U.set(k)},{tag:`axios-${Ge}-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 no.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=We.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=We.default.Readable.from(p,{objectMode:!1})),p=We.default.pipeline([p,new Ra({length:ge,maxRate:l.toFiniteNumber(z)})],l.noop),X&&p.on("progress",I=>{X(Object.assign(I,{upload:!0}))}));let ae;if(t.auth){let I=t.auth.username||"",k=t.auth.password||"";ae=I+":"+k}if(!ae&&T.username){let I=T.username,k=T.password;ae=I+":"+k}ae&&U.delete("authorization");let ee;try{ee=Ue(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"+(Zn?", br":""),!1);let L={path:ee,method:f,headers:U.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:ae,protocol:B,family:r,beforeRedirect:cy,beforeRedirects:{}};!l.isUndefined(i)&&(L.lookup=i),t.socketPath?L.socketPath=t.socketPath:(L.hostname=T.hostname,L.port=T.port,po(L,t.proxy,B+"//"+T.hostname+(T.port?":"+T.port:"")+L.path));let K,fe=py.test(L.protocol);if(L.agent=fe?t.httpsAgent:t.httpAgent,t.transport?K=t.transport:t.maxRedirects===0?K=fe?ro.default:ao.default:(t.maxRedirects&&(L.maxRedirects=t.maxRedirects),t.beforeRedirect&&(L.beforeRedirects.config=t.beforeRedirect),K=fe?iy:oy),t.maxBodyLength>-1?L.maxBodyLength=t.maxBodyLength:L.maxBodyLength=1/0,t.insecureHTTPParser&&(L.insecureHTTPParser=t.insecureHTTPParser),g=K.request(L,function(k){if(g.destroyed)return;let S=[k],Me=+k.headers["content-length"];if(Y){let ne=new Ra({length:l.toFiniteNumber(Me),maxRate:l.toFiniteNumber(ce)});Y&&ne.on("progress",Ct=>{Y(Object.assign(Ct,{download:!0}))}),S.push(ne)}let V=k,qe=k.req||g;if(t.decompress!==!1&&k.headers["content-encoding"])switch((f==="HEAD"||k.statusCode===204)&&delete k.headers["content-encoding"],(k.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":S.push(ye.default.createUnzip(Xn)),delete k.headers["content-encoding"];break;case"deflate":S.push(new Jn),S.push(ye.default.createUnzip(Xn)),delete k.headers["content-encoding"];break;case"br":Zn&&(S.push(ye.default.createBrotliDecompress(ny)),delete k.headers["content-encoding"])}V=S.length>1?We.default.pipeline(S,l.noop):S[0];let Hs=We.default.finished(V,()=>{Hs(),v()}),ue={status:k.statusCode,statusText:k.statusMessage,headers:new D(k.headers),config:t,request:qe};if(u==="stream")ue.data=V,ke(a,n,ue);else{let ne=[],Ct=0;V.on("data",function($){ne.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($){g.destroyed||n(h.from($,null,t,qe))}),V.on("end",function(){try{let $=ne.length===1?ne[0]:Buffer.concat(ne);u!=="arraybuffer"&&($=$.toString(c),(!c||c==="utf8")&&($=l.stripBOM($))),ue.data=$}catch($){return n(h.from($,null,t,ue.request,ue))}ke(a,n,ue)})}x.once("abort",ne=>{V.destroyed||(V.emit("error",ne),V.destroy())})}),x.once("abort",I=>{n(I),g.destroy(I)}),g.on("error",function(k){n(h.from(k,null,t,g))}),g.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,g));return}g.setTimeout(I,function(){if(y)return;let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Me=t.transitional||ze;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),n(new h(S,Me.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,g)),R()})}if(l.isStream(p)){let I=!1,k=!1;p.on("end",()=>{I=!0}),p.once("error",S=>{k=!0,g.destroy(S)}),p.on("close",()=>{!I&&!k&&R(new ie("Request stream has been aborted",t,g))}),p.pipe(g)}else g.end(p)})};var uo=W.hasStandardBrowserEnv?function(){return{write:function(s,a,n,o,p,i){let r=[];r.push(s+"="+encodeURIComponent(a)),l.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),l.isString(o)&&r.push("path="+o),l.isString(p)&&r.push("domain="+p),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read:function(s){let a=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var lo=W.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),a;function n(o){let p=o;return t&&(s.setAttribute("href",p),p=s.href),s.setAttribute("href",p),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return a=n(window.location.href),function(p){let i=l.isString(p)?n(p):p;return i.protocol===a.protocol&&i.host===a.host}}():function(){return function(){return!0}}();function mo(e,t){let s=0,a=jt(50,250);return n=>{let o=n.loaded,p=n.lengthComputable?n.total:void 0,i=o-s,r=a(i),u=o<=p;s=o;let c={loaded:o,total:p,progress:p?o/p:void 0,bytes:i,rate:r||void 0,estimated:r&&p&&u?(p-o)/r:void 0,event:n};c[t?"download":"upload"]=!0,e(c)}}var my=typeof XMLHttpRequest<"u",go=my&&function(e){return new Promise(function(s,a){let n=e.data,o=D.from(e.headers).normalize(),p=e.responseType,i;function r(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}let u;if(l.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){let[g,...x]=u?u.split(";").map(v=>v.trim()).filter(Boolean):[];o.setContentType([g||"multipart/form-data",...x].join("; "))}}let c=new XMLHttpRequest;if(e.auth){let g=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(g+":"+x))}let f=Le(e.baseURL,e.url);c.open(e.method.toUpperCase(),Ue(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function y(){if(!c)return;let g=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:g,config:e,request:c};ke(function(A){s(A),r()},function(A){a(A),r()},v),c=null}if("onloadend"in c?c.onloadend=y:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(y)},c.onabort=function(){c&&(a(new h("Request aborted",h.ECONNABORTED,e,c)),c=null)},c.onerror=function(){a(new h("Network Error",h.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",v=e.transitional||ze;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),a(new h(x,v.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,c)),c=null},W.hasStandardBrowserEnv){let g=lo(f)&&e.xsrfCookieName&&uo.read(e.xsrfCookieName);g&&o.set(e.xsrfHeaderName,g)}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",mo(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",mo(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=g=>{c&&(a(!g||g.type?new ie(null,e,c):g),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));let b=ht(f);if(b&&W.protocols.indexOf(b)===-1){a(new h("Unsupported protocol "+b+":",h.ERR_BAD_REQUEST,e));return}c.send(n||null)})};var ka={http:co,xhr:go};l.forEach(ka,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var fo=e=>`- ${e}`,gy=e=>l.isFunction(e)||e===null||e===!1,$t={getAdapter:e=>{e=l.isArray(e)?e:[e];let{length:t}=e,s,a,n={};for(let o=0;o<t;o++){s=e[o];let p;if(a=s,!gy(s)&&(a=ka[(p=String(s)).toLowerCase()],a===void 0))throw new h(`Unknown adapter '${p}'`);if(a)break;n[p||"#"+o]=a}if(!a){let o=Object.entries(n).map(([i,r])=>`adapter ${i} `+(r===!1?"is not supported by the environment":"is not available in the build")),p=t?o.length>1?`since :
|
|
13
13
|
`+o.map(fo).join(`
|
|
14
|
-
`):" "+fo(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return a},adapters:ka};function Ia(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ie(null,e)}function Kt(e){return Ia(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||Ve.adapter)(e).then(function(a){return Ia(e),a.data=mt.call(e,e.transformResponse,a),a.headers=D.from(a.headers),a},function(a){return gt(a)||(Ia(e),a&&a.response&&(a.response.data=mt.call(e,e.transformResponse,a.response),a.response.headers=D.from(a.response.headers))),Promise.reject(a)})}var yo=e=>e instanceof D?e.toJSON():e;function xe(e,t){t=t||{};let s={};function a(u,c,f){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:f},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function n(u,c,f){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u,f)}else return a(u,c,f)}function o(u,c){if(!l.isUndefined(c))return a(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u)}else return a(void 0,c)}function i(u,c,f){if(f in t)return a(u,c);if(f in e)return a(void 0,u)}let r={url:o,method:o,data:o,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:i,headers:(u,c)=>n(yo(u),yo(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=r[c]||n,y=f(e[c],t[c],c);l.isUndefined(y)&&f!==i||(s[c]=y)}),s}var wa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wa[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});var xo={};wa.transitional=function(t,s,a){function n(o,p){return"[Axios v"+Ge+"] Transitional option '"+o+"'"+p+(a?". "+a:"")}return(o,p,i)=>{if(t===!1)throw new h(n(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!xo[p]&&(xo[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 fy(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),n=a.length;for(;n-- >0;){let o=a[n],p=t[o];if(p){let i=e[o],r=i===void 0||p(i,o,e);if(r!==!0)throw new h("option "+o+" must be "+r,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var Jt={assertOptions:fy,validators:wa};var we=Jt.validators,et=class{constructor(t){this.defaults=t,this.interceptors={request:new aa,response:new aa}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=xe(this.defaults,s);let{transitional:a,paramsSerializer:n,headers:o}=s;a!==void 0&&Jt.assertOptions(a,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean)},!1),n!=null&&(l.isFunction(n)?s.paramsSerializer={serialize:n}:Jt.assertOptions(n,{encode:we.function,serialize:we.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let p=o&&l.merge(o.common,o[s.method]);o&&l.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),s.headers=D.concat(p,o);let i=[],r=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(r=r&&x.synchronous,i.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,f=0,y;if(!r){let g=[Kt.bind(this),void 0];for(g.unshift.apply(g,i),g.push.apply(g,u),y=g.length,c=Promise.resolve(s);f<y;)c=c.then(g[f++],g[f++]);return c}y=i.length;let b=s;for(f=0;f<y;){let g=i[f++],x=i[f++];try{b=g(b)}catch(v){x.call(this,v);break}}try{c=Kt.call(this,b)}catch(g){return Promise.reject(g)}for(f=0,y=u.length;f<y;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=xe(this.defaults,t);let s=Le(t.baseURL,t.url);return Ue(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){et.prototype[t]=function(s,a){return this.request(xe(a||{},{method:t,url:s,data:(a||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(a){return function(o,p,i){return this.request(xe(i||{},{method:t,headers:a?{"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 a=this;this.promise.then(n=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](n);a._listeners=null}),this.promise.then=n=>{let o,p=new Promise(i=>{a.subscribe(i),o=i}).then(n);return p.cancel=function(){a.unsubscribe(o)},p},t(function(o,p,i){a.reason||(a.reason=new ie(o,p,i),s(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new qt(function(n){t=n}),cancel:t}}},ho=qt;function Aa(e){return function(s){return e.apply(null,s)}}function Ta(e){return l.isObject(e)&&e.isAxiosError===!0}var Pa={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(Pa).forEach(([e,t])=>{Pa[t]=e});var bo=Pa;function Ro(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 Ro(xe(e,n))},s}var _=Ro(Ve);_.Axios=Rt;_.CanceledError=ie;_.CancelToken=ho;_.isCancel=gt;_.VERSION=Ge;_.toFormData=ve;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=Aa;_.isAxiosError=Ta;_.mergeConfig=xe;_.AxiosHeaders=D;_.formToJSON=e=>Ot(l.isHTMLForm(e)?new FormData(e):e);_.getAdapter=$t.getAdapter;_.HttpStatusCode=bo;_.default=_;var he=_;var{Axios:yy,AxiosError:xy,CanceledError:hy,isCancel:by,CancelToken:Ry,VERSION:qy,all:vy,Cancel:ky,isAxiosError:Iy,spread:wy,toFormData:Ay,AxiosHeaders:Ty,HttpStatusCode:Py,formToJSON:Cy,getAdapter:By,mergeConfig:Uy}=he;var Sa={};Ut(Sa,{DEFAULT_OPTIONS:()=>Co,default:()=>Ea,exponentialDelay:()=>To,isIdempotentRequestError:()=>Ua,isNetworkError:()=>Ba,isNetworkOrIdempotentRequestError:()=>La,isRetryableError:()=>Xt,isSafeRequestError:()=>Ao,linearDelay:()=>Po,namespace:()=>Yt,retryAfter:()=>Zt});var Io=G(vo(),1),Yt="axios-retry";function Ba(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,Io.default)(e)}var wo=["get","head","options"],Ey=wo.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 Ao(e){return e.config?.method?Xt(e)&&wo.indexOf(e.config.method)!==-1:!1}function Ua(e){return e.config?.method?Xt(e)&&Ey.indexOf(e.config.method)!==-1:!1}function La(e){return Ba(e)||Ua(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 Sy(e=0,t=void 0){return Math.max(0,Zt(t))}function To(e=0,t=void 0,s=100){let a=2**e*s,n=Math.max(a,Zt(t)),o=n*.2*Math.random();return n+o}function Po(e=100){return(t=0,s=void 0)=>{let a=t*e;return Math.max(a,Zt(s))}}var Co={retries:3,retryCondition:La,retryDelay:Sy,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function _y(e,t){return{...Co,...t,...e[Yt]}}function ko(e,t,s=!1){let a=_y(e,t||{});return a.retryCount=a.retryCount||0,(!a.lastRequestTime||s)&&(a.lastRequestTime=Date.now()),e[Yt]=a,a}function Gy(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 Wy(e,t){let{retries:s,retryCondition:a}=e,n=(e.retryCount||0)<s&&a(t);if(typeof n=="object")try{return await n!==!1}catch{return!1}return n}async function Dy(e,t,s,a){t.retryCount+=1;let{retryDelay:n,shouldResetTimeout:o,onRetry:p}=t,i=n(t.retryCount,s);if(Gy(e,a),!o&&a.timeout&&t.lastRequestTime){let r=Date.now()-t.lastRequestTime,u=a.timeout-r-i;if(u<=0)return Promise.reject(s);a.timeout=u}return a.transformRequest=[r=>r],await p(t.retryCount,s,a),a.signal?.aborted?Promise.resolve(e(a)):new Promise(r=>{let u=()=>{clearTimeout(c),r(e(a))},c=setTimeout(()=>{r(e(a)),a.signal?.removeEventListener&&a.signal.removeEventListener("abort",u)},i);a.signal?.addEventListener&&a.signal.addEventListener("abort",u,{once:!0})})}async function Oy(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var Ae=(e,t)=>{let s=e.interceptors.request.use(n=>(ko(n,t,!0),n[Yt]?.validateResponse&&(n.validateStatus=()=>!1),n)),a=e.interceptors.response.use(null,async n=>{let{config:o}=n;if(!o)return Promise.reject(n);let p=ko(o,t);return n.response&&p.validateResponse?.(n.response)?n.response:await Wy(p,n)?Dy(e,p,n,o):(await Oy(p,n),Promise.reject(n))});return{requestInterceptorId:s,responseInterceptorId:a}};Ae.isNetworkError=Ba;Ae.isSafeRequestError=Ao;Ae.isIdempotentRequestError=Ua;Ae.isNetworkOrIdempotentRequestError=La;Ae.exponentialDelay=To;Ae.linearDelay=Po;Ae.isRetryableError=Xt;var Ea=Ae;var Bo=G(require("crypto"));var Hy={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},_a=typeof window<"u"&&typeof window.document<"u"?window.crypto:Bo.default;_a.getRandomValues||(_a=Hy);var C=class extends Error{constructor(s,a,n,o,p,i){super(o);this.code=s;this.description=a;this.type=n;this.message=o;this.error=p;this.id=i;this.id||(this.id=C.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(_a.getRandomValues(new Uint8Array(n))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},Fy=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Uo=e=>e instanceof C||Fy(e)&&e.isApiError===!0,Te=class extends C{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},es=class extends C{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},ts=class extends C{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},ss=class extends C{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},as=class extends C{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},rs=class extends C{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},ns=class extends C{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},os=class extends C{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},is=class extends C{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},ps=class extends C{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},cs=class extends C{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},us=class extends C{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},ls=class extends C{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ds=class extends C{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},ms=class extends C{constructor(t,s,a){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,a)}},gs=class extends C{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},fs=class extends C{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},ys=class extends C{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},xs=class extends C{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},hs=class extends C{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},bs=class extends C{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},Rs=class extends C{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},qs=class extends C{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},vs=class extends C{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},Qy={Unknown:Te,Internal:es,Unauthorized:ts,Forbidden:ss,PayloadTooLarge:as,InvalidPayload:rs,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},ks=e=>Uo(e)?e:e instanceof Error?new Te(e.message,e):typeof e=="string"?new Te(e):My(e);function My(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=Qy[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Te(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Te("An invalid error occurred: "+JSON.stringify(e))}var be=class extends Error{constructor(s,a,n){super(s);this.innerError=a;this.file=n;this.name="FileUploadError"}};var ur=G(Ga()),Am=G(require("http")),Tm=G(require("https"));var vt=G(Ga()),Yy="https://api.botpress.cloud",Xy=6e4,Zy="BP_API_URL",ex="BP_BOT_ID",tx="BP_INTEGRATION_ID",sx="BP_WORKSPACE_ID",ax="BP_TOKEN";function Lo(e){let t=rx(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Yy,n=t.timeout??Xy;return{apiUrl:a,timeout:n,withCredentials:vt.isBrowser,headers:s}}function rx(e){return vt.isBrowser?e:vt.isNode?nx(e):e}function nx(e){let t={...e,apiUrl:e.apiUrl??process.env[Zy],botId:e.botId??process.env[ex],integrationId:e.integrationId??process.env[tx],workspaceId:e.workspaceId??process.env[sx]},s=t.token??process.env[ax];return s&&(t.token=s),t}var xp=G(yp()),ob=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:a,headers:n,body:o}=e,p=Object.entries(n).filter(ob),i=Object.fromEntries(p),r=xp.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=r?[s,r].join("?"):s;return{method:t,url:u,headers:i,data:o}};var hp=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Rp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vp=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 Ip=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Ap=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Pp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Lp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Sp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Gp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Dp=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 Hp=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qp=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 Np=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 zp=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 $p=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var Xp=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var ec=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var sc=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var rc=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var oc=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var pc=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 uc=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 dc=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var gc=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 yc=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 hc=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 Rc=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 vc=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 Ic=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Ac=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Pc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bc=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 Lc=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 Sc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Gc=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 Dc=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 Hc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qc=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 Nc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var zc=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 $c=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 Jc=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var Xc=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var eu=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var su=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var ru=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var ou=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var pu=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var uu=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var du=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var gu=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var yu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Ru=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var vu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var Iu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var Au=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var Pu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Lu=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 Su=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Gu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Du=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Hu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Qu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Nu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var zu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var $u=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var Ju=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var Xu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var el=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var sl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var rl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var ol=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var pl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var ul=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var dl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var gl=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 yl=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var hl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Rl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var vl=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 Il=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Al=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Pl=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var Bl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ll=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Sl=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Gl=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Dl=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Hl=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Ql=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var Nl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var zl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var $l=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jl=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 Xl=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 ed=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var sd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rd=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 od=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var pd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ud=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var dd=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 gd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var yd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var hd=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 Rd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vd=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Id=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Ad=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var Pd=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Bd=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/activity`,headers:{},query:{type:e.type,nextToken:e.nextToken},params:{id:e.id},body:{}});var Ld=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Sd=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Gd=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Dd=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 Hd=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qd=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags,ids:e.ids},params:{},body:{}});var Nd=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var zd=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 $d=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 Jd=e=>({path:`/v1/files/${encodeURIComponent(e.id)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{id:e.id},body:{}});var Xd=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});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)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var rm=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 om=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 pm=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 dm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var gm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var ym=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 hm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Rm=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 vm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Im=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 Ds=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:n,body:o}=hp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Rp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listConversations=async t=>{let{path:s,headers:a,query:n,body:o}=vp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ip(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ap(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Pp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listParticipants=async t=>{let{path:s,headers:a,query:n,body:o}=Bp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};addParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Lp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Sp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Gp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Dp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Hp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Qp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Np(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=zp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMessage=async t=>{let{path:s,headers:a,query:n,body:o}=$p(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Jp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listMessages=async t=>{let{path:s,headers:a,query:n,body:o}=Xp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:n,body:o}=ec(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createUser=async t=>{let{path:s,headers:a,query:n,body:o}=sc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUser=async t=>{let{path:s,headers:a,query:n,body:o}=rc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsers=async t=>{let{path:s,headers:a,query:n,body:o}=oc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:n,body:o}=pc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateUser=async t=>{let{path:s,headers:a,query:n,body:o}=uc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteUser=async t=>{let{path:s,headers:a,query:n,body:o}=dc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setStateExpiry=async t=>{let{path:s,headers:a,query:n,body:o}=gc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getState=async t=>{let{path:s,headers:a,query:n,body:o}=yc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setState=async t=>{let{path:s,headers:a,query:n,body:o}=hc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:n,body:o}=Rc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};patchState=async t=>{let{path:s,headers:a,query:n,body:o}=vc(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};callAction=async t=>{let{path:s,headers:a,query:n,body:o}=Ic(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Ac(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTask=async t=>{let{path:s,headers:a,query:n,body:o}=Pc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTask=async t=>{let{path:s,headers:a,query:n,body:o}=Bc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTask=async t=>{let{path:s,headers:a,query:n,body:o}=Lc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTask=async t=>{let{path:s,headers:a,query:n,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTasks=async t=>{let{path:s,headers:a,query:n,body:o}=Gc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Dc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Hc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Qc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Nc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkflows=async t=>{let{path:s,headers:a,query:n,body:o}=zc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=$c(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=Jc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};runVrl=async t=>{let{path:s,headers:a,query:n,body:o}=Xc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccount=async t=>{let{path:s,headers:a,query:n,body:o}=eu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateAccount=async t=>{let{path:s,headers:a,query:n,body:o}=su(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:n,body:o}=ru(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=ou(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=pu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=uu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=du(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=gu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:n,body:o}=yu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=hu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBot=async t=>{let{path:s,headers:a,query:n,body:o}=Ru(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateBot=async t=>{let{path:s,headers:a,query:n,body:o}=vu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};transferBot=async t=>{let{path:s,headers:a,query:n,body:o}=Iu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBots=async t=>{let{path:s,headers:a,query:n,body:o}=Au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBot=async t=>{let{path:s,headers:a,query:n,body:o}=Pu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBot=async t=>{let{path:s,headers:a,query:n,body:o}=Bu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:n,body:o}=Lu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:n,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=Gu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Du(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:n,body:o}=Hu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Qu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotVersions=async t=>{let{path:s,headers:a,query:n,body:o}=zu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=$u(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Ju(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deployBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Xu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=el(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:n,body:o}=sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=rl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=ol(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=pl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=ul(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:n,body:o}=dl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:n,body:o}=gl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:n,body:o}=yl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:n,body:o}=hl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:n,body:o}=Rl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=vl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:n,body:o}=Il(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=Al(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=Pl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=Bl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:n,body:o}=Ll(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:n,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Gl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Dl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Hl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Ql(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:n,body:o}=Nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=zl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=$l(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Jl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Xl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=ed(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:n,body:o}=rd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:n,body:o}=od(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=pd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};requestIntegrationVerification=async t=>{let{path:s,headers:a,query:n,body:o}=ud(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createInterface=async t=>{let{path:s,headers:a,query:n,body:o}=dd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterface=async t=>{let{path:s,headers:a,query:n,body:o}=gd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterfaceByName=async t=>{let{path:s,headers:a,query:n,body:o}=yd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateInterface=async t=>{let{path:s,headers:a,query:n,body:o}=hd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteInterface=async t=>{let{path:s,headers:a,query:n,body:o}=Rd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listInterfaces=async t=>{let{path:s,headers:a,query:n,body:o}=vd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUsage=async t=>{let{path:s,headers:a,query:n,body:o}=Id(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMultipleUsages=async t=>{let{path:s,headers:a,query:n,body:o}=Ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:n,body:o}=Pd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsageActivity=async t=>{let{path:s,headers:a,query:n,body:o}=Bd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:n,body:o}=Ld(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listActivities=async t=>{let{path:s,headers:a,query:n,body:o}=Sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};introspect=async t=>{let{path:s,headers:a,query:n,body:o}=Gd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertFile=async t=>{let{path:s,headers:a,query:n,body:o}=Dd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteFile=async t=>{let{path:s,headers:a,query:n,body:o}=Hd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFiles=async t=>{let{path:s,headers:a,query:n,body:o}=Qd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getFile=async t=>{let{path:s,headers:a,query:n,body:o}=Nd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateFileMetadata=async t=>{let{path:s,headers:a,query:n,body:o}=zd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};searchFiles=async t=>{let{path:s,headers:a,query:n,body:o}=$d(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFilePassages=async t=>{let{path:s,headers:a,query:n,body:o}=Jd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTables=async t=>{let{path:s,headers:a,query:n,body:o}=Xd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTable=async t=>{let{path:s,headers:a,query:n,body:o}=em(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:n,body:o}=sm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTable=async t=>{let{path:s,headers:a,query:n,body:o}=rm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:n,body:o}=om(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTable=async t=>{let{path:s,headers:a,query:n,body:o}=pm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:n,body:o}=um(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTable=async t=>{let{path:s,headers:a,query:n,body:o}=dm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTableRow=async t=>{let{path:s,headers:a,query:n,body:o}=gm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};findTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=ym(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=hm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=Rm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=vm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=Im(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})}};function m(e){return he.isAxiosError(e)&&e.response?.data?ks(e.response.data):ks(e)}var O=class{constructor(t){this._list=t}async*[Symbol.asyncIterator](){let t;do{let{items:s,meta:a}=await this._list({nextToken:t});t=a.nextToken;for(let n of s)yield n}while(t)}async collect(t={}){let s=t.limit??Number.POSITIVE_INFINITY,a=[],n=0;for await(let o of this)if(a.push(o),n++,n>=s)break;return a}},Os=class{constructor(t){this._client=t}conversations=t=>new O(({nextToken:s})=>this._client.listConversations({nextToken:s,...t}).then(a=>({...a,items:a.conversations})));participants=t=>new O(({nextToken:s})=>this._client.listParticipants({nextToken:s,...t}).then(a=>({...a,items:a.participants})));events=t=>new O(({nextToken:s})=>this._client.listEvents({nextToken:s,...t}).then(a=>({...a,items:a.events})));messages=t=>new O(({nextToken:s})=>this._client.listMessages({nextToken:s,...t}).then(a=>({...a,items:a.messages})));users=t=>new O(({nextToken:s})=>this._client.listUsers({nextToken:s,...t}).then(a=>({...a,items:a.users})));tasks=t=>new O(({nextToken:s})=>this._client.listTasks({nextToken:s,...t}).then(a=>({...a,items:a.tasks})));publicIntegrations=t=>new O(({nextToken:s})=>this._client.listPublicIntegrations({nextToken:s,...t}).then(a=>({...a,items:a.integrations})));bots=t=>new O(({nextToken:s})=>this._client.listBots({nextToken:s,...t}).then(a=>({...a,items:a.bots})));botIssues=t=>new O(({nextToken:s})=>this._client.listBotIssues({nextToken:s,...t}).then(a=>({...a,items:a.issues})));workspaces=t=>new O(({nextToken:s})=>this._client.listWorkspaces({nextToken:s,...t}).then(a=>({...a,items:a.workspaces})));publicWorkspaces=t=>new O(({nextToken:s})=>this._client.listPublicWorkspaces({nextToken:s,...t}).then(a=>({...a,items:a.workspaces})));workspaceMembers=t=>new O(({nextToken:s})=>this._client.listWorkspaceMembers({nextToken:s,...t}).then(a=>({...a,items:a.members})));integrations=t=>new O(({nextToken:s})=>this._client.listIntegrations({nextToken:s,...t}).then(a=>({...a,items:a.integrations})));interfaces=t=>new O(({nextToken:s})=>this._client.listInterfaces({nextToken:s,...t}).then(a=>({...a,items:a.interfaces})));activities=t=>new O(({nextToken:s})=>this._client.listActivities({nextToken:s,...t}).then(a=>({...a,items:a.activities})));files=t=>new O(({nextToken:s})=>this._client.listFiles({nextToken:s,...t}).then(a=>({...a,items:a.files})));filePassages=t=>new O(({nextToken:s})=>this._client.listFilePassages({nextToken:s,...t}).then(a=>({...a,items:a.passages})))};var Pm=100*1024*1024,pb=Pm,cb=Pm,lr=class extends Ds{config;constructor(t={}){let s=Lo(t),{apiUrl:a,headers:n,withCredentials:o,timeout:p}=s,i=he.create({baseURL:a,headers:n,withCredentials:o,timeout:p,maxBodyLength:pb,maxContentLength:cb,httpAgent:ur.isNode?new Am.default.Agent({keepAlive:!0}):void 0,httpsAgent:ur.isNode?new Tm.default.Agent({keepAlive:!0}):void 0});super(i),t.retry&&Ea(i,t.retry),this.config=s}get list(){return new Os(this)}uploadFile=async({key:t,index:s,tags:a,contentType:n,accessPolicies:o,content:p,url:i,expiresAt:r,publicContentImmediatelyAccessible:u})=>{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(g=>g.data).catch(g=>{throw new be(`Failed to download file from provided URL: ${g.message}`,g)})),!p)throw new be("No content was provided for the file");let c,f;if(typeof p=="string"){let x=new TextEncoder().encode(p);c=x,f=x.byteLength}else if(p instanceof Uint8Array)c=p,f=c.byteLength;else if(p instanceof ArrayBuffer)c=p,f=c.byteLength;else if(p instanceof Blob)c=p,f=p.size;else throw new be("The provided content is not supported");let{file:y}=await this.upsertFile({key:t,tags:a,index:s,accessPolicies:o,contentType:n,size:f,expiresAt:r,publicContentImmediatelyAccessible:u}),b={"Content-Type":y.contentType};u&&(b["x-amz-tagging"]="public=true");try{await he.put(y.uploadUrl,c,{maxBodyLength:1/0,headers:b})}catch(g){throw new be(`Failed to upload file: ${g.message}`,g,y)}return{file:{...y,size:f}}}};0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceLockedConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,UploadFileError,axios,axiosRetry,errorFrom,isApiError});
|
|
14
|
+
`):" "+fo(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return a},adapters:ka};function Ia(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ie(null,e)}function Kt(e){return Ia(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||Ve.adapter)(e).then(function(a){return Ia(e),a.data=mt.call(e,e.transformResponse,a),a.headers=D.from(a.headers),a},function(a){return gt(a)||(Ia(e),a&&a.response&&(a.response.data=mt.call(e,e.transformResponse,a.response),a.response.headers=D.from(a.response.headers))),Promise.reject(a)})}var yo=e=>e instanceof D?e.toJSON():e;function xe(e,t){t=t||{};let s={};function a(u,c,f){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:f},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function n(u,c,f){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u,f)}else return a(u,c,f)}function o(u,c){if(!l.isUndefined(c))return a(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u)}else return a(void 0,c)}function i(u,c,f){if(f in t)return a(u,c);if(f in e)return a(void 0,u)}let r={url:o,method:o,data:o,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:i,headers:(u,c)=>n(yo(u),yo(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=r[c]||n,y=f(e[c],t[c],c);l.isUndefined(y)&&f!==i||(s[c]=y)}),s}var wa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wa[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});var xo={};wa.transitional=function(t,s,a){function n(o,p){return"[Axios v"+Ge+"] Transitional option '"+o+"'"+p+(a?". "+a:"")}return(o,p,i)=>{if(t===!1)throw new h(n(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!xo[p]&&(xo[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 fy(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),n=a.length;for(;n-- >0;){let o=a[n],p=t[o];if(p){let i=e[o],r=i===void 0||p(i,o,e);if(r!==!0)throw new h("option "+o+" must be "+r,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var Jt={assertOptions:fy,validators:wa};var we=Jt.validators,et=class{constructor(t){this.defaults=t,this.interceptors={request:new aa,response:new aa}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=xe(this.defaults,s);let{transitional:a,paramsSerializer:n,headers:o}=s;a!==void 0&&Jt.assertOptions(a,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean)},!1),n!=null&&(l.isFunction(n)?s.paramsSerializer={serialize:n}:Jt.assertOptions(n,{encode:we.function,serialize:we.function},!0)),s.method=(s.method||this.defaults.method||"get").toLowerCase();let p=o&&l.merge(o.common,o[s.method]);o&&l.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),s.headers=D.concat(p,o);let i=[],r=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(r=r&&x.synchronous,i.unshift(x.fulfilled,x.rejected))});let u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,f=0,y;if(!r){let g=[Kt.bind(this),void 0];for(g.unshift.apply(g,i),g.push.apply(g,u),y=g.length,c=Promise.resolve(s);f<y;)c=c.then(g[f++],g[f++]);return c}y=i.length;let b=s;for(f=0;f<y;){let g=i[f++],x=i[f++];try{b=g(b)}catch(v){x.call(this,v);break}}try{c=Kt.call(this,b)}catch(g){return Promise.reject(g)}for(f=0,y=u.length;f<y;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=xe(this.defaults,t);let s=Le(t.baseURL,t.url);return Ue(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){et.prototype[t]=function(s,a){return this.request(xe(a||{},{method:t,url:s,data:(a||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(a){return function(o,p,i){return this.request(xe(i||{},{method:t,headers:a?{"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 a=this;this.promise.then(n=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](n);a._listeners=null}),this.promise.then=n=>{let o,p=new Promise(i=>{a.subscribe(i),o=i}).then(n);return p.cancel=function(){a.unsubscribe(o)},p},t(function(o,p,i){a.reason||(a.reason=new ie(o,p,i),s(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new qt(function(n){t=n}),cancel:t}}},ho=qt;function Aa(e){return function(s){return e.apply(null,s)}}function Ta(e){return l.isObject(e)&&e.isAxiosError===!0}var Pa={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(Pa).forEach(([e,t])=>{Pa[t]=e});var bo=Pa;function Ro(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 Ro(xe(e,n))},s}var _=Ro(Ve);_.Axios=Rt;_.CanceledError=ie;_.CancelToken=ho;_.isCancel=gt;_.VERSION=Ge;_.toFormData=ve;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=Aa;_.isAxiosError=Ta;_.mergeConfig=xe;_.AxiosHeaders=D;_.formToJSON=e=>Ot(l.isHTMLForm(e)?new FormData(e):e);_.getAdapter=$t.getAdapter;_.HttpStatusCode=bo;_.default=_;var he=_;var{Axios:yy,AxiosError:xy,CanceledError:hy,isCancel:by,CancelToken:Ry,VERSION:qy,all:vy,Cancel:ky,isAxiosError:Iy,spread:wy,toFormData:Ay,AxiosHeaders:Ty,HttpStatusCode:Py,formToJSON:Cy,getAdapter:By,mergeConfig:Uy}=he;var Sa={};Ut(Sa,{DEFAULT_OPTIONS:()=>Co,default:()=>Ea,exponentialDelay:()=>To,isIdempotentRequestError:()=>Ua,isNetworkError:()=>Ba,isNetworkOrIdempotentRequestError:()=>La,isRetryableError:()=>Xt,isSafeRequestError:()=>Ao,linearDelay:()=>Po,namespace:()=>Yt,retryAfter:()=>Zt});var Io=G(vo(),1),Yt="axios-retry";function Ba(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,Io.default)(e)}var wo=["get","head","options"],Ey=wo.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 Ao(e){return e.config?.method?Xt(e)&&wo.indexOf(e.config.method)!==-1:!1}function Ua(e){return e.config?.method?Xt(e)&&Ey.indexOf(e.config.method)!==-1:!1}function La(e){return Ba(e)||Ua(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 Sy(e=0,t=void 0){return Math.max(0,Zt(t))}function To(e=0,t=void 0,s=100){let a=2**e*s,n=Math.max(a,Zt(t)),o=n*.2*Math.random();return n+o}function Po(e=100){return(t=0,s=void 0)=>{let a=t*e;return Math.max(a,Zt(s))}}var Co={retries:3,retryCondition:La,retryDelay:Sy,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function _y(e,t){return{...Co,...t,...e[Yt]}}function ko(e,t,s=!1){let a=_y(e,t||{});return a.retryCount=a.retryCount||0,(!a.lastRequestTime||s)&&(a.lastRequestTime=Date.now()),e[Yt]=a,a}function Gy(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 Wy(e,t){let{retries:s,retryCondition:a}=e,n=(e.retryCount||0)<s&&a(t);if(typeof n=="object")try{return await n!==!1}catch{return!1}return n}async function Dy(e,t,s,a){t.retryCount+=1;let{retryDelay:n,shouldResetTimeout:o,onRetry:p}=t,i=n(t.retryCount,s);if(Gy(e,a),!o&&a.timeout&&t.lastRequestTime){let r=Date.now()-t.lastRequestTime,u=a.timeout-r-i;if(u<=0)return Promise.reject(s);a.timeout=u}return a.transformRequest=[r=>r],await p(t.retryCount,s,a),a.signal?.aborted?Promise.resolve(e(a)):new Promise(r=>{let u=()=>{clearTimeout(c),r(e(a))},c=setTimeout(()=>{r(e(a)),a.signal?.removeEventListener&&a.signal.removeEventListener("abort",u)},i);a.signal?.addEventListener&&a.signal.addEventListener("abort",u,{once:!0})})}async function Oy(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var Ae=(e,t)=>{let s=e.interceptors.request.use(n=>(ko(n,t,!0),n[Yt]?.validateResponse&&(n.validateStatus=()=>!1),n)),a=e.interceptors.response.use(null,async n=>{let{config:o}=n;if(!o)return Promise.reject(n);let p=ko(o,t);return n.response&&p.validateResponse?.(n.response)?n.response:await Wy(p,n)?Dy(e,p,n,o):(await Oy(p,n),Promise.reject(n))});return{requestInterceptorId:s,responseInterceptorId:a}};Ae.isNetworkError=Ba;Ae.isSafeRequestError=Ao;Ae.isIdempotentRequestError=Ua;Ae.isNetworkOrIdempotentRequestError=La;Ae.exponentialDelay=To;Ae.linearDelay=Po;Ae.isRetryableError=Xt;var Ea=Ae;var Bo=G(require("crypto"));var Hy={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},_a=typeof window<"u"&&typeof window.document<"u"?window.crypto:Bo.default;_a.getRandomValues||(_a=Hy);var C=class extends Error{constructor(s,a,n,o,p,i){super(o);this.code=s;this.description=a;this.type=n;this.message=o;this.error=p;this.id=i;this.id||(this.id=C.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(_a.getRandomValues(new Uint8Array(n))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},Fy=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Uo=e=>e instanceof C||Fy(e)&&e.isApiError===!0,Te=class extends C{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},es=class extends C{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},ts=class extends C{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},ss=class extends C{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},as=class extends C{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},rs=class extends C{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},ns=class extends C{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},os=class extends C{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},is=class extends C{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},ps=class extends C{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},cs=class extends C{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},us=class extends C{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},ls=class extends C{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ds=class extends C{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},ms=class extends C{constructor(t,s,a){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,a)}},gs=class extends C{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},fs=class extends C{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},ys=class extends C{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},xs=class extends C{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},hs=class extends C{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},bs=class extends C{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},Rs=class extends C{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},qs=class extends C{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},vs=class extends C{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},Qy={Unknown:Te,Internal:es,Unauthorized:ts,Forbidden:ss,PayloadTooLarge:as,InvalidPayload:rs,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},ks=e=>Uo(e)?e:e instanceof Error?new Te(e.message,e):typeof e=="string"?new Te(e):My(e);function My(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=Qy[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Te(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Te("An invalid error occurred: "+JSON.stringify(e))}var be=class extends Error{constructor(s,a,n){super(s);this.innerError=a;this.file=n;this.name="FileUploadError"}};var ur=G(Ga()),Am=G(require("http")),Tm=G(require("https"));var vt=G(Ga()),Yy="https://api.botpress.cloud",Xy=6e4,Zy="BP_API_URL",ex="BP_BOT_ID",tx="BP_INTEGRATION_ID",sx="BP_WORKSPACE_ID",ax="BP_TOKEN";function Lo(e){let t=rx(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Yy,n=t.timeout??Xy;return{apiUrl:a,timeout:n,withCredentials:vt.isBrowser,headers:s}}function rx(e){return vt.isBrowser?e:vt.isNode?nx(e):e}function nx(e){let t={...e,apiUrl:e.apiUrl??process.env[Zy],botId:e.botId??process.env[ex],integrationId:e.integrationId??process.env[tx],workspaceId:e.workspaceId??process.env[sx]},s=t.token??process.env[ax];return s&&(t.token=s),t}var xp=G(yp()),ob=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:a,headers:n,body:o}=e,p=Object.entries(n).filter(ob),i=Object.fromEntries(p),r=xp.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=r?[s,r].join("?"):s;return{method:t,url:u,headers:i,data:o}};var hp=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Rp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vp=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 Ip=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Ap=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Pp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Lp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Sp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Gp=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Dp=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 Hp=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qp=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 Np=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 zp=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 $p=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var Xp=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var ec=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var sc=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var rc=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var oc=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var pc=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 uc=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 dc=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var gc=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 yc=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 hc=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 Rc=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 vc=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 Ic=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Ac=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Pc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bc=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 Lc=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 Sc=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Gc=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 Dc=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 Hc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qc=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 Nc=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var zc=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 $c=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 Jc=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var Xc=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var eu=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var su=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var ru=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var ou=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var pu=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var uu=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var du=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var gu=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var yu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hu=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Ru=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var vu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var Iu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var Au=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var Pu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Lu=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 Su=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Gu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Du=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Hu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Qu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Nu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var zu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var $u=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var Ju=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var Xu=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var el=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var sl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var rl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var ol=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var pl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var ul=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var dl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var gl=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 yl=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var hl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Rl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var vl=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 Il=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Al=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Pl=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var Bl=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ll=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Sl=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Gl=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var Dl=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Hl=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var Ql=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var Nl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var zl=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var $l=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jl=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 Xl=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 ed=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var sd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rd=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 od=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var pd=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ud=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var dd=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 gd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var yd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var hd=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 Rd=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vd=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Id=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Ad=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var Pd=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Bd=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/activity`,headers:{},query:{type:e.type,nextToken:e.nextToken},params:{id:e.id},body:{}});var Ld=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Sd=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Gd=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var Dd=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 Hd=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Qd=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags,ids:e.ids},params:{},body:{}});var Nd=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var zd=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 $d=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 Jd=e=>({path:`/v1/files/${encodeURIComponent(e.id)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{id:e.id},body:{}});var Xd=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});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)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}});var rm=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 om=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 pm=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 dm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var gm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var ym=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 hm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Rm=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 vm=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Im=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 Ds=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:n,body:o}=hp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Rp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listConversations=async t=>{let{path:s,headers:a,query:n,body:o}=vp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ip(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Ap(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteConversation=async t=>{let{path:s,headers:a,query:n,body:o}=Pp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listParticipants=async t=>{let{path:s,headers:a,query:n,body:o}=Bp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};addParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Lp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Sp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};removeParticipant=async t=>{let{path:s,headers:a,query:n,body:o}=Gp(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Dp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getEvent=async t=>{let{path:s,headers:a,query:n,body:o}=Hp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Qp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Np(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=zp(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMessage=async t=>{let{path:s,headers:a,query:n,body:o}=$p(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateMessage=async t=>{let{path:s,headers:a,query:n,body:o}=Jp(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listMessages=async t=>{let{path:s,headers:a,query:n,body:o}=Xp(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteMessage=async t=>{let{path:s,headers:a,query:n,body:o}=ec(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createUser=async t=>{let{path:s,headers:a,query:n,body:o}=sc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUser=async t=>{let{path:s,headers:a,query:n,body:o}=rc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsers=async t=>{let{path:s,headers:a,query:n,body:o}=oc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:n,body:o}=pc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateUser=async t=>{let{path:s,headers:a,query:n,body:o}=uc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteUser=async t=>{let{path:s,headers:a,query:n,body:o}=dc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setStateExpiry=async t=>{let{path:s,headers:a,query:n,body:o}=gc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getState=async t=>{let{path:s,headers:a,query:n,body:o}=yc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setState=async t=>{let{path:s,headers:a,query:n,body:o}=hc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrSetState=async t=>{let{path:s,headers:a,query:n,body:o}=Rc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};patchState=async t=>{let{path:s,headers:a,query:n,body:o}=vc(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};callAction=async t=>{let{path:s,headers:a,query:n,body:o}=Ic(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};configureIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Ac(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTask=async t=>{let{path:s,headers:a,query:n,body:o}=Pc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTask=async t=>{let{path:s,headers:a,query:n,body:o}=Bc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTask=async t=>{let{path:s,headers:a,query:n,body:o}=Lc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTask=async t=>{let{path:s,headers:a,query:n,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTasks=async t=>{let{path:s,headers:a,query:n,body:o}=Gc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Dc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Hc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Qc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=Nc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkflows=async t=>{let{path:s,headers:a,query:n,body:o}=zc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateWorkflow=async t=>{let{path:s,headers:a,query:n,body:o}=$c(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};trackAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=Jc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};runVrl=async t=>{let{path:s,headers:a,query:n,body:o}=Xc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccount=async t=>{let{path:s,headers:a,query:n,body:o}=eu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateAccount=async t=>{let{path:s,headers:a,query:n,body:o}=su(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:n,body:o}=ru(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=ou(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:n,body:o}=pu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};setAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=uu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAccountPreference=async t=>{let{path:s,headers:a,query:n,body:o}=du(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=gu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:n,body:o}=yu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=hu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBot=async t=>{let{path:s,headers:a,query:n,body:o}=Ru(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateBot=async t=>{let{path:s,headers:a,query:n,body:o}=vu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};transferBot=async t=>{let{path:s,headers:a,query:n,body:o}=Iu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBots=async t=>{let{path:s,headers:a,query:n,body:o}=Au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBot=async t=>{let{path:s,headers:a,query:n,body:o}=Pu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBot=async t=>{let{path:s,headers:a,query:n,body:o}=Bu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotLogs=async t=>{let{path:s,headers:a,query:n,body:o}=Lu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotWebchat=async t=>{let{path:s,headers:a,query:n,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:n,body:o}=Gu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Du(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssues=async t=>{let{path:s,headers:a,query:n,body:o}=Hu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:n,body:o}=Qu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:n,body:o}=Nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listBotVersions=async t=>{let{path:s,headers:a,query:n,body:o}=zu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=$u(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Ju(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deployBotVersion=async t=>{let{path:s,headers:a,query:n,body:o}=Xu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=el(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:n,body:o}=sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:n,body:o}=rl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=ol(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=pl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=ul(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:n,body:o}=dl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:n,body:o}=gl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:n,body:o}=yl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:n,body:o}=hl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:n,body:o}=Rl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=vl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:n,body:o}=Il(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=Al(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listPublicWorkspaces=async t=>{let{path:s,headers:a,query:n,body:o}=Pl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:n,body:o}=Bl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getAuditRecords=async t=>{let{path:s,headers:a,query:n,body:o}=Ll(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:n,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Gl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Dl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Hl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:n,body:o}=Ql(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:n,body:o}=Nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=zl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:n,body:o}=$l(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Jl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=Xl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listIntegrations=async t=>{let{path:s,headers:a,query:n,body:o}=ed(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:n,body:o}=rd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:n,body:o}=od(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteIntegration=async t=>{let{path:s,headers:a,query:n,body:o}=pd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};requestIntegrationVerification=async t=>{let{path:s,headers:a,query:n,body:o}=ud(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createInterface=async t=>{let{path:s,headers:a,query:n,body:o}=dd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterface=async t=>{let{path:s,headers:a,query:n,body:o}=gd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getInterfaceByName=async t=>{let{path:s,headers:a,query:n,body:o}=yd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateInterface=async t=>{let{path:s,headers:a,query:n,body:o}=hd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteInterface=async t=>{let{path:s,headers:a,query:n,body:o}=Rd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listInterfaces=async t=>{let{path:s,headers:a,query:n,body:o}=vd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getUsage=async t=>{let{path:s,headers:a,query:n,body:o}=Id(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getMultipleUsages=async t=>{let{path:s,headers:a,query:n,body:o}=Ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsageHistory=async t=>{let{path:s,headers:a,query:n,body:o}=Pd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listUsageActivity=async t=>{let{path:s,headers:a,query:n,body:o}=Bd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:n,body:o}=Ld(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listActivities=async t=>{let{path:s,headers:a,query:n,body:o}=Sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};introspect=async t=>{let{path:s,headers:a,query:n,body:o}=Gd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertFile=async t=>{let{path:s,headers:a,query:n,body:o}=Dd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteFile=async t=>{let{path:s,headers:a,query:n,body:o}=Hd(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFiles=async t=>{let{path:s,headers:a,query:n,body:o}=Qd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getFile=async t=>{let{path:s,headers:a,query:n,body:o}=Nd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateFileMetadata=async t=>{let{path:s,headers:a,query:n,body:o}=zd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};searchFiles=async t=>{let{path:s,headers:a,query:n,body:o}=$d(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listFilePassages=async t=>{let{path:s,headers:a,query:n,body:o}=Jd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};listTables=async t=>{let{path:s,headers:a,query:n,body:o}=Xd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTable=async t=>{let{path:s,headers:a,query:n,body:o}=em(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:n,body:o}=sm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTable=async t=>{let{path:s,headers:a,query:n,body:o}=rm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};duplicateTable=async t=>{let{path:s,headers:a,query:n,body:o}=om(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTable=async t=>{let{path:s,headers:a,query:n,body:o}=pm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};renameTableColumn=async t=>{let{path:s,headers:a,query:n,body:o}=um(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTable=async t=>{let{path:s,headers:a,query:n,body:o}=dm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};getTableRow=async t=>{let{path:s,headers:a,query:n,body:o}=gm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};findTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=ym(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};createTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=hm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};deleteTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=Rm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};updateTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=vm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})};upsertTableRows=async t=>{let{path:s,headers:a,query:n,body:o}=Im(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...a},query:{...n},body:o});return this.axiosInstance.request(i).then(r=>r.data).catch(r=>{throw m(r)})}};function m(e){return he.isAxiosError(e)&&e.response?.data?ks(e.response.data):ks(e)}var O=class{constructor(t){this._list=t}async*[Symbol.asyncIterator](){let t;do{let{items:s,meta:a}=await this._list({nextToken:t});t=a.nextToken;for(let n of s)yield n}while(t)}async collect(t={}){let s=t.limit??Number.POSITIVE_INFINITY,a=[],n=0;for await(let o of this)if(a.push(o),n++,n>=s)break;return a}},Os=class{constructor(t){this._client=t}conversations=t=>new O(({nextToken:s})=>this._client.listConversations({nextToken:s,...t}).then(a=>({...a,items:a.conversations})));participants=t=>new O(({nextToken:s})=>this._client.listParticipants({nextToken:s,...t}).then(a=>({...a,items:a.participants})));events=t=>new O(({nextToken:s})=>this._client.listEvents({nextToken:s,...t}).then(a=>({...a,items:a.events})));messages=t=>new O(({nextToken:s})=>this._client.listMessages({nextToken:s,...t}).then(a=>({...a,items:a.messages})));users=t=>new O(({nextToken:s})=>this._client.listUsers({nextToken:s,...t}).then(a=>({...a,items:a.users})));tasks=t=>new O(({nextToken:s})=>this._client.listTasks({nextToken:s,...t}).then(a=>({...a,items:a.tasks})));publicIntegrations=t=>new O(({nextToken:s})=>this._client.listPublicIntegrations({nextToken:s,...t}).then(a=>({...a,items:a.integrations})));bots=t=>new O(({nextToken:s})=>this._client.listBots({nextToken:s,...t}).then(a=>({...a,items:a.bots})));botIssues=t=>new O(({nextToken:s})=>this._client.listBotIssues({nextToken:s,...t}).then(a=>({...a,items:a.issues})));workspaces=t=>new O(({nextToken:s})=>this._client.listWorkspaces({nextToken:s,...t}).then(a=>({...a,items:a.workspaces})));publicWorkspaces=t=>new O(({nextToken:s})=>this._client.listPublicWorkspaces({nextToken:s,...t}).then(a=>({...a,items:a.workspaces})));workspaceMembers=t=>new O(({nextToken:s})=>this._client.listWorkspaceMembers({nextToken:s,...t}).then(a=>({...a,items:a.members})));integrations=t=>new O(({nextToken:s})=>this._client.listIntegrations({nextToken:s,...t}).then(a=>({...a,items:a.integrations})));interfaces=t=>new O(({nextToken:s})=>this._client.listInterfaces({nextToken:s,...t}).then(a=>({...a,items:a.interfaces})));activities=t=>new O(({nextToken:s})=>this._client.listActivities({nextToken:s,...t}).then(a=>({...a,items:a.activities})));files=t=>new O(({nextToken:s})=>this._client.listFiles({nextToken:s,...t}).then(a=>({...a,items:a.files})));filePassages=t=>new O(({nextToken:s})=>this._client.listFilePassages({nextToken:s,...t}).then(a=>({...a,items:a.passages})))};var Pm=100*1024*1024,pb=Pm,cb=Pm,lr=class extends Ds{config;constructor(t={}){let s=Lo(t),{apiUrl:a,headers:n,withCredentials:o,timeout:p}=s,i=he.create({baseURL:a,headers:n,withCredentials:o,timeout:p,maxBodyLength:pb,maxContentLength:cb,httpAgent:ur.isNode?new Am.default.Agent({keepAlive:!0}):void 0,httpsAgent:ur.isNode?new Tm.default.Agent({keepAlive:!0}):void 0});super(i),t.retry&&Ea(i,t.retry),this.config=s}get list(){return new Os(this)}uploadFile=async({key:t,index:s,tags:a,contentType:n,accessPolicies:o,content:p,url:i,expiresAt:r,publicContentImmediatelyAccessible:u})=>{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(g=>g.data).catch(g=>{throw new be(`Failed to download file from provided URL: ${g.message}`,g)})),!p)throw new be("No content was provided for the file");let c,f;if(typeof p=="string"){let x=new TextEncoder().encode(p);c=x,f=x.byteLength}else if(p instanceof Uint8Array)c=p,f=c.byteLength;else if(p instanceof ArrayBuffer)c=p,f=c.byteLength;else if(p instanceof Blob)c=p,f=p.size;else throw new be("The provided content is not supported");let{file:y}=await this.upsertFile({key:t,tags:a,index:s,accessPolicies:o,contentType:n,size:f,expiresAt:r,publicContentImmediatelyAccessible:u}),b={"Content-Type":y.contentType};u&&(b["x-amz-tagging"]="public=true");try{await he.put(y.uploadUrl,c,{maxBodyLength:1/0,headers:b})}catch(g){throw new be(`Failed to upload file: ${g.message}`,g,y)}return{file:{...y,size:f}}}};0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceLockedConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,UploadFileError,axios,axiosRetry,errorFrom,isApiError});
|
|
15
15
|
/*! Bundled license information:
|
|
16
16
|
|
|
17
17
|
mime-db/index.js:
|