@botpress/client 0.44.0 → 0.46.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 +147 -18
- 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.46.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.46.0 build:type /home/runner/work/botpress/botpress/packages/client
|
|
7
7
|
> tsup --tsconfig tsconfig.build.json ./src/index.ts --dts-resolve --dts-only
|
|
8
8
|
|
|
9
9
|
CLI Building entry: ./src/index.ts
|
|
10
10
|
CLI Using tsconfig: tsconfig.build.json
|
|
11
11
|
CLI tsup v8.0.2
|
|
12
12
|
DTS Build start
|
|
13
|
-
DTS ⚡️ Build success in
|
|
14
|
-
DTS dist/index.d.ts
|
|
13
|
+
DTS ⚡️ Build success in 4274ms
|
|
14
|
+
DTS dist/index.d.ts 499.44 KB
|
|
15
15
|
|
|
16
|
-
> @botpress/client@0.
|
|
16
|
+
> @botpress/client@0.46.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.46.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.46.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 r=new this(t);return s.forEach(a=>r.set(a)),r}static accessor(t){let r=(this[Vn]=this[Vn]={accessors:{}}).accessors,a=this.prototype;function o(p){let i=Rt(p);r[i]||(px(a,p),r[i]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};Ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors(Ze.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[s]=r}}});l.freezeMethods(Ze);var F=Ze;function qt(e,t){let s=this||Xe,r=t||s,a=F.from(r.headers),o=r.data;return l.forEach(e,function(i){o=i.call(s,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function vt(e){return!!(e&&e.__CANCEL__)}function zn(e,t,s){R.call(this,e??"canceled",R.ERR_CANCELED,t,s),this.name="CanceledError"}l.inherits(zn,R,{__CANCEL__:!0});var ue=zn;function Pe(e,t,s){let r=s.config.validateStatus;!s.status||!r||r(s.status)?e(s):t(new R("Request failed with status code "+s.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function kr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ir(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function _e(e,t){return e&&!kr(t)?Ir(e,t):t}var Lo=W(Kn(),1),Eo=W(require("http"),1),So=W(require("https"),1),_o=W(require("util"),1),Go=W(ho(),1),he=W(require("zlib"),1);var Fe="1.6.1";function Pt(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var jx=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Sr(e,t,s){let r=s&&s.Blob||D.classes.Blob,a=Pt(e);if(t===void 0&&r&&(t=!0),a==="data"){e=a.length?e.slice(a.length+1):e;let o=jx.exec(e);if(!o)throw new R("Invalid URL",R.ERR_INVALID_URL);let p=o[1],i=o[2],n=o[3],u=Buffer.from(decodeURIComponent(n),i?"base64":"utf8");if(t){if(!r)throw new R("Blob is not supported",R.ERR_NOT_SUPPORT);return new r([u],{type:p})}return u}throw new R("Unsupported protocol "+a,R.ERR_NOT_SUPPORT)}var Oe=W(require("stream"),1);var Ro=W(require("stream"),1);function Vx(e,t){let s=0,r=1e3/t,a=null;return function(p,i){let n=Date.now();if(p||n-s>r)return a&&(clearTimeout(a),a=null),s=n,e.apply(null,i);a||(a=setTimeout(()=>(a=null,s=Date.now(),e.apply(null,i)),r-(n-s)))}}var bo=Vx;function zx(e,t){e=e||10;let s=new Array(e),r=new Array(e),a=0,o=0,p;return t=t!==void 0?t:1e3,function(n){let u=Date.now(),c=r[o];p||(p=u),s[a]=n,r[a]=u;let f=o,y=0;for(;f!==a;)y+=s[f++],f=f%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),u-p<t)return;let h=c&&u-c;return h?Math.round(y*1e3/h):void 0}}var rs=zx;var as=Symbol("internals"),_r=class extends Ro.default.Transform{constructor(t){t=l.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,n)=>!l.isUndefined(n[i])),super({readableHighWaterMark:t.chunkSize});let s=this,r=this[as]={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},a=rs(r.ticksRate*t.samplesCount,r.timeWindow);this.on("newListener",i=>{i==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let o=0;r.updateProgress=bo(function(){let n=r.length,u=r.bytesSeen,c=u-o;if(!c||s.destroyed)return;let f=a(c);o=u,process.nextTick(()=>{s.emit("progress",{loaded:u,total:n,progress:n?u/n:void 0,bytes:c,rate:f||void 0,estimated:f&&n&&u<=n?(n-u)/f:void 0})})},r.ticksRate);let p=()=>{r.updateProgress(!0)};this.once("end",p),this.once("error",p)}_read(t){let s=this[as];return s.onReadCallback&&s.onReadCallback(),super._read(t)}_transform(t,s,r){let a=this,o=this[as],p=o.maxRate,i=this.readableHighWaterMark,n=o.timeWindow,u=1e3/n,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(),a.push(g)?process.nextTick(x):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(x)}}let h=(g,x)=>{let v=Buffer.byteLength(g),q=null,T=i,A,U=0;if(p){let L=Date.now();(!o.ts||(U=L-o.ts)>=n)&&(o.ts=L,A=c-o.bytes,o.bytes=A<0?-A:0,U=0),A=c-o.bytes}if(p){if(A<=0)return setTimeout(()=>{x(null,g)},n-U);A<T&&(T=A)}T&&v>T&&v-T>f&&(q=g.subarray(T),g=g.subarray(0,T)),y(g,q?()=>{process.nextTick(x,null,q)}:x)};h(t,function g(x,v){if(x)return r(x);v?h(v,g):r(null)})}setLength(t){return this[as].length=+t,this}},Gr=_r;var Wo=W(require("events"),1);var vo=require("util"),ko=require("stream");var{asyncIterator:qo}=Symbol,$x=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[qo]?yield*e[qo]():yield e},ns=$x;var Kx=l.ALPHABET.ALPHA_DIGIT+"-_",Tt=new vo.TextEncoder,Ae=`\r
|
|
12
12
|
`,Jx=Tt.encode(Ae),Yx=2,Wr=class{constructor(t,s){let{escapeName:r}=this.constructor,a=l.isString(s),o=`Content-Disposition: form-data; name="${r(t)}"${!a&&s.name?`; filename="${r(s.name)}"`:""}${Ae}`;a?s=Tt.encode(String(s).replace(/\r?\n|\r\n?/g,Ae)):o+=`Content-Type: ${s.type||"application/octet-stream"}${Ae}`,this.headers=Tt.encode(o+Ae),this.contentLength=a?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+Yx,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;l.isTypedArray(t)?yield t:yield*ns(t),yield Jx}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},Xx=(e,t,s)=>{let{tag:r="form-data-boundary",size:a=25,boundary:o=r+"-"+l.generateString(a,Kx)}=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=Tt.encode("--"+o+Ae),i=Tt.encode("--"+o+"--"+Ae+Ae),n=i.byteLength,u=Array.from(e.entries()).map(([f,y])=>{let h=new Wr(f,y);return n+=h.size,h});n+=p.byteLength*u.length,n=l.toFiniteNumber(n);let c={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(n)&&(c["Content-Length"]=n),t&&t(c),ko.Readable.from(async function*(){for(let f of u)yield p,yield*f.encode();yield i}())},Io=Xx;var wo=W(require("stream"),1),Dr=class extends wo.default.Transform{__transform(t,s,r){this.push(t),r()}_transform(t,s,r){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let a=Buffer.alloc(2);a[0]=120,a[1]=156,this.push(a,s)}this.__transform(t,s,r)}},Po=Dr;var Zx=(e,t)=>l.isAsyncFn(e)?function(...s){let r=s.pop();e.apply(this,s).then(a=>{try{t?r(null,...t(a)):r(null,a)}catch(o){r(o)}},r)}:e,To=Zx;var Ao={flush:he.default.constants.Z_SYNC_FLUSH,finishFlush:he.default.constants.Z_SYNC_FLUSH},eh={flush:he.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:he.default.constants.BROTLI_OPERATION_FLUSH},Co=l.isFunction(he.default.createBrotliDecompress),{http:th,https:sh}=Go.default,rh=/https:?/,Bo=D.protocols.map(e=>e+":");function ah(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function Do(e,t,s){let r=t;if(!r&&r!==!1){let a=(0,Lo.getProxyForUrl)(s);a&&(r=new URL(a))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let o=Buffer.from(r.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let a=r.hostname||r.host;e.hostname=a,e.host=a,e.port=r.port,e.path=s,r.protocol&&(e.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}e.beforeRedirects.proxy=function(o){Do(o,t,o.href)}}var nh=typeof process<"u"&&l.kindOf(process)==="process",oh=e=>new Promise((t,s)=>{let r,a,o=(n,u)=>{a||(a=!0,r&&r(n,u))},p=n=>{o(n),t(n)},i=n=>{o(n,!0),s(n)};e(p,i,n=>r=n).catch(i)}),ih=({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)}},Uo=(e,t)=>ih(l.isObject(e)?e:{address:e,family:t}),Fo=nh&&function(t){return oh(async function(r,a,o){let{data:p,lookup:i,family:n}=t,{responseType:u,responseEncoding:c}=t,f=t.method.toUpperCase(),y,h=!1,g;if(i){let I=To(i,k=>l.isArray(k)?k:[k]);i=(k,_,$e)=>{I(k,_,(K,Ie,tr)=>{let de=l.isArray(Ie)?Ie.map(pe=>Uo(pe)):[Uo(Ie,tr)];_.all?$e(K,de):$e(K,de[0].address,de[0].family)})}}let x=new Wo.default,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(q),t.signal&&t.signal.removeEventListener("abort",q),x.removeAllListeners()};o((I,k)=>{y=!0,k&&(h=!0,v())});function q(I){x.emit("abort",!I||I.type?new ue(null,t,g):I)}x.once("abort",a),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(q),t.signal&&(t.signal.aborted?q():t.signal.addEventListener("abort",q)));let T=_e(t.baseURL,t.url),A=new URL(T,"http://localhost"),U=A.protocol||Bo[0];if(U==="data:"){let I;if(f!=="GET")return Pe(r,a,{status:405,statusText:"method not allowed",headers:{},config:t});try{I=Sr(t.url,u==="blob",{Blob:t.env&&t.env.Blob})}catch(k){throw R.from(k,R.ERR_BAD_REQUEST,t)}return u==="text"?(I=I.toString(c),(!c||c==="utf8")&&(I=l.stripBOM(I))):u==="stream"&&(I=Oe.default.Readable.from(I)),Pe(r,a,{data:I,status:200,statusText:"OK",headers:new F,config:t})}if(Bo.indexOf(U)===-1)return a(new R("Unsupported protocol "+U,R.ERR_BAD_REQUEST,t));let L=F.from(t.headers).normalize();L.set("User-Agent","axios/"+Fe,!1);let Z=t.onDownloadProgress,ee=t.onUploadProgress,te=t.maxRate,$,le;if(l.isSpecCompliantForm(p)){let I=L.getContentType(/boundary=([-_\w\d]{10,70})/i);p=Io(p,k=>{L.set(k)},{tag:`axios-${Fe}-boundary`,boundary:I&&I[1]||void 0})}else if(l.isFormData(p)&&l.isFunction(p.getHeaders)){if(L.set(p.getHeaders()),!L.hasContentLength())try{let I=await _o.default.promisify(p.getLength).call(p);Number.isFinite(I)&&I>=0&&L.setContentLength(I)}catch{}}else if(l.isBlob(p))p.size&&L.setContentType(p.type||"application/octet-stream"),L.setContentLength(p.size||0),p=Oe.default.Readable.from(ns(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 a(new R("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",R.ERR_BAD_REQUEST,t));if(L.setContentLength(p.length,!1),t.maxBodyLength>-1&&p.length>t.maxBodyLength)return a(new R("Request body larger than maxBodyLength limit",R.ERR_BAD_REQUEST,t))}let ye=l.toFiniteNumber(L.getContentLength());l.isArray(te)?($=te[0],le=te[1]):$=le=te,p&&(ee||$)&&(l.isStream(p)||(p=Oe.default.Readable.from(p,{objectMode:!1})),p=Oe.default.pipeline([p,new Gr({length:ye,maxRate:l.toFiniteNumber($)})],l.noop),ee&&p.on("progress",I=>{ee(Object.assign(I,{upload:!0}))}));let ne;if(t.auth){let I=t.auth.username||"",k=t.auth.password||"";ne=I+":"+k}if(!ne&&A.username){let I=A.username,k=A.password;ne=I+":"+k}ne&&L.delete("authorization");let se;try{se=Se(A.pathname+A.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,a(k)}L.set("Accept-Encoding","gzip, compress, deflate"+(Co?", br":""),!1);let E={path:se,method:f,headers:L.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:ne,protocol:U,family:n,beforeRedirect:ah,beforeRedirects:{}};!l.isUndefined(i)&&(E.lookup=i),t.socketPath?E.socketPath=t.socketPath:(E.hostname=A.hostname,E.port=A.port,Do(E,t.proxy,U+"//"+A.hostname+(A.port?":"+A.port:"")+E.path));let Y,xe=rh.test(E.protocol);if(E.agent=xe?t.httpsAgent:t.httpAgent,t.transport?Y=t.transport:t.maxRedirects===0?Y=xe?So.default:Eo.default:(t.maxRedirects&&(E.maxRedirects=t.maxRedirects),t.beforeRedirect&&(E.beforeRedirects.config=t.beforeRedirect),Y=xe?sh:th),t.maxBodyLength>-1?E.maxBodyLength=t.maxBodyLength:E.maxBodyLength=1/0,t.insecureHTTPParser&&(E.insecureHTTPParser=t.insecureHTTPParser),g=Y.request(E,function(k){if(g.destroyed)return;let _=[k],$e=+k.headers["content-length"];if(Z){let pe=new Gr({length:l.toFiniteNumber($e),maxRate:l.toFiniteNumber(le)});Z&&pe.on("progress",Ht=>{Z(Object.assign(Ht,{download:!0}))}),_.push(pe)}let K=k,Ie=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":_.push(he.default.createUnzip(Ao)),delete k.headers["content-encoding"];break;case"deflate":_.push(new Po),_.push(he.default.createUnzip(Ao)),delete k.headers["content-encoding"];break;case"br":Co&&(_.push(he.default.createBrotliDecompress(eh)),delete k.headers["content-encoding"])}K=_.length>1?Oe.default.pipeline(_,l.noop):_[0];let tr=Oe.default.finished(K,()=>{tr(),v()}),de={status:k.statusCode,statusText:k.statusMessage,headers:new F(k.headers),config:t,request:Ie};if(u==="stream")de.data=K,Pe(r,a,de);else{let pe=[],Ht=0;K.on("data",function(J){pe.push(J),Ht+=J.length,t.maxContentLength>-1&&Ht>t.maxContentLength&&(h=!0,K.destroy(),a(new R("maxContentLength size of "+t.maxContentLength+" exceeded",R.ERR_BAD_RESPONSE,t,Ie)))}),K.on("aborted",function(){if(h)return;let J=new R("maxContentLength size of "+t.maxContentLength+" exceeded",R.ERR_BAD_RESPONSE,t,Ie);K.destroy(J),a(J)}),K.on("error",function(J){g.destroyed||a(R.from(J,null,t,Ie))}),K.on("end",function(){try{let J=pe.length===1?pe[0]:Buffer.concat(pe);u!=="arraybuffer"&&(J=J.toString(c),(!c||c==="utf8")&&(J=l.stripBOM(J))),de.data=J}catch(J){return a(R.from(J,null,t,de.request,de))}Pe(r,a,de)})}x.once("abort",pe=>{K.destroyed||(K.emit("error",pe),K.destroy())})}),x.once("abort",I=>{a(I),g.destroy(I)}),g.on("error",function(k){a(R.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)){a(new R("error trying to parse `config.timeout` to int",R.ERR_BAD_OPTION_VALUE,t,g));return}g.setTimeout(I,function(){if(y)return;let _=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",$e=t.transitional||Ye;t.timeoutErrorMessage&&(_=t.timeoutErrorMessage),a(new R(_,$e.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,t,g)),q()})}if(l.isStream(p)){let I=!1,k=!1;p.on("end",()=>{I=!0}),p.once("error",_=>{k=!0,g.destroy(_)}),p.on("close",()=>{!I&&!k&&q(new ue("Request stream has been aborted",t,g))}),p.pipe(g)}else g.end(p)})};var Oo=D.hasStandardBrowserEnv?function(){return{write:function(s,r,a,o,p,i){let n=[];n.push(s+"="+encodeURIComponent(r)),l.isNumber(a)&&n.push("expires="+new Date(a).toGMTString()),l.isString(o)&&n.push("path="+o),l.isString(p)&&n.push("domain="+p),i===!0&&n.push("secure"),document.cookie=n.join("; ")},read:function(s){let r=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var Ho=D.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),r;function a(o){let p=o;return t&&(s.setAttribute("href",p),p=s.href),s.setAttribute("href",p),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return r=a(window.location.href),function(p){let i=l.isString(p)?a(p):p;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}();function Qo(e,t){let s=0,r=rs(50,250);return a=>{let o=a.loaded,p=a.lengthComputable?a.total:void 0,i=o-s,n=r(i),u=o<=p;s=o;let c={loaded:o,total:p,progress:p?o/p:void 0,bytes:i,rate:n||void 0,estimated:n&&p&&u?(p-o)/n:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}var ph=typeof XMLHttpRequest<"u",Mo=ph&&function(e){return new Promise(function(s,r){let a=e.data,o=F.from(e.headers).normalize(),p=e.responseType,i;function n(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}let u;if(l.isFormData(a)){if(D.hasStandardBrowserEnv||D.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=_e(e.baseURL,e.url);c.open(e.method.toUpperCase(),Se(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function y(){if(!c)return;let g=F.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};Pe(function(T){s(T),n()},function(T){r(T),n()},v),c=null}if("onloadend"in c?c.onloadend=y:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(y)},c.onabort=function(){c&&(r(new R("Request aborted",R.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new R("Network Error",R.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",v=e.transitional||Ye;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),r(new R(x,v.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,c)),c=null},D.hasStandardBrowserEnv){let g=Ho(f)&&e.xsrfCookieName&&Oo.read(e.xsrfCookieName);g&&o.set(e.xsrfHeaderName,g)}a===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",Qo(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Qo(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=g=>{c&&(r(!g||g.type?new ue(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 h=Pt(f);if(h&&D.protocols.indexOf(h)===-1){r(new R("Unsupported protocol "+h+":",R.ERR_BAD_REQUEST,e));return}c.send(a||null)})};var Fr={http:Fo,xhr:Mo};l.forEach(Fr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var No=e=>`- ${e}`,ch=e=>l.isFunction(e)||e===null||e===!1,os={getAdapter:e=>{e=l.isArray(e)?e:[e];let{length:t}=e,s,r,a={};for(let o=0;o<t;o++){s=e[o];let p;if(r=s,!ch(s)&&(r=Fr[(p=String(s)).toLowerCase()],r===void 0))throw new R(`Unknown adapter '${p}'`);if(r)break;a[p||"#"+o]=r}if(!r){let o=Object.entries(a).map(([i,n])=>`adapter ${i} `+(n===!1?"is not supported by the environment":"is not available in the build")),p=t?o.length>1?`since :
|
|
13
13
|
`+o.map(No).join(`
|
|
14
|
-
`):" "+No(o[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Fr};function Or(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue(null,e)}function is(e){return Or(e),e.headers=F.from(e.headers),e.data=qt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),os.getAdapter(e.adapter||Xe.adapter)(e).then(function(r){return Or(e),r.data=qt.call(e,e.transformResponse,r),r.headers=F.from(r.headers),r},function(r){return vt(r)||(Or(e),r&&r.response&&(r.response.data=qt.call(e,e.transformResponse,r.response),r.response.headers=F.from(r.response.headers))),Promise.reject(r)})}var jo=e=>e instanceof F?e.toJSON():e;function be(e,t){t=t||{};let s={};function r(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 a(u,c,f){if(l.isUndefined(c)){if(!l.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function o(u,c){if(!l.isUndefined(c))return r(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function i(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}let n={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)=>a(jo(u),jo(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=n[c]||a,y=f(e[c],t[c],c);l.isUndefined(y)&&f!==i||(s[c]=y)}),s}var Hr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Hr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Vo={};Hr.transitional=function(t,s,r){function a(o,p){return"[Axios v"+Fe+"] Transitional option '"+o+"'"+p+(r?". "+r:"")}return(o,p,i)=>{if(t===!1)throw new R(a(p," has been removed"+(s?" in "+s:"")),R.ERR_DEPRECATED);return s&&!Vo[p]&&(Vo[p]=!0,console.warn(a(p," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(o,p,i):!0}};function uh(e,t,s){if(typeof e!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),a=r.length;for(;a-- >0;){let o=r[a],p=t[o];if(p){let i=e[o],n=i===void 0||p(i,o,e);if(n!==!0)throw new R("option "+o+" must be "+n,R.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}var ps={assertOptions:uh,validators:Hr};var Ce=ps.validators,at=class{constructor(t){this.defaults=t,this.interceptors={request:new hr,response:new hr}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=be(this.defaults,s);let{transitional:r,paramsSerializer:a,headers:o}=s;r!==void 0&&ps.assertOptions(r,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),a!=null&&(l.isFunction(a)?s.paramsSerializer={serialize:a}:ps.assertOptions(a,{encode:Ce.function,serialize:Ce.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=F.concat(p,o);let i=[],n=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(n=n&&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(!n){let g=[is.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 h=s;for(f=0;f<y;){let g=i[f++],x=i[f++];try{h=g(h)}catch(v){x.call(this,v);break}}try{c=is.call(this,h)}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=be(this.defaults,t);let s=_e(t.baseURL,t.url);return Se(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){at.prototype[t]=function(s,r){return this.request(be(r||{},{method:t,url:s,data:(r||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(r){return function(o,p,i){return this.request(be(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}at.prototype[t]=s(),at.prototype[t+"Form"]=s(!0)});var At=at;var Ct=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});let r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o,p=new Promise(i=>{r.subscribe(i),o=i}).then(a);return p.cancel=function(){r.unsubscribe(o)},p},t(function(o,p,i){r.reason||(r.reason=new ue(o,p,i),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new Ct(function(a){t=a}),cancel:t}}},zo=Ct;function Qr(e){return function(s){return e.apply(null,s)}}function Mr(e){return l.isObject(e)&&e.isAxiosError===!0}var Nr={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(Nr).forEach(([e,t])=>{Nr[t]=e});var $o=Nr;function Ko(e){let t=new At(e),s=xt(At.prototype.request,t);return l.extend(s,At.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Ko(be(e,a))},s}var G=Ko(Xe);G.Axios=At;G.CanceledError=ue;G.CancelToken=zo;G.isCancel=vt;G.VERSION=Fe;G.toFormData=we;G.AxiosError=R;G.Cancel=G.CanceledError;G.all=function(t){return Promise.all(t)};G.spread=Qr;G.isAxiosError=Mr;G.mergeConfig=be;G.AxiosHeaders=F;G.formToJSON=e=>Yt(l.isHTMLForm(e)?new FormData(e):e);G.getAdapter=os.getAdapter;G.HttpStatusCode=$o;G.default=G;var Re=G;var{Axios:lh,AxiosError:dh,CanceledError:mh,isCancel:gh,CancelToken:fh,VERSION:yh,all:xh,Cancel:hh,isAxiosError:bh,spread:Rh,toFormData:qh,AxiosHeaders:vh,HttpStatusCode:kh,formToJSON:Ih,getAdapter:wh,mergeConfig:Ph}=Re;var Jr={};Mt(Jr,{DEFAULT_OPTIONS:()=>ai,default:()=>Kr,exponentialDelay:()=>si,isIdempotentRequestError:()=>zr,isNetworkError:()=>Vr,isNetworkOrIdempotentRequestError:()=>$r,isRetryableError:()=>us,isSafeRequestError:()=>ti,linearDelay:()=>ri,namespace:()=>cs,retryAfter:()=>ls});var Zo=W(Yo(),1),cs="axios-retry";function Vr(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,Zo.default)(e)}var ei=["get","head","options"],Ah=ei.concat(["put","delete"]);function us(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function ti(e){return e.config?.method?us(e)&&ei.indexOf(e.config.method)!==-1:!1}function zr(e){return e.config?.method?us(e)&&Ah.indexOf(e.config.method)!==-1:!1}function $r(e){return Vr(e)||zr(e)}function ls(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 Ch(e=0,t=void 0){return Math.max(0,ls(t))}function si(e=0,t=void 0,s=100){let r=2**e*s,a=Math.max(r,ls(t)),o=a*.2*Math.random();return a+o}function ri(e=100){return(t=0,s=void 0)=>{let r=t*e;return Math.max(r,ls(s))}}var ai={retries:3,retryCondition:$r,retryDelay:Ch,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Bh(e,t){return{...ai,...t,...e[cs]}}function Xo(e,t,s=!1){let r=Bh(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||s)&&(r.lastRequestTime=Date.now()),e[cs]=r,r}function Uh(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 Lh(e,t){let{retries:s,retryCondition:r}=e,a=(e.retryCount||0)<s&&r(t);if(typeof a=="object")try{return await a!==!1}catch{return!1}return a}async function Eh(e,t,s,r){t.retryCount+=1;let{retryDelay:a,shouldResetTimeout:o,onRetry:p}=t,i=a(t.retryCount,s);if(Uh(e,r),!o&&r.timeout&&t.lastRequestTime){let n=Date.now()-t.lastRequestTime,u=r.timeout-n-i;if(u<=0)return Promise.reject(s);r.timeout=u}return r.transformRequest=[n=>n],await p(t.retryCount,s,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(n=>{let u=()=>{clearTimeout(c),n(e(r))},c=setTimeout(()=>{n(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener("abort",u)},i);r.signal?.addEventListener&&r.signal.addEventListener("abort",u,{once:!0})})}async function Sh(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var Be=(e,t)=>{let s=e.interceptors.request.use(a=>(Xo(a,t,!0),a[cs]?.validateResponse&&(a.validateStatus=()=>!1),a)),r=e.interceptors.response.use(null,async a=>{let{config:o}=a;if(!o)return Promise.reject(a);let p=Xo(o,t);return a.response&&p.validateResponse?.(a.response)?a.response:await Lh(p,a)?Eh(e,p,a,o):(await Sh(p,a),Promise.reject(a))});return{requestInterceptorId:s,responseInterceptorId:r}};Be.isNetworkError=Vr;Be.isSafeRequestError=ti;Be.isIdempotentRequestError=zr;Be.isNetworkOrIdempotentRequestError=$r;Be.exponentialDelay=si;Be.linearDelay=ri;Be.isRetryableError=us;var Kr=Be;var ni=W(require("crypto"));var _h={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Yr=typeof window<"u"&&typeof window.document<"u"?window.crypto:ni.default;Yr.getRandomValues||(Yr=_h);var B=class extends Error{constructor(s,r,a,o,p,i,n){super(o);this.code=s;this.description=r;this.type=a;this.message=o;this.error=p;this.id=i;this.metadata=n;this.id||(this.id=B.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,metadata:this.metadata}}static generateId(){let s=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],a=4,o=Array.from(Yr.getRandomValues(new Uint8Array(a))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},Gh=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,oi=e=>e instanceof B||Gh(e)&&e.isApiError===!0,Ue=class extends B{constructor(t,s,r,a){super(500,"An unknown error occurred","Unknown",t,s,r,a)}},ds=class extends B{constructor(t,s,r,a){super(500,"An internal error occurred","Internal",t,s,r,a)}},ms=class extends B{constructor(t,s,r,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,r,a)}},gs=class extends B{constructor(t,s,r,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,r,a)}},fs=class extends B{constructor(t,s,r,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,r,a)}},ys=class extends B{constructor(t,s,r,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,r,a)}},xs=class extends B{constructor(t,s,r,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,r,a)}},hs=class extends B{constructor(t,s,r,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,r,a)}},bs=class extends B{constructor(t,s,r,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,r,a)}},Rs=class extends B{constructor(t,s,r,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,r,a)}},qs=class extends B{constructor(t,s,r,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,r,a)}},vs=class extends B{constructor(t,s,r,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,r,a)}},ks=class extends B{constructor(t,s,r,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,r,a)}},Is=class extends B{constructor(t,s,r,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,r,a)}},ws=class extends B{constructor(t,s,r,a){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,r,a)}},Ps=class extends B{constructor(t,s,r,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,r,a)}},Ts=class extends B{constructor(t,s,r,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,r,a)}},As=class extends B{constructor(t,s,r,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,r,a)}},Cs=class extends B{constructor(t,s,r,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,r,a)}},Bs=class extends B{constructor(t,s,r,a){super(429,"The request has been rate limited.","RateLimited",t,s,r,a)}},Us=class extends B{constructor(t,s,r,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,r,a)}},Ls=class extends B{constructor(t,s,r,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,r,a)}},Es=class extends B{constructor(t,s,r,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,r,a)}},Ss=class extends B{constructor(t,s,r,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,r,a)}},Wh={Unknown:Ue,Internal:ds,Unauthorized:ms,Forbidden:gs,PayloadTooLarge:fs,InvalidPayload:ys,UnsupportedMediaType:xs,MethodNotFound:hs,ResourceNotFound:bs,InvalidJsonSchema:Rs,InvalidDataFormat:qs,InvalidIdentifier:vs,RelationConflict:ks,ReferenceConstraint:Is,ResourceLockedConflict:ws,ReferenceNotFound:Ps,InvalidQuery:Ts,Runtime:As,AlreadyExists:Cs,RateLimited:Bs,PaymentRequired:Us,QuotaExceeded:Ls,LimitExceeded:Es,BreakingChanges:Ss},_s=e=>oi(e)?e:e instanceof Error?new Ue(e.message,e):typeof e=="string"?new Ue(e):Dh(e);function Dh(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=Wh[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN",e.metadata):new Ue(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ue("An invalid error occurred: "+JSON.stringify(e))}var qe=class extends Error{constructor(s,r,a){super(s);this.innerError=r;this.file=a;this.name="FileUploadError"}};var Da=W(Xr()),kf=W(require("http")),If=W(require("https"));var Bt=W(Xr()),Vh="https://api.botpress.cloud",zh=6e4,$h="BP_API_URL",Kh="BP_BOT_ID",Jh="BP_INTEGRATION_ID",Yh="BP_WORKSPACE_ID",Xh="BP_TOKEN";function ii(e){let t=Zh(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let r=t.apiUrl??Vh,a=t.timeout??zh;return{apiUrl:r,timeout:a,withCredentials:Bt.isBrowser,headers:s}}function Zh(e){return Bt.isBrowser?e:Bt.isNode?eb(e):e}function eb(e){let t={...e,apiUrl:e.apiUrl??process.env[$h],botId:e.botId??process.env[Kh],integrationId:e.integrationId??process.env[Jh],workspaceId:e.workspaceId??process.env[Yh]},s=t.token??process.env[Xh];return s&&(t.token=s),t}var Ec=W(Lc()),Wq=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:r,headers:a,body:o}=e,p=Object.entries(a).filter(Wq),i=Object.fromEntries(p),n=Ec.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=n?[s,n].join("?"):s,c=["put","post","delete","patch"].includes(t.toLowerCase())?o:void 0;return{method:t,url:u,headers:i,data:c}};var Sc=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Gc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Dc=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 Oc=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Qc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Nc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Vc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var $c=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Jc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Xc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var eu=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 su=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var au=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 ou=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 pu=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 uu=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var du=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var gu=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var yu=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hu=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var Ru=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vu=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var Iu=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 Pu=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 Au=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bu=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 Lu=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 Su=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 Gu=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 Du=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 Ou=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Qu=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier,scheduleRegisterCall:e.scheduleRegisterCall}});var Nu=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Vu=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 $u=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 Ju=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xu=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 el=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 sl=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var al=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 ol=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var pl=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 ul=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 dl=e=>({path:`/v1/chat/tags/${encodeURIComponent(e.key)}/values`,headers:{},query:{nextToken:e.nextToken,type:e.type},params:{key:e.key},body:{}});var gl=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var yl=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var hl=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var Rl=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var vl=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var Il=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Pl=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Al=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var Bl=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var Ll=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var Sl=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Gl=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Dl=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,tags:e.tags,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var Ol=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,tags:e.tags,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var Ql=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var Nl=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,tags:e.tags,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var Vl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var $l=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,level:e.level,userId:e.userId,workflowId:e.workflowId,conversationId:e.conversationId,nextToken:e.nextToken},params:{id:e.id},body:{}});var Xl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var ed=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var sd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var ad=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var od=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var pd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var ud=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var dd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var gd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var yd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var hd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var Rd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var vd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var Id=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var Pd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var Ad=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Ld=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 Sd=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var Gd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Dd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var Od=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 Qd=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Nd=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken,handle:e.handle},params:{},body:{}});var Vd=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var $d=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Xd=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var em=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var sm=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var am=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var om=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var pm=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var um=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var dm=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var gm=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,layers:e.layers}});var ym=e=>({path:"/v1/admin/integrations/validate",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,layers:e.layers}});var hm=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,layers:e.layers}});var Rm=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/validate`,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,layers:e.layers}});var vm=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var Im=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Pm=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,level:e.level,userId:e.userId,conversationId:e.conversationId,nextToken:e.nextToken},params:{id:e.id},body:{}});var Am=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Bm=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Lm=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var Sm=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 Gm=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Dm=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Om=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 Qm=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Nm=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Vm=e=>({path:"/v1/admin/plugins",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,conversation:e.conversation,dependencies:e.dependencies,code:e.code}});var $m=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jm=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Xm=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,conversation:e.conversation,dependencies:e.dependencies,code:e.code}});var eg=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var sg=e=>({path:"/v1/admin/plugins",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var ag=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}/code/${encodeURIComponent(e.platform)}`,headers:{},query:{},params:{id:e.id,platform:e.platform},body:{}});var og=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var pg=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var ug=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var dg=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/activity`,headers:{},query:{type:e.type,timestampFrom:e.timestampFrom,timestampUntil:e.timestampUntil,nextToken:e.nextToken},params:{id:e.id},body:{}});var gg=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/daily-activity`,headers:{},query:{type:e.type,dateFrom:e.dateFrom,dateUntil:e.dateUntil,nextToken:e.nextToken},params:{id:e.id},body:{}});var yg=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var hg=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Rg=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var vg=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 Ig=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Pg=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection,tags:e.tags,ids:e.ids},params:{},body:{}});var Ag=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bg=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 Lg=e=>({path:`/v1/files/${encodeURIComponent(e.idOrKey)}/${encodeURIComponent(e.destinationKey)}`,headers:{"x-destination-bot-id":e["x-destination-bot-id"]},query:{},params:{idOrKey:e.idOrKey,destinationKey:e.destinationKey},body:{overwrite:e.overwrite}});var Sg=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 Gg=e=>({path:`/v1/files/${encodeURIComponent(e.id)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{id:e.id},body:{}});var Dg=e=>({path:"/v1/files/tags",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Og=e=>({path:`/v1/files/tags/${encodeURIComponent(e.tag)}/values`,headers:{},query:{nextToken:e.nextToken},params:{tag:e.tag},body:{}});var Qg=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Ng=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Vg=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 $g=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 Jg=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 Xg=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/export`,headers:{},query:{format:e.format,compress:e.compress},params:{table:e.table},body:{}});var ef=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/jobs`,headers:{},query:{},params:{table:e.table},body:{}});var sf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/import`,headers:{},query:{},params:{table:e.table},body:{fileId:e.fileId}});var af=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 of=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var cf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var lf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var mf=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 ff=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var xf=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 bf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var qf=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 Zs=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Gc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listConversations=async t=>{let{path:s,headers:r,query:a,body:o}=Dc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Oc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Qc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Nc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listParticipants=async t=>{let{path:s,headers:r,query:a,body:o}=Vc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};addParticipant=async t=>{let{path:s,headers:r,query:a,body:o}=$c(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getParticipant=async t=>{let{path:s,headers:r,query:a,body:o}=Jc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};removeParticipant=async t=>{let{path:s,headers:r,query:a,body:o}=Xc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createEvent=async t=>{let{path:s,headers:r,query:a,body:o}=eu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getEvent=async t=>{let{path:s,headers:r,query:a,body:o}=su(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listEvents=async t=>{let{path:s,headers:r,query:a,body:o}=au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createMessage=async t=>{let{path:s,headers:r,query:a,body:o}=ou(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateMessage=async t=>{let{path:s,headers:r,query:a,body:o}=pu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getMessage=async t=>{let{path:s,headers:r,query:a,body:o}=uu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateMessage=async t=>{let{path:s,headers:r,query:a,body:o}=du(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listMessages=async t=>{let{path:s,headers:r,query:a,body:o}=gu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteMessage=async t=>{let{path:s,headers:r,query:a,body:o}=yu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createUser=async t=>{let{path:s,headers:r,query:a,body:o}=hu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getUser=async t=>{let{path:s,headers:r,query:a,body:o}=Ru(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsers=async t=>{let{path:s,headers:r,query:a,body:o}=vu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateUser=async t=>{let{path:s,headers:r,query:a,body:o}=Iu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateUser=async t=>{let{path:s,headers:r,query:a,body:o}=Pu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteUser=async t=>{let{path:s,headers:r,query:a,body:o}=Au(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};setStateExpiry=async t=>{let{path:s,headers:r,query:a,body:o}=Bu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getState=async t=>{let{path:s,headers:r,query:a,body:o}=Lu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};setState=async t=>{let{path:s,headers:r,query:a,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrSetState=async t=>{let{path:s,headers:r,query:a,body:o}=Gu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};patchState=async t=>{let{path:s,headers:r,query:a,body:o}=Du(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};callAction=async t=>{let{path:s,headers:r,query:a,body:o}=Ou(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};configureIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Qu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTask=async t=>{let{path:s,headers:r,query:a,body:o}=Nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createTask=async t=>{let{path:s,headers:r,query:a,body:o}=Vu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateTask=async t=>{let{path:s,headers:r,query:a,body:o}=$u(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteTask=async t=>{let{path:s,headers:r,query:a,body:o}=Ju(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listTasks=async t=>{let{path:s,headers:r,query:a,body:o}=Xu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=el(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=al(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=ol(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkflows=async t=>{let{path:s,headers:r,query:a,body:o}=pl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=ul(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listTagValues=async t=>{let{path:s,headers:r,query:a,body:o}=dl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};trackAnalytics=async t=>{let{path:s,headers:r,query:a,body:o}=gl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};runVrl=async t=>{let{path:s,headers:r,query:a,body:o}=yl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAccount=async t=>{let{path:s,headers:r,query:a,body:o}=hl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateAccount=async t=>{let{path:s,headers:r,query:a,body:o}=Rl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPersonalAccessTokens=async t=>{let{path:s,headers:r,query:a,body:o}=vl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createPersonalAccessToken=async t=>{let{path:s,headers:r,query:a,body:o}=Il(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deletePersonalAccessToken=async t=>{let{path:s,headers:r,query:a,body:o}=Pl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};setAccountPreference=async t=>{let{path:s,headers:r,query:a,body:o}=Al(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAccountPreference=async t=>{let{path:s,headers:r,query:a,body:o}=Bl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPublicIntegrations=async t=>{let{path:s,headers:r,query:a,body:o}=Ll(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPublicIntegrationById=async t=>{let{path:s,headers:r,query:a,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPublicIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Gl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createBot=async t=>{let{path:s,headers:r,query:a,body:o}=Dl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateBot=async t=>{let{path:s,headers:r,query:a,body:o}=Ol(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};transferBot=async t=>{let{path:s,headers:r,query:a,body:o}=Ql(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBots=async t=>{let{path:s,headers:r,query:a,body:o}=Nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBot=async t=>{let{path:s,headers:r,query:a,body:o}=Vl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteBot=async t=>{let{path:s,headers:r,query:a,body:o}=$l(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotLogs=async t=>{let{path:s,headers:r,query:a,body:o}=Jl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotWebchat=async t=>{let{path:s,headers:r,query:a,body:o}=Xl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotAnalytics=async t=>{let{path:s,headers:r,query:a,body:o}=ed(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotIssue=async t=>{let{path:s,headers:r,query:a,body:o}=sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBotIssues=async t=>{let{path:s,headers:r,query:a,body:o}=ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteBotIssue=async t=>{let{path:s,headers:r,query:a,body:o}=od(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBotIssueEvents=async t=>{let{path:s,headers:r,query:a,body:o}=pd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBotVersions=async t=>{let{path:s,headers:r,query:a,body:o}=ud(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotVersion=async t=>{let{path:s,headers:r,query:a,body:o}=dd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createBotVersion=async t=>{let{path:s,headers:r,query:a,body:o}=gd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deployBotVersion=async t=>{let{path:s,headers:r,query:a,body:o}=yd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceInvoices=async t=>{let{path:s,headers:r,query:a,body:o}=hd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getUpcomingInvoice=async t=>{let{path:s,headers:r,query:a,body:o}=Rd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:r,query:a,body:o}=vd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Id(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPublicWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Pd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceUsages=async t=>{let{path:s,headers:r,query:a,body:o}=Bd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:r,query:a,body:o}=Ld(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:r,query:a,body:o}=Sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkspaceQuota=async t=>{let{path:s,headers:r,query:a,body:o}=Gd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceQuotas=async t=>{let{path:s,headers:r,query:a,body:o}=Dd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Od(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};checkHandleAvailability=async t=>{let{path:s,headers:r,query:a,body:o}=Qd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaces=async t=>{let{path:s,headers:r,query:a,body:o}=Nd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPublicWorkspaces=async t=>{let{path:s,headers:r,query:a,body:o}=Vd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=$d(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAuditRecords=async t=>{let{path:s,headers:r,query:a,body:o}=Jd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceMembers=async t=>{let{path:s,headers:r,query:a,body:o}=Xd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=em(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=sm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=am(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=om(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listIntegrationApiKeys=async t=>{let{path:s,headers:r,query:a,body:o}=pm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createIntegrationApiKey=async t=>{let{path:s,headers:r,query:a,body:o}=um(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:r,query:a,body:o}=dm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=gm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};validateIntegrationCreation=async t=>{let{path:s,headers:r,query:a,body:o}=ym(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=hm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};validateIntegrationUpdate=async t=>{let{path:s,headers:r,query:a,body:o}=Rm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listIntegrations=async t=>{let{path:s,headers:r,query:a,body:o}=vm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Im(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getIntegrationLogs=async t=>{let{path:s,headers:r,query:a,body:o}=Pm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getIntegrationByName=async t=>{let{path:s,headers:r,query:a,body:o}=Am(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Bm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};requestIntegrationVerification=async t=>{let{path:s,headers:r,query:a,body:o}=Lm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Sm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Gm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getInterfaceByName=async t=>{let{path:s,headers:r,query:a,body:o}=Dm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Om(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Qm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listInterfaces=async t=>{let{path:s,headers:r,query:a,body:o}=Nm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createPlugin=async t=>{let{path:s,headers:r,query:a,body:o}=Vm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPlugin=async t=>{let{path:s,headers:r,query:a,body:o}=$m(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPluginByName=async t=>{let{path:s,headers:r,query:a,body:o}=Jm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updatePlugin=async t=>{let{path:s,headers:r,query:a,body:o}=Xm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deletePlugin=async t=>{let{path:s,headers:r,query:a,body:o}=eg(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPlugins=async t=>{let{path:s,headers:r,query:a,body:o}=sg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPluginCode=async t=>{let{path:s,headers:r,query:a,body:o}=ag(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getUsage=async t=>{let{path:s,headers:r,query:a,body:o}=og(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getMultipleUsages=async t=>{let{path:s,headers:r,query:a,body:o}=pg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsageHistory=async t=>{let{path:s,headers:r,query:a,body:o}=ug(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsageActivity=async t=>{let{path:s,headers:r,query:a,body:o}=dg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsageActivityDaily=async t=>{let{path:s,headers:r,query:a,body:o}=gg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};changeAISpendQuota=async t=>{let{path:s,headers:r,query:a,body:o}=yg(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listActivities=async t=>{let{path:s,headers:r,query:a,body:o}=hg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};introspect=async t=>{let{path:s,headers:r,query:a,body:o}=Rg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};upsertFile=async t=>{let{path:s,headers:r,query:a,body:o}=vg(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteFile=async t=>{let{path:s,headers:r,query:a,body:o}=Ig(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFiles=async t=>{let{path:s,headers:r,query:a,body:o}=Pg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getFile=async t=>{let{path:s,headers:r,query:a,body:o}=Ag(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateFileMetadata=async t=>{let{path:s,headers:r,query:a,body:o}=Bg(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};copyFile=async t=>{let{path:s,headers:r,query:a,body:o}=Lg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};searchFiles=async t=>{let{path:s,headers:r,query:a,body:o}=Sg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFilePassages=async t=>{let{path:s,headers:r,query:a,body:o}=Gg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFileTags=async t=>{let{path:s,headers:r,query:a,body:o}=Dg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFileTagValues=async t=>{let{path:s,headers:r,query:a,body:o}=Og(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listTables=async t=>{let{path:s,headers:r,query:a,body:o}=Qg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTable=async t=>{let{path:s,headers:r,query:a,body:o}=Ng(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateTable=async t=>{let{path:s,headers:r,query:a,body:o}=Vg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createTable=async t=>{let{path:s,headers:r,query:a,body:o}=$g(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};duplicateTable=async t=>{let{path:s,headers:r,query:a,body:o}=Jg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};exportTable=async t=>{let{path:s,headers:r,query:a,body:o}=Xg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTableJobs=async t=>{let{path:s,headers:r,query:a,body:o}=ef(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};importTable=async t=>{let{path:s,headers:r,query:a,body:o}=sf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateTable=async t=>{let{path:s,headers:r,query:a,body:o}=af(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};renameTableColumn=async t=>{let{path:s,headers:r,query:a,body:o}=of(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteTable=async t=>{let{path:s,headers:r,query:a,body:o}=cf(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTableRow=async t=>{let{path:s,headers:r,query:a,body:o}=lf(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};findTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=mf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=ff(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=xf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=bf(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};upsertTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=qf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})}};function m(e){return Re.isAxiosError(e)&&e.response?.data?_s(e.response.data):_s(e)}var O=class{constructor(t){this._list=t}async*[Symbol.asyncIterator](){let t;do{let{items:s,meta:r}=await this._list({nextToken:t});t=r.nextToken;for(let a of s)yield a}while(t)}async collect(t={}){let s=t.limit??Number.POSITIVE_INFINITY,r=[],a=0;for await(let o of this)if(r.push(o),a++,a>=s)break;return r}},er=class{constructor(t){this._client=t}conversations=t=>new O(({nextToken:s})=>this._client.listConversations({nextToken:s,...t}).then(r=>({...r,items:r.conversations})));participants=t=>new O(({nextToken:s})=>this._client.listParticipants({nextToken:s,...t}).then(r=>({...r,items:r.participants})));events=t=>new O(({nextToken:s})=>this._client.listEvents({nextToken:s,...t}).then(r=>({...r,items:r.events})));messages=t=>new O(({nextToken:s})=>this._client.listMessages({nextToken:s,...t}).then(r=>({...r,items:r.messages})));users=t=>new O(({nextToken:s})=>this._client.listUsers({nextToken:s,...t}).then(r=>({...r,items:r.users})));tasks=t=>new O(({nextToken:s})=>this._client.listTasks({nextToken:s,...t}).then(r=>({...r,items:r.tasks})));publicIntegrations=t=>new O(({nextToken:s})=>this._client.listPublicIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));bots=t=>new O(({nextToken:s})=>this._client.listBots({nextToken:s,...t}).then(r=>({...r,items:r.bots})));botIssues=t=>new O(({nextToken:s})=>this._client.listBotIssues({nextToken:s,...t}).then(r=>({...r,items:r.issues})));workspaces=t=>new O(({nextToken:s})=>this._client.listWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));publicWorkspaces=t=>new O(({nextToken:s})=>this._client.listPublicWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));workspaceMembers=t=>new O(({nextToken:s})=>this._client.listWorkspaceMembers({nextToken:s,...t}).then(r=>({...r,items:r.members})));integrations=t=>new O(({nextToken:s})=>this._client.listIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));interfaces=t=>new O(({nextToken:s})=>this._client.listInterfaces({nextToken:s,...t}).then(r=>({...r,items:r.interfaces})));activities=t=>new O(({nextToken:s})=>this._client.listActivities({nextToken:s,...t}).then(r=>({...r,items:r.activities})));files=t=>new O(({nextToken:s})=>this._client.listFiles({nextToken:s,...t}).then(r=>({...r,items:r.files})));filePassages=t=>new O(({nextToken:s})=>this._client.listFilePassages({nextToken:s,...t}).then(r=>({...r,items:r.passages})))};var wf=100*1024*1024,Fq=wf,Oq=wf,Fa=class extends Zs{config;constructor(t={}){let s=ii(t),{apiUrl:r,headers:a,withCredentials:o,timeout:p}=s,i=Re.create({baseURL:r,headers:a,withCredentials:o,timeout:p,maxBodyLength:Fq,maxContentLength:Oq,httpAgent:Da.isNode?new kf.default.Agent({keepAlive:!0}):void 0,httpsAgent:Da.isNode?new If.default.Agent({keepAlive:!0}):void 0});super(i),t.retry&&Kr(i,t.retry),this.config=s}get list(){return new er(this)}uploadFile=async({key:t,index:s,tags:r,contentType:a,accessPolicies:o,content:p,url:i,indexing:n,expiresAt:u,publicContentImmediatelyAccessible:c})=>{if(i&&p)throw new qe("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await Re.get(i,{responseType:"arraybuffer"}).then(x=>x.data).catch(x=>{throw new qe(`Failed to download file from provided URL: ${x.message}`,x)})),!p)throw new qe("No content was provided for the file");let f,y;if(typeof p=="string"){let v=new TextEncoder().encode(p);f=v,y=v.byteLength}else if(p instanceof Uint8Array)f=p,y=f.byteLength;else if(p instanceof ArrayBuffer)f=p,y=f.byteLength;else if(p instanceof Blob)f=p,y=p.size;else throw new qe("The provided content is not supported");let{file:h}=await this.upsertFile({key:t,tags:r,index:s,accessPolicies:o,contentType:a,size:y,expiresAt:u,indexing:n,publicContentImmediatelyAccessible:c}),g={"Content-Type":h.contentType};c&&(g["x-amz-tagging"]="public=true");try{await Re.put(h.uploadUrl,f,{maxBodyLength:1/0,headers:g})}catch(x){throw new qe(`Failed to upload file: ${x.message}`,x,h)}return{file:{...h,size:y}}}};0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceLockedConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,UploadFileError,axios,axiosRetry,errorFrom,isApiError});
|
|
14
|
+
`):" "+No(o[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Fr};function Or(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue(null,e)}function is(e){return Or(e),e.headers=F.from(e.headers),e.data=qt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),os.getAdapter(e.adapter||Xe.adapter)(e).then(function(r){return Or(e),r.data=qt.call(e,e.transformResponse,r),r.headers=F.from(r.headers),r},function(r){return vt(r)||(Or(e),r&&r.response&&(r.response.data=qt.call(e,e.transformResponse,r.response),r.response.headers=F.from(r.response.headers))),Promise.reject(r)})}var jo=e=>e instanceof F?e.toJSON():e;function be(e,t){t=t||{};let s={};function r(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 a(u,c,f){if(l.isUndefined(c)){if(!l.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function o(u,c){if(!l.isUndefined(c))return r(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function i(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}let n={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)=>a(jo(u),jo(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=n[c]||a,y=f(e[c],t[c],c);l.isUndefined(y)&&f!==i||(s[c]=y)}),s}var Hr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Hr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Vo={};Hr.transitional=function(t,s,r){function a(o,p){return"[Axios v"+Fe+"] Transitional option '"+o+"'"+p+(r?". "+r:"")}return(o,p,i)=>{if(t===!1)throw new R(a(p," has been removed"+(s?" in "+s:"")),R.ERR_DEPRECATED);return s&&!Vo[p]&&(Vo[p]=!0,console.warn(a(p," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(o,p,i):!0}};function uh(e,t,s){if(typeof e!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),a=r.length;for(;a-- >0;){let o=r[a],p=t[o];if(p){let i=e[o],n=i===void 0||p(i,o,e);if(n!==!0)throw new R("option "+o+" must be "+n,R.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}var ps={assertOptions:uh,validators:Hr};var Ce=ps.validators,at=class{constructor(t){this.defaults=t,this.interceptors={request:new hr,response:new hr}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=be(this.defaults,s);let{transitional:r,paramsSerializer:a,headers:o}=s;r!==void 0&&ps.assertOptions(r,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),a!=null&&(l.isFunction(a)?s.paramsSerializer={serialize:a}:ps.assertOptions(a,{encode:Ce.function,serialize:Ce.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=F.concat(p,o);let i=[],n=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(s)===!1||(n=n&&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(!n){let g=[is.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 h=s;for(f=0;f<y;){let g=i[f++],x=i[f++];try{h=g(h)}catch(v){x.call(this,v);break}}try{c=is.call(this,h)}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=be(this.defaults,t);let s=_e(t.baseURL,t.url);return Se(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){at.prototype[t]=function(s,r){return this.request(be(r||{},{method:t,url:s,data:(r||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(r){return function(o,p,i){return this.request(be(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}at.prototype[t]=s(),at.prototype[t+"Form"]=s(!0)});var At=at;var Ct=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});let r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o,p=new Promise(i=>{r.subscribe(i),o=i}).then(a);return p.cancel=function(){r.unsubscribe(o)},p},t(function(o,p,i){r.reason||(r.reason=new ue(o,p,i),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new Ct(function(a){t=a}),cancel:t}}},zo=Ct;function Qr(e){return function(s){return e.apply(null,s)}}function Mr(e){return l.isObject(e)&&e.isAxiosError===!0}var Nr={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(Nr).forEach(([e,t])=>{Nr[t]=e});var $o=Nr;function Ko(e){let t=new At(e),s=xt(At.prototype.request,t);return l.extend(s,At.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Ko(be(e,a))},s}var G=Ko(Xe);G.Axios=At;G.CanceledError=ue;G.CancelToken=zo;G.isCancel=vt;G.VERSION=Fe;G.toFormData=we;G.AxiosError=R;G.Cancel=G.CanceledError;G.all=function(t){return Promise.all(t)};G.spread=Qr;G.isAxiosError=Mr;G.mergeConfig=be;G.AxiosHeaders=F;G.formToJSON=e=>Yt(l.isHTMLForm(e)?new FormData(e):e);G.getAdapter=os.getAdapter;G.HttpStatusCode=$o;G.default=G;var Re=G;var{Axios:lh,AxiosError:dh,CanceledError:mh,isCancel:gh,CancelToken:fh,VERSION:yh,all:xh,Cancel:hh,isAxiosError:bh,spread:Rh,toFormData:qh,AxiosHeaders:vh,HttpStatusCode:kh,formToJSON:Ih,getAdapter:wh,mergeConfig:Ph}=Re;var Jr={};Mt(Jr,{DEFAULT_OPTIONS:()=>ai,default:()=>Kr,exponentialDelay:()=>si,isIdempotentRequestError:()=>zr,isNetworkError:()=>Vr,isNetworkOrIdempotentRequestError:()=>$r,isRetryableError:()=>us,isSafeRequestError:()=>ti,linearDelay:()=>ri,namespace:()=>cs,retryAfter:()=>ls});var Zo=W(Yo(),1),cs="axios-retry";function Vr(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,Zo.default)(e)}var ei=["get","head","options"],Ah=ei.concat(["put","delete"]);function us(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function ti(e){return e.config?.method?us(e)&&ei.indexOf(e.config.method)!==-1:!1}function zr(e){return e.config?.method?us(e)&&Ah.indexOf(e.config.method)!==-1:!1}function $r(e){return Vr(e)||zr(e)}function ls(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 Ch(e=0,t=void 0){return Math.max(0,ls(t))}function si(e=0,t=void 0,s=100){let r=2**e*s,a=Math.max(r,ls(t)),o=a*.2*Math.random();return a+o}function ri(e=100){return(t=0,s=void 0)=>{let r=t*e;return Math.max(r,ls(s))}}var ai={retries:3,retryCondition:$r,retryDelay:Ch,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Bh(e,t){return{...ai,...t,...e[cs]}}function Xo(e,t,s=!1){let r=Bh(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||s)&&(r.lastRequestTime=Date.now()),e[cs]=r,r}function Uh(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 Lh(e,t){let{retries:s,retryCondition:r}=e,a=(e.retryCount||0)<s&&r(t);if(typeof a=="object")try{return await a!==!1}catch{return!1}return a}async function Eh(e,t,s,r){t.retryCount+=1;let{retryDelay:a,shouldResetTimeout:o,onRetry:p}=t,i=a(t.retryCount,s);if(Uh(e,r),!o&&r.timeout&&t.lastRequestTime){let n=Date.now()-t.lastRequestTime,u=r.timeout-n-i;if(u<=0)return Promise.reject(s);r.timeout=u}return r.transformRequest=[n=>n],await p(t.retryCount,s,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(n=>{let u=()=>{clearTimeout(c),n(e(r))},c=setTimeout(()=>{n(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener("abort",u)},i);r.signal?.addEventListener&&r.signal.addEventListener("abort",u,{once:!0})})}async function Sh(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var Be=(e,t)=>{let s=e.interceptors.request.use(a=>(Xo(a,t,!0),a[cs]?.validateResponse&&(a.validateStatus=()=>!1),a)),r=e.interceptors.response.use(null,async a=>{let{config:o}=a;if(!o)return Promise.reject(a);let p=Xo(o,t);return a.response&&p.validateResponse?.(a.response)?a.response:await Lh(p,a)?Eh(e,p,a,o):(await Sh(p,a),Promise.reject(a))});return{requestInterceptorId:s,responseInterceptorId:r}};Be.isNetworkError=Vr;Be.isSafeRequestError=ti;Be.isIdempotentRequestError=zr;Be.isNetworkOrIdempotentRequestError=$r;Be.exponentialDelay=si;Be.linearDelay=ri;Be.isRetryableError=us;var Kr=Be;var ni=W(require("crypto"));var _h={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Yr=typeof window<"u"&&typeof window.document<"u"?window.crypto:ni.default;Yr.getRandomValues||(Yr=_h);var B=class extends Error{constructor(s,r,a,o,p,i,n){super(o);this.code=s;this.description=r;this.type=a;this.message=o;this.error=p;this.id=i;this.metadata=n;this.id||(this.id=B.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,metadata:this.metadata}}static generateId(){let s=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],a=4,o=Array.from(Yr.getRandomValues(new Uint8Array(a))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},Gh=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,oi=e=>e instanceof B||Gh(e)&&e.isApiError===!0,Ue=class extends B{constructor(t,s,r,a){super(500,"An unknown error occurred","Unknown",t,s,r,a)}},ds=class extends B{constructor(t,s,r,a){super(500,"An internal error occurred","Internal",t,s,r,a)}},ms=class extends B{constructor(t,s,r,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,r,a)}},gs=class extends B{constructor(t,s,r,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,r,a)}},fs=class extends B{constructor(t,s,r,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,r,a)}},ys=class extends B{constructor(t,s,r,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,r,a)}},xs=class extends B{constructor(t,s,r,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,r,a)}},hs=class extends B{constructor(t,s,r,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,r,a)}},bs=class extends B{constructor(t,s,r,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,r,a)}},Rs=class extends B{constructor(t,s,r,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,r,a)}},qs=class extends B{constructor(t,s,r,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,r,a)}},vs=class extends B{constructor(t,s,r,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,r,a)}},ks=class extends B{constructor(t,s,r,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,r,a)}},Is=class extends B{constructor(t,s,r,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,r,a)}},ws=class extends B{constructor(t,s,r,a){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,s,r,a)}},Ps=class extends B{constructor(t,s,r,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,r,a)}},Ts=class extends B{constructor(t,s,r,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,r,a)}},As=class extends B{constructor(t,s,r,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,r,a)}},Cs=class extends B{constructor(t,s,r,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,r,a)}},Bs=class extends B{constructor(t,s,r,a){super(429,"The request has been rate limited.","RateLimited",t,s,r,a)}},Us=class extends B{constructor(t,s,r,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,r,a)}},Ls=class extends B{constructor(t,s,r,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,r,a)}},Es=class extends B{constructor(t,s,r,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,r,a)}},Ss=class extends B{constructor(t,s,r,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,r,a)}},Wh={Unknown:Ue,Internal:ds,Unauthorized:ms,Forbidden:gs,PayloadTooLarge:fs,InvalidPayload:ys,UnsupportedMediaType:xs,MethodNotFound:hs,ResourceNotFound:bs,InvalidJsonSchema:Rs,InvalidDataFormat:qs,InvalidIdentifier:vs,RelationConflict:ks,ReferenceConstraint:Is,ResourceLockedConflict:ws,ReferenceNotFound:Ps,InvalidQuery:Ts,Runtime:As,AlreadyExists:Cs,RateLimited:Bs,PaymentRequired:Us,QuotaExceeded:Ls,LimitExceeded:Es,BreakingChanges:Ss},_s=e=>oi(e)?e:e instanceof Error?new Ue(e.message,e):typeof e=="string"?new Ue(e):Dh(e);function Dh(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=Wh[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN",e.metadata):new Ue(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Ue("An invalid error occurred: "+JSON.stringify(e))}var qe=class extends Error{constructor(s,r,a){super(s);this.innerError=r;this.file=a;this.name="FileUploadError"}};var Da=W(Xr()),kf=W(require("http")),If=W(require("https"));var Bt=W(Xr()),Vh="https://api.botpress.cloud",zh=6e4,$h="BP_API_URL",Kh="BP_BOT_ID",Jh="BP_INTEGRATION_ID",Yh="BP_WORKSPACE_ID",Xh="BP_TOKEN";function ii(e){let t=Zh(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let r=t.apiUrl??Vh,a=t.timeout??zh;return{apiUrl:r,timeout:a,withCredentials:Bt.isBrowser,headers:s}}function Zh(e){return Bt.isBrowser?e:Bt.isNode?eb(e):e}function eb(e){let t={...e,apiUrl:e.apiUrl??process.env[$h],botId:e.botId??process.env[Kh],integrationId:e.integrationId??process.env[Jh],workspaceId:e.workspaceId??process.env[Yh]},s=t.token??process.env[Xh];return s&&(t.token=s),t}var Ec=W(Lc()),Wq=e=>e[1]!==void 0,d=e=>{let{method:t,path:s,query:r,headers:a,body:o}=e,p=Object.entries(a).filter(Wq),i=Object.fromEntries(p),n=Ec.default.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=n?[s,n].join("?"):s,c=["put","post","delete","patch"].includes(t.toLowerCase())?o:void 0;return{method:t,url:u,headers:i,data:c}};var Sc=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Gc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Dc=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 Oc=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Qc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Nc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Vc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var $c=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Jc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Xc=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var eu=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 su=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var au=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 ou=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 pu=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 uu=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var du=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var gu=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var yu=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hu=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var Ru=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var vu=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var Iu=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 Pu=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 Au=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bu=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 Lu=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 Su=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 Gu=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 Du=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 Ou=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Qu=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier,scheduleRegisterCall:e.scheduleRegisterCall}});var Nu=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Vu=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 $u=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 Ju=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xu=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 el=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 sl=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var al=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 ol=e=>({path:`/v1/chat/workflows/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var pl=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 ul=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 dl=e=>({path:`/v1/chat/tags/${encodeURIComponent(e.key)}/values`,headers:{},query:{nextToken:e.nextToken,type:e.type},params:{key:e.key},body:{}});var gl=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var yl=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var hl=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var Rl=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var vl=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var Il=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Pl=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Al=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var Bl=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var Ll=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var Sl=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Gl=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Dl=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,tags:e.tags,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var Ol=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,tags:e.tags,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var Ql=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var Nl=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,tags:e.tags,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}});var Vl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var $l=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,level:e.level,userId:e.userId,workflowId:e.workflowId,conversationId:e.conversationId,nextToken:e.nextToken},params:{id:e.id},body:{}});var Xl=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var ed=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var sd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var ad=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var od=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var pd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var ud=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}});var dd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}});var gd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}});var yd=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}});var hd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var Rd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var vd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var Id=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var Pd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var Ad=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Ld=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 Sd=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var Gd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Dd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var Od=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 Qd=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var Nd=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken,handle:e.handle},params:{},body:{}});var Vd=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}});var $d=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jd=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Xd=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var em=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var sm=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var am=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var om=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var pm=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var um=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var dm=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var gm=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,layers:e.layers}});var ym=e=>({path:"/v1/admin/integrations/validate",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,layers:e.layers}});var hm=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,layers:e.layers}});var Rm=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/validate`,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,layers:e.layers}});var vm=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var Im=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Pm=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,level:e.level,userId:e.userId,conversationId:e.conversationId,nextToken:e.nextToken},params:{id:e.id},body:{}});var Am=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Bm=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Lm=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}});var Sm=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 Gm=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Dm=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Om=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 Qm=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Nm=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var Vm=e=>({path:"/v1/admin/plugins",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,conversation:e.conversation,dependencies:e.dependencies,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description}});var $m=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Jm=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Xm=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,user:e.user,conversation:e.conversation,dependencies:e.dependencies,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description}});var eg=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var sg=e=>({path:"/v1/admin/plugins",headers:{},query:{nextToken:e.nextToken,name:e.name},params:{},body:{}});var ag=e=>({path:`/v1/admin/plugins/${encodeURIComponent(e.id)}/code/${encodeURIComponent(e.platform)}`,headers:{},query:{},params:{id:e.id,platform:e.platform},body:{}});var og=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var pg=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}});var ug=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var dg=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/activity`,headers:{},query:{type:e.type,timestampFrom:e.timestampFrom,timestampUntil:e.timestampUntil,nextToken:e.nextToken},params:{id:e.id},body:{}});var gg=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/daily-activity`,headers:{},query:{type:e.type,dateFrom:e.dateFrom,dateUntil:e.dateUntil,nextToken:e.nextToken},params:{id:e.id},body:{}});var yg=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var hg=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Rg=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var vg=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 Ig=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Pg=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection,tags:e.tags,ids:e.ids},params:{},body:{}});var Ag=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bg=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 Lg=e=>({path:`/v1/files/${encodeURIComponent(e.idOrKey)}/${encodeURIComponent(e.destinationKey)}`,headers:{"x-destination-bot-id":e["x-destination-bot-id"]},query:{},params:{idOrKey:e.idOrKey,destinationKey:e.destinationKey},body:{overwrite:e.overwrite}});var Sg=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 Gg=e=>({path:`/v1/files/${encodeURIComponent(e.id)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{id:e.id},body:{}});var Dg=e=>({path:"/v1/files/tags",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var Og=e=>({path:`/v1/files/tags/${encodeURIComponent(e.tag)}/values`,headers:{},query:{nextToken:e.nextToken},params:{tag:e.tag},body:{}});var Qg=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var Ng=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Vg=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 $g=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 Jg=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 Xg=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/export`,headers:{},query:{format:e.format,compress:e.compress},params:{table:e.table},body:{}});var ef=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/jobs`,headers:{},query:{},params:{table:e.table},body:{}});var sf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/import`,headers:{},query:{},params:{table:e.table},body:{fileId:e.fileId}});var af=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 of=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var cf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var lf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var mf=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 ff=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var xf=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 bf=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var qf=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 Zs=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Sc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Gc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listConversations=async t=>{let{path:s,headers:r,query:a,body:o}=Dc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Oc(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Qc(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteConversation=async t=>{let{path:s,headers:r,query:a,body:o}=Nc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listParticipants=async t=>{let{path:s,headers:r,query:a,body:o}=Vc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};addParticipant=async t=>{let{path:s,headers:r,query:a,body:o}=$c(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getParticipant=async t=>{let{path:s,headers:r,query:a,body:o}=Jc(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};removeParticipant=async t=>{let{path:s,headers:r,query:a,body:o}=Xc(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createEvent=async t=>{let{path:s,headers:r,query:a,body:o}=eu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getEvent=async t=>{let{path:s,headers:r,query:a,body:o}=su(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listEvents=async t=>{let{path:s,headers:r,query:a,body:o}=au(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createMessage=async t=>{let{path:s,headers:r,query:a,body:o}=ou(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateMessage=async t=>{let{path:s,headers:r,query:a,body:o}=pu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getMessage=async t=>{let{path:s,headers:r,query:a,body:o}=uu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateMessage=async t=>{let{path:s,headers:r,query:a,body:o}=du(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listMessages=async t=>{let{path:s,headers:r,query:a,body:o}=gu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteMessage=async t=>{let{path:s,headers:r,query:a,body:o}=yu(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createUser=async t=>{let{path:s,headers:r,query:a,body:o}=hu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getUser=async t=>{let{path:s,headers:r,query:a,body:o}=Ru(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsers=async t=>{let{path:s,headers:r,query:a,body:o}=vu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateUser=async t=>{let{path:s,headers:r,query:a,body:o}=Iu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateUser=async t=>{let{path:s,headers:r,query:a,body:o}=Pu(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteUser=async t=>{let{path:s,headers:r,query:a,body:o}=Au(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};setStateExpiry=async t=>{let{path:s,headers:r,query:a,body:o}=Bu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getState=async t=>{let{path:s,headers:r,query:a,body:o}=Lu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};setState=async t=>{let{path:s,headers:r,query:a,body:o}=Su(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrSetState=async t=>{let{path:s,headers:r,query:a,body:o}=Gu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};patchState=async t=>{let{path:s,headers:r,query:a,body:o}=Du(t),i=(this.props.toAxiosRequest??d)({method:"patch",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};callAction=async t=>{let{path:s,headers:r,query:a,body:o}=Ou(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};configureIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Qu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTask=async t=>{let{path:s,headers:r,query:a,body:o}=Nu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createTask=async t=>{let{path:s,headers:r,query:a,body:o}=Vu(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateTask=async t=>{let{path:s,headers:r,query:a,body:o}=$u(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteTask=async t=>{let{path:s,headers:r,query:a,body:o}=Ju(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listTasks=async t=>{let{path:s,headers:r,query:a,body:o}=Xu(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=el(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=al(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=ol(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkflows=async t=>{let{path:s,headers:r,query:a,body:o}=pl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateWorkflow=async t=>{let{path:s,headers:r,query:a,body:o}=ul(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listTagValues=async t=>{let{path:s,headers:r,query:a,body:o}=dl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};trackAnalytics=async t=>{let{path:s,headers:r,query:a,body:o}=gl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};runVrl=async t=>{let{path:s,headers:r,query:a,body:o}=yl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAccount=async t=>{let{path:s,headers:r,query:a,body:o}=hl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateAccount=async t=>{let{path:s,headers:r,query:a,body:o}=Rl(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPersonalAccessTokens=async t=>{let{path:s,headers:r,query:a,body:o}=vl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createPersonalAccessToken=async t=>{let{path:s,headers:r,query:a,body:o}=Il(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deletePersonalAccessToken=async t=>{let{path:s,headers:r,query:a,body:o}=Pl(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};setAccountPreference=async t=>{let{path:s,headers:r,query:a,body:o}=Al(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAccountPreference=async t=>{let{path:s,headers:r,query:a,body:o}=Bl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPublicIntegrations=async t=>{let{path:s,headers:r,query:a,body:o}=Ll(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPublicIntegrationById=async t=>{let{path:s,headers:r,query:a,body:o}=Sl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPublicIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Gl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createBot=async t=>{let{path:s,headers:r,query:a,body:o}=Dl(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateBot=async t=>{let{path:s,headers:r,query:a,body:o}=Ol(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};transferBot=async t=>{let{path:s,headers:r,query:a,body:o}=Ql(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBots=async t=>{let{path:s,headers:r,query:a,body:o}=Nl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBot=async t=>{let{path:s,headers:r,query:a,body:o}=Vl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteBot=async t=>{let{path:s,headers:r,query:a,body:o}=$l(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotLogs=async t=>{let{path:s,headers:r,query:a,body:o}=Jl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotWebchat=async t=>{let{path:s,headers:r,query:a,body:o}=Xl(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotAnalytics=async t=>{let{path:s,headers:r,query:a,body:o}=ed(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotIssue=async t=>{let{path:s,headers:r,query:a,body:o}=sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBotIssues=async t=>{let{path:s,headers:r,query:a,body:o}=ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteBotIssue=async t=>{let{path:s,headers:r,query:a,body:o}=od(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBotIssueEvents=async t=>{let{path:s,headers:r,query:a,body:o}=pd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listBotVersions=async t=>{let{path:s,headers:r,query:a,body:o}=ud(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getBotVersion=async t=>{let{path:s,headers:r,query:a,body:o}=dd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createBotVersion=async t=>{let{path:s,headers:r,query:a,body:o}=gd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deployBotVersion=async t=>{let{path:s,headers:r,query:a,body:o}=yd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceInvoices=async t=>{let{path:s,headers:r,query:a,body:o}=hd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getUpcomingInvoice=async t=>{let{path:s,headers:r,query:a,body:o}=Rd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:r,query:a,body:o}=vd(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Id(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPublicWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Pd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Ad(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceUsages=async t=>{let{path:s,headers:r,query:a,body:o}=Bd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:r,query:a,body:o}=Ld(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:r,query:a,body:o}=Sd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkspaceQuota=async t=>{let{path:s,headers:r,query:a,body:o}=Gd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceQuotas=async t=>{let{path:s,headers:r,query:a,body:o}=Dd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=Od(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};checkHandleAvailability=async t=>{let{path:s,headers:r,query:a,body:o}=Qd(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaces=async t=>{let{path:s,headers:r,query:a,body:o}=Nd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPublicWorkspaces=async t=>{let{path:s,headers:r,query:a,body:o}=Vd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteWorkspace=async t=>{let{path:s,headers:r,query:a,body:o}=$d(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getAuditRecords=async t=>{let{path:s,headers:r,query:a,body:o}=Jd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listWorkspaceMembers=async t=>{let{path:s,headers:r,query:a,body:o}=Xd(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=em(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=sm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=am(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateWorkspaceMember=async t=>{let{path:s,headers:r,query:a,body:o}=om(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listIntegrationApiKeys=async t=>{let{path:s,headers:r,query:a,body:o}=pm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createIntegrationApiKey=async t=>{let{path:s,headers:r,query:a,body:o}=um(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:r,query:a,body:o}=dm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=gm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};validateIntegrationCreation=async t=>{let{path:s,headers:r,query:a,body:o}=ym(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=hm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};validateIntegrationUpdate=async t=>{let{path:s,headers:r,query:a,body:o}=Rm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listIntegrations=async t=>{let{path:s,headers:r,query:a,body:o}=vm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Im(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getIntegrationLogs=async t=>{let{path:s,headers:r,query:a,body:o}=Pm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getIntegrationByName=async t=>{let{path:s,headers:r,query:a,body:o}=Am(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteIntegration=async t=>{let{path:s,headers:r,query:a,body:o}=Bm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};requestIntegrationVerification=async t=>{let{path:s,headers:r,query:a,body:o}=Lm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Sm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Gm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getInterfaceByName=async t=>{let{path:s,headers:r,query:a,body:o}=Dm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Om(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteInterface=async t=>{let{path:s,headers:r,query:a,body:o}=Qm(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listInterfaces=async t=>{let{path:s,headers:r,query:a,body:o}=Nm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createPlugin=async t=>{let{path:s,headers:r,query:a,body:o}=Vm(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPlugin=async t=>{let{path:s,headers:r,query:a,body:o}=$m(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPluginByName=async t=>{let{path:s,headers:r,query:a,body:o}=Jm(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updatePlugin=async t=>{let{path:s,headers:r,query:a,body:o}=Xm(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deletePlugin=async t=>{let{path:s,headers:r,query:a,body:o}=eg(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listPlugins=async t=>{let{path:s,headers:r,query:a,body:o}=sg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getPluginCode=async t=>{let{path:s,headers:r,query:a,body:o}=ag(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getUsage=async t=>{let{path:s,headers:r,query:a,body:o}=og(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getMultipleUsages=async t=>{let{path:s,headers:r,query:a,body:o}=pg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsageHistory=async t=>{let{path:s,headers:r,query:a,body:o}=ug(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsageActivity=async t=>{let{path:s,headers:r,query:a,body:o}=dg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listUsageActivityDaily=async t=>{let{path:s,headers:r,query:a,body:o}=gg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};changeAISpendQuota=async t=>{let{path:s,headers:r,query:a,body:o}=yg(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listActivities=async t=>{let{path:s,headers:r,query:a,body:o}=hg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};introspect=async t=>{let{path:s,headers:r,query:a,body:o}=Rg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};upsertFile=async t=>{let{path:s,headers:r,query:a,body:o}=vg(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteFile=async t=>{let{path:s,headers:r,query:a,body:o}=Ig(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFiles=async t=>{let{path:s,headers:r,query:a,body:o}=Pg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getFile=async t=>{let{path:s,headers:r,query:a,body:o}=Ag(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateFileMetadata=async t=>{let{path:s,headers:r,query:a,body:o}=Bg(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};copyFile=async t=>{let{path:s,headers:r,query:a,body:o}=Lg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};searchFiles=async t=>{let{path:s,headers:r,query:a,body:o}=Sg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFilePassages=async t=>{let{path:s,headers:r,query:a,body:o}=Gg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFileTags=async t=>{let{path:s,headers:r,query:a,body:o}=Dg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listFileTagValues=async t=>{let{path:s,headers:r,query:a,body:o}=Og(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};listTables=async t=>{let{path:s,headers:r,query:a,body:o}=Qg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTable=async t=>{let{path:s,headers:r,query:a,body:o}=Ng(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getOrCreateTable=async t=>{let{path:s,headers:r,query:a,body:o}=Vg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createTable=async t=>{let{path:s,headers:r,query:a,body:o}=$g(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};duplicateTable=async t=>{let{path:s,headers:r,query:a,body:o}=Jg(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};exportTable=async t=>{let{path:s,headers:r,query:a,body:o}=Xg(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTableJobs=async t=>{let{path:s,headers:r,query:a,body:o}=ef(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};importTable=async t=>{let{path:s,headers:r,query:a,body:o}=sf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateTable=async t=>{let{path:s,headers:r,query:a,body:o}=af(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};renameTableColumn=async t=>{let{path:s,headers:r,query:a,body:o}=of(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteTable=async t=>{let{path:s,headers:r,query:a,body:o}=cf(t),i=(this.props.toAxiosRequest??d)({method:"delete",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};getTableRow=async t=>{let{path:s,headers:r,query:a,body:o}=lf(t),i=(this.props.toAxiosRequest??d)({method:"get",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};findTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=mf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};createTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=ff(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};deleteTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=xf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};updateTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=bf(t),i=(this.props.toAxiosRequest??d)({method:"put",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})};upsertTableRows=async t=>{let{path:s,headers:r,query:a,body:o}=qf(t),i=(this.props.toAxiosRequest??d)({method:"post",path:s,headers:{...r},query:{...a},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw m(n)})}};function m(e){return Re.isAxiosError(e)&&e.response?.data?_s(e.response.data):_s(e)}var O=class{constructor(t){this._list=t}async*[Symbol.asyncIterator](){let t;do{let{items:s,meta:r}=await this._list({nextToken:t});t=r.nextToken;for(let a of s)yield a}while(t)}async collect(t={}){let s=t.limit??Number.POSITIVE_INFINITY,r=[],a=0;for await(let o of this)if(r.push(o),a++,a>=s)break;return r}},er=class{constructor(t){this._client=t}conversations=t=>new O(({nextToken:s})=>this._client.listConversations({nextToken:s,...t}).then(r=>({...r,items:r.conversations})));participants=t=>new O(({nextToken:s})=>this._client.listParticipants({nextToken:s,...t}).then(r=>({...r,items:r.participants})));events=t=>new O(({nextToken:s})=>this._client.listEvents({nextToken:s,...t}).then(r=>({...r,items:r.events})));messages=t=>new O(({nextToken:s})=>this._client.listMessages({nextToken:s,...t}).then(r=>({...r,items:r.messages})));users=t=>new O(({nextToken:s})=>this._client.listUsers({nextToken:s,...t}).then(r=>({...r,items:r.users})));tasks=t=>new O(({nextToken:s})=>this._client.listTasks({nextToken:s,...t}).then(r=>({...r,items:r.tasks})));publicIntegrations=t=>new O(({nextToken:s})=>this._client.listPublicIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));bots=t=>new O(({nextToken:s})=>this._client.listBots({nextToken:s,...t}).then(r=>({...r,items:r.bots})));botIssues=t=>new O(({nextToken:s})=>this._client.listBotIssues({nextToken:s,...t}).then(r=>({...r,items:r.issues})));workspaces=t=>new O(({nextToken:s})=>this._client.listWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));publicWorkspaces=t=>new O(({nextToken:s})=>this._client.listPublicWorkspaces({nextToken:s,...t}).then(r=>({...r,items:r.workspaces})));workspaceMembers=t=>new O(({nextToken:s})=>this._client.listWorkspaceMembers({nextToken:s,...t}).then(r=>({...r,items:r.members})));integrations=t=>new O(({nextToken:s})=>this._client.listIntegrations({nextToken:s,...t}).then(r=>({...r,items:r.integrations})));interfaces=t=>new O(({nextToken:s})=>this._client.listInterfaces({nextToken:s,...t}).then(r=>({...r,items:r.interfaces})));activities=t=>new O(({nextToken:s})=>this._client.listActivities({nextToken:s,...t}).then(r=>({...r,items:r.activities})));files=t=>new O(({nextToken:s})=>this._client.listFiles({nextToken:s,...t}).then(r=>({...r,items:r.files})));filePassages=t=>new O(({nextToken:s})=>this._client.listFilePassages({nextToken:s,...t}).then(r=>({...r,items:r.passages})))};var wf=100*1024*1024,Fq=wf,Oq=wf,Fa=class extends Zs{config;constructor(t={}){let s=ii(t),{apiUrl:r,headers:a,withCredentials:o,timeout:p}=s,i=Re.create({baseURL:r,headers:a,withCredentials:o,timeout:p,maxBodyLength:Fq,maxContentLength:Oq,httpAgent:Da.isNode?new kf.default.Agent({keepAlive:!0}):void 0,httpsAgent:Da.isNode?new If.default.Agent({keepAlive:!0}):void 0});super(i),t.retry&&Kr(i,t.retry),this.config=s}get list(){return new er(this)}uploadFile=async({key:t,index:s,tags:r,contentType:a,accessPolicies:o,content:p,url:i,indexing:n,expiresAt:u,publicContentImmediatelyAccessible:c})=>{if(i&&p)throw new qe("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await Re.get(i,{responseType:"arraybuffer"}).then(x=>x.data).catch(x=>{throw new qe(`Failed to download file from provided URL: ${x.message}`,x)})),!p)throw new qe("No content was provided for the file");let f,y;if(typeof p=="string"){let v=new TextEncoder().encode(p);f=v,y=v.byteLength}else if(p instanceof Uint8Array)f=p,y=f.byteLength;else if(p instanceof ArrayBuffer)f=p,y=f.byteLength;else if(p instanceof Blob)f=p,y=p.size;else throw new qe("The provided content is not supported");let{file:h}=await this.upsertFile({key:t,tags:r,index:s,accessPolicies:o,contentType:a,size:y,expiresAt:u,indexing:n,publicContentImmediatelyAccessible:c}),g={"Content-Type":h.contentType};c&&(g["x-amz-tagging"]="public=true");try{await Re.put(h.uploadUrl,f,{maxBodyLength:1/0,headers:g})}catch(x){throw new qe(`Failed to upload file: ${x.message}`,x,h)}return{file:{...h,size:y}}}};0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceLockedConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,UploadFileError,axios,axiosRetry,errorFrom,isApiError});
|
|
15
15
|
/*! Bundled license information:
|
|
16
16
|
|
|
17
17
|
mime-db/index.js:
|