rehive 4.0.0 → 4.1.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/dist/admin.d.mts +15619 -15396
- package/dist/admin.d.ts +15619 -15396
- package/dist/admin.js +1 -1
- package/dist/admin.mjs +1 -1
- package/dist/auth.d.mts +2 -2
- package/dist/auth.d.ts +2 -2
- package/dist/auth.js +1 -1
- package/dist/auth.mjs +1 -1
- package/dist/{chunk-RKDIBDG6.js → chunk-7WQMKBQ6.js} +1 -1
- package/dist/{chunk-NFN3B6SG.mjs → chunk-CUQ6U73E.mjs} +1 -1
- package/dist/chunk-DRLSOKDI.js +7 -0
- package/dist/{chunk-53JJUQ4V.js → chunk-GR5TETAU.js} +1 -1
- package/dist/{chunk-QWQ6ZENI.js → chunk-JK4JOKBZ.js} +1 -1
- package/dist/chunk-KQ5BJOW2.mjs +1 -0
- package/dist/{chunk-V277OEVY.mjs → chunk-KUM3UI4C.mjs} +1 -1
- package/dist/{chunk-7WWCXCY2.mjs → chunk-S5UXBHRU.mjs} +1 -1
- package/dist/chunk-UMUOM4B2.mjs +7 -0
- package/dist/chunk-YRYX3G3E.js +1 -0
- package/dist/{create-api-client-BrsH1l8c.d.mts → create-api-client-2vNCP2LN.d.mts} +1 -1
- package/dist/{create-api-client-BMeX50D6.d.ts → create-api-client-D-Z8R83N.d.ts} +1 -1
- package/dist/{create-auth-UTklIOTc.d.mts → create-auth-CHzmb_8_.d.mts} +4846 -4616
- package/dist/{create-auth-UTklIOTc.d.ts → create-auth-CHzmb_8_.d.ts} +4846 -4616
- package/dist/extensions/alchemy.d.mts +3 -3
- package/dist/extensions/alchemy.d.ts +3 -3
- package/dist/extensions/alchemy.js +2 -2
- package/dist/extensions/alchemy.mjs +1 -1
- package/dist/extensions/app.d.mts +3 -3
- package/dist/extensions/app.d.ts +3 -3
- package/dist/extensions/app.js +2 -2
- package/dist/extensions/app.mjs +1 -1
- package/dist/extensions/billing.d.mts +3 -3
- package/dist/extensions/billing.d.ts +3 -3
- package/dist/extensions/billing.js +2 -2
- package/dist/extensions/billing.mjs +1 -1
- package/dist/extensions/bridge.d.mts +3 -3
- package/dist/extensions/bridge.d.ts +3 -3
- package/dist/extensions/bridge.js +2 -2
- package/dist/extensions/bridge.mjs +1 -1
- package/dist/extensions/builder.d.mts +3 -3
- package/dist/extensions/builder.d.ts +3 -3
- package/dist/extensions/builder.js +2 -2
- package/dist/extensions/builder.mjs +1 -1
- package/dist/extensions/business.d.mts +3 -3
- package/dist/extensions/business.d.ts +3 -3
- package/dist/extensions/business.js +2 -2
- package/dist/extensions/business.mjs +1 -1
- package/dist/extensions/conversion.d.mts +3 -3
- package/dist/extensions/conversion.d.ts +3 -3
- package/dist/extensions/conversion.js +2 -2
- package/dist/extensions/conversion.mjs +1 -1
- package/dist/extensions/mass-send.d.mts +3 -3
- package/dist/extensions/mass-send.d.ts +3 -3
- package/dist/extensions/mass-send.js +2 -2
- package/dist/extensions/mass-send.mjs +1 -1
- package/dist/extensions/notifications.d.mts +3 -3
- package/dist/extensions/notifications.d.ts +3 -3
- package/dist/extensions/notifications.js +2 -2
- package/dist/extensions/notifications.mjs +1 -1
- package/dist/extensions/payment-requests.d.mts +3 -3
- package/dist/extensions/payment-requests.d.ts +3 -3
- package/dist/extensions/payment-requests.js +2 -2
- package/dist/extensions/payment-requests.mjs +1 -1
- package/dist/extensions/products.d.mts +3 -3
- package/dist/extensions/products.d.ts +3 -3
- package/dist/extensions/products.js +2 -2
- package/dist/extensions/products.mjs +1 -1
- package/dist/extensions/rain.d.mts +3 -3
- package/dist/extensions/rain.d.ts +3 -3
- package/dist/extensions/rain.js +2 -2
- package/dist/extensions/rain.mjs +1 -1
- package/dist/extensions/rewards.d.mts +3 -3
- package/dist/extensions/rewards.d.ts +3 -3
- package/dist/extensions/rewards.js +2 -2
- package/dist/extensions/rewards.mjs +1 -1
- package/dist/extensions/stellar-testnet.d.mts +3 -3
- package/dist/extensions/stellar-testnet.d.ts +3 -3
- package/dist/extensions/stellar-testnet.js +2 -2
- package/dist/extensions/stellar-testnet.mjs +1 -1
- package/dist/extensions/stellar.d.mts +3 -3
- package/dist/extensions/stellar.d.ts +3 -3
- package/dist/extensions/stellar.js +2 -2
- package/dist/extensions/stellar.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/user.d.mts +4 -4
- package/dist/user.d.ts +4 -4
- package/dist/user.js +1 -1
- package/dist/user.mjs +1 -1
- package/package.json +1 -1
- package/src/auth/create-auth.ts +7 -7
- package/src/extensions/alchemy/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/app/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/billing/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/bridge/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/builder/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/business/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/conversion/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/mass-send/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/notifications/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/payment-requests/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/products/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/rain/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/rewards/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/stellar/openapi-ts/client/types.gen.ts +1 -0
- package/src/extensions/stellar-testnet/openapi-ts/client/types.gen.ts +1 -0
- package/src/platform/admin/openapi-ts/client/types.gen.ts +1 -0
- package/src/platform/admin/openapi-ts/index.ts +1 -1
- package/src/platform/admin/openapi-ts/sdk.gen.ts +14 -14
- package/src/platform/admin/openapi-ts/types.gen.ts +11181 -10946
- package/src/platform/user/openapi-ts/client/types.gen.ts +1 -0
- package/src/platform/user/openapi-ts/index.ts +1 -1
- package/src/platform/user/openapi-ts/sdk.gen.ts +3 -3
- package/src/platform/user/openapi-ts/types.gen.ts +7224 -6984
- package/src/shared/create-api-client.ts +1 -0
- package/dist/chunk-5MRX4DHT.js +0 -1
- package/dist/chunk-HF5XDXOU.mjs +0 -1
- package/dist/chunk-Q2ZX3WFY.mjs +0 -7
- package/dist/chunk-UYUMXTPF.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var B={};_chunkOEIQFP6Tjs.a.call(void 0, B,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>Re,adminCompanyRetrieve:()=>Oe,adminCompanyUpdate:()=>we,adminCryptoReturnPoliciesCreate:()=>Ce,adminCryptoReturnPoliciesDestroy:()=>ge,adminCryptoReturnPoliciesList:()=>Ae,adminCryptoReturnPoliciesPartialUpdate:()=>be,adminCryptoReturnPoliciesRetrieve:()=>Te,adminCryptoReturnPoliciesUpdate:()=>xe,adminCurrenciesList:()=>Ee,adminCurrenciesPartialUpdate:()=>Pe,adminCurrenciesRetrieve:()=>Se,adminCurrenciesUpdate:()=>ke,adminLiquidationAddressesList:()=>De,adminLiquidationAddressesRetrieve:()=>ze,adminOperationalAccountsLiquidationAddressCreate:()=>Ue,adminOperationalAccountsVirtualAccountCreate:()=>qe,adminPaymentProcessorQuoteCreate:()=>ve,adminPayoutConfigurationsCreate:()=>Le,adminPayoutConfigurationsDestroy:()=>Ie,adminPayoutConfigurationsList:()=>je,adminPayoutConfigurationsPartialUpdate:()=>Ve,adminPayoutConfigurationsRetrieve:()=>Ke,adminPayoutConfigurationsUpdate:()=>Be,adminTransactionTransitionsList:()=>We,adminTransactionTransitionsProcessCreate:()=>Ne,adminTransactionTransitionsRetrieve:()=>$e,adminVirtualAccountsList:()=>He,adminVirtualAccountsRetrieve:()=>Fe,adminWalletsList:()=>Je,adminWalletsRetrieve:()=>Me,bridgeWebhookCreate:()=>Qe,deactivateCreate:()=>_e,userCryptoDepositCreate:()=>Ze,userCurrenciesList:()=>er,userCurrenciesRetrieve:()=>rr,userExchangeRatesRetrieve:()=>tr,userKycLinksCreate:()=>nr,userPartialUpdate:()=>Xe,userRetrieve:()=>Ge,userUpdate:()=>Ye,userVirtualAccountsCreate:()=>ir,userVirtualAccountsList:()=>or,userVirtualAccountsRetrieve:()=>sr,webhookCreate:()=>ar});var L={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(se);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:u,sseMaxRetryAttempts:c,sseMaxRetryDelay:a,sseSleepFn:p,url:l,...n})=>{let m,x=_nullishCoalesce(p, () => ((d=>new Promise(O=>setTimeout(O,d)))));return{stream:async function*(){let d=_nullishCoalesce(u, () => (3e3)),O=0,C=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!C.aborted;){O++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);m!==void 0&&E.set("Last-Event-ID",m);try{let g={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:C},A=new Request(l,g);e&&(A=await e(l,g));let y=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(A);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),S="",W=()=>{try{h.cancel()}catch (e2){}};C.addEventListener("abort",W);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;S+=te,S=S.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let $=S.split(`
|
|
4
4
|
|
|
5
5
|
`);S=_nullishCoalesce($.pop(), () => (""));for(let ne of $){let oe=ne.split(`
|
|
6
6
|
`),U=[],N;for(let w of oe)if(w.startsWith("data:"))U.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))N=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))m=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let F=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(d=F)}let T,H=!1;if(U.length){let w=U.join(`
|
|
7
|
-
`);try{T=JSON.parse(w),H=!0}catch (e3){T=w}}H&&(i&&await i(T),s&&(T=await s(T))),_optionalChain([t, 'optionalCall', _2 => _2({data:T,event:N,id:m,retry:d})]),U.length&&(yield T)}}}finally{C.removeEventListener("abort",W),h.releaseLock()}break}catch(g){if(_optionalChain([r, 'optionalCall', _3 => _3(g)]),c!==void 0&&O>=c)break;let A=Math.min(d*2**(O-1),_nullishCoalesce(a, () => (3e4)));await x(A)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},q=({allowReserved:e,explode:r,name:t,style:s,value:i})=>{if(!r){let a=(e?i:i.map(p=>encodeURIComponent(p))).join(ce(s));switch(s){case"label":return`.${a}`;case"matrix":return`;${t}=${a}`;case"simple":return a;default:return`${t}=${a}`}}let u=ae(s),c=i.map(a=>s==="label"||s==="simple"?e?a:encodeURIComponent(a):b({allowReserved:e,name:t,value:a})).join(u);return s==="label"||s==="matrix"?u+c:c},b=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:r,name:t,style:s,value:i,valueOnly:u})=>{if(i instanceof Date)return u?i.toISOString():`${t}=${i.toISOString()}`;if(s!=="deepObject"&&!r){let p=[];Object.entries(i).forEach(([n,m])=>{p=[...p,n,e?m:encodeURIComponent(m)]});let l=p.join(",");switch(s){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let c=pe(s),a=Object.entries(i).map(([p,l])=>b({allowReserved:e,name:s==="deepObject"?`${t}[${p}]`:p,value:l})).join(c);return s==="label"||s==="matrix"?c+a:a};var ue=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let t=r,s=r.match(ue);if(s)for(let i of s){let u=!1,c=i.substring(1,i.length-1),a="simple";c.endsWith("*")&&(u=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),a="label"):c.startsWith(";")&&(c=c.substring(1),a="matrix");let p=e[c];if(p==null)continue;if(Array.isArray(p)){t=t.replace(i,q({explode:u,name:c,style:a,value:p}));continue}if(typeof p=="object"){t=t.replace(i,v({explode:u,name:c,style:a,value:p,valueOnly:!0}));continue}if(a==="matrix"){t=t.replace(i,`;${b({name:c,value:p})}`);continue}let l=encodeURIComponent(a==="label"?`.${p}`:p);t=t.replace(i,l)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:i})=>{let u=i.startsWith("/")?i:`/${i}`,c=(_nullishCoalesce(e, () => ("")))+u;r&&(c=de({path:r,url:c}));let a=t?s(t):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(c+=`?${a}`),c};function I(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let u in s){let c=s[u];if(c==null)continue;let a=e[u]||r;if(Array.isArray(c)){let p=q({allowReserved:a.allowReserved,explode:!0,name:u,style:"form",value:c,...a.array});p&&i.push(p)}else if(typeof c=="object"){let p=v({allowReserved:a.allowReserved,explode:!0,name:u,style:"deepObject",value:c,...a.object});p&&i.push(p)}else{let p=b({allowReserved:a.allowReserved,name:u,value:c});p&&i.push(p)}}return i.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(le(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let i=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[i]=s;break;case"cookie":r.headers.append("Cookie",`${i}=${s}`);break;case"header":default:r.headers.set(i,s);break}}},K=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),V=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,r.headers),t},ye=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},j=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?ye(t):Object.entries(t);for(let[i,u]of s)if(u===null)r.delete(i);else if(Array.isArray(u))for(let c of u)r.append(i,c);else u!==void 0&&r.set(i,typeof u=="object"?JSON.stringify(u):u)}return r},P=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new P,request:new P,response:new P}),fe=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},k=(e={})=>({...L,headers:me,parseAs:"auto",querySerializer:fe,...e});var D=(e={})=>{let r=V(k(),e),t=()=>({...r}),s=l=>(r=V(r,l),t()),i=ee(),u=async l=>{let n={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,l.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let m=K(n);return{opts:n,url:m}},c=async l=>{let{opts:n,url:m}=await u(l),x={redirect:"follow",...n,body:I(n)},R=new Request(m,x);for(let f of i.request.fns)f&&(R=await f(R,n));let z=n.fetch,d;try{d=await z(R)}catch(f){let y=f;for(let h of i.error.fns)h&&(y=await h(f,void 0,R,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:R,response:void 0}}for(let f of i.response.fns)f&&(d=await f(d,R,n));let O={request:R,response:d};if(d.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(d.headers.get("Content-Type")):n.parseAs), () => ("json"));if(d.status===204||d.headers.get("Content-Length")==="0"){let h;switch(f){case"arrayBuffer":case"blob":case"text":h=await d[f]();break;case"formData":h=new FormData;break;case"stream":h=d.body;break;case"json":default:h={};break}return n.responseStyle==="data"?h:{data:h,...O}}let y;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[f]();break;case"json":{let h=await d.text();y=h?JSON.parse(h):{};break}case"stream":return n.responseStyle==="data"?d.body:{data:d.body,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...O}}let C=await d.text(),E;try{E=JSON.parse(C)}catch (e4){}let g=_nullishCoalesce(E, () => (C)),A=g;for(let f of i.error.fns)f&&(A=await f(g,d,R,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,...O}},a=l=>n=>c({...n,method:l}),p=l=>async n=>{let{opts:m,url:x}=await u(n);return Q({...m,body:m.body,headers:m.headers,method:l,onRequest:async(R,z)=>{let d=new Request(R,z);for(let O of i.request.fns)O&&(d=await O(d,m));return d},serializedBody:I(m),url:x})};return{buildUrl:K,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:t,head:a("HEAD"),interceptors:i,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:c,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:a("TRACE")}};var o=D(k({baseUrl:"https://bridge.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/liquidation-addresses/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/liquidation-addresses/{identifier}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/operational-accounts/liquidation-address/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/operational-accounts/virtual-account/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment-processor-quote/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e}),Ke=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-transitions/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-transitions/{identifier}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-transitions/{identifier}/process/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/virtual-accounts/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/virtual-accounts/{identifier}/",...e}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/wallets/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/wallets/{identifier}/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/bridge/webhook/{company_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _33 => _33.headers])}}),Ye=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/crypto-deposit/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/{code}/",...e}),tr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _35 => _35.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/exchange-rates/",...e}),nr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/kyc-links/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _37 => _37.headers])}}),or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/virtual-accounts/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/virtual-accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/virtual-accounts/{identifier}/",...e}),ar=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function cr(e){let r=D(_chunk53JJUQ4Vjs.c.call(void 0, e,"https://bridge.services.rehive.com/api/"));return _chunk53JJUQ4Vjs.a.call(void 0, B,r)}exports.createBridgeApi = cr;
|
|
7
|
+
`);try{T=JSON.parse(w),H=!0}catch (e3){T=w}}H&&(i&&await i(T),s&&(T=await s(T))),_optionalChain([t, 'optionalCall', _2 => _2({data:T,event:N,id:m,retry:d})]),U.length&&(yield T)}}}finally{C.removeEventListener("abort",W),h.releaseLock()}break}catch(g){if(_optionalChain([r, 'optionalCall', _3 => _3(g)]),c!==void 0&&O>=c)break;let A=Math.min(d*2**(O-1),_nullishCoalesce(a, () => (3e4)));await x(A)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},q=({allowReserved:e,explode:r,name:t,style:s,value:i})=>{if(!r){let a=(e?i:i.map(p=>encodeURIComponent(p))).join(ce(s));switch(s){case"label":return`.${a}`;case"matrix":return`;${t}=${a}`;case"simple":return a;default:return`${t}=${a}`}}let u=ae(s),c=i.map(a=>s==="label"||s==="simple"?e?a:encodeURIComponent(a):b({allowReserved:e,name:t,value:a})).join(u);return s==="label"||s==="matrix"?u+c:c},b=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:r,name:t,style:s,value:i,valueOnly:u})=>{if(i instanceof Date)return u?i.toISOString():`${t}=${i.toISOString()}`;if(s!=="deepObject"&&!r){let p=[];Object.entries(i).forEach(([n,m])=>{p=[...p,n,e?m:encodeURIComponent(m)]});let l=p.join(",");switch(s){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let c=pe(s),a=Object.entries(i).map(([p,l])=>b({allowReserved:e,name:s==="deepObject"?`${t}[${p}]`:p,value:l})).join(c);return s==="label"||s==="matrix"?c+a:a};var ue=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let t=r,s=r.match(ue);if(s)for(let i of s){let u=!1,c=i.substring(1,i.length-1),a="simple";c.endsWith("*")&&(u=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),a="label"):c.startsWith(";")&&(c=c.substring(1),a="matrix");let p=e[c];if(p==null)continue;if(Array.isArray(p)){t=t.replace(i,q({explode:u,name:c,style:a,value:p}));continue}if(typeof p=="object"){t=t.replace(i,v({explode:u,name:c,style:a,value:p,valueOnly:!0}));continue}if(a==="matrix"){t=t.replace(i,`;${b({name:c,value:p})}`);continue}let l=encodeURIComponent(a==="label"?`.${p}`:p);t=t.replace(i,l)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:i})=>{let u=i.startsWith("/")?i:`/${i}`,c=(_nullishCoalesce(e, () => ("")))+u;r&&(c=de({path:r,url:c}));let a=t?s(t):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(c+=`?${a}`),c};function I(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let u in s){let c=s[u];if(c==null)continue;let a=e[u]||r;if(Array.isArray(c)){let p=q({allowReserved:a.allowReserved,explode:!0,name:u,style:"form",value:c,...a.array});p&&i.push(p)}else if(typeof c=="object"){let p=v({allowReserved:a.allowReserved,explode:!0,name:u,style:"deepObject",value:c,...a.object});p&&i.push(p)}else{let p=b({allowReserved:a.allowReserved,name:u,value:c});p&&i.push(p)}}return i.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(le(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let i=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[i]=s;break;case"cookie":r.headers.append("Cookie",`${i}=${s}`);break;case"header":default:r.headers.set(i,s);break}}},K=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),V=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,r.headers),t},ye=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},j=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?ye(t):Object.entries(t);for(let[i,u]of s)if(u===null)r.delete(i);else if(Array.isArray(u))for(let c of u)r.append(i,c);else u!==void 0&&r.set(i,typeof u=="object"?JSON.stringify(u):u)}return r},P=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new P,request:new P,response:new P}),fe=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},k=(e={})=>({...L,headers:me,parseAs:"auto",querySerializer:fe,...e});var D=(e={})=>{let r=V(k(),e),t=()=>({...r}),s=l=>(r=V(r,l),t()),i=ee(),u=async l=>{let n={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,l.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let m=K(n);return{opts:n,url:m}},c=async l=>{let{opts:n,url:m}=await u(l),x={redirect:"follow",...n,body:I(n)},R=new Request(m,x);for(let f of i.request.fns)f&&(R=await f(R,n));let z=n.fetch,d;try{d=await z(R)}catch(f){let y=f;for(let h of i.error.fns)h&&(y=await h(f,void 0,R,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:R,response:void 0}}for(let f of i.response.fns)f&&(d=await f(d,R,n));let O={request:R,response:d};if(d.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(d.headers.get("Content-Type")):n.parseAs), () => ("json"));if(d.status===204||d.headers.get("Content-Length")==="0"){let h;switch(f){case"arrayBuffer":case"blob":case"text":h=await d[f]();break;case"formData":h=new FormData;break;case"stream":h=d.body;break;case"json":default:h={};break}return n.responseStyle==="data"?h:{data:h,...O}}let y;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[f]();break;case"json":{let h=await d.text();y=h?JSON.parse(h):{};break}case"stream":return n.responseStyle==="data"?d.body:{data:d.body,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...O}}let C=await d.text(),E;try{E=JSON.parse(C)}catch (e4){}let g=_nullishCoalesce(E, () => (C)),A=g;for(let f of i.error.fns)f&&(A=await f(g,d,R,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,...O}},a=l=>n=>c({...n,method:l}),p=l=>async n=>{let{opts:m,url:x}=await u(n);return Q({...m,body:m.body,headers:m.headers,method:l,onRequest:async(R,z)=>{let d=new Request(R,z);for(let O of i.request.fns)O&&(d=await O(d,m));return d},serializedBody:I(m),url:x})};return{buildUrl:K,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:t,head:a("HEAD"),interceptors:i,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:c,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:a("TRACE")}};var o=D(k({baseUrl:"https://bridge.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/crypto-return-policies/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/liquidation-addresses/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/liquidation-addresses/{identifier}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/operational-accounts/liquidation-address/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/operational-accounts/virtual-account/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment-processor-quote/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e}),Ke=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payout-configurations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-transitions/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-transitions/{identifier}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-transitions/{identifier}/process/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/virtual-accounts/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/virtual-accounts/{identifier}/",...e}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/wallets/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/wallets/{identifier}/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/bridge/webhook/{company_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _33 => _33.headers])}}),Ye=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/crypto-deposit/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/{code}/",...e}),tr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _35 => _35.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/exchange-rates/",...e}),nr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/kyc-links/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _37 => _37.headers])}}),or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/virtual-accounts/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/virtual-accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/virtual-accounts/{identifier}/",...e}),ar=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function cr(e){let r=D(_chunkGR5TETAUjs.c.call(void 0, e,"https://bridge.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, B,r)}exports.createBridgeApi = cr;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as J,c as M}from"../chunk-
|
|
1
|
+
import{a as J,c as M}from"../chunk-S5UXBHRU.mjs";import{a as ie}from"../chunk-S4QKN5WW.mjs";var B={};ie(B,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>Re,adminCompanyRetrieve:()=>Oe,adminCompanyUpdate:()=>we,adminCryptoReturnPoliciesCreate:()=>Ce,adminCryptoReturnPoliciesDestroy:()=>ge,adminCryptoReturnPoliciesList:()=>Ae,adminCryptoReturnPoliciesPartialUpdate:()=>be,adminCryptoReturnPoliciesRetrieve:()=>Te,adminCryptoReturnPoliciesUpdate:()=>xe,adminCurrenciesList:()=>Ee,adminCurrenciesPartialUpdate:()=>Pe,adminCurrenciesRetrieve:()=>Se,adminCurrenciesUpdate:()=>ke,adminLiquidationAddressesList:()=>De,adminLiquidationAddressesRetrieve:()=>ze,adminOperationalAccountsLiquidationAddressCreate:()=>Ue,adminOperationalAccountsVirtualAccountCreate:()=>qe,adminPaymentProcessorQuoteCreate:()=>ve,adminPayoutConfigurationsCreate:()=>Le,adminPayoutConfigurationsDestroy:()=>Ie,adminPayoutConfigurationsList:()=>je,adminPayoutConfigurationsPartialUpdate:()=>Ve,adminPayoutConfigurationsRetrieve:()=>Ke,adminPayoutConfigurationsUpdate:()=>Be,adminTransactionTransitionsList:()=>We,adminTransactionTransitionsProcessCreate:()=>Ne,adminTransactionTransitionsRetrieve:()=>$e,adminVirtualAccountsList:()=>He,adminVirtualAccountsRetrieve:()=>Fe,adminWalletsList:()=>Je,adminWalletsRetrieve:()=>Me,bridgeWebhookCreate:()=>Qe,deactivateCreate:()=>_e,userCryptoDepositCreate:()=>Ze,userCurrenciesList:()=>er,userCurrenciesRetrieve:()=>rr,userExchangeRatesRetrieve:()=>tr,userKycLinksCreate:()=>nr,userPartialUpdate:()=>Xe,userRetrieve:()=>Ge,userUpdate:()=>Ye,userVirtualAccountsCreate:()=>ir,userVirtualAccountsList:()=>or,userVirtualAccountsRetrieve:()=>sr,webhookCreate:()=>ar});var L={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(se);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:u,sseMaxRetryAttempts:c,sseMaxRetryDelay:a,sseSleepFn:p,url:l,...n})=>{let m,x=p??(d=>new Promise(O=>setTimeout(O,d)));return{stream:async function*(){let d=u??3e3,O=0,C=n.signal??new AbortController().signal;for(;!C.aborted;){O++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);m!==void 0&&E.set("Last-Event-ID",m);try{let g={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:C},A=new Request(l,g);e&&(A=await e(l,g));let y=await(n.fetch??globalThis.fetch)(A);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),S="",W=()=>{try{h.cancel()}catch{}};C.addEventListener("abort",W);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;S+=te,S=S.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let $=S.split(`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
|
|
2
|
+
import '../create-auth-CHzmb_8_.mjs';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
|
|
|
249
249
|
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
250
250
|
responseStyle: TResponseStyle;
|
|
251
251
|
throwOnError: ThrowOnError;
|
|
252
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
253
253
|
/**
|
|
254
254
|
* Any body that you want to add to your request.
|
|
255
255
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
|
|
2
|
+
import '../create-auth-CHzmb_8_.js';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
|
|
|
249
249
|
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
250
250
|
responseStyle: TResponseStyle;
|
|
251
251
|
throwOnError: ThrowOnError;
|
|
252
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
253
253
|
/**
|
|
254
254
|
* Any body that you want to add to your request.
|
|
255
255
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var H={};_chunkOEIQFP6Tjs.a.call(void 0, H,{adminBuildTasksCreate:()=>ge,adminBuildTasksList:()=>he,adminBuildTasksRetrieve:()=>be,publicTemplatesList:()=>Se,publicTemplatesRetrieve:()=>Re});var v={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},we=Object.entries(oe);var K=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:c,sseMaxRetryAttempts:a,sseMaxRetryDelay:o,sseSleepFn:l,url:d,...n})=>{let y,T=_nullishCoalesce(l, () => ((p=>new Promise(h=>setTimeout(h,p)))));return{stream:async function*(){let p=_nullishCoalesce(c, () => (3e3)),h=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){h++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);y!==void 0&&C.set("Last-Event-ID",y);try{let O={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},S=new Request(d,O);e&&(S=await e(d,O));let u=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(S);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let m=u.body.pipeThrough(new TextDecoderStream).getReader(),z="",L=()=>{try{m.cancel()}catch (e2){}};R.addEventListener("abort",L);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;z+=te,z=z.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let V=z.split(`
|
|
4
4
|
|
|
5
5
|
`);z=_nullishCoalesce(V.pop(), () => (""));for(let ne of V){let ie=ne.split(`
|
|
6
6
|
`),j=[],F;for(let b of ie)if(b.startsWith("data:"))j.push(b.replace(/^data:\s*/,""));else if(b.startsWith("event:"))F=b.replace(/^event:\s*/,"");else if(b.startsWith("id:"))y=b.replace(/^id:\s*/,"");else if(b.startsWith("retry:")){let M=Number.parseInt(b.replace(/^retry:\s*/,""),10);Number.isNaN(M)||(p=M)}let x,J=!1;if(j.length){let b=j.join(`
|
|
7
|
-
`);try{x=JSON.parse(b),J=!0}catch (e3){x=b}}J&&(i&&await i(x),s&&(x=await s(x))),_optionalChain([t, 'optionalCall', _2 => _2({data:x,event:F,id:y,retry:p})]),j.length&&(yield x)}}}finally{R.removeEventListener("abort",L),m.releaseLock()}break}catch(O){if(_optionalChain([r, 'optionalCall', _3 => _3(O)]),a!==void 0&&h>=a)break;let S=Math.min(p*2**(h-1),_nullishCoalesce(o, () => (3e4)));await T(S)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},le=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ce=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},D=({allowReserved:e,explode:r,name:t,style:s,value:i})=>{if(!r){let o=(e?i:i.map(l=>encodeURIComponent(l))).join(le(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let c=ae(s),a=i.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):w({allowReserved:e,name:t,value:o})).join(c);return s==="label"||s==="matrix"?c+a:a},w=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},B=({allowReserved:e,explode:r,name:t,style:s,value:i,valueOnly:c})=>{if(i instanceof Date)return c?i.toISOString():`${t}=${i.toISOString()}`;if(s!=="deepObject"&&!r){let l=[];Object.entries(i).forEach(([n,y])=>{l=[...l,n,e?y:encodeURIComponent(y)]});let d=l.join(",");switch(s){case"form":return`${t}=${d}`;case"label":return`.${d}`;case"matrix":return`;${t}=${d}`;default:return d}}let a=ce(s),o=Object.entries(i).map(([l,d])=>w({allowReserved:e,name:s==="deepObject"?`${t}[${l}]`:l,value:d})).join(a);return s==="label"||s==="matrix"?a+o:o};var pe=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let t=r,s=r.match(pe);if(s)for(let i of s){let c=!1,a=i.substring(1,i.length-1),o="simple";a.endsWith("*")&&(c=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),o="label"):a.startsWith(";")&&(a=a.substring(1),o="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){t=t.replace(i,D({explode:c,name:a,style:o,value:l}));continue}if(typeof l=="object"){t=t.replace(i,B({explode:c,name:a,style:o,value:l,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(i,`;${w({name:a,value:l})}`);continue}let d=encodeURIComponent(o==="label"?`.${l}`:l);t=t.replace(i,d)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:i})=>{let c=i.startsWith("/")?i:`/${i}`,a=(_nullishCoalesce(e, () => ("")))+c;r&&(a=de({path:r,url:a}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(a+=`?${o}`),a};function $(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let c in s){let a=s[c];if(a==null)continue;let o=e[c]||r;if(Array.isArray(a)){let l=D({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:a,...o.array});l&&i.push(l)}else if(typeof a=="object"){let l=B({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:a,...o.object});l&&i.push(l)}else{let l=w({allowReserved:o.allowReserved,name:c,value:a});l&&i.push(l)}}return i.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let i=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[i]=s;break;case"cookie":r.headers.append("Cookie",`${i}=${s}`);break;case"header":default:r.headers.set(i,s);break}}},U=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),N=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=I(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},I=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?fe(t):Object.entries(t);for(let[i,c]of s)if(c===null)r.delete(i);else if(Array.isArray(c))for(let a of c)r.append(i,a);else c!==void 0&&r.set(i,typeof c=="object"?JSON.stringify(c):c)}return r},A=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new A,request:new A,response:new A}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},q=(e={})=>({...v,headers:me,parseAs:"auto",querySerializer:ye,...e});var E=(e={})=>{let r=N(q(),e),t=()=>({...r}),s=d=>(r=N(r,d),t()),i=ee(),c=async d=>{let n={...r,...d,fetch:_nullishCoalesce(_nullishCoalesce(d.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:I(r.headers,d.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=U(n);return{opts:n,url:y}},a=async d=>{let{opts:n,url:y}=await c(d),T={redirect:"follow",...n,body:$(n)},g=new Request(y,T);for(let f of i.request.fns)f&&(g=await f(g,n));let P=n.fetch,p;try{p=await P(g)}catch(f){let u=f;for(let m of i.error.fns)m&&(u=await m(f,void 0,g,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:g,response:void 0}}for(let f of i.response.fns)f&&(p=await f(p,g,n));let h={request:g,response:p};if(p.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(p.headers.get("Content-Type")):n.parseAs), () => ("json"));if(p.status===204||p.headers.get("Content-Length")==="0"){let m;switch(f){case"arrayBuffer":case"blob":case"text":m=await p[f]();break;case"formData":m=new FormData;break;case"stream":m=p.body;break;case"json":default:m={};break}return n.responseStyle==="data"?m:{data:m,...h}}let u;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":u=await p[f]();break;case"json":{let m=await p.text();u=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?p.body:{data:p.body,...h}}return f==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.responseStyle==="data"?u:{data:u,...h}}let R=await p.text(),C;try{C=JSON.parse(R)}catch (e4){}let O=_nullishCoalesce(C, () => (R)),S=O;for(let f of i.error.fns)f&&(S=await f(O,p,g,n));if(S=S||{},n.throwOnError)throw S;return n.responseStyle==="data"?void 0:{error:S,...h}},o=d=>n=>a({...n,method:d}),l=d=>async n=>{let{opts:y,url:T}=await c(n);return K({...y,body:y.body,headers:y.headers,method:d,onRequest:async(g,P)=>{let p=new Request(g,P);for(let h of i.request.fns)h&&(p=await h(p,y));return p},serializedBody:$(y),url:T})};return{buildUrl:U,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:i,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:a,setConfig:s,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:o("TRACE")}};var k=E(q({baseUrl:"https://builder.services.rehive.io/api/"}));var he=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (k))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/build-tasks/",...e}),ge=e=>(_nullishCoalesce(e.client, () => (k))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/build-tasks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(_nullishCoalesce(e.client, () => (k))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/build-tasks/{identifier}/",...e}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (k))).get({url:"/public/templates/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (k))).get({url:"/public/templates/{identifier}/",...e});function Oe(e){let r=E(
|
|
7
|
+
`);try{x=JSON.parse(b),J=!0}catch (e3){x=b}}J&&(i&&await i(x),s&&(x=await s(x))),_optionalChain([t, 'optionalCall', _2 => _2({data:x,event:F,id:y,retry:p})]),j.length&&(yield x)}}}finally{R.removeEventListener("abort",L),m.releaseLock()}break}catch(O){if(_optionalChain([r, 'optionalCall', _3 => _3(O)]),a!==void 0&&h>=a)break;let S=Math.min(p*2**(h-1),_nullishCoalesce(o, () => (3e4)));await T(S)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},le=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ce=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},D=({allowReserved:e,explode:r,name:t,style:s,value:i})=>{if(!r){let o=(e?i:i.map(l=>encodeURIComponent(l))).join(le(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let c=ae(s),a=i.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):w({allowReserved:e,name:t,value:o})).join(c);return s==="label"||s==="matrix"?c+a:a},w=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},B=({allowReserved:e,explode:r,name:t,style:s,value:i,valueOnly:c})=>{if(i instanceof Date)return c?i.toISOString():`${t}=${i.toISOString()}`;if(s!=="deepObject"&&!r){let l=[];Object.entries(i).forEach(([n,y])=>{l=[...l,n,e?y:encodeURIComponent(y)]});let d=l.join(",");switch(s){case"form":return`${t}=${d}`;case"label":return`.${d}`;case"matrix":return`;${t}=${d}`;default:return d}}let a=ce(s),o=Object.entries(i).map(([l,d])=>w({allowReserved:e,name:s==="deepObject"?`${t}[${l}]`:l,value:d})).join(a);return s==="label"||s==="matrix"?a+o:o};var pe=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let t=r,s=r.match(pe);if(s)for(let i of s){let c=!1,a=i.substring(1,i.length-1),o="simple";a.endsWith("*")&&(c=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),o="label"):a.startsWith(";")&&(a=a.substring(1),o="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){t=t.replace(i,D({explode:c,name:a,style:o,value:l}));continue}if(typeof l=="object"){t=t.replace(i,B({explode:c,name:a,style:o,value:l,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(i,`;${w({name:a,value:l})}`);continue}let d=encodeURIComponent(o==="label"?`.${l}`:l);t=t.replace(i,d)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:i})=>{let c=i.startsWith("/")?i:`/${i}`,a=(_nullishCoalesce(e, () => ("")))+c;r&&(a=de({path:r,url:a}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(a+=`?${o}`),a};function $(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let i=[];if(s&&typeof s=="object")for(let c in s){let a=s[c];if(a==null)continue;let o=e[c]||r;if(Array.isArray(a)){let l=D({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:a,...o.array});l&&i.push(l)}else if(typeof a=="object"){let l=B({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:a,...o.object});l&&i.push(l)}else{let l=w({allowReserved:o.allowReserved,name:c,value:a});l&&i.push(l)}}return i.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let i=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[i]=s;break;case"cookie":r.headers.append("Cookie",`${i}=${s}`);break;case"header":default:r.headers.set(i,s);break}}},U=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),N=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=I(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},I=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?fe(t):Object.entries(t);for(let[i,c]of s)if(c===null)r.delete(i);else if(Array.isArray(c))for(let a of c)r.append(i,a);else c!==void 0&&r.set(i,typeof c=="object"?JSON.stringify(c):c)}return r},A=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new A,request:new A,response:new A}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},q=(e={})=>({...v,headers:me,parseAs:"auto",querySerializer:ye,...e});var E=(e={})=>{let r=N(q(),e),t=()=>({...r}),s=d=>(r=N(r,d),t()),i=ee(),c=async d=>{let n={...r,...d,fetch:_nullishCoalesce(_nullishCoalesce(d.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:I(r.headers,d.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=U(n);return{opts:n,url:y}},a=async d=>{let{opts:n,url:y}=await c(d),T={redirect:"follow",...n,body:$(n)},g=new Request(y,T);for(let f of i.request.fns)f&&(g=await f(g,n));let P=n.fetch,p;try{p=await P(g)}catch(f){let u=f;for(let m of i.error.fns)m&&(u=await m(f,void 0,g,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:g,response:void 0}}for(let f of i.response.fns)f&&(p=await f(p,g,n));let h={request:g,response:p};if(p.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(p.headers.get("Content-Type")):n.parseAs), () => ("json"));if(p.status===204||p.headers.get("Content-Length")==="0"){let m;switch(f){case"arrayBuffer":case"blob":case"text":m=await p[f]();break;case"formData":m=new FormData;break;case"stream":m=p.body;break;case"json":default:m={};break}return n.responseStyle==="data"?m:{data:m,...h}}let u;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":u=await p[f]();break;case"json":{let m=await p.text();u=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?p.body:{data:p.body,...h}}return f==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.responseStyle==="data"?u:{data:u,...h}}let R=await p.text(),C;try{C=JSON.parse(R)}catch (e4){}let O=_nullishCoalesce(C, () => (R)),S=O;for(let f of i.error.fns)f&&(S=await f(O,p,g,n));if(S=S||{},n.throwOnError)throw S;return n.responseStyle==="data"?void 0:{error:S,...h}},o=d=>n=>a({...n,method:d}),l=d=>async n=>{let{opts:y,url:T}=await c(n);return K({...y,body:y.body,headers:y.headers,method:d,onRequest:async(g,P)=>{let p=new Request(g,P);for(let h of i.request.fns)h&&(p=await h(p,y));return p},serializedBody:$(y),url:T})};return{buildUrl:U,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:i,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:a,setConfig:s,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:o("TRACE")}};var k=E(q({baseUrl:"https://builder.services.rehive.io/api/"}));var he=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (k))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/build-tasks/",...e}),ge=e=>(_nullishCoalesce(e.client, () => (k))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/build-tasks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(_nullishCoalesce(e.client, () => (k))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/build-tasks/{identifier}/",...e}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (k))).get({url:"/public/templates/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (k))).get({url:"/public/templates/{identifier}/",...e});function Oe(e){let r=E(_chunkGR5TETAUjs.c.call(void 0, e,"https://builder.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, H,r)}exports.createBuilderApi = Oe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as W,c as Q}from"../chunk-
|
|
1
|
+
import{a as W,c as Q}from"../chunk-S5UXBHRU.mjs";import{a as se}from"../chunk-S4QKN5WW.mjs";var H={};se(H,{adminBuildTasksCreate:()=>ge,adminBuildTasksList:()=>he,adminBuildTasksRetrieve:()=>be,publicTemplatesList:()=>Se,publicTemplatesRetrieve:()=>Re});var v={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},we=Object.entries(oe);var K=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:c,sseMaxRetryAttempts:a,sseMaxRetryDelay:o,sseSleepFn:l,url:d,...n})=>{let y,T=l??(p=>new Promise(h=>setTimeout(h,p)));return{stream:async function*(){let p=c??3e3,h=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){h++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);y!==void 0&&C.set("Last-Event-ID",y);try{let O={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},S=new Request(d,O);e&&(S=await e(d,O));let u=await(n.fetch??globalThis.fetch)(S);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let m=u.body.pipeThrough(new TextDecoderStream).getReader(),z="",L=()=>{try{m.cancel()}catch{}};R.addEventListener("abort",L);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;z+=te,z=z.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let V=z.split(`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
|
|
2
|
+
import '../create-auth-CHzmb_8_.mjs';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
|
|
|
249
249
|
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
250
250
|
responseStyle: TResponseStyle;
|
|
251
251
|
throwOnError: ThrowOnError;
|
|
252
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
253
253
|
/**
|
|
254
254
|
* Any body that you want to add to your request.
|
|
255
255
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
|
|
2
|
+
import '../create-auth-CHzmb_8_.js';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
|
|
|
249
249
|
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
250
250
|
responseStyle: TResponseStyle;
|
|
251
251
|
throwOnError: ThrowOnError;
|
|
252
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
253
253
|
/**
|
|
254
254
|
* Any body that you want to add to your request.
|
|
255
255
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var K={};_chunkOEIQFP6Tjs.a.call(void 0, K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>cs,managerBusinessesCreate:()=>as,managerBusinessesDocumentsCreate:()=>ls,managerBusinessesDocumentsList:()=>ds,managerBusinessesDocumentsRetrieve:()=>ys,managerBusinessesInvoicesCreate:()=>hs,managerBusinessesInvoicesList:()=>ms,managerBusinessesInvoicesLogsList:()=>ws,managerBusinessesInvoicesPartialUpdate:()=>fs,managerBusinessesInvoicesRefundsCreate:()=>bs,managerBusinessesInvoicesRefundsList:()=>Rs,managerBusinessesInvoicesRetrieve:()=>gs,managerBusinessesInvoicesTransactionsList:()=>Bs,managerBusinessesInvoicesUpdate:()=>Os,managerBusinessesList:()=>ts,managerBusinessesMetricsList:()=>Ts,managerBusinessesMetricsPointsList:()=>Es,managerBusinessesMetricsRetrieve:()=>Cs,managerBusinessesPartialUpdate:()=>os,managerBusinessesPayoutsCreate:()=>xs,managerBusinessesPayoutsList:()=>As,managerBusinessesPayoutsRetrieve:()=>Ds,managerBusinessesPayoutsTransactionsList:()=>vs,managerBusinessesRetrieve:()=>is,managerBusinessesTransactionsList:()=>ks,managerBusinessesTransactionsRetrieve:()=>Ms,managerBusinessesUpdate:()=>us,managerBusinessesUsersCreate:()=>Ss,managerBusinessesUsersList:()=>Us,managerBusinessesUsersPartialUpdate:()=>Ps,managerBusinessesUsersRetrieve:()=>zs,managerBusinessesUsersUpdate:()=>Ls,managerCompanyRetrieve:()=>qs,userBusinessCategoriesList:()=>Ks,userBusinessCategoriesRetrieve:()=>_s,userBusinessesList:()=>$s,userBusinessesRetrieve:()=>Ns,userCompanyRetrieve:()=>Ws,webhookCreate:()=>Hs});var L={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Js=Object.entries(ie);var J=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:c,sseMaxRetryAttempts:u,sseMaxRetryDelay:o,sseSleepFn:p,url:l,...t})=>{let h,E=_nullishCoalesce(p, () => ((d=>new Promise(f=>setTimeout(f,d)))));return{stream:async function*(){let d=_nullishCoalesce(c, () => (3e3)),f=0,b=_nullishCoalesce(t.signal, () => (new AbortController().signal));for(;!b.aborted;){f++;let A=t.headers instanceof Headers?t.headers:new Headers(t.headers);h!==void 0&&A.set("Last-Event-ID",h);try{let B={redirect:"follow",...t,body:t.serializedBody,headers:A,signal:b},R=new Request(l,B);e&&(R=await e(l,B));let y=await(_nullishCoalesce(t.fetch, () => (globalThis.fetch)))(R);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let g=y.body.pipeThrough(new TextDecoderStream).getReader(),x="",_=()=>{try{g.cancel()}catch (e2){}};b.addEventListener("abort",_);try{for(;;){let{done:se,value:re}=await g.read();if(se)break;x+=re,x=x.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let $=x.split(`
|
|
4
4
|
|
|
5
5
|
`);x=_nullishCoalesce($.pop(), () => (""));for(let ne of $){let te=ne.split(`
|
|
6
6
|
`),U=[],N;for(let w of te)if(w.startsWith("data:"))U.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))N=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))h=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let H=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(d=H)}let T,W=!1;if(U.length){let w=U.join(`
|
|
7
|
-
`);try{T=JSON.parse(w),W=!0}catch (e3){T=w}}W&&(a&&await a(T),i&&(T=await i(T))),_optionalChain([n, 'optionalCall', _2 => _2({data:T,event:N,id:h,retry:d})]),U.length&&(yield T)}}}finally{b.removeEventListener("abort",_),g.releaseLock()}break}catch(B){if(_optionalChain([r, 'optionalCall', _3 => _3(B)]),u!==void 0&&f>=u)break;let R=Math.min(d*2**(f-1),_nullishCoalesce(o, () => (3e4)));await E(R)}}}()}};var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let c=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):C({allowReserved:e,name:n,value:o})).join(c);return i==="label"||i==="matrix"?c+u:u},C=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:c})=>{if(a instanceof Date)return c?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([t,h])=>{p=[...p,t,e?h:encodeURIComponent(h)]});let l=p.join(",");switch(i){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let u=pe(i),o=Object.entries(a).map(([p,l])=>C({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:l})).join(u);return i==="label"||i==="matrix"?u+o:o};var ce=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let n=r,i=r.match(ce);if(i)for(let a of i){let c=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(c=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:c,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:c,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${C({name:u,value:p})}`);continue}let l=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,l)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let c=a.startsWith("/")?a:`/${a}`,u=(_nullishCoalesce(e, () => ("")))+c;r&&(u=de({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let c in i){let u=i[c];if(u==null)continue;let o=e[c]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=C({allowReserved:o.allowReserved,name:c,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=_nullishCoalesce(n.name, () => ("Authorization"));switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return _optionalChain([n, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,c]of i)if(c===null)r.delete(a);else if(Array.isArray(c))for(let u of c)r.append(a,u);else c!==void 0&&r.set(a,typeof c=="object"?JSON.stringify(c):c)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},v=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var k=(e={})=>{let r=q(v(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),c=async l=>{let t={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let h=I(t);return{opts:t,url:h}},u=async l=>{let{opts:t,url:h}=await c(l),E={redirect:"follow",...t,body:j(t)},O=new Request(h,E);for(let m of a.request.fns)m&&(O=await m(O,t));let M=t.fetch,d;try{d=await M(O)}catch(m){let y=m;for(let g of a.error.fns)g&&(y=await g(m,void 0,O,t));if(y=y||{},t.throwOnError)throw y;return t.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of a.response.fns)m&&(d=await m(d,O,t));let f={request:O,response:d};if(d.ok){let m=_nullishCoalesce((t.parseAs==="auto"?Y(d.headers.get("Content-Type")):t.parseAs), () => ("json"));if(d.status===204||d.headers.get("Content-Length")==="0"){let g;switch(m){case"arrayBuffer":case"blob":case"text":g=await d[m]();break;case"formData":g=new FormData;break;case"stream":g=d.body;break;case"json":default:g={};break}return t.responseStyle==="data"?g:{data:g,...f}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[m]();break;case"json":{let g=await d.text();y=g?JSON.parse(g):{};break}case"stream":return t.responseStyle==="data"?d.body:{data:d.body,...f}}return m==="json"&&(t.responseValidator&&await t.responseValidator(y),t.responseTransformer&&(y=await t.responseTransformer(y))),t.responseStyle==="data"?y:{data:y,...f}}let b=await d.text(),A;try{A=JSON.parse(b)}catch (e4){}let B=_nullishCoalesce(A, () => (b)),R=B;for(let m of a.error.fns)m&&(R=await m(B,d,O,t));if(R=R||{},t.throwOnError)throw R;return t.responseStyle==="data"?void 0:{error:R,...f}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:h,url:E}=await c(t);return J({...h,body:h.body,headers:h.headers,method:l,onRequest:async(O,M)=>{let d=new Request(O,M);for(let f of a.request.fns)f&&(d=await f(d,h));return d},serializedBody:j(h),url:E})};return{buildUrl:I,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=k(v({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),Qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=k(_chunk53JJUQ4Vjs.c.call(void 0, e,"https://business.services.rehive.com/api/"));return _chunk53JJUQ4Vjs.a.call(void 0, K,r)}exports.createBusinessApi = Vs;
|
|
7
|
+
`);try{T=JSON.parse(w),W=!0}catch (e3){T=w}}W&&(a&&await a(T),i&&(T=await i(T))),_optionalChain([n, 'optionalCall', _2 => _2({data:T,event:N,id:h,retry:d})]),U.length&&(yield T)}}}finally{b.removeEventListener("abort",_),g.releaseLock()}break}catch(B){if(_optionalChain([r, 'optionalCall', _3 => _3(B)]),u!==void 0&&f>=u)break;let R=Math.min(d*2**(f-1),_nullishCoalesce(o, () => (3e4)));await E(R)}}}()}};var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let c=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):C({allowReserved:e,name:n,value:o})).join(c);return i==="label"||i==="matrix"?c+u:u},C=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:c})=>{if(a instanceof Date)return c?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([t,h])=>{p=[...p,t,e?h:encodeURIComponent(h)]});let l=p.join(",");switch(i){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let u=pe(i),o=Object.entries(a).map(([p,l])=>C({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:l})).join(u);return i==="label"||i==="matrix"?u+o:o};var ce=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let n=r,i=r.match(ce);if(i)for(let a of i){let c=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(c=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:c,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:c,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${C({name:u,value:p})}`);continue}let l=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,l)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let c=a.startsWith("/")?a:`/${a}`,u=(_nullishCoalesce(e, () => ("")))+c;r&&(u=de({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let c in i){let u=i[c];if(u==null)continue;let o=e[c]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=C({allowReserved:o.allowReserved,name:c,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=_nullishCoalesce(n.name, () => ("Authorization"));switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return _optionalChain([n, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,c]of i)if(c===null)r.delete(a);else if(Array.isArray(c))for(let u of c)r.append(a,u);else c!==void 0&&r.set(a,typeof c=="object"?JSON.stringify(c):c)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},v=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var k=(e={})=>{let r=q(v(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),c=async l=>{let t={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let h=I(t);return{opts:t,url:h}},u=async l=>{let{opts:t,url:h}=await c(l),E={redirect:"follow",...t,body:j(t)},O=new Request(h,E);for(let m of a.request.fns)m&&(O=await m(O,t));let M=t.fetch,d;try{d=await M(O)}catch(m){let y=m;for(let g of a.error.fns)g&&(y=await g(m,void 0,O,t));if(y=y||{},t.throwOnError)throw y;return t.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of a.response.fns)m&&(d=await m(d,O,t));let f={request:O,response:d};if(d.ok){let m=_nullishCoalesce((t.parseAs==="auto"?Y(d.headers.get("Content-Type")):t.parseAs), () => ("json"));if(d.status===204||d.headers.get("Content-Length")==="0"){let g;switch(m){case"arrayBuffer":case"blob":case"text":g=await d[m]();break;case"formData":g=new FormData;break;case"stream":g=d.body;break;case"json":default:g={};break}return t.responseStyle==="data"?g:{data:g,...f}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[m]();break;case"json":{let g=await d.text();y=g?JSON.parse(g):{};break}case"stream":return t.responseStyle==="data"?d.body:{data:d.body,...f}}return m==="json"&&(t.responseValidator&&await t.responseValidator(y),t.responseTransformer&&(y=await t.responseTransformer(y))),t.responseStyle==="data"?y:{data:y,...f}}let b=await d.text(),A;try{A=JSON.parse(b)}catch (e4){}let B=_nullishCoalesce(A, () => (b)),R=B;for(let m of a.error.fns)m&&(R=await m(B,d,O,t));if(R=R||{},t.throwOnError)throw R;return t.responseStyle==="data"?void 0:{error:R,...f}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:h,url:E}=await c(t);return J({...h,body:h.body,headers:h.headers,method:l,onRequest:async(O,M)=>{let d=new Request(O,M);for(let f of a.request.fns)f&&(d=await f(d,h));return d},serializedBody:j(h),url:E})};return{buildUrl:I,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=k(v({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),Qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=k(_chunkGR5TETAUjs.c.call(void 0, e,"https://business.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, K,r)}exports.createBusinessApi = Vs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as V,c as F}from"../chunk-
|
|
1
|
+
import{a as V,c as F}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>cs,managerBusinessesCreate:()=>as,managerBusinessesDocumentsCreate:()=>ls,managerBusinessesDocumentsList:()=>ds,managerBusinessesDocumentsRetrieve:()=>ys,managerBusinessesInvoicesCreate:()=>hs,managerBusinessesInvoicesList:()=>ms,managerBusinessesInvoicesLogsList:()=>ws,managerBusinessesInvoicesPartialUpdate:()=>fs,managerBusinessesInvoicesRefundsCreate:()=>bs,managerBusinessesInvoicesRefundsList:()=>Rs,managerBusinessesInvoicesRetrieve:()=>gs,managerBusinessesInvoicesTransactionsList:()=>Bs,managerBusinessesInvoicesUpdate:()=>Os,managerBusinessesList:()=>ts,managerBusinessesMetricsList:()=>Ts,managerBusinessesMetricsPointsList:()=>Es,managerBusinessesMetricsRetrieve:()=>Cs,managerBusinessesPartialUpdate:()=>os,managerBusinessesPayoutsCreate:()=>xs,managerBusinessesPayoutsList:()=>As,managerBusinessesPayoutsRetrieve:()=>Ds,managerBusinessesPayoutsTransactionsList:()=>vs,managerBusinessesRetrieve:()=>is,managerBusinessesTransactionsList:()=>ks,managerBusinessesTransactionsRetrieve:()=>Ms,managerBusinessesUpdate:()=>us,managerBusinessesUsersCreate:()=>Ss,managerBusinessesUsersList:()=>Us,managerBusinessesUsersPartialUpdate:()=>Ps,managerBusinessesUsersRetrieve:()=>zs,managerBusinessesUsersUpdate:()=>Ls,managerCompanyRetrieve:()=>qs,userBusinessCategoriesList:()=>Ks,userBusinessCategoriesRetrieve:()=>_s,userBusinessesList:()=>$s,userBusinessesRetrieve:()=>Ns,userCompanyRetrieve:()=>Ws,webhookCreate:()=>Hs});var L={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Js=Object.entries(ie);var J=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:c,sseMaxRetryAttempts:u,sseMaxRetryDelay:o,sseSleepFn:p,url:l,...t})=>{let h,E=p??(d=>new Promise(f=>setTimeout(f,d)));return{stream:async function*(){let d=c??3e3,f=0,b=t.signal??new AbortController().signal;for(;!b.aborted;){f++;let A=t.headers instanceof Headers?t.headers:new Headers(t.headers);h!==void 0&&A.set("Last-Event-ID",h);try{let B={redirect:"follow",...t,body:t.serializedBody,headers:A,signal:b},R=new Request(l,B);e&&(R=await e(l,B));let y=await(t.fetch??globalThis.fetch)(R);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let g=y.body.pipeThrough(new TextDecoderStream).getReader(),x="",_=()=>{try{g.cancel()}catch{}};b.addEventListener("abort",_);try{for(;;){let{done:se,value:re}=await g.read();if(se)break;x+=re,x=x.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);let $=x.split(`
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
|
|
2
|
+
import '../create-auth-CHzmb_8_.mjs';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
|
|
|
249
249
|
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
250
250
|
responseStyle: TResponseStyle;
|
|
251
251
|
throwOnError: ThrowOnError;
|
|
252
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
253
253
|
/**
|
|
254
254
|
* Any body that you want to add to your request.
|
|
255
255
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
|
|
2
|
+
import '../create-auth-CHzmb_8_.js';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
|
|
|
249
249
|
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
250
250
|
responseStyle: TResponseStyle;
|
|
251
251
|
throwOnError: ThrowOnError;
|
|
252
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
252
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
253
253
|
/**
|
|
254
254
|
* Any body that you want to add to your request.
|
|
255
255
|
*
|