@botpress/client 0.19.0 → 0.20.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 +5 -5
- package/.turbo/turbo-generate.log +1 -1
- package/dist/bundle.cjs +1 -1
- package/dist/bundle.cjs.map +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
- package/tests/manual/file-upload.test.ts +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/client@0.
|
|
2
|
+
> @botpress/client@0.20.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.20.0 build:type /home/runner/work/botpress/botpress/packages/client
|
|
7
7
|
> tsc --emitDeclarationOnly --declaration
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/client@0.
|
|
10
|
+
> @botpress/client@0.20.0 build:node /home/runner/work/botpress/botpress/packages/client
|
|
11
11
|
> ts-node -T ./build.ts --node
|
|
12
12
|
|
|
13
13
|
Done
|
|
14
14
|
|
|
15
|
-
> @botpress/client@0.
|
|
15
|
+
> @botpress/client@0.20.0 build:browser /home/runner/work/botpress/botpress/packages/client
|
|
16
16
|
> ts-node -T ./build.ts --browser
|
|
17
17
|
|
|
18
18
|
Done
|
|
19
19
|
|
|
20
|
-
> @botpress/client@0.
|
|
20
|
+
> @botpress/client@0.20.0 build:bundle /home/runner/work/botpress/botpress/packages/client
|
|
21
21
|
> ts-node -T ./build.ts --bundle
|
|
22
22
|
|
|
23
23
|
Done
|
package/dist/bundle.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){let a=new this(t);return s.forEach(r=>a.set(r)),a}static accessor(t){let a=(this[en]=this[en]={accessors:{}}).accessors,r=this.prototype;function o(p){let i=ut(p);a[i]||(wm(r,p),a[i]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};$e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);l.reduceDescriptors($e.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[s]=a}}});l.freezeMethods($e);var W=$e;function lt(e,t){let s=this||ze,a=t||s,r=W.from(a.headers),o=a.data;return l.forEach(e,function(i){o=i.call(s,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function dt(e){return!!(e&&e.__CANCEL__)}function tn(e,t,s){h.call(this,e??"canceled",h.ERR_CANCELED,t,s),this.name="CanceledError"}l.inherits(tn,h,{__CANCEL__:!0});var ie=tn;function ve(e,t,s){let a=s.config.validateStatus;!s.status||!a||a(s.status)?e(s):t(new h("Request failed with status code "+s.status,[h.ERR_BAD_REQUEST,h.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Ys(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Be(e,t){return e&&!Ys(t)?Xs(e,t):t}var Fn=D(an(),1),Hn=D(require("http"),1),Mn=D(require("https"),1),Qn=D(require("util"),1),jn=D(Tn(),1),fe=D(require("zlib"),1);var Ee="1.6.1";function xt(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var pg=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function pa(e,t,s){let a=s&&s.Blob||G.classes.Blob,r=xt(e);if(t===void 0&&a&&(t=!0),r==="data"){e=r.length?e.slice(r.length+1):e;let o=pg.exec(e);if(!o)throw new h("Invalid URL",h.ERR_INVALID_URL);let p=o[1],i=o[2],n=o[3],u=Buffer.from(decodeURIComponent(n),i?"base64":"utf8");if(t){if(!a)throw new h("Blob is not supported",h.ERR_NOT_SUPPORT);return new a([u],{type:p})}return u}throw new h("Unsupported protocol "+r,h.ERR_NOT_SUPPORT)}var _e=D(require("stream"),1);var Cn=D(require("stream"),1);function cg(e,t){let s=0,a=1e3/t,r=null;return function(p,i){let n=Date.now();if(p||n-s>a)return r&&(clearTimeout(r),r=null),s=n,e.apply(null,i);r||(r=setTimeout(()=>(r=null,s=Date.now(),e.apply(null,i)),a-(n-s)))}}var An=cg;function ug(e,t){e=e||10;let s=new Array(e),a=new Array(e),r=0,o=0,p;return t=t!==void 0?t:1e3,function(n){let u=Date.now(),c=a[o];p||(p=u),s[r]=n,a[r]=u;let m=o,x=0;for(;m!==r;)x+=s[m++],m=m%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),u-p<t)return;let R=c&&u-c;return R?Math.round(x*1e3/R):void 0}}var Ht=ug;var Mt=Symbol("internals"),ca=class extends Cn.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,a=this[Mt]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},r=Ht(a.ticksRate*t.samplesCount,a.timeWindow);this.on("newListener",i=>{i==="progress"&&(a.isCaptured||(a.isCaptured=!0))});let o=0;a.updateProgress=An(function(){let n=a.length,u=a.bytesSeen,c=u-o;if(!c||s.destroyed)return;let m=r(c);o=u,process.nextTick(()=>{s.emit("progress",{loaded:u,total:n,progress:n?u/n:void 0,bytes:c,rate:m||void 0,estimated:m&&n&&u<=n?(n-u)/m:void 0})})},a.ticksRate);let p=()=>{a.updateProgress(!0)};this.once("end",p),this.once("error",p)}_read(t){let s=this[Mt];return s.onReadCallback&&s.onReadCallback(),super._read(t)}_transform(t,s,a){let r=this,o=this[Mt],p=o.maxRate,i=this.readableHighWaterMark,n=o.timeWindow,u=1e3/n,c=p/u,m=o.minChunkSize!==!1?Math.max(o.minChunkSize,c*.01):0;function x(d,y){let v=Buffer.byteLength(d);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&o.updateProgress(),r.push(d)?process.nextTick(y):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(y)}}let R=(d,y)=>{let v=Buffer.byteLength(d),b=null,T=i,A,B=0;if(p){let U=Date.now();(!o.ts||(B=U-o.ts)>=n)&&(o.ts=U,A=c-o.bytes,o.bytes=A<0?-A:0,B=0),A=c-o.bytes}if(p){if(A<=0)return setTimeout(()=>{y(null,d)},n-B);A<T&&(T=A)}T&&v>T&&v-T>m&&(b=d.subarray(T),d=d.subarray(0,T)),x(d,b?()=>{process.nextTick(y,null,b)}:y)};R(t,function d(y,v){if(y)return a(y);v?R(v,d):a(null)})}setLength(t){return this[Mt].length=+t,this}},ua=ca;var Nn=D(require("events"),1);var Bn=require("util"),Un=require("stream");var{asyncIterator:Pn}=Symbol,lg=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Pn]?yield*e[Pn]():yield e},Qt=lg;var dg=l.ALPHABET.ALPHA_DIGIT+"-_",yt=new Bn.TextEncoder,ke=`\r
|
|
12
12
|
`,mg=yt.encode(ke),gg=2,la=class{constructor(t,s){let{escapeName:a}=this.constructor,r=l.isString(s),o=`Content-Disposition: form-data; name="${a(t)}"${!r&&s.name?`; filename="${a(s.name)}"`:""}${ke}`;r?s=yt.encode(String(s).replace(/\r?\n|\r\n?/g,ke)):o+=`Content-Type: ${s.type||"application/octet-stream"}${ke}`,this.headers=yt.encode(o+ke),this.contentLength=r?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+gg,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;l.isTypedArray(t)?yield t:yield*Qt(t),yield mg}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},fg=(e,t,s)=>{let{tag:a="form-data-boundary",size:r=25,boundary:o=a+"-"+l.generateString(r,dg)}=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=yt.encode("--"+o+ke),i=yt.encode("--"+o+"--"+ke+ke),n=i.byteLength,u=Array.from(e.entries()).map(([m,x])=>{let R=new la(m,x);return n+=R.size,R});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),Un.Readable.from(async function*(){for(let m of u)yield p,yield*m.encode();yield i}())},Sn=fg;var Ln=D(require("stream"),1),da=class extends Ln.default.Transform{__transform(t,s,a){this.push(t),a()}_transform(t,s,a){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,s)}this.__transform(t,s,a)}},En=da;var xg=(e,t)=>l.isAsyncFn(e)?function(...s){let a=s.pop();e.apply(this,s).then(r=>{try{t?a(null,...t(r)):a(null,r)}catch(o){a(o)}},a)}:e,_n=xg;var Gn={flush:fe.default.constants.Z_SYNC_FLUSH,finishFlush:fe.default.constants.Z_SYNC_FLUSH},yg={flush:fe.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:fe.default.constants.BROTLI_OPERATION_FLUSH},Wn=l.isFunction(fe.default.createBrotliDecompress),{http:hg,https:bg}=jn.default,Rg=/https:?/,Dn=G.protocols.map(e=>e+":");function vg(e){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e)}function zn(e,t,s){let a=t;if(!a&&a!==!1){let r=(0,Fn.getProxyForUrl)(s);r&&(a=new URL(r))}if(a){if(a.username&&(a.auth=(a.username||"")+":"+(a.password||"")),a.auth){(a.auth.username||a.auth.password)&&(a.auth=(a.auth.username||"")+":"+(a.auth.password||""));let o=Buffer.from(a.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let r=a.hostname||a.host;e.hostname=r,e.host=r,e.port=a.port,e.path=s,a.protocol&&(e.protocol=a.protocol.includes(":")?a.protocol:`${a.protocol}:`)}e.beforeRedirects.proxy=function(o){zn(o,t,o.href)}}var qg=typeof process<"u"&&l.kindOf(process)==="process",kg=e=>new Promise((t,s)=>{let a,r,o=(n,u)=>{r||(r=!0,a&&a(n,u))},p=n=>{o(n),t(n)},i=n=>{o(n,!0),s(n)};e(p,i,n=>a=n).catch(i)}),Ig=({address:e,family:t})=>{if(!l.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},On=(e,t)=>Ig(l.isObject(e)?e:{address:e,family:t}),$n=qg&&function(t){return kg(async function(a,r,o){let{data:p,lookup:i,family:n}=t,{responseType:u,responseEncoding:c}=t,m=t.method.toUpperCase(),x,R=!1,d;if(i){let k=_n(i,q=>l.isArray(q)?q:[q]);i=(q,E,Me)=>{k(q,E,(z,be,Cs)=>{let ce=l.isArray(be)?be.map(ne=>On(ne)):[On(be,Cs)];E.all?Me(z,ce):Me(z,ce[0].address,ce[0].family)})}}let y=new Nn.default,v=()=>{t.cancelToken&&t.cancelToken.unsubscribe(b),t.signal&&t.signal.removeEventListener("abort",b),y.removeAllListeners()};o((k,q)=>{x=!0,q&&(R=!0,v())});function b(k){y.emit("abort",!k||k.type?new ie(null,t,d):k)}y.once("abort",r),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(b),t.signal&&(t.signal.aborted?b():t.signal.addEventListener("abort",b)));let T=Be(t.baseURL,t.url),A=new URL(T,"http://localhost"),B=A.protocol||Dn[0];if(B==="data:"){let k;if(m!=="GET")return ve(a,r,{status:405,statusText:"method not allowed",headers:{},config:t});try{k=pa(t.url,u==="blob",{Blob:t.env&&t.env.Blob})}catch(q){throw h.from(q,h.ERR_BAD_REQUEST,t)}return u==="text"?(k=k.toString(c),(!c||c==="utf8")&&(k=l.stripBOM(k))):u==="stream"&&(k=_e.default.Readable.from(k)),ve(a,r,{data:k,status:200,statusText:"OK",headers:new W,config:t})}if(Dn.indexOf(B)===-1)return r(new h("Unsupported protocol "+B,h.ERR_BAD_REQUEST,t));let U=W.from(t.headers).normalize();U.set("User-Agent","axios/"+Ee,!1);let J=t.onDownloadProgress,Y=t.onUploadProgress,X=t.maxRate,N,pe;if(l.isSpecCompliantForm(p)){let k=U.getContentType(/boundary=([-_\w\d]{10,70})/i);p=Sn(p,q=>{U.set(q)},{tag:`axios-${Ee}-boundary`,boundary:k&&k[1]||void 0})}else if(l.isFormData(p)&&l.isFunction(p.getHeaders)){if(U.set(p.getHeaders()),!U.hasContentLength())try{let k=await Qn.default.promisify(p.getLength).call(p);Number.isFinite(k)&&k>=0&&U.setContentLength(k)}catch{}}else if(l.isBlob(p))p.size&&U.setContentType(p.type||"application/octet-stream"),U.setContentLength(p.size||0),p=_e.default.Readable.from(Qt(p));else if(p&&!l.isStream(p)){if(!Buffer.isBuffer(p))if(l.isArrayBuffer(p))p=Buffer.from(new Uint8Array(p));else if(l.isString(p))p=Buffer.from(p,"utf-8");else return r(new h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",h.ERR_BAD_REQUEST,t));if(U.setContentLength(p.length,!1),t.maxBodyLength>-1&&p.length>t.maxBodyLength)return r(new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,t))}let me=l.toFiniteNumber(U.getContentLength());l.isArray(X)?(N=X[0],pe=X[1]):N=pe=X,p&&(Y||N)&&(l.isStream(p)||(p=_e.default.Readable.from(p,{objectMode:!1})),p=_e.default.pipeline([p,new ua({length:me,maxRate:l.toFiniteNumber(N)})],l.noop),Y&&p.on("progress",k=>{Y(Object.assign(k,{upload:!0}))}));let se;if(t.auth){let k=t.auth.username||"",q=t.auth.password||"";se=k+":"+q}if(!se&&A.username){let k=A.username,q=A.password;se=k+":"+q}se&&U.delete("authorization");let Z;try{Z=Pe(A.pathname+A.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(k){let q=new Error(k.message);return q.config=t,q.url=t.url,q.exists=!0,r(q)}U.set("Accept-Encoding","gzip, compress, deflate"+(Wn?", br":""),!1);let S={path:Z,method:m,headers:U.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:se,protocol:B,family:n,beforeRedirect:vg,beforeRedirects:{}};!l.isUndefined(i)&&(S.lookup=i),t.socketPath?S.socketPath=t.socketPath:(S.hostname=A.hostname,S.port=A.port,zn(S,t.proxy,B+"//"+A.hostname+(A.port?":"+A.port:"")+S.path));let K,ge=Rg.test(S.protocol);if(S.agent=ge?t.httpsAgent:t.httpAgent,t.transport?K=t.transport:t.maxRedirects===0?K=ge?Mn.default:Hn.default:(t.maxRedirects&&(S.maxRedirects=t.maxRedirects),t.beforeRedirect&&(S.beforeRedirects.config=t.beforeRedirect),K=ge?bg:hg),t.maxBodyLength>-1?S.maxBodyLength=t.maxBodyLength:S.maxBodyLength=1/0,t.insecureHTTPParser&&(S.insecureHTTPParser=t.insecureHTTPParser),d=K.request(S,function(q){if(d.destroyed)return;let E=[q],Me=+q.headers["content-length"];if(J){let ne=new ua({length:l.toFiniteNumber(Me),maxRate:l.toFiniteNumber(pe)});J&&ne.on("progress",Tt=>{J(Object.assign(Tt,{download:!0}))}),E.push(ne)}let z=q,be=q.req||d;if(t.decompress!==!1&&q.headers["content-encoding"])switch((m==="HEAD"||q.statusCode===204)&&delete q.headers["content-encoding"],(q.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":E.push(fe.default.createUnzip(Gn)),delete q.headers["content-encoding"];break;case"deflate":E.push(new En),E.push(fe.default.createUnzip(Gn)),delete q.headers["content-encoding"];break;case"br":Wn&&(E.push(fe.default.createBrotliDecompress(yg)),delete q.headers["content-encoding"])}z=E.length>1?_e.default.pipeline(E,l.noop):E[0];let Cs=_e.default.finished(z,()=>{Cs(),v()}),ce={status:q.statusCode,statusText:q.statusMessage,headers:new W(q.headers),config:t,request:be};if(u==="stream")ce.data=z,ve(a,r,ce);else{let ne=[],Tt=0;z.on("data",function($){ne.push($),Tt+=$.length,t.maxContentLength>-1&&Tt>t.maxContentLength&&(R=!0,z.destroy(),r(new h("maxContentLength size of "+t.maxContentLength+" exceeded",h.ERR_BAD_RESPONSE,t,be)))}),z.on("aborted",function(){if(R)return;let $=new h("maxContentLength size of "+t.maxContentLength+" exceeded",h.ERR_BAD_RESPONSE,t,be);z.destroy($),r($)}),z.on("error",function($){d.destroyed||r(h.from($,null,t,be))}),z.on("end",function(){try{let $=ne.length===1?ne[0]:Buffer.concat(ne);u!=="arraybuffer"&&($=$.toString(c),(!c||c==="utf8")&&($=l.stripBOM($))),ce.data=$}catch($){return r(h.from($,null,t,ce.request,ce))}ve(a,r,ce)})}y.once("abort",ne=>{z.destroyed||(z.emit("error",ne),z.destroy())})}),y.once("abort",k=>{r(k),d.destroy(k)}),d.on("error",function(q){r(h.from(q,null,t,d))}),d.on("socket",function(q){q.setKeepAlive(!0,1e3*60)}),t.timeout){let k=parseInt(t.timeout,10);if(Number.isNaN(k)){r(new h("error trying to parse `config.timeout` to int",h.ERR_BAD_OPTION_VALUE,t,d));return}d.setTimeout(k,function(){if(x)return;let E=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Me=t.transitional||Ne;t.timeoutErrorMessage&&(E=t.timeoutErrorMessage),r(new h(E,Me.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,d)),b()})}if(l.isStream(p)){let k=!1,q=!1;p.on("end",()=>{k=!0}),p.once("error",E=>{q=!0,d.destroy(E)}),p.on("close",()=>{!k&&!q&&b(new ie("Request stream has been aborted",t,d))}),p.pipe(d)}else d.end(p)})};var Kn=G.hasStandardBrowserEnv?function(){return{write:function(s,a,r,o,p,i){let n=[];n.push(s+"="+encodeURIComponent(a)),l.isNumber(r)&&n.push("expires="+new Date(r).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 a=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove:function(s){this.write(s,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();var Vn=G.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a"),a;function r(o){let p=o;return t&&(s.setAttribute("href",p),p=s.href),s.setAttribute("href",p),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}return a=r(window.location.href),function(p){let i=l.isString(p)?r(p):p;return i.protocol===a.protocol&&i.host===a.host}}():function(){return function(){return!0}}();function Jn(e,t){let s=0,a=Ht(50,250);return r=>{let o=r.loaded,p=r.lengthComputable?r.total:void 0,i=o-s,n=a(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:r};c[t?"download":"upload"]=!0,e(c)}}var wg=typeof XMLHttpRequest<"u",Yn=wg&&function(e){return new Promise(function(s,a){let r=e.data,o=W.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(r)){if(G.hasStandardBrowserEnv||G.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){let[d,...y]=u?u.split(";").map(v=>v.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...y].join("; "))}}let c=new XMLHttpRequest;if(e.auth){let d=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(d+":"+y))}let m=Be(e.baseURL,e.url);c.open(e.method.toUpperCase(),Pe(m,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function x(){if(!c)return;let d=W.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),v={data:!p||p==="text"||p==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:d,config:e,request:c};ve(function(T){s(T),n()},function(T){a(T),n()},v),c=null}if("onloadend"in c?c.onloadend=x:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(x)},c.onabort=function(){c&&(a(new h("Request aborted",h.ECONNABORTED,e,c)),c=null)},c.onerror=function(){a(new h("Network Error",h.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",v=e.transitional||Ne;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),a(new h(y,v.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,c)),c=null},G.hasStandardBrowserEnv){let d=Vn(m)&&e.xsrfCookieName&&Kn.read(e.xsrfCookieName);d&&o.set(e.xsrfHeaderName,d)}r===void 0&&o.setContentType(null),"setRequestHeader"in c&&l.forEach(o.toJSON(),function(y,v){c.setRequestHeader(v,y)}),l.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),p&&p!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Jn(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Jn(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=d=>{c&&(a(!d||d.type?new ie(null,e,c):d),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));let R=xt(m);if(R&&G.protocols.indexOf(R)===-1){a(new h("Unsupported protocol "+R+":",h.ERR_BAD_REQUEST,e));return}c.send(r||null)})};var ma={http:$n,xhr:Yn};l.forEach(ma,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Xn=e=>`- ${e}`,Tg=e=>l.isFunction(e)||e===null||e===!1,jt={getAdapter:e=>{e=l.isArray(e)?e:[e];let{length:t}=e,s,a,r={};for(let o=0;o<t;o++){s=e[o];let p;if(a=s,!Tg(s)&&(a=ma[(p=String(s)).toLowerCase()],a===void 0))throw new h(`Unknown adapter '${p}'`);if(a)break;r[p||"#"+o]=a}if(!a){let o=Object.entries(r).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(Xn).join(`
|
|
14
|
-
`):" "+Xn(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return a},adapters:ma};function ga(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ie(null,e)}function Nt(e){return ga(e),e.headers=W.from(e.headers),e.data=lt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jt.getAdapter(e.adapter||ze.adapter)(e).then(function(a){return ga(e),a.data=lt.call(e,e.transformResponse,a),a.headers=W.from(a.headers),a},function(a){return dt(a)||(ga(e),a&&a.response&&(a.response.data=lt.call(e,e.transformResponse,a.response),a.response.headers=W.from(a.response.headers))),Promise.reject(a)})}var Zn=e=>e instanceof W?e.toJSON():e;function xe(e,t){t=t||{};let s={};function a(u,c,m){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:m},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function r(u,c,m){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u,m)}else return a(u,c,m)}function o(u,c){if(!l.isUndefined(c))return a(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u)}else return a(void 0,c)}function i(u,c,m){if(m in t)return a(u,c);if(m in e)return a(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)=>r(Zn(u),Zn(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let m=n[c]||r,x=m(e[c],t[c],c);l.isUndefined(x)&&m!==i||(s[c]=x)}),s}var fa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fa[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});var eo={};fa.transitional=function(t,s,a){function r(o,p){return"[Axios v"+Ee+"] Transitional option '"+o+"'"+p+(a?". "+a:"")}return(o,p,i)=>{if(t===!1)throw new h(r(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!eo[p]&&(eo[p]=!0,console.warn(r(p," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(o,p,i):!0}};function Ag(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),r=a.length;for(;r-- >0;){let o=a[r],p=t[o];if(p){let i=e[o],n=i===void 0||p(i,o,e);if(n!==!0)throw new h("option "+o+" must be "+n,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var zt={assertOptions:Ag,validators:fa};var Ie=zt.validators,Xe=class{constructor(t){this.defaults=t,this.interceptors={request:new zs,response:new zs}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=xe(this.defaults,s);let{transitional:a,paramsSerializer:r,headers:o}=s;a!==void 0&&zt.assertOptions(a,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),r!=null&&(l.isFunction(r)?s.paramsSerializer={serialize:r}:zt.assertOptions(r,{encode:Ie.function,serialize:Ie.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"],d=>{delete o[d]}),s.headers=W.concat(p,o);let i=[],n=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(s)===!1||(n=n&&y.synchronous,i.unshift(y.fulfilled,y.rejected))});let u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,m=0,x;if(!n){let d=[Nt.bind(this),void 0];for(d.unshift.apply(d,i),d.push.apply(d,u),x=d.length,c=Promise.resolve(s);m<x;)c=c.then(d[m++],d[m++]);return c}x=i.length;let R=s;for(m=0;m<x;){let d=i[m++],y=i[m++];try{R=d(R)}catch(v){y.call(this,v);break}}try{c=Nt.call(this,R)}catch(d){return Promise.reject(d)}for(m=0,x=u.length;m<x;)c=c.then(u[m++],u[m++]);return c}getUri(t){t=xe(this.defaults,t);let s=Be(t.baseURL,t.url);return Pe(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){Xe.prototype[t]=function(s,a){return this.request(xe(a||{},{method:t,url:s,data:(a||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(a){return function(o,p,i){return this.request(xe(i||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}Xe.prototype[t]=s(),Xe.prototype[t+"Form"]=s(!0)});var ht=Xe;var bt=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});let a=this;this.promise.then(r=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](r);a._listeners=null}),this.promise.then=r=>{let o,p=new Promise(i=>{a.subscribe(i),o=i}).then(r);return p.cancel=function(){a.unsubscribe(o)},p},t(function(o,p,i){a.reason||(a.reason=new ie(o,p,i),s(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new bt(function(r){t=r}),cancel:t}}},to=bt;function xa(e){return function(s){return e.apply(null,s)}}function ya(e){return l.isObject(e)&&e.isAxiosError===!0}var ha={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(ha).forEach(([e,t])=>{ha[t]=e});var so=ha;function ao(e){let t=new ht(e),s=it(ht.prototype.request,t);return l.extend(s,ht.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(r){return ao(xe(e,r))},s}var _=ao(ze);_.Axios=ht;_.CanceledError=ie;_.CancelToken=to;_.isCancel=dt;_.VERSION=Ee;_.toFormData=Re;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=xa;_.isAxiosError=ya;_.mergeConfig=xe;_.AxiosHeaders=W;_.formToJSON=e=>_t(l.isHTMLForm(e)?new FormData(e):e);_.getAdapter=jt.getAdapter;_.HttpStatusCode=so;_.default=_;var ye=_;var{Axios:Cg,AxiosError:Pg,CanceledError:Bg,isCancel:Ug,CancelToken:Sg,VERSION:Lg,all:Eg,Cancel:_g,isAxiosError:Gg,spread:Wg,toFormData:Dg,AxiosHeaders:Og,HttpStatusCode:Fg,formToJSON:Hg,getAdapter:Mg,mergeConfig:Qg}=ye;var $a=D(Ra()),Fl=D(require("http")),Hl=D(require("https"));var Rt=D(Ra()),Jg="https://api.botpress.cloud",Yg=6e4,Xg="BP_API_URL",Zg="BP_BOT_ID",ef="BP_INTEGRATION_ID",tf="BP_WORKSPACE_ID",sf="BP_TOKEN";function ro(e){let t=af(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Jg,r=t.timeout??Yg;return{apiUrl:a,timeout:r,withCredentials:Rt.isBrowser,headers:s}}function af(e){return Rt.isBrowser?e:Rt.isNode?rf(e):e}function rf(e){let t={...e,apiUrl:e.apiUrl??process.env[Xg],botId:e.botId??process.env[Zg],integrationId:e.integrationId??process.env[ef],workspaceId:e.workspaceId??process.env[tf]},s=t.token??process.env[sf];return s&&(t.token=s),t}var no=D(require("crypto"));var nf={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},va=typeof window<"u"&&typeof window.document<"u"?window.crypto:no.default;va.getRandomValues||(va=nf);var P=class extends Error{constructor(s,a,r,o,p,i){super(o);this.code=s;this.description=a;this.type=r;this.message=o;this.error=p;this.id=i;this.id||(this.id=P.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,o=Array.from(va.getRandomValues(new Uint8Array(r))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},of=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,qa=e=>e instanceof P||of(e)&&e.isApiError===!0,we=class extends P{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},$t=class extends P{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},Kt=class extends P{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Vt=class extends P{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},Jt=class extends P{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},Yt=class extends P{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},Xt=class extends P{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},Zt=class extends P{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},es=class extends P{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},ts=class extends P{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},ss=class extends P{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},as=class extends P{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},rs=class extends P{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ns=class extends P{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},os=class extends P{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},is=class extends P{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},ps=class extends P{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},cs=class extends P{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},us=class extends P{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},ls=class extends P{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},ds=class extends P{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},ms=class extends P{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},gs=class extends P{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},pf={Unknown:we,Internal:$t,Unauthorized:Kt,Forbidden:Vt,PayloadTooLarge:Jt,InvalidPayload:Yt,UnsupportedMediaType:Xt,MethodNotFound:Zt,ResourceNotFound:es,InvalidJsonSchema:ts,InvalidDataFormat:ss,InvalidIdentifier:as,RelationConflict:rs,ReferenceConstraint:ns,ReferenceNotFound:os,InvalidQuery:is,Runtime:ps,AlreadyExists:cs,RateLimited:us,PaymentRequired:ls,QuotaExceeded:ds,LimitExceeded:ms,BreakingChanges:gs},fs=e=>qa(e)?e:e instanceof Error?new we(e.message,e):typeof e=="string"?new we(e):cf(e);function cf(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=pf[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new we(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new we("An invalid error occurred: "+JSON.stringify(e))}var bi=D(hi()),Nx=e=>e[1]!==void 0,g=e=>{let{method:t,path:s,query:a,headers:r,body:o}=e,p=Object.entries(r).filter(Nx),i=Object.fromEntries(p),n=bi.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=n?[s,n].join("?"):s;return{method:t,url:u,headers:i,data:o}};var Ri=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var qi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ii=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var Ti=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Ci=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Bi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Si=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Ei=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Gi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Di=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Fi=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 Mi=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ji=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 zi=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Ki=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Ji=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xi=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var ep=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var sp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rp=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var op=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var pp=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var up=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 dp=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 gp=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var xp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var hp=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 Rp=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 qp=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 Ip=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Tp=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Cp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bp=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Sp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var Ep=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Gp=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 Dp=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var Fp=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var Mp=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var jp=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var zp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var Kp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Jp=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xp=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var ec=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var sc=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var rc=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var oc=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var pc=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var uc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var dc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var gc=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken},params:{},body:{}});var xc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Rc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var qc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ic=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Tc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Cc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Bc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Sc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Ec=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var Gc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var Dc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var Fc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var Mc=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var jc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var zc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Kc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Jc=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 Xc=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var eu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var su=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var ru=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 ou=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var pu=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var uu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var du=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var gu=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var xu=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var hu=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ru=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var qu=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var Iu=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Tu=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Cu=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bu=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Su=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var Eu=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var Gu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Du=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var Fu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Mu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ju=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var zu=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ku=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Ju=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Xu=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var el=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{name:e.name,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}});var sl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rl=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var ol=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var pl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}});var ul=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}});var dl=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var gl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var xl=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 hl=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 Rl=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 ql=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 Il=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var Tl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Cl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var Bl=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 Sl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var El=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 Gl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Dl=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 As=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Ri(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getConversation=async t=>{let{path:s,headers:a,query:r,body:o}=qi(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listConversations=async t=>{let{path:s,headers:a,query:r,body:o}=Ii(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Ti(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Ci(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Bi(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listParticipants=async t=>{let{path:s,headers:a,query:r,body:o}=Si(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};addParticipant=async t=>{let{path:s,headers:a,query:r,body:o}=Ei(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getParticipant=async t=>{let{path:s,headers:a,query:r,body:o}=Gi(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};removeParticipant=async t=>{let{path:s,headers:a,query:r,body:o}=Di(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createEvent=async t=>{let{path:s,headers:a,query:r,body:o}=Fi(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getEvent=async t=>{let{path:s,headers:a,query:r,body:o}=Mi(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listEvents=async t=>{let{path:s,headers:a,query:r,body:o}=ji(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createMessage=async t=>{let{path:s,headers:a,query:r,body:o}=zi(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:r,body:o}=Ki(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getMessage=async t=>{let{path:s,headers:a,query:r,body:o}=Ji(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateMessage=async t=>{let{path:s,headers:a,query:r,body:o}=Xi(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listMessages=async t=>{let{path:s,headers:a,query:r,body:o}=ep(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteMessage=async t=>{let{path:s,headers:a,query:r,body:o}=sp(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createUser=async t=>{let{path:s,headers:a,query:r,body:o}=rp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getUser=async t=>{let{path:s,headers:a,query:r,body:o}=op(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listUsers=async t=>{let{path:s,headers:a,query:r,body:o}=pp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:r,body:o}=up(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateUser=async t=>{let{path:s,headers:a,query:r,body:o}=dp(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteUser=async t=>{let{path:s,headers:a,query:r,body:o}=gp(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getState=async t=>{let{path:s,headers:a,query:r,body:o}=xp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};setState=async t=>{let{path:s,headers:a,query:r,body:o}=hp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrSetState=async t=>{let{path:s,headers:a,query:r,body:o}=Rp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};patchState=async t=>{let{path:s,headers:a,query:r,body:o}=qp(t),i=(this.props.toAxiosRequest??g)({method:"patch",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};callAction=async t=>{let{path:s,headers:a,query:r,body:o}=Ip(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};configureIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Tp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getTask=async t=>{let{path:s,headers:a,query:r,body:o}=Cp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createTask=async t=>{let{path:s,headers:a,query:r,body:o}=Bp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateTask=async t=>{let{path:s,headers:a,query:r,body:o}=Sp(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteTask=async t=>{let{path:s,headers:a,query:r,body:o}=Ep(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listTasks=async t=>{let{path:s,headers:a,query:r,body:o}=Gp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};trackAnalytics=async t=>{let{path:s,headers:a,query:r,body:o}=Dp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};runVrl=async t=>{let{path:s,headers:a,query:r,body:o}=Fp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAccount=async t=>{let{path:s,headers:a,query:r,body:o}=Mp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateAccount=async t=>{let{path:s,headers:a,query:r,body:o}=jp(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:r,body:o}=zp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:r,body:o}=Kp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:r,body:o}=Jp(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};setAccountPreference=async t=>{let{path:s,headers:a,query:r,body:o}=Xp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAccountPreference=async t=>{let{path:s,headers:a,query:r,body:o}=ec(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:r,body:o}=sc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:r,body:o}=rc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=oc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createBot=async t=>{let{path:s,headers:a,query:r,body:o}=pc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateBot=async t=>{let{path:s,headers:a,query:r,body:o}=uc(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};transferBot=async t=>{let{path:s,headers:a,query:r,body:o}=dc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listBots=async t=>{let{path:s,headers:a,query:r,body:o}=gc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBot=async t=>{let{path:s,headers:a,query:r,body:o}=xc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteBot=async t=>{let{path:s,headers:a,query:r,body:o}=hc(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotLogs=async t=>{let{path:s,headers:a,query:r,body:o}=Rc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotWebchat=async t=>{let{path:s,headers:a,query:r,body:o}=qc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:r,body:o}=Ic(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotIssue=async t=>{let{path:s,headers:a,query:r,body:o}=Tc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listBotIssues=async t=>{let{path:s,headers:a,query:r,body:o}=Cc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:r,body:o}=Bc(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:r,body:o}=Sc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:r,body:o}=Ec(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:r,body:o}=Gc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:r,body:o}=Dc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:r,body:o}=Fc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=Mc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=jc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=zc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:r,body:o}=Kc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:r,body:o}=Jc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:r,body:o}=Xc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:r,body:o}=eu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:r,body:o}=su(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=ru(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:r,body:o}=ou(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaces=async t=>{let{path:s,headers:a,query:r,body:o}=pu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=uu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAuditRecords=async t=>{let{path:s,headers:a,query:r,body:o}=du(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:r,body:o}=gu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=xu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=hu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=Ru(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=qu(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:r,body:o}=Iu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:r,body:o}=Tu(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:r,body:o}=Cu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Bu(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Su(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listIntegrations=async t=>{let{path:s,headers:a,query:r,body:o}=Eu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Gu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:r,body:o}=Du(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:r,body:o}=Fu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Mu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getUsage=async t=>{let{path:s,headers:a,query:r,body:o}=ju(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listUsageHistory=async t=>{let{path:s,headers:a,query:r,body:o}=zu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:r,body:o}=Ku(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listActivities=async t=>{let{path:s,headers:a,query:r,body:o}=Ju(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};introspect=async t=>{let{path:s,headers:a,query:r,body:o}=Xu(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createFile=async t=>{let{path:s,headers:a,query:r,body:o}=el(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteFile=async t=>{let{path:s,headers:a,query:r,body:o}=sl(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listFiles=async t=>{let{path:s,headers:a,query:r,body:o}=rl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getFile=async t=>{let{path:s,headers:a,query:r,body:o}=ol(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateFile=async t=>{let{path:s,headers:a,query:r,body:o}=pl(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};searchFiles=async t=>{let{path:s,headers:a,query:r,body:o}=ul(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listTables=async t=>{let{path:s,headers:a,query:r,body:o}=dl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getTable=async t=>{let{path:s,headers:a,query:r,body:o}=gl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:r,body:o}=xl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createTable=async t=>{let{path:s,headers:a,query:r,body:o}=hl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};duplicateTable=async t=>{let{path:s,headers:a,query:r,body:o}=Rl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateTable=async t=>{let{path:s,headers:a,query:r,body:o}=ql(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};renameTableColumn=async t=>{let{path:s,headers:a,query:r,body:o}=Il(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteTable=async t=>{let{path:s,headers:a,query:r,body:o}=Tl(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getTableRow=async t=>{let{path:s,headers:a,query:r,body:o}=Cl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};findTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Bl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Sl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=El(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Gl(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};upsertTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Dl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})}};function f(e){return ye.isAxiosError(e)&&e.response?.data?fs(e.response.data):fs(e)}var Ml=100*1024*1024,zx=Ml,$x=Ml,Ka=class extends As{config;constructor(t={}){let s=ro(t),a=Kx(s);super(a),this.config=s}createAndUploadFile=async({name:t,index:s,tags:a,contentType:r,accessPolicies:o,data:p,url:i})=>{if(i&&p)throw new He("Cannot provide both data and URL, please provide only one of them");if(i&&(p=await ye.get(i,{responseType:"arraybuffer"}).then(c=>c.data).catch(c=>{throw new He(`Failed to download file from provided URL: ${c.message}`,c)})),!p)throw new He("No data was provided for file upload");let n=p instanceof Buffer?p:Buffer.from(p),{file:u}=await this.createFile({name:t,tags:a,index:s,accessPolicies:o,contentType:r,size:n.byteLength});try{await ye.put(u.uploadUrl,n,{maxBodyLength:1/0})}catch(c){throw new He(`Failed to upload file: ${c.message}`,c,u)}return await this.getFile({id:u.id})}},He=class extends Error{constructor(s,a,r){super(s);this.innerError=a;this.file=r;this.name="FileUploadError"}};function Kx(e){let{apiUrl:t,headers:s,withCredentials:a,timeout:r}=e;return ye.create({baseURL:t,headers:s,withCredentials:a,timeout:r,maxBodyLength:zx,maxContentLength:$x,httpAgent:$a.isNode?new Fl.default.Agent({keepAlive:!0}):void 0,httpsAgent:$a.isNode?new Hl.default.Agent({keepAlive:!0}):void 0})}0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,CreateAndUploadFileError,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,axios,errorFrom,isApiError});
|
|
14
|
+
`):" "+Xn(o[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return a},adapters:ma};function ga(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ie(null,e)}function Nt(e){return ga(e),e.headers=W.from(e.headers),e.data=lt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jt.getAdapter(e.adapter||ze.adapter)(e).then(function(a){return ga(e),a.data=lt.call(e,e.transformResponse,a),a.headers=W.from(a.headers),a},function(a){return dt(a)||(ga(e),a&&a.response&&(a.response.data=lt.call(e,e.transformResponse,a.response),a.response.headers=W.from(a.response.headers))),Promise.reject(a)})}var Zn=e=>e instanceof W?e.toJSON():e;function xe(e,t){t=t||{};let s={};function a(u,c,m){return l.isPlainObject(u)&&l.isPlainObject(c)?l.merge.call({caseless:m},u,c):l.isPlainObject(c)?l.merge({},c):l.isArray(c)?c.slice():c}function r(u,c,m){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u,m)}else return a(u,c,m)}function o(u,c){if(!l.isUndefined(c))return a(void 0,c)}function p(u,c){if(l.isUndefined(c)){if(!l.isUndefined(u))return a(void 0,u)}else return a(void 0,c)}function i(u,c,m){if(m in t)return a(u,c);if(m in e)return a(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)=>r(Zn(u),Zn(c),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(c){let m=n[c]||r,x=m(e[c],t[c],c);l.isUndefined(x)&&m!==i||(s[c]=x)}),s}var fa={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fa[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});var eo={};fa.transitional=function(t,s,a){function r(o,p){return"[Axios v"+Ee+"] Transitional option '"+o+"'"+p+(a?". "+a:"")}return(o,p,i)=>{if(t===!1)throw new h(r(p," has been removed"+(s?" in "+s:"")),h.ERR_DEPRECATED);return s&&!eo[p]&&(eo[p]=!0,console.warn(r(p," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(o,p,i):!0}};function Ag(e,t,s){if(typeof e!="object")throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);let a=Object.keys(e),r=a.length;for(;r-- >0;){let o=a[r],p=t[o];if(p){let i=e[o],n=i===void 0||p(i,o,e);if(n!==!0)throw new h("option "+o+" must be "+n,h.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}var zt={assertOptions:Ag,validators:fa};var Ie=zt.validators,Xe=class{constructor(t){this.defaults=t,this.interceptors={request:new zs,response:new zs}}request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=xe(this.defaults,s);let{transitional:a,paramsSerializer:r,headers:o}=s;a!==void 0&&zt.assertOptions(a,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),r!=null&&(l.isFunction(r)?s.paramsSerializer={serialize:r}:zt.assertOptions(r,{encode:Ie.function,serialize:Ie.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"],d=>{delete o[d]}),s.headers=W.concat(p,o);let i=[],n=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(s)===!1||(n=n&&y.synchronous,i.unshift(y.fulfilled,y.rejected))});let u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,m=0,x;if(!n){let d=[Nt.bind(this),void 0];for(d.unshift.apply(d,i),d.push.apply(d,u),x=d.length,c=Promise.resolve(s);m<x;)c=c.then(d[m++],d[m++]);return c}x=i.length;let R=s;for(m=0;m<x;){let d=i[m++],y=i[m++];try{R=d(R)}catch(v){y.call(this,v);break}}try{c=Nt.call(this,R)}catch(d){return Promise.reject(d)}for(m=0,x=u.length;m<x;)c=c.then(u[m++],u[m++]);return c}getUri(t){t=xe(this.defaults,t);let s=Be(t.baseURL,t.url);return Pe(s,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){Xe.prototype[t]=function(s,a){return this.request(xe(a||{},{method:t,url:s,data:(a||{}).data}))}});l.forEach(["post","put","patch"],function(t){function s(a){return function(o,p,i){return this.request(xe(i||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:p}))}}Xe.prototype[t]=s(),Xe.prototype[t+"Form"]=s(!0)});var ht=Xe;var bt=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(o){s=o});let a=this;this.promise.then(r=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](r);a._listeners=null}),this.promise.then=r=>{let o,p=new Promise(i=>{a.subscribe(i),o=i}).then(r);return p.cancel=function(){a.unsubscribe(o)},p},t(function(o,p,i){a.reason||(a.reason=new ie(o,p,i),s(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}static source(){let t;return{token:new bt(function(r){t=r}),cancel:t}}},to=bt;function xa(e){return function(s){return e.apply(null,s)}}function ya(e){return l.isObject(e)&&e.isAxiosError===!0}var ha={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(ha).forEach(([e,t])=>{ha[t]=e});var so=ha;function ao(e){let t=new ht(e),s=it(ht.prototype.request,t);return l.extend(s,ht.prototype,t,{allOwnKeys:!0}),l.extend(s,t,null,{allOwnKeys:!0}),s.create=function(r){return ao(xe(e,r))},s}var _=ao(ze);_.Axios=ht;_.CanceledError=ie;_.CancelToken=to;_.isCancel=dt;_.VERSION=Ee;_.toFormData=Re;_.AxiosError=h;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=xa;_.isAxiosError=ya;_.mergeConfig=xe;_.AxiosHeaders=W;_.formToJSON=e=>_t(l.isHTMLForm(e)?new FormData(e):e);_.getAdapter=jt.getAdapter;_.HttpStatusCode=so;_.default=_;var ye=_;var{Axios:Cg,AxiosError:Pg,CanceledError:Bg,isCancel:Ug,CancelToken:Sg,VERSION:Lg,all:Eg,Cancel:_g,isAxiosError:Gg,spread:Wg,toFormData:Dg,AxiosHeaders:Og,HttpStatusCode:Fg,formToJSON:Hg,getAdapter:Mg,mergeConfig:Qg}=ye;var $a=D(Ra()),Fl=D(require("http")),Hl=D(require("https"));var Rt=D(Ra()),Jg="https://api.botpress.cloud",Yg=6e4,Xg="BP_API_URL",Zg="BP_BOT_ID",ef="BP_INTEGRATION_ID",tf="BP_WORKSPACE_ID",sf="BP_TOKEN";function ro(e){let t=af(e),s={};t.workspaceId&&(s["x-workspace-id"]=t.workspaceId),t.botId&&(s["x-bot-id"]=t.botId),t.integrationId&&(s["x-integration-id"]=t.integrationId),t.token&&(s.Authorization=`Bearer ${t.token}`),s={...s,...t.headers};let a=t.apiUrl??Jg,r=t.timeout??Yg;return{apiUrl:a,timeout:r,withCredentials:Rt.isBrowser,headers:s}}function af(e){return Rt.isBrowser?e:Rt.isNode?rf(e):e}function rf(e){let t={...e,apiUrl:e.apiUrl??process.env[Xg],botId:e.botId??process.env[Zg],integrationId:e.integrationId??process.env[ef],workspaceId:e.workspaceId??process.env[tf]},s=t.token??process.env[sf];return s&&(t.token=s),t}var no=D(require("crypto"));var nf={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},va=typeof window<"u"&&typeof window.document<"u"?window.crypto:no.default;va.getRandomValues||(va=nf);var P=class extends Error{constructor(s,a,r,o,p,i){super(o);this.code=s;this.description=a;this.type=r;this.message=o;this.error=p;this.id=i;this.id||(this.id=P.generateId())}isApiError=!0;format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){let s=this.getPrefix(),a=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,o=Array.from(va.getRandomValues(new Uint8Array(r))).map(p=>p.toString(16).padStart(2,"0")).join("").toUpperCase();return`${s}_${a}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},of=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,qa=e=>e instanceof P||of(e)&&e.isApiError===!0,we=class extends P{constructor(t,s,a){super(500,"An unknown error occurred","Unknown",t,s,a)}},$t=class extends P{constructor(t,s,a){super(500,"An internal error occurred","Internal",t,s,a)}},Kt=class extends P{constructor(t,s,a){super(401,"The request requires to be authenticated.","Unauthorized",t,s,a)}},Vt=class extends P{constructor(t,s,a){super(403,"The requested action can't be peform by this resource.","Forbidden",t,s,a)}},Jt=class extends P{constructor(t,s,a){super(413,"The request payload is too large.","PayloadTooLarge",t,s,a)}},Yt=class extends P{constructor(t,s,a){super(400,"The request payload is invalid.","InvalidPayload",t,s,a)}},Xt=class extends P{constructor(t,s,a){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,s,a)}},Zt=class extends P{constructor(t,s,a){super(405,"The requested method does not exist.","MethodNotFound",t,s,a)}},es=class extends P{constructor(t,s,a){super(404,"The requested resource does not exist.","ResourceNotFound",t,s,a)}},ts=class extends P{constructor(t,s,a){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,s,a)}},ss=class extends P{constructor(t,s,a){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,s,a)}},as=class extends P{constructor(t,s,a){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",t,s,a)}},rs=class extends P{constructor(t,s,a){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",t,s,a)}},ns=class extends P{constructor(t,s,a){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,s,a)}},os=class extends P{constructor(t,s,a){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",t,s,a)}},is=class extends P{constructor(t,s,a){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,s,a)}},ps=class extends P{constructor(t,s,a){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,s,a)}},cs=class extends P{constructor(t,s,a){super(409,"The record attempted to be created already exists.","AlreadyExists",t,s,a)}},us=class extends P{constructor(t,s,a){super(429,"The request has been rate limited.","RateLimited",t,s,a)}},ls=class extends P{constructor(t,s,a){super(402,"A payment is required to perform this request.","PaymentRequired",t,s,a)}},ds=class extends P{constructor(t,s,a){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,s,a)}},ms=class extends P{constructor(t,s,a){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,s,a)}},gs=class extends P{constructor(t,s,a){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,s,a)}},pf={Unknown:we,Internal:$t,Unauthorized:Kt,Forbidden:Vt,PayloadTooLarge:Jt,InvalidPayload:Yt,UnsupportedMediaType:Xt,MethodNotFound:Zt,ResourceNotFound:es,InvalidJsonSchema:ts,InvalidDataFormat:ss,InvalidIdentifier:as,RelationConflict:rs,ReferenceConstraint:ns,ReferenceNotFound:os,InvalidQuery:is,Runtime:ps,AlreadyExists:cs,RateLimited:us,PaymentRequired:ls,QuotaExceeded:ds,LimitExceeded:ms,BreakingChanges:gs},fs=e=>qa(e)?e:e instanceof Error?new we(e.message,e):typeof e=="string"?new we(e):cf(e);function cf(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=pf[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new we(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new we("An invalid error occurred: "+JSON.stringify(e))}var bi=D(hi()),Nx=e=>e[1]!==void 0,g=e=>{let{method:t,path:s,query:a,headers:r,body:o}=e,p=Object.entries(r).filter(Nx),i=Object.fromEntries(p),n=bi.default.stringify(a,{encode:!0,arrayFormat:"repeat",allowDots:!0}),u=n?[s,n].join("?"):s;return{method:t,url:u,headers:i,data:o}};var Ri=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var qi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ii=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}});var Ti=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}});var Ci=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}});var Bi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Si=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Ei=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}});var Gi=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Di=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}});var Fi=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 Mi=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ji=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 zi=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Ki=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}});var Ji=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xi=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}});var ep=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var sp=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rp=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}});var op=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var pp=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}});var up=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 dp=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 gp=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var xp=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}});var hp=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 Rp=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 qp=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 Ip=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}});var Tp=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}});var Cp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bp=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}});var Sp=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}});var Ep=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Gp=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 Dp=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}});var Fp=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}});var Mp=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}});var jp=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}});var zp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}});var Kp=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}});var Jp=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Xp=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}});var ec=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}});var sc=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}});var rc=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var oc=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var pc=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}});var uc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}});var dc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}});var gc=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken},params:{},body:{}});var xc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var hc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Rc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var qc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ic=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}});var Tc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Cc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var Bc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Sc=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}});var Ec=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}});var Gc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}});var Dc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}});var Fc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}});var Mc=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}});var jc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}});var zc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Kc=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var Jc=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 Xc=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}});var eu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var su=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}});var ru=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 ou=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}});var pu=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var uu=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var du=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}});var gu=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}});var xu=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}});var hu=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Ru=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}});var qu=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}});var Iu=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}});var Tu=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}});var Cu=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Bu=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}});var Su=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}});var Eu=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}});var Gu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var Du=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}});var Fu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}});var Mu=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var ju=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}});var zu=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}});var Ku=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}});var Ju=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}});var Xu=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}});var el=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{name:e.name,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType}});var sl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var rl=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}});var ol=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}});var pl=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies}});var ul=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit},params:{},body:{}});var dl=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}});var gl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var xl=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 hl=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 Rl=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 ql=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 Il=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}});var Tl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}});var Cl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}});var Bl=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 Sl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var El=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 Gl=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}});var Dl=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 As=class{constructor(t,s={}){this.axiosInstance=t;this.props=s}createConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Ri(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getConversation=async t=>{let{path:s,headers:a,query:r,body:o}=qi(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listConversations=async t=>{let{path:s,headers:a,query:r,body:o}=Ii(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Ti(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Ci(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteConversation=async t=>{let{path:s,headers:a,query:r,body:o}=Bi(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listParticipants=async t=>{let{path:s,headers:a,query:r,body:o}=Si(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};addParticipant=async t=>{let{path:s,headers:a,query:r,body:o}=Ei(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getParticipant=async t=>{let{path:s,headers:a,query:r,body:o}=Gi(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};removeParticipant=async t=>{let{path:s,headers:a,query:r,body:o}=Di(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createEvent=async t=>{let{path:s,headers:a,query:r,body:o}=Fi(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getEvent=async t=>{let{path:s,headers:a,query:r,body:o}=Mi(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listEvents=async t=>{let{path:s,headers:a,query:r,body:o}=ji(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createMessage=async t=>{let{path:s,headers:a,query:r,body:o}=zi(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateMessage=async t=>{let{path:s,headers:a,query:r,body:o}=Ki(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getMessage=async t=>{let{path:s,headers:a,query:r,body:o}=Ji(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateMessage=async t=>{let{path:s,headers:a,query:r,body:o}=Xi(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listMessages=async t=>{let{path:s,headers:a,query:r,body:o}=ep(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteMessage=async t=>{let{path:s,headers:a,query:r,body:o}=sp(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createUser=async t=>{let{path:s,headers:a,query:r,body:o}=rp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getUser=async t=>{let{path:s,headers:a,query:r,body:o}=op(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listUsers=async t=>{let{path:s,headers:a,query:r,body:o}=pp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateUser=async t=>{let{path:s,headers:a,query:r,body:o}=up(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateUser=async t=>{let{path:s,headers:a,query:r,body:o}=dp(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteUser=async t=>{let{path:s,headers:a,query:r,body:o}=gp(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getState=async t=>{let{path:s,headers:a,query:r,body:o}=xp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};setState=async t=>{let{path:s,headers:a,query:r,body:o}=hp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrSetState=async t=>{let{path:s,headers:a,query:r,body:o}=Rp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};patchState=async t=>{let{path:s,headers:a,query:r,body:o}=qp(t),i=(this.props.toAxiosRequest??g)({method:"patch",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};callAction=async t=>{let{path:s,headers:a,query:r,body:o}=Ip(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};configureIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Tp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getTask=async t=>{let{path:s,headers:a,query:r,body:o}=Cp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createTask=async t=>{let{path:s,headers:a,query:r,body:o}=Bp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateTask=async t=>{let{path:s,headers:a,query:r,body:o}=Sp(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteTask=async t=>{let{path:s,headers:a,query:r,body:o}=Ep(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listTasks=async t=>{let{path:s,headers:a,query:r,body:o}=Gp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};trackAnalytics=async t=>{let{path:s,headers:a,query:r,body:o}=Dp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};runVrl=async t=>{let{path:s,headers:a,query:r,body:o}=Fp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAccount=async t=>{let{path:s,headers:a,query:r,body:o}=Mp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateAccount=async t=>{let{path:s,headers:a,query:r,body:o}=jp(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listPersonalAccessTokens=async t=>{let{path:s,headers:a,query:r,body:o}=zp(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createPersonalAccessToken=async t=>{let{path:s,headers:a,query:r,body:o}=Kp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deletePersonalAccessToken=async t=>{let{path:s,headers:a,query:r,body:o}=Jp(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};setAccountPreference=async t=>{let{path:s,headers:a,query:r,body:o}=Xp(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAccountPreference=async t=>{let{path:s,headers:a,query:r,body:o}=ec(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listPublicIntegrations=async t=>{let{path:s,headers:a,query:r,body:o}=sc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getPublicIntegrationById=async t=>{let{path:s,headers:a,query:r,body:o}=rc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getPublicIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=oc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createBot=async t=>{let{path:s,headers:a,query:r,body:o}=pc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateBot=async t=>{let{path:s,headers:a,query:r,body:o}=uc(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};transferBot=async t=>{let{path:s,headers:a,query:r,body:o}=dc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listBots=async t=>{let{path:s,headers:a,query:r,body:o}=gc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBot=async t=>{let{path:s,headers:a,query:r,body:o}=xc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteBot=async t=>{let{path:s,headers:a,query:r,body:o}=hc(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotLogs=async t=>{let{path:s,headers:a,query:r,body:o}=Rc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotWebchat=async t=>{let{path:s,headers:a,query:r,body:o}=qc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotAnalytics=async t=>{let{path:s,headers:a,query:r,body:o}=Ic(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getBotIssue=async t=>{let{path:s,headers:a,query:r,body:o}=Tc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listBotIssues=async t=>{let{path:s,headers:a,query:r,body:o}=Cc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteBotIssue=async t=>{let{path:s,headers:a,query:r,body:o}=Bc(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listBotIssueEvents=async t=>{let{path:s,headers:a,query:r,body:o}=Sc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};setWorkspacePaymentMethod=async t=>{let{path:s,headers:a,query:r,body:o}=Ec(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceInvoices=async t=>{let{path:s,headers:a,query:r,body:o}=Gc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getUpcomingInvoice=async t=>{let{path:s,headers:a,query:r,body:o}=Dc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};chargeWorkspaceUnpaidInvoices=async t=>{let{path:s,headers:a,query:r,body:o}=Fc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=Mc(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getPublicWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=jc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=zc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceUsages=async t=>{let{path:s,headers:a,query:r,body:o}=Kc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};breakDownWorkspaceUsageByBot=async t=>{let{path:s,headers:a,query:r,body:o}=Jc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAllWorkspaceQuotaCompletion=async t=>{let{path:s,headers:a,query:r,body:o}=Xc(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getWorkspaceQuota=async t=>{let{path:s,headers:a,query:r,body:o}=eu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceQuotas=async t=>{let{path:s,headers:a,query:r,body:o}=su(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=ru(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};checkHandleAvailability=async t=>{let{path:s,headers:a,query:r,body:o}=ou(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaces=async t=>{let{path:s,headers:a,query:r,body:o}=pu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteWorkspace=async t=>{let{path:s,headers:a,query:r,body:o}=uu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getAuditRecords=async t=>{let{path:s,headers:a,query:r,body:o}=du(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listWorkspaceMembers=async t=>{let{path:s,headers:a,query:r,body:o}=gu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=xu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=hu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=Ru(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateWorkspaceMember=async t=>{let{path:s,headers:a,query:r,body:o}=qu(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listIntegrationApiKeys=async t=>{let{path:s,headers:a,query:r,body:o}=Iu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createIntegrationApiKey=async t=>{let{path:s,headers:a,query:r,body:o}=Tu(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteIntegrationApiKey=async t=>{let{path:s,headers:a,query:r,body:o}=Cu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Bu(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Su(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listIntegrations=async t=>{let{path:s,headers:a,query:r,body:o}=Eu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Gu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getIntegrationLogs=async t=>{let{path:s,headers:a,query:r,body:o}=Du(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getIntegrationByName=async t=>{let{path:s,headers:a,query:r,body:o}=Fu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteIntegration=async t=>{let{path:s,headers:a,query:r,body:o}=Mu(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getUsage=async t=>{let{path:s,headers:a,query:r,body:o}=ju(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listUsageHistory=async t=>{let{path:s,headers:a,query:r,body:o}=zu(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};changeAISpendQuota=async t=>{let{path:s,headers:a,query:r,body:o}=Ku(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listActivities=async t=>{let{path:s,headers:a,query:r,body:o}=Ju(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};introspect=async t=>{let{path:s,headers:a,query:r,body:o}=Xu(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createFile=async t=>{let{path:s,headers:a,query:r,body:o}=el(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteFile=async t=>{let{path:s,headers:a,query:r,body:o}=sl(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listFiles=async t=>{let{path:s,headers:a,query:r,body:o}=rl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getFile=async t=>{let{path:s,headers:a,query:r,body:o}=ol(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateFile=async t=>{let{path:s,headers:a,query:r,body:o}=pl(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};searchFiles=async t=>{let{path:s,headers:a,query:r,body:o}=ul(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};listTables=async t=>{let{path:s,headers:a,query:r,body:o}=dl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getTable=async t=>{let{path:s,headers:a,query:r,body:o}=gl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getOrCreateTable=async t=>{let{path:s,headers:a,query:r,body:o}=xl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createTable=async t=>{let{path:s,headers:a,query:r,body:o}=hl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};duplicateTable=async t=>{let{path:s,headers:a,query:r,body:o}=Rl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateTable=async t=>{let{path:s,headers:a,query:r,body:o}=ql(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};renameTableColumn=async t=>{let{path:s,headers:a,query:r,body:o}=Il(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteTable=async t=>{let{path:s,headers:a,query:r,body:o}=Tl(t),i=(this.props.toAxiosRequest??g)({method:"delete",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};getTableRow=async t=>{let{path:s,headers:a,query:r,body:o}=Cl(t),i=(this.props.toAxiosRequest??g)({method:"get",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};findTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Bl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};createTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Sl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};deleteTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=El(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};updateTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Gl(t),i=(this.props.toAxiosRequest??g)({method:"put",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})};upsertTableRows=async t=>{let{path:s,headers:a,query:r,body:o}=Dl(t),i=(this.props.toAxiosRequest??g)({method:"post",path:s,headers:{...a},query:{...r},body:o});return this.axiosInstance.request(i).then(n=>n.data).catch(n=>{throw f(n)})}};function f(e){return ye.isAxiosError(e)&&e.response?.data?fs(e.response.data):fs(e)}var Ml=100*1024*1024,zx=Ml,$x=Ml,Ka=class extends As{config;constructor(t={}){let s=ro(t),a=Kx(s);super(a),this.config=s}createAndUploadFile=async({name:t,index:s,tags:a,contentType:r,accessPolicies:o,content:p,url:i})=>{if(i&&p)throw new He("Cannot provide both content and URL, please provide only one of them");if(i&&(p=await ye.get(i,{responseType:"arraybuffer"}).then(c=>c.data).catch(c=>{throw new He(`Failed to download file from provided URL: ${c.message}`,c)})),!p)throw new He("No content was provided for the file");let n=p instanceof Buffer?p:Buffer.from(p),{file:u}=await this.createFile({name:t,tags:a,index:s,accessPolicies:o,contentType:r,size:n.byteLength});try{await ye.put(u.uploadUrl,n,{maxBodyLength:1/0})}catch(c){throw new He(`Failed to upload file: ${c.message}`,c,u)}return await this.getFile({id:u.id})}},He=class extends Error{constructor(s,a,r){super(s);this.innerError=a;this.file=r;this.name="FileUploadError"}};function Kx(e){let{apiUrl:t,headers:s,withCredentials:a,timeout:r}=e;return ye.create({baseURL:t,headers:s,withCredentials:a,timeout:r,maxBodyLength:zx,maxContentLength:$x,httpAgent:$a.isNode?new Fl.default.Agent({keepAlive:!0}):void 0,httpsAgent:$a.isNode?new Hl.default.Agent({keepAlive:!0}):void 0})}0&&(module.exports={AlreadyExistsError,BreakingChangesError,Client,CreateAndUploadFileError,ForbiddenError,InternalError,InvalidDataFormatError,InvalidIdentifierError,InvalidJsonSchemaError,InvalidPayloadError,InvalidQueryError,LimitExceededError,MethodNotFoundError,PayloadTooLargeError,PaymentRequiredError,QuotaExceededError,RateLimitedError,ReferenceConstraintError,ReferenceNotFoundError,RelationConflictError,ResourceNotFoundError,RuntimeError,UnauthorizedError,UnknownError,UnsupportedMediaTypeError,axios,errorFrom,isApiError});
|
|
15
15
|
/*! Bundled license information:
|
|
16
16
|
|
|
17
17
|
mime-db/index.js:
|