rehive 4.1.2 → 4.1.4

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.
Files changed (158) hide show
  1. package/dist/admin.d.mts +106 -43
  2. package/dist/admin.d.ts +106 -43
  3. package/dist/admin.js +1 -1
  4. package/dist/admin.mjs +1 -1
  5. package/dist/auth.d.mts +2 -2
  6. package/dist/auth.d.ts +2 -2
  7. package/dist/auth.js +1 -1
  8. package/dist/auth.mjs +1 -1
  9. package/dist/{chunk-442DXMRO.mjs → chunk-4WSHB6U6.mjs} +1 -1
  10. package/dist/chunk-AVPKHYGS.js +7 -0
  11. package/dist/chunk-KUT5NSX7.mjs +7 -0
  12. package/dist/chunk-KZWBOQHZ.mjs +7 -0
  13. package/dist/{chunk-VTR4XNHH.js → chunk-PE6PG7ZE.js} +1 -1
  14. package/dist/chunk-UYYU5OJ4.js +7 -0
  15. package/dist/{chunk-BGMUBB76.js → chunk-X6YDNXYV.js} +1 -1
  16. package/dist/{chunk-FC42NTFK.mjs → chunk-Z7BUNKND.mjs} +1 -1
  17. package/dist/{create-api-client-2vNCP2LN.d.mts → create-api-client-C-LEZku2.d.mts} +1 -1
  18. package/dist/{create-api-client-D-Z8R83N.d.ts → create-api-client-ebyTfhcm.d.ts} +1 -1
  19. package/dist/{create-auth-CHzmb_8_.d.mts → create-auth-DsnHpEf0.d.mts} +47 -8
  20. package/dist/{create-auth-CHzmb_8_.d.ts → create-auth-DsnHpEf0.d.ts} +47 -8
  21. package/dist/extensions/alchemy.d.mts +3 -3
  22. package/dist/extensions/alchemy.d.ts +3 -3
  23. package/dist/extensions/alchemy.js +5 -5
  24. package/dist/extensions/alchemy.mjs +5 -5
  25. package/dist/extensions/app.d.mts +3 -3
  26. package/dist/extensions/app.d.ts +3 -3
  27. package/dist/extensions/app.js +5 -5
  28. package/dist/extensions/app.mjs +5 -5
  29. package/dist/extensions/billing.d.mts +3 -3
  30. package/dist/extensions/billing.d.ts +3 -3
  31. package/dist/extensions/billing.js +5 -5
  32. package/dist/extensions/billing.mjs +5 -5
  33. package/dist/extensions/bridge.d.mts +190 -16
  34. package/dist/extensions/bridge.d.ts +190 -16
  35. package/dist/extensions/bridge.js +5 -5
  36. package/dist/extensions/bridge.mjs +5 -5
  37. package/dist/extensions/builder.d.mts +3 -3
  38. package/dist/extensions/builder.d.ts +3 -3
  39. package/dist/extensions/builder.js +5 -5
  40. package/dist/extensions/builder.mjs +5 -5
  41. package/dist/extensions/business.d.mts +82 -47
  42. package/dist/extensions/business.d.ts +82 -47
  43. package/dist/extensions/business.js +5 -5
  44. package/dist/extensions/business.mjs +5 -5
  45. package/dist/extensions/conversion.d.mts +3 -3
  46. package/dist/extensions/conversion.d.ts +3 -3
  47. package/dist/extensions/conversion.js +5 -5
  48. package/dist/extensions/conversion.mjs +5 -5
  49. package/dist/extensions/mass-send.d.mts +3 -3
  50. package/dist/extensions/mass-send.d.ts +3 -3
  51. package/dist/extensions/mass-send.js +5 -5
  52. package/dist/extensions/mass-send.mjs +5 -5
  53. package/dist/extensions/notifications.d.mts +3 -3
  54. package/dist/extensions/notifications.d.ts +3 -3
  55. package/dist/extensions/notifications.js +5 -5
  56. package/dist/extensions/notifications.mjs +5 -5
  57. package/dist/extensions/payment-requests.d.mts +7 -3
  58. package/dist/extensions/payment-requests.d.ts +7 -3
  59. package/dist/extensions/payment-requests.js +5 -5
  60. package/dist/extensions/payment-requests.mjs +5 -5
  61. package/dist/extensions/products.d.mts +3 -3
  62. package/dist/extensions/products.d.ts +3 -3
  63. package/dist/extensions/products.js +5 -5
  64. package/dist/extensions/products.mjs +5 -5
  65. package/dist/extensions/rain.d.mts +3 -3
  66. package/dist/extensions/rain.d.ts +3 -3
  67. package/dist/extensions/rain.js +5 -5
  68. package/dist/extensions/rain.mjs +5 -5
  69. package/dist/extensions/rewards.d.mts +3 -3
  70. package/dist/extensions/rewards.d.ts +3 -3
  71. package/dist/extensions/rewards.js +5 -5
  72. package/dist/extensions/rewards.mjs +5 -5
  73. package/dist/extensions/stellar-testnet.d.mts +3 -3
  74. package/dist/extensions/stellar-testnet.d.ts +3 -3
  75. package/dist/extensions/stellar-testnet.js +5 -5
  76. package/dist/extensions/stellar-testnet.mjs +5 -5
  77. package/dist/extensions/stellar.d.mts +3 -3
  78. package/dist/extensions/stellar.d.ts +3 -3
  79. package/dist/extensions/stellar.js +5 -5
  80. package/dist/extensions/stellar.mjs +5 -5
  81. package/dist/index.d.mts +2 -2
  82. package/dist/index.d.ts +2 -2
  83. package/dist/index.js +1 -1
  84. package/dist/index.mjs +1 -1
  85. package/dist/react.d.mts +2 -2
  86. package/dist/react.d.ts +2 -2
  87. package/dist/react.js +1 -1
  88. package/dist/react.mjs +1 -1
  89. package/dist/user.d.mts +16 -6
  90. package/dist/user.d.ts +16 -6
  91. package/dist/user.js +1 -1
  92. package/dist/user.mjs +1 -1
  93. package/package.json +1 -1
  94. package/src/extensions/alchemy/openapi-ts/client/client.gen.ts +5 -3
  95. package/src/extensions/alchemy/openapi-ts/core/bodySerializer.gen.ts +6 -8
  96. package/src/extensions/alchemy/openapi-ts/core/params.gen.ts +1 -1
  97. package/src/extensions/app/openapi-ts/client/client.gen.ts +5 -3
  98. package/src/extensions/app/openapi-ts/core/bodySerializer.gen.ts +6 -8
  99. package/src/extensions/app/openapi-ts/core/params.gen.ts +1 -1
  100. package/src/extensions/billing/openapi-ts/client/client.gen.ts +5 -3
  101. package/src/extensions/billing/openapi-ts/core/bodySerializer.gen.ts +6 -8
  102. package/src/extensions/billing/openapi-ts/core/params.gen.ts +1 -1
  103. package/src/extensions/bridge/openapi-ts/client/client.gen.ts +5 -3
  104. package/src/extensions/bridge/openapi-ts/core/bodySerializer.gen.ts +6 -8
  105. package/src/extensions/bridge/openapi-ts/core/params.gen.ts +1 -1
  106. package/src/extensions/bridge/openapi-ts/index.ts +2 -2
  107. package/src/extensions/bridge/openapi-ts/sdk.gen.ts +43 -1
  108. package/src/extensions/bridge/openapi-ts/types.gen.ts +201 -11
  109. package/src/extensions/builder/openapi-ts/client/client.gen.ts +5 -3
  110. package/src/extensions/builder/openapi-ts/core/bodySerializer.gen.ts +6 -8
  111. package/src/extensions/builder/openapi-ts/core/params.gen.ts +1 -1
  112. package/src/extensions/business/openapi-ts/client/client.gen.ts +5 -3
  113. package/src/extensions/business/openapi-ts/core/bodySerializer.gen.ts +6 -8
  114. package/src/extensions/business/openapi-ts/core/params.gen.ts +1 -1
  115. package/src/extensions/business/openapi-ts/types.gen.ts +79 -44
  116. package/src/extensions/conversion/openapi-ts/client/client.gen.ts +5 -3
  117. package/src/extensions/conversion/openapi-ts/core/bodySerializer.gen.ts +6 -8
  118. package/src/extensions/conversion/openapi-ts/core/params.gen.ts +1 -1
  119. package/src/extensions/mass-send/openapi-ts/client/client.gen.ts +5 -3
  120. package/src/extensions/mass-send/openapi-ts/core/bodySerializer.gen.ts +6 -8
  121. package/src/extensions/mass-send/openapi-ts/core/params.gen.ts +1 -1
  122. package/src/extensions/notifications/openapi-ts/client/client.gen.ts +5 -3
  123. package/src/extensions/notifications/openapi-ts/core/bodySerializer.gen.ts +6 -8
  124. package/src/extensions/notifications/openapi-ts/core/params.gen.ts +1 -1
  125. package/src/extensions/payment-requests/openapi-ts/client/client.gen.ts +5 -3
  126. package/src/extensions/payment-requests/openapi-ts/core/bodySerializer.gen.ts +6 -8
  127. package/src/extensions/payment-requests/openapi-ts/core/params.gen.ts +1 -1
  128. package/src/extensions/payment-requests/openapi-ts/types.gen.ts +4 -0
  129. package/src/extensions/products/openapi-ts/client/client.gen.ts +5 -3
  130. package/src/extensions/products/openapi-ts/core/bodySerializer.gen.ts +6 -8
  131. package/src/extensions/products/openapi-ts/core/params.gen.ts +1 -1
  132. package/src/extensions/rain/openapi-ts/client/client.gen.ts +5 -3
  133. package/src/extensions/rain/openapi-ts/core/bodySerializer.gen.ts +6 -8
  134. package/src/extensions/rain/openapi-ts/core/params.gen.ts +1 -1
  135. package/src/extensions/rewards/openapi-ts/client/client.gen.ts +5 -3
  136. package/src/extensions/rewards/openapi-ts/core/bodySerializer.gen.ts +6 -8
  137. package/src/extensions/rewards/openapi-ts/core/params.gen.ts +1 -1
  138. package/src/extensions/stellar/openapi-ts/client/client.gen.ts +5 -3
  139. package/src/extensions/stellar/openapi-ts/core/bodySerializer.gen.ts +6 -8
  140. package/src/extensions/stellar/openapi-ts/core/params.gen.ts +1 -1
  141. package/src/extensions/stellar-testnet/openapi-ts/client/client.gen.ts +5 -3
  142. package/src/extensions/stellar-testnet/openapi-ts/core/bodySerializer.gen.ts +6 -8
  143. package/src/extensions/stellar-testnet/openapi-ts/core/params.gen.ts +1 -1
  144. package/src/platform/admin/openapi-ts/client/client.gen.ts +5 -3
  145. package/src/platform/admin/openapi-ts/core/bodySerializer.gen.ts +6 -8
  146. package/src/platform/admin/openapi-ts/core/params.gen.ts +1 -1
  147. package/src/platform/admin/openapi-ts/sdk.gen.ts +61 -0
  148. package/src/platform/admin/openapi-ts/types.gen.ts +103 -40
  149. package/src/platform/user/openapi-ts/client/client.gen.ts +5 -3
  150. package/src/platform/user/openapi-ts/core/bodySerializer.gen.ts +6 -8
  151. package/src/platform/user/openapi-ts/core/params.gen.ts +1 -1
  152. package/src/platform/user/openapi-ts/index.ts +2 -2
  153. package/src/platform/user/openapi-ts/sdk.gen.ts +43 -1
  154. package/src/platform/user/openapi-ts/types.gen.ts +54 -7
  155. package/dist/chunk-6WLL3XNH.js +0 -7
  156. package/dist/chunk-LTRLQIIM.js +0 -7
  157. package/dist/chunk-WTKM56EI.mjs +0 -7
  158. package/dist/chunk-WVAFSUTF.mjs +0 -7
