rehive 4.3.0 → 4.4.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 +14445 -5452
- package/dist/admin.d.ts +14445 -5452
- 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-MAMZSYFF.js → chunk-3BG2PD7X.js} +1 -1
- package/dist/chunk-4FVXXRGV.mjs +6 -0
- package/dist/chunk-AIKSGC2F.js +6 -0
- package/dist/chunk-BLPR7LRO.mjs +6 -0
- package/dist/{chunk-KOUIKOXX.mjs → chunk-HAVKMJEY.mjs} +1 -1
- package/dist/{chunk-QKHQP5JT.mjs → chunk-JZVYT324.mjs} +1 -1
- package/dist/chunk-K5GNAPOS.js +6 -0
- package/dist/{chunk-OP7MQ6KX.js → chunk-Y7BCC5TX.js} +1 -1
- package/dist/{create-api-client-DvXFNRl7.d.mts → create-api-client-BY6W7Qz9.d.mts} +1 -1
- package/dist/{create-api-client-C02JVdcx.d.ts → create-api-client-CBNjHT-x.d.ts} +1 -1
- package/dist/{create-auth-9l3wfvKL.d.mts → create-auth-CROjq_cP.d.mts} +9193 -2388
- package/dist/{create-auth-9l3wfvKL.d.ts → create-auth-CROjq_cP.d.ts} +9193 -2388
- package/dist/extensions/alchemy.d.mts +84 -6
- package/dist/extensions/alchemy.d.ts +84 -6
- package/dist/extensions/alchemy.js +3 -3
- package/dist/extensions/alchemy.mjs +3 -3
- package/dist/extensions/app.d.mts +8 -3
- package/dist/extensions/app.d.ts +8 -3
- package/dist/extensions/app.js +3 -3
- package/dist/extensions/app.mjs +3 -3
- package/dist/extensions/billing.d.mts +8 -3
- package/dist/extensions/billing.d.ts +8 -3
- package/dist/extensions/billing.js +3 -3
- package/dist/extensions/billing.mjs +3 -3
- package/dist/extensions/bridge.d.mts +165 -5
- package/dist/extensions/bridge.d.ts +165 -5
- package/dist/extensions/bridge.js +3 -3
- package/dist/extensions/bridge.mjs +3 -3
- package/dist/extensions/builder.d.mts +8 -3
- package/dist/extensions/builder.d.ts +8 -3
- package/dist/extensions/builder.js +4 -4
- package/dist/extensions/builder.mjs +4 -4
- package/dist/extensions/business.d.mts +8 -3
- package/dist/extensions/business.d.ts +8 -3
- package/dist/extensions/business.js +5 -5
- package/dist/extensions/business.mjs +5 -5
- package/dist/extensions/conversion.d.mts +8 -3
- package/dist/extensions/conversion.d.ts +8 -3
- package/dist/extensions/mass-send.d.mts +8 -3
- package/dist/extensions/mass-send.d.ts +8 -3
- package/dist/extensions/mukuru.d.mts +207 -55
- package/dist/extensions/mukuru.d.ts +207 -55
- package/dist/extensions/mukuru.js +5 -5
- package/dist/extensions/mukuru.mjs +5 -5
- package/dist/extensions/notifications.d.mts +9 -3
- package/dist/extensions/notifications.d.ts +9 -3
- package/dist/extensions/payment-requests.d.mts +8 -3
- package/dist/extensions/payment-requests.d.ts +8 -3
- package/dist/extensions/payment-requests.js +4 -4
- package/dist/extensions/payment-requests.mjs +4 -4
- package/dist/extensions/products.d.mts +8 -3
- package/dist/extensions/products.d.ts +8 -3
- package/dist/extensions/rain.d.mts +8 -3
- package/dist/extensions/rain.d.ts +8 -3
- package/dist/extensions/rain.js +2 -2
- package/dist/extensions/rain.mjs +2 -2
- package/dist/extensions/rewards.d.mts +8 -3
- package/dist/extensions/rewards.d.ts +8 -3
- package/dist/extensions/rewards.js +2 -2
- package/dist/extensions/rewards.mjs +2 -2
- package/dist/extensions/stellar-testnet.d.mts +8 -3
- package/dist/extensions/stellar-testnet.d.ts +8 -3
- package/dist/extensions/stellar-testnet.js +4 -4
- package/dist/extensions/stellar-testnet.mjs +4 -4
- package/dist/extensions/stellar.d.mts +8 -3
- package/dist/extensions/stellar.d.ts +8 -3
- package/dist/extensions/stellar.js +4 -4
- package/dist/extensions/stellar.mjs +4 -4
- package/dist/extensions/sumsub.d.mts +54 -27
- package/dist/extensions/sumsub.d.ts +54 -27
- package/dist/extensions/sumsub.js +2 -2
- package/dist/extensions/sumsub.mjs +2 -2
- 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 +17 -6
- package/dist/user.d.ts +17 -6
- package/dist/user.js +1 -1
- package/dist/user.mjs +1 -1
- package/package.json +1 -1
- package/src/extensions/alchemy/openapi-ts/client/index.ts +1 -0
- package/src/extensions/alchemy/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/alchemy/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/alchemy/openapi-ts/index.ts +2 -2
- package/src/extensions/alchemy/openapi-ts/sdk.gen.ts +29 -3
- package/src/extensions/alchemy/openapi-ts/types.gen.ts +82 -1
- package/src/extensions/app/openapi-ts/client/index.ts +1 -0
- package/src/extensions/app/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/app/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/app/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/billing/openapi-ts/client/index.ts +1 -0
- package/src/extensions/billing/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/billing/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/billing/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/bridge/openapi-ts/client/index.ts +1 -0
- package/src/extensions/bridge/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/bridge/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/bridge/openapi-ts/index.ts +2 -2
- package/src/extensions/bridge/openapi-ts/sdk.gen.ts +35 -3
- package/src/extensions/bridge/openapi-ts/types.gen.ts +171 -0
- package/src/extensions/builder/openapi-ts/client/index.ts +1 -0
- package/src/extensions/builder/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/builder/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/builder/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/business/openapi-ts/client/index.ts +1 -0
- package/src/extensions/business/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/business/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/business/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/conversion/openapi-ts/client/index.ts +1 -0
- package/src/extensions/conversion/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/conversion/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/conversion/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/mass-send/openapi-ts/client/index.ts +1 -0
- package/src/extensions/mass-send/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/mass-send/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/mass-send/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/mukuru/openapi-ts/client/index.ts +1 -0
- package/src/extensions/mukuru/openapi-ts/client.gen.ts +1 -1
- package/src/extensions/mukuru/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/mukuru/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/mukuru/openapi-ts/index.ts +2 -2
- package/src/extensions/mukuru/openapi-ts/sdk.gen.ts +21 -3
- package/src/extensions/mukuru/openapi-ts/types.gen.ts +204 -52
- package/src/extensions/notifications/openapi-ts/client/index.ts +1 -0
- package/src/extensions/notifications/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/notifications/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/notifications/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/notifications/openapi-ts/types.gen.ts +1 -0
- package/src/extensions/payment-requests/openapi-ts/client/index.ts +1 -0
- package/src/extensions/payment-requests/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/payment-requests/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/payment-requests/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/products/openapi-ts/client/index.ts +1 -0
- package/src/extensions/products/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/products/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/products/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/rain/openapi-ts/client/index.ts +1 -0
- package/src/extensions/rain/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/rain/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/rain/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/rewards/openapi-ts/client/index.ts +1 -0
- package/src/extensions/rewards/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/rewards/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/rewards/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/stellar/openapi-ts/client/index.ts +1 -0
- package/src/extensions/stellar/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/stellar/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/stellar/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/stellar-testnet/openapi-ts/client/index.ts +1 -0
- package/src/extensions/stellar-testnet/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/stellar-testnet/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/stellar-testnet/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/sumsub/openapi-ts/client/index.ts +1 -0
- package/src/extensions/sumsub/openapi-ts/core/params.gen.ts +18 -11
- package/src/extensions/sumsub/openapi-ts/core/types.gen.ts +6 -0
- package/src/extensions/sumsub/openapi-ts/sdk.gen.ts +2 -2
- package/src/extensions/sumsub/openapi-ts/types.gen.ts +46 -24
- package/src/platform/admin/openapi-ts/client/index.ts +1 -0
- package/src/platform/admin/openapi-ts/core/params.gen.ts +18 -11
- package/src/platform/admin/openapi-ts/core/types.gen.ts +6 -0
- package/src/platform/admin/openapi-ts/index.ts +2 -2
- package/src/platform/admin/openapi-ts/sdk.gen.ts +51 -3
- package/src/platform/admin/openapi-ts/types.gen.ts +13012 -4000
- package/src/platform/user/openapi-ts/client/index.ts +1 -0
- package/src/platform/user/openapi-ts/core/params.gen.ts +18 -11
- package/src/platform/user/openapi-ts/core/types.gen.ts +6 -0
- package/src/platform/user/openapi-ts/index.ts +2 -2
- package/src/platform/user/openapi-ts/sdk.gen.ts +37 -3
- package/src/platform/user/openapi-ts/types.gen.ts +11236 -4408
- package/dist/chunk-HSNZ57ET.mjs +0 -6
- package/dist/chunk-M6Z3PA5D.js +0 -6
- package/dist/chunk-WNBM6WBC.mjs +0 -6
- package/dist/chunk-YPGO2Y5R.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var $={};oe($,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>Re,adminCompanyUpdate:()=>Oe,adminProductsCreate:()=>
|
|
2
|
-
`);let
|
|
1
|
+
import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var $={};oe($,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>Re,adminCompanyUpdate:()=>Oe,adminOperationalAccountsRetrieve:()=>ge,adminProductsCreate:()=>Te,adminProductsDestroy:()=>Ce,adminProductsList:()=>be,adminProductsPartialUpdate:()=>Ae,adminProductsRetrieve:()=>Se,adminProductsUpdate:()=>xe,adminTransactionsCancelCreate:()=>Pe,adminTransactionsList:()=>ke,adminTransactionsRefreshStatusCreate:()=>qe,adminTransactionsRetrieve:()=>Ee,adminUsersList:()=>ze,deactivateCreate:()=>De,mukuruCallbackCreate:()=>Ue,userCatalogsRetrieve:()=>ve,userQuoteCreate:()=>je,userTransactionsCancelCreate:()=>Le,userTransactionsList:()=>Ie,userTransactionsRetrieve:()=>Be,webhookCreate:()=>Me});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},_e=Object.entries(ae);function Q({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:i,sseDefaultRetryDelay:u,sseMaxRetryAttempts:o,sseMaxRetryDelay:n,sseSleepFn:a,url:w,...l}){let c,g=a??(d=>new Promise(y=>setTimeout(y,d)));return{stream:async function*(){let d=u??3e3,y=0,O=l.signal??new AbortController().signal;for(;!O.aborted;){y++;let q=l.headers instanceof Headers?l.headers:new Headers(l.headers);c!==void 0&&q.set("Last-Event-ID",c);try{let C={redirect:"follow",...l,body:l.serializedBody,headers:q,signal:O},S=new Request(w,C);e&&(S=await e(w,C));let m=await(l.fetch??globalThis.fetch)(S);if(!m.ok)throw new Error(`SSE failed: ${m.status} ${m.statusText}`);if(!m.body)throw new Error("No body in SSE response");let b=m.body.pipeThrough(new TextDecoderStream).getReader(),h="",K=()=>{try{b.cancel()}catch{}};O.addEventListener("abort",K);try{for(;;){let{done:re,value:te}=await b.read();if(re)break;h+=te,h=h.replace(/\r\n?/g,`
|
|
2
|
+
`);let _=h.split(`
|
|
3
3
|
|
|
4
|
-
`);h=
|
|
5
|
-
`),z=[],
|
|
6
|
-
`);try{k=JSON.parse(T),V=!0}catch{k=T}}V&&(i&&await i(k),s&&(k=await s(k))),t?.({data:k,event:H,id:p,retry:c}),z.length&&(yield k)}}}finally{O.removeEventListener("abort",K),b.releaseLock()}break}catch(S){if(r?.(S),o!==void 0&&y>=o)break;let C=Math.min(c*2**(y-1),n??3e4);await g(C)}}}()}}var ie=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"&"}},D=({allowReserved:e,explode:r,name:t,style:s,value:i})=>{if(!r){let n=(e?i:i.map(a=>encodeURIComponent(a))).join(ue(s));switch(s){case"label":return`.${n}`;case"matrix":return`;${t}=${n}`;case"simple":return n;default:return`${t}=${n}`}}let u=ie(s),o=i.map(n=>s==="label"||s==="simple"?e?n:encodeURIComponent(n):x({allowReserved:e,name:t,value:n})).join(u);return s==="label"||s==="matrix"?u+o:o},x=({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)}`},U=({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 a=[];Object.entries(i).forEach(([l,p])=>{a=[...a,l,e?p:encodeURIComponent(p)]});let w=a.join(",");switch(s){case"form":return`${t}=${w}`;case"label":return`.${w}`;case"matrix":return`;${t}=${w}`;default:return w}}let o=pe(s),n=Object.entries(i).map(([a,w])=>x({allowReserved:e,name:s==="deepObject"?`${t}[${a}]`:a,value:w})).join(o);return s==="label"||s==="matrix"?o+n:n};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let i of s){let u=!1,o=i.substring(1,i.length-1),n="simple";o.endsWith("*")&&(u=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),n="label"):o.startsWith(";")&&(o=o.substring(1),n="matrix");let a=e[o];if(a==null)continue;if(Array.isArray(a)){t=t.replace(i,D({explode:u,name:o,style:n,value:a}));continue}if(typeof a=="object"){t=t.replace(i,U({explode:u,name:o,style:n,value:a,valueOnly:!0}));continue}if(n==="matrix"){t=t.replace(i,`;${x({name:o,value:a})}`);continue}let w=encodeURIComponent(n==="label"?`.${a}`:a);t=t.replace(i,w)}return t},W=({baseUrl:e,path:r,query:t,querySerializer:s,url:i})=>{let u=i.startsWith("/")?i:`/${i}`,o=(e??"")+u;r&&(o=ce({path:r,url:o}));let n=t?s(t):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(o+=`?${n}`),o};function B(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 o=s[u];if(o==null)continue;let n=e[u]||r;if(Array.isArray(o)){let a=D({allowReserved:n.allowReserved,explode:!0,name:u,style:"form",value:o,...n.array});a&&i.push(a)}else if(typeof o=="object"){let a=U({allowReserved:n.allowReserved,explode:!0,name:u,style:"deepObject",value:o,...n.object});a&&i.push(a)}else{let a=x({allowReserved:n.allowReserved,name:u,value:o});a&&i.push(a)}}return i.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();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"}},de=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1;async function Z(e){for(let r of e.security??[]){if(de(e,r.name))continue;let t=await G(r,e.auth);if(!t)continue;let s=r.name??"Authorization";switch(r.in){case"query":e.query||(e.query={}),e.query[s]=t;break;case"cookie":e.headers.append("Cookie",`${s}=${t}`);break;case"header":default:e.headers.set(s,t);break}}}var L=e=>W({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),M=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,r.headers),t},fe=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?fe(t):Object.entries(t);for(let[i,u]of s)if(u===null)r.delete(i);else if(Array.isArray(u))for(let o of u)r.append(i,o);else u!==void 0&&r.set(i,typeof u=="object"?JSON.stringify(u):u)}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"},E=(e={})=>({...I,headers:me,parseAs:"auto",querySerializer:ye,...e});var P=(e={})=>{let r=M(E(),e),t=()=>({...r}),s=l=>(r=M(r,l),t()),i=ee(),u=async l=>{let p={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:j(r.headers,l.headers),serializedBody:void 0};p.security&&await Z(p),p.requestValidator&&await p.requestValidator(p),p.body!==void 0&&p.bodySerializer&&(p.serializedBody=p.bodySerializer(p.body)),(p.body===void 0||p.serializedBody==="")&&p.headers.delete("Content-Type");let g=p,R=L(g);return{opts:g,url:R}},o=async l=>{let p=l.throwOnError??r.throwOnError,g=l.responseStyle??r.responseStyle,R,f;try{let{opts:c,url:y}=await u(l),O={redirect:"follow",...c,body:B(c)};R=new Request(y,O);for(let m of i.request.fns)m&&(R=await m(R,c));let q=c.fetch;f=await q(R);for(let m of i.response.fns)m&&(f=await m(f,R,c));let S={request:R,response:f};if(f.ok){let m=(c.parseAs==="auto"?Y(f.headers.get("Content-Type")):c.parseAs)??"json";if(f.status===204||f.headers.get("Content-Length")==="0"){let h;switch(m){case"arrayBuffer":case"blob":case"text":h=await f[m]();break;case"formData":h=new FormData;break;case"stream":h=f.body;break;case"json":default:h={};break}return c.responseStyle==="data"?h:{data:h,...S}}let b;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":b=await f[m]();break;case"json":{let h=await f.text();b=h?JSON.parse(h):{};break}case"stream":return c.responseStyle==="data"?f.body:{data:f.body,...S}}return m==="json"&&(c.responseValidator&&await c.responseValidator(b),c.responseTransformer&&(b=await c.responseTransformer(b))),c.responseStyle==="data"?b:{data:b,...S}}let C=await f.text(),v;try{v=JSON.parse(C)}catch{}throw v??C}catch(c){let y=c;for(let O of i.error.fns)O&&(y=await O(y,f,R,l));if(y=y||{},p)throw y;return g==="data"?void 0:{error:y,request:R,response:f}}},n=l=>p=>o({...p,method:l}),a=l=>async p=>{let{opts:g,url:R}=await u(p);return Q({...g,body:g.body,method:l,onRequest:async(f,c)=>{let y=new Request(f,c);for(let O of i.request.fns)O&&(y=await O(y,g));return y},serializedBody:B(g),url:R})};return{buildUrl:l=>L({...r,...l}),connect:n("CONNECT"),delete:n("DELETE"),get:n("GET"),getConfig:t,head:n("HEAD"),interceptors:i,options:n("OPTIONS"),patch:n("PATCH"),post:n("POST"),put:n("PUT"),request:o,setConfig:s,sse:{connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),head:a("HEAD"),options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),trace:a("TRACE")},trace:n("TRACE")}};var d=P(E({baseUrl:"https://mukuru.services.rehive.com/api/"}));var he=e=>(e.client??d).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(e?.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Oe=e=>(e?.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/",...e}),be=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??d).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e}),Se=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e}),Ce=e=>(e.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/",...e}),Ae=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{rehive_transaction_id}/",...e}),Ee=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{rehive_transaction_id}/refresh-status/",...e}),Pe=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),qe=e=>(e.client??d).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??d).post({url:"/mukuru/callback/{company_identifier}/",...e}),De=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/catalogs/",...e}),Ue=e=>(e?.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/quote/",...e}),je=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/",...e}),ve=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/{rehive_transaction_id}/",...e}),Ie=e=>(e.client??d).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Be(e){let r=P(J(e,"https://mukuru.services.rehive.com/api/"));return F($,r)}export{Be as createMukuruApi};
|
|
4
|
+
`);h=_.pop()??"";for(let ne of _){let se=ne.split(`
|
|
5
|
+
`),z=[],N;for(let T of se)if(T.startsWith("data:"))z.push(T.replace(/^data:\s*/,""));else if(T.startsWith("event:"))N=T.replace(/^event:\s*/,"");else if(T.startsWith("id:"))c=T.replace(/^id:\s*/,"");else if(T.startsWith("retry:")){let V=Number.parseInt(T.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(d=V)}let A,H=!1;if(z.length){let T=z.join(`
|
|
6
|
+
`);try{A=JSON.parse(T),H=!0}catch{A=T}}H&&(i&&await i(A),s&&(A=await s(A))),t?.({data:A,event:N,id:c,retry:d}),z.length&&(yield A)}}}finally{O.removeEventListener("abort",K),b.releaseLock()}break}catch(C){if(r?.(C),o!==void 0&&y>=o)break;let S=Math.min(d*2**(y-1),n??3e4);await g(S)}}}()}}var ie=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","}},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 n=(e?i:i.map(a=>encodeURIComponent(a))).join(ue(s));switch(s){case"label":return`.${n}`;case"matrix":return`;${t}=${n}`;case"simple":return n;default:return`${t}=${n}`}}let u=ie(s),o=i.map(n=>s==="label"||s==="simple"?e?n:encodeURIComponent(n):x({allowReserved:e,name:t,value:n})).join(u);return s==="label"||s==="matrix"?u+o:o},x=({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)}`},U=({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 a=[];Object.entries(i).forEach(([l,c])=>{a=[...a,l,e?c:encodeURIComponent(c)]});let w=a.join(",");switch(s){case"form":return`${t}=${w}`;case"label":return`.${w}`;case"matrix":return`;${t}=${w}`;default:return w}}let o=ce(s),n=Object.entries(i).map(([a,w])=>x({allowReserved:e,name:s==="deepObject"?`${t}[${a}]`:a,value:w})).join(o);return s==="label"||s==="matrix"?o+n:n};var le=/\{[^{}]+\}/g,pe=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let i of s){let u=!1,o=i.substring(1,i.length-1),n="simple";o.endsWith("*")&&(u=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),n="label"):o.startsWith(";")&&(o=o.substring(1),n="matrix");let a=e[o];if(a==null)continue;if(Array.isArray(a)){t=t.replace(i,D({explode:u,name:o,style:n,value:a}));continue}if(typeof a=="object"){t=t.replace(i,U({explode:u,name:o,style:n,value:a,valueOnly:!0}));continue}if(n==="matrix"){t=t.replace(i,`;${x({name:o,value:a})}`);continue}let w=encodeURIComponent(n==="label"?`.${a}`:a);t=t.replace(i,w)}return t},W=({baseUrl:e,path:r,query:t,querySerializer:s,url:i})=>{let u=i.startsWith("/")?i:`/${i}`,o=(e??"")+u;r&&(o=pe({path:r,url:o}));let n=t?s(t):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(o+=`?${n}`),o};function B(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 o=s[u];if(o==null)continue;let n=e[u]||r;if(Array.isArray(o)){let a=D({allowReserved:n.allowReserved,explode:!0,name:u,style:"form",value:o,...n.array});a&&i.push(a)}else if(typeof o=="object"){let a=U({allowReserved:n.allowReserved,explode:!0,name:u,style:"deepObject",value:o,...n.object});a&&i.push(a)}else{let a=x({allowReserved:n.allowReserved,name:u,value:o});a&&i.push(a)}}return i.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();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"}},de=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1;async function Z(e){for(let r of e.security??[]){if(de(e,r.name))continue;let t=await G(r,e.auth);if(!t)continue;let s=r.name??"Authorization";switch(r.in){case"query":e.query||(e.query={}),e.query[s]=t;break;case"cookie":e.headers.append("Cookie",`${s}=${t}`);break;case"header":default:e.headers.set(s,t);break}}}var L=e=>W({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),M=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},v=(...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,u]of s)if(u===null)r.delete(i);else if(Array.isArray(u))for(let o of u)r.append(i,o);else u!==void 0&&r.set(i,typeof u=="object"?JSON.stringify(u):u)}return r},k=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 k,request:new k,response:new k}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},E=(e={})=>({...I,headers:me,parseAs:"auto",querySerializer:ye,...e});var P=(e={})=>{let r=M(E(),e),t=()=>({...r}),s=l=>(r=M(r,l),t()),i=ee(),u=async l=>{let c={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:v(r.headers,l.headers),serializedBody:void 0};c.security&&await Z(c),c.requestValidator&&await c.requestValidator(c),c.body!==void 0&&c.bodySerializer&&(c.serializedBody=c.bodySerializer(c.body)),(c.body===void 0||c.serializedBody==="")&&c.headers.delete("Content-Type");let g=c,R=L(g);return{opts:g,url:R}},o=async l=>{let c=l.throwOnError??r.throwOnError,g=l.responseStyle??r.responseStyle,R,f;try{let{opts:d,url:y}=await u(l),O={redirect:"follow",...d,body:B(d)};R=new Request(y,O);for(let m of i.request.fns)m&&(R=await m(R,d));let q=d.fetch;f=await q(R);for(let m of i.response.fns)m&&(f=await m(f,R,d));let C={request:R,response:f};if(f.ok){let m=(d.parseAs==="auto"?Y(f.headers.get("Content-Type")):d.parseAs)??"json";if(f.status===204||f.headers.get("Content-Length")==="0"){let h;switch(m){case"arrayBuffer":case"blob":case"text":h=await f[m]();break;case"formData":h=new FormData;break;case"stream":h=f.body;break;case"json":default:h={};break}return d.responseStyle==="data"?h:{data:h,...C}}let b;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":b=await f[m]();break;case"json":{let h=await f.text();b=h?JSON.parse(h):{};break}case"stream":return d.responseStyle==="data"?f.body:{data:f.body,...C}}return m==="json"&&(d.responseValidator&&await d.responseValidator(b),d.responseTransformer&&(b=await d.responseTransformer(b))),d.responseStyle==="data"?b:{data:b,...C}}let S=await f.text(),j;try{j=JSON.parse(S)}catch{}throw j??S}catch(d){let y=d;for(let O of i.error.fns)O&&(y=await O(y,f,R,l));if(y=y||{},c)throw y;return g==="data"?void 0:{error:y,request:R,response:f}}},n=l=>c=>o({...c,method:l}),a=l=>async c=>{let{opts:g,url:R}=await u(c);return Q({...g,body:g.body,method:l,onRequest:async(f,d)=>{let y=new Request(f,d);for(let O of i.request.fns)O&&(y=await O(y,g));return y},serializedBody:B(g),url:R})};return{buildUrl:l=>L({...r,...l}),connect:n("CONNECT"),delete:n("DELETE"),get:n("GET"),getConfig:t,head:n("HEAD"),interceptors:i,options:n("OPTIONS"),patch:n("PATCH"),post:n("POST"),put:n("PUT"),request:o,setConfig:s,sse:{connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),head:a("HEAD"),options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),trace:a("TRACE")},trace:n("TRACE")}};var p=P(E({baseUrl:"https://mukuru.services.rehive.com/"}));var he=e=>(e.client??p).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(e?.client??p).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Oe=e=>(e?.client??p).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/operational-accounts/",...e}),be=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/",...e}),Te=e=>(e.client??p).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??p).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e}),Se=e=>(e.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e}),Ae=e=>(e.client??p).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??p).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/{payment_method}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/",...e}),Ee=e=>(e.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{rehive_transaction_id}/",...e}),Pe=e=>(e.client??p).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{rehive_transaction_id}/cancel/",...e}),qe=e=>(e.client??p).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{rehive_transaction_id}/refresh-status/",...e}),ze=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),De=e=>(e.client??p).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??p).post({url:"/mukuru/callback/{company_identifier}/",...e}),ve=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/catalogs/",...e}),je=e=>(e?.client??p).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/quote/",...e}),Ie=e=>(e?.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/",...e}),Be=e=>(e.client??p).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/{rehive_transaction_id}/",...e}),Le=e=>(e.client??p).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/{rehive_transaction_id}/cancel/",...e}),Me=e=>(e.client??p).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function $e(e){let r=P(J(e,"https://mukuru.services.rehive.com/api/"));return F($,r)}export{$e as createMukuruApi};
|
|
@@ -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-BY6W7Qz9.mjs';
|
|
2
|
+
import '../create-auth-CROjq_cP.mjs';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -122,6 +122,11 @@ interface Config$1 {
|
|
|
122
122
|
*/
|
|
123
123
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
125
130
|
|
|
126
131
|
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
127
132
|
/**
|
|
@@ -1530,6 +1535,7 @@ type AdminLogsListData = {
|
|
|
1530
1535
|
sent?: boolean;
|
|
1531
1536
|
type?: string;
|
|
1532
1537
|
type__in?: string;
|
|
1538
|
+
user__identifier?: string;
|
|
1533
1539
|
};
|
|
1534
1540
|
url: '/admin/logs/';
|
|
1535
1541
|
};
|
|
@@ -1848,7 +1854,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
1848
1854
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
1849
1855
|
* used to access values that aren't defined as part of the SDK function.
|
|
1850
1856
|
*/
|
|
1851
|
-
meta?: Record<string, unknown
|
|
1857
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
1852
1858
|
};
|
|
1853
1859
|
/**
|
|
1854
1860
|
* Activate service
|
|
@@ -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-CBNjHT-x.js';
|
|
2
|
+
import '../create-auth-CROjq_cP.js';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -122,6 +122,11 @@ interface Config$1 {
|
|
|
122
122
|
*/
|
|
123
123
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
125
130
|
|
|
126
131
|
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
127
132
|
/**
|
|
@@ -1530,6 +1535,7 @@ type AdminLogsListData = {
|
|
|
1530
1535
|
sent?: boolean;
|
|
1531
1536
|
type?: string;
|
|
1532
1537
|
type__in?: string;
|
|
1538
|
+
user__identifier?: string;
|
|
1533
1539
|
};
|
|
1534
1540
|
url: '/admin/logs/';
|
|
1535
1541
|
};
|
|
@@ -1848,7 +1854,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
1848
1854
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
1849
1855
|
* used to access values that aren't defined as part of the SDK function.
|
|
1850
1856
|
*/
|
|
1851
|
-
meta?: Record<string, unknown
|
|
1857
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
1852
1858
|
};
|
|
1853
1859
|
/**
|
|
1854
1860
|
* Activate service
|
|
@@ -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-BY6W7Qz9.mjs';
|
|
2
|
+
import '../create-auth-CROjq_cP.mjs';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -122,6 +122,11 @@ interface Config$1 {
|
|
|
122
122
|
*/
|
|
123
123
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
125
130
|
|
|
126
131
|
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
127
132
|
/**
|
|
@@ -3365,7 +3370,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
3365
3370
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
3366
3371
|
* used to access values that aren't defined as part of the SDK function.
|
|
3367
3372
|
*/
|
|
3368
|
-
meta?: Record<string, unknown
|
|
3373
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
3369
3374
|
};
|
|
3370
3375
|
/**
|
|
3371
3376
|
* Activate service
|
|
@@ -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-CBNjHT-x.js';
|
|
2
|
+
import '../create-auth-CROjq_cP.js';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -122,6 +122,11 @@ interface Config$1 {
|
|
|
122
122
|
*/
|
|
123
123
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
125
130
|
|
|
126
131
|
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
127
132
|
/**
|
|
@@ -3365,7 +3370,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
3365
3370
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
3366
3371
|
* used to access values that aren't defined as part of the SDK function.
|
|
3367
3372
|
*/
|
|
3368
|
-
meta?: Record<string, unknown
|
|
3373
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
3369
3374
|
};
|
|
3370
3375
|
/**
|
|
3371
3376
|
* Activate service
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _={};_chunkOEIQFP6Tjs.a.call(void 0, _,{activateCreate:()=>
|
|
2
|
-
`);let Q=
|
|
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 _={};_chunkOEIQFP6Tjs.a.call(void 0, _,{activateCreate:()=>Re,adminCompanyConfigurationPartialUpdate:()=>Pe,adminCompanyConfigurationRetrieve:()=>Te,adminCompanyConfigurationUpdate:()=>Ee,adminCompanyPartialUpdate:()=>we,adminCompanyPaymentProcessorsCreate:()=>ke,adminCompanyPaymentProcessorsDestroy:()=>qe,adminCompanyPaymentProcessorsList:()=>be,adminCompanyPaymentProcessorsPartialUpdate:()=>Ae,adminCompanyPaymentProcessorsRetrieve:()=>Ce,adminCompanyPaymentProcessorsUpdate:()=>Ue,adminCompanyRetrieve:()=>fe,adminCompanyUpdate:()=>Oe,adminPaymentProcessorQuoteList:()=>xe,adminPaymentProcessorsCreate:()=>De,adminPaymentProcessorsDestroy:()=>Se,adminPaymentProcessorsList:()=>ge,adminPaymentProcessorsPartialUpdate:()=>ze,adminPaymentProcessorsRetrieve:()=>ve,adminPaymentProcessorsUpdate:()=>Le,adminRequestsCreate:()=>je,adminRequestsList:()=>We,adminRequestsLogsList:()=>Be,adminRequestsPartialUpdate:()=>Ie,adminRequestsPaymentProcessQuotesExecuteRetrieve:()=>Ne,adminRequestsPaymentProcessQuotesList:()=>Qe,adminRequestsPaymentProcessQuotesRetrieve:()=>$e,adminRequestsRefundsCreate:()=>Me,adminRequestsRefundsList:()=>He,adminRequestsRetrieve:()=>Ke,adminRequestsTransactionsList:()=>Ve,adminRequestsUpdate:()=>_e,adminUsersList:()=>Fe,adminUsersPartialUpdate:()=>Ge,adminUsersRetrieve:()=>Je,adminUsersUpdate:()=>Xe,adminWebhooksCreate:()=>Ze,adminWebhooksDestroy:()=>er,adminWebhooksList:()=>Ye,adminWebhooksPartialUpdate:()=>sr,adminWebhooksRetrieve:()=>rr,adminWebhooksUpdate:()=>tr,deactivateCreate:()=>nr,requestsOtpChallengeCreate:()=>ur,requestsPartialUpdate:()=>ar,requestsPaymentProcessorsList:()=>pr,requestsResendOtpCreate:()=>dr,requestsRetrieve:()=>or,requestsTransactionsList:()=>lr,requestsUpdate:()=>ir,userPaymentProcessorsCreate:()=>yr,userPaymentProcessorsDestroy:()=>mr,userPaymentProcessorsList:()=>cr,userPaymentProcessorsPartialUpdate:()=>Rr,userPaymentProcessorsRetrieve:()=>hr,userPaymentProcessorsUpdate:()=>fr,userRequestsCreate:()=>Or,userRequestsList:()=>wr,userRequestsNotifyCreate:()=>br,userRequestsPartialUpdate:()=>Pr,userRequestsRefundsCreate:()=>qr,userRequestsRefundsList:()=>kr,userRequestsRetrieve:()=>Tr,userRequestsTransactionsList:()=>Cr,userRequestsUpdate:()=>Er,userWebhooksCreate:()=>Ur,userWebhooksDestroy:()=>xr,userWebhooksList:()=>Ar,userWebhooksPartialUpdate:()=>Dr,userWebhooksRetrieve:()=>gr,userWebhooksUpdate:()=>Sr,webhookCreate:()=>vr,webhooksRehiveTransactionExecutedCreate:()=>zr,webhooksRehiveTransactionInitiatedCreate:()=>Lr,webhooksRehiveUserCreateCreate:()=>Wr,webhooksRehiveUserEmailUpdateCreate:()=>jr,webhooksRehiveUserUpdateCreate:()=>Kr});var W={bodySerializer:e=>JSON.stringify(e,(s,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Br=Object.entries(ae);function F({onRequest:e,onSseError:s,onSseEvent:t,responseTransformer:o,responseValidator:u,sseDefaultRetryDelay:p,sseMaxRetryAttempts:a,sseMaxRetryDelay:n,sseSleepFn:i,url:w,...l}){let d,T=_nullishCoalesce(i, () => ((c=>new Promise(m=>setTimeout(m,c)))));return{stream:async function*(){let c=_nullishCoalesce(p, () => (3e3)),m=0,O=_nullishCoalesce(l.signal, () => (new AbortController().signal));for(;!O.aborted;){m++;let g=l.headers instanceof Headers?l.headers:new Headers(l.headers);d!==void 0&&g.set("Last-Event-ID",d);try{let b={redirect:"follow",...l,body:l.serializedBody,headers:g,signal:O},k=new Request(w,b);e&&(k=await e(w,b));let h=await(_nullishCoalesce(l.fetch, () => (globalThis.fetch)))(k);if(!h.ok)throw new Error(`SSE failed: ${h.status} ${h.statusText}`);if(!h.body)throw new Error("No body in SSE response");let P=h.body.pipeThrough(new TextDecoderStream).getReader(),R="",B=()=>{try{P.cancel()}catch (e2){}};O.addEventListener("abort",B);try{for(;;){let{done:re,value:se}=await P.read();if(re)break;R+=se,R=R.replace(/\r\n?/g,`
|
|
2
|
+
`);let Q=R.split(`
|
|
3
3
|
|
|
4
|
-
`);
|
|
4
|
+
`);R=_nullishCoalesce(Q.pop(), () => (""));for(let te of Q){let ne=te.split(`
|
|
5
5
|
`),D=[],$;for(let E of ne)if(E.startsWith("data:"))D.push(E.replace(/^data:\s*/,""));else if(E.startsWith("event:"))$=E.replace(/^event:\s*/,"");else if(E.startsWith("id:"))d=E.replace(/^id:\s*/,"");else if(E.startsWith("retry:")){let H=Number.parseInt(E.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(c=H)}let q,N=!1;if(D.length){let E=D.join(`
|
|
6
|
-
`);try{q=JSON.parse(E),N=!0}catch (e3){q=E}}N&&(u&&await u(q),o&&(q=await o(q))),_optionalChain([t, 'optionalCall', _2 => _2({data:q,event:$,id:d,retry:c})]),D.length&&(yield q)}}}finally{O.removeEventListener("abort",B),P.releaseLock()}break}catch(b){if(_optionalChain([s, 'optionalCall', _3 => _3(b)]),a!==void 0&&m>=a)break;let k=Math.min(c*2**(m-1),_nullishCoalesce(n, () => (3e4)));await T(k)}}}()}}var ie=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:s,name:t,style:o,value:u})=>{if(!s){let n=(e?u:u.map(i=>encodeURIComponent(i))).join(ue(o));switch(o){case"label":return`.${n}`;case"matrix":return`;${t}=${n}`;case"simple":return n;default:return`${t}=${n}`}}let p=ie(o),a=u.map(n=>o==="label"||o==="simple"?e?n:encodeURIComponent(n):C({allowReserved:e,name:t,value:n})).join(p);return o==="label"||o==="matrix"?p+a:a},C=({allowReserved:e,name:s,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`${s}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:s,name:t,style:o,value:u,valueOnly:p})=>{if(u instanceof Date)return p?u.toISOString():`${t}=${u.toISOString()}`;if(o!=="deepObject"&&!s){let i=[];Object.entries(u).forEach(([l,d])=>{i=[...i,l,e?d:encodeURIComponent(d)]});let f=i.join(",");switch(o){case"form":return`${t}=${f}`;case"label":return`.${f}`;case"matrix":return`;${t}=${f}`;default:return f}}let a=pe(o),n=Object.entries(u).map(([i,f])=>C({allowReserved:e,name:o==="deepObject"?`${t}[${i}]`:i,value:f})).join(a);return o==="label"||o==="matrix"?a+n:n};var de=/\{[^{}]+\}/g,le=({path:e,url:s})=>{let t=s,o=s.match(de);if(o)for(let u of o){let p=!1,a=u.substring(1,u.length-1),n="simple";a.endsWith("*")&&(p=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),n="label"):a.startsWith(";")&&(a=a.substring(1),n="matrix");let i=e[a];if(i==null)continue;if(Array.isArray(i)){t=t.replace(u,S({explode:p,name:a,style:n,value:i}));continue}if(typeof i=="object"){t=t.replace(u,v({explode:p,name:a,style:n,value:i,valueOnly:!0}));continue}if(n==="matrix"){t=t.replace(u,`;${C({name:a,value:i})}`);continue}let f=encodeURIComponent(n==="label"?`.${i}`:i);t=t.replace(u,f)}return t},J=({baseUrl:e,path:s,query:t,querySerializer:o,url:u})=>{let p=u.startsWith("/")?u:`/${u}`,a=(_nullishCoalesce(e, () => ("")))+p;s&&(a=le({path:s,url:a}));let n=t?o(t):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(a+=`?${n}`),a};function j(e){let s=e.body!==void 0;if(s&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(s)return e.body}var G=async(e,s)=>{let t=typeof s=="function"?await s(e):s;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...s}={})=>o=>{let u=[];if(o&&typeof o=="object")for(let p in o){let a=o[p];if(a==null)continue;let n=e[p]||s;if(Array.isArray(a)){let i=S({allowReserved:n.allowReserved,explode:!0,name:p,style:"form",value:a,...n.array});i&&u.push(i)}else if(typeof a=="object"){let i=v({allowReserved:n.allowReserved,explode:!0,name:p,style:"deepObject",value:a,...n.object});i&&u.push(i)}else{let i=C({allowReserved:n.allowReserved,name:p,value:a});i&&u.push(i)}}return u.join("&")},Y=e=>{if(!e)return"stream";let s=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(s){if(s.startsWith("application/json")||s.endsWith("+json"))return"json";if(s==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>s.startsWith(t)))return"blob";if(s.startsWith("text/"))return"text"}},ce=(e,s)=>s?!!(e.headers.has(s)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[s]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${s}=`)])):!1;async function Z(e){for(let s of _nullishCoalesce(e.security, () => ([]))){if(ce(e,s.name))continue;let t=await G(s,e.auth);if(!t)continue;let o=_nullishCoalesce(s.name, () => ("Authorization"));switch(s.in){case"query":e.query||(e.query={}),e.query[o]=t;break;case"cookie":e.headers.append("Cookie",`${o}=${t}`);break;case"header":default:e.headers.set(o,t);break}}}var K=e=>J({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),I=(e,s)=>{let t={...e,...s};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=z(e.headers,s.headers),t},ye=e=>{let s=[];return e.forEach((t,o)=>{s.push([o,t])}),s},z=(...e)=>{let s=new Headers;for(let t of e){if(!t)continue;let o=t instanceof Headers?ye(t):Object.entries(t);for(let[u,p]of o)if(p===null)s.delete(u);else if(Array.isArray(p))for(let a of p)s.append(u,a);else p!==void 0&&s.set(u,typeof p=="object"?JSON.stringify(p):p)}return s},A=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(s){let t=this.getInterceptorIndex(s);this.fns[t]&&(this.fns[t]=null)}exists(s){let t=this.getInterceptorIndex(s);return!!this.fns[t]}getInterceptorIndex(s){return typeof s=="number"?this.fns[s]?s:-1:this.fns.indexOf(s)}update(s,t){let o=this.getInterceptorIndex(s);return this.fns[o]?(this.fns[o]=t,s):!1}use(s){return this.fns.push(s),this.fns.length-1}},ee=()=>({error:new A,request:new A,response:new A}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Re={"Content-Type":"application/json"},U=(e={})=>({...W,headers:Re,parseAs:"auto",querySerializer:me,...e});var x=(e={})=>{let s=I(U(),e),t=()=>({...s}),o=l=>(s=I(s,l),t()),u=ee(),p=async l=>{let d={...s,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (s.fetch)), () => (globalThis.fetch)),headers:z(s.headers,l.headers),serializedBody:void 0};d.security&&await Z(d),d.requestValidator&&await d.requestValidator(d),d.body!==void 0&&d.bodySerializer&&(d.serializedBody=d.bodySerializer(d.body)),(d.body===void 0||d.serializedBody==="")&&d.headers.delete("Content-Type");let T=d,w=K(T);return{opts:T,url:w}},a=async l=>{let d=_nullishCoalesce(l.throwOnError, () => (s.throwOnError)),T=_nullishCoalesce(l.responseStyle, () => (s.responseStyle)),w,y;try{let{opts:c,url:m}=await p(l),O={redirect:"follow",...c,body:j(c)};w=new Request(m,O);for(let R of u.request.fns)R&&(w=await R(w,c));let g=c.fetch;y=await g(w);for(let R of u.response.fns)R&&(y=await R(y,w,c));let b={request:w,response:y};if(y.ok){let R=_nullishCoalesce((c.parseAs==="auto"?Y(y.headers.get("Content-Type")):c.parseAs), () => ("json"));if(y.status===204||y.headers.get("Content-Length")==="0"){let h;switch(R){case"arrayBuffer":case"blob":case"text":h=await y[R]();break;case"formData":h=new FormData;break;case"stream":h=y.body;break;case"json":default:h={};break}return c.responseStyle==="data"?h:{data:h,...b}}let P;switch(R){case"arrayBuffer":case"blob":case"formData":case"text":P=await y[R]();break;case"json":{let h=await y.text();P=h?JSON.parse(h):{};break}case"stream":return c.responseStyle==="data"?y.body:{data:y.body,...b}}return R==="json"&&(c.responseValidator&&await c.responseValidator(P),c.responseTransformer&&(P=await c.responseTransformer(P))),c.responseStyle==="data"?P:{data:P,...b}}let k=await y.text(),L;try{L=JSON.parse(k)}catch (e4){}throw _nullishCoalesce(L, () => (k))}catch(c){let m=c;for(let O of u.error.fns)O&&(m=await O(m,y,w,l));if(m=m||{},d)throw m;return T==="data"?void 0:{error:m,request:w,response:y}}},n=l=>d=>a({...d,method:l}),i=l=>async d=>{let{opts:T,url:w}=await p(d);return F({...T,body:T.body,method:l,onRequest:async(y,c)=>{let m=new Request(y,c);for(let O of u.request.fns)O&&(m=await O(m,T));return m},serializedBody:j(T),url:w})};return{buildUrl:l=>K({...s,...l}),connect:n("CONNECT"),delete:n("DELETE"),get:n("GET"),getConfig:t,head:n("HEAD"),interceptors:u,options:n("OPTIONS"),patch:n("PATCH"),post:n("POST"),put:n("PUT"),request:a,setConfig:o,sse:{connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),head:i("HEAD"),options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),trace:i("TRACE")},trace:n("TRACE")}};var r=x(U({baseUrl:"https://payment-requests.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),Oe=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e}),Pe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processor_quote/",...e}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e}),De=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e}),je=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/logs/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/execute/",...e}),He=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/transactions/",...e}),Fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),Je=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),sr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),nr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/requests/{identifier}/",...e}),ar=e=>(_nullishCoalesce(e.client, () => (r))).patch({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ir=e=>(_nullishCoalesce(e.client, () => (r))).put({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/requests/{identifier}/otp_challenge/",...e,headers:{"Content-Type":"application/json",...e.headers}}),pr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/requests/{identifier}/payment_processors/",...e}),dr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/requests/{identifier}/resend_otp/",...e}),lr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/requests/{identifier}/transactions/",...e}),cr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e}),yr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _35 => _35.headers])}}),mr=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),Rr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),hr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wr=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e}),Or=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e}),Pr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Er=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),br=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/notify/",...e}),kr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e}),qr=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/transactions/",...e}),Ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e}),Ur=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xr=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),gr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),Dr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sr=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_transaction/executed/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_transaction/initiated/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_user/create/",...e,headers:{"Content-Type":"application/json",...e.headers}}),jr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_user/email_update/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_user/update/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ir(e){let s=x(_chunkGR5TETAUjs.c.call(void 0, e,"https://payment-requests.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, _,s)}exports.createPaymentRequestsApi = Ir;
|
|
6
|
+
`);try{q=JSON.parse(E),N=!0}catch (e3){q=E}}N&&(u&&await u(q),o&&(q=await o(q))),_optionalChain([t, 'optionalCall', _2 => _2({data:q,event:$,id:d,retry:c})]),D.length&&(yield q)}}}finally{O.removeEventListener("abort",B),P.releaseLock()}break}catch(b){if(_optionalChain([s, 'optionalCall', _3 => _3(b)]),a!==void 0&&m>=a)break;let k=Math.min(c*2**(m-1),_nullishCoalesce(n, () => (3e4)));await T(k)}}}()}}var ie=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:s,name:t,style:o,value:u})=>{if(!s){let n=(e?u:u.map(i=>encodeURIComponent(i))).join(ue(o));switch(o){case"label":return`.${n}`;case"matrix":return`;${t}=${n}`;case"simple":return n;default:return`${t}=${n}`}}let p=ie(o),a=u.map(n=>o==="label"||o==="simple"?e?n:encodeURIComponent(n):C({allowReserved:e,name:t,value:n})).join(p);return o==="label"||o==="matrix"?p+a:a},C=({allowReserved:e,name:s,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`${s}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:s,name:t,style:o,value:u,valueOnly:p})=>{if(u instanceof Date)return p?u.toISOString():`${t}=${u.toISOString()}`;if(o!=="deepObject"&&!s){let i=[];Object.entries(u).forEach(([l,d])=>{i=[...i,l,e?d:encodeURIComponent(d)]});let w=i.join(",");switch(o){case"form":return`${t}=${w}`;case"label":return`.${w}`;case"matrix":return`;${t}=${w}`;default:return w}}let a=pe(o),n=Object.entries(u).map(([i,w])=>C({allowReserved:e,name:o==="deepObject"?`${t}[${i}]`:i,value:w})).join(a);return o==="label"||o==="matrix"?a+n:n};var de=/\{[^{}]+\}/g,le=({path:e,url:s})=>{let t=s,o=s.match(de);if(o)for(let u of o){let p=!1,a=u.substring(1,u.length-1),n="simple";a.endsWith("*")&&(p=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),n="label"):a.startsWith(";")&&(a=a.substring(1),n="matrix");let i=e[a];if(i==null)continue;if(Array.isArray(i)){t=t.replace(u,S({explode:p,name:a,style:n,value:i}));continue}if(typeof i=="object"){t=t.replace(u,v({explode:p,name:a,style:n,value:i,valueOnly:!0}));continue}if(n==="matrix"){t=t.replace(u,`;${C({name:a,value:i})}`);continue}let w=encodeURIComponent(n==="label"?`.${i}`:i);t=t.replace(u,w)}return t},J=({baseUrl:e,path:s,query:t,querySerializer:o,url:u})=>{let p=u.startsWith("/")?u:`/${u}`,a=(_nullishCoalesce(e, () => ("")))+p;s&&(a=le({path:s,url:a}));let n=t?o(t):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(a+=`?${n}`),a};function j(e){let s=e.body!==void 0;if(s&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(s)return e.body}var G=async(e,s)=>{let t=typeof s=="function"?await s(e):s;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...s}={})=>o=>{let u=[];if(o&&typeof o=="object")for(let p in o){let a=o[p];if(a==null)continue;let n=e[p]||s;if(Array.isArray(a)){let i=S({allowReserved:n.allowReserved,explode:!0,name:p,style:"form",value:a,...n.array});i&&u.push(i)}else if(typeof a=="object"){let i=v({allowReserved:n.allowReserved,explode:!0,name:p,style:"deepObject",value:a,...n.object});i&&u.push(i)}else{let i=C({allowReserved:n.allowReserved,name:p,value:a});i&&u.push(i)}}return u.join("&")},Y=e=>{if(!e)return"stream";let s=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(s){if(s.startsWith("application/json")||s.endsWith("+json"))return"json";if(s==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>s.startsWith(t)))return"blob";if(s.startsWith("text/"))return"text"}},ce=(e,s)=>s?!!(e.headers.has(s)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[s]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${s}=`)])):!1;async function Z(e){for(let s of _nullishCoalesce(e.security, () => ([]))){if(ce(e,s.name))continue;let t=await G(s,e.auth);if(!t)continue;let o=_nullishCoalesce(s.name, () => ("Authorization"));switch(s.in){case"query":e.query||(e.query={}),e.query[o]=t;break;case"cookie":e.headers.append("Cookie",`${o}=${t}`);break;case"header":default:e.headers.set(o,t);break}}}var K=e=>J({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),I=(e,s)=>{let t={...e,...s};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=z(e.headers,s.headers),t},ye=e=>{let s=[];return e.forEach((t,o)=>{s.push([o,t])}),s},z=(...e)=>{let s=new Headers;for(let t of e){if(!t)continue;let o=t instanceof Headers?ye(t):Object.entries(t);for(let[u,p]of o)if(p===null)s.delete(u);else if(Array.isArray(p))for(let a of p)s.append(u,a);else p!==void 0&&s.set(u,typeof p=="object"?JSON.stringify(p):p)}return s},A=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(s){let t=this.getInterceptorIndex(s);this.fns[t]&&(this.fns[t]=null)}exists(s){let t=this.getInterceptorIndex(s);return!!this.fns[t]}getInterceptorIndex(s){return typeof s=="number"?this.fns[s]?s:-1:this.fns.indexOf(s)}update(s,t){let o=this.getInterceptorIndex(s);return this.fns[o]?(this.fns[o]=t,s):!1}use(s){return this.fns.push(s),this.fns.length-1}},ee=()=>({error:new A,request:new A,response:new A}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},U=(e={})=>({...W,headers:he,parseAs:"auto",querySerializer:me,...e});var x=(e={})=>{let s=I(U(),e),t=()=>({...s}),o=l=>(s=I(s,l),t()),u=ee(),p=async l=>{let d={...s,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (s.fetch)), () => (globalThis.fetch)),headers:z(s.headers,l.headers),serializedBody:void 0};d.security&&await Z(d),d.requestValidator&&await d.requestValidator(d),d.body!==void 0&&d.bodySerializer&&(d.serializedBody=d.bodySerializer(d.body)),(d.body===void 0||d.serializedBody==="")&&d.headers.delete("Content-Type");let T=d,f=K(T);return{opts:T,url:f}},a=async l=>{let d=_nullishCoalesce(l.throwOnError, () => (s.throwOnError)),T=_nullishCoalesce(l.responseStyle, () => (s.responseStyle)),f,y;try{let{opts:c,url:m}=await p(l),O={redirect:"follow",...c,body:j(c)};f=new Request(m,O);for(let h of u.request.fns)h&&(f=await h(f,c));let g=c.fetch;y=await g(f);for(let h of u.response.fns)h&&(y=await h(y,f,c));let b={request:f,response:y};if(y.ok){let h=_nullishCoalesce((c.parseAs==="auto"?Y(y.headers.get("Content-Type")):c.parseAs), () => ("json"));if(y.status===204||y.headers.get("Content-Length")==="0"){let R;switch(h){case"arrayBuffer":case"blob":case"text":R=await y[h]();break;case"formData":R=new FormData;break;case"stream":R=y.body;break;case"json":default:R={};break}return c.responseStyle==="data"?R:{data:R,...b}}let P;switch(h){case"arrayBuffer":case"blob":case"formData":case"text":P=await y[h]();break;case"json":{let R=await y.text();P=R?JSON.parse(R):{};break}case"stream":return c.responseStyle==="data"?y.body:{data:y.body,...b}}return h==="json"&&(c.responseValidator&&await c.responseValidator(P),c.responseTransformer&&(P=await c.responseTransformer(P))),c.responseStyle==="data"?P:{data:P,...b}}let k=await y.text(),L;try{L=JSON.parse(k)}catch (e4){}throw _nullishCoalesce(L, () => (k))}catch(c){let m=c;for(let O of u.error.fns)O&&(m=await O(m,y,f,l));if(m=m||{},d)throw m;return T==="data"?void 0:{error:m,request:f,response:y}}},n=l=>d=>a({...d,method:l}),i=l=>async d=>{let{opts:T,url:f}=await p(d);return F({...T,body:T.body,method:l,onRequest:async(y,c)=>{let m=new Request(y,c);for(let O of u.request.fns)O&&(m=await O(m,T));return m},serializedBody:j(T),url:f})};return{buildUrl:l=>K({...s,...l}),connect:n("CONNECT"),delete:n("DELETE"),get:n("GET"),getConfig:t,head:n("HEAD"),interceptors:u,options:n("OPTIONS"),patch:n("PATCH"),post:n("POST"),put:n("PUT"),request:a,setConfig:o,sse:{connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),head:i("HEAD"),options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),trace:i("TRACE")},trace:n("TRACE")}};var r=x(U({baseUrl:"https://payment-requests.services.rehive.com/api/"}));var Re=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),Oe=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e}),Pe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processor_quote/",...e}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e}),De=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e}),je=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/logs/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/execute/",...e}),He=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/transactions/",...e}),Fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),Je=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),sr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),nr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/requests/{identifier}/",...e}),ar=e=>(_nullishCoalesce(e.client, () => (r))).patch({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ir=e=>(_nullishCoalesce(e.client, () => (r))).put({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/requests/{identifier}/otp_challenge/",...e,headers:{"Content-Type":"application/json",...e.headers}}),pr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/requests/{identifier}/payment_processors/",...e}),dr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/requests/{identifier}/resend_otp/",...e}),lr=e=>(_nullishCoalesce(e.client, () => (r))).get({url:"/requests/{identifier}/transactions/",...e}),cr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e}),yr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _35 => _35.headers])}}),mr=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),hr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),Rr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fr=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e}),Or=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e}),Pr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Er=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),br=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/notify/",...e}),kr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e}),qr=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/transactions/",...e}),Ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e}),Ur=e=>(_nullishCoalesce(e.client, () => (r))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xr=e=>(_nullishCoalesce(e.client, () => (r))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),gr=e=>(_nullishCoalesce(e.client, () => (r))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),Dr=e=>(_nullishCoalesce(e.client, () => (r))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sr=e=>(_nullishCoalesce(e.client, () => (r))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_transaction/executed/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_transaction/initiated/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_user/create/",...e,headers:{"Content-Type":"application/json",...e.headers}}),jr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_user/email_update/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kr=e=>(_nullishCoalesce(e.client, () => (r))).post({url:"/webhooks/rehive_user/update/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ir(e){let s=x(_chunkGR5TETAUjs.c.call(void 0, e,"https://payment-requests.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, _,s)}exports.createPaymentRequestsApi = Ir;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as M,c as V}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var _={};oe(_,{activateCreate:()=>
|
|
2
|
-
`);let Q=
|
|
1
|
+
import{a as M,c as V}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var _={};oe(_,{activateCreate:()=>Re,adminCompanyConfigurationPartialUpdate:()=>Pe,adminCompanyConfigurationRetrieve:()=>Te,adminCompanyConfigurationUpdate:()=>Ee,adminCompanyPartialUpdate:()=>we,adminCompanyPaymentProcessorsCreate:()=>ke,adminCompanyPaymentProcessorsDestroy:()=>qe,adminCompanyPaymentProcessorsList:()=>be,adminCompanyPaymentProcessorsPartialUpdate:()=>Ae,adminCompanyPaymentProcessorsRetrieve:()=>Ce,adminCompanyPaymentProcessorsUpdate:()=>Ue,adminCompanyRetrieve:()=>fe,adminCompanyUpdate:()=>Oe,adminPaymentProcessorQuoteList:()=>xe,adminPaymentProcessorsCreate:()=>De,adminPaymentProcessorsDestroy:()=>Se,adminPaymentProcessorsList:()=>ge,adminPaymentProcessorsPartialUpdate:()=>ze,adminPaymentProcessorsRetrieve:()=>ve,adminPaymentProcessorsUpdate:()=>Le,adminRequestsCreate:()=>je,adminRequestsList:()=>We,adminRequestsLogsList:()=>Be,adminRequestsPartialUpdate:()=>Ie,adminRequestsPaymentProcessQuotesExecuteRetrieve:()=>Ne,adminRequestsPaymentProcessQuotesList:()=>Qe,adminRequestsPaymentProcessQuotesRetrieve:()=>$e,adminRequestsRefundsCreate:()=>Me,adminRequestsRefundsList:()=>He,adminRequestsRetrieve:()=>Ke,adminRequestsTransactionsList:()=>Ve,adminRequestsUpdate:()=>_e,adminUsersList:()=>Fe,adminUsersPartialUpdate:()=>Ge,adminUsersRetrieve:()=>Je,adminUsersUpdate:()=>Xe,adminWebhooksCreate:()=>Ze,adminWebhooksDestroy:()=>er,adminWebhooksList:()=>Ye,adminWebhooksPartialUpdate:()=>sr,adminWebhooksRetrieve:()=>rr,adminWebhooksUpdate:()=>tr,deactivateCreate:()=>nr,requestsOtpChallengeCreate:()=>ur,requestsPartialUpdate:()=>ar,requestsPaymentProcessorsList:()=>pr,requestsResendOtpCreate:()=>dr,requestsRetrieve:()=>or,requestsTransactionsList:()=>lr,requestsUpdate:()=>ir,userPaymentProcessorsCreate:()=>yr,userPaymentProcessorsDestroy:()=>mr,userPaymentProcessorsList:()=>cr,userPaymentProcessorsPartialUpdate:()=>Rr,userPaymentProcessorsRetrieve:()=>hr,userPaymentProcessorsUpdate:()=>fr,userRequestsCreate:()=>Or,userRequestsList:()=>wr,userRequestsNotifyCreate:()=>br,userRequestsPartialUpdate:()=>Pr,userRequestsRefundsCreate:()=>qr,userRequestsRefundsList:()=>kr,userRequestsRetrieve:()=>Tr,userRequestsTransactionsList:()=>Cr,userRequestsUpdate:()=>Er,userWebhooksCreate:()=>Ur,userWebhooksDestroy:()=>xr,userWebhooksList:()=>Ar,userWebhooksPartialUpdate:()=>Dr,userWebhooksRetrieve:()=>gr,userWebhooksUpdate:()=>Sr,webhookCreate:()=>vr,webhooksRehiveTransactionExecutedCreate:()=>zr,webhooksRehiveTransactionInitiatedCreate:()=>Lr,webhooksRehiveUserCreateCreate:()=>Wr,webhooksRehiveUserEmailUpdateCreate:()=>jr,webhooksRehiveUserUpdateCreate:()=>Kr});var W={bodySerializer:e=>JSON.stringify(e,(s,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Br=Object.entries(ae);function F({onRequest:e,onSseError:s,onSseEvent:t,responseTransformer:o,responseValidator:u,sseDefaultRetryDelay:p,sseMaxRetryAttempts:a,sseMaxRetryDelay:n,sseSleepFn:i,url:w,...l}){let d,T=i??(c=>new Promise(m=>setTimeout(m,c)));return{stream:async function*(){let c=p??3e3,m=0,O=l.signal??new AbortController().signal;for(;!O.aborted;){m++;let g=l.headers instanceof Headers?l.headers:new Headers(l.headers);d!==void 0&&g.set("Last-Event-ID",d);try{let b={redirect:"follow",...l,body:l.serializedBody,headers:g,signal:O},k=new Request(w,b);e&&(k=await e(w,b));let h=await(l.fetch??globalThis.fetch)(k);if(!h.ok)throw new Error(`SSE failed: ${h.status} ${h.statusText}`);if(!h.body)throw new Error("No body in SSE response");let P=h.body.pipeThrough(new TextDecoderStream).getReader(),R="",B=()=>{try{P.cancel()}catch{}};O.addEventListener("abort",B);try{for(;;){let{done:re,value:se}=await P.read();if(re)break;R+=se,R=R.replace(/\r\n?/g,`
|
|
2
|
+
`);let Q=R.split(`
|
|
3
3
|
|
|
4
|
-
`);
|
|
4
|
+
`);R=Q.pop()??"";for(let te of Q){let ne=te.split(`
|
|
5
5
|
`),D=[],$;for(let E of ne)if(E.startsWith("data:"))D.push(E.replace(/^data:\s*/,""));else if(E.startsWith("event:"))$=E.replace(/^event:\s*/,"");else if(E.startsWith("id:"))d=E.replace(/^id:\s*/,"");else if(E.startsWith("retry:")){let H=Number.parseInt(E.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(c=H)}let q,N=!1;if(D.length){let E=D.join(`
|
|
6
|
-
`);try{q=JSON.parse(E),N=!0}catch{q=E}}N&&(u&&await u(q),o&&(q=await o(q))),t?.({data:q,event:$,id:d,retry:c}),D.length&&(yield q)}}}finally{O.removeEventListener("abort",B),P.releaseLock()}break}catch(b){if(s?.(b),a!==void 0&&m>=a)break;let k=Math.min(c*2**(m-1),n??3e4);await T(k)}}}()}}var ie=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:s,name:t,style:o,value:u})=>{if(!s){let n=(e?u:u.map(i=>encodeURIComponent(i))).join(ue(o));switch(o){case"label":return`.${n}`;case"matrix":return`;${t}=${n}`;case"simple":return n;default:return`${t}=${n}`}}let p=ie(o),a=u.map(n=>o==="label"||o==="simple"?e?n:encodeURIComponent(n):C({allowReserved:e,name:t,value:n})).join(p);return o==="label"||o==="matrix"?p+a:a},C=({allowReserved:e,name:s,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`${s}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:s,name:t,style:o,value:u,valueOnly:p})=>{if(u instanceof Date)return p?u.toISOString():`${t}=${u.toISOString()}`;if(o!=="deepObject"&&!s){let i=[];Object.entries(u).forEach(([l,d])=>{i=[...i,l,e?d:encodeURIComponent(d)]});let f=i.join(",");switch(o){case"form":return`${t}=${f}`;case"label":return`.${f}`;case"matrix":return`;${t}=${f}`;default:return f}}let a=pe(o),n=Object.entries(u).map(([i,f])=>C({allowReserved:e,name:o==="deepObject"?`${t}[${i}]`:i,value:f})).join(a);return o==="label"||o==="matrix"?a+n:n};var de=/\{[^{}]+\}/g,le=({path:e,url:s})=>{let t=s,o=s.match(de);if(o)for(let u of o){let p=!1,a=u.substring(1,u.length-1),n="simple";a.endsWith("*")&&(p=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),n="label"):a.startsWith(";")&&(a=a.substring(1),n="matrix");let i=e[a];if(i==null)continue;if(Array.isArray(i)){t=t.replace(u,S({explode:p,name:a,style:n,value:i}));continue}if(typeof i=="object"){t=t.replace(u,v({explode:p,name:a,style:n,value:i,valueOnly:!0}));continue}if(n==="matrix"){t=t.replace(u,`;${C({name:a,value:i})}`);continue}let f=encodeURIComponent(n==="label"?`.${i}`:i);t=t.replace(u,f)}return t},J=({baseUrl:e,path:s,query:t,querySerializer:o,url:u})=>{let p=u.startsWith("/")?u:`/${u}`,a=(e??"")+p;s&&(a=le({path:s,url:a}));let n=t?o(t):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(a+=`?${n}`),a};function j(e){let s=e.body!==void 0;if(s&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(s)return e.body}var G=async(e,s)=>{let t=typeof s=="function"?await s(e):s;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...s}={})=>o=>{let u=[];if(o&&typeof o=="object")for(let p in o){let a=o[p];if(a==null)continue;let n=e[p]||s;if(Array.isArray(a)){let i=S({allowReserved:n.allowReserved,explode:!0,name:p,style:"form",value:a,...n.array});i&&u.push(i)}else if(typeof a=="object"){let i=v({allowReserved:n.allowReserved,explode:!0,name:p,style:"deepObject",value:a,...n.object});i&&u.push(i)}else{let i=C({allowReserved:n.allowReserved,name:p,value:a});i&&u.push(i)}}return u.join("&")},Y=e=>{if(!e)return"stream";let s=e.split(";")[0]?.trim();if(s){if(s.startsWith("application/json")||s.endsWith("+json"))return"json";if(s==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>s.startsWith(t)))return"blob";if(s.startsWith("text/"))return"text"}},ce=(e,s)=>s?!!(e.headers.has(s)||e.query?.[s]||e.headers.get("Cookie")?.includes(`${s}=`)):!1;async function Z(e){for(let s of e.security??[]){if(ce(e,s.name))continue;let t=await G(s,e.auth);if(!t)continue;let o=s.name??"Authorization";switch(s.in){case"query":e.query||(e.query={}),e.query[o]=t;break;case"cookie":e.headers.append("Cookie",`${o}=${t}`);break;case"header":default:e.headers.set(o,t);break}}}var K=e=>J({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),I=(e,s)=>{let t={...e,...s};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=z(e.headers,s.headers),t},ye=e=>{let s=[];return e.forEach((t,o)=>{s.push([o,t])}),s},z=(...e)=>{let s=new Headers;for(let t of e){if(!t)continue;let o=t instanceof Headers?ye(t):Object.entries(t);for(let[u,p]of o)if(p===null)s.delete(u);else if(Array.isArray(p))for(let a of p)s.append(u,a);else p!==void 0&&s.set(u,typeof p=="object"?JSON.stringify(p):p)}return s},A=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(s){let t=this.getInterceptorIndex(s);this.fns[t]&&(this.fns[t]=null)}exists(s){let t=this.getInterceptorIndex(s);return!!this.fns[t]}getInterceptorIndex(s){return typeof s=="number"?this.fns[s]?s:-1:this.fns.indexOf(s)}update(s,t){let o=this.getInterceptorIndex(s);return this.fns[o]?(this.fns[o]=t,s):!1}use(s){return this.fns.push(s),this.fns.length-1}},ee=()=>({error:new A,request:new A,response:new A}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Re={"Content-Type":"application/json"},U=(e={})=>({...W,headers:Re,parseAs:"auto",querySerializer:me,...e});var x=(e={})=>{let s=I(U(),e),t=()=>({...s}),o=l=>(s=I(s,l),t()),u=ee(),p=async l=>{let d={...s,...l,fetch:l.fetch??s.fetch??globalThis.fetch,headers:z(s.headers,l.headers),serializedBody:void 0};d.security&&await Z(d),d.requestValidator&&await d.requestValidator(d),d.body!==void 0&&d.bodySerializer&&(d.serializedBody=d.bodySerializer(d.body)),(d.body===void 0||d.serializedBody==="")&&d.headers.delete("Content-Type");let T=d,w=K(T);return{opts:T,url:w}},a=async l=>{let d=l.throwOnError??s.throwOnError,T=l.responseStyle??s.responseStyle,w,y;try{let{opts:c,url:m}=await p(l),O={redirect:"follow",...c,body:j(c)};w=new Request(m,O);for(let R of u.request.fns)R&&(w=await R(w,c));let g=c.fetch;y=await g(w);for(let R of u.response.fns)R&&(y=await R(y,w,c));let b={request:w,response:y};if(y.ok){let R=(c.parseAs==="auto"?Y(y.headers.get("Content-Type")):c.parseAs)??"json";if(y.status===204||y.headers.get("Content-Length")==="0"){let h;switch(R){case"arrayBuffer":case"blob":case"text":h=await y[R]();break;case"formData":h=new FormData;break;case"stream":h=y.body;break;case"json":default:h={};break}return c.responseStyle==="data"?h:{data:h,...b}}let P;switch(R){case"arrayBuffer":case"blob":case"formData":case"text":P=await y[R]();break;case"json":{let h=await y.text();P=h?JSON.parse(h):{};break}case"stream":return c.responseStyle==="data"?y.body:{data:y.body,...b}}return R==="json"&&(c.responseValidator&&await c.responseValidator(P),c.responseTransformer&&(P=await c.responseTransformer(P))),c.responseStyle==="data"?P:{data:P,...b}}let k=await y.text(),L;try{L=JSON.parse(k)}catch{}throw L??k}catch(c){let m=c;for(let O of u.error.fns)O&&(m=await O(m,y,w,l));if(m=m||{},d)throw m;return T==="data"?void 0:{error:m,request:w,response:y}}},n=l=>d=>a({...d,method:l}),i=l=>async d=>{let{opts:T,url:w}=await p(d);return F({...T,body:T.body,method:l,onRequest:async(y,c)=>{let m=new Request(y,c);for(let O of u.request.fns)O&&(m=await O(m,T));return m},serializedBody:j(T),url:w})};return{buildUrl:l=>K({...s,...l}),connect:n("CONNECT"),delete:n("DELETE"),get:n("GET"),getConfig:t,head:n("HEAD"),interceptors:u,options:n("OPTIONS"),patch:n("PATCH"),post:n("POST"),put:n("PUT"),request:a,setConfig:o,sse:{connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),head:i("HEAD"),options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),trace:i("TRACE")},trace:n("TRACE")}};var r=x(U({baseUrl:"https://payment-requests.services.rehive.com/api/"}));var he=e=>(e.client??r).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),fe=e=>(e?.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Oe=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e}),Pe=e=>(e?.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ee=e=>(e?.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),be=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e}),ke=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ce=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ae=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processor_quote/",...e}),ge=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e}),De=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ve=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ze=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e}),je=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e}),Ie=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/logs/",...e}),Qe=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/",...e}),$e=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/",...e}),Ne=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/execute/",...e}),He=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e}),Me=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/transactions/",...e}),Fe=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),Je=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),Ge=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e}),Ze=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),rr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),sr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),nr=e=>(e.client??r).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(e.client??r).get({url:"/requests/{identifier}/",...e}),ar=e=>(e.client??r).patch({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ir=e=>(e.client??r).put({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(e.client??r).post({url:"/requests/{identifier}/otp_challenge/",...e,headers:{"Content-Type":"application/json",...e.headers}}),pr=e=>(e.client??r).get({url:"/requests/{identifier}/payment_processors/",...e}),dr=e=>(e.client??r).post({url:"/requests/{identifier}/resend_otp/",...e}),lr=e=>(e.client??r).get({url:"/requests/{identifier}/transactions/",...e}),cr=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e}),yr=e=>(e?.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),mr=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),Rr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),hr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wr=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fr=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e}),Or=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e}),Pr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Er=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),br=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/notify/",...e}),kr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e}),qr=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/transactions/",...e}),Ar=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e}),Ur=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xr=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),gr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),Dr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sr=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vr=e=>(e.client??r).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zr=e=>(e.client??r).post({url:"/webhooks/rehive_transaction/executed/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lr=e=>(e.client??r).post({url:"/webhooks/rehive_transaction/initiated/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wr=e=>(e.client??r).post({url:"/webhooks/rehive_user/create/",...e,headers:{"Content-Type":"application/json",...e.headers}}),jr=e=>(e.client??r).post({url:"/webhooks/rehive_user/email_update/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kr=e=>(e.client??r).post({url:"/webhooks/rehive_user/update/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ir(e){let s=x(V(e,"https://payment-requests.services.rehive.com/api/"));return M(_,s)}export{Ir as createPaymentRequestsApi};
|
|
6
|
+
`);try{q=JSON.parse(E),N=!0}catch{q=E}}N&&(u&&await u(q),o&&(q=await o(q))),t?.({data:q,event:$,id:d,retry:c}),D.length&&(yield q)}}}finally{O.removeEventListener("abort",B),P.releaseLock()}break}catch(b){if(s?.(b),a!==void 0&&m>=a)break;let k=Math.min(c*2**(m-1),n??3e4);await T(k)}}}()}}var ie=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:s,name:t,style:o,value:u})=>{if(!s){let n=(e?u:u.map(i=>encodeURIComponent(i))).join(ue(o));switch(o){case"label":return`.${n}`;case"matrix":return`;${t}=${n}`;case"simple":return n;default:return`${t}=${n}`}}let p=ie(o),a=u.map(n=>o==="label"||o==="simple"?e?n:encodeURIComponent(n):C({allowReserved:e,name:t,value:n})).join(p);return o==="label"||o==="matrix"?p+a:a},C=({allowReserved:e,name:s,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`${s}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:s,name:t,style:o,value:u,valueOnly:p})=>{if(u instanceof Date)return p?u.toISOString():`${t}=${u.toISOString()}`;if(o!=="deepObject"&&!s){let i=[];Object.entries(u).forEach(([l,d])=>{i=[...i,l,e?d:encodeURIComponent(d)]});let w=i.join(",");switch(o){case"form":return`${t}=${w}`;case"label":return`.${w}`;case"matrix":return`;${t}=${w}`;default:return w}}let a=pe(o),n=Object.entries(u).map(([i,w])=>C({allowReserved:e,name:o==="deepObject"?`${t}[${i}]`:i,value:w})).join(a);return o==="label"||o==="matrix"?a+n:n};var de=/\{[^{}]+\}/g,le=({path:e,url:s})=>{let t=s,o=s.match(de);if(o)for(let u of o){let p=!1,a=u.substring(1,u.length-1),n="simple";a.endsWith("*")&&(p=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),n="label"):a.startsWith(";")&&(a=a.substring(1),n="matrix");let i=e[a];if(i==null)continue;if(Array.isArray(i)){t=t.replace(u,S({explode:p,name:a,style:n,value:i}));continue}if(typeof i=="object"){t=t.replace(u,v({explode:p,name:a,style:n,value:i,valueOnly:!0}));continue}if(n==="matrix"){t=t.replace(u,`;${C({name:a,value:i})}`);continue}let w=encodeURIComponent(n==="label"?`.${i}`:i);t=t.replace(u,w)}return t},J=({baseUrl:e,path:s,query:t,querySerializer:o,url:u})=>{let p=u.startsWith("/")?u:`/${u}`,a=(e??"")+p;s&&(a=le({path:s,url:a}));let n=t?o(t):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(a+=`?${n}`),a};function j(e){let s=e.body!==void 0;if(s&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(s)return e.body}var G=async(e,s)=>{let t=typeof s=="function"?await s(e):s;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...s}={})=>o=>{let u=[];if(o&&typeof o=="object")for(let p in o){let a=o[p];if(a==null)continue;let n=e[p]||s;if(Array.isArray(a)){let i=S({allowReserved:n.allowReserved,explode:!0,name:p,style:"form",value:a,...n.array});i&&u.push(i)}else if(typeof a=="object"){let i=v({allowReserved:n.allowReserved,explode:!0,name:p,style:"deepObject",value:a,...n.object});i&&u.push(i)}else{let i=C({allowReserved:n.allowReserved,name:p,value:a});i&&u.push(i)}}return u.join("&")},Y=e=>{if(!e)return"stream";let s=e.split(";")[0]?.trim();if(s){if(s.startsWith("application/json")||s.endsWith("+json"))return"json";if(s==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>s.startsWith(t)))return"blob";if(s.startsWith("text/"))return"text"}},ce=(e,s)=>s?!!(e.headers.has(s)||e.query?.[s]||e.headers.get("Cookie")?.includes(`${s}=`)):!1;async function Z(e){for(let s of e.security??[]){if(ce(e,s.name))continue;let t=await G(s,e.auth);if(!t)continue;let o=s.name??"Authorization";switch(s.in){case"query":e.query||(e.query={}),e.query[o]=t;break;case"cookie":e.headers.append("Cookie",`${o}=${t}`);break;case"header":default:e.headers.set(o,t);break}}}var K=e=>J({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),I=(e,s)=>{let t={...e,...s};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=z(e.headers,s.headers),t},ye=e=>{let s=[];return e.forEach((t,o)=>{s.push([o,t])}),s},z=(...e)=>{let s=new Headers;for(let t of e){if(!t)continue;let o=t instanceof Headers?ye(t):Object.entries(t);for(let[u,p]of o)if(p===null)s.delete(u);else if(Array.isArray(p))for(let a of p)s.append(u,a);else p!==void 0&&s.set(u,typeof p=="object"?JSON.stringify(p):p)}return s},A=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(s){let t=this.getInterceptorIndex(s);this.fns[t]&&(this.fns[t]=null)}exists(s){let t=this.getInterceptorIndex(s);return!!this.fns[t]}getInterceptorIndex(s){return typeof s=="number"?this.fns[s]?s:-1:this.fns.indexOf(s)}update(s,t){let o=this.getInterceptorIndex(s);return this.fns[o]?(this.fns[o]=t,s):!1}use(s){return this.fns.push(s),this.fns.length-1}},ee=()=>({error:new A,request:new A,response:new A}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},U=(e={})=>({...W,headers:he,parseAs:"auto",querySerializer:me,...e});var x=(e={})=>{let s=I(U(),e),t=()=>({...s}),o=l=>(s=I(s,l),t()),u=ee(),p=async l=>{let d={...s,...l,fetch:l.fetch??s.fetch??globalThis.fetch,headers:z(s.headers,l.headers),serializedBody:void 0};d.security&&await Z(d),d.requestValidator&&await d.requestValidator(d),d.body!==void 0&&d.bodySerializer&&(d.serializedBody=d.bodySerializer(d.body)),(d.body===void 0||d.serializedBody==="")&&d.headers.delete("Content-Type");let T=d,f=K(T);return{opts:T,url:f}},a=async l=>{let d=l.throwOnError??s.throwOnError,T=l.responseStyle??s.responseStyle,f,y;try{let{opts:c,url:m}=await p(l),O={redirect:"follow",...c,body:j(c)};f=new Request(m,O);for(let h of u.request.fns)h&&(f=await h(f,c));let g=c.fetch;y=await g(f);for(let h of u.response.fns)h&&(y=await h(y,f,c));let b={request:f,response:y};if(y.ok){let h=(c.parseAs==="auto"?Y(y.headers.get("Content-Type")):c.parseAs)??"json";if(y.status===204||y.headers.get("Content-Length")==="0"){let R;switch(h){case"arrayBuffer":case"blob":case"text":R=await y[h]();break;case"formData":R=new FormData;break;case"stream":R=y.body;break;case"json":default:R={};break}return c.responseStyle==="data"?R:{data:R,...b}}let P;switch(h){case"arrayBuffer":case"blob":case"formData":case"text":P=await y[h]();break;case"json":{let R=await y.text();P=R?JSON.parse(R):{};break}case"stream":return c.responseStyle==="data"?y.body:{data:y.body,...b}}return h==="json"&&(c.responseValidator&&await c.responseValidator(P),c.responseTransformer&&(P=await c.responseTransformer(P))),c.responseStyle==="data"?P:{data:P,...b}}let k=await y.text(),L;try{L=JSON.parse(k)}catch{}throw L??k}catch(c){let m=c;for(let O of u.error.fns)O&&(m=await O(m,y,f,l));if(m=m||{},d)throw m;return T==="data"?void 0:{error:m,request:f,response:y}}},n=l=>d=>a({...d,method:l}),i=l=>async d=>{let{opts:T,url:f}=await p(d);return F({...T,body:T.body,method:l,onRequest:async(y,c)=>{let m=new Request(y,c);for(let O of u.request.fns)O&&(m=await O(m,T));return m},serializedBody:j(T),url:f})};return{buildUrl:l=>K({...s,...l}),connect:n("CONNECT"),delete:n("DELETE"),get:n("GET"),getConfig:t,head:n("HEAD"),interceptors:u,options:n("OPTIONS"),patch:n("PATCH"),post:n("POST"),put:n("PUT"),request:a,setConfig:o,sse:{connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),head:i("HEAD"),options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),trace:i("TRACE")},trace:n("TRACE")}};var r=x(U({baseUrl:"https://payment-requests.services.rehive.com/api/"}));var Re=e=>(e.client??r).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(e?.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Oe=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e}),Pe=e=>(e?.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ee=e=>(e?.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),be=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e}),ke=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ce=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e}),Ae=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company_payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processor_quote/",...e}),ge=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e}),De=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ve=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e}),ze=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment_processors/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e}),je=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e}),Ie=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/logs/",...e}),Qe=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/",...e}),$e=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/",...e}),Ne=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/payment-process-quotes/{quote_identifier}/execute/",...e}),He=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e}),Me=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/requests/{identifier}/transactions/",...e}),Fe=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),Je=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),Ge=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e}),Ze=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),rr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e}),sr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),nr=e=>(e.client??r).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(e.client??r).get({url:"/requests/{identifier}/",...e}),ar=e=>(e.client??r).patch({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ir=e=>(e.client??r).put({url:"/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(e.client??r).post({url:"/requests/{identifier}/otp_challenge/",...e,headers:{"Content-Type":"application/json",...e.headers}}),pr=e=>(e.client??r).get({url:"/requests/{identifier}/payment_processors/",...e}),dr=e=>(e.client??r).post({url:"/requests/{identifier}/resend_otp/",...e}),lr=e=>(e.client??r).get({url:"/requests/{identifier}/transactions/",...e}),cr=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e}),yr=e=>(e?.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),mr=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),hr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e}),Rr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fr=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/payment_processors/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),wr=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e}),Or=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Tr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e}),Pr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Er=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),br=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/notify/",...e}),kr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e}),qr=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/requests/{identifier}/transactions/",...e}),Ar=e=>(e?.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e}),Ur=e=>(e.client??r).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xr=e=>(e.client??r).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),gr=e=>(e.client??r).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e}),Dr=e=>(e.client??r).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sr=e=>(e.client??r).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/webhooks/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vr=e=>(e.client??r).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zr=e=>(e.client??r).post({url:"/webhooks/rehive_transaction/executed/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Lr=e=>(e.client??r).post({url:"/webhooks/rehive_transaction/initiated/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wr=e=>(e.client??r).post({url:"/webhooks/rehive_user/create/",...e,headers:{"Content-Type":"application/json",...e.headers}}),jr=e=>(e.client??r).post({url:"/webhooks/rehive_user/email_update/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kr=e=>(e.client??r).post({url:"/webhooks/rehive_user/update/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ir(e){let s=x(V(e,"https://payment-requests.services.rehive.com/api/"));return M(_,s)}export{Ir as createPaymentRequestsApi};
|
|
@@ -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-BY6W7Qz9.mjs';
|
|
2
|
+
import '../create-auth-CROjq_cP.mjs';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -122,6 +122,11 @@ interface Config$1 {
|
|
|
122
122
|
*/
|
|
123
123
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
125
130
|
|
|
126
131
|
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
127
132
|
/**
|
|
@@ -8887,7 +8892,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
8887
8892
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
8888
8893
|
* used to access values that aren't defined as part of the SDK function.
|
|
8889
8894
|
*/
|
|
8890
|
-
meta?: Record<string, unknown
|
|
8895
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
8891
8896
|
};
|
|
8892
8897
|
/**
|
|
8893
8898
|
* Activate service
|
|
@@ -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-CBNjHT-x.js';
|
|
2
|
+
import '../create-auth-CROjq_cP.js';
|
|
3
3
|
|
|
4
4
|
type AuthToken = string | undefined;
|
|
5
5
|
interface Auth {
|
|
@@ -122,6 +122,11 @@ interface Config$1 {
|
|
|
122
122
|
*/
|
|
123
123
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
127
|
+
*/
|
|
128
|
+
interface ClientMeta {
|
|
129
|
+
}
|
|
125
130
|
|
|
126
131
|
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
127
132
|
/**
|
|
@@ -8887,7 +8892,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
8887
8892
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
8888
8893
|
* used to access values that aren't defined as part of the SDK function.
|
|
8889
8894
|
*/
|
|
8890
|
-
meta?: Record<string, unknown
|
|
8895
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
8891
8896
|
};
|
|
8892
8897
|
/**
|
|
8893
8898
|
* Activate service
|