rehive 4.1.4 → 4.2.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 (162) hide show
  1. package/dist/admin.d.mts +43 -106
  2. package/dist/admin.d.ts +43 -106
  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-AVPKHYGS.js → chunk-7USVOK77.js} +5 -5
  10. package/dist/{chunk-X6YDNXYV.js → chunk-ERD2XKSM.js} +1 -1
  11. package/dist/chunk-G3M5QMRX.js +1 -0
  12. package/dist/chunk-HSPTEN45.mjs +1 -0
  13. package/dist/chunk-HWXE5WBF.js +7 -0
  14. package/dist/chunk-MUN3POSM.mjs +7 -0
  15. package/dist/{chunk-4WSHB6U6.mjs → chunk-PCR54D6A.mjs} +1 -1
  16. package/dist/chunk-ZUZHOLAX.mjs +7 -0
  17. package/dist/{create-api-client-ebyTfhcm.d.ts → create-api-client-ADSlg8HX.d.ts} +1 -1
  18. package/dist/{create-api-client-C-LEZku2.d.mts → create-api-client-B4Q01gHp.d.mts} +1 -1
  19. package/dist/{create-auth-DsnHpEf0.d.mts → create-auth-CT_IFt3T.d.mts} +53 -47
  20. package/dist/{create-auth-DsnHpEf0.d.ts → create-auth-CT_IFt3T.d.ts} +53 -47
  21. package/dist/extensions/alchemy.d.mts +3 -3
  22. package/dist/extensions/alchemy.d.ts +3 -3
  23. package/dist/extensions/alchemy.js +5 -5
  24. package/dist/extensions/alchemy.mjs +5 -5
  25. package/dist/extensions/app.d.mts +3 -3
  26. package/dist/extensions/app.d.ts +3 -3
  27. package/dist/extensions/app.js +5 -5
  28. package/dist/extensions/app.mjs +5 -5
  29. package/dist/extensions/billing.d.mts +3 -3
  30. package/dist/extensions/billing.d.ts +3 -3
  31. package/dist/extensions/billing.js +5 -5
  32. package/dist/extensions/billing.mjs +5 -5
  33. package/dist/extensions/bridge.d.mts +16 -190
  34. package/dist/extensions/bridge.d.ts +16 -190
  35. package/dist/extensions/bridge.js +5 -5
  36. package/dist/extensions/bridge.mjs +5 -5
  37. package/dist/extensions/builder.d.mts +3 -3
  38. package/dist/extensions/builder.d.ts +3 -3
  39. package/dist/extensions/builder.js +5 -5
  40. package/dist/extensions/builder.mjs +5 -5
  41. package/dist/extensions/business.d.mts +47 -82
  42. package/dist/extensions/business.d.ts +47 -82
  43. package/dist/extensions/business.js +5 -5
  44. package/dist/extensions/business.mjs +5 -5
  45. package/dist/extensions/conversion.d.mts +3 -3
  46. package/dist/extensions/conversion.d.ts +3 -3
  47. package/dist/extensions/conversion.js +5 -5
  48. package/dist/extensions/conversion.mjs +5 -5
  49. package/dist/extensions/mass-send.d.mts +3 -3
  50. package/dist/extensions/mass-send.d.ts +3 -3
  51. package/dist/extensions/mass-send.js +5 -5
  52. package/dist/extensions/mass-send.mjs +5 -5
  53. package/dist/extensions/notifications.d.mts +3 -3
  54. package/dist/extensions/notifications.d.ts +3 -3
  55. package/dist/extensions/notifications.js +5 -5
  56. package/dist/extensions/notifications.mjs +5 -5
  57. package/dist/extensions/payment-requests.d.mts +3 -7
  58. package/dist/extensions/payment-requests.d.ts +3 -7
  59. package/dist/extensions/payment-requests.js +5 -5
  60. package/dist/extensions/payment-requests.mjs +5 -5
  61. package/dist/extensions/products.d.mts +3 -3
  62. package/dist/extensions/products.d.ts +3 -3
  63. package/dist/extensions/products.js +5 -5
  64. package/dist/extensions/products.mjs +5 -5
  65. package/dist/extensions/rain.d.mts +3 -3
  66. package/dist/extensions/rain.d.ts +3 -3
  67. package/dist/extensions/rain.js +5 -5
  68. package/dist/extensions/rain.mjs +5 -5
  69. package/dist/extensions/rewards.d.mts +3 -3
  70. package/dist/extensions/rewards.d.ts +3 -3
  71. package/dist/extensions/rewards.js +5 -5
  72. package/dist/extensions/rewards.mjs +5 -5
  73. package/dist/extensions/stellar-testnet.d.mts +3 -3
  74. package/dist/extensions/stellar-testnet.d.ts +3 -3
  75. package/dist/extensions/stellar-testnet.js +5 -5
  76. package/dist/extensions/stellar-testnet.mjs +5 -5
  77. package/dist/extensions/stellar.d.mts +3 -3
  78. package/dist/extensions/stellar.d.ts +3 -3
  79. package/dist/extensions/stellar.js +5 -5
  80. package/dist/extensions/stellar.mjs +5 -5
  81. package/dist/index.d.mts +2 -2
  82. package/dist/index.d.ts +2 -2
  83. package/dist/index.js +1 -1
  84. package/dist/index.mjs +1 -1
  85. package/dist/react.d.mts +11 -3
  86. package/dist/react.d.ts +11 -3
  87. package/dist/react.js +1 -1
  88. package/dist/react.mjs +1 -1
  89. package/dist/user.d.mts +6 -16
  90. package/dist/user.d.ts +6 -16
  91. package/dist/user.js +1 -1
  92. package/dist/user.mjs +1 -1
  93. package/package.json +1 -1
  94. package/src/auth/create-auth.ts +773 -169
  95. package/src/auth/index.ts +25 -2
  96. package/src/auth/types/index.ts +48 -0
  97. package/src/extensions/alchemy/openapi-ts/client/client.gen.ts +3 -5
  98. package/src/extensions/alchemy/openapi-ts/core/bodySerializer.gen.ts +8 -6
  99. package/src/extensions/alchemy/openapi-ts/core/params.gen.ts +1 -1
  100. package/src/extensions/app/openapi-ts/client/client.gen.ts +3 -5
  101. package/src/extensions/app/openapi-ts/core/bodySerializer.gen.ts +8 -6
  102. package/src/extensions/app/openapi-ts/core/params.gen.ts +1 -1
  103. package/src/extensions/billing/openapi-ts/client/client.gen.ts +3 -5
  104. package/src/extensions/billing/openapi-ts/core/bodySerializer.gen.ts +8 -6
  105. package/src/extensions/billing/openapi-ts/core/params.gen.ts +1 -1
  106. package/src/extensions/bridge/openapi-ts/client/client.gen.ts +3 -5
  107. package/src/extensions/bridge/openapi-ts/core/bodySerializer.gen.ts +8 -6
  108. package/src/extensions/bridge/openapi-ts/core/params.gen.ts +1 -1
  109. package/src/extensions/bridge/openapi-ts/index.ts +2 -2
  110. package/src/extensions/bridge/openapi-ts/sdk.gen.ts +1 -43
  111. package/src/extensions/bridge/openapi-ts/types.gen.ts +11 -201
  112. package/src/extensions/builder/openapi-ts/client/client.gen.ts +3 -5
  113. package/src/extensions/builder/openapi-ts/core/bodySerializer.gen.ts +8 -6
  114. package/src/extensions/builder/openapi-ts/core/params.gen.ts +1 -1
  115. package/src/extensions/business/openapi-ts/client/client.gen.ts +3 -5
  116. package/src/extensions/business/openapi-ts/core/bodySerializer.gen.ts +8 -6
  117. package/src/extensions/business/openapi-ts/core/params.gen.ts +1 -1
  118. package/src/extensions/business/openapi-ts/types.gen.ts +44 -79
  119. package/src/extensions/conversion/openapi-ts/client/client.gen.ts +3 -5
  120. package/src/extensions/conversion/openapi-ts/core/bodySerializer.gen.ts +8 -6
  121. package/src/extensions/conversion/openapi-ts/core/params.gen.ts +1 -1
  122. package/src/extensions/mass-send/openapi-ts/client/client.gen.ts +3 -5
  123. package/src/extensions/mass-send/openapi-ts/core/bodySerializer.gen.ts +8 -6
  124. package/src/extensions/mass-send/openapi-ts/core/params.gen.ts +1 -1
  125. package/src/extensions/notifications/openapi-ts/client/client.gen.ts +3 -5
  126. package/src/extensions/notifications/openapi-ts/core/bodySerializer.gen.ts +8 -6
  127. package/src/extensions/notifications/openapi-ts/core/params.gen.ts +1 -1
  128. package/src/extensions/payment-requests/openapi-ts/client/client.gen.ts +3 -5
  129. package/src/extensions/payment-requests/openapi-ts/core/bodySerializer.gen.ts +8 -6
  130. package/src/extensions/payment-requests/openapi-ts/core/params.gen.ts +1 -1
  131. package/src/extensions/payment-requests/openapi-ts/types.gen.ts +0 -4
  132. package/src/extensions/products/openapi-ts/client/client.gen.ts +3 -5
  133. package/src/extensions/products/openapi-ts/core/bodySerializer.gen.ts +8 -6
  134. package/src/extensions/products/openapi-ts/core/params.gen.ts +1 -1
  135. package/src/extensions/rain/openapi-ts/client/client.gen.ts +3 -5
  136. package/src/extensions/rain/openapi-ts/core/bodySerializer.gen.ts +8 -6
  137. package/src/extensions/rain/openapi-ts/core/params.gen.ts +1 -1
  138. package/src/extensions/rewards/openapi-ts/client/client.gen.ts +3 -5
  139. package/src/extensions/rewards/openapi-ts/core/bodySerializer.gen.ts +8 -6
  140. package/src/extensions/rewards/openapi-ts/core/params.gen.ts +1 -1
  141. package/src/extensions/stellar/openapi-ts/client/client.gen.ts +3 -5
  142. package/src/extensions/stellar/openapi-ts/core/bodySerializer.gen.ts +8 -6
  143. package/src/extensions/stellar/openapi-ts/core/params.gen.ts +1 -1
  144. package/src/extensions/stellar-testnet/openapi-ts/client/client.gen.ts +3 -5
  145. package/src/extensions/stellar-testnet/openapi-ts/core/bodySerializer.gen.ts +8 -6
  146. package/src/extensions/stellar-testnet/openapi-ts/core/params.gen.ts +1 -1
  147. package/src/platform/admin/openapi-ts/client/client.gen.ts +3 -5
  148. package/src/platform/admin/openapi-ts/core/bodySerializer.gen.ts +8 -6
  149. package/src/platform/admin/openapi-ts/core/params.gen.ts +1 -1
  150. package/src/platform/admin/openapi-ts/sdk.gen.ts +10 -10
  151. package/src/platform/admin/openapi-ts/types.gen.ts +40 -103
  152. package/src/platform/user/openapi-ts/client/client.gen.ts +3 -5
  153. package/src/platform/user/openapi-ts/core/bodySerializer.gen.ts +8 -6
  154. package/src/platform/user/openapi-ts/core/params.gen.ts +1 -1
  155. package/src/platform/user/openapi-ts/index.ts +2 -2
  156. package/src/platform/user/openapi-ts/sdk.gen.ts +3 -29
  157. package/src/platform/user/openapi-ts/types.gen.ts +7 -54
  158. package/dist/chunk-KUT5NSX7.mjs +0 -7
  159. package/dist/chunk-KZWBOQHZ.mjs +0 -7
  160. package/dist/chunk-PE6PG7ZE.js +0 -1
  161. package/dist/chunk-UYYU5OJ4.js +0 -7
  162. package/dist/chunk-Z7BUNKND.mjs +0 -1
