rehive 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/dist/admin.d.mts +15619 -15396
  2. package/dist/admin.d.ts +15619 -15396
  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-RKDIBDG6.js → chunk-7WQMKBQ6.js} +1 -1
  10. package/dist/{chunk-NFN3B6SG.mjs → chunk-CUQ6U73E.mjs} +1 -1
  11. package/dist/chunk-DRLSOKDI.js +7 -0
  12. package/dist/{chunk-53JJUQ4V.js → chunk-GR5TETAU.js} +1 -1
  13. package/dist/{chunk-QWQ6ZENI.js → chunk-JK4JOKBZ.js} +1 -1
  14. package/dist/chunk-KQ5BJOW2.mjs +1 -0
  15. package/dist/{chunk-V277OEVY.mjs → chunk-KUM3UI4C.mjs} +1 -1
  16. package/dist/{chunk-7WWCXCY2.mjs → chunk-S5UXBHRU.mjs} +1 -1
  17. package/dist/chunk-UMUOM4B2.mjs +7 -0
  18. package/dist/chunk-YRYX3G3E.js +1 -0
  19. package/dist/{create-api-client-BrsH1l8c.d.mts → create-api-client-2vNCP2LN.d.mts} +1 -1
  20. package/dist/{create-api-client-BMeX50D6.d.ts → create-api-client-D-Z8R83N.d.ts} +1 -1
  21. package/dist/{create-auth-UTklIOTc.d.mts → create-auth-CHzmb_8_.d.mts} +4846 -4616
  22. package/dist/{create-auth-UTklIOTc.d.ts → create-auth-CHzmb_8_.d.ts} +4846 -4616
  23. package/dist/extensions/alchemy.d.mts +3 -3
  24. package/dist/extensions/alchemy.d.ts +3 -3
  25. package/dist/extensions/alchemy.js +2 -2
  26. package/dist/extensions/alchemy.mjs +1 -1
  27. package/dist/extensions/app.d.mts +3 -3
  28. package/dist/extensions/app.d.ts +3 -3
  29. package/dist/extensions/app.js +2 -2
  30. package/dist/extensions/app.mjs +1 -1
  31. package/dist/extensions/billing.d.mts +3 -3
  32. package/dist/extensions/billing.d.ts +3 -3
  33. package/dist/extensions/billing.js +2 -2
  34. package/dist/extensions/billing.mjs +1 -1
  35. package/dist/extensions/bridge.d.mts +3 -3
  36. package/dist/extensions/bridge.d.ts +3 -3
  37. package/dist/extensions/bridge.js +2 -2
  38. package/dist/extensions/bridge.mjs +1 -1
  39. package/dist/extensions/builder.d.mts +3 -3
  40. package/dist/extensions/builder.d.ts +3 -3
  41. package/dist/extensions/builder.js +2 -2
  42. package/dist/extensions/builder.mjs +1 -1
  43. package/dist/extensions/business.d.mts +3 -3
  44. package/dist/extensions/business.d.ts +3 -3
  45. package/dist/extensions/business.js +2 -2
  46. package/dist/extensions/business.mjs +1 -1
  47. package/dist/extensions/conversion.d.mts +3 -3
  48. package/dist/extensions/conversion.d.ts +3 -3
  49. package/dist/extensions/conversion.js +2 -2
  50. package/dist/extensions/conversion.mjs +1 -1
  51. package/dist/extensions/mass-send.d.mts +3 -3
  52. package/dist/extensions/mass-send.d.ts +3 -3
  53. package/dist/extensions/mass-send.js +2 -2
  54. package/dist/extensions/mass-send.mjs +1 -1
  55. package/dist/extensions/notifications.d.mts +3 -3
  56. package/dist/extensions/notifications.d.ts +3 -3
  57. package/dist/extensions/notifications.js +2 -2
  58. package/dist/extensions/notifications.mjs +1 -1
  59. package/dist/extensions/payment-requests.d.mts +3 -3
  60. package/dist/extensions/payment-requests.d.ts +3 -3
  61. package/dist/extensions/payment-requests.js +2 -2
  62. package/dist/extensions/payment-requests.mjs +1 -1
  63. package/dist/extensions/products.d.mts +3 -3
  64. package/dist/extensions/products.d.ts +3 -3
  65. package/dist/extensions/products.js +2 -2
  66. package/dist/extensions/products.mjs +1 -1
  67. package/dist/extensions/rain.d.mts +3 -3
  68. package/dist/extensions/rain.d.ts +3 -3
  69. package/dist/extensions/rain.js +2 -2
  70. package/dist/extensions/rain.mjs +1 -1
  71. package/dist/extensions/rewards.d.mts +3 -3
  72. package/dist/extensions/rewards.d.ts +3 -3
  73. package/dist/extensions/rewards.js +2 -2
  74. package/dist/extensions/rewards.mjs +1 -1
  75. package/dist/extensions/stellar-testnet.d.mts +3 -3
  76. package/dist/extensions/stellar-testnet.d.ts +3 -3
  77. package/dist/extensions/stellar-testnet.js +2 -2
  78. package/dist/extensions/stellar-testnet.mjs +1 -1
  79. package/dist/extensions/stellar.d.mts +3 -3
  80. package/dist/extensions/stellar.d.ts +3 -3
  81. package/dist/extensions/stellar.js +2 -2
  82. package/dist/extensions/stellar.mjs +1 -1
  83. package/dist/index.d.mts +2 -2
  84. package/dist/index.d.ts +2 -2
  85. package/dist/index.js +1 -1
  86. package/dist/index.mjs +1 -1
  87. package/dist/react.d.mts +2 -2
  88. package/dist/react.d.ts +2 -2
  89. package/dist/react.js +1 -1
  90. package/dist/react.mjs +1 -1
  91. package/dist/user.d.mts +4 -4
  92. package/dist/user.d.ts +4 -4
  93. package/dist/user.js +1 -1
  94. package/dist/user.mjs +1 -1
  95. package/package.json +1 -1
  96. package/src/auth/create-auth.ts +7 -7
  97. package/src/extensions/alchemy/openapi-ts/client/types.gen.ts +1 -0
  98. package/src/extensions/app/openapi-ts/client/types.gen.ts +1 -0
  99. package/src/extensions/billing/openapi-ts/client/types.gen.ts +1 -0
  100. package/src/extensions/bridge/openapi-ts/client/types.gen.ts +1 -0
  101. package/src/extensions/builder/openapi-ts/client/types.gen.ts +1 -0
  102. package/src/extensions/business/openapi-ts/client/types.gen.ts +1 -0
  103. package/src/extensions/conversion/openapi-ts/client/types.gen.ts +1 -0
  104. package/src/extensions/mass-send/openapi-ts/client/types.gen.ts +1 -0
  105. package/src/extensions/notifications/openapi-ts/client/types.gen.ts +1 -0
  106. package/src/extensions/payment-requests/openapi-ts/client/types.gen.ts +1 -0
  107. package/src/extensions/products/openapi-ts/client/types.gen.ts +1 -0
  108. package/src/extensions/rain/openapi-ts/client/types.gen.ts +1 -0
  109. package/src/extensions/rewards/openapi-ts/client/types.gen.ts +1 -0
  110. package/src/extensions/stellar/openapi-ts/client/types.gen.ts +1 -0
  111. package/src/extensions/stellar-testnet/openapi-ts/client/types.gen.ts +1 -0
  112. package/src/platform/admin/openapi-ts/client/types.gen.ts +1 -0
  113. package/src/platform/admin/openapi-ts/index.ts +1 -1
  114. package/src/platform/admin/openapi-ts/sdk.gen.ts +14 -14
  115. package/src/platform/admin/openapi-ts/types.gen.ts +11181 -10946
  116. package/src/platform/user/openapi-ts/client/types.gen.ts +1 -0
  117. package/src/platform/user/openapi-ts/index.ts +1 -1
  118. package/src/platform/user/openapi-ts/sdk.gen.ts +3 -3
  119. package/src/platform/user/openapi-ts/types.gen.ts +7224 -6984
  120. package/src/shared/create-api-client.ts +1 -0
  121. package/dist/chunk-5MRX4DHT.js +0 -1
  122. package/dist/chunk-HF5XDXOU.mjs +0 -1
  123. package/dist/chunk-Q2ZX3WFY.mjs +0 -7
  124. package/dist/chunk-UYUMXTPF.js +0 -7
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BrsH1l8c.mjs';
2
- import '../create-auth-UTklIOTc.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
2
+ import '../create-auth-CHzmb_8_.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BMeX50D6.js';
2
- import '../create-auth-UTklIOTc.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
2
+ import '../create-auth-CHzmb_8_.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk53JJUQ4Vjs = require('../chunk-53JJUQ4V.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var K={};_chunkOEIQFP6Tjs.a.call(void 0, K,{activateCreate:()=>me,adminAddressesList:()=>Oe,adminAddressesRetrieve:()=>ge,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>Re,adminOnchainTransactionsList:()=>Te,adminOnchainTransactionsRetrieve:()=>Se,alchemyWebhookCreate:()=>Ae,deactivateCreate:()=>xe,userAccountAddressLookupCreate:()=>Ce,userAddressesCreate:()=>Ee,userAddressesList:()=>ke,userAddressesRetrieve:()=>ze,userOnchainTransactionsCancelCreate:()=>Pe,userOnchainTransactionsList:()=>De,userOnchainTransactionsPartialUpdate:()=>Ue,userOnchainTransactionsRetrieve:()=>qe,userOnchainTransactionsUpdate:()=>je,webhookCreate:()=>ve});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Le=Object.entries(ae);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:o,responseValidator:s,sseDefaultRetryDelay:p,sseMaxRetryAttempts:i,sseMaxRetryDelay:a,sseSleepFn:c,url:l,...n})=>{let h,x=_nullishCoalesce(c, () => ((d=>new Promise(O=>setTimeout(O,d)))));return{stream:async function*(){let d=_nullishCoalesce(p, () => (3e3)),O=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){O++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&C.set("Last-Event-ID",h);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},w=new Request(l,T);e&&(w=await e(l,T));let f=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(w);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let m=f.body.pipeThrough(new TextDecoderStream).getReader(),k="",N=()=>{try{m.cancel()}catch (e2){}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;k+=te,k=k.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 K={};_chunkOEIQFP6Tjs.a.call(void 0, K,{activateCreate:()=>me,adminAddressesList:()=>Oe,adminAddressesRetrieve:()=>ge,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>Re,adminOnchainTransactionsList:()=>Te,adminOnchainTransactionsRetrieve:()=>Se,alchemyWebhookCreate:()=>Ae,deactivateCreate:()=>xe,userAccountAddressLookupCreate:()=>Ce,userAddressesCreate:()=>Ee,userAddressesList:()=>ke,userAddressesRetrieve:()=>ze,userOnchainTransactionsCancelCreate:()=>Pe,userOnchainTransactionsList:()=>De,userOnchainTransactionsPartialUpdate:()=>Ue,userOnchainTransactionsRetrieve:()=>qe,userOnchainTransactionsUpdate:()=>je,webhookCreate:()=>ve});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Le=Object.entries(ae);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:o,responseValidator:s,sseDefaultRetryDelay:p,sseMaxRetryAttempts:i,sseMaxRetryDelay:a,sseSleepFn:c,url:l,...n})=>{let h,x=_nullishCoalesce(c, () => ((d=>new Promise(O=>setTimeout(O,d)))));return{stream:async function*(){let d=_nullishCoalesce(p, () => (3e3)),O=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){O++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&C.set("Last-Event-ID",h);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},w=new Request(l,T);e&&(w=await e(l,T));let f=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(w);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let m=f.body.pipeThrough(new TextDecoderStream).getReader(),k="",N=()=>{try{m.cancel()}catch (e2){}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;k+=te,k=k.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let W=k.split(`
4
4
 
5
5
  `);k=_nullishCoalesce(W.pop(), () => (""));for(let ne of W){let se=ne.split(`
6
6
  `),U=[],H;for(let b of se)if(b.startsWith("data:"))U.push(b.replace(/^data:\s*/,""));else if(b.startsWith("event:"))H=b.replace(/^event:\s*/,"");else if(b.startsWith("id:"))h=b.replace(/^id:\s*/,"");else if(b.startsWith("retry:")){let F=Number.parseInt(b.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(d=F)}let S,V=!1;if(U.length){let b=U.join(`
7
- `);try{S=JSON.parse(b),V=!0}catch (e3){S=b}}V&&(s&&await s(S),o&&(S=await o(S))),_optionalChain([t, 'optionalCall', _2 => _2({data:S,event:H,id:h,retry:d})]),U.length&&(yield S)}}}finally{R.removeEventListener("abort",N),m.releaseLock()}break}catch(T){if(_optionalChain([r, 'optionalCall', _3 => _3(T)]),i!==void 0&&O>=i)break;let w=Math.min(d*2**(O-1),_nullishCoalesce(a, () => (3e4)));await x(w)}}}()}};var ie=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},j=({allowReserved:e,explode:r,name:t,style:o,value:s})=>{if(!r){let a=(e?s:s.map(c=>encodeURIComponent(c))).join(ce(o));switch(o){case"label":return`.${a}`;case"matrix":return`;${t}=${a}`;case"simple":return a;default:return`${t}=${a}`}}let p=ie(o),i=s.map(a=>o==="label"||o==="simple"?e?a:encodeURIComponent(a):A({allowReserved:e,name:t,value:a})).join(p);return o==="label"||o==="matrix"?p+i:i},A=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},P=({allowReserved:e,explode:r,name:t,style:o,value:s,valueOnly:p})=>{if(s instanceof Date)return p?s.toISOString():`${t}=${s.toISOString()}`;if(o!=="deepObject"&&!r){let c=[];Object.entries(s).forEach(([n,h])=>{c=[...c,n,e?h:encodeURIComponent(h)]});let l=c.join(",");switch(o){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let i=pe(o),a=Object.entries(s).map(([c,l])=>A({allowReserved:e,name:o==="deepObject"?`${t}[${c}]`:c,value:l})).join(i);return o==="label"||o==="matrix"?i+a:a};var de=/\{[^{}]+\}/g,le=({path:e,url:r})=>{let t=r,o=r.match(de);if(o)for(let s of o){let p=!1,i=s.substring(1,s.length-1),a="simple";i.endsWith("*")&&(p=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),a="label"):i.startsWith(";")&&(i=i.substring(1),a="matrix");let c=e[i];if(c==null)continue;if(Array.isArray(c)){t=t.replace(s,j({explode:p,name:i,style:a,value:c}));continue}if(typeof c=="object"){t=t.replace(s,P({explode:p,name:i,style:a,value:c,valueOnly:!0}));continue}if(a==="matrix"){t=t.replace(s,`;${A({name:i,value:c})}`);continue}let l=encodeURIComponent(a==="label"?`.${c}`:c);t=t.replace(s,l)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:o,url:s})=>{let p=s.startsWith("/")?s:`/${s}`,i=(_nullishCoalesce(e, () => ("")))+p;r&&(i=le({path:r,url:i}));let a=t?o(t):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(i+=`?${a}`),i};function B(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>o=>{let s=[];if(o&&typeof o=="object")for(let p in o){let i=o[p];if(i==null)continue;let a=e[p]||r;if(Array.isArray(i)){let c=j({allowReserved:a.allowReserved,explode:!0,name:p,style:"form",value:i,...a.array});c&&s.push(c)}else if(typeof i=="object"){let c=P({allowReserved:a.allowReserved,explode:!0,name:p,style:"deepObject",value:i,...a.object});c&&s.push(c)}else{let c=A({allowReserved:a.allowReserved,name:p,value:i});c&&s.push(c)}}return s.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let o=await G(t,r.auth);if(!o)continue;let s=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[s]=o;break;case"cookie":r.headers.append("Cookie",`${s}=${o}`);break;case"header":default:r.headers.set(s,o);break}}},L=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),$=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,o)=>{r.push([o,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let o=t instanceof Headers?fe(t):Object.entries(t);for(let[s,p]of o)if(p===null)r.delete(s);else if(Array.isArray(p))for(let i of p)r.append(s,i);else p!==void 0&&r.set(s,typeof p=="object"?JSON.stringify(p):p)}return r},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let o=this.getInterceptorIndex(r);return this.fns[o]?(this.fns[o]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},z=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var D=(e={})=>{let r=$(z(),e),t=()=>({...r}),o=l=>(r=$(r,l),t()),s=ee(),p=async l=>{let n={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:v(r.headers,l.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let h=L(n);return{opts:n,url:h}},i=async l=>{let{opts:n,url:h}=await p(l),x={redirect:"follow",...n,body:B(n)},g=new Request(h,x);for(let y of s.request.fns)y&&(g=await y(g,n));let q=n.fetch,d;try{d=await q(g)}catch(y){let f=y;for(let m of s.error.fns)m&&(f=await m(y,void 0,g,n));if(f=f||{},n.throwOnError)throw f;return n.responseStyle==="data"?void 0:{error:f,request:g,response:void 0}}for(let y of s.response.fns)y&&(d=await y(d,g,n));let O={request:g,response:d};if(d.ok){let y=_nullishCoalesce((n.parseAs==="auto"?Y(d.headers.get("Content-Type")):n.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 n.responseStyle==="data"?m:{data:m,...O}}let f;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":f=await d[y]();break;case"json":{let m=await d.text();f=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?d.body:{data:d.body,...O}}return y==="json"&&(n.responseValidator&&await n.responseValidator(f),n.responseTransformer&&(f=await n.responseTransformer(f))),n.responseStyle==="data"?f:{data:f,...O}}let R=await d.text(),C;try{C=JSON.parse(R)}catch (e4){}let T=_nullishCoalesce(C, () => (R)),w=T;for(let y of s.error.fns)y&&(w=await y(T,d,g,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...O}},a=l=>n=>i({...n,method:l}),c=l=>async n=>{let{opts:h,url:x}=await p(n);return Q({...h,body:h.body,headers:h.headers,method:l,onRequest:async(g,q)=>{let d=new Request(g,q);for(let O of s.request.fns)O&&(d=await O(d,h));return d},serializedBody:B(h),url:x})};return{buildUrl:L,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:t,head:a("HEAD"),interceptors:s,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:i,setConfig:o,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:a("TRACE")}};var u=D(z({baseUrl:"https://alchemy.services.rehive.com/api/"}));var me=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/addresses/",...e}),ge=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/addresses/{identifier}/",...e}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (u))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _22 => _22.headers])}}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (u))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/onchain-transactions/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/onchain-transactions/{identifier}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/alchemy_webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (u))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/account-address-lookup/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/addresses/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (u))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/addresses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/addresses/{identifier}/",...e}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/",...e}),qe=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (u))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(e.client, () => (u))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(e.client, () => (u))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/cancel/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ie(e){let r=D(_chunk53JJUQ4Vjs.c.call(void 0, e,"https://alchemy.services.rehive.com/api/"));return _chunk53JJUQ4Vjs.a.call(void 0, K,r)}exports.createAlchemyApi = Ie;
7
+ `);try{S=JSON.parse(b),V=!0}catch (e3){S=b}}V&&(s&&await s(S),o&&(S=await o(S))),_optionalChain([t, 'optionalCall', _2 => _2({data:S,event:H,id:h,retry:d})]),U.length&&(yield S)}}}finally{R.removeEventListener("abort",N),m.releaseLock()}break}catch(T){if(_optionalChain([r, 'optionalCall', _3 => _3(T)]),i!==void 0&&O>=i)break;let w=Math.min(d*2**(O-1),_nullishCoalesce(a, () => (3e4)));await x(w)}}}()}};var ie=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},j=({allowReserved:e,explode:r,name:t,style:o,value:s})=>{if(!r){let a=(e?s:s.map(c=>encodeURIComponent(c))).join(ce(o));switch(o){case"label":return`.${a}`;case"matrix":return`;${t}=${a}`;case"simple":return a;default:return`${t}=${a}`}}let p=ie(o),i=s.map(a=>o==="label"||o==="simple"?e?a:encodeURIComponent(a):A({allowReserved:e,name:t,value:a})).join(p);return o==="label"||o==="matrix"?p+i:i},A=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},P=({allowReserved:e,explode:r,name:t,style:o,value:s,valueOnly:p})=>{if(s instanceof Date)return p?s.toISOString():`${t}=${s.toISOString()}`;if(o!=="deepObject"&&!r){let c=[];Object.entries(s).forEach(([n,h])=>{c=[...c,n,e?h:encodeURIComponent(h)]});let l=c.join(",");switch(o){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let i=pe(o),a=Object.entries(s).map(([c,l])=>A({allowReserved:e,name:o==="deepObject"?`${t}[${c}]`:c,value:l})).join(i);return o==="label"||o==="matrix"?i+a:a};var de=/\{[^{}]+\}/g,le=({path:e,url:r})=>{let t=r,o=r.match(de);if(o)for(let s of o){let p=!1,i=s.substring(1,s.length-1),a="simple";i.endsWith("*")&&(p=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),a="label"):i.startsWith(";")&&(i=i.substring(1),a="matrix");let c=e[i];if(c==null)continue;if(Array.isArray(c)){t=t.replace(s,j({explode:p,name:i,style:a,value:c}));continue}if(typeof c=="object"){t=t.replace(s,P({explode:p,name:i,style:a,value:c,valueOnly:!0}));continue}if(a==="matrix"){t=t.replace(s,`;${A({name:i,value:c})}`);continue}let l=encodeURIComponent(a==="label"?`.${c}`:c);t=t.replace(s,l)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:o,url:s})=>{let p=s.startsWith("/")?s:`/${s}`,i=(_nullishCoalesce(e, () => ("")))+p;r&&(i=le({path:r,url:i}));let a=t?o(t):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(i+=`?${a}`),i};function B(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>o=>{let s=[];if(o&&typeof o=="object")for(let p in o){let i=o[p];if(i==null)continue;let a=e[p]||r;if(Array.isArray(i)){let c=j({allowReserved:a.allowReserved,explode:!0,name:p,style:"form",value:i,...a.array});c&&s.push(c)}else if(typeof i=="object"){let c=P({allowReserved:a.allowReserved,explode:!0,name:p,style:"deepObject",value:i,...a.object});c&&s.push(c)}else{let c=A({allowReserved:a.allowReserved,name:p,value:i});c&&s.push(c)}}return s.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let o=await G(t,r.auth);if(!o)continue;let s=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[s]=o;break;case"cookie":r.headers.append("Cookie",`${s}=${o}`);break;case"header":default:r.headers.set(s,o);break}}},L=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),$=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,o)=>{r.push([o,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let o=t instanceof Headers?fe(t):Object.entries(t);for(let[s,p]of o)if(p===null)r.delete(s);else if(Array.isArray(p))for(let i of p)r.append(s,i);else p!==void 0&&r.set(s,typeof p=="object"?JSON.stringify(p):p)}return r},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let o=this.getInterceptorIndex(r);return this.fns[o]?(this.fns[o]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},z=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var D=(e={})=>{let r=$(z(),e),t=()=>({...r}),o=l=>(r=$(r,l),t()),s=ee(),p=async l=>{let n={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:v(r.headers,l.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let h=L(n);return{opts:n,url:h}},i=async l=>{let{opts:n,url:h}=await p(l),x={redirect:"follow",...n,body:B(n)},g=new Request(h,x);for(let y of s.request.fns)y&&(g=await y(g,n));let q=n.fetch,d;try{d=await q(g)}catch(y){let f=y;for(let m of s.error.fns)m&&(f=await m(y,void 0,g,n));if(f=f||{},n.throwOnError)throw f;return n.responseStyle==="data"?void 0:{error:f,request:g,response:void 0}}for(let y of s.response.fns)y&&(d=await y(d,g,n));let O={request:g,response:d};if(d.ok){let y=_nullishCoalesce((n.parseAs==="auto"?Y(d.headers.get("Content-Type")):n.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 n.responseStyle==="data"?m:{data:m,...O}}let f;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":f=await d[y]();break;case"json":{let m=await d.text();f=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?d.body:{data:d.body,...O}}return y==="json"&&(n.responseValidator&&await n.responseValidator(f),n.responseTransformer&&(f=await n.responseTransformer(f))),n.responseStyle==="data"?f:{data:f,...O}}let R=await d.text(),C;try{C=JSON.parse(R)}catch (e4){}let T=_nullishCoalesce(C, () => (R)),w=T;for(let y of s.error.fns)y&&(w=await y(T,d,g,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...O}},a=l=>n=>i({...n,method:l}),c=l=>async n=>{let{opts:h,url:x}=await p(n);return Q({...h,body:h.body,headers:h.headers,method:l,onRequest:async(g,q)=>{let d=new Request(g,q);for(let O of s.request.fns)O&&(d=await O(d,h));return d},serializedBody:B(h),url:x})};return{buildUrl:L,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:t,head:a("HEAD"),interceptors:s,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:i,setConfig:o,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:a("TRACE")}};var u=D(z({baseUrl:"https://alchemy.services.rehive.com/api/"}));var me=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/addresses/",...e}),ge=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/addresses/{identifier}/",...e}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (u))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _22 => _22.headers])}}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (u))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/onchain-transactions/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/onchain-transactions/{identifier}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/alchemy_webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (u))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/account-address-lookup/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/addresses/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (u))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/addresses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/addresses/{identifier}/",...e}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/",...e}),qe=e=>(_nullishCoalesce(e.client, () => (u))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (u))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(e.client, () => (u))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(e.client, () => (u))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/onchain-transactions/{identifier}/cancel/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (u))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ie(e){let r=D(_chunkGR5TETAUjs.c.call(void 0, e,"https://alchemy.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, K,r)}exports.createAlchemyApi = Ie;
@@ -1,4 +1,4 @@
1
- import{a as J,c as M}from"../chunk-7WWCXCY2.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var K={};oe(K,{activateCreate:()=>me,adminAddressesList:()=>Oe,adminAddressesRetrieve:()=>ge,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>Re,adminOnchainTransactionsList:()=>Te,adminOnchainTransactionsRetrieve:()=>Se,alchemyWebhookCreate:()=>Ae,deactivateCreate:()=>xe,userAccountAddressLookupCreate:()=>Ce,userAddressesCreate:()=>Ee,userAddressesList:()=>ke,userAddressesRetrieve:()=>ze,userOnchainTransactionsCancelCreate:()=>Pe,userOnchainTransactionsList:()=>De,userOnchainTransactionsPartialUpdate:()=>Ue,userOnchainTransactionsRetrieve:()=>qe,userOnchainTransactionsUpdate:()=>je,webhookCreate:()=>ve});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Le=Object.entries(ae);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:o,responseValidator:s,sseDefaultRetryDelay:p,sseMaxRetryAttempts:i,sseMaxRetryDelay:a,sseSleepFn:c,url:l,...n})=>{let h,x=c??(d=>new Promise(O=>setTimeout(O,d)));return{stream:async function*(){let d=p??3e3,O=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){O++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&C.set("Last-Event-ID",h);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},w=new Request(l,T);e&&(w=await e(l,T));let f=await(n.fetch??globalThis.fetch)(w);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let m=f.body.pipeThrough(new TextDecoderStream).getReader(),k="",N=()=>{try{m.cancel()}catch{}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;k+=te,k=k.replace(/\r\n/g,`
1
+ import{a as J,c as M}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var K={};oe(K,{activateCreate:()=>me,adminAddressesList:()=>Oe,adminAddressesRetrieve:()=>ge,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>Re,adminOnchainTransactionsList:()=>Te,adminOnchainTransactionsRetrieve:()=>Se,alchemyWebhookCreate:()=>Ae,deactivateCreate:()=>xe,userAccountAddressLookupCreate:()=>Ce,userAddressesCreate:()=>Ee,userAddressesList:()=>ke,userAddressesRetrieve:()=>ze,userOnchainTransactionsCancelCreate:()=>Pe,userOnchainTransactionsList:()=>De,userOnchainTransactionsPartialUpdate:()=>Ue,userOnchainTransactionsRetrieve:()=>qe,userOnchainTransactionsUpdate:()=>je,webhookCreate:()=>ve});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Le=Object.entries(ae);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:o,responseValidator:s,sseDefaultRetryDelay:p,sseMaxRetryAttempts:i,sseMaxRetryDelay:a,sseSleepFn:c,url:l,...n})=>{let h,x=c??(d=>new Promise(O=>setTimeout(O,d)));return{stream:async function*(){let d=p??3e3,O=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){O++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&C.set("Last-Event-ID",h);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},w=new Request(l,T);e&&(w=await e(l,T));let f=await(n.fetch??globalThis.fetch)(w);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let m=f.body.pipeThrough(new TextDecoderStream).getReader(),k="",N=()=>{try{m.cancel()}catch{}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;k+=te,k=k.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let W=k.split(`
4
4
 
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BrsH1l8c.mjs';
2
- import '../create-auth-UTklIOTc.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
2
+ import '../create-auth-CHzmb_8_.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BMeX50D6.js';
2
- import '../create-auth-UTklIOTc.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
2
+ import '../create-auth-CHzmb_8_.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk53JJUQ4Vjs = require('../chunk-53JJUQ4V.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var $={};_chunkOEIQFP6Tjs.a.call(void 0, $,{activateCreate:()=>he,adminAndroidAppsCreate:()=>Oe,adminAndroidAppsDestroy:()=>we,adminAndroidAppsList:()=>Ae,adminAndroidAppsPartialUpdate:()=>Re,adminAndroidAppsRetrieve:()=>be,adminAndroidAppsUpdate:()=>Te,adminAppCodebasesList:()=>ge,adminAppCodebasesRetrieve:()=>xe,adminCompanyPartialUpdate:()=>Ee,adminCompanyRetrieve:()=>Ce,adminCompanyUpdate:()=>De,adminDomainsCreate:()=>ke,adminDomainsDestroy:()=>ze,adminDomainsList:()=>Se,adminDomainsPartialUpdate:()=>Pe,adminDomainsRetrieve:()=>Ue,adminDomainsUpdate:()=>Le,adminIosAppsCreate:()=>je,adminIosAppsDestroy:()=>qe,adminIosAppsList:()=>ve,adminIosAppsPartialUpdate:()=>Ke,adminIosAppsRetrieve:()=>Ie,adminIosAppsUpdate:()=>Be,adminLocalesCreate:()=>Ne,adminLocalesDestroy:()=>He,adminLocalesList:()=>$e,adminLocalesPartialUpdate:()=>Fe,adminLocalesRetrieve:()=>Ve,adminLocalesUpdate:()=>Je,deactivateCreate:()=>Me,publicCompanyLocalesList:()=>We,publicCompanyLocalesRetrieve:()=>Qe,publicCompanyRetrieve:()=>_e,superadminAppCodebasesCreate:()=>Xe,superadminAppCodebasesDestroy:()=>Ye,superadminAppCodebasesList:()=>Ge,superadminAppCodebasesPartialUpdate:()=>er,superadminAppCodebasesRetrieve:()=>Ze,superadminAppCodebasesUpdate:()=>rr,userAndroidAppsList:()=>sr,userCompanyRetrieve:()=>ar,userIosAppsList:()=>ir,userLocalesList:()=>pr,userLocalesRetrieve:()=>dr,userPartialUpdate:()=>nr,userRetrieve:()=>tr,userUpdate:()=>or});var q={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(ae);var W=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:s,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:i,sseSleepFn:d,url:u,...n})=>{let f,C=_nullishCoalesce(d, () => ((c=>new Promise(A=>setTimeout(A,c)))));return{stream:async function*(){let c=_nullishCoalesce(l, () => (3e3)),A=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){A++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);f!==void 0&&E.set("Last-Event-ID",f);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:R},b=new Request(u,T);e&&(b=await e(u,T));let y=await(_nullishCoalesce(n.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 h=y.body.pipeThrough(new TextDecoderStream).getReader(),D="",N=()=>{try{h.cancel()}catch (e2){}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;D+=te,D=D.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 $={};_chunkOEIQFP6Tjs.a.call(void 0, $,{activateCreate:()=>he,adminAndroidAppsCreate:()=>Oe,adminAndroidAppsDestroy:()=>we,adminAndroidAppsList:()=>Ae,adminAndroidAppsPartialUpdate:()=>Re,adminAndroidAppsRetrieve:()=>be,adminAndroidAppsUpdate:()=>Te,adminAppCodebasesList:()=>ge,adminAppCodebasesRetrieve:()=>xe,adminCompanyPartialUpdate:()=>Ee,adminCompanyRetrieve:()=>Ce,adminCompanyUpdate:()=>De,adminDomainsCreate:()=>ke,adminDomainsDestroy:()=>ze,adminDomainsList:()=>Se,adminDomainsPartialUpdate:()=>Pe,adminDomainsRetrieve:()=>Ue,adminDomainsUpdate:()=>Le,adminIosAppsCreate:()=>je,adminIosAppsDestroy:()=>qe,adminIosAppsList:()=>ve,adminIosAppsPartialUpdate:()=>Ke,adminIosAppsRetrieve:()=>Ie,adminIosAppsUpdate:()=>Be,adminLocalesCreate:()=>Ne,adminLocalesDestroy:()=>He,adminLocalesList:()=>$e,adminLocalesPartialUpdate:()=>Fe,adminLocalesRetrieve:()=>Ve,adminLocalesUpdate:()=>Je,deactivateCreate:()=>Me,publicCompanyLocalesList:()=>We,publicCompanyLocalesRetrieve:()=>Qe,publicCompanyRetrieve:()=>_e,superadminAppCodebasesCreate:()=>Xe,superadminAppCodebasesDestroy:()=>Ye,superadminAppCodebasesList:()=>Ge,superadminAppCodebasesPartialUpdate:()=>er,superadminAppCodebasesRetrieve:()=>Ze,superadminAppCodebasesUpdate:()=>rr,userAndroidAppsList:()=>sr,userCompanyRetrieve:()=>ar,userIosAppsList:()=>ir,userLocalesList:()=>pr,userLocalesRetrieve:()=>dr,userPartialUpdate:()=>nr,userRetrieve:()=>tr,userUpdate:()=>or});var q={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(ae);var W=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:s,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:i,sseSleepFn:d,url:u,...n})=>{let f,C=_nullishCoalesce(d, () => ((c=>new Promise(A=>setTimeout(A,c)))));return{stream:async function*(){let c=_nullishCoalesce(l, () => (3e3)),A=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){A++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);f!==void 0&&E.set("Last-Event-ID",f);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:R},b=new Request(u,T);e&&(b=await e(u,T));let y=await(_nullishCoalesce(n.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 h=y.body.pipeThrough(new TextDecoderStream).getReader(),D="",N=()=>{try{h.cancel()}catch (e2){}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;D+=te,D=D.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let H=D.split(`
4
4
 
5
5
  `);D=_nullishCoalesce(H.pop(), () => (""));for(let ne of H){let oe=ne.split(`
6
6
  `),P=[],V;for(let w of oe)if(w.startsWith("data:"))P.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))V=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))f=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let J=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(J)||(c=J)}let g,F=!1;if(P.length){let w=P.join(`
7
- `);try{g=JSON.parse(w),F=!0}catch (e3){g=w}}F&&(s&&await s(g),a&&(g=await a(g))),_optionalChain([t, 'optionalCall', _2 => _2({data:g,event:V,id:f,retry:c})]),P.length&&(yield g)}}}finally{R.removeEventListener("abort",N),h.releaseLock()}break}catch(T){if(_optionalChain([r, 'optionalCall', _3 => _3(T)]),p!==void 0&&A>=p)break;let b=Math.min(c*2**(A-1),_nullishCoalesce(i, () => (3e4)));await C(b)}}}()}};var ie=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"&"}},L=({allowReserved:e,explode:r,name:t,style:a,value:s})=>{if(!r){let i=(e?s:s.map(d=>encodeURIComponent(d))).join(pe(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let l=ie(a),p=s.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):x({allowReserved:e,name:t,value:i})).join(l);return a==="label"||a==="matrix"?l+p:p},x=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:r,name:t,style:a,value:s,valueOnly:l})=>{if(s instanceof Date)return l?s.toISOString():`${t}=${s.toISOString()}`;if(a!=="deepObject"&&!r){let d=[];Object.entries(s).forEach(([n,f])=>{d=[...d,n,e?f:encodeURIComponent(f)]});let u=d.join(",");switch(a){case"form":return`${t}=${u}`;case"label":return`.${u}`;case"matrix":return`;${t}=${u}`;default:return u}}let p=de(a),i=Object.entries(s).map(([d,u])=>x({allowReserved:e,name:a==="deepObject"?`${t}[${d}]`:d,value:u})).join(p);return a==="label"||a==="matrix"?p+i:i};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,a=r.match(le);if(a)for(let s of a){let l=!1,p=s.substring(1,s.length-1),i="simple";p.endsWith("*")&&(l=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),i="label"):p.startsWith(";")&&(p=p.substring(1),i="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){t=t.replace(s,L({explode:l,name:p,style:i,value:d}));continue}if(typeof d=="object"){t=t.replace(s,v({explode:l,name:p,style:i,value:d,valueOnly:!0}));continue}if(i==="matrix"){t=t.replace(s,`;${x({name:p,value:d})}`);continue}let u=encodeURIComponent(i==="label"?`.${d}`:d);t=t.replace(s,u)}return t},Q=({baseUrl:e,path:r,query:t,querySerializer:a,url:s})=>{let l=s.startsWith("/")?s:`/${s}`,p=(_nullishCoalesce(e, () => ("")))+l;r&&(p=ce({path:r,url:p}));let i=t?a(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(p+=`?${i}`),p};function I(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>a=>{let s=[];if(a&&typeof a=="object")for(let l in a){let p=a[l];if(p==null)continue;let i=e[l]||r;if(Array.isArray(p)){let d=L({allowReserved:i.allowReserved,explode:!0,name:l,style:"form",value:p,...i.array});d&&s.push(d)}else if(typeof p=="object"){let d=v({allowReserved:i.allowReserved,explode:!0,name:l,style:"deepObject",value:p,...i.object});d&&s.push(d)}else{let d=x({allowReserved:i.allowReserved,name:l,value:p});d&&s.push(d)}}return s.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let a=await G(t,r.auth);if(!a)continue;let s=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[s]=a;break;case"cookie":r.headers.append("Cookie",`${s}=${a}`);break;case"header":default:r.headers.set(s,a);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}),B=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,r.headers),t},ye=e=>{let r=[];return e.forEach((t,a)=>{r.push([a,t])}),r},j=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let a=t instanceof Headers?ye(t):Object.entries(t);for(let[s,l]of a)if(l===null)r.delete(s);else if(Array.isArray(l))for(let p of l)r.append(s,p);else l!==void 0&&r.set(s,typeof l=="object"?JSON.stringify(l):l)}return r},S=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let a=this.getInterceptorIndex(r);return this.fns[a]?(this.fns[a]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new S,request:new S,response:new S}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fe={"Content-Type":"application/json"},k=(e={})=>({...q,headers:fe,parseAs:"auto",querySerializer:me,...e});var z=(e={})=>{let r=B(k(),e),t=()=>({...r}),a=u=>(r=B(r,u),t()),s=ee(),l=async u=>{let n={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,u.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let f=K(n);return{opts:n,url:f}},p=async u=>{let{opts:n,url:f}=await l(u),C={redirect:"follow",...n,body:I(n)},O=new Request(f,C);for(let m of s.request.fns)m&&(O=await m(O,n));let U=n.fetch,c;try{c=await U(O)}catch(m){let y=m;for(let h of s.error.fns)h&&(y=await h(m,void 0,O,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of s.response.fns)m&&(c=await m(c,O,n));let A={request:O,response:c};if(c.ok){let m=_nullishCoalesce((n.parseAs==="auto"?Y(c.headers.get("Content-Type")):n.parseAs), () => ("json"));if(c.status===204||c.headers.get("Content-Length")==="0"){let h;switch(m){case"arrayBuffer":case"blob":case"text":h=await c[m]();break;case"formData":h=new FormData;break;case"stream":h=c.body;break;case"json":default:h={};break}return n.responseStyle==="data"?h:{data:h,...A}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await c[m]();break;case"json":{let h=await c.text();y=h?JSON.parse(h):{};break}case"stream":return n.responseStyle==="data"?c.body:{data:c.body,...A}}return m==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...A}}let R=await c.text(),E;try{E=JSON.parse(R)}catch (e4){}let T=_nullishCoalesce(E, () => (R)),b=T;for(let m of s.error.fns)m&&(b=await m(T,c,O,n));if(b=b||{},n.throwOnError)throw b;return n.responseStyle==="data"?void 0:{error:b,...A}},i=u=>n=>p({...n,method:u}),d=u=>async n=>{let{opts:f,url:C}=await l(n);return W({...f,body:f.body,headers:f.headers,method:u,onRequest:async(O,U)=>{let c=new Request(O,U);for(let A of s.request.fns)A&&(c=await A(c,f));return c},serializedBody:I(f),url:C})};return{buildUrl:K,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:t,head:i("HEAD"),interceptors:s,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:p,setConfig:a,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:i("TRACE")}};var o=z(k({baseUrl:"https://app.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/app-codebases/",...e}),xe=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/app-codebases/{id}/",...e}),Ce=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _25 => _25.headers])}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/",...e}),je=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e}),Ke=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (o))).get({security:[{in:"cookie",name:"sessionid",type:"apiKey"},{scheme:"basic",type:"http"}],url:"/public/company/",...e}),We=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{in:"cookie",name:"sessionid",type:"apiKey"},{scheme:"basic",type:"http"}],url:"/public/company/{company_id}/locales/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{in:"cookie",name:"sessionid",type:"apiKey"},{scheme:"basic",type:"http"}],url:"/public/company/{company_id}/locales/{locale_id}/",...e}),Ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e}),er=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rr=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),nr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _33 => _33.headers])}}),or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _35 => _35.headers])}}),sr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/android-apps/",...e}),ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),ir=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/ios-apps/",...e}),pr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/locales/",...e}),dr=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/locales/{locale_id}/",...e});function lr(e){let r=z(_chunk53JJUQ4Vjs.c.call(void 0, e,"https://app.services.rehive.com/api/"));return _chunk53JJUQ4Vjs.a.call(void 0, $,r)}exports.createAppApi = lr;
7
+ `);try{g=JSON.parse(w),F=!0}catch (e3){g=w}}F&&(s&&await s(g),a&&(g=await a(g))),_optionalChain([t, 'optionalCall', _2 => _2({data:g,event:V,id:f,retry:c})]),P.length&&(yield g)}}}finally{R.removeEventListener("abort",N),h.releaseLock()}break}catch(T){if(_optionalChain([r, 'optionalCall', _3 => _3(T)]),p!==void 0&&A>=p)break;let b=Math.min(c*2**(A-1),_nullishCoalesce(i, () => (3e4)));await C(b)}}}()}};var ie=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"&"}},L=({allowReserved:e,explode:r,name:t,style:a,value:s})=>{if(!r){let i=(e?s:s.map(d=>encodeURIComponent(d))).join(pe(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let l=ie(a),p=s.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):x({allowReserved:e,name:t,value:i})).join(l);return a==="label"||a==="matrix"?l+p:p},x=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:r,name:t,style:a,value:s,valueOnly:l})=>{if(s instanceof Date)return l?s.toISOString():`${t}=${s.toISOString()}`;if(a!=="deepObject"&&!r){let d=[];Object.entries(s).forEach(([n,f])=>{d=[...d,n,e?f:encodeURIComponent(f)]});let u=d.join(",");switch(a){case"form":return`${t}=${u}`;case"label":return`.${u}`;case"matrix":return`;${t}=${u}`;default:return u}}let p=de(a),i=Object.entries(s).map(([d,u])=>x({allowReserved:e,name:a==="deepObject"?`${t}[${d}]`:d,value:u})).join(p);return a==="label"||a==="matrix"?p+i:i};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,a=r.match(le);if(a)for(let s of a){let l=!1,p=s.substring(1,s.length-1),i="simple";p.endsWith("*")&&(l=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),i="label"):p.startsWith(";")&&(p=p.substring(1),i="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){t=t.replace(s,L({explode:l,name:p,style:i,value:d}));continue}if(typeof d=="object"){t=t.replace(s,v({explode:l,name:p,style:i,value:d,valueOnly:!0}));continue}if(i==="matrix"){t=t.replace(s,`;${x({name:p,value:d})}`);continue}let u=encodeURIComponent(i==="label"?`.${d}`:d);t=t.replace(s,u)}return t},Q=({baseUrl:e,path:r,query:t,querySerializer:a,url:s})=>{let l=s.startsWith("/")?s:`/${s}`,p=(_nullishCoalesce(e, () => ("")))+l;r&&(p=ce({path:r,url:p}));let i=t?a(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(p+=`?${i}`),p};function I(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>a=>{let s=[];if(a&&typeof a=="object")for(let l in a){let p=a[l];if(p==null)continue;let i=e[l]||r;if(Array.isArray(p)){let d=L({allowReserved:i.allowReserved,explode:!0,name:l,style:"form",value:p,...i.array});d&&s.push(d)}else if(typeof p=="object"){let d=v({allowReserved:i.allowReserved,explode:!0,name:l,style:"deepObject",value:p,...i.object});d&&s.push(d)}else{let d=x({allowReserved:i.allowReserved,name:l,value:p});d&&s.push(d)}}return s.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let a=await G(t,r.auth);if(!a)continue;let s=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[s]=a;break;case"cookie":r.headers.append("Cookie",`${s}=${a}`);break;case"header":default:r.headers.set(s,a);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}),B=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,r.headers),t},ye=e=>{let r=[];return e.forEach((t,a)=>{r.push([a,t])}),r},j=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let a=t instanceof Headers?ye(t):Object.entries(t);for(let[s,l]of a)if(l===null)r.delete(s);else if(Array.isArray(l))for(let p of l)r.append(s,p);else l!==void 0&&r.set(s,typeof l=="object"?JSON.stringify(l):l)}return r},S=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let a=this.getInterceptorIndex(r);return this.fns[a]?(this.fns[a]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new S,request:new S,response:new S}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fe={"Content-Type":"application/json"},k=(e={})=>({...q,headers:fe,parseAs:"auto",querySerializer:me,...e});var z=(e={})=>{let r=B(k(),e),t=()=>({...r}),a=u=>(r=B(r,u),t()),s=ee(),l=async u=>{let n={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,u.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let f=K(n);return{opts:n,url:f}},p=async u=>{let{opts:n,url:f}=await l(u),C={redirect:"follow",...n,body:I(n)},O=new Request(f,C);for(let m of s.request.fns)m&&(O=await m(O,n));let U=n.fetch,c;try{c=await U(O)}catch(m){let y=m;for(let h of s.error.fns)h&&(y=await h(m,void 0,O,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of s.response.fns)m&&(c=await m(c,O,n));let A={request:O,response:c};if(c.ok){let m=_nullishCoalesce((n.parseAs==="auto"?Y(c.headers.get("Content-Type")):n.parseAs), () => ("json"));if(c.status===204||c.headers.get("Content-Length")==="0"){let h;switch(m){case"arrayBuffer":case"blob":case"text":h=await c[m]();break;case"formData":h=new FormData;break;case"stream":h=c.body;break;case"json":default:h={};break}return n.responseStyle==="data"?h:{data:h,...A}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await c[m]();break;case"json":{let h=await c.text();y=h?JSON.parse(h):{};break}case"stream":return n.responseStyle==="data"?c.body:{data:c.body,...A}}return m==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...A}}let R=await c.text(),E;try{E=JSON.parse(R)}catch (e4){}let T=_nullishCoalesce(E, () => (R)),b=T;for(let m of s.error.fns)m&&(b=await m(T,c,O,n));if(b=b||{},n.throwOnError)throw b;return n.responseStyle==="data"?void 0:{error:b,...A}},i=u=>n=>p({...n,method:u}),d=u=>async n=>{let{opts:f,url:C}=await l(n);return W({...f,body:f.body,headers:f.headers,method:u,onRequest:async(O,U)=>{let c=new Request(O,U);for(let A of s.request.fns)A&&(c=await A(c,f));return c},serializedBody:I(f),url:C})};return{buildUrl:K,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:t,head:i("HEAD"),interceptors:s,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:p,setConfig:a,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:i("TRACE")}};var o=z(k({baseUrl:"https://app.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/android-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/app-codebases/",...e}),xe=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/app-codebases/{id}/",...e}),Ce=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _25 => _25.headers])}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/domains/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/",...e}),je=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e}),Ke=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/ios-apps/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/locales/{locale_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(e.client, () => (o))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (o))).get({security:[{in:"cookie",name:"sessionid",type:"apiKey"},{scheme:"basic",type:"http"}],url:"/public/company/",...e}),We=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{in:"cookie",name:"sessionid",type:"apiKey"},{scheme:"basic",type:"http"}],url:"/public/company/{company_id}/locales/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{in:"cookie",name:"sessionid",type:"apiKey"},{scheme:"basic",type:"http"}],url:"/public/company/{company_id}/locales/{locale_id}/",...e}),Ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (o))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(e.client, () => (o))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e}),er=e=>(_nullishCoalesce(e.client, () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rr=e=>(_nullishCoalesce(e.client, () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/superadmin/app-codebases/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),nr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (o))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _33 => _33.headers])}}),or=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (o))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _35 => _35.headers])}}),sr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/android-apps/",...e}),ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),ir=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/ios-apps/",...e}),pr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/locales/",...e}),dr=e=>(_nullishCoalesce(e.client, () => (o))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/locales/{locale_id}/",...e});function lr(e){let r=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://app.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, $,r)}exports.createAppApi = lr;
@@ -1,4 +1,4 @@
1
- import{a as M,c as _}from"../chunk-7WWCXCY2.mjs";import{a as se}from"../chunk-S4QKN5WW.mjs";var $={};se($,{activateCreate:()=>he,adminAndroidAppsCreate:()=>Oe,adminAndroidAppsDestroy:()=>we,adminAndroidAppsList:()=>Ae,adminAndroidAppsPartialUpdate:()=>Re,adminAndroidAppsRetrieve:()=>be,adminAndroidAppsUpdate:()=>Te,adminAppCodebasesList:()=>ge,adminAppCodebasesRetrieve:()=>xe,adminCompanyPartialUpdate:()=>Ee,adminCompanyRetrieve:()=>Ce,adminCompanyUpdate:()=>De,adminDomainsCreate:()=>ke,adminDomainsDestroy:()=>ze,adminDomainsList:()=>Se,adminDomainsPartialUpdate:()=>Pe,adminDomainsRetrieve:()=>Ue,adminDomainsUpdate:()=>Le,adminIosAppsCreate:()=>je,adminIosAppsDestroy:()=>qe,adminIosAppsList:()=>ve,adminIosAppsPartialUpdate:()=>Ke,adminIosAppsRetrieve:()=>Ie,adminIosAppsUpdate:()=>Be,adminLocalesCreate:()=>Ne,adminLocalesDestroy:()=>He,adminLocalesList:()=>$e,adminLocalesPartialUpdate:()=>Fe,adminLocalesRetrieve:()=>Ve,adminLocalesUpdate:()=>Je,deactivateCreate:()=>Me,publicCompanyLocalesList:()=>We,publicCompanyLocalesRetrieve:()=>Qe,publicCompanyRetrieve:()=>_e,superadminAppCodebasesCreate:()=>Xe,superadminAppCodebasesDestroy:()=>Ye,superadminAppCodebasesList:()=>Ge,superadminAppCodebasesPartialUpdate:()=>er,superadminAppCodebasesRetrieve:()=>Ze,superadminAppCodebasesUpdate:()=>rr,userAndroidAppsList:()=>sr,userCompanyRetrieve:()=>ar,userIosAppsList:()=>ir,userLocalesList:()=>pr,userLocalesRetrieve:()=>dr,userPartialUpdate:()=>nr,userRetrieve:()=>tr,userUpdate:()=>or});var q={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(ae);var W=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:s,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:i,sseSleepFn:d,url:u,...n})=>{let f,C=d??(c=>new Promise(A=>setTimeout(A,c)));return{stream:async function*(){let c=l??3e3,A=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){A++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);f!==void 0&&E.set("Last-Event-ID",f);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:R},b=new Request(u,T);e&&(b=await e(u,T));let y=await(n.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 h=y.body.pipeThrough(new TextDecoderStream).getReader(),D="",N=()=>{try{h.cancel()}catch{}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;D+=te,D=D.replace(/\r\n/g,`
1
+ import{a as M,c as _}from"../chunk-S5UXBHRU.mjs";import{a as se}from"../chunk-S4QKN5WW.mjs";var $={};se($,{activateCreate:()=>he,adminAndroidAppsCreate:()=>Oe,adminAndroidAppsDestroy:()=>we,adminAndroidAppsList:()=>Ae,adminAndroidAppsPartialUpdate:()=>Re,adminAndroidAppsRetrieve:()=>be,adminAndroidAppsUpdate:()=>Te,adminAppCodebasesList:()=>ge,adminAppCodebasesRetrieve:()=>xe,adminCompanyPartialUpdate:()=>Ee,adminCompanyRetrieve:()=>Ce,adminCompanyUpdate:()=>De,adminDomainsCreate:()=>ke,adminDomainsDestroy:()=>ze,adminDomainsList:()=>Se,adminDomainsPartialUpdate:()=>Pe,adminDomainsRetrieve:()=>Ue,adminDomainsUpdate:()=>Le,adminIosAppsCreate:()=>je,adminIosAppsDestroy:()=>qe,adminIosAppsList:()=>ve,adminIosAppsPartialUpdate:()=>Ke,adminIosAppsRetrieve:()=>Ie,adminIosAppsUpdate:()=>Be,adminLocalesCreate:()=>Ne,adminLocalesDestroy:()=>He,adminLocalesList:()=>$e,adminLocalesPartialUpdate:()=>Fe,adminLocalesRetrieve:()=>Ve,adminLocalesUpdate:()=>Je,deactivateCreate:()=>Me,publicCompanyLocalesList:()=>We,publicCompanyLocalesRetrieve:()=>Qe,publicCompanyRetrieve:()=>_e,superadminAppCodebasesCreate:()=>Xe,superadminAppCodebasesDestroy:()=>Ye,superadminAppCodebasesList:()=>Ge,superadminAppCodebasesPartialUpdate:()=>er,superadminAppCodebasesRetrieve:()=>Ze,superadminAppCodebasesUpdate:()=>rr,userAndroidAppsList:()=>sr,userCompanyRetrieve:()=>ar,userIosAppsList:()=>ir,userLocalesList:()=>pr,userLocalesRetrieve:()=>dr,userPartialUpdate:()=>nr,userRetrieve:()=>tr,userUpdate:()=>or});var q={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(ae);var W=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:s,sseDefaultRetryDelay:l,sseMaxRetryAttempts:p,sseMaxRetryDelay:i,sseSleepFn:d,url:u,...n})=>{let f,C=d??(c=>new Promise(A=>setTimeout(A,c)));return{stream:async function*(){let c=l??3e3,A=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){A++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);f!==void 0&&E.set("Last-Event-ID",f);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:R},b=new Request(u,T);e&&(b=await e(u,T));let y=await(n.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 h=y.body.pipeThrough(new TextDecoderStream).getReader(),D="",N=()=>{try{h.cancel()}catch{}};R.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;D+=te,D=D.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let H=D.split(`
4
4
 
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BrsH1l8c.mjs';
2
- import '../create-auth-UTklIOTc.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
2
+ import '../create-auth-CHzmb_8_.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BMeX50D6.js';
2
- import '../create-auth-UTklIOTc.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
2
+ import '../create-auth-CHzmb_8_.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk53JJUQ4Vjs = require('../chunk-53JJUQ4V.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var N={};_chunkOEIQFP6Tjs.a.call(void 0, N,{activateCreate:()=>he,adminCheckoutSessionCreate:()=>be,adminCheckoutSessionRetrieve:()=>ge,adminCustomerPortalSessionCreate:()=>Se,adminPaymentMethodsRetrieve:()=>Oe,adminPlansList:()=>Re,adminProductsList:()=>we,adminSubscriptionRetrieve:()=>xe,deactivateCreate:()=>Ce,stripeWebhookCreate:()=>ke,userPublicKeyRetrieve:()=>Te,userSubscriptionRetrieve:()=>Ae,webhookCreate:()=>Ee});var B={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},qe=Object.entries(se);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:a,sseMaxRetryDelay:s,sseSleepFn:c,url:d,...n})=>{let y,k=_nullishCoalesce(c, () => ((p=>new Promise(b=>setTimeout(b,p)))));return{stream:async function*(){let p=_nullishCoalesce(l, () => (3e3)),b=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){b++;let T=n.headers instanceof Headers?n.headers:new Headers(n.headers);y!==void 0&&T.set("Last-Event-ID",y);try{let w={redirect:"follow",...n,body:n.serializedBody,headers:T,signal:R},O=new Request(d,w);e&&(O=await e(d,w));let u=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(O);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let m=u.body.pipeThrough(new TextDecoderStream).getReader(),A="",W=()=>{try{m.cancel()}catch (e2){}};R.addEventListener("abort",W);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;A+=te,A=A.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 N={};_chunkOEIQFP6Tjs.a.call(void 0, N,{activateCreate:()=>he,adminCheckoutSessionCreate:()=>be,adminCheckoutSessionRetrieve:()=>ge,adminCustomerPortalSessionCreate:()=>Se,adminPaymentMethodsRetrieve:()=>Oe,adminPlansList:()=>Re,adminProductsList:()=>we,adminSubscriptionRetrieve:()=>xe,deactivateCreate:()=>Ce,stripeWebhookCreate:()=>ke,userPublicKeyRetrieve:()=>Te,userSubscriptionRetrieve:()=>Ae,webhookCreate:()=>Ee});var B={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},qe=Object.entries(se);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:a,sseMaxRetryDelay:s,sseSleepFn:c,url:d,...n})=>{let y,k=_nullishCoalesce(c, () => ((p=>new Promise(b=>setTimeout(b,p)))));return{stream:async function*(){let p=_nullishCoalesce(l, () => (3e3)),b=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){b++;let T=n.headers instanceof Headers?n.headers:new Headers(n.headers);y!==void 0&&T.set("Last-Event-ID",y);try{let w={redirect:"follow",...n,body:n.serializedBody,headers:T,signal:R},O=new Request(d,w);e&&(O=await e(d,w));let u=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(O);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let m=u.body.pipeThrough(new TextDecoderStream).getReader(),A="",W=()=>{try{m.cancel()}catch (e2){}};R.addEventListener("abort",W);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;A+=te,A=A.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let H=A.split(`
4
4
 
5
5
  `);A=_nullishCoalesce(H.pop(), () => (""));for(let ne of H){let oe=ne.split(`
6
6
  `),D=[],L;for(let S of oe)if(S.startsWith("data:"))D.push(S.replace(/^data:\s*/,""));else if(S.startsWith("event:"))L=S.replace(/^event:\s*/,"");else if(S.startsWith("id:"))y=S.replace(/^id:\s*/,"");else if(S.startsWith("retry:")){let V=Number.parseInt(S.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(p=V)}let x,K=!1;if(D.length){let S=D.join(`
7
- `);try{x=JSON.parse(S),K=!0}catch (e3){x=S}}K&&(o&&await o(x),i&&(x=await i(x))),_optionalChain([t, 'optionalCall', _2 => _2({data:x,event:L,id:y,retry:p})]),D.length&&(yield x)}}}finally{R.removeEventListener("abort",W),m.releaseLock()}break}catch(w){if(_optionalChain([r, 'optionalCall', _3 => _3(w)]),a!==void 0&&b>=a)break;let O=Math.min(p*2**(b-1),_nullishCoalesce(s, () => (3e4)));await k(O)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},le=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},j=({allowReserved:e,explode:r,name:t,style:i,value:o})=>{if(!r){let s=(e?o:o.map(c=>encodeURIComponent(c))).join(ce(i));switch(i){case"label":return`.${s}`;case"matrix":return`;${t}=${s}`;case"simple":return s;default:return`${t}=${s}`}}let l=ae(i),a=o.map(s=>i==="label"||i==="simple"?e?s:encodeURIComponent(s):C({allowReserved:e,name:t,value:s})).join(l);return i==="label"||i==="matrix"?l+a:a},C=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:r,name:t,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${t}=${o.toISOString()}`;if(i!=="deepObject"&&!r){let c=[];Object.entries(o).forEach(([n,y])=>{c=[...c,n,e?y:encodeURIComponent(y)]});let d=c.join(",");switch(i){case"form":return`${t}=${d}`;case"label":return`.${d}`;case"matrix":return`;${t}=${d}`;default:return d}}let a=le(i),s=Object.entries(o).map(([c,d])=>C({allowReserved:e,name:i==="deepObject"?`${t}[${c}]`:c,value:d})).join(a);return i==="label"||i==="matrix"?a+s:s};var pe=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let t=r,i=r.match(pe);if(i)for(let o of i){let l=!1,a=o.substring(1,o.length-1),s="simple";a.endsWith("*")&&(l=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let c=e[a];if(c==null)continue;if(Array.isArray(c)){t=t.replace(o,j({explode:l,name:a,style:s,value:c}));continue}if(typeof c=="object"){t=t.replace(o,v({explode:l,name:a,style:s,value:c,valueOnly:!0}));continue}if(s==="matrix"){t=t.replace(o,`;${C({name:a,value:c})}`);continue}let d=encodeURIComponent(s==="label"?`.${c}`:c);t=t.replace(o,d)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,a=(_nullishCoalesce(e, () => ("")))+l;r&&(a=de({path:r,url:a}));let s=t?i(t):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a};function U(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let a=i[l];if(a==null)continue;let s=e[l]||r;if(Array.isArray(a)){let c=j({allowReserved:s.allowReserved,explode:!0,name:l,style:"form",value:a,...s.array});c&&o.push(c)}else if(typeof a=="object"){let c=v({allowReserved:s.allowReserved,explode:!0,name:l,style:"deepObject",value:a,...s.object});c&&o.push(c)}else{let c=C({allowReserved:s.allowReserved,name:l,value:a});c&&o.push(c)}}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(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let i=await G(t,r.auth);if(!i)continue;let o=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.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}}},$=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),M=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=I(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,i)=>{r.push([i,t])}),r},I=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let i=t instanceof Headers?fe(t):Object.entries(t);for(let[o,l]of i)if(l===null)r.delete(o);else if(Array.isArray(l))for(let a of l)r.append(o,a);else l!==void 0&&r.set(o,typeof l=="object"?JSON.stringify(l):l)}return r},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},z=(e={})=>({...B,headers:me,parseAs:"auto",querySerializer:ye,...e});var P=(e={})=>{let r=M(z(),e),t=()=>({...r}),i=d=>(r=M(r,d),t()),o=ee(),l=async d=>{let n={...r,...d,fetch:_nullishCoalesce(_nullishCoalesce(d.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:I(r.headers,d.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=$(n);return{opts:n,url:y}},a=async d=>{let{opts:n,url:y}=await l(d),k={redirect:"follow",...n,body:U(n)},g=new Request(y,k);for(let f of o.request.fns)f&&(g=await f(g,n));let q=n.fetch,p;try{p=await q(g)}catch(f){let u=f;for(let m of o.error.fns)m&&(u=await m(f,void 0,g,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:g,response:void 0}}for(let f of o.response.fns)f&&(p=await f(p,g,n));let b={request:g,response:p};if(p.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(p.headers.get("Content-Type")):n.parseAs), () => ("json"));if(p.status===204||p.headers.get("Content-Length")==="0"){let m;switch(f){case"arrayBuffer":case"blob":case"text":m=await p[f]();break;case"formData":m=new FormData;break;case"stream":m=p.body;break;case"json":default:m={};break}return n.responseStyle==="data"?m:{data:m,...b}}let u;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":u=await p[f]();break;case"json":{let m=await p.text();u=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?p.body:{data:p.body,...b}}return f==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.responseStyle==="data"?u:{data:u,...b}}let R=await p.text(),T;try{T=JSON.parse(R)}catch (e4){}let w=_nullishCoalesce(T, () => (R)),O=w;for(let f of o.error.fns)f&&(O=await f(w,p,g,n));if(O=O||{},n.throwOnError)throw O;return n.responseStyle==="data"?void 0:{error:O,...b}},s=d=>n=>a({...n,method:d}),c=d=>async n=>{let{opts:y,url:k}=await l(n);return Q({...y,body:y.body,headers:y.headers,method:d,onRequest:async(g,q)=>{let p=new Request(g,q);for(let b of o.request.fns)b&&(p=await b(p,y));return p},serializedBody:U(y),url:k})};return{buildUrl:$,connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:t,head:s("HEAD"),interceptors:o,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:a,setConfig:i,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:s("TRACE")}};var h=P(z({baseUrl:"https://billing.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (h))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/checkout-session/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _20 => _20.headers])}}),ge=e=>(_nullishCoalesce(e.client, () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/checkout-session/{session_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (h))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/customer-portal-session/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(e.client, () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment-methods/{payment_method_id}/",...e}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/plans/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/",...e}),xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/subscription/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/stripe/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/public-key/",...e}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/subscription/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function ze(e){let r=P(_chunk53JJUQ4Vjs.c.call(void 0, e,"https://billing.services.rehive.com/api/"));return _chunk53JJUQ4Vjs.a.call(void 0, N,r)}exports.createBillingApi = ze;
7
+ `);try{x=JSON.parse(S),K=!0}catch (e3){x=S}}K&&(o&&await o(x),i&&(x=await i(x))),_optionalChain([t, 'optionalCall', _2 => _2({data:x,event:L,id:y,retry:p})]),D.length&&(yield x)}}}finally{R.removeEventListener("abort",W),m.releaseLock()}break}catch(w){if(_optionalChain([r, 'optionalCall', _3 => _3(w)]),a!==void 0&&b>=a)break;let O=Math.min(p*2**(b-1),_nullishCoalesce(s, () => (3e4)));await k(O)}}}()}};var ae=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ce=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},le=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},j=({allowReserved:e,explode:r,name:t,style:i,value:o})=>{if(!r){let s=(e?o:o.map(c=>encodeURIComponent(c))).join(ce(i));switch(i){case"label":return`.${s}`;case"matrix":return`;${t}=${s}`;case"simple":return s;default:return`${t}=${s}`}}let l=ae(i),a=o.map(s=>i==="label"||i==="simple"?e?s:encodeURIComponent(s):C({allowReserved:e,name:t,value:s})).join(l);return i==="label"||i==="matrix"?l+a:a},C=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},v=({allowReserved:e,explode:r,name:t,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${t}=${o.toISOString()}`;if(i!=="deepObject"&&!r){let c=[];Object.entries(o).forEach(([n,y])=>{c=[...c,n,e?y:encodeURIComponent(y)]});let d=c.join(",");switch(i){case"form":return`${t}=${d}`;case"label":return`.${d}`;case"matrix":return`;${t}=${d}`;default:return d}}let a=le(i),s=Object.entries(o).map(([c,d])=>C({allowReserved:e,name:i==="deepObject"?`${t}[${c}]`:c,value:d})).join(a);return i==="label"||i==="matrix"?a+s:s};var pe=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let t=r,i=r.match(pe);if(i)for(let o of i){let l=!1,a=o.substring(1,o.length-1),s="simple";a.endsWith("*")&&(l=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let c=e[a];if(c==null)continue;if(Array.isArray(c)){t=t.replace(o,j({explode:l,name:a,style:s,value:c}));continue}if(typeof c=="object"){t=t.replace(o,v({explode:l,name:a,style:s,value:c,valueOnly:!0}));continue}if(s==="matrix"){t=t.replace(o,`;${C({name:a,value:c})}`);continue}let d=encodeURIComponent(s==="label"?`.${c}`:c);t=t.replace(o,d)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,a=(_nullishCoalesce(e, () => ("")))+l;r&&(a=de({path:r,url:a}));let s=t?i(t):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a};function U(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let a=i[l];if(a==null)continue;let s=e[l]||r;if(Array.isArray(a)){let c=j({allowReserved:s.allowReserved,explode:!0,name:l,style:"form",value:a,...s.array});c&&o.push(c)}else if(typeof a=="object"){let c=v({allowReserved:s.allowReserved,explode:!0,name:l,style:"deepObject",value:a,...s.object});c&&o.push(c)}else{let c=C({allowReserved:s.allowReserved,name:l,value:a});c&&o.push(c)}}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(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let i=await G(t,r.auth);if(!i)continue;let o=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.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}}},$=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),M=(e,r)=>{let t={...e,...r};return _optionalChain([t, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=I(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,i)=>{r.push([i,t])}),r},I=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let i=t instanceof Headers?fe(t):Object.entries(t);for(let[o,l]of i)if(l===null)r.delete(o);else if(Array.isArray(l))for(let a of l)r.append(o,a);else l!==void 0&&r.set(o,typeof l=="object"?JSON.stringify(l):l)}return r},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},z=(e={})=>({...B,headers:me,parseAs:"auto",querySerializer:ye,...e});var P=(e={})=>{let r=M(z(),e),t=()=>({...r}),i=d=>(r=M(r,d),t()),o=ee(),l=async d=>{let n={...r,...d,fetch:_nullishCoalesce(_nullishCoalesce(d.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:I(r.headers,d.headers),serializedBody:void 0};n.security&&await Z({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody==="")&&n.headers.delete("Content-Type");let y=$(n);return{opts:n,url:y}},a=async d=>{let{opts:n,url:y}=await l(d),k={redirect:"follow",...n,body:U(n)},g=new Request(y,k);for(let f of o.request.fns)f&&(g=await f(g,n));let q=n.fetch,p;try{p=await q(g)}catch(f){let u=f;for(let m of o.error.fns)m&&(u=await m(f,void 0,g,n));if(u=u||{},n.throwOnError)throw u;return n.responseStyle==="data"?void 0:{error:u,request:g,response:void 0}}for(let f of o.response.fns)f&&(p=await f(p,g,n));let b={request:g,response:p};if(p.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(p.headers.get("Content-Type")):n.parseAs), () => ("json"));if(p.status===204||p.headers.get("Content-Length")==="0"){let m;switch(f){case"arrayBuffer":case"blob":case"text":m=await p[f]();break;case"formData":m=new FormData;break;case"stream":m=p.body;break;case"json":default:m={};break}return n.responseStyle==="data"?m:{data:m,...b}}let u;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":u=await p[f]();break;case"json":{let m=await p.text();u=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?p.body:{data:p.body,...b}}return f==="json"&&(n.responseValidator&&await n.responseValidator(u),n.responseTransformer&&(u=await n.responseTransformer(u))),n.responseStyle==="data"?u:{data:u,...b}}let R=await p.text(),T;try{T=JSON.parse(R)}catch (e4){}let w=_nullishCoalesce(T, () => (R)),O=w;for(let f of o.error.fns)f&&(O=await f(w,p,g,n));if(O=O||{},n.throwOnError)throw O;return n.responseStyle==="data"?void 0:{error:O,...b}},s=d=>n=>a({...n,method:d}),c=d=>async n=>{let{opts:y,url:k}=await l(n);return Q({...y,body:y.body,headers:y.headers,method:d,onRequest:async(g,q)=>{let p=new Request(g,q);for(let b of o.request.fns)b&&(p=await b(p,y));return p},serializedBody:U(y),url:k})};return{buildUrl:$,connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:t,head:s("HEAD"),interceptors:o,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:a,setConfig:i,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:s("TRACE")}};var h=P(z({baseUrl:"https://billing.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (h))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/checkout-session/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _20 => _20.headers])}}),ge=e=>(_nullishCoalesce(e.client, () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/checkout-session/{session_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (h))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/customer-portal-session/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(e.client, () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/payment-methods/{payment_method_id}/",...e}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/plans/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/products/",...e}),xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/subscription/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/stripe/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/public-key/",...e}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (h))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/subscription/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (h))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function ze(e){let r=P(_chunkGR5TETAUjs.c.call(void 0, e,"https://billing.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, N,r)}exports.createBillingApi = ze;
@@ -1,4 +1,4 @@
1
- import{a as F,c as J}from"../chunk-7WWCXCY2.mjs";import{a as ie}from"../chunk-S4QKN5WW.mjs";var N={};ie(N,{activateCreate:()=>he,adminCheckoutSessionCreate:()=>be,adminCheckoutSessionRetrieve:()=>ge,adminCustomerPortalSessionCreate:()=>Se,adminPaymentMethodsRetrieve:()=>Oe,adminPlansList:()=>Re,adminProductsList:()=>we,adminSubscriptionRetrieve:()=>xe,deactivateCreate:()=>Ce,stripeWebhookCreate:()=>ke,userPublicKeyRetrieve:()=>Te,userSubscriptionRetrieve:()=>Ae,webhookCreate:()=>Ee});var B={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},qe=Object.entries(se);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:a,sseMaxRetryDelay:s,sseSleepFn:c,url:d,...n})=>{let y,k=c??(p=>new Promise(b=>setTimeout(b,p)));return{stream:async function*(){let p=l??3e3,b=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){b++;let T=n.headers instanceof Headers?n.headers:new Headers(n.headers);y!==void 0&&T.set("Last-Event-ID",y);try{let w={redirect:"follow",...n,body:n.serializedBody,headers:T,signal:R},O=new Request(d,w);e&&(O=await e(d,w));let u=await(n.fetch??globalThis.fetch)(O);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let m=u.body.pipeThrough(new TextDecoderStream).getReader(),A="",W=()=>{try{m.cancel()}catch{}};R.addEventListener("abort",W);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;A+=te,A=A.replace(/\r\n/g,`
1
+ import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as ie}from"../chunk-S4QKN5WW.mjs";var N={};ie(N,{activateCreate:()=>he,adminCheckoutSessionCreate:()=>be,adminCheckoutSessionRetrieve:()=>ge,adminCustomerPortalSessionCreate:()=>Se,adminPaymentMethodsRetrieve:()=>Oe,adminPlansList:()=>Re,adminProductsList:()=>we,adminSubscriptionRetrieve:()=>xe,deactivateCreate:()=>Ce,stripeWebhookCreate:()=>ke,userPublicKeyRetrieve:()=>Te,userSubscriptionRetrieve:()=>Ae,webhookCreate:()=>Ee});var B={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},qe=Object.entries(se);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:a,sseMaxRetryDelay:s,sseSleepFn:c,url:d,...n})=>{let y,k=c??(p=>new Promise(b=>setTimeout(b,p)));return{stream:async function*(){let p=l??3e3,b=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){b++;let T=n.headers instanceof Headers?n.headers:new Headers(n.headers);y!==void 0&&T.set("Last-Event-ID",y);try{let w={redirect:"follow",...n,body:n.serializedBody,headers:T,signal:R},O=new Request(d,w);e&&(O=await e(d,w));let u=await(n.fetch??globalThis.fetch)(O);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let m=u.body.pipeThrough(new TextDecoderStream).getReader(),A="",W=()=>{try{m.cancel()}catch{}};R.addEventListener("abort",W);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;A+=te,A=A.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `);let H=A.split(`
4
4
 
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BrsH1l8c.mjs';
2
- import '../create-auth-UTklIOTc.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-2vNCP2LN.mjs';
2
+ import '../create-auth-CHzmb_8_.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-BMeX50D6.js';
2
- import '../create-auth-UTklIOTc.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-D-Z8R83N.js';
2
+ import '../create-auth-CHzmb_8_.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -249,7 +249,7 @@ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<Reque
249
249
  interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
250
  responseStyle: TResponseStyle;
251
251
  throwOnError: ThrowOnError;
252
- }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
253
  /**
254
254
  * Any body that you want to add to your request.
255
255
  *