@@ -1,7 +1,7 @@
1
- import{a as V,c as F}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>cs,managerBusinessesCreate:()=>as,managerBusinessesDocumentsCreate:()=>ls,managerBusinessesDocumentsList:()=>ds,managerBusinessesDocumentsRetrieve:()=>ys,managerBusinessesInvoicesCreate:()=>hs,managerBusinessesInvoicesList:()=>ms,managerBusinessesInvoicesLogsList:()=>ws,managerBusinessesInvoicesPartialUpdate:()=>fs,managerBusinessesInvoicesRefundsCreate:()=>bs,managerBusinessesInvoicesRefundsList:()=>Rs,managerBusinessesInvoicesRetrieve:()=>gs,managerBusinessesInvoicesTransactionsList:()=>Bs,managerBusinessesInvoicesUpdate:()=>Os,managerBusinessesList:()=>ts,managerBusinessesMetricsList:()=>Ts,managerBusinessesMetricsPointsList:()=>Es,managerBusinessesMetricsRetrieve:()=>Cs,managerBusinessesPartialUpdate:()=>os,managerBusinessesPayoutsCreate:()=>xs,managerBusinessesPayoutsList:()=>As,managerBusinessesPayoutsRetrieve:()=>Ds,managerBusinessesPayoutsTransactionsList:()=>vs,managerBusinessesRetrieve:()=>is,managerBusinessesTransactionsList:()=>ks,managerBusinessesTransactionsRetrieve:()=>Ms,managerBusinessesUpdate:()=>us,managerBusinessesUsersCreate:()=>Ss,managerBusinessesUsersList:()=>Us,managerBusinessesUsersPartialUpdate:()=>Ps,managerBusinessesUsersRetrieve:()=>zs,managerBusinessesUsersUpdate:()=>Ls,managerCompanyRetrieve:()=>qs,userBusinessCategoriesList:()=>Ks,userBusinessCategoriesRetrieve:()=>_s,userBusinessesList:()=>$s,userBusinessesRetrieve:()=>Ns,userCompanyRetrieve:()=>Ws,webhookCreate:()=>Hs});var L={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Js=Object.entries(ie);var J=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:c,sseMaxRetryAttempts:u,sseMaxRetryDelay:o,sseSleepFn:p,url:l,...t})=>{let h,E=p??(d=>new Promise(f=>setTimeout(f,d)));return{stream:async function*(){let d=c??3e3,f=0,b=t.signal??new AbortController().signal;for(;!b.aborted;){f++;let A=t.headers instanceof Headers?t.headers:new Headers(t.headers);h!==void 0&&A.set("Last-Event-ID",h);try{let B={redirect:"follow",...t,body:t.serializedBody,headers:A,signal:b},R=new Request(l,B);e&&(R=await e(l,B));let y=await(t.fetch??globalThis.fetch)(R);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let g=y.body.pipeThrough(new TextDecoderStream).getReader(),x="",_=()=>{try{g.cancel()}catch{}};b.addEventListener("abort",_);try{for(;;){let{done:se,value:re}=await g.read();if(se)break;x+=re,x=x.replace(/\r\n/g,`
1
+ import{a as V,c as F}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>cs,managerBusinessesCreate:()=>as,managerBusinessesDocumentsCreate:()=>ls,managerBusinessesDocumentsList:()=>ds,managerBusinessesDocumentsRetrieve:()=>ys,managerBusinessesInvoicesCreate:()=>hs,managerBusinessesInvoicesList:()=>ms,managerBusinessesInvoicesLogsList:()=>ws,managerBusinessesInvoicesPartialUpdate:()=>fs,managerBusinessesInvoicesRefundsCreate:()=>bs,managerBusinessesInvoicesRefundsList:()=>Rs,managerBusinessesInvoicesRetrieve:()=>gs,managerBusinessesInvoicesTransactionsList:()=>Bs,managerBusinessesInvoicesUpdate:()=>Os,managerBusinessesList:()=>ts,managerBusinessesMetricsList:()=>Ts,managerBusinessesMetricsPointsList:()=>Es,managerBusinessesMetricsRetrieve:()=>Cs,managerBusinessesPartialUpdate:()=>os,managerBusinessesPayoutsCreate:()=>xs,managerBusinessesPayoutsList:()=>As,managerBusinessesPayoutsRetrieve:()=>Ds,managerBusinessesPayoutsTransactionsList:()=>vs,managerBusinessesRetrieve:()=>is,managerBusinessesTransactionsList:()=>ks,managerBusinessesTransactionsRetrieve:()=>Ms,managerBusinessesUpdate:()=>us,managerBusinessesUsersCreate:()=>Ss,managerBusinessesUsersList:()=>Us,managerBusinessesUsersPartialUpdate:()=>Ps,managerBusinessesUsersRetrieve:()=>zs,managerBusinessesUsersUpdate:()=>Ls,managerCompanyRetrieve:()=>qs,userBusinessCategoriesList:()=>Ks,userBusinessCategoriesRetrieve:()=>_s,userBusinessesList:()=>$s,userBusinessesRetrieve:()=>Ns,userCompanyRetrieve:()=>Ws,webhookCreate:()=>Hs});var L={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Js=Object.entries(ie);var J=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:c,sseMaxRetryAttempts:u,sseMaxRetryDelay:o,sseSleepFn:p,url:g,...l})=>{let t,O=p??(b=>new Promise(d=>setTimeout(d,b)));return{stream:async function*(){let b=c??3e3,d=0,f=l.signal??new AbortController().signal;for(;!f.aborted;){d++;let x=l.headers instanceof Headers?l.headers:new Headers(l.headers);t!==void 0&&x.set("Last-Event-ID",t);try{let B={redirect:"follow",...l,body:l.serializedBody,headers:x,signal:f},T=new Request(g,B);e&&(T=await e(g,B));let y=await(l.fetch??globalThis.fetch)(T);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),m="",_=()=>{try{h.cancel()}catch{}};f.addEventListener("abort",_);try{for(;;){let{done:se,value:re}=await h.read();if(se)break;m+=re,m=m.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let $=x.split(`
3
+ `);let $=m.split(`
4
4
 
5
- `);x=$.pop()??"";for(let ne of $){let te=ne.split(`
6
- `),U=[],N;for(let w of te)if(w.startsWith("data:"))U.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))N=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))h=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let H=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(d=H)}let T,W=!1;if(U.length){let w=U.join(`
7
- `);try{T=JSON.parse(w),W=!0}catch{T=w}}W&&(a&&await a(T),i&&(T=await i(T))),n?.({data:T,event:N,id:h,retry:d}),U.length&&(yield T)}}}finally{b.removeEventListener("abort",_),g.releaseLock()}break}catch(B){if(r?.(B),u!==void 0&&f>=u)break;let R=Math.min(d*2**(f-1),o??3e4);await E(R)}}}()}};var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let c=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):C({allowReserved:e,name:n,value:o})).join(c);return i==="label"||i==="matrix"?c+u:u},C=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:c})=>{if(a instanceof Date)return c?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([t,h])=>{p=[...p,t,e?h:encodeURIComponent(h)]});let l=p.join(",");switch(i){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let u=pe(i),o=Object.entries(a).map(([p,l])=>C({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:l})).join(u);return i==="label"||i==="matrix"?u+o:o};var ce=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let n=r,i=r.match(ce);if(i)for(let a of i){let c=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(c=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:c,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:c,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${C({name:u,value:p})}`);continue}let l=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,l)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let c=a.startsWith("/")?a:`/${a}`,u=(e??"")+c;r&&(u=de({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let c in i){let u=i[c];if(u==null)continue;let o=e[c]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=C({allowReserved:o.allowReserved,name:c,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=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(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=n.name??"Authorization";switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,c]of i)if(c===null)r.delete(a);else if(Array.isArray(c))for(let u of c)r.append(a,u);else c!==void 0&&r.set(a,typeof c=="object"?JSON.stringify(c):c)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},v=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var k=(e={})=>{let r=q(v(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),c=async l=>{let t={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let h=I(t);return{opts:t,url:h}},u=async l=>{let{opts:t,url:h}=await c(l),E={redirect:"follow",...t,body:j(t)},O=new Request(h,E);for(let m of a.request.fns)m&&(O=await m(O,t));let M=t.fetch,d;try{d=await M(O)}catch(m){let y=m;for(let g of a.error.fns)g&&(y=await g(m,void 0,O,t));if(y=y||{},t.throwOnError)throw y;return t.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of a.response.fns)m&&(d=await m(d,O,t));let f={request:O,response:d};if(d.ok){let m=(t.parseAs==="auto"?Y(d.headers.get("Content-Type")):t.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let g;switch(m){case"arrayBuffer":case"blob":case"text":g=await d[m]();break;case"formData":g=new FormData;break;case"stream":g=d.body;break;case"json":default:g={};break}return t.responseStyle==="data"?g:{data:g,...f}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[m]();break;case"json":{let g=await d.text();y=g?JSON.parse(g):{};break}case"stream":return t.responseStyle==="data"?d.body:{data:d.body,...f}}return m==="json"&&(t.responseValidator&&await t.responseValidator(y),t.responseTransformer&&(y=await t.responseTransformer(y))),t.responseStyle==="data"?y:{data:y,...f}}let b=await d.text(),A;try{A=JSON.parse(b)}catch{}let B=A??b,R=B;for(let m of a.error.fns)m&&(R=await m(B,d,O,t));if(R=R||{},t.throwOnError)throw R;return t.responseStyle==="data"?void 0:{error:R,...f}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:h,url:E}=await c(t);return J({...h,body:h.body,headers:h.headers,method:l,onRequest:async(O,M)=>{let d=new Request(O,M);for(let f of a.request.fns)f&&(d=await f(d,h));return d},serializedBody:j(h),url:E})};return{buildUrl:I,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=k(v({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(e.client??s).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(e?.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Je=e=>(e?.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Qe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(e.client??s).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(e.client??s).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(e.client??s).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=k(F(e,"https://business.services.rehive.com/api/"));return V(K,r)}export{Vs as createBusinessApi};
5
+ `);m=$.pop()??"";for(let ne of $){let te=ne.split(`
6
+ `),U=[],N;for(let R of te)if(R.startsWith("data:"))U.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))N=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))t=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let H=Number.parseInt(R.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(b=H)}let C,W=!1;if(U.length){let R=U.join(`
7
+ `);try{C=JSON.parse(R),W=!0}catch{C=R}}W&&(a&&await a(C),i&&(C=await i(C))),n?.({data:C,event:N,id:t,retry:b}),U.length&&(yield C)}}}finally{f.removeEventListener("abort",_),h.releaseLock()}break}catch(B){if(r?.(B),u!==void 0&&d>=u)break;let T=Math.min(b*2**(d-1),o??3e4);await O(T)}}}()}};var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let c=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):A({allowReserved:e,name:n,value:o})).join(c);return i==="label"||i==="matrix"?c+u:u},A=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:c})=>{if(a instanceof Date)return c?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([l,t])=>{p=[...p,l,e?t:encodeURIComponent(t)]});let g=p.join(",");switch(i){case"form":return`${n}=${g}`;case"label":return`.${g}`;case"matrix":return`;${n}=${g}`;default:return g}}let u=pe(i),o=Object.entries(a).map(([p,g])=>A({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:g})).join(u);return i==="label"||i==="matrix"?u+o:o};var ce=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let n=r,i=r.match(ce);if(i)for(let a of i){let c=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(c=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:c,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:c,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${A({name:u,value:p})}`);continue}let g=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,g)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let c=a.startsWith("/")?a:`/${a}`,u=(e??"")+c;r&&(u=de({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let c in i){let u=i[c];if(u==null)continue;let o=e[c]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=A({allowReserved:o.allowReserved,name:c,value:u});p&&a.push(p)}}return a.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(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=n.name??"Authorization";switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,c]of i)if(c===null)r.delete(a);else if(Array.isArray(c))for(let u of c)r.append(a,u);else c!==void 0&&r.set(a,typeof c=="object"?JSON.stringify(c):c)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},v=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var k=(e={})=>{let r=q(v(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),c=async l=>{let t={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let O=I(t);return{opts:t,url:O}},u=async l=>{let{opts:t,url:O}=await c(l),M={redirect:"follow",...t,body:j(t)},w=new Request(O,M);for(let y of a.request.fns)y&&(w=await y(w,t));let b=t.fetch,d;try{d=await b(w)}catch(y){let h=y;for(let m of a.error.fns)m&&(h=await m(y,void 0,w,t));if(h=h||{},t.throwOnError)throw h;return t.responseStyle==="data"?void 0:{error:h,request:w,response:void 0}}for(let y of a.response.fns)y&&(d=await y(d,w,t));let f={request:w,response:d};if(d.ok){let y=(t.parseAs==="auto"?Y(d.headers.get("Content-Type")):t.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let m;switch(y){case"arrayBuffer":case"blob":case"text":m=await d[y]();break;case"formData":m=new FormData;break;case"stream":m=d.body;break;case"json":default:m={};break}return t.responseStyle==="data"?m:{data:m,...f}}let h;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":h=await d[y]();break;case"json":{let m=await d.text();h=m?JSON.parse(m):{};break}case"stream":return t.responseStyle==="data"?d.body:{data:d.body,...f}}return y==="json"&&(t.responseValidator&&await t.responseValidator(h),t.responseTransformer&&(h=await t.responseTransformer(h))),t.responseStyle==="data"?h:{data:h,...f}}let x=await d.text(),B;try{B=JSON.parse(x)}catch{}let T=B??x,E=T;for(let y of a.error.fns)y&&(E=await y(T,d,w,t));if(E=E||{},t.throwOnError)throw E;return t.responseStyle==="data"?void 0:{error:E,...f}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:O,url:M}=await c(t);return J({...O,body:O.body,headers:O.headers,method:l,onRequest:async(w,b)=>{let d=new Request(w,b);for(let f of a.request.fns)f&&(d=await f(d,O));return d},serializedBody:j(O),url:M})};return{buildUrl:l=>I({...r,...l}),connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=k(v({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(e.client??s).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(e?.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Je=e=>(e?.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Qe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(e.client??s).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(e.client??s).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(e.client??s).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=k(F(e,"https://business.services.rehive.com/api/"));return V(K,r)}export{Vs as createBusinessApi};
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
2
- import '../create-auth-CHzmb_8_.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-C-LEZku2.mjs';
2
+ import '../create-auth-DsnHpEf0.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: any) => any;
33
+ type BodySerializer = (body: unknown) => unknown;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
2
- import '../create-auth-CHzmb_8_.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-ebyTfhcm.js';
2
+ import '../create-auth-DsnHpEf0.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: any) => any;
33
+ type BodySerializer = (body: unknown) => unknown;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var B={};_chunkOEIQFP6Tjs.a.call(void 0, B,{activateCreate:()=>fe,adminCompanyPartialUpdate:()=>Oe,adminCompanyRetrieve:()=>Re,adminCompanyUpdate:()=>we,adminConversionPairsCreate:()=>Ce,adminConversionPairsDestroy:()=>Ae,adminConversionPairsList:()=>ge,adminConversionPairsPartialUpdate:()=>Te,adminConversionPairsRetrieve:()=>be,adminConversionPairsUpdate:()=>xe,adminConversionsCreate:()=>ve,adminConversionsList:()=>Ee,adminConversionsPartialUpdate:()=>ke,adminConversionsRetrieve:()=>Ue,adminConversionsUpdate:()=>Se,adminCurrenciesCreate:()=>Pe,adminCurrenciesList:()=>De,adminCurrenciesPartialUpdate:()=>Ie,adminCurrenciesRetrieve:()=>ze,adminCurrenciesUpdate:()=>je,adminIntegrationsCreate:()=>Le,adminIntegrationsDestroy:()=>Ke,adminIntegrationsList:()=>qe,adminIntegrationsPartialUpdate:()=>Be,adminIntegrationsRetrieve:()=>We,adminIntegrationsUpdate:()=>_e,adminIntegrationsWebhooksCreate:()=>Ne,adminIntegrationsWebhooksDestroy:()=>He,adminIntegrationsWebhooksList:()=>$e,adminIntegrationsWebhooksPartialUpdate:()=>Fe,adminIntegrationsWebhooksRetrieve:()=>Ve,adminIntegrationsWebhooksUpdate:()=>Je,adminRatePairsCreate:()=>Qe,adminRatePairsDestroy:()=>Ge,adminRatePairsList:()=>Me,adminRatePairsPartialUpdate:()=>Ye,adminRatePairsRetrieve:()=>Xe,adminRatePairsUpdate:()=>Ze,adminUsersList:()=>er,adminUsersPartialUpdate:()=>nr,adminUsersRetrieve:()=>rr,adminUsersUpdate:()=>tr,deactivateCreate:()=>sr,userConversionPairsList:()=>or,userConversionPairsRetrieve:()=>ir,userConversionsCreate:()=>pr,userConversionsList:()=>ar,userConversionsPartialUpdate:()=>lr,userConversionsRetrieve:()=>dr,userConversionsUpdate:()=>cr,userCurrenciesList:()=>ur,userCurrenciesRetrieve:()=>yr,userRatesList:()=>hr,userRatesRetrieve:()=>mr,userRatesSnapshotRetrieve:()=>fr,userRatesSnapshotsList:()=>Rr,userSettingsPartialUpdate:()=>wr,userSettingsRetrieve:()=>Or,userSettingsUpdate:()=>gr,webhookCreate:()=>Cr});var q={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Tr=Object.entries(ie);var M=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:a,sseSleepFn:d,url:u,...s})=>{let m,x=_nullishCoalesce(d, () => ((c=>new Promise(R=>setTimeout(R,c)))));return{stream:async function*(){let c=_nullishCoalesce(l, () => (3e3)),R=0,C=_nullishCoalesce(s.signal, () => (new AbortController().signal));for(;!C.aborted;){R++;let E=s.headers instanceof Headers?s.headers:new Headers(s.headers);m!==void 0&&E.set("Last-Event-ID",m);try{let A={redirect:"follow",...s,body:s.serializedBody,headers:E,signal:C},g=new Request(u,A);e&&(g=await e(u,A));let y=await(_nullishCoalesce(s.fetch, () => (globalThis.fetch)))(g);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let f=y.body.pipeThrough(new TextDecoderStream).getReader(),v="",_=()=>{try{f.cancel()}catch (e2){}};C.addEventListener("abort",_);try{for(;;){let{done:re,value:ne}=await f.read();if(re)break;v+=ne,v=v.replace(/\r\n/g,`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var B={};_chunkOEIQFP6Tjs.a.call(void 0, B,{activateCreate:()=>fe,adminCompanyPartialUpdate:()=>Oe,adminCompanyRetrieve:()=>we,adminCompanyUpdate:()=>Re,adminConversionPairsCreate:()=>Ce,adminConversionPairsDestroy:()=>Ae,adminConversionPairsList:()=>ge,adminConversionPairsPartialUpdate:()=>Te,adminConversionPairsRetrieve:()=>be,adminConversionPairsUpdate:()=>xe,adminConversionsCreate:()=>ve,adminConversionsList:()=>Ee,adminConversionsPartialUpdate:()=>ke,adminConversionsRetrieve:()=>Ue,adminConversionsUpdate:()=>Se,adminCurrenciesCreate:()=>Pe,adminCurrenciesList:()=>De,adminCurrenciesPartialUpdate:()=>Ie,adminCurrenciesRetrieve:()=>ze,adminCurrenciesUpdate:()=>je,adminIntegrationsCreate:()=>Le,adminIntegrationsDestroy:()=>Ke,adminIntegrationsList:()=>qe,adminIntegrationsPartialUpdate:()=>Be,adminIntegrationsRetrieve:()=>We,adminIntegrationsUpdate:()=>_e,adminIntegrationsWebhooksCreate:()=>Ne,adminIntegrationsWebhooksDestroy:()=>He,adminIntegrationsWebhooksList:()=>$e,adminIntegrationsWebhooksPartialUpdate:()=>Fe,adminIntegrationsWebhooksRetrieve:()=>Ve,adminIntegrationsWebhooksUpdate:()=>Je,adminRatePairsCreate:()=>Qe,adminRatePairsDestroy:()=>Ge,adminRatePairsList:()=>Me,adminRatePairsPartialUpdate:()=>Ye,adminRatePairsRetrieve:()=>Xe,adminRatePairsUpdate:()=>Ze,adminUsersList:()=>er,adminUsersPartialUpdate:()=>nr,adminUsersRetrieve:()=>rr,adminUsersUpdate:()=>tr,deactivateCreate:()=>sr,userConversionPairsList:()=>or,userConversionPairsRetrieve:()=>ir,userConversionsCreate:()=>pr,userConversionsList:()=>ar,userConversionsPartialUpdate:()=>lr,userConversionsRetrieve:()=>dr,userConversionsUpdate:()=>cr,userCurrenciesList:()=>ur,userCurrenciesRetrieve:()=>yr,userRatesList:()=>hr,userRatesRetrieve:()=>mr,userRatesSnapshotRetrieve:()=>fr,userRatesSnapshotsList:()=>wr,userSettingsPartialUpdate:()=>Rr,userSettingsRetrieve:()=>Or,userSettingsUpdate:()=>gr,webhookCreate:()=>Cr});var q={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Tr=Object.entries(ie);var M=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:a,sseSleepFn:d,url:f,...u})=>{let s,O=_nullishCoalesce(d, () => ((C=>new Promise(c=>setTimeout(c,C)))));return{stream:async function*(){let C=_nullishCoalesce(l, () => (3e3)),c=0,w=_nullishCoalesce(u.signal, () => (new AbortController().signal));for(;!w.aborted;){c++;let v=u.headers instanceof Headers?u.headers:new Headers(u.headers);s!==void 0&&v.set("Last-Event-ID",s);try{let A={redirect:"follow",...u,body:u.serializedBody,headers:v,signal:w},b=new Request(f,A);e&&(b=await e(f,A));let y=await(_nullishCoalesce(u.fetch, () => (globalThis.fetch)))(b);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let m=y.body.pipeThrough(new TextDecoderStream).getReader(),h="",_=()=>{try{m.cancel()}catch (e2){}};w.addEventListener("abort",_);try{for(;;){let{done:re,value:ne}=await m.read();if(re)break;h+=ne,h=h.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let $=v.split(`
3
+ `);let $=h.split(`
4
4
 
5
- `);v=_nullishCoalesce($.pop(), () => (""));for(let te of $){let se=te.split(`
6
- `),P=[],N;for(let w of se)if(w.startsWith("data:"))P.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))N=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))m=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let V=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(c=V)}let b,H=!1;if(P.length){let w=P.join(`
7
- `);try{b=JSON.parse(w),H=!0}catch (e3){b=w}}H&&(o&&await o(b),i&&(b=await i(b))),_optionalChain([n, 'optionalCall', _2 => _2({data:b,event:N,id:m,retry:c})]),P.length&&(yield b)}}}finally{C.removeEventListener("abort",_),f.releaseLock()}break}catch(A){if(_optionalChain([r, 'optionalCall', _3 => _3(A)]),p!==void 0&&R>=p)break;let g=Math.min(c*2**(R-1),_nullishCoalesce(a, () => (3e4)));await x(g)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},pe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},de=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:e,explode:r,name:n,style:i,value:o})=>{if(!r){let a=(e?o:o.map(d=>encodeURIComponent(d))).join(pe(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${n}=${a}`;case"simple":return a;default:return`${n}=${a}`}}let l=ae(i),p=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):T({allowReserved:e,name:n,value:a})).join(l);return i==="label"||i==="matrix"?l+p:p},T=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},I=({allowReserved:e,explode:r,name:n,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${n}=${o.toISOString()}`;if(i!=="deepObject"&&!r){let d=[];Object.entries(o).forEach(([s,m])=>{d=[...d,s,e?m:encodeURIComponent(m)]});let u=d.join(",");switch(i){case"form":return`${n}=${u}`;case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;default:return u}}let p=de(i),a=Object.entries(o).map(([d,u])=>T({allowReserved:e,name:i==="deepObject"?`${n}[${d}]`:d,value:u})).join(p);return i==="label"||i==="matrix"?p+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let n=r,i=r.match(le);if(i)for(let o of i){let l=!1,p=o.substring(1,o.length-1),a="simple";p.endsWith("*")&&(l=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),a="label"):p.startsWith(";")&&(p=p.substring(1),a="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){n=n.replace(o,z({explode:l,name:p,style:a,value:d}));continue}if(typeof d=="object"){n=n.replace(o,I({explode:l,name:p,style:a,value:d,valueOnly:!0}));continue}if(a==="matrix"){n=n.replace(o,`;${T({name:p,value:d})}`);continue}let u=encodeURIComponent(a==="label"?`.${d}`:d);n=n.replace(o,u)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,p=(_nullishCoalesce(e, () => ("")))+l;r&&(p=ce({path:r,url:p}));let a=n?i(n):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(p+=`?${a}`),p};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let p=i[l];if(p==null)continue;let a=e[l]||r;if(Array.isArray(p)){let d=z({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:p,...a.array});d&&o.push(d)}else if(typeof p=="object"){let d=I({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:p,...a.object});d&&o.push(d)}else{let d=T({allowReserved:a.allowReserved,name:l,value:p});d&&o.push(d)}}return o.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let n of e){if(ue(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let o=_nullishCoalesce(n.name, () => ("Authorization"));switch(n.in){case"query":r.query||(r.query={}),r.query[o]=i;break;case"cookie":r.headers.append("Cookie",`${o}=${i}`);break;case"header":default:r.headers.set(o,i);break}}},K=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),W=(e,r)=>{let n={...e,...r};return _optionalChain([n, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=j(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},j=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[o,l]of i)if(l===null)r.delete(o);else if(Array.isArray(l))for(let p of l)r.append(o,p);else l!==void 0&&r.set(o,typeof l=="object"?JSON.stringify(l):l)}return r},U=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new U,request:new U,response:new U}),he=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},k=(e={})=>({...q,headers:me,parseAs:"auto",querySerializer:he,...e});var S=(e={})=>{let r=W(k(),e),n=()=>({...r}),i=u=>(r=W(r,u),n()),o=ee(),l=async u=>{let s={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,u.headers),serializedBody:void 0};s.security&&await Z({...s,security:s.security}),s.requestValidator&&await s.requestValidator(s),s.body!==void 0&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),(s.body===void 0||s.serializedBody==="")&&s.headers.delete("Content-Type");let m=K(s);return{opts:s,url:m}},p=async u=>{let{opts:s,url:m}=await l(u),x={redirect:"follow",...s,body:L(s)},O=new Request(m,x);for(let h of o.request.fns)h&&(O=await h(O,s));let D=s.fetch,c;try{c=await D(O)}catch(h){let y=h;for(let f of o.error.fns)f&&(y=await f(h,void 0,O,s));if(y=y||{},s.throwOnError)throw y;return s.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let h of o.response.fns)h&&(c=await h(c,O,s));let R={request:O,response:c};if(c.ok){let h=_nullishCoalesce((s.parseAs==="auto"?Y(c.headers.get("Content-Type")):s.parseAs), () => ("json"));if(c.status===204||c.headers.get("Content-Length")==="0"){let f;switch(h){case"arrayBuffer":case"blob":case"text":f=await c[h]();break;case"formData":f=new FormData;break;case"stream":f=c.body;break;case"json":default:f={};break}return s.responseStyle==="data"?f:{data:f,...R}}let y;switch(h){case"arrayBuffer":case"blob":case"formData":case"text":y=await c[h]();break;case"json":{let f=await c.text();y=f?JSON.parse(f):{};break}case"stream":return s.responseStyle==="data"?c.body:{data:c.body,...R}}return h==="json"&&(s.responseValidator&&await s.responseValidator(y),s.responseTransformer&&(y=await s.responseTransformer(y))),s.responseStyle==="data"?y:{data:y,...R}}let C=await c.text(),E;try{E=JSON.parse(C)}catch (e4){}let A=_nullishCoalesce(E, () => (C)),g=A;for(let h of o.error.fns)h&&(g=await h(A,c,O,s));if(g=g||{},s.throwOnError)throw g;return s.responseStyle==="data"?void 0:{error:g,...R}},a=u=>s=>p({...s,method:u}),d=u=>async s=>{let{opts:m,url:x}=await l(s);return M({...m,body:m.body,headers:m.headers,method:u,onRequest:async(O,D)=>{let c=new Request(O,D);for(let R of o.request.fns)R&&(c=await R(c,m));return c},serializedBody:L(m),url:x})};return{buildUrl:K,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:n,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:p,setConfig:i,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:a("TRACE")}};var t=S(k({baseUrl:"https://conversion.services.rehive.com/api/"}));var fe=e=>(_nullishCoalesce(e.client, () => (t))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (t))).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),We=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),Be=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Ye=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (t))).get({querySerializer:{parameters:{display_currency__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),nr=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(_nullishCoalesce(e.client, () => (t))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/{identifier}/",...e}),ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e}),pr=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e}),lr=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cr=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (t))).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/",...e}),yr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/{code}/",...e}),hr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/",...e}),mr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/{identifier}/",...e}),fr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshot/",...e}),Rr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _35 => _35.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshots/",...e}),Or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e}),wr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _38 => _38.headers])}}),gr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _40 => _40.headers])}}),Cr=e=>(_nullishCoalesce(e.client, () => (t))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ar(e){let r=S(_chunkGR5TETAUjs.c.call(void 0, e,"https://conversion.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, B,r)}exports.createConversionApi = Ar;
5
+ `);h=_nullishCoalesce($.pop(), () => (""));for(let te of $){let se=te.split(`
6
+ `),P=[],N;for(let g of se)if(g.startsWith("data:"))P.push(g.replace(/^data:\s*/,""));else if(g.startsWith("event:"))N=g.replace(/^event:\s*/,"");else if(g.startsWith("id:"))s=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let V=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(C=V)}let T,H=!1;if(P.length){let g=P.join(`
7
+ `);try{T=JSON.parse(g),H=!0}catch (e3){T=g}}H&&(o&&await o(T),i&&(T=await i(T))),_optionalChain([n, 'optionalCall', _2 => _2({data:T,event:N,id:s,retry:C})]),P.length&&(yield T)}}}finally{w.removeEventListener("abort",_),m.releaseLock()}break}catch(A){if(_optionalChain([r, 'optionalCall', _3 => _3(A)]),p!==void 0&&c>=p)break;let b=Math.min(C*2**(c-1),_nullishCoalesce(a, () => (3e4)));await O(b)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},pe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},de=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:e,explode:r,name:n,style:i,value:o})=>{if(!r){let a=(e?o:o.map(d=>encodeURIComponent(d))).join(pe(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${n}=${a}`;case"simple":return a;default:return`${n}=${a}`}}let l=ae(i),p=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):E({allowReserved:e,name:n,value:a})).join(l);return i==="label"||i==="matrix"?l+p:p},E=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},I=({allowReserved:e,explode:r,name:n,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${n}=${o.toISOString()}`;if(i!=="deepObject"&&!r){let d=[];Object.entries(o).forEach(([u,s])=>{d=[...d,u,e?s:encodeURIComponent(s)]});let f=d.join(",");switch(i){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}let p=de(i),a=Object.entries(o).map(([d,f])=>E({allowReserved:e,name:i==="deepObject"?`${n}[${d}]`:d,value:f})).join(p);return i==="label"||i==="matrix"?p+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let n=r,i=r.match(le);if(i)for(let o of i){let l=!1,p=o.substring(1,o.length-1),a="simple";p.endsWith("*")&&(l=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),a="label"):p.startsWith(";")&&(p=p.substring(1),a="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){n=n.replace(o,z({explode:l,name:p,style:a,value:d}));continue}if(typeof d=="object"){n=n.replace(o,I({explode:l,name:p,style:a,value:d,valueOnly:!0}));continue}if(a==="matrix"){n=n.replace(o,`;${E({name:p,value:d})}`);continue}let f=encodeURIComponent(a==="label"?`.${d}`:d);n=n.replace(o,f)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,p=(_nullishCoalesce(e, () => ("")))+l;r&&(p=ce({path:r,url:p}));let a=n?i(n):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(p+=`?${a}`),p};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let p=i[l];if(p==null)continue;let a=e[l]||r;if(Array.isArray(p)){let d=z({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:p,...a.array});d&&o.push(d)}else if(typeof p=="object"){let d=I({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:p,...a.object});d&&o.push(d)}else{let d=E({allowReserved:a.allowReserved,name:l,value:p});d&&o.push(d)}}return o.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let n of e){if(ue(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let o=_nullishCoalesce(n.name, () => ("Authorization"));switch(n.in){case"query":r.query||(r.query={}),r.query[o]=i;break;case"cookie":r.headers.append("Cookie",`${o}=${i}`);break;case"header":default:r.headers.set(o,i);break}}},K=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),W=(e,r)=>{let n={...e,...r};return _optionalChain([n, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=j(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},j=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[o,l]of i)if(l===null)r.delete(o);else if(Array.isArray(l))for(let p of l)r.append(o,p);else l!==void 0&&r.set(o,typeof l=="object"?JSON.stringify(l):l)}return r},U=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new U,request:new U,response:new U}),he=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},k=(e={})=>({...q,headers:me,parseAs:"auto",querySerializer:he,...e});var S=(e={})=>{let r=W(k(),e),n=()=>({...r}),i=u=>(r=W(r,u),n()),o=ee(),l=async u=>{let s={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,u.headers),serializedBody:void 0};s.security&&await Z({...s,security:s.security}),s.requestValidator&&await s.requestValidator(s),s.body!==void 0&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),(s.body===void 0||s.serializedBody==="")&&s.headers.delete("Content-Type");let O=K(s);return{opts:s,url:O}},p=async u=>{let{opts:s,url:O}=await l(u),D={redirect:"follow",...s,body:L(s)},R=new Request(O,D);for(let y of o.request.fns)y&&(R=await y(R,s));let C=s.fetch,c;try{c=await C(R)}catch(y){let m=y;for(let h of o.error.fns)h&&(m=await h(y,void 0,R,s));if(m=m||{},s.throwOnError)throw m;return s.responseStyle==="data"?void 0:{error:m,request:R,response:void 0}}for(let y of o.response.fns)y&&(c=await y(c,R,s));let w={request:R,response:c};if(c.ok){let y=_nullishCoalesce((s.parseAs==="auto"?Y(c.headers.get("Content-Type")):s.parseAs), () => ("json"));if(c.status===204||c.headers.get("Content-Length")==="0"){let h;switch(y){case"arrayBuffer":case"blob":case"text":h=await c[y]();break;case"formData":h=new FormData;break;case"stream":h=c.body;break;case"json":default:h={};break}return s.responseStyle==="data"?h:{data:h,...w}}let m;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":m=await c[y]();break;case"json":{let h=await c.text();m=h?JSON.parse(h):{};break}case"stream":return s.responseStyle==="data"?c.body:{data:c.body,...w}}return y==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),s.responseStyle==="data"?m:{data:m,...w}}let v=await c.text(),A;try{A=JSON.parse(v)}catch (e4){}let b=_nullishCoalesce(A, () => (v)),x=b;for(let y of o.error.fns)y&&(x=await y(b,c,R,s));if(x=x||{},s.throwOnError)throw x;return s.responseStyle==="data"?void 0:{error:x,...w}},a=u=>s=>p({...s,method:u}),d=u=>async s=>{let{opts:O,url:D}=await l(s);return M({...O,body:O.body,headers:O.headers,method:u,onRequest:async(R,C)=>{let c=new Request(R,C);for(let w of o.request.fns)w&&(c=await w(c,O));return c},serializedBody:L(O),url:D})};return{buildUrl:u=>K({...r,...u}),connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:n,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:p,setConfig:i,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:a("TRACE")}};var t=S(k({baseUrl:"https://conversion.services.rehive.com/api/"}));var fe=e=>(_nullishCoalesce(e.client, () => (t))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (t))).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),We=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),Be=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(e.client, () => (t))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Ye=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (t))).get({querySerializer:{parameters:{display_currency__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),nr=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(_nullishCoalesce(e.client, () => (t))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/{identifier}/",...e}),ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e}),pr=e=>(_nullishCoalesce(e.client, () => (t))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e}),lr=e=>(_nullishCoalesce(e.client, () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cr=e=>(_nullishCoalesce(e.client, () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (t))).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/",...e}),yr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/{code}/",...e}),hr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (t))).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/",...e}),mr=e=>(_nullishCoalesce(e.client, () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/{identifier}/",...e}),fr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshot/",...e}),wr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _35 => _35.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshots/",...e}),Or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (t))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e}),Rr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (t))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _38 => _38.headers])}}),gr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (t))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _40 => _40.headers])}}),Cr=e=>(_nullishCoalesce(e.client, () => (t))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ar(e){let r=S(_chunkGR5TETAUjs.c.call(void 0, e,"https://conversion.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, B,r)}exports.createConversionApi = Ar;
@@ -1,7 +1,7 @@
1
- import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var B={};oe(B,{activateCreate:()=>fe,adminCompanyPartialUpdate:()=>Oe,adminCompanyRetrieve:()=>Re,adminCompanyUpdate:()=>we,adminConversionPairsCreate:()=>Ce,adminConversionPairsDestroy:()=>Ae,adminConversionPairsList:()=>ge,adminConversionPairsPartialUpdate:()=>Te,adminConversionPairsRetrieve:()=>be,adminConversionPairsUpdate:()=>xe,adminConversionsCreate:()=>ve,adminConversionsList:()=>Ee,adminConversionsPartialUpdate:()=>ke,adminConversionsRetrieve:()=>Ue,adminConversionsUpdate:()=>Se,adminCurrenciesCreate:()=>Pe,adminCurrenciesList:()=>De,adminCurrenciesPartialUpdate:()=>Ie,adminCurrenciesRetrieve:()=>ze,adminCurrenciesUpdate:()=>je,adminIntegrationsCreate:()=>Le,adminIntegrationsDestroy:()=>Ke,adminIntegrationsList:()=>qe,adminIntegrationsPartialUpdate:()=>Be,adminIntegrationsRetrieve:()=>We,adminIntegrationsUpdate:()=>_e,adminIntegrationsWebhooksCreate:()=>Ne,adminIntegrationsWebhooksDestroy:()=>He,adminIntegrationsWebhooksList:()=>$e,adminIntegrationsWebhooksPartialUpdate:()=>Fe,adminIntegrationsWebhooksRetrieve:()=>Ve,adminIntegrationsWebhooksUpdate:()=>Je,adminRatePairsCreate:()=>Qe,adminRatePairsDestroy:()=>Ge,adminRatePairsList:()=>Me,adminRatePairsPartialUpdate:()=>Ye,adminRatePairsRetrieve:()=>Xe,adminRatePairsUpdate:()=>Ze,adminUsersList:()=>er,adminUsersPartialUpdate:()=>nr,adminUsersRetrieve:()=>rr,adminUsersUpdate:()=>tr,deactivateCreate:()=>sr,userConversionPairsList:()=>or,userConversionPairsRetrieve:()=>ir,userConversionsCreate:()=>pr,userConversionsList:()=>ar,userConversionsPartialUpdate:()=>lr,userConversionsRetrieve:()=>dr,userConversionsUpdate:()=>cr,userCurrenciesList:()=>ur,userCurrenciesRetrieve:()=>yr,userRatesList:()=>hr,userRatesRetrieve:()=>mr,userRatesSnapshotRetrieve:()=>fr,userRatesSnapshotsList:()=>Rr,userSettingsPartialUpdate:()=>wr,userSettingsRetrieve:()=>Or,userSettingsUpdate:()=>gr,webhookCreate:()=>Cr});var q={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Tr=Object.entries(ie);var M=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:a,sseSleepFn:d,url:u,...s})=>{let m,x=d??(c=>new Promise(R=>setTimeout(R,c)));return{stream:async function*(){let c=l??3e3,R=0,C=s.signal??new AbortController().signal;for(;!C.aborted;){R++;let E=s.headers instanceof Headers?s.headers:new Headers(s.headers);m!==void 0&&E.set("Last-Event-ID",m);try{let A={redirect:"follow",...s,body:s.serializedBody,headers:E,signal:C},g=new Request(u,A);e&&(g=await e(u,A));let y=await(s.fetch??globalThis.fetch)(g);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let f=y.body.pipeThrough(new TextDecoderStream).getReader(),v="",_=()=>{try{f.cancel()}catch{}};C.addEventListener("abort",_);try{for(;;){let{done:re,value:ne}=await f.read();if(re)break;v+=ne,v=v.replace(/\r\n/g,`
1
+ import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var B={};oe(B,{activateCreate:()=>fe,adminCompanyPartialUpdate:()=>Oe,adminCompanyRetrieve:()=>we,adminCompanyUpdate:()=>Re,adminConversionPairsCreate:()=>Ce,adminConversionPairsDestroy:()=>Ae,adminConversionPairsList:()=>ge,adminConversionPairsPartialUpdate:()=>Te,adminConversionPairsRetrieve:()=>be,adminConversionPairsUpdate:()=>xe,adminConversionsCreate:()=>ve,adminConversionsList:()=>Ee,adminConversionsPartialUpdate:()=>ke,adminConversionsRetrieve:()=>Ue,adminConversionsUpdate:()=>Se,adminCurrenciesCreate:()=>Pe,adminCurrenciesList:()=>De,adminCurrenciesPartialUpdate:()=>Ie,adminCurrenciesRetrieve:()=>ze,adminCurrenciesUpdate:()=>je,adminIntegrationsCreate:()=>Le,adminIntegrationsDestroy:()=>Ke,adminIntegrationsList:()=>qe,adminIntegrationsPartialUpdate:()=>Be,adminIntegrationsRetrieve:()=>We,adminIntegrationsUpdate:()=>_e,adminIntegrationsWebhooksCreate:()=>Ne,adminIntegrationsWebhooksDestroy:()=>He,adminIntegrationsWebhooksList:()=>$e,adminIntegrationsWebhooksPartialUpdate:()=>Fe,adminIntegrationsWebhooksRetrieve:()=>Ve,adminIntegrationsWebhooksUpdate:()=>Je,adminRatePairsCreate:()=>Qe,adminRatePairsDestroy:()=>Ge,adminRatePairsList:()=>Me,adminRatePairsPartialUpdate:()=>Ye,adminRatePairsRetrieve:()=>Xe,adminRatePairsUpdate:()=>Ze,adminUsersList:()=>er,adminUsersPartialUpdate:()=>nr,adminUsersRetrieve:()=>rr,adminUsersUpdate:()=>tr,deactivateCreate:()=>sr,userConversionPairsList:()=>or,userConversionPairsRetrieve:()=>ir,userConversionsCreate:()=>pr,userConversionsList:()=>ar,userConversionsPartialUpdate:()=>lr,userConversionsRetrieve:()=>dr,userConversionsUpdate:()=>cr,userCurrenciesList:()=>ur,userCurrenciesRetrieve:()=>yr,userRatesList:()=>hr,userRatesRetrieve:()=>mr,userRatesSnapshotRetrieve:()=>fr,userRatesSnapshotsList:()=>wr,userSettingsPartialUpdate:()=>Rr,userSettingsRetrieve:()=>Or,userSettingsUpdate:()=>gr,webhookCreate:()=>Cr});var q={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Tr=Object.entries(ie);var M=({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:a,sseSleepFn:d,url:f,...u})=>{let s,O=d??(C=>new Promise(c=>setTimeout(c,C)));return{stream:async function*(){let C=l??3e3,c=0,w=u.signal??new AbortController().signal;for(;!w.aborted;){c++;let v=u.headers instanceof Headers?u.headers:new Headers(u.headers);s!==void 0&&v.set("Last-Event-ID",s);try{let A={redirect:"follow",...u,body:u.serializedBody,headers:v,signal:w},b=new Request(f,A);e&&(b=await e(f,A));let y=await(u.fetch??globalThis.fetch)(b);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let m=y.body.pipeThrough(new TextDecoderStream).getReader(),h="",_=()=>{try{m.cancel()}catch{}};w.addEventListener("abort",_);try{for(;;){let{done:re,value:ne}=await m.read();if(re)break;h+=ne,h=h.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let $=v.split(`
3
+ `);let $=h.split(`
4
4
 
5
- `);v=$.pop()??"";for(let te of $){let se=te.split(`
6
- `),P=[],N;for(let w of se)if(w.startsWith("data:"))P.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))N=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))m=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let V=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(c=V)}let b,H=!1;if(P.length){let w=P.join(`
7
- `);try{b=JSON.parse(w),H=!0}catch{b=w}}H&&(o&&await o(b),i&&(b=await i(b))),n?.({data:b,event:N,id:m,retry:c}),P.length&&(yield b)}}}finally{C.removeEventListener("abort",_),f.releaseLock()}break}catch(A){if(r?.(A),p!==void 0&&R>=p)break;let g=Math.min(c*2**(R-1),a??3e4);await x(g)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},pe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},de=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:e,explode:r,name:n,style:i,value:o})=>{if(!r){let a=(e?o:o.map(d=>encodeURIComponent(d))).join(pe(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${n}=${a}`;case"simple":return a;default:return`${n}=${a}`}}let l=ae(i),p=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):T({allowReserved:e,name:n,value:a})).join(l);return i==="label"||i==="matrix"?l+p:p},T=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},I=({allowReserved:e,explode:r,name:n,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${n}=${o.toISOString()}`;if(i!=="deepObject"&&!r){let d=[];Object.entries(o).forEach(([s,m])=>{d=[...d,s,e?m:encodeURIComponent(m)]});let u=d.join(",");switch(i){case"form":return`${n}=${u}`;case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;default:return u}}let p=de(i),a=Object.entries(o).map(([d,u])=>T({allowReserved:e,name:i==="deepObject"?`${n}[${d}]`:d,value:u})).join(p);return i==="label"||i==="matrix"?p+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let n=r,i=r.match(le);if(i)for(let o of i){let l=!1,p=o.substring(1,o.length-1),a="simple";p.endsWith("*")&&(l=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),a="label"):p.startsWith(";")&&(p=p.substring(1),a="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){n=n.replace(o,z({explode:l,name:p,style:a,value:d}));continue}if(typeof d=="object"){n=n.replace(o,I({explode:l,name:p,style:a,value:d,valueOnly:!0}));continue}if(a==="matrix"){n=n.replace(o,`;${T({name:p,value:d})}`);continue}let u=encodeURIComponent(a==="label"?`.${d}`:d);n=n.replace(o,u)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,p=(e??"")+l;r&&(p=ce({path:r,url:p}));let a=n?i(n):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(p+=`?${a}`),p};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let p=i[l];if(p==null)continue;let a=e[l]||r;if(Array.isArray(p)){let d=z({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:p,...a.array});d&&o.push(d)}else if(typeof p=="object"){let d=I({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:p,...a.object});d&&o.push(d)}else{let d=T({allowReserved:a.allowReserved,name:l,value:p});d&&o.push(d)}}return o.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(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let n of e){if(ue(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let o=n.name??"Authorization";switch(n.in){case"query":r.query||(r.query={}),r.query[o]=i;break;case"cookie":r.headers.append("Cookie",`${o}=${i}`);break;case"header":default:r.headers.set(o,i);break}}},K=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),W=(e,r)=>{let n={...e,...r};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=j(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},j=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[o,l]of i)if(l===null)r.delete(o);else if(Array.isArray(l))for(let p of l)r.append(o,p);else l!==void 0&&r.set(o,typeof l=="object"?JSON.stringify(l):l)}return r},U=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new U,request:new U,response:new U}),he=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},k=(e={})=>({...q,headers:me,parseAs:"auto",querySerializer:he,...e});var S=(e={})=>{let r=W(k(),e),n=()=>({...r}),i=u=>(r=W(r,u),n()),o=ee(),l=async u=>{let s={...r,...u,fetch:u.fetch??r.fetch??globalThis.fetch,headers:j(r.headers,u.headers),serializedBody:void 0};s.security&&await Z({...s,security:s.security}),s.requestValidator&&await s.requestValidator(s),s.body!==void 0&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),(s.body===void 0||s.serializedBody==="")&&s.headers.delete("Content-Type");let m=K(s);return{opts:s,url:m}},p=async u=>{let{opts:s,url:m}=await l(u),x={redirect:"follow",...s,body:L(s)},O=new Request(m,x);for(let h of o.request.fns)h&&(O=await h(O,s));let D=s.fetch,c;try{c=await D(O)}catch(h){let y=h;for(let f of o.error.fns)f&&(y=await f(h,void 0,O,s));if(y=y||{},s.throwOnError)throw y;return s.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let h of o.response.fns)h&&(c=await h(c,O,s));let R={request:O,response:c};if(c.ok){let h=(s.parseAs==="auto"?Y(c.headers.get("Content-Type")):s.parseAs)??"json";if(c.status===204||c.headers.get("Content-Length")==="0"){let f;switch(h){case"arrayBuffer":case"blob":case"text":f=await c[h]();break;case"formData":f=new FormData;break;case"stream":f=c.body;break;case"json":default:f={};break}return s.responseStyle==="data"?f:{data:f,...R}}let y;switch(h){case"arrayBuffer":case"blob":case"formData":case"text":y=await c[h]();break;case"json":{let f=await c.text();y=f?JSON.parse(f):{};break}case"stream":return s.responseStyle==="data"?c.body:{data:c.body,...R}}return h==="json"&&(s.responseValidator&&await s.responseValidator(y),s.responseTransformer&&(y=await s.responseTransformer(y))),s.responseStyle==="data"?y:{data:y,...R}}let C=await c.text(),E;try{E=JSON.parse(C)}catch{}let A=E??C,g=A;for(let h of o.error.fns)h&&(g=await h(A,c,O,s));if(g=g||{},s.throwOnError)throw g;return s.responseStyle==="data"?void 0:{error:g,...R}},a=u=>s=>p({...s,method:u}),d=u=>async s=>{let{opts:m,url:x}=await l(s);return M({...m,body:m.body,headers:m.headers,method:u,onRequest:async(O,D)=>{let c=new Request(O,D);for(let R of o.request.fns)R&&(c=await R(c,m));return c},serializedBody:L(m),url:x})};return{buildUrl:K,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:n,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:p,setConfig:i,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:a("TRACE")}};var t=S(k({baseUrl:"https://conversion.services.rehive.com/api/"}));var fe=e=>(e.client??t).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Oe=e=>(e?.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),we=e=>(e?.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e}),Ce=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),be=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),Te=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e}),ve=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e}),ke=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??t).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Pe=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Ie=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e}),Le=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),We=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),Be=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e}),Ne=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Ve=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Fe=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e}),Qe=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Xe=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Ye=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(e?.client??t).get({querySerializer:{parameters:{display_currency__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),rr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),nr=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(e.client??t).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/",...e}),ir=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/{identifier}/",...e}),ar=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e}),pr=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e}),lr=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cr=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(e?.client??t).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/",...e}),yr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/{code}/",...e}),hr=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/",...e}),mr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/{identifier}/",...e}),fr=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshot/",...e}),Rr=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshots/",...e}),Or=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e}),wr=e=>(e?.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),gr=e=>(e?.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Cr=e=>(e.client??t).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ar(e){let r=S(J(e,"https://conversion.services.rehive.com/api/"));return F(B,r)}export{Ar as createConversionApi};
5
+ `);h=$.pop()??"";for(let te of $){let se=te.split(`
6
+ `),P=[],N;for(let g of se)if(g.startsWith("data:"))P.push(g.replace(/^data:\s*/,""));else if(g.startsWith("event:"))N=g.replace(/^event:\s*/,"");else if(g.startsWith("id:"))s=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let V=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(C=V)}let T,H=!1;if(P.length){let g=P.join(`
7
+ `);try{T=JSON.parse(g),H=!0}catch{T=g}}H&&(o&&await o(T),i&&(T=await i(T))),n?.({data:T,event:N,id:s,retry:C}),P.length&&(yield T)}}}finally{w.removeEventListener("abort",_),m.releaseLock()}break}catch(A){if(r?.(A),p!==void 0&&c>=p)break;let b=Math.min(C*2**(c-1),a??3e4);await O(b)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},pe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},de=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=({allowReserved:e,explode:r,name:n,style:i,value:o})=>{if(!r){let a=(e?o:o.map(d=>encodeURIComponent(d))).join(pe(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${n}=${a}`;case"simple":return a;default:return`${n}=${a}`}}let l=ae(i),p=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):E({allowReserved:e,name:n,value:a})).join(l);return i==="label"||i==="matrix"?l+p:p},E=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},I=({allowReserved:e,explode:r,name:n,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${n}=${o.toISOString()}`;if(i!=="deepObject"&&!r){let d=[];Object.entries(o).forEach(([u,s])=>{d=[...d,u,e?s:encodeURIComponent(s)]});let f=d.join(",");switch(i){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}let p=de(i),a=Object.entries(o).map(([d,f])=>E({allowReserved:e,name:i==="deepObject"?`${n}[${d}]`:d,value:f})).join(p);return i==="label"||i==="matrix"?p+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let n=r,i=r.match(le);if(i)for(let o of i){let l=!1,p=o.substring(1,o.length-1),a="simple";p.endsWith("*")&&(l=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),a="label"):p.startsWith(";")&&(p=p.substring(1),a="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){n=n.replace(o,z({explode:l,name:p,style:a,value:d}));continue}if(typeof d=="object"){n=n.replace(o,I({explode:l,name:p,style:a,value:d,valueOnly:!0}));continue}if(a==="matrix"){n=n.replace(o,`;${E({name:p,value:d})}`);continue}let f=encodeURIComponent(a==="label"?`.${d}`:d);n=n.replace(o,f)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,p=(e??"")+l;r&&(p=ce({path:r,url:p}));let a=n?i(n):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(p+=`?${a}`),p};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let p=i[l];if(p==null)continue;let a=e[l]||r;if(Array.isArray(p)){let d=z({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:p,...a.array});d&&o.push(d)}else if(typeof p=="object"){let d=I({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:p,...a.object});d&&o.push(d)}else{let d=E({allowReserved:a.allowReserved,name:l,value:p});d&&o.push(d)}}return o.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(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let n of e){if(ue(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let o=n.name??"Authorization";switch(n.in){case"query":r.query||(r.query={}),r.query[o]=i;break;case"cookie":r.headers.append("Cookie",`${o}=${i}`);break;case"header":default:r.headers.set(o,i);break}}},K=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),W=(e,r)=>{let n={...e,...r};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=j(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},j=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[o,l]of i)if(l===null)r.delete(o);else if(Array.isArray(l))for(let p of l)r.append(o,p);else l!==void 0&&r.set(o,typeof l=="object"?JSON.stringify(l):l)}return r},U=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new U,request:new U,response:new U}),he=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},k=(e={})=>({...q,headers:me,parseAs:"auto",querySerializer:he,...e});var S=(e={})=>{let r=W(k(),e),n=()=>({...r}),i=u=>(r=W(r,u),n()),o=ee(),l=async u=>{let s={...r,...u,fetch:u.fetch??r.fetch??globalThis.fetch,headers:j(r.headers,u.headers),serializedBody:void 0};s.security&&await Z({...s,security:s.security}),s.requestValidator&&await s.requestValidator(s),s.body!==void 0&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),(s.body===void 0||s.serializedBody==="")&&s.headers.delete("Content-Type");let O=K(s);return{opts:s,url:O}},p=async u=>{let{opts:s,url:O}=await l(u),D={redirect:"follow",...s,body:L(s)},R=new Request(O,D);for(let y of o.request.fns)y&&(R=await y(R,s));let C=s.fetch,c;try{c=await C(R)}catch(y){let m=y;for(let h of o.error.fns)h&&(m=await h(y,void 0,R,s));if(m=m||{},s.throwOnError)throw m;return s.responseStyle==="data"?void 0:{error:m,request:R,response:void 0}}for(let y of o.response.fns)y&&(c=await y(c,R,s));let w={request:R,response:c};if(c.ok){let y=(s.parseAs==="auto"?Y(c.headers.get("Content-Type")):s.parseAs)??"json";if(c.status===204||c.headers.get("Content-Length")==="0"){let h;switch(y){case"arrayBuffer":case"blob":case"text":h=await c[y]();break;case"formData":h=new FormData;break;case"stream":h=c.body;break;case"json":default:h={};break}return s.responseStyle==="data"?h:{data:h,...w}}let m;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":m=await c[y]();break;case"json":{let h=await c.text();m=h?JSON.parse(h):{};break}case"stream":return s.responseStyle==="data"?c.body:{data:c.body,...w}}return y==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),s.responseStyle==="data"?m:{data:m,...w}}let v=await c.text(),A;try{A=JSON.parse(v)}catch{}let b=A??v,x=b;for(let y of o.error.fns)y&&(x=await y(b,c,R,s));if(x=x||{},s.throwOnError)throw x;return s.responseStyle==="data"?void 0:{error:x,...w}},a=u=>s=>p({...s,method:u}),d=u=>async s=>{let{opts:O,url:D}=await l(s);return M({...O,body:O.body,headers:O.headers,method:u,onRequest:async(R,C)=>{let c=new Request(R,C);for(let w of o.request.fns)w&&(c=await w(c,O));return c},serializedBody:L(O),url:D})};return{buildUrl:u=>K({...r,...u}),connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:n,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:p,setConfig:i,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:a("TRACE")}};var t=S(k({baseUrl:"https://conversion.services.rehive.com/api/"}));var fe=e=>(e.client??t).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Oe=e=>(e?.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Re=e=>(e?.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e}),Ce=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),be=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e}),Te=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversion-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e}),ve=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e}),ke=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??t).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Pe=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Ie=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e}),Le=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),We=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e}),Be=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e}),Ne=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{identifier}/webhooks/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Ve=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e}),Fe=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/integrations/{integration_id}/webhooks/{webhook_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e}),Qe=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e.client??t).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Xe=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e}),Ye=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rate-pairs/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(e?.client??t).get({querySerializer:{parameters:{display_currency__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),rr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e}),nr=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(e.client??t).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/",...e}),ir=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversion-pairs/{identifier}/",...e}),ar=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e}),pr=e=>(e.client??t).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e}),lr=e=>(e.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cr=e=>(e.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/conversions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ur=e=>(e?.client??t).get({querySerializer:{parameters:{code__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/",...e}),yr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/currencies/{code}/",...e}),hr=e=>(e?.client??t).get({querySerializer:{parameters:{key__in:{array:{explode:!1}}}},security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/",...e}),mr=e=>(e.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/{identifier}/",...e}),fr=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshot/",...e}),wr=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rates/snapshots/",...e}),Or=e=>(e?.client??t).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e}),Rr=e=>(e?.client??t).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),gr=e=>(e?.client??t).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/settings/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Cr=e=>(e.client??t).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ar(e){let r=S(J(e,"https://conversion.services.rehive.com/api/"));return F(B,r)}export{Ar as createConversionApi};
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
2
- import '../create-auth-CHzmb_8_.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-C-LEZku2.mjs';
2
+ import '../create-auth-DsnHpEf0.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: any) => any;
33
+ type BodySerializer = (body: unknown) => unknown;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
2
- import '../create-auth-CHzmb_8_.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-ebyTfhcm.js';
2
+ import '../create-auth-DsnHpEf0.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: any) => any;
33
+ type BodySerializer = (body: unknown) => unknown;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;