@@ -1,7 +1,7 @@
1
- import{a as J,c as M}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>me,adminCardsList:()=>Oe,adminCardsRetrieve:()=>we,adminCompanyPartialUpdate:()=>be,adminCompanyRetrieve:()=>Re,adminCompanyUpdate:()=>ge,adminCurrenciesList:()=>Ce,adminCurrenciesPartialUpdate:()=>Se,adminCurrenciesRetrieve:()=>xe,adminCurrenciesUpdate:()=>Te,deactivateCreate:()=>Ae,rainWebhookCreate:()=>Ee,userApplicationsCreate:()=>Pe,userApplicationsList:()=>De,userApplicationsRetrieve:()=>qe,userCardsCreate:()=>ve,userCardsDataRetrieve:()=>Be,userCardsList:()=>je,userCardsPinPartialUpdate:()=>$e,userCardsPinRetrieve:()=>Le,userCardsPinUpdate:()=>Ke,userCardsRetrieve:()=>Ie,userPartialUpdate:()=>Ue,userRetrieve:()=>ke,userUpdate:()=>ze,webhookCreate:()=>Ne});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ve=Object.entries(oe);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:s,sseDefaultRetryDelay:d,sseMaxRetryAttempts:i,sseMaxRetryDelay:o,sseSleepFn:p,url:m,...u})=>{let n,w=p??(g=>new Promise(l=>setTimeout(l,g)));return{stream:async function*(){let g=d??3e3,l=0,O=u.signal??new AbortController().signal;for(;!O.aborted;){l++;let E=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&E.set("Last-Event-ID",n);try{let C={redirect:"follow",...u,body:u.serializedBody,headers:E,signal:O},x=new Request(m,C);e&&(x=await e(m,C));let f=await(u.fetch??globalThis.fetch)(x);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let h=f.body.pipeThrough(new TextDecoderStream).getReader(),y="",N=()=>{try{h.cancel()}catch{}};O.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;y+=te,y=y.replace(/\r\n/g,`
1
+ import{a as J,c as M}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>me,adminCardsList:()=>Oe,adminCardsRetrieve:()=>Re,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>ge,adminCompanyUpdate:()=>be,adminCurrenciesList:()=>Ce,adminCurrenciesPartialUpdate:()=>Se,adminCurrenciesRetrieve:()=>xe,adminCurrenciesUpdate:()=>Te,deactivateCreate:()=>Ae,rainWebhookCreate:()=>Ee,userApplicationsCreate:()=>Pe,userApplicationsList:()=>De,userApplicationsRetrieve:()=>qe,userCardsCreate:()=>ve,userCardsDataRetrieve:()=>Be,userCardsList:()=>je,userCardsPinPartialUpdate:()=>$e,userCardsPinRetrieve:()=>Le,userCardsPinUpdate:()=>Ke,userCardsRetrieve:()=>Ie,userPartialUpdate:()=>Ue,userRetrieve:()=>ke,userUpdate:()=>ze,webhookCreate:()=>Ne});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ve=Object.entries(oe);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:s,sseDefaultRetryDelay:d,sseMaxRetryAttempts:i,sseMaxRetryDelay:o,sseSleepFn:p,url:u,...n})=>{let h,T=p??(l=>new Promise(O=>setTimeout(O,l)));return{stream:async function*(){let l=d??3e3,O=0,b=n.signal??new AbortController().signal;for(;!b.aborted;){O++;let A=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&A.set("Last-Event-ID",h);try{let C={redirect:"follow",...n,body:n.serializedBody,headers:A,signal:b},w=new Request(u,C);e&&(w=await e(u,C));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(),E="",N=()=>{try{m.cancel()}catch{}};b.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;E+=te,E=E.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let W=y.split(`
3
+ `);let W=E.split(`
4
4
 
5
- `);y=W.pop()??"";for(let ne of W){let se=ne.split(`
6
- `),P=[],H;for(let b of se)if(b.startsWith("data:"))P.push(b.replace(/^data:\s*/,""));else if(b.startsWith("event:"))H=b.replace(/^event:\s*/,"");else if(b.startsWith("id:"))n=b.replace(/^id:\s*/,"");else if(b.startsWith("retry:")){let F=Number.parseInt(b.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(g=F)}let S,V=!1;if(P.length){let b=P.join(`
7
- `);try{S=JSON.parse(b),V=!0}catch{S=b}}V&&(s&&await s(S),a&&(S=await a(S))),t?.({data:S,event:H,id:n,retry:g}),P.length&&(yield S)}}}finally{O.removeEventListener("abort",N),h.releaseLock()}break}catch(C){if(r?.(C),i!==void 0&&l>=i)break;let x=Math.min(g*2**(l-1),o??3e4);await w(x)}}}()}};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"&"}},q=({allowReserved:e,explode:r,name:t,style:a,value:s})=>{if(!r){let o=(e?s:s.map(p=>encodeURIComponent(p))).join(pe(a));switch(a){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let d=ie(a),i=s.map(o=>a==="label"||a==="simple"?e?o:encodeURIComponent(o):A({allowReserved:e,name:t,value:o})).join(d);return a==="label"||a==="matrix"?d+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)}`},j=({allowReserved:e,explode:r,name:t,style:a,value:s,valueOnly:d})=>{if(s instanceof Date)return d?s.toISOString():`${t}=${s.toISOString()}`;if(a!=="deepObject"&&!r){let p=[];Object.entries(s).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let m=p.join(",");switch(a){case"form":return`${t}=${m}`;case"label":return`.${m}`;case"matrix":return`;${t}=${m}`;default:return m}}let i=de(a),o=Object.entries(s).map(([p,m])=>A({allowReserved:e,name:a==="deepObject"?`${t}[${p}]`:p,value:m})).join(i);return a==="label"||a==="matrix"?i+o:o};var ce=/\{[^{}]+\}/g,le=({path:e,url:r})=>{let t=r,a=r.match(ce);if(a)for(let s of a){let d=!1,i=s.substring(1,s.length-1),o="simple";i.endsWith("*")&&(d=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),o="label"):i.startsWith(";")&&(i=i.substring(1),o="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){t=t.replace(s,q({explode:d,name:i,style:o,value:p}));continue}if(typeof p=="object"){t=t.replace(s,j({explode:d,name:i,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(s,`;${A({name:i,value:p})}`);continue}let m=encodeURIComponent(o==="label"?`.${p}`:p);t=t.replace(s,m)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:a,url:s})=>{let d=s.startsWith("/")?s:`/${s}`,i=(e??"")+d;r&&(i=le({path:r,url:i}));let o=t?a(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(i+=`?${o}`),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}={})=>a=>{let s=[];if(a&&typeof a=="object")for(let d in a){let i=a[d];if(i==null)continue;let o=e[d]||r;if(Array.isArray(i)){let p=q({allowReserved:o.allowReserved,explode:!0,name:d,style:"form",value:i,...o.array});p&&s.push(p)}else if(typeof i=="object"){let p=j({allowReserved:o.allowReserved,explode:!0,name:d,style:"deepObject",value:i,...o.object});p&&s.push(p)}else{let p=A({allowReserved:o.allowReserved,name:d,value:i});p&&s.push(p)}}return s.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let a=await G(t,r.auth);if(!a)continue;let s=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}}},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 t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,a)=>{r.push([a,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let a=t instanceof Headers?fe(t):Object.entries(t);for(let[s,d]of a)if(d===null)r.delete(s);else if(Array.isArray(d))for(let i of d)r.append(s,i);else d!==void 0&&r.set(s,typeof d=="object"?JSON.stringify(d):d)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let 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 k,request:new k,response:new k}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},U=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let r=$(U(),e),t=()=>({...r}),a=u=>(r=$(r,u),t()),s=ee(),d=async u=>{let n={...r,...u,fetch:u.fetch??r.fetch??globalThis.fetch,headers:v(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 w=L(n);return{opts:n,url:w}},i=async u=>{let{opts:n,url:w}=await d(u),D={redirect:"follow",...n,body:B(n)},R=new Request(w,D);for(let f of s.request.fns)f&&(R=await f(R,n));let g=n.fetch,l;try{l=await g(R)}catch(f){let h=f;for(let y of s.error.fns)y&&(h=await y(f,void 0,R,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,request:R,response:void 0}}for(let f of s.response.fns)f&&(l=await f(l,R,n));let O={request:R,response:l};if(l.ok){let f=(n.parseAs==="auto"?Y(l.headers.get("Content-Type")):n.parseAs)??"json";if(l.status===204||l.headers.get("Content-Length")==="0"){let y;switch(f){case"arrayBuffer":case"blob":case"text":y=await l[f]();break;case"formData":y=new FormData;break;case"stream":y=l.body;break;case"json":default:y={};break}return n.responseStyle==="data"?y:{data:y,...O}}let h;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":h=await l[f]();break;case"json":{let y=await l.text();h=y?JSON.parse(y):{};break}case"stream":return n.responseStyle==="data"?l.body:{data:l.body,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(h),n.responseTransformer&&(h=await n.responseTransformer(h))),n.responseStyle==="data"?h:{data:h,...O}}let E=await l.text(),C;try{C=JSON.parse(E)}catch{}let x=C??E,T=x;for(let f of s.error.fns)f&&(T=await f(x,l,R,n));if(T=T||{},n.throwOnError)throw T;return n.responseStyle==="data"?void 0:{error:T,...O}},o=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:w,url:D}=await d(n);return Q({...w,body:w.body,headers:w.headers,method:u,onRequest:async(R,g)=>{let l=new Request(R,g);for(let O of s.request.fns)O&&(l=await O(l,w));return l},serializedBody:B(w),url:D})};return{buildUrl:u=>L({...r,...u}),connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:s,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:i,setConfig:a,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var c=z(U({baseUrl:"https://rain.services.rehive.com/api/"}));var me=e=>(e.client??c).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/cards/",...e}),we=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/cards/{identifier}/",...e}),Re=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),be=e=>(e?.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ce=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),xe=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Se=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??c).post({url:"/rain/webhook/{company_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Ue=e=>(e?.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ze=e=>(e?.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),De=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/applications/",...e}),Pe=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/applications/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/applications/{identifier}/",...e}),je=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/",...e}),ve=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/",...e}),Be=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/data/",...e}),Le=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/pin/",...e}),$e=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/pin/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/pin/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??c).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function We(e){let r=z(M(e,"https://rain.services.rehive.com/api/"));return J(K,r)}export{We as createRainApi};
5
+ `);E=W.pop()??"";for(let ne of W){let se=ne.split(`
6
+ `),P=[],H;for(let g of se)if(g.startsWith("data:"))P.push(g.replace(/^data:\s*/,""));else if(g.startsWith("event:"))H=g.replace(/^event:\s*/,"");else if(g.startsWith("id:"))h=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let F=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(l=F)}let x,V=!1;if(P.length){let g=P.join(`
7
+ `);try{x=JSON.parse(g),V=!0}catch{x=g}}V&&(s&&await s(x),a&&(x=await a(x))),t?.({data:x,event:H,id:h,retry:l}),P.length&&(yield x)}}}finally{b.removeEventListener("abort",N),m.releaseLock()}break}catch(C){if(r?.(C),i!==void 0&&O>=i)break;let w=Math.min(l*2**(O-1),o??3e4);await T(w)}}}()}};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"&"}},q=({allowReserved:e,explode:r,name:t,style:a,value:s})=>{if(!r){let o=(e?s:s.map(p=>encodeURIComponent(p))).join(pe(a));switch(a){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let d=ie(a),i=s.map(o=>a==="label"||a==="simple"?e?o:encodeURIComponent(o):S({allowReserved:e,name:t,value:o})).join(d);return a==="label"||a==="matrix"?d+i:i},S=({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)}`},j=({allowReserved:e,explode:r,name:t,style:a,value:s,valueOnly:d})=>{if(s instanceof Date)return d?s.toISOString():`${t}=${s.toISOString()}`;if(a!=="deepObject"&&!r){let p=[];Object.entries(s).forEach(([n,h])=>{p=[...p,n,e?h:encodeURIComponent(h)]});let u=p.join(",");switch(a){case"form":return`${t}=${u}`;case"label":return`.${u}`;case"matrix":return`;${t}=${u}`;default:return u}}let i=de(a),o=Object.entries(s).map(([p,u])=>S({allowReserved:e,name:a==="deepObject"?`${t}[${p}]`:p,value:u})).join(i);return a==="label"||a==="matrix"?i+o:o};var ce=/\{[^{}]+\}/g,le=({path:e,url:r})=>{let t=r,a=r.match(ce);if(a)for(let s of a){let d=!1,i=s.substring(1,s.length-1),o="simple";i.endsWith("*")&&(d=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),o="label"):i.startsWith(";")&&(i=i.substring(1),o="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){t=t.replace(s,q({explode:d,name:i,style:o,value:p}));continue}if(typeof p=="object"){t=t.replace(s,j({explode:d,name:i,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(s,`;${S({name:i,value:p})}`);continue}let u=encodeURIComponent(o==="label"?`.${p}`:p);t=t.replace(s,u)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:a,url:s})=>{let d=s.startsWith("/")?s:`/${s}`,i=(e??"")+d;r&&(i=le({path:r,url:i}));let o=t?a(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(i+=`?${o}`),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}={})=>a=>{let s=[];if(a&&typeof a=="object")for(let d in a){let i=a[d];if(i==null)continue;let o=e[d]||r;if(Array.isArray(i)){let p=q({allowReserved:o.allowReserved,explode:!0,name:d,style:"form",value:i,...o.array});p&&s.push(p)}else if(typeof i=="object"){let p=j({allowReserved:o.allowReserved,explode:!0,name:d,style:"deepObject",value:i,...o.object});p&&s.push(p)}else{let p=S({allowReserved:o.allowReserved,name:d,value:i});p&&s.push(p)}}return s.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let a=await G(t,r.auth);if(!a)continue;let s=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}}},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 t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,a)=>{r.push([a,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let a=t instanceof Headers?fe(t):Object.entries(t);for(let[s,d]of a)if(d===null)r.delete(s);else if(Array.isArray(d))for(let i of d)r.append(s,i);else d!==void 0&&r.set(s,typeof d=="object"?JSON.stringify(d):d)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let 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 k,request:new k,response:new k}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},U=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let r=$(U(),e),t=()=>({...r}),a=u=>(r=$(r,u),t()),s=ee(),d=async u=>{let n={...r,...u,fetch:u.fetch??r.fetch??globalThis.fetch,headers:v(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 h=L(n);return{opts:n,url:h}},i=async u=>{let{opts:n,url:h}=await d(u),T={redirect:"follow",...n,body:B(n)},R=new Request(h,T);for(let y of s.request.fns)y&&(R=await y(R,n));let D=n.fetch,l;try{l=await D(R)}catch(y){let f=y;for(let m of s.error.fns)m&&(f=await m(y,void 0,R,n));if(f=f||{},n.throwOnError)throw f;return n.responseStyle==="data"?void 0:{error:f,request:R,response:void 0}}for(let y of s.response.fns)y&&(l=await y(l,R,n));let O={request:R,response:l};if(l.ok){let y=(n.parseAs==="auto"?Y(l.headers.get("Content-Type")):n.parseAs)??"json";if(l.status===204||l.headers.get("Content-Length")==="0"){let m;switch(y){case"arrayBuffer":case"blob":case"text":m=await l[y]();break;case"formData":m=new FormData;break;case"stream":m=l.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 l[y]();break;case"json":{let m=await l.text();f=m?JSON.parse(m):{};break}case"stream":return n.responseStyle==="data"?l.body:{data:l.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 b=await l.text(),A;try{A=JSON.parse(b)}catch{}let C=A??b,w=C;for(let y of s.error.fns)y&&(w=await y(C,l,R,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...O}},o=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:h,url:T}=await d(n);return Q({...h,body:h.body,headers:h.headers,method:u,onRequest:async(R,D)=>{let l=new Request(R,D);for(let O of s.request.fns)O&&(l=await O(l,h));return l},serializedBody:B(h),url:T})};return{buildUrl:L,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:s,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:i,setConfig:a,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var c=z(U({baseUrl:"https://rain.services.rehive.com/api/"}));var me=e=>(e.client??c).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/cards/",...e}),Re=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/cards/{identifier}/",...e}),ge=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(e?.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),be=e=>(e?.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ce=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),xe=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Se=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??c).post({url:"/rain/webhook/{company_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Ue=e=>(e?.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ze=e=>(e?.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),De=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/applications/",...e}),Pe=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/applications/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/applications/{identifier}/",...e}),je=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/",...e}),ve=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/",...e}),Be=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/data/",...e}),Le=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/pin/",...e}),$e=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/pin/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/cards/{identifier}/pin/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??c).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function We(e){let r=z(M(e,"https://rain.services.rehive.com/api/"));return J(K,r)}export{We as createRainApi};
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-C-LEZku2.mjs';
2
- import '../create-auth-DsnHpEf0.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-B4Q01gHp.mjs';
2
+ import '../create-auth-CT_IFt3T.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: unknown) => unknown;
33
+ type BodySerializer = (body: any) => any;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-ebyTfhcm.js';
2
- import '../create-auth-DsnHpEf0.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-ADSlg8HX.js';
2
+ import '../create-auth-CT_IFt3T.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: unknown) => unknown;
33
+ type BodySerializer = (body: any) => any;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var $={};_chunkOEIQFP6Tjs.a.call(void 0, $,{activateCreate:()=>he,adminCampaignsCreate:()=>Re,adminCampaignsDestroy:()=>ge,adminCampaignsList:()=>we,adminCampaignsPartialUpdate:()=>be,adminCampaignsRetrieve:()=>Oe,adminCampaignsUpdate:()=>Ce,adminCompanyPartialUpdate:()=>Ae,adminCompanyRetrieve:()=>xe,adminCompanyUpdate:()=>Te,adminCurrenciesList:()=>Se,adminCurrenciesRetrieve:()=>Ee,adminRewardsCreate:()=>De,adminRewardsList:()=>ke,adminRewardsPartialUpdate:()=>Ue,adminRewardsRetrieve:()=>ze,adminRewardsUpdate:()=>qe,adminUsersList:()=>Pe,adminUsersRetrieve:()=>je,adminWebhookCreate:()=>ve,deactivateCreate:()=>Ie,userCampaignsList:()=>$e,userCampaignsRetrieve:()=>Ne,userPartialUpdate:()=>Be,userRetrieve:()=>Le,userRewardsCreate:()=>He,userRewardsList:()=>We,userRewardsRetrieve:()=>Ve,userUpdate:()=>Ke,webhookCreate:()=>Fe});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Qe=Object.entries(oe);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:a,sseDefaultRetryDelay:l,sseMaxRetryAttempts:i,sseMaxRetryDelay:o,sseSleepFn:p,url:h,...u})=>{let n,R=_nullishCoalesce(p, () => ((b=>new Promise(c=>setTimeout(c,b)))));return{stream:async function*(){let b=_nullishCoalesce(l, () => (3e3)),c=0,w=_nullishCoalesce(u.signal, () => (new AbortController().signal));for(;!w.aborted;){c++;let E=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&E.set("Last-Event-ID",n);try{let C={redirect:"follow",...u,body:u.serializedBody,headers:E,signal:w},x=new Request(h,C);e&&(x=await e(h,C));let f=await(_nullishCoalesce(u.fetch, () => (globalThis.fetch)))(x);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(),y="",N=()=>{try{m.cancel()}catch (e2){}};w.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;y+=te,y=y.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,adminCampaignsCreate:()=>Re,adminCampaignsDestroy:()=>ge,adminCampaignsList:()=>we,adminCampaignsPartialUpdate:()=>be,adminCampaignsRetrieve:()=>Oe,adminCampaignsUpdate:()=>Ce,adminCompanyPartialUpdate:()=>Ae,adminCompanyRetrieve:()=>xe,adminCompanyUpdate:()=>Te,adminCurrenciesList:()=>Se,adminCurrenciesRetrieve:()=>Ee,adminRewardsCreate:()=>De,adminRewardsList:()=>ke,adminRewardsPartialUpdate:()=>Ue,adminRewardsRetrieve:()=>ze,adminRewardsUpdate:()=>qe,adminUsersList:()=>Pe,adminUsersRetrieve:()=>je,adminWebhookCreate:()=>ve,deactivateCreate:()=>Ie,userCampaignsList:()=>$e,userCampaignsRetrieve:()=>Ne,userPartialUpdate:()=>Be,userRetrieve:()=>Le,userRewardsCreate:()=>He,userRewardsList:()=>We,userRewardsRetrieve:()=>Ve,userUpdate:()=>Ke,webhookCreate:()=>Fe});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Qe=Object.entries(oe);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:a,sseDefaultRetryDelay:l,sseMaxRetryAttempts:i,sseMaxRetryDelay:o,sseSleepFn:p,url:u,...n})=>{let m,T=_nullishCoalesce(p, () => ((c=>new Promise(w=>setTimeout(w,c)))));return{stream:async function*(){let c=_nullishCoalesce(l, () => (3e3)),w=0,b=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!b.aborted;){w++;let S=n.headers instanceof Headers?n.headers:new Headers(n.headers);m!==void 0&&S.set("Last-Event-ID",m);try{let C={redirect:"follow",...n,body:n.serializedBody,headers:S,signal:b},O=new Request(u,C);e&&(O=await e(u,C));let y=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(O);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(),E="",N=()=>{try{h.cancel()}catch (e2){}};b.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;E+=te,E=E.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let W=y.split(`
3
+ `);let W=E.split(`
4
4
 
5
- `);y=_nullishCoalesce(W.pop(), () => (""));for(let ne of W){let ae=ne.split(`
6
- `),q=[],H;for(let O of ae)if(O.startsWith("data:"))q.push(O.replace(/^data:\s*/,""));else if(O.startsWith("event:"))H=O.replace(/^event:\s*/,"");else if(O.startsWith("id:"))n=O.replace(/^id:\s*/,"");else if(O.startsWith("retry:")){let F=Number.parseInt(O.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(b=F)}let A,V=!1;if(q.length){let O=q.join(`
7
- `);try{A=JSON.parse(O),V=!0}catch (e3){A=O}}V&&(a&&await a(A),s&&(A=await s(A))),_optionalChain([t, 'optionalCall', _2 => _2({data:A,event:H,id:n,retry:b})]),q.length&&(yield A)}}}finally{w.removeEventListener("abort",N),m.releaseLock()}break}catch(C){if(_optionalChain([r, 'optionalCall', _3 => _3(C)]),i!==void 0&&c>=i)break;let x=Math.min(b*2**(c-1),_nullishCoalesce(o, () => (3e4)));await R(x)}}}()}};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"&"}},P=({allowReserved:e,explode:r,name:t,style:s,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let l=ie(s),i=a.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):S({allowReserved:e,name:t,value:o})).join(l);return s==="label"||s==="matrix"?l+i:i},S=({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)}`},j=({allowReserved:e,explode:r,name:t,style:s,value:a,valueOnly:l})=>{if(a instanceof Date)return l?a.toISOString():`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let h=p.join(",");switch(s){case"form":return`${t}=${h}`;case"label":return`.${h}`;case"matrix":return`;${t}=${h}`;default:return h}}let i=de(s),o=Object.entries(a).map(([p,h])=>S({allowReserved:e,name:s==="deepObject"?`${t}[${p}]`:p,value:h})).join(i);return s==="label"||s==="matrix"?i+o:o};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let a of s){let l=!1,i=a.substring(1,a.length-1),o="simple";i.endsWith("*")&&(l=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),o="label"):i.startsWith(";")&&(i=i.substring(1),o="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){t=t.replace(a,P({explode:l,name:i,style:o,value:p}));continue}if(typeof p=="object"){t=t.replace(a,j({explode:l,name:i,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(a,`;${S({name:i,value:p})}`);continue}let h=encodeURIComponent(o==="label"?`.${p}`:p);t=t.replace(a,h)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,i=(_nullishCoalesce(e, () => ("")))+l;r&&(i=ce({path:r,url:i}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(i+=`?${o}`),i};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let l in s){let i=s[l];if(i==null)continue;let o=e[l]||r;if(Array.isArray(i)){let p=P({allowReserved:o.allowReserved,explode:!0,name:l,style:"form",value:i,...o.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:o.allowReserved,explode:!0,name:l,style:"deepObject",value:i,...o.object});p&&a.push(p)}else{let p=S({allowReserved:o.allowReserved,name:l,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let a=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);break}}},B=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(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,s)=>{r.push([s,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?fe(t):Object.entries(t);for(let[a,l]of s)if(l===null)r.delete(a);else if(Array.isArray(l))for(let i of l)r.append(a,i);else l!==void 0&&r.set(a,typeof l=="object"?JSON.stringify(l):l)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new k,request:new k,response:new k}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},D=(e={})=>({...I,headers:me,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let r=K(D(),e),t=()=>({...r}),s=u=>(r=K(r,u),t()),a=ee(),l=async u=>{let n={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:v(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 R=B(n);return{opts:n,url:R}},i=async u=>{let{opts:n,url:R}=await l(u),U={redirect:"follow",...n,body:L(n)},g=new Request(R,U);for(let f of a.request.fns)f&&(g=await f(g,n));let b=n.fetch,c;try{c=await b(g)}catch(f){let m=f;for(let y of a.error.fns)y&&(m=await y(f,void 0,g,n));if(m=m||{},n.throwOnError)throw m;return n.responseStyle==="data"?void 0:{error:m,request:g,response:void 0}}for(let f of a.response.fns)f&&(c=await f(c,g,n));let w={request:g,response:c};if(c.ok){let f=_nullishCoalesce((n.parseAs==="auto"?Y(c.headers.get("Content-Type")):n.parseAs), () => ("json"));if(c.status===204||c.headers.get("Content-Length")==="0"){let y;switch(f){case"arrayBuffer":case"blob":case"text":y=await c[f]();break;case"formData":y=new FormData;break;case"stream":y=c.body;break;case"json":default:y={};break}return n.responseStyle==="data"?y:{data:y,...w}}let m;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":m=await c[f]();break;case"json":{let y=await c.text();m=y?JSON.parse(y):{};break}case"stream":return n.responseStyle==="data"?c.body:{data:c.body,...w}}return f==="json"&&(n.responseValidator&&await n.responseValidator(m),n.responseTransformer&&(m=await n.responseTransformer(m))),n.responseStyle==="data"?m:{data:m,...w}}let E=await c.text(),C;try{C=JSON.parse(E)}catch (e4){}let x=_nullishCoalesce(C, () => (E)),T=x;for(let f of a.error.fns)f&&(T=await f(x,c,g,n));if(T=T||{},n.throwOnError)throw T;return n.responseStyle==="data"?void 0:{error:T,...w}},o=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:R,url:U}=await l(n);return Q({...R,body:R.body,headers:R.headers,method:u,onRequest:async(g,b)=>{let c=new Request(g,b);for(let w of a.request.fns)w&&(c=await w(c,R));return c},serializedBody:L(R),url:U})};return{buildUrl:u=>B({...r,...u}),connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:i,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var d=z(D({baseUrl:"https://reward.services.rehive.io/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (d))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(e.client, () => (d))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _22 => _22.headers])}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e}),De=e=>(_nullishCoalesce(e.client, () => (d))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),je=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _30 => _30.headers])}}),Ke=e=>(_nullishCoalesce(e.client, () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/{id}/",...e}),We=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e}),He=e=>(_nullishCoalesce(e.client, () => (d))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/{id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Je(e){let r=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://reward.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, $,r)}exports.createRewardsApi = Je;
5
+ `);E=_nullishCoalesce(W.pop(), () => (""));for(let ne of W){let ae=ne.split(`
6
+ `),q=[],H;for(let g of ae)if(g.startsWith("data:"))q.push(g.replace(/^data:\s*/,""));else if(g.startsWith("event:"))H=g.replace(/^event:\s*/,"");else if(g.startsWith("id:"))m=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let F=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(c=F)}let x,V=!1;if(q.length){let g=q.join(`
7
+ `);try{x=JSON.parse(g),V=!0}catch (e3){x=g}}V&&(a&&await a(x),s&&(x=await s(x))),_optionalChain([t, 'optionalCall', _2 => _2({data:x,event:H,id:m,retry:c})]),q.length&&(yield x)}}}finally{b.removeEventListener("abort",N),h.releaseLock()}break}catch(C){if(_optionalChain([r, 'optionalCall', _3 => _3(C)]),i!==void 0&&w>=i)break;let O=Math.min(c*2**(w-1),_nullishCoalesce(o, () => (3e4)));await T(O)}}}()}};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"&"}},P=({allowReserved:e,explode:r,name:t,style:s,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let l=ie(s),i=a.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):A({allowReserved:e,name:t,value:o})).join(l);return s==="label"||s==="matrix"?l+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)}`},j=({allowReserved:e,explode:r,name:t,style:s,value:a,valueOnly:l})=>{if(a instanceof Date)return l?a.toISOString():`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([n,m])=>{p=[...p,n,e?m:encodeURIComponent(m)]});let u=p.join(",");switch(s){case"form":return`${t}=${u}`;case"label":return`.${u}`;case"matrix":return`;${t}=${u}`;default:return u}}let i=de(s),o=Object.entries(a).map(([p,u])=>A({allowReserved:e,name:s==="deepObject"?`${t}[${p}]`:p,value:u})).join(i);return s==="label"||s==="matrix"?i+o:o};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let a of s){let l=!1,i=a.substring(1,a.length-1),o="simple";i.endsWith("*")&&(l=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),o="label"):i.startsWith(";")&&(i=i.substring(1),o="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){t=t.replace(a,P({explode:l,name:i,style:o,value:p}));continue}if(typeof p=="object"){t=t.replace(a,j({explode:l,name:i,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(a,`;${A({name:i,value:p})}`);continue}let u=encodeURIComponent(o==="label"?`.${p}`:p);t=t.replace(a,u)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,i=(_nullishCoalesce(e, () => ("")))+l;r&&(i=ce({path:r,url:i}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(i+=`?${o}`),i};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let l in s){let i=s[l];if(i==null)continue;let o=e[l]||r;if(Array.isArray(i)){let p=P({allowReserved:o.allowReserved,explode:!0,name:l,style:"form",value:i,...o.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:o.allowReserved,explode:!0,name:l,style:"deepObject",value:i,...o.object});p&&a.push(p)}else{let p=A({allowReserved:o.allowReserved,name:l,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let a=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);break}}},B=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(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},ye=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?ye(t):Object.entries(t);for(let[a,l]of s)if(l===null)r.delete(a);else if(Array.isArray(l))for(let i of l)r.append(a,i);else l!==void 0&&r.set(a,typeof l=="object"?JSON.stringify(l):l)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new k,request:new k,response:new k}),fe=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},D=(e={})=>({...I,headers:me,parseAs:"auto",querySerializer:fe,...e});var z=(e={})=>{let r=K(D(),e),t=()=>({...r}),s=u=>(r=K(r,u),t()),a=ee(),l=async u=>{let n={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:v(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 m=B(n);return{opts:n,url:m}},i=async u=>{let{opts:n,url:m}=await l(u),T={redirect:"follow",...n,body:L(n)},R=new Request(m,T);for(let f of a.request.fns)f&&(R=await f(R,n));let U=n.fetch,c;try{c=await U(R)}catch(f){let y=f;for(let h of a.error.fns)h&&(y=await h(f,void 0,R,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:R,response:void 0}}for(let f of a.response.fns)f&&(c=await f(c,R,n));let w={request:R,response:c};if(c.ok){let f=_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(f){case"arrayBuffer":case"blob":case"text":h=await c[f]();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,...w}}let y;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":y=await c[f]();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,...w}}return f==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...w}}let b=await c.text(),S;try{S=JSON.parse(b)}catch (e4){}let C=_nullishCoalesce(S, () => (b)),O=C;for(let f of a.error.fns)f&&(O=await f(C,c,R,n));if(O=O||{},n.throwOnError)throw O;return n.responseStyle==="data"?void 0:{error:O,...w}},o=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:m,url:T}=await l(n);return Q({...m,body:m.body,headers:m.headers,method:u,onRequest:async(R,U)=>{let c=new Request(R,U);for(let w of a.request.fns)w&&(c=await w(c,m));return c},serializedBody:L(m),url:T})};return{buildUrl:B,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:i,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var d=z(D({baseUrl:"https://reward.services.rehive.io/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (d))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(e.client, () => (d))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Ae=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _22 => _22.headers])}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e}),De=e=>(_nullishCoalesce(e.client, () => (d))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),je=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (d))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _30 => _30.headers])}}),Ke=e=>(_nullishCoalesce(e.client, () => (d))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/{id}/",...e}),We=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e}),He=e=>(_nullishCoalesce(e.client, () => (d))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(e.client, () => (d))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/{id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (d))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Je(e){let r=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://reward.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, $,r)}exports.createRewardsApi = Je;
@@ -1,7 +1,7 @@
1
- import{a as J,c as M}from"../chunk-S5UXBHRU.mjs";import{a as se}from"../chunk-S4QKN5WW.mjs";var $={};se($,{activateCreate:()=>he,adminCampaignsCreate:()=>Re,adminCampaignsDestroy:()=>ge,adminCampaignsList:()=>we,adminCampaignsPartialUpdate:()=>be,adminCampaignsRetrieve:()=>Oe,adminCampaignsUpdate:()=>Ce,adminCompanyPartialUpdate:()=>Ae,adminCompanyRetrieve:()=>xe,adminCompanyUpdate:()=>Te,adminCurrenciesList:()=>Se,adminCurrenciesRetrieve:()=>Ee,adminRewardsCreate:()=>De,adminRewardsList:()=>ke,adminRewardsPartialUpdate:()=>Ue,adminRewardsRetrieve:()=>ze,adminRewardsUpdate:()=>qe,adminUsersList:()=>Pe,adminUsersRetrieve:()=>je,adminWebhookCreate:()=>ve,deactivateCreate:()=>Ie,userCampaignsList:()=>$e,userCampaignsRetrieve:()=>Ne,userPartialUpdate:()=>Be,userRetrieve:()=>Le,userRewardsCreate:()=>He,userRewardsList:()=>We,userRewardsRetrieve:()=>Ve,userUpdate:()=>Ke,webhookCreate:()=>Fe});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Qe=Object.entries(oe);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:a,sseDefaultRetryDelay:l,sseMaxRetryAttempts:i,sseMaxRetryDelay:o,sseSleepFn:p,url:h,...u})=>{let n,R=p??(b=>new Promise(c=>setTimeout(c,b)));return{stream:async function*(){let b=l??3e3,c=0,w=u.signal??new AbortController().signal;for(;!w.aborted;){c++;let E=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&E.set("Last-Event-ID",n);try{let C={redirect:"follow",...u,body:u.serializedBody,headers:E,signal:w},x=new Request(h,C);e&&(x=await e(h,C));let f=await(u.fetch??globalThis.fetch)(x);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(),y="",N=()=>{try{m.cancel()}catch{}};w.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await m.read();if(re)break;y+=te,y=y.replace(/\r\n/g,`
1
+ import{a as J,c as M}from"../chunk-S5UXBHRU.mjs";import{a as se}from"../chunk-S4QKN5WW.mjs";var $={};se($,{activateCreate:()=>he,adminCampaignsCreate:()=>Re,adminCampaignsDestroy:()=>ge,adminCampaignsList:()=>we,adminCampaignsPartialUpdate:()=>be,adminCampaignsRetrieve:()=>Oe,adminCampaignsUpdate:()=>Ce,adminCompanyPartialUpdate:()=>Ae,adminCompanyRetrieve:()=>xe,adminCompanyUpdate:()=>Te,adminCurrenciesList:()=>Se,adminCurrenciesRetrieve:()=>Ee,adminRewardsCreate:()=>De,adminRewardsList:()=>ke,adminRewardsPartialUpdate:()=>Ue,adminRewardsRetrieve:()=>ze,adminRewardsUpdate:()=>qe,adminUsersList:()=>Pe,adminUsersRetrieve:()=>je,adminWebhookCreate:()=>ve,deactivateCreate:()=>Ie,userCampaignsList:()=>$e,userCampaignsRetrieve:()=>Ne,userPartialUpdate:()=>Be,userRetrieve:()=>Le,userRewardsCreate:()=>He,userRewardsList:()=>We,userRewardsRetrieve:()=>Ve,userUpdate:()=>Ke,webhookCreate:()=>Fe});var I={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var oe={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Qe=Object.entries(oe);var Q=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:a,sseDefaultRetryDelay:l,sseMaxRetryAttempts:i,sseMaxRetryDelay:o,sseSleepFn:p,url:u,...n})=>{let m,T=p??(c=>new Promise(w=>setTimeout(w,c)));return{stream:async function*(){let c=l??3e3,w=0,b=n.signal??new AbortController().signal;for(;!b.aborted;){w++;let S=n.headers instanceof Headers?n.headers:new Headers(n.headers);m!==void 0&&S.set("Last-Event-ID",m);try{let C={redirect:"follow",...n,body:n.serializedBody,headers:S,signal:b},O=new Request(u,C);e&&(O=await e(u,C));let y=await(n.fetch??globalThis.fetch)(O);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(),E="",N=()=>{try{h.cancel()}catch{}};b.addEventListener("abort",N);try{for(;;){let{done:re,value:te}=await h.read();if(re)break;E+=te,E=E.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let W=y.split(`
3
+ `);let W=E.split(`
4
4
 
5
- `);y=W.pop()??"";for(let ne of W){let ae=ne.split(`
6
- `),q=[],H;for(let O of ae)if(O.startsWith("data:"))q.push(O.replace(/^data:\s*/,""));else if(O.startsWith("event:"))H=O.replace(/^event:\s*/,"");else if(O.startsWith("id:"))n=O.replace(/^id:\s*/,"");else if(O.startsWith("retry:")){let F=Number.parseInt(O.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(b=F)}let A,V=!1;if(q.length){let O=q.join(`
7
- `);try{A=JSON.parse(O),V=!0}catch{A=O}}V&&(a&&await a(A),s&&(A=await s(A))),t?.({data:A,event:H,id:n,retry:b}),q.length&&(yield A)}}}finally{w.removeEventListener("abort",N),m.releaseLock()}break}catch(C){if(r?.(C),i!==void 0&&c>=i)break;let x=Math.min(b*2**(c-1),o??3e4);await R(x)}}}()}};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"&"}},P=({allowReserved:e,explode:r,name:t,style:s,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let l=ie(s),i=a.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):S({allowReserved:e,name:t,value:o})).join(l);return s==="label"||s==="matrix"?l+i:i},S=({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)}`},j=({allowReserved:e,explode:r,name:t,style:s,value:a,valueOnly:l})=>{if(a instanceof Date)return l?a.toISOString():`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let h=p.join(",");switch(s){case"form":return`${t}=${h}`;case"label":return`.${h}`;case"matrix":return`;${t}=${h}`;default:return h}}let i=de(s),o=Object.entries(a).map(([p,h])=>S({allowReserved:e,name:s==="deepObject"?`${t}[${p}]`:p,value:h})).join(i);return s==="label"||s==="matrix"?i+o:o};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let a of s){let l=!1,i=a.substring(1,a.length-1),o="simple";i.endsWith("*")&&(l=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),o="label"):i.startsWith(";")&&(i=i.substring(1),o="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){t=t.replace(a,P({explode:l,name:i,style:o,value:p}));continue}if(typeof p=="object"){t=t.replace(a,j({explode:l,name:i,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(a,`;${S({name:i,value:p})}`);continue}let h=encodeURIComponent(o==="label"?`.${p}`:p);t=t.replace(a,h)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,i=(e??"")+l;r&&(i=ce({path:r,url:i}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(i+=`?${o}`),i};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let l in s){let i=s[l];if(i==null)continue;let o=e[l]||r;if(Array.isArray(i)){let p=P({allowReserved:o.allowReserved,explode:!0,name:l,style:"form",value:i,...o.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:o.allowReserved,explode:!0,name:l,style:"deepObject",value:i,...o.object});p&&a.push(p)}else{let p=S({allowReserved:o.allowReserved,name:l,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let a=t.name??"Authorization";switch(t.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);break}}},B=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},fe=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?fe(t):Object.entries(t);for(let[a,l]of s)if(l===null)r.delete(a);else if(Array.isArray(l))for(let i of l)r.append(a,i);else l!==void 0&&r.set(a,typeof l=="object"?JSON.stringify(l):l)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new k,request:new k,response:new k}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},D=(e={})=>({...I,headers:me,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let r=K(D(),e),t=()=>({...r}),s=u=>(r=K(r,u),t()),a=ee(),l=async u=>{let n={...r,...u,fetch:u.fetch??r.fetch??globalThis.fetch,headers:v(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 R=B(n);return{opts:n,url:R}},i=async u=>{let{opts:n,url:R}=await l(u),U={redirect:"follow",...n,body:L(n)},g=new Request(R,U);for(let f of a.request.fns)f&&(g=await f(g,n));let b=n.fetch,c;try{c=await b(g)}catch(f){let m=f;for(let y of a.error.fns)y&&(m=await y(f,void 0,g,n));if(m=m||{},n.throwOnError)throw m;return n.responseStyle==="data"?void 0:{error:m,request:g,response:void 0}}for(let f of a.response.fns)f&&(c=await f(c,g,n));let w={request:g,response:c};if(c.ok){let f=(n.parseAs==="auto"?Y(c.headers.get("Content-Type")):n.parseAs)??"json";if(c.status===204||c.headers.get("Content-Length")==="0"){let y;switch(f){case"arrayBuffer":case"blob":case"text":y=await c[f]();break;case"formData":y=new FormData;break;case"stream":y=c.body;break;case"json":default:y={};break}return n.responseStyle==="data"?y:{data:y,...w}}let m;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":m=await c[f]();break;case"json":{let y=await c.text();m=y?JSON.parse(y):{};break}case"stream":return n.responseStyle==="data"?c.body:{data:c.body,...w}}return f==="json"&&(n.responseValidator&&await n.responseValidator(m),n.responseTransformer&&(m=await n.responseTransformer(m))),n.responseStyle==="data"?m:{data:m,...w}}let E=await c.text(),C;try{C=JSON.parse(E)}catch{}let x=C??E,T=x;for(let f of a.error.fns)f&&(T=await f(x,c,g,n));if(T=T||{},n.throwOnError)throw T;return n.responseStyle==="data"?void 0:{error:T,...w}},o=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:R,url:U}=await l(n);return Q({...R,body:R.body,headers:R.headers,method:u,onRequest:async(g,b)=>{let c=new Request(g,b);for(let w of a.request.fns)w&&(c=await w(c,R));return c},serializedBody:L(R),url:U})};return{buildUrl:u=>B({...r,...u}),connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:i,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var d=z(D({baseUrl:"https://reward.services.rehive.io/api/"}));var he=e=>(e.client??d).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e}),Re=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(e.client??d).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),Oe=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),be=e=>(e.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Ae=e=>(e?.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Te=e=>(e?.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Se=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ee=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),ke=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e}),De=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e}),Ue=e=>(e.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),je=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e}),ve=e=>(e.client??d).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??d).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Be=e=>(e?.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ke=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/",...e}),Ne=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/{id}/",...e}),We=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e}),He=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/{id}/",...e}),Fe=e=>(e.client??d).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Je(e){let r=z(M(e,"https://reward.services.rehive.com/api/"));return J($,r)}export{Je as createRewardsApi};
5
+ `);E=W.pop()??"";for(let ne of W){let ae=ne.split(`
6
+ `),q=[],H;for(let g of ae)if(g.startsWith("data:"))q.push(g.replace(/^data:\s*/,""));else if(g.startsWith("event:"))H=g.replace(/^event:\s*/,"");else if(g.startsWith("id:"))m=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let F=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(F)||(c=F)}let x,V=!1;if(q.length){let g=q.join(`
7
+ `);try{x=JSON.parse(g),V=!0}catch{x=g}}V&&(a&&await a(x),s&&(x=await s(x))),t?.({data:x,event:H,id:m,retry:c}),q.length&&(yield x)}}}finally{b.removeEventListener("abort",N),h.releaseLock()}break}catch(C){if(r?.(C),i!==void 0&&w>=i)break;let O=Math.min(c*2**(w-1),o??3e4);await T(O)}}}()}};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"&"}},P=({allowReserved:e,explode:r,name:t,style:s,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let l=ie(s),i=a.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):A({allowReserved:e,name:t,value:o})).join(l);return s==="label"||s==="matrix"?l+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)}`},j=({allowReserved:e,explode:r,name:t,style:s,value:a,valueOnly:l})=>{if(a instanceof Date)return l?a.toISOString():`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([n,m])=>{p=[...p,n,e?m:encodeURIComponent(m)]});let u=p.join(",");switch(s){case"form":return`${t}=${u}`;case"label":return`.${u}`;case"matrix":return`;${t}=${u}`;default:return u}}let i=de(s),o=Object.entries(a).map(([p,u])=>A({allowReserved:e,name:s==="deepObject"?`${t}[${p}]`:p,value:u})).join(i);return s==="label"||s==="matrix"?i+o:o};var le=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let a of s){let l=!1,i=a.substring(1,a.length-1),o="simple";i.endsWith("*")&&(l=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),o="label"):i.startsWith(";")&&(i=i.substring(1),o="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){t=t.replace(a,P({explode:l,name:i,style:o,value:p}));continue}if(typeof p=="object"){t=t.replace(a,j({explode:l,name:i,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){t=t.replace(a,`;${A({name:i,value:p})}`);continue}let u=encodeURIComponent(o==="label"?`.${p}`:p);t=t.replace(a,u)}return t},_=({baseUrl:e,path:r,query:t,querySerializer:s,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,i=(e??"")+l;r&&(i=ce({path:r,url:i}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(i+=`?${o}`),i};function L(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let l in s){let i=s[l];if(i==null)continue;let o=e[l]||r;if(Array.isArray(i)){let p=P({allowReserved:o.allowReserved,explode:!0,name:l,style:"form",value:i,...o.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:o.allowReserved,explode:!0,name:l,style:"deepObject",value:i,...o.object});p&&a.push(p)}else{let p=A({allowReserved:o.allowReserved,name:l,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await G(t,r.auth);if(!s)continue;let a=t.name??"Authorization";switch(t.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);break}}},B=e=>_({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=v(e.headers,r.headers),t},ye=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},v=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?ye(t):Object.entries(t);for(let[a,l]of s)if(l===null)r.delete(a);else if(Array.isArray(l))for(let i of l)r.append(a,i);else l!==void 0&&r.set(a,typeof l=="object"?JSON.stringify(l):l)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new k,request:new k,response:new k}),fe=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),me={"Content-Type":"application/json"},D=(e={})=>({...I,headers:me,parseAs:"auto",querySerializer:fe,...e});var z=(e={})=>{let r=K(D(),e),t=()=>({...r}),s=u=>(r=K(r,u),t()),a=ee(),l=async u=>{let n={...r,...u,fetch:u.fetch??r.fetch??globalThis.fetch,headers:v(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 m=B(n);return{opts:n,url:m}},i=async u=>{let{opts:n,url:m}=await l(u),T={redirect:"follow",...n,body:L(n)},R=new Request(m,T);for(let f of a.request.fns)f&&(R=await f(R,n));let U=n.fetch,c;try{c=await U(R)}catch(f){let y=f;for(let h of a.error.fns)h&&(y=await h(f,void 0,R,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:R,response:void 0}}for(let f of a.response.fns)f&&(c=await f(c,R,n));let w={request:R,response:c};if(c.ok){let f=(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(f){case"arrayBuffer":case"blob":case"text":h=await c[f]();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,...w}}let y;switch(f){case"arrayBuffer":case"blob":case"formData":case"text":y=await c[f]();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,...w}}return f==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...w}}let b=await c.text(),S;try{S=JSON.parse(b)}catch{}let C=S??b,O=C;for(let f of a.error.fns)f&&(O=await f(C,c,R,n));if(O=O||{},n.throwOnError)throw O;return n.responseStyle==="data"?void 0:{error:O,...w}},o=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:m,url:T}=await l(n);return Q({...m,body:m.body,headers:m.headers,method:u,onRequest:async(R,U)=>{let c=new Request(R,U);for(let w of a.request.fns)w&&(c=await w(c,m));return c},serializedBody:L(m),url:T})};return{buildUrl:B,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:t,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:i,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var d=z(D({baseUrl:"https://reward.services.rehive.io/api/"}));var he=e=>(e.client??d).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e}),Re=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(e.client??d).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),Oe=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e}),be=e=>(e.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/campaigns/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Ae=e=>(e?.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Te=e=>(e?.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Se=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ee=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),ke=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e}),De=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e}),Ue=e=>(e.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/rewards/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),je=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e}),ve=e=>(e.client??d).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(e.client??d).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Be=e=>(e?.client??d).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ke=e=>(e.client??d).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/",...e}),Ne=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/campaigns/{id}/",...e}),We=e=>(e?.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e}),He=e=>(e.client??d).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e.client??d).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/rewards/{id}/",...e}),Fe=e=>(e.client??d).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Je(e){let r=z(M(e,"https://reward.services.rehive.com/api/"));return J($,r)}export{Je as createRewardsApi};
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-C-LEZku2.mjs';
2
- import '../create-auth-DsnHpEf0.mjs';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-B4Q01gHp.mjs';
2
+ import '../create-auth-CT_IFt3T.mjs';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: unknown) => unknown;
33
+ type BodySerializer = (body: any) => any;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,5 +1,5 @@
1
- import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-ebyTfhcm.js';
2
- import '../create-auth-DsnHpEf0.js';
1
+ import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-ADSlg8HX.js';
2
+ import '../create-auth-CT_IFt3T.js';
3
3
 
4
4
  type AuthToken = string | undefined;
5
5
  interface Auth {
@@ -30,7 +30,7 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
30
30
  type ObjectStyle = 'form' | 'deepObject';
31
31
 
32
32
  type QuerySerializer = (query: Record<string, unknown>) => string;
33
- type BodySerializer = (body: unknown) => unknown;
33
+ type BodySerializer = (body: any) => any;
34
34
  type QuerySerializerOptionsObject = {
35
35
  allowReserved?: boolean;
36
36
  array?: Partial<SerializerOptions<ArrayStyle>>;
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var M={};_chunkOEIQFP6Tjs.a.call(void 0, M,{activateCreate:()=>Ae,adminAssetAuthoriseHolderCreate:()=>Ce,adminAssetCreate:()=>fe,adminAssetFundCreate:()=>ge,adminAssetList:()=>we,adminAssetPartialUpdate:()=>Te,adminAssetRead:()=>Oe,adminBlacklistedAccountDelete:()=>Re,adminBlacklistedAccountPartialUpdate:()=>be,adminBlacklistedAccountRead:()=>Ee,adminBlacklistedAccountUpdate:()=>xe,adminBlacklistedAccountsCreate:()=>De,adminBlacklistedAccountsList:()=>Se,adminColdstorageAccountsCreate:()=>Pe,adminColdstorageAccountsList:()=>Ue,adminColdstorageAccountsPartialUpdate:()=>Le,adminColdstorageAccountsRead:()=>ze,adminColdstorageList:()=>ke,adminCompanyConfigurationAccountGroupsCreate:()=>Me,adminCompanyConfigurationAccountGroupsDelete:()=>Fe,adminCompanyConfigurationAccountGroupsList:()=>Ie,adminCompanyConfigurationAccountGroupsPartialUpdate:()=>We,adminCompanyConfigurationAccountGroupsRead:()=>ve,adminCompanyConfigurationAccountGroupsUpdate:()=>Ge,adminCompanyConfigurationAnchorPlatformList:()=>Ve,adminCompanyConfigurationAnchorPlatformPartialUpdate:()=>_e,adminCompanyConfigurationAnchorPlatformUpdate:()=>$e,adminCompanyConfigurationList:()=>qe,adminCompanyConfigurationPartialUpdate:()=>He,adminCompanyConfigurationUpdate:()=>Be,adminCompanyList:()=>Ke,adminCompanyPartialUpdate:()=>je,adminCompanyStellarTomlList:()=>Ne,adminFederationCreate:()=>Qe,adminFederationList:()=>Je,adminHotwalletActiveList:()=>en,adminHotwalletCreate:()=>Ze,adminHotwalletEnableMssCreate:()=>nn,adminHotwalletFeesList:()=>rn,adminHotwalletFundList:()=>tn,adminHotwalletList:()=>Xe,adminHotwalletMergeCreate:()=>on,adminHotwalletPartialUpdate:()=>Ye,adminHotwalletSendCreate:()=>an,adminKnownPublicAddressesCreate:()=>dn,adminKnownPublicAddressesDelete:()=>cn,adminKnownPublicAddressesList:()=>sn,adminKnownPublicAddressesPartialUpdate:()=>pn,adminKnownPublicAddressesRead:()=>ln,adminKnownPublicAddressesUpdate:()=>un,adminMemosCreate:()=>hn,adminMemosList:()=>mn,adminSep10AuthenticatedAccountsList:()=>yn,adminSep10AuthenticatedAccountsRead:()=>An,adminSep24TransactionsList:()=>wn,adminSep24TransactionsRead:()=>fn,adminStellarAccountsChangeOwnershipCreate:()=>Rn,adminStellarAccountsGenerateCreate:()=>Tn,adminStellarAccountsList:()=>On,adminStellarAccountsPartialUpdate:()=>gn,adminStellarAccountsRead:()=>Cn,adminTransactionsList:()=>En,adminTransactionsPartialUpdate:()=>Sn,adminTransactionsRead:()=>xn,adminTransactionsSendCreate:()=>bn,adminUsersCreate:()=>kn,adminUsersList:()=>Dn,adminUsersMemosCreate:()=>Ln,adminUsersMemosList:()=>zn,adminUsersPartialUpdate:()=>Pn,adminUsersRead:()=>Un,adminWarmstorageAccountsCreate:()=>qn,adminWarmstorageAccountsList:()=>jn,adminWarmstorageAccountsPartialUpdate:()=>Bn,adminWarmstorageAccountsRead:()=>Hn,adminWarmstorageList:()=>Kn,companyAssetsList:()=>Mn,companyList:()=>In,deactivateCreate:()=>Fn,hooksPrsCreate:()=>vn,infoList:()=>Wn,knownAssetsList:()=>Gn,stellarFederationRead:()=>Vn,transactionsList:()=>_n,transactionsSendCreate:()=>$n,userAccountList:()=>Qn,userAnchorAuthCreate:()=>or,userAnchorSessionsValidateAccountCreate:()=>Yn,userAnchorSessionsValidateCreate:()=>Xn,userAnchorSessionsValidateSessionCreate:()=>Zn,userAnchorTransactionsCreate:()=>tr,userAnchorTransactionsList:()=>er,userAnchorTransactionsPartialUpdate:()=>rr,userAnchorTransactionsRead:()=>nr,userKnownPublicAddressesList:()=>ar,userList:()=>Nn,userMemosCreate:()=>ir,userMemosList:()=>sr,userPartialUpdate:()=>Jn,userTransactionsSendCreate:()=>dr,userUsernameSetCreate:()=>cr});var q={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(se);var N=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:a,sseDefaultRetryDelay:l,sseMaxRetryAttempts:d,sseMaxRetryDelay:i,sseSleepFn:c,url:A,...u})=>{let o,f=_nullishCoalesce(c, () => ((C=>new Promise(p=>setTimeout(p,C)))));return{stream:async function*(){let C=_nullishCoalesce(l, () => (3e3)),p=0,w=_nullishCoalesce(u.signal, () => (new AbortController().signal));for(;!w.aborted;){p++;let S=u.headers instanceof Headers?u.headers:new Headers(u.headers);o!==void 0&&S.set("Last-Event-ID",o);try{let g={redirect:"follow",...u,body:u.serializedBody,headers:S,signal:w},R=new Request(A,g);e&&(R=await e(A,g));let m=await(_nullishCoalesce(u.fetch, () => (globalThis.fetch)))(R);if(!m.ok)throw new Error(`SSE failed: ${m.status} ${m.statusText}`);if(!m.body)throw new Error("No body in SSE response");let y=m.body.pipeThrough(new TextDecoderStream).getReader(),h="",F=()=>{try{y.cancel()}catch (e2){}};w.addEventListener("abort",F);try{for(;;){let{done:ne,value:re}=await y.read();if(ne)break;h+=re,h=h.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 M={};_chunkOEIQFP6Tjs.a.call(void 0, M,{activateCreate:()=>Ae,adminAssetAuthoriseHolderCreate:()=>Ce,adminAssetCreate:()=>fe,adminAssetFundCreate:()=>ge,adminAssetList:()=>we,adminAssetPartialUpdate:()=>Te,adminAssetRead:()=>Oe,adminBlacklistedAccountDelete:()=>Re,adminBlacklistedAccountPartialUpdate:()=>be,adminBlacklistedAccountRead:()=>Ee,adminBlacklistedAccountUpdate:()=>xe,adminBlacklistedAccountsCreate:()=>De,adminBlacklistedAccountsList:()=>Se,adminColdstorageAccountsCreate:()=>Pe,adminColdstorageAccountsList:()=>Ue,adminColdstorageAccountsPartialUpdate:()=>Le,adminColdstorageAccountsRead:()=>ze,adminColdstorageList:()=>ke,adminCompanyConfigurationAccountGroupsCreate:()=>Me,adminCompanyConfigurationAccountGroupsDelete:()=>Fe,adminCompanyConfigurationAccountGroupsList:()=>Ie,adminCompanyConfigurationAccountGroupsPartialUpdate:()=>We,adminCompanyConfigurationAccountGroupsRead:()=>ve,adminCompanyConfigurationAccountGroupsUpdate:()=>Ge,adminCompanyConfigurationAnchorPlatformList:()=>Ve,adminCompanyConfigurationAnchorPlatformPartialUpdate:()=>$e,adminCompanyConfigurationAnchorPlatformUpdate:()=>_e,adminCompanyConfigurationList:()=>qe,adminCompanyConfigurationPartialUpdate:()=>He,adminCompanyConfigurationUpdate:()=>Be,adminCompanyList:()=>Ke,adminCompanyPartialUpdate:()=>je,adminCompanyStellarTomlList:()=>Ne,adminFederationCreate:()=>Qe,adminFederationList:()=>Je,adminHotwalletActiveList:()=>en,adminHotwalletCreate:()=>Ze,adminHotwalletEnableMssCreate:()=>nn,adminHotwalletFeesList:()=>rn,adminHotwalletFundList:()=>tn,adminHotwalletList:()=>Xe,adminHotwalletMergeCreate:()=>on,adminHotwalletPartialUpdate:()=>Ye,adminHotwalletSendCreate:()=>an,adminKnownPublicAddressesCreate:()=>dn,adminKnownPublicAddressesDelete:()=>cn,adminKnownPublicAddressesList:()=>sn,adminKnownPublicAddressesPartialUpdate:()=>pn,adminKnownPublicAddressesRead:()=>ln,adminKnownPublicAddressesUpdate:()=>un,adminMemosCreate:()=>hn,adminMemosList:()=>mn,adminSep10AuthenticatedAccountsList:()=>yn,adminSep10AuthenticatedAccountsRead:()=>An,adminSep24TransactionsList:()=>wn,adminSep24TransactionsRead:()=>fn,adminStellarAccountsChangeOwnershipCreate:()=>Rn,adminStellarAccountsGenerateCreate:()=>Tn,adminStellarAccountsList:()=>On,adminStellarAccountsPartialUpdate:()=>gn,adminStellarAccountsRead:()=>Cn,adminTransactionsList:()=>En,adminTransactionsPartialUpdate:()=>Sn,adminTransactionsRead:()=>xn,adminTransactionsSendCreate:()=>bn,adminUsersCreate:()=>kn,adminUsersList:()=>Dn,adminUsersMemosCreate:()=>Ln,adminUsersMemosList:()=>zn,adminUsersPartialUpdate:()=>Pn,adminUsersRead:()=>Un,adminWarmstorageAccountsCreate:()=>qn,adminWarmstorageAccountsList:()=>jn,adminWarmstorageAccountsPartialUpdate:()=>Bn,adminWarmstorageAccountsRead:()=>Hn,adminWarmstorageList:()=>Kn,companyAssetsList:()=>Mn,companyList:()=>In,deactivateCreate:()=>Fn,hooksPrsCreate:()=>vn,infoList:()=>Wn,knownAssetsList:()=>Gn,stellarFederationRead:()=>Vn,transactionsList:()=>$n,transactionsSendCreate:()=>_n,userAccountList:()=>Qn,userAnchorAuthCreate:()=>or,userAnchorSessionsValidateAccountCreate:()=>Yn,userAnchorSessionsValidateCreate:()=>Xn,userAnchorSessionsValidateSessionCreate:()=>Zn,userAnchorTransactionsCreate:()=>tr,userAnchorTransactionsList:()=>er,userAnchorTransactionsPartialUpdate:()=>rr,userAnchorTransactionsRead:()=>nr,userKnownPublicAddressesList:()=>ar,userList:()=>Nn,userMemosCreate:()=>ir,userMemosList:()=>sr,userPartialUpdate:()=>Jn,userTransactionsSendCreate:()=>dr,userUsernameSetCreate:()=>cr});var q={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},ur=Object.entries(se);var N=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:s,responseValidator:a,sseDefaultRetryDelay:l,sseMaxRetryAttempts:d,sseMaxRetryDelay:i,sseSleepFn:c,url:u,...o})=>{let y,b=_nullishCoalesce(c, () => ((p=>new Promise(w=>setTimeout(w,p)))));return{stream:async function*(){let p=_nullishCoalesce(l, () => (3e3)),w=0,C=_nullishCoalesce(o.signal, () => (new AbortController().signal));for(;!C.aborted;){w++;let x=o.headers instanceof Headers?o.headers:new Headers(o.headers);y!==void 0&&x.set("Last-Event-ID",y);try{let g={redirect:"follow",...o,body:o.serializedBody,headers:x,signal:C},T=new Request(u,g);e&&(T=await e(u,g));let m=await(_nullishCoalesce(o.fetch, () => (globalThis.fetch)))(T);if(!m.ok)throw new Error(`SSE failed: ${m.status} ${m.statusText}`);if(!m.body)throw new Error("No body in SSE response");let A=m.body.pipeThrough(new TextDecoderStream).getReader(),S="",F=()=>{try{A.cancel()}catch (e2){}};C.addEventListener("abort",F);try{for(;;){let{done:ne,value:re}=await A.read();if(ne)break;S+=re,S=S.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let v=h.split(`
3
+ `);let v=S.split(`
4
4
 
5
- `);h=_nullishCoalesce(v.pop(), () => (""));for(let te of v){let oe=te.split(`
6
- `),z=[],W;for(let T of oe)if(T.startsWith("data:"))z.push(T.replace(/^data:\s*/,""));else if(T.startsWith("event:"))W=T.replace(/^event:\s*/,"");else if(T.startsWith("id:"))o=T.replace(/^id:\s*/,"");else if(T.startsWith("retry:")){let V=Number.parseInt(T.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(C=V)}let E,G=!1;if(z.length){let T=z.join(`
7
- `);try{E=JSON.parse(T),G=!0}catch (e3){E=T}}G&&(a&&await a(E),s&&(E=await s(E))),_optionalChain([t, 'optionalCall', _2 => _2({data:E,event:W,id:o,retry:C})]),z.length&&(yield E)}}}finally{w.removeEventListener("abort",F),y.releaseLock()}break}catch(g){if(_optionalChain([r, 'optionalCall', _3 => _3(g)]),d!==void 0&&p>=d)break;let R=Math.min(C*2**(p-1),_nullishCoalesce(i, () => (3e4)));await f(R)}}}()}};var ie=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},de=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ce=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},L=({allowReserved:e,explode:r,name:t,style:s,value:a})=>{if(!r){let i=(e?a:a.map(c=>encodeURIComponent(c))).join(de(s));switch(s){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let l=ie(s),d=a.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):x({allowReserved:e,name:t,value:i})).join(l);return s==="label"||s==="matrix"?l+d:d},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)}`},K=({allowReserved:e,explode:r,name:t,style:s,value:a,valueOnly:l})=>{if(a instanceof Date)return l?a.toISOString():`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let c=[];Object.entries(a).forEach(([u,o])=>{c=[...c,u,e?o:encodeURIComponent(o)]});let A=c.join(",");switch(s){case"form":return`${t}=${A}`;case"label":return`.${A}`;case"matrix":return`;${t}=${A}`;default:return A}}let d=ce(s),i=Object.entries(a).map(([c,A])=>x({allowReserved:e,name:s==="deepObject"?`${t}[${c}]`:c,value:A})).join(d);return s==="label"||s==="matrix"?d+i:i};var le=/\{[^{}]+\}/g,pe=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let a of s){let l=!1,d=a.substring(1,a.length-1),i="simple";d.endsWith("*")&&(l=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),i="label"):d.startsWith(";")&&(d=d.substring(1),i="matrix");let c=e[d];if(c==null)continue;if(Array.isArray(c)){t=t.replace(a,L({explode:l,name:d,style:i,value:c}));continue}if(typeof c=="object"){t=t.replace(a,K({explode:l,name:d,style:i,value:c,valueOnly:!0}));continue}if(i==="matrix"){t=t.replace(a,`;${x({name:d,value:c})}`);continue}let A=encodeURIComponent(i==="label"?`.${c}`:c);t=t.replace(a,A)}return t},J=({baseUrl:e,path:r,query:t,querySerializer:s,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,d=(_nullishCoalesce(e, () => ("")))+l;r&&(d=pe({path:r,url:d}));let i=t?s(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(d+=`?${i}`),d};function H(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 Q=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let l in s){let d=s[l];if(d==null)continue;let i=e[l]||r;if(Array.isArray(d)){let c=L({allowReserved:i.allowReserved,explode:!0,name:l,style:"form",value:d,...i.array});c&&a.push(c)}else if(typeof d=="object"){let c=K({allowReserved:i.allowReserved,explode:!0,name:l,style:"deepObject",value:d,...i.object});c&&a.push(c)}else{let c=x({allowReserved:i.allowReserved,name:l,value:d});c&&a.push(c)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await Q(t,r.auth);if(!s)continue;let a=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);break}}},B=e=>J({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),I=(e,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},me=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},j=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?me(t):Object.entries(t);for(let[a,l]of s)if(l===null)r.delete(a);else if(Array.isArray(l))for(let d of l)r.append(a,d);else l!==void 0&&r.set(a,typeof l=="object"?JSON.stringify(l):l)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),he=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),ye={"Content-Type":"application/json"},k=(e={})=>({...q,headers:ye,parseAs:"auto",querySerializer:he,...e});var U=(e={})=>{let r=I(k(),e),t=()=>({...r}),s=u=>(r=I(r,u),t()),a=ee(),l=async u=>{let o={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,u.headers),serializedBody:void 0};o.security&&await Z({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let f=B(o);return{opts:o,url:f}},d=async u=>{let{opts:o,url:f}=await l(u),P={redirect:"follow",...o,body:H(o)},O=new Request(f,P);for(let m of a.request.fns)m&&(O=await m(O,o));let C=o.fetch,p;try{p=await C(O)}catch(m){let y=m;for(let h of a.error.fns)h&&(y=await h(m,void 0,O,o));if(y=y||{},o.throwOnError)throw y;return o.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of a.response.fns)m&&(p=await m(p,O,o));let w={request:O,response:p};if(p.ok){let m=_nullishCoalesce((o.parseAs==="auto"?Y(p.headers.get("Content-Type")):o.parseAs), () => ("json"));if(p.status===204||p.headers.get("Content-Length")==="0"){let h;switch(m){case"arrayBuffer":case"blob":case"text":h=await p[m]();break;case"formData":h=new FormData;break;case"stream":h=p.body;break;case"json":default:h={};break}return o.responseStyle==="data"?h:{data:h,...w}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await p[m]();break;case"json":{let h=await p.text();y=h?JSON.parse(h):{};break}case"stream":return o.responseStyle==="data"?p.body:{data:p.body,...w}}return m==="json"&&(o.responseValidator&&await o.responseValidator(y),o.responseTransformer&&(y=await o.responseTransformer(y))),o.responseStyle==="data"?y:{data:y,...w}}let S=await p.text(),g;try{g=JSON.parse(S)}catch (e4){}let R=_nullishCoalesce(g, () => (S)),b=R;for(let m of a.error.fns)m&&(b=await m(R,p,O,o));if(b=b||{},o.throwOnError)throw b;return o.responseStyle==="data"?void 0:{error:b,...w}},i=u=>o=>d({...o,method:u}),c=u=>async o=>{let{opts:f,url:P}=await l(o);return N({...f,body:f.body,headers:f.headers,method:u,onRequest:async(O,C)=>{let p=new Request(O,C);for(let w of a.request.fns)w&&(p=await w(p,f));return p},serializedBody:H(f),url:P})};return{buildUrl:u=>B({...r,...u}),connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:t,head:i("HEAD"),interceptors:a,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:d,setConfig:s,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:i("TRACE")}};var n=U(k({baseUrl:"https://stellar-testnet.services.rehive.com/api/1"}));var Ae=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/",...e}),fe=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/authorise_holder/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/fund/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(_nullishCoalesce(e.client, () => (n))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-accounts/",...e}),De=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/",...e}),Ue=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/{id}/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),je=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e}),He=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Fe=e=>(_nullishCoalesce(e.client, () => (n))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e}),We=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/anchor_platform/",...e}),_e=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/anchor_platform/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/anchor_platform/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/stellar-toml/",...e}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/federation/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/federation/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/",...e}),Ye=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/",...e,headers:{"Content-Type":"application/json",...e.headers}}),en=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/active/",...e}),nn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/enable_mss/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/fees/",...e}),tn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/fund/",...e}),on=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/merge/",...e,headers:{"Content-Type":"application/json",...e.headers}}),an=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/",...e}),dn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cn=e=>(_nullishCoalesce(e.client, () => (n))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e}),ln=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e}),pn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),un=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),mn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/memos/",...e}),hn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/memos/",...e,headers:{"Content-Type":"application/json",...e.headers}}),yn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _35 => _35.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep10-authenticated-accounts/",...e}),An=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep10-authenticated-accounts/{id}/",...e}),wn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep24-transactions/",...e}),fn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep24-transactions/{id}/",...e}),On=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/",...e}),Tn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/generate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/{id}/",...e}),gn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Rn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/{id}/change_ownership/",...e,headers:{"Content-Type":"application/json",...e.headers}}),En=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/",...e}),bn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{id}/",...e}),Sn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),kn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Un=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e}),Pn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/memos/",...e}),Ln=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/memos/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _40 => _40.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/",...e}),jn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _41 => _41.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/",...e}),qn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/{id}/",...e}),Bn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),In=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _42 => _42.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/company/",...e}),Mn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _43 => _43.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/company/assets/",...e}),Fn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/hooks/prs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _44 => _44.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/info/",...e}),Gn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _45 => _45.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/known-assets/",...e}),Vn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/stellar_federation/{company}/",...e}),_n=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _46 => _46.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/transactions/",...e}),$n=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/transactions/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Nn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _47 => _47.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Jn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _48 => _48.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/account/",...e}),Xn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/sessions/{session_id}/validate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/sessions/{session_id}/validate_account/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Zn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/sessions/{session_id}/validate_session/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _49 => _49.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/",...e}),nr=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/{transaction_id}/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/{transaction_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/{transaction_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/{company_id}/auth/",...e}),ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _50 => _50.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/known-public-addresses/",...e}),sr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _51 => _51.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/memos/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/memos/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dr=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cr=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/username/set/",...e,headers:{"Content-Type":"application/json",...e.headers}});function lr(e){let r=U(_chunkGR5TETAUjs.c.call(void 0, e,"https://stellar-testnet.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, M,r)}exports.createStellarTestnetApi = lr;
5
+ `);S=_nullishCoalesce(v.pop(), () => (""));for(let te of v){let oe=te.split(`
6
+ `),z=[],W;for(let O of oe)if(O.startsWith("data:"))z.push(O.replace(/^data:\s*/,""));else if(O.startsWith("event:"))W=O.replace(/^event:\s*/,"");else if(O.startsWith("id:"))y=O.replace(/^id:\s*/,"");else if(O.startsWith("retry:")){let V=Number.parseInt(O.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(p=V)}let R,G=!1;if(z.length){let O=z.join(`
7
+ `);try{R=JSON.parse(O),G=!0}catch (e3){R=O}}G&&(a&&await a(R),s&&(R=await s(R))),_optionalChain([t, 'optionalCall', _2 => _2({data:R,event:W,id:y,retry:p})]),z.length&&(yield R)}}}finally{C.removeEventListener("abort",F),A.releaseLock()}break}catch(g){if(_optionalChain([r, 'optionalCall', _3 => _3(g)]),d!==void 0&&w>=d)break;let T=Math.min(p*2**(w-1),_nullishCoalesce(i, () => (3e4)));await b(T)}}}()}};var ie=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},de=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ce=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},L=({allowReserved:e,explode:r,name:t,style:s,value:a})=>{if(!r){let i=(e?a:a.map(c=>encodeURIComponent(c))).join(de(s));switch(s){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let l=ie(s),d=a.map(i=>s==="label"||s==="simple"?e?i:encodeURIComponent(i):E({allowReserved:e,name:t,value:i})).join(l);return s==="label"||s==="matrix"?l+d:d},E=({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)}`},K=({allowReserved:e,explode:r,name:t,style:s,value:a,valueOnly:l})=>{if(a instanceof Date)return l?a.toISOString():`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!r){let c=[];Object.entries(a).forEach(([o,y])=>{c=[...c,o,e?y:encodeURIComponent(y)]});let u=c.join(",");switch(s){case"form":return`${t}=${u}`;case"label":return`.${u}`;case"matrix":return`;${t}=${u}`;default:return u}}let d=ce(s),i=Object.entries(a).map(([c,u])=>E({allowReserved:e,name:s==="deepObject"?`${t}[${c}]`:c,value:u})).join(d);return s==="label"||s==="matrix"?d+i:i};var le=/\{[^{}]+\}/g,pe=({path:e,url:r})=>{let t=r,s=r.match(le);if(s)for(let a of s){let l=!1,d=a.substring(1,a.length-1),i="simple";d.endsWith("*")&&(l=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),i="label"):d.startsWith(";")&&(d=d.substring(1),i="matrix");let c=e[d];if(c==null)continue;if(Array.isArray(c)){t=t.replace(a,L({explode:l,name:d,style:i,value:c}));continue}if(typeof c=="object"){t=t.replace(a,K({explode:l,name:d,style:i,value:c,valueOnly:!0}));continue}if(i==="matrix"){t=t.replace(a,`;${E({name:d,value:c})}`);continue}let u=encodeURIComponent(i==="label"?`.${c}`:c);t=t.replace(a,u)}return t},J=({baseUrl:e,path:r,query:t,querySerializer:s,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,d=(_nullishCoalesce(e, () => ("")))+l;r&&(d=pe({path:r,url:d}));let i=t?s(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(d+=`?${i}`),d};function H(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 Q=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var X=({parameters:e={},...r}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let l in s){let d=s[l];if(d==null)continue;let i=e[l]||r;if(Array.isArray(d)){let c=L({allowReserved:i.allowReserved,explode:!0,name:l,style:"form",value:d,...i.array});c&&a.push(c)}else if(typeof d=="object"){let c=K({allowReserved:i.allowReserved,explode:!0,name:l,style:"deepObject",value:d,...i.object});c&&a.push(c)}else{let c=E({allowReserved:i.allowReserved,name:l,value:d});c&&a.push(c)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ue=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let t of e){if(ue(r,t.name))continue;let s=await Q(t,r.auth);if(!s)continue;let a=_nullishCoalesce(t.name, () => ("Authorization"));switch(t.in){case"query":r.query||(r.query={}),r.query[a]=s;break;case"cookie":r.headers.append("Cookie",`${a}=${s}`);break;case"header":default:r.headers.set(a,s);break}}},B=e=>J({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),I=(e,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},me=e=>{let r=[];return e.forEach((t,s)=>{r.push([s,t])}),r},j=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let s=t instanceof Headers?me(t):Object.entries(t);for(let[a,l]of s)if(l===null)r.delete(a);else if(Array.isArray(l))for(let d of l)r.append(a,d);else l!==void 0&&r.set(a,typeof l=="object"?JSON.stringify(l):l)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let s=this.getInterceptorIndex(r);return this.fns[s]?(this.fns[s]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),he=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),ye={"Content-Type":"application/json"},k=(e={})=>({...q,headers:ye,parseAs:"auto",querySerializer:he,...e});var U=(e={})=>{let r=I(k(),e),t=()=>({...r}),s=u=>(r=I(r,u),t()),a=ee(),l=async u=>{let o={...r,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:j(r.headers,u.headers),serializedBody:void 0};o.security&&await Z({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let y=B(o);return{opts:o,url:y}},d=async u=>{let{opts:o,url:y}=await l(u),b={redirect:"follow",...o,body:H(o)},f=new Request(y,b);for(let h of a.request.fns)h&&(f=await h(f,o));let P=o.fetch,p;try{p=await P(f)}catch(h){let m=h;for(let A of a.error.fns)A&&(m=await A(h,void 0,f,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,request:f,response:void 0}}for(let h of a.response.fns)h&&(p=await h(p,f,o));let w={request:f,response:p};if(p.ok){let h=_nullishCoalesce((o.parseAs==="auto"?Y(p.headers.get("Content-Type")):o.parseAs), () => ("json"));if(p.status===204||p.headers.get("Content-Length")==="0"){let A;switch(h){case"arrayBuffer":case"blob":case"text":A=await p[h]();break;case"formData":A=new FormData;break;case"stream":A=p.body;break;case"json":default:A={};break}return o.responseStyle==="data"?A:{data:A,...w}}let m;switch(h){case"arrayBuffer":case"blob":case"formData":case"text":m=await p[h]();break;case"json":{let A=await p.text();m=A?JSON.parse(A):{};break}case"stream":return o.responseStyle==="data"?p.body:{data:p.body,...w}}return h==="json"&&(o.responseValidator&&await o.responseValidator(m),o.responseTransformer&&(m=await o.responseTransformer(m))),o.responseStyle==="data"?m:{data:m,...w}}let C=await p.text(),x;try{x=JSON.parse(C)}catch (e4){}let g=_nullishCoalesce(x, () => (C)),T=g;for(let h of a.error.fns)h&&(T=await h(g,p,f,o));if(T=T||{},o.throwOnError)throw T;return o.responseStyle==="data"?void 0:{error:T,...w}},i=u=>o=>d({...o,method:u}),c=u=>async o=>{let{opts:y,url:b}=await l(o);return N({...y,body:y.body,headers:y.headers,method:u,onRequest:async(f,P)=>{let p=new Request(f,P);for(let w of a.request.fns)w&&(p=await w(p,y));return p},serializedBody:H(y),url:b})};return{buildUrl:B,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:t,head:i("HEAD"),interceptors:a,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:d,setConfig:s,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:i("TRACE")}};var n=U(k({baseUrl:"https://stellar-testnet.services.rehive.com/api/1"}));var Ae=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/",...e}),fe=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/authorise_holder/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ge=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/asset/{id}/fund/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(_nullishCoalesce(e.client, () => (n))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e}),Ee=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-account/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-accounts/",...e}),De=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/blacklisted-accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/",...e}),Ue=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/{id}/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/coldstorage/accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),je=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e}),He=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ie=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/",...e}),Me=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Fe=e=>(_nullishCoalesce(e.client, () => (n))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e}),We=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/account-groups/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/anchor_platform/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/anchor_platform/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/configuration/anchor_platform/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/stellar-toml/",...e}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/federation/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/federation/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/",...e}),Ye=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ze=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/",...e,headers:{"Content-Type":"application/json",...e.headers}}),en=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/active/",...e}),nn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/enable_mss/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/fees/",...e}),tn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/fund/",...e}),on=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/merge/",...e,headers:{"Content-Type":"application/json",...e.headers}}),an=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/hotwallet/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),sn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/",...e}),dn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cn=e=>(_nullishCoalesce(e.client, () => (n))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e}),ln=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e}),pn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),un=e=>(_nullishCoalesce(e.client, () => (n))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/known-public-addresses/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),mn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/memos/",...e}),hn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/memos/",...e,headers:{"Content-Type":"application/json",...e.headers}}),yn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _35 => _35.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep10-authenticated-accounts/",...e}),An=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep10-authenticated-accounts/{id}/",...e}),wn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _36 => _36.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep24-transactions/",...e}),fn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/sep24-transactions/{id}/",...e}),On=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _37 => _37.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/",...e}),Tn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/generate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Cn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/{id}/",...e}),gn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Rn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/stellar_accounts/{id}/change_ownership/",...e,headers:{"Content-Type":"application/json",...e.headers}}),En=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _38 => _38.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/",...e}),bn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{id}/",...e}),Sn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transactions/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Dn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _39 => _39.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e}),kn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Un=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e}),Pn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/memos/",...e}),Ln=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/users/{id}/memos/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _40 => _40.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/",...e}),jn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _41 => _41.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/",...e}),qn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/{id}/",...e}),Bn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/warmstorage/accounts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),In=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _42 => _42.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/company/",...e}),Mn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _43 => _43.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/company/assets/",...e}),Fn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),vn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/hooks/prs/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _44 => _44.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/info/",...e}),Gn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _45 => _45.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/known-assets/",...e}),Vn=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/stellar_federation/{company}/",...e}),$n=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _46 => _46.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/transactions/",...e}),_n=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/transactions/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Nn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _47 => _47.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e}),Jn=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qn=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _48 => _48.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/account/",...e}),Xn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/sessions/{session_id}/validate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/sessions/{session_id}/validate_account/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Zn=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/sessions/{session_id}/validate_session/",...e,headers:{"Content-Type":"application/json",...e.headers}}),er=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _49 => _49.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/",...e}),nr=e=>(_nullishCoalesce(e.client, () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/{transaction_id}/",...e}),rr=e=>(_nullishCoalesce(e.client, () => (n))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/{transaction_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tr=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/transactions/{transaction_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/anchor/{company_id}/auth/",...e}),ar=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _50 => _50.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/known-public-addresses/",...e}),sr=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _51 => _51.client]), () => (n))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/memos/",...e}),ir=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/memos/",...e,headers:{"Content-Type":"application/json",...e.headers}}),dr=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/transactions/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),cr=e=>(_nullishCoalesce(e.client, () => (n))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/user/username/set/",...e,headers:{"Content-Type":"application/json",...e.headers}});function lr(e){let r=U(_chunkGR5TETAUjs.c.call(void 0, e,"https://stellar-testnet.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, M,r)}exports.createStellarTestnetApi = lr;