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
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var K={};_chunkOEIQFP6Tjs.a.call(void 0, K,{activateCreate:()=>me,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>Oe,adminTransactionUpdateBatchesCreate:()=>Re,adminTransactionUpdateBatchesList:()=>ge,adminTransactionUpdateBatchesPartialUpdate:()=>Se,adminTransactionUpdateBatchesRetrieve:()=>Te,adminTransactionUpdateBatchesRowsList:()=>Ae,adminTransactionUpdateBatchesUpdate:()=>xe,adminUploadsCreate:()=>Ce,adminUploadsList:()=>Ue,adminUploadsPartialUpdate:()=>ke,adminUploadsRetrieve:()=>Ee,adminUploadsTransactionsList:()=>De,adminUploadsUpdate:()=>ze,deactivateCreate:()=>qe,uploadsCreate:()=>je,uploadsList:()=>Pe,uploadsPartialUpdate:()=>Ie,uploadsRetrieve:()=>Be,uploadsTransactionsList:()=>Le,uploadsUpdate:()=>ve,webhookCreate:()=>$e});var I={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ne=Object.entries(se);var W=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:o,responseValidator:a,sseDefaultRetryDelay:d,sseMaxRetryAttempts:i,sseMaxRetryDelay:s,sseSleepFn:p,url:m,...u})=>{let n,w=_nullishCoalesce(p, () => ((R=>new Promise(l=>setTimeout(l,R)))));return{stream:async function*(){let R=_nullishCoalesce(d, () => (3e3)),l=0,b=_nullishCoalesce(u.signal, () => (new AbortController().signal));for(;!b.aborted;){l++;let C=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&C.set("Last-Event-ID",n);try{let T={redirect:"follow",...u,body:u.serializedBody,headers:C,signal:b},S=new Request(m,T);e&&(S=await e(m,T));let f=await(_nullishCoalesce(u.fetch, () => (globalThis.fetch)))(S);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="",M=()=>{try{h.cancel()}catch (e2){}};b.addEventListener("abort",M);try{for(;;){let{done:te,value:re}=await h.read();if(te)break;y+=re,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 K={};_chunkOEIQFP6Tjs.a.call(void 0, K,{activateCreate:()=>me,adminCompanyPartialUpdate:()=>Oe,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>ge,adminTransactionUpdateBatchesCreate:()=>Re,adminTransactionUpdateBatchesList:()=>we,adminTransactionUpdateBatchesPartialUpdate:()=>Se,adminTransactionUpdateBatchesRetrieve:()=>Te,adminTransactionUpdateBatchesRowsList:()=>Ae,adminTransactionUpdateBatchesUpdate:()=>xe,adminUploadsCreate:()=>Ue,adminUploadsList:()=>Ce,adminUploadsPartialUpdate:()=>ke,adminUploadsRetrieve:()=>Ee,adminUploadsTransactionsList:()=>De,adminUploadsUpdate:()=>ze,deactivateCreate:()=>qe,uploadsCreate:()=>je,uploadsList:()=>Pe,uploadsPartialUpdate:()=>Ie,uploadsRetrieve:()=>Be,uploadsTransactionsList:()=>Le,uploadsUpdate:()=>ve,webhookCreate:()=>$e});var I={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ne=Object.entries(se);var W=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:o,responseValidator:a,sseDefaultRetryDelay:d,sseMaxRetryAttempts:i,sseMaxRetryDelay:s,sseSleepFn:p,url:u,...n})=>{let h,A=_nullishCoalesce(p, () => ((l=>new Promise(b=>setTimeout(b,l)))));return{stream:async function*(){let l=_nullishCoalesce(d, () => (3e3)),b=0,R=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!R.aborted;){b++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&C.set("Last-Event-ID",h);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},w=new Request(u,T);e&&(w=await e(u,T));let f=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(w);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let m=f.body.pipeThrough(new TextDecoderStream).getReader(),U="",M=()=>{try{m.cancel()}catch (e2){}};R.addEventListener("abort",M);try{for(;;){let{done:te,value:re}=await m.read();if(te)break;U+=re,U=U.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let N=y.split(`
3
+ `);let N=U.split(`
4
4
 
5
- `);y=_nullishCoalesce(N.pop(), () => (""));for(let ne of N){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:"))n=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let V=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(R=V)}let x,_=!1;if(q.length){let g=q.join(`
7
- `);try{x=JSON.parse(g),_=!0}catch (e3){x=g}}_&&(a&&await a(x),o&&(x=await o(x))),_optionalChain([r, 'optionalCall', _2 => _2({data:x,event:H,id:n,retry:R})]),q.length&&(yield x)}}}finally{b.removeEventListener("abort",M),h.releaseLock()}break}catch(T){if(_optionalChain([t, 'optionalCall', _3 => _3(T)]),i!==void 0&&l>=i)break;let S=Math.min(R*2**(l-1),_nullishCoalesce(s, () => (3e4)));await w(S)}}}()}};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:t,name:r,style:o,value:a})=>{if(!t){let s=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(o));switch(o){case"label":return`.${s}`;case"matrix":return`;${r}=${s}`;case"simple":return s;default:return`${r}=${s}`}}let d=ie(o),i=a.map(s=>o==="label"||o==="simple"?e?s:encodeURIComponent(s):U({allowReserved:e,name:r,value:s})).join(d);return o==="label"||o==="matrix"?d+i:i},U=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:o,value:a,valueOnly:d})=>{if(a instanceof Date)return d?a.toISOString():`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!t){let p=[];Object.entries(a).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let m=p.join(",");switch(o){case"form":return`${r}=${m}`;case"label":return`.${m}`;case"matrix":return`;${r}=${m}`;default:return m}}let i=de(o),s=Object.entries(a).map(([p,m])=>U({allowReserved:e,name:o==="deepObject"?`${r}[${p}]`:p,value:m})).join(i);return o==="label"||o==="matrix"?i+s:s};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,o=t.match(le);if(o)for(let a of o){let d=!1,i=a.substring(1,a.length-1),s="simple";i.endsWith("*")&&(d=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),s="label"):i.startsWith(";")&&(i=i.substring(1),s="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){r=r.replace(a,P({explode:d,name:i,style:s,value:p}));continue}if(typeof p=="object"){r=r.replace(a,j({explode:d,name:i,style:s,value:p,valueOnly:!0}));continue}if(s==="matrix"){r=r.replace(a,`;${U({name:i,value:p})}`);continue}let m=encodeURIComponent(s==="label"?`.${p}`:p);r=r.replace(a,m)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:o,url:a})=>{let d=a.startsWith("/")?a:`/${a}`,i=(_nullishCoalesce(e, () => ("")))+d;t&&(i=ce({path:t,url:i}));let s=r?o(r):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(i+=`?${s}`),i};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let d in o){let i=o[d];if(i==null)continue;let s=e[d]||t;if(Array.isArray(i)){let p=P({allowReserved:s.allowReserved,explode:!0,name:d,style:"form",value:i,...s.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:s.allowReserved,explode:!0,name:d,style:"deepObject",value:i,...s.object});p&&a.push(p)}else{let p=U({allowReserved:s.allowReserved,name:d,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let t=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[t]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${t}=`)])):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let o=await G(r,t.auth);if(!o)continue;let a=_nullishCoalesce(r.name, () => ("Authorization"));switch(r.in){case"query":t.query||(t.query={}),t.query[a]=o;break;case"cookie":t.headers.append("Cookie",`${a}=${o}`);break;case"header":default:t.headers.set(a,o);break}}},L=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),$=(e,t)=>{let r={...e,...t};return _optionalChain([r, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=B(e.headers,t.headers),r},fe=e=>{let t=[];return e.forEach((r,o)=>{t.push([o,r])}),t},B=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let o=r instanceof Headers?fe(r):Object.entries(r);for(let[a,d]of o)if(d===null)t.delete(a);else if(Array.isArray(d))for(let i of d)t.append(a,i);else d!==void 0&&t.set(a,typeof d=="object"?JSON.stringify(d):d)}return t},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let o=this.getInterceptorIndex(t);return this.fns[o]?(this.fns[o]=r,t):!1}use(t){return this.fns.push(t),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},k=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let t=$(k(),e),r=()=>({...t}),o=u=>(t=$(t,u),r()),a=ee(),d=async u=>{let n={...t,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (t.fetch)), () => (globalThis.fetch)),headers:B(t.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:v(n)},O=new Request(w,D);for(let f of a.request.fns)f&&(O=await f(O,n));let R=n.fetch,l;try{l=await R(O)}catch(f){let h=f;for(let y of a.error.fns)y&&(h=await y(f,void 0,O,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,request:O,response:void 0}}for(let f of a.response.fns)f&&(l=await f(l,O,n));let b={request:O,response:l};if(l.ok){let f=_nullishCoalesce((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,...b}}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,...b}}return f==="json"&&(n.responseValidator&&await n.responseValidator(h),n.responseTransformer&&(h=await n.responseTransformer(h))),n.responseStyle==="data"?h:{data:h,...b}}let C=await l.text(),T;try{T=JSON.parse(C)}catch (e4){}let S=_nullishCoalesce(T, () => (C)),A=S;for(let f of a.error.fns)f&&(A=await f(S,l,O,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,...b}},s=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:w,url:D}=await d(n);return W({...w,body:w.body,headers:w.headers,method:u,onRequest:async(O,R)=>{let l=new Request(O,R);for(let b of a.request.fns)b&&(l=await b(l,w));return l},serializedBody:v(w),url:D})};return{buildUrl:u=>L({...t,...u}),connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:r,head:s("HEAD"),interceptors:a,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:i,setConfig:o,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:s("TRACE")}};var c=z(k({baseUrl:"https://mass-send.services.rehive.com/api/1/"}));var me=e=>(_nullishCoalesce(e.client, () => (c))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (c))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/rows/",...e}),Ue=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (c))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/transactions/",...e}),qe=e=>(_nullishCoalesce(e.client, () => (c))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e}),je=e=>(_nullishCoalesce(e.client, () => (c))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/transactions/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (c))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ke(e){let t=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://mass-send.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, K,t)}exports.createMassSendApi = Ke;
5
+ `);U=_nullishCoalesce(N.pop(), () => (""));for(let ne of N){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:"))h=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let _=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(_)||(l=_)}let S,V=!1;if(q.length){let g=q.join(`
7
+ `);try{S=JSON.parse(g),V=!0}catch (e3){S=g}}V&&(a&&await a(S),o&&(S=await o(S))),_optionalChain([r, 'optionalCall', _2 => _2({data:S,event:H,id:h,retry:l})]),q.length&&(yield S)}}}finally{R.removeEventListener("abort",M),m.releaseLock()}break}catch(T){if(_optionalChain([t, 'optionalCall', _3 => _3(T)]),i!==void 0&&b>=i)break;let w=Math.min(l*2**(b-1),_nullishCoalesce(s, () => (3e4)));await A(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"&"}},P=({allowReserved:e,explode:t,name:r,style:o,value:a})=>{if(!t){let s=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(o));switch(o){case"label":return`.${s}`;case"matrix":return`;${r}=${s}`;case"simple":return s;default:return`${r}=${s}`}}let d=ie(o),i=a.map(s=>o==="label"||o==="simple"?e?s:encodeURIComponent(s):x({allowReserved:e,name:r,value:s})).join(d);return o==="label"||o==="matrix"?d+i:i},x=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:o,value:a,valueOnly:d})=>{if(a instanceof Date)return d?a.toISOString():`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!t){let p=[];Object.entries(a).forEach(([n,h])=>{p=[...p,n,e?h:encodeURIComponent(h)]});let u=p.join(",");switch(o){case"form":return`${r}=${u}`;case"label":return`.${u}`;case"matrix":return`;${r}=${u}`;default:return u}}let i=de(o),s=Object.entries(a).map(([p,u])=>x({allowReserved:e,name:o==="deepObject"?`${r}[${p}]`:p,value:u})).join(i);return o==="label"||o==="matrix"?i+s:s};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,o=t.match(le);if(o)for(let a of o){let d=!1,i=a.substring(1,a.length-1),s="simple";i.endsWith("*")&&(d=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),s="label"):i.startsWith(";")&&(i=i.substring(1),s="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){r=r.replace(a,P({explode:d,name:i,style:s,value:p}));continue}if(typeof p=="object"){r=r.replace(a,j({explode:d,name:i,style:s,value:p,valueOnly:!0}));continue}if(s==="matrix"){r=r.replace(a,`;${x({name:i,value:p})}`);continue}let u=encodeURIComponent(s==="label"?`.${p}`:p);r=r.replace(a,u)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:o,url:a})=>{let d=a.startsWith("/")?a:`/${a}`,i=(_nullishCoalesce(e, () => ("")))+d;t&&(i=ce({path:t,url:i}));let s=r?o(r):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(i+=`?${s}`),i};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let d in o){let i=o[d];if(i==null)continue;let s=e[d]||t;if(Array.isArray(i)){let p=P({allowReserved:s.allowReserved,explode:!0,name:d,style:"form",value:i,...s.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:s.allowReserved,explode:!0,name:d,style:"deepObject",value:i,...s.object});p&&a.push(p)}else{let p=x({allowReserved:s.allowReserved,name:d,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let t=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[t]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${t}=`)])):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let o=await G(r,t.auth);if(!o)continue;let a=_nullishCoalesce(r.name, () => ("Authorization"));switch(r.in){case"query":t.query||(t.query={}),t.query[a]=o;break;case"cookie":t.headers.append("Cookie",`${a}=${o}`);break;case"header":default:t.headers.set(a,o);break}}},L=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),$=(e,t)=>{let r={...e,...t};return _optionalChain([r, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=B(e.headers,t.headers),r},fe=e=>{let t=[];return e.forEach((r,o)=>{t.push([o,r])}),t},B=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let o=r instanceof Headers?fe(r):Object.entries(r);for(let[a,d]of o)if(d===null)t.delete(a);else if(Array.isArray(d))for(let i of d)t.append(a,i);else d!==void 0&&t.set(a,typeof d=="object"?JSON.stringify(d):d)}return t},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let o=this.getInterceptorIndex(t);return this.fns[o]?(this.fns[o]=r,t):!1}use(t){return this.fns.push(t),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},k=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let t=$(k(),e),r=()=>({...t}),o=u=>(t=$(t,u),r()),a=ee(),d=async u=>{let n={...t,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (t.fetch)), () => (globalThis.fetch)),headers:B(t.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),A={redirect:"follow",...n,body:v(n)},O=new Request(h,A);for(let y of a.request.fns)y&&(O=await y(O,n));let D=n.fetch,l;try{l=await D(O)}catch(y){let f=y;for(let m of a.error.fns)m&&(f=await m(y,void 0,O,n));if(f=f||{},n.throwOnError)throw f;return n.responseStyle==="data"?void 0:{error:f,request:O,response:void 0}}for(let y of a.response.fns)y&&(l=await y(l,O,n));let b={request:O,response:l};if(l.ok){let y=_nullishCoalesce((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,...b}}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,...b}}return y==="json"&&(n.responseValidator&&await n.responseValidator(f),n.responseTransformer&&(f=await n.responseTransformer(f))),n.responseStyle==="data"?f:{data:f,...b}}let R=await l.text(),C;try{C=JSON.parse(R)}catch (e4){}let T=_nullishCoalesce(C, () => (R)),w=T;for(let y of a.error.fns)y&&(w=await y(T,l,O,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...b}},s=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:h,url:A}=await d(n);return W({...h,body:h.body,headers:h.headers,method:u,onRequest:async(O,D)=>{let l=new Request(O,D);for(let b of a.request.fns)b&&(l=await b(l,h));return l},serializedBody:v(h),url:A})};return{buildUrl:L,connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:r,head:s("HEAD"),interceptors:a,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:i,setConfig:o,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:s("TRACE")}};var c=z(k({baseUrl:"https://mass-send.services.rehive.com/api/1/"}));var me=e=>(_nullishCoalesce(e.client, () => (c))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (c))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/rows/",...e}),Ce=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (c))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/transactions/",...e}),qe=e=>(_nullishCoalesce(e.client, () => (c))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e}),je=e=>(_nullishCoalesce(e.client, () => (c))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (c))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(e.client, () => (c))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (c))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/transactions/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (c))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ke(e){let t=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://mass-send.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, K,t)}exports.createMassSendApi = Ke;
@@ -1,7 +1,7 @@
1
- import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var K={};oe(K,{activateCreate:()=>me,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>Oe,adminTransactionUpdateBatchesCreate:()=>Re,adminTransactionUpdateBatchesList:()=>ge,adminTransactionUpdateBatchesPartialUpdate:()=>Se,adminTransactionUpdateBatchesRetrieve:()=>Te,adminTransactionUpdateBatchesRowsList:()=>Ae,adminTransactionUpdateBatchesUpdate:()=>xe,adminUploadsCreate:()=>Ce,adminUploadsList:()=>Ue,adminUploadsPartialUpdate:()=>ke,adminUploadsRetrieve:()=>Ee,adminUploadsTransactionsList:()=>De,adminUploadsUpdate:()=>ze,deactivateCreate:()=>qe,uploadsCreate:()=>je,uploadsList:()=>Pe,uploadsPartialUpdate:()=>Ie,uploadsRetrieve:()=>Be,uploadsTransactionsList:()=>Le,uploadsUpdate:()=>ve,webhookCreate:()=>$e});var I={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ne=Object.entries(se);var W=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:o,responseValidator:a,sseDefaultRetryDelay:d,sseMaxRetryAttempts:i,sseMaxRetryDelay:s,sseSleepFn:p,url:m,...u})=>{let n,w=p??(R=>new Promise(l=>setTimeout(l,R)));return{stream:async function*(){let R=d??3e3,l=0,b=u.signal??new AbortController().signal;for(;!b.aborted;){l++;let C=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&C.set("Last-Event-ID",n);try{let T={redirect:"follow",...u,body:u.serializedBody,headers:C,signal:b},S=new Request(m,T);e&&(S=await e(m,T));let f=await(u.fetch??globalThis.fetch)(S);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="",M=()=>{try{h.cancel()}catch{}};b.addEventListener("abort",M);try{for(;;){let{done:te,value:re}=await h.read();if(te)break;y+=re,y=y.replace(/\r\n/g,`
1
+ import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as oe}from"../chunk-S4QKN5WW.mjs";var K={};oe(K,{activateCreate:()=>me,adminCompanyPartialUpdate:()=>Oe,adminCompanyRetrieve:()=>be,adminCompanyUpdate:()=>ge,adminTransactionUpdateBatchesCreate:()=>Re,adminTransactionUpdateBatchesList:()=>we,adminTransactionUpdateBatchesPartialUpdate:()=>Se,adminTransactionUpdateBatchesRetrieve:()=>Te,adminTransactionUpdateBatchesRowsList:()=>Ae,adminTransactionUpdateBatchesUpdate:()=>xe,adminUploadsCreate:()=>Ue,adminUploadsList:()=>Ce,adminUploadsPartialUpdate:()=>ke,adminUploadsRetrieve:()=>Ee,adminUploadsTransactionsList:()=>De,adminUploadsUpdate:()=>ze,deactivateCreate:()=>qe,uploadsCreate:()=>je,uploadsList:()=>Pe,uploadsPartialUpdate:()=>Ie,uploadsRetrieve:()=>Be,uploadsTransactionsList:()=>Le,uploadsUpdate:()=>ve,webhookCreate:()=>$e});var I={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var se={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Ne=Object.entries(se);var W=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:o,responseValidator:a,sseDefaultRetryDelay:d,sseMaxRetryAttempts:i,sseMaxRetryDelay:s,sseSleepFn:p,url:u,...n})=>{let h,A=p??(l=>new Promise(b=>setTimeout(b,l)));return{stream:async function*(){let l=d??3e3,b=0,R=n.signal??new AbortController().signal;for(;!R.aborted;){b++;let C=n.headers instanceof Headers?n.headers:new Headers(n.headers);h!==void 0&&C.set("Last-Event-ID",h);try{let T={redirect:"follow",...n,body:n.serializedBody,headers:C,signal:R},w=new Request(u,T);e&&(w=await e(u,T));let f=await(n.fetch??globalThis.fetch)(w);if(!f.ok)throw new Error(`SSE failed: ${f.status} ${f.statusText}`);if(!f.body)throw new Error("No body in SSE response");let m=f.body.pipeThrough(new TextDecoderStream).getReader(),U="",M=()=>{try{m.cancel()}catch{}};R.addEventListener("abort",M);try{for(;;){let{done:te,value:re}=await m.read();if(te)break;U+=re,U=U.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let N=y.split(`
3
+ `);let N=U.split(`
4
4
 
5
- `);y=N.pop()??"";for(let ne of N){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:"))n=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let V=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(R=V)}let x,_=!1;if(q.length){let g=q.join(`
7
- `);try{x=JSON.parse(g),_=!0}catch{x=g}}_&&(a&&await a(x),o&&(x=await o(x))),r?.({data:x,event:H,id:n,retry:R}),q.length&&(yield x)}}}finally{b.removeEventListener("abort",M),h.releaseLock()}break}catch(T){if(t?.(T),i!==void 0&&l>=i)break;let S=Math.min(R*2**(l-1),s??3e4);await w(S)}}}()}};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:t,name:r,style:o,value:a})=>{if(!t){let s=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(o));switch(o){case"label":return`.${s}`;case"matrix":return`;${r}=${s}`;case"simple":return s;default:return`${r}=${s}`}}let d=ie(o),i=a.map(s=>o==="label"||o==="simple"?e?s:encodeURIComponent(s):U({allowReserved:e,name:r,value:s})).join(d);return o==="label"||o==="matrix"?d+i:i},U=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:o,value:a,valueOnly:d})=>{if(a instanceof Date)return d?a.toISOString():`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!t){let p=[];Object.entries(a).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let m=p.join(",");switch(o){case"form":return`${r}=${m}`;case"label":return`.${m}`;case"matrix":return`;${r}=${m}`;default:return m}}let i=de(o),s=Object.entries(a).map(([p,m])=>U({allowReserved:e,name:o==="deepObject"?`${r}[${p}]`:p,value:m})).join(i);return o==="label"||o==="matrix"?i+s:s};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,o=t.match(le);if(o)for(let a of o){let d=!1,i=a.substring(1,a.length-1),s="simple";i.endsWith("*")&&(d=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),s="label"):i.startsWith(";")&&(i=i.substring(1),s="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){r=r.replace(a,P({explode:d,name:i,style:s,value:p}));continue}if(typeof p=="object"){r=r.replace(a,j({explode:d,name:i,style:s,value:p,valueOnly:!0}));continue}if(s==="matrix"){r=r.replace(a,`;${U({name:i,value:p})}`);continue}let m=encodeURIComponent(s==="label"?`.${p}`:p);r=r.replace(a,m)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:o,url:a})=>{let d=a.startsWith("/")?a:`/${a}`,i=(e??"")+d;t&&(i=ce({path:t,url:i}));let s=r?o(r):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(i+=`?${s}`),i};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let d in o){let i=o[d];if(i==null)continue;let s=e[d]||t;if(Array.isArray(i)){let p=P({allowReserved:s.allowReserved,explode:!0,name:d,style:"form",value:i,...s.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:s.allowReserved,explode:!0,name:d,style:"deepObject",value:i,...s.object});p&&a.push(p)}else{let p=U({allowReserved:s.allowReserved,name:d,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let o=await G(r,t.auth);if(!o)continue;let a=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[a]=o;break;case"cookie":t.headers.append("Cookie",`${a}=${o}`);break;case"header":default:t.headers.set(a,o);break}}},L=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),$=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=B(e.headers,t.headers),r},fe=e=>{let t=[];return e.forEach((r,o)=>{t.push([o,r])}),t},B=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let o=r instanceof Headers?fe(r):Object.entries(r);for(let[a,d]of o)if(d===null)t.delete(a);else if(Array.isArray(d))for(let i of d)t.append(a,i);else d!==void 0&&t.set(a,typeof d=="object"?JSON.stringify(d):d)}return t},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let o=this.getInterceptorIndex(t);return this.fns[o]?(this.fns[o]=r,t):!1}use(t){return this.fns.push(t),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},k=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let t=$(k(),e),r=()=>({...t}),o=u=>(t=$(t,u),r()),a=ee(),d=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:B(t.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:v(n)},O=new Request(w,D);for(let f of a.request.fns)f&&(O=await f(O,n));let R=n.fetch,l;try{l=await R(O)}catch(f){let h=f;for(let y of a.error.fns)y&&(h=await y(f,void 0,O,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,request:O,response:void 0}}for(let f of a.response.fns)f&&(l=await f(l,O,n));let b={request:O,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,...b}}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,...b}}return f==="json"&&(n.responseValidator&&await n.responseValidator(h),n.responseTransformer&&(h=await n.responseTransformer(h))),n.responseStyle==="data"?h:{data:h,...b}}let C=await l.text(),T;try{T=JSON.parse(C)}catch{}let S=T??C,A=S;for(let f of a.error.fns)f&&(A=await f(S,l,O,n));if(A=A||{},n.throwOnError)throw A;return n.responseStyle==="data"?void 0:{error:A,...b}},s=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:w,url:D}=await d(n);return W({...w,body:w.body,headers:w.headers,method:u,onRequest:async(O,R)=>{let l=new Request(O,R);for(let b of a.request.fns)b&&(l=await b(l,w));return l},serializedBody:v(w),url:D})};return{buildUrl:u=>L({...t,...u}),connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:r,head:s("HEAD"),interceptors:a,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:i,setConfig:o,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:s("TRACE")}};var c=z(k({baseUrl:"https://mass-send.services.rehive.com/api/1/"}));var me=e=>(e.client??c).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=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}}),Oe=e=>(e?.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e}),Re=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e}),Se=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/rows/",...e}),Ue=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e}),Ce=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e}),ke=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/transactions/",...e}),qe=e=>(e.client??c).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e}),je=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e}),Ie=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/transactions/",...e}),$e=e=>(e.client??c).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ke(e){let t=z(J(e,"https://mass-send.services.rehive.com/api/"));return F(K,t)}export{Ke as createMassSendApi};
5
+ `);U=N.pop()??"";for(let ne of N){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:"))h=g.replace(/^id:\s*/,"");else if(g.startsWith("retry:")){let _=Number.parseInt(g.replace(/^retry:\s*/,""),10);Number.isNaN(_)||(l=_)}let S,V=!1;if(q.length){let g=q.join(`
7
+ `);try{S=JSON.parse(g),V=!0}catch{S=g}}V&&(a&&await a(S),o&&(S=await o(S))),r?.({data:S,event:H,id:h,retry:l}),q.length&&(yield S)}}}finally{R.removeEventListener("abort",M),m.releaseLock()}break}catch(T){if(t?.(T),i!==void 0&&b>=i)break;let w=Math.min(l*2**(b-1),s??3e4);await A(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"&"}},P=({allowReserved:e,explode:t,name:r,style:o,value:a})=>{if(!t){let s=(e?a:a.map(p=>encodeURIComponent(p))).join(pe(o));switch(o){case"label":return`.${s}`;case"matrix":return`;${r}=${s}`;case"simple":return s;default:return`${r}=${s}`}}let d=ie(o),i=a.map(s=>o==="label"||o==="simple"?e?s:encodeURIComponent(s):x({allowReserved:e,name:r,value:s})).join(d);return o==="label"||o==="matrix"?d+i:i},x=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:o,value:a,valueOnly:d})=>{if(a instanceof Date)return d?a.toISOString():`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!t){let p=[];Object.entries(a).forEach(([n,h])=>{p=[...p,n,e?h:encodeURIComponent(h)]});let u=p.join(",");switch(o){case"form":return`${r}=${u}`;case"label":return`.${u}`;case"matrix":return`;${r}=${u}`;default:return u}}let i=de(o),s=Object.entries(a).map(([p,u])=>x({allowReserved:e,name:o==="deepObject"?`${r}[${p}]`:p,value:u})).join(i);return o==="label"||o==="matrix"?i+s:s};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,o=t.match(le);if(o)for(let a of o){let d=!1,i=a.substring(1,a.length-1),s="simple";i.endsWith("*")&&(d=!0,i=i.substring(0,i.length-1)),i.startsWith(".")?(i=i.substring(1),s="label"):i.startsWith(";")&&(i=i.substring(1),s="matrix");let p=e[i];if(p==null)continue;if(Array.isArray(p)){r=r.replace(a,P({explode:d,name:i,style:s,value:p}));continue}if(typeof p=="object"){r=r.replace(a,j({explode:d,name:i,style:s,value:p,valueOnly:!0}));continue}if(s==="matrix"){r=r.replace(a,`;${x({name:i,value:p})}`);continue}let u=encodeURIComponent(s==="label"?`.${p}`:p);r=r.replace(a,u)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:o,url:a})=>{let d=a.startsWith("/")?a:`/${a}`,i=(e??"")+d;t&&(i=ce({path:t,url:i}));let s=r?o(r):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(i+=`?${s}`),i};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let d in o){let i=o[d];if(i==null)continue;let s=e[d]||t;if(Array.isArray(i)){let p=P({allowReserved:s.allowReserved,explode:!0,name:d,style:"form",value:i,...s.array});p&&a.push(p)}else if(typeof i=="object"){let p=j({allowReserved:s.allowReserved,explode:!0,name:d,style:"deepObject",value:i,...s.object});p&&a.push(p)}else{let p=x({allowReserved:s.allowReserved,name:d,value:i});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let o=await G(r,t.auth);if(!o)continue;let a=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[a]=o;break;case"cookie":t.headers.append("Cookie",`${a}=${o}`);break;case"header":default:t.headers.set(a,o);break}}},L=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),$=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=B(e.headers,t.headers),r},fe=e=>{let t=[];return e.forEach((r,o)=>{t.push([o,r])}),t},B=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let o=r instanceof Headers?fe(r):Object.entries(r);for(let[a,d]of o)if(d===null)t.delete(a);else if(Array.isArray(d))for(let i of d)t.append(a,i);else d!==void 0&&t.set(a,typeof d=="object"?JSON.stringify(d):d)}return t},E=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let o=this.getInterceptorIndex(t);return this.fns[o]?(this.fns[o]=r,t):!1}use(t){return this.fns.push(t),this.fns.length-1}},ee=()=>({error:new E,request:new E,response:new E}),ye=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},k=(e={})=>({...I,headers:he,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let t=$(k(),e),r=()=>({...t}),o=u=>(t=$(t,u),r()),a=ee(),d=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:B(t.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),A={redirect:"follow",...n,body:v(n)},O=new Request(h,A);for(let y of a.request.fns)y&&(O=await y(O,n));let D=n.fetch,l;try{l=await D(O)}catch(y){let f=y;for(let m of a.error.fns)m&&(f=await m(y,void 0,O,n));if(f=f||{},n.throwOnError)throw f;return n.responseStyle==="data"?void 0:{error:f,request:O,response:void 0}}for(let y of a.response.fns)y&&(l=await y(l,O,n));let b={request:O,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,...b}}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,...b}}return y==="json"&&(n.responseValidator&&await n.responseValidator(f),n.responseTransformer&&(f=await n.responseTransformer(f))),n.responseStyle==="data"?f:{data:f,...b}}let R=await l.text(),C;try{C=JSON.parse(R)}catch{}let T=C??R,w=T;for(let y of a.error.fns)y&&(w=await y(T,l,O,n));if(w=w||{},n.throwOnError)throw w;return n.responseStyle==="data"?void 0:{error:w,...b}},s=u=>n=>i({...n,method:u}),p=u=>async n=>{let{opts:h,url:A}=await d(n);return W({...h,body:h.body,headers:h.headers,method:u,onRequest:async(O,D)=>{let l=new Request(O,D);for(let b of a.request.fns)b&&(l=await b(l,h));return l},serializedBody:v(h),url:A})};return{buildUrl:L,connect:s("CONNECT"),delete:s("DELETE"),get:s("GET"),getConfig:r,head:s("HEAD"),interceptors:a,options:s("OPTIONS"),patch:s("PATCH"),post:s("POST"),put:s("PUT"),request:i,setConfig:o,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:s("TRACE")}};var c=z(k({baseUrl:"https://mass-send.services.rehive.com/api/1/"}));var me=e=>(e.client??c).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Oe=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}}),we=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e}),Re=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e}),Se=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/transaction-update-batches/{batch_id}/rows/",...e}),Ce=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e}),Ue=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e}),ke=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/uploads/{batch_id}/transactions/",...e}),qe=e=>(e.client??c).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e?.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e}),je=e=>(e.client??c).post({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e}),Ie=e=>(e.client??c).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e.client??c).put({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??c).get({security:[{name:"Authorization",type:"apiKey"}],url:"/uploads/{batch_id}/transactions/",...e}),$e=e=>(e.client??c).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Ke(e){let t=z(J(e,"https://mass-send.services.rehive.com/api/"));return F(K,t)}export{Ke as createMassSendApi};
@@ -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 B={};_chunkOEIQFP6Tjs.a.call(void 0, B,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>Oe,adminCompanyUpdate:()=>ge,adminCredentialsCreate:()=>be,adminCredentialsDestroy:()=>Te,adminCredentialsList:()=>Re,adminCredentialsPartialUpdate:()=>xe,adminCredentialsRetrieve:()=>Ae,adminCredentialsUpdate:()=>Ce,adminLayoutTemplatesList:()=>Ee,adminLayoutTemplatesRetrieve:()=>Se,adminLayoutsCreate:()=>De,adminLayoutsDestroy:()=>ze,adminLayoutsList:()=>ke,adminLayoutsPartialUpdate:()=>Ue,adminLayoutsRetrieve:()=>Le,adminLayoutsUpdate:()=>Pe,adminLogsList:()=>je,adminLogsRetrieve:()=>qe,adminLogsSendCreate:()=>Ne,adminNotificationsCreate:()=>Ie,adminNotificationsDestroy:()=>Ke,adminNotificationsList:()=>ve,adminNotificationsPartialUpdate:()=>$e,adminNotificationsRetrieve:()=>Be,adminNotificationsTriggerCreate:()=>We,adminNotificationsUpdate:()=>_e,adminTemplatesList:()=>He,adminTemplatesRetrieve:()=>Ve,adminWebhookCreate:()=>Fe,deactivateCreate:()=>Je,userLogsList:()=>Me,userLogsPartialUpdate:()=>Ge,userLogsRetrieve:()=>Qe,userLogsUpdate:()=>Xe,userNotificationsList:()=>Ye,userNotificationsPartialUpdate:()=>et,userNotificationsRetrieve:()=>Ze,userNotificationsUpdate:()=>tt,webhookCreate:()=>rt});var N={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},it=Object.entries(ae);var M=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:d,sseMaxRetryDelay:a,sseSleepFn:p,url:h,...u})=>{let n,w=_nullishCoalesce(p, () => ((b=>new Promise(c=>setTimeout(c,b)))));return{stream:async function*(){let b=_nullishCoalesce(l, () => (3e3)),c=0,O=_nullishCoalesce(u.signal, () => (new AbortController().signal));for(;!O.aborted;){c++;let S=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&S.set("Last-Event-ID",n);try{let T={redirect:"follow",...u,body:u.serializedBody,headers:S,signal:O},A=new Request(h,T);e&&(A=await e(h,T));let f=await(_nullishCoalesce(u.fetch, () => (globalThis.fetch)))(A);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="",$=()=>{try{m.cancel()}catch (e2){}};O.addEventListener("abort",$);try{for(;;){let{done:te,value:re}=await m.read();if(te)break;y+=re,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 B={};_chunkOEIQFP6Tjs.a.call(void 0, B,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>ge,adminCompanyRetrieve:()=>Oe,adminCompanyUpdate:()=>we,adminCredentialsCreate:()=>Te,adminCredentialsDestroy:()=>Ae,adminCredentialsList:()=>Re,adminCredentialsPartialUpdate:()=>xe,adminCredentialsRetrieve:()=>be,adminCredentialsUpdate:()=>Ce,adminLayoutTemplatesList:()=>Ee,adminLayoutTemplatesRetrieve:()=>Se,adminLayoutsCreate:()=>De,adminLayoutsDestroy:()=>ze,adminLayoutsList:()=>ke,adminLayoutsPartialUpdate:()=>Ue,adminLayoutsRetrieve:()=>Le,adminLayoutsUpdate:()=>Pe,adminLogsList:()=>je,adminLogsRetrieve:()=>qe,adminLogsSendCreate:()=>Ne,adminNotificationsCreate:()=>Ie,adminNotificationsDestroy:()=>Ke,adminNotificationsList:()=>ve,adminNotificationsPartialUpdate:()=>$e,adminNotificationsRetrieve:()=>Be,adminNotificationsTriggerCreate:()=>We,adminNotificationsUpdate:()=>_e,adminTemplatesList:()=>He,adminTemplatesRetrieve:()=>Ve,adminWebhookCreate:()=>Fe,deactivateCreate:()=>Je,userLogsList:()=>Me,userLogsPartialUpdate:()=>Ge,userLogsRetrieve:()=>Qe,userLogsUpdate:()=>Xe,userNotificationsList:()=>Ye,userNotificationsPartialUpdate:()=>et,userNotificationsRetrieve:()=>Ze,userNotificationsUpdate:()=>tt,webhookCreate:()=>rt});var N={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},it=Object.entries(ae);var M=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:d,sseMaxRetryDelay:a,sseSleepFn:p,url:u,...n})=>{let m,C=_nullishCoalesce(p, () => ((c=>new Promise(O=>setTimeout(O,c)))));return{stream:async function*(){let c=_nullishCoalesce(l, () => (3e3)),O=0,T=_nullishCoalesce(n.signal, () => (new AbortController().signal));for(;!T.aborted;){O++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);m!==void 0&&E.set("Last-Event-ID",m);try{let A={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:T},R=new Request(u,A);e&&(R=await e(u,A));let y=await(_nullishCoalesce(n.fetch, () => (globalThis.fetch)))(R);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),S="",$=()=>{try{h.cancel()}catch (e2){}};T.addEventListener("abort",$);try{for(;;){let{done:te,value:re}=await h.read();if(te)break;S+=re,S=S.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let _=y.split(`
3
+ `);let _=S.split(`
4
4
 
5
- `);y=_nullishCoalesce(_.pop(), () => (""));for(let ne of _){let oe=ne.split(`
6
- `),U=[],W;for(let R of oe)if(R.startsWith("data:"))U.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))W=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))n=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let V=Number.parseInt(R.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(b=V)}let x,H=!1;if(U.length){let R=U.join(`
7
- `);try{x=JSON.parse(R),H=!0}catch (e3){x=R}}H&&(o&&await o(x),i&&(x=await i(x))),_optionalChain([r, 'optionalCall', _2 => _2({data:x,event:W,id:n,retry:b})]),U.length&&(yield x)}}}finally{O.removeEventListener("abort",$),m.releaseLock()}break}catch(T){if(_optionalChain([t, 'optionalCall', _3 => _3(T)]),d!==void 0&&c>=d)break;let A=Math.min(b*2**(c-1),_nullishCoalesce(a, () => (3e4)));await w(A)}}}()}};var se=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","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},P=({allowReserved:e,explode:t,name:r,style:i,value:o})=>{if(!t){let a=(e?o:o.map(p=>encodeURIComponent(p))).join(de(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${r}=${a}`;case"simple":return a;default:return`${r}=${a}`}}let l=se(i),d=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):E({allowReserved:e,name:r,value:a})).join(l);return i==="label"||i==="matrix"?l+d:d},E=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${r}=${o.toISOString()}`;if(i!=="deepObject"&&!t){let p=[];Object.entries(o).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let h=p.join(",");switch(i){case"form":return`${r}=${h}`;case"label":return`.${h}`;case"matrix":return`;${r}=${h}`;default:return h}}let d=pe(i),a=Object.entries(o).map(([p,h])=>E({allowReserved:e,name:i==="deepObject"?`${r}[${p}]`:p,value:h})).join(d);return i==="label"||i==="matrix"?d+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,i=t.match(le);if(i)for(let o of i){let l=!1,d=o.substring(1,o.length-1),a="simple";d.endsWith("*")&&(l=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),a="label"):d.startsWith(";")&&(d=d.substring(1),a="matrix");let p=e[d];if(p==null)continue;if(Array.isArray(p)){r=r.replace(o,P({explode:l,name:d,style:a,value:p}));continue}if(typeof p=="object"){r=r.replace(o,j({explode:l,name:d,style:a,value:p,valueOnly:!0}));continue}if(a==="matrix"){r=r.replace(o,`;${E({name:d,value:p})}`);continue}let h=encodeURIComponent(a==="label"?`.${p}`:p);r=r.replace(o,h)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,d=(_nullishCoalesce(e, () => ("")))+l;t&&(d=ce({path:t,url:d}));let a=r?i(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(d+=`?${a}`),d};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let d=i[l];if(d==null)continue;let a=e[l]||t;if(Array.isArray(d)){let p=P({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:d,...a.array});p&&o.push(p)}else if(typeof d=="object"){let p=j({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:d,...a.object});p&&o.push(p)}else{let p=E({allowReserved:a.allowReserved,name:l,value:d});p&&o.push(p)}}return o.join("&")},Y=e=>{if(!e)return"stream";let t=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[t]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${t}=`)])):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let i=await G(r,t.auth);if(!i)continue;let o=_nullishCoalesce(r.name, () => ("Authorization"));switch(r.in){case"query":t.query||(t.query={}),t.query[o]=i;break;case"cookie":t.headers.append("Cookie",`${o}=${i}`);break;case"header":default:t.headers.set(o,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return _optionalChain([r, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=q(e.headers,t.headers),r},fe=e=>{let t=[];return e.forEach((r,i)=>{t.push([i,r])}),t},q=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let i=r instanceof Headers?fe(r):Object.entries(r);for(let[o,l]of i)if(l===null)t.delete(o);else if(Array.isArray(l))for(let d of l)t.append(o,d);else l!==void 0&&t.set(o,typeof l=="object"?JSON.stringify(l):l)}return t},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let i=this.getInterceptorIndex(t);return this.fns[i]?(this.fns[i]=r,t):!1}use(t){return this.fns.push(t),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={})=>({...N,headers:me,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let t=K(D(),e),r=()=>({...t}),i=u=>(t=K(t,u),r()),o=ee(),l=async u=>{let n={...t,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (t.fetch)), () => (globalThis.fetch)),headers:q(t.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=I(n);return{opts:n,url:w}},d=async u=>{let{opts:n,url:w}=await l(u),L={redirect:"follow",...n,body:v(n)},g=new Request(w,L);for(let f of o.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 o.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 o.response.fns)f&&(c=await f(c,g,n));let O={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,...O}}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,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(m),n.responseTransformer&&(m=await n.responseTransformer(m))),n.responseStyle==="data"?m:{data:m,...O}}let S=await c.text(),T;try{T=JSON.parse(S)}catch (e4){}let A=_nullishCoalesce(T, () => (S)),C=A;for(let f of o.error.fns)f&&(C=await f(A,c,g,n));if(C=C||{},n.throwOnError)throw C;return n.responseStyle==="data"?void 0:{error:C,...O}},a=u=>n=>d({...n,method:u}),p=u=>async n=>{let{opts:w,url:L}=await l(n);return M({...w,body:w.body,headers:w.headers,method:u,onRequest:async(g,b)=>{let c=new Request(g,b);for(let O of o.request.fns)O&&(c=await O(c,w));return c},serializedBody:v(w),url:L})};return{buildUrl:u=>I({...t,...u}),connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:d,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:a("TRACE")}};var s=z(D({baseUrl:"https://notification.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e}),be=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),xe=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/{id}/",...e}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e}),De=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/",...e}),qe=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),Be=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/trigger/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/{template_id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e}),et=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tt=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rt=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function nt(e){let t=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://notification.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, B,t)}exports.createNotificationsApi = nt;
5
+ `);S=_nullishCoalesce(_.pop(), () => (""));for(let ne of _){let oe=ne.split(`
6
+ `),U=[],W;for(let w of oe)if(w.startsWith("data:"))U.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))W=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))m=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let V=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(c=V)}let b,H=!1;if(U.length){let w=U.join(`
7
+ `);try{b=JSON.parse(w),H=!0}catch (e3){b=w}}H&&(o&&await o(b),i&&(b=await i(b))),_optionalChain([r, 'optionalCall', _2 => _2({data:b,event:W,id:m,retry:c})]),U.length&&(yield b)}}}finally{T.removeEventListener("abort",$),h.releaseLock()}break}catch(A){if(_optionalChain([t, 'optionalCall', _3 => _3(A)]),d!==void 0&&O>=d)break;let R=Math.min(c*2**(O-1),_nullishCoalesce(a, () => (3e4)));await C(R)}}}()}};var se=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","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},P=({allowReserved:e,explode:t,name:r,style:i,value:o})=>{if(!t){let a=(e?o:o.map(p=>encodeURIComponent(p))).join(de(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${r}=${a}`;case"simple":return a;default:return`${r}=${a}`}}let l=se(i),d=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):x({allowReserved:e,name:r,value:a})).join(l);return i==="label"||i==="matrix"?l+d:d},x=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${r}=${o.toISOString()}`;if(i!=="deepObject"&&!t){let p=[];Object.entries(o).forEach(([n,m])=>{p=[...p,n,e?m:encodeURIComponent(m)]});let u=p.join(",");switch(i){case"form":return`${r}=${u}`;case"label":return`.${u}`;case"matrix":return`;${r}=${u}`;default:return u}}let d=pe(i),a=Object.entries(o).map(([p,u])=>x({allowReserved:e,name:i==="deepObject"?`${r}[${p}]`:p,value:u})).join(d);return i==="label"||i==="matrix"?d+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,i=t.match(le);if(i)for(let o of i){let l=!1,d=o.substring(1,o.length-1),a="simple";d.endsWith("*")&&(l=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),a="label"):d.startsWith(";")&&(d=d.substring(1),a="matrix");let p=e[d];if(p==null)continue;if(Array.isArray(p)){r=r.replace(o,P({explode:l,name:d,style:a,value:p}));continue}if(typeof p=="object"){r=r.replace(o,j({explode:l,name:d,style:a,value:p,valueOnly:!0}));continue}if(a==="matrix"){r=r.replace(o,`;${x({name:d,value:p})}`);continue}let u=encodeURIComponent(a==="label"?`.${p}`:p);r=r.replace(o,u)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,d=(_nullishCoalesce(e, () => ("")))+l;t&&(d=ce({path:t,url:d}));let a=r?i(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(d+=`?${a}`),d};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let d=i[l];if(d==null)continue;let a=e[l]||t;if(Array.isArray(d)){let p=P({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:d,...a.array});p&&o.push(p)}else if(typeof d=="object"){let p=j({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:d,...a.object});p&&o.push(p)}else{let p=x({allowReserved:a.allowReserved,name:l,value:d});p&&o.push(p)}}return o.join("&")},Y=e=>{if(!e)return"stream";let t=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[t]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${t}=`)])):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let i=await G(r,t.auth);if(!i)continue;let o=_nullishCoalesce(r.name, () => ("Authorization"));switch(r.in){case"query":t.query||(t.query={}),t.query[o]=i;break;case"cookie":t.headers.append("Cookie",`${o}=${i}`);break;case"header":default:t.headers.set(o,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return _optionalChain([r, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=q(e.headers,t.headers),r},ye=e=>{let t=[];return e.forEach((r,i)=>{t.push([i,r])}),t},q=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let i=r instanceof Headers?ye(r):Object.entries(r);for(let[o,l]of i)if(l===null)t.delete(o);else if(Array.isArray(l))for(let d of l)t.append(o,d);else l!==void 0&&t.set(o,typeof l=="object"?JSON.stringify(l):l)}return t},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let i=this.getInterceptorIndex(t);return this.fns[i]?(this.fns[i]=r,t):!1}use(t){return this.fns.push(t),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={})=>({...N,headers:me,parseAs:"auto",querySerializer:fe,...e});var z=(e={})=>{let t=K(D(),e),r=()=>({...t}),i=u=>(t=K(t,u),r()),o=ee(),l=async u=>{let n={...t,...u,fetch:_nullishCoalesce(_nullishCoalesce(u.fetch, () => (t.fetch)), () => (globalThis.fetch)),headers:q(t.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=I(n);return{opts:n,url:m}},d=async u=>{let{opts:n,url:m}=await l(u),C={redirect:"follow",...n,body:v(n)},g=new Request(m,C);for(let f of o.request.fns)f&&(g=await f(g,n));let L=n.fetch,c;try{c=await L(g)}catch(f){let y=f;for(let h of o.error.fns)h&&(y=await h(f,void 0,g,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:g,response:void 0}}for(let f of o.response.fns)f&&(c=await f(c,g,n));let O={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 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,...O}}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,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...O}}let T=await c.text(),E;try{E=JSON.parse(T)}catch (e4){}let A=_nullishCoalesce(E, () => (T)),R=A;for(let f of o.error.fns)f&&(R=await f(A,c,g,n));if(R=R||{},n.throwOnError)throw R;return n.responseStyle==="data"?void 0:{error:R,...O}},a=u=>n=>d({...n,method:u}),p=u=>async n=>{let{opts:m,url:C}=await l(n);return M({...m,body:m.body,headers:m.headers,method:u,onRequest:async(g,L)=>{let c=new Request(g,L);for(let O of o.request.fns)O&&(c=await O(c,m));return c},serializedBody:v(m),url:C})};return{buildUrl:I,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:d,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:a("TRACE")}};var s=z(D({baseUrl:"https://notification.services.rehive.com/api/"}));var he=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),ge=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _21 => _21.headers])}}),we=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _23 => _23.headers])}}),Re=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _24 => _24.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e}),Te=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),xe=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/{id}/",...e}),ke=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _26 => _26.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e}),De=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Le=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Ue=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/",...e}),qe=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),Be=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),$e=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/trigger/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/",...e}),Ve=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/{template_id}/",...e}),Fe=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/",...e}),Qe=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e}),et=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tt=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rt=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function nt(e){let t=z(_chunkGR5TETAUjs.c.call(void 0, e,"https://notification.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, B,t)}exports.createNotificationsApi = nt;
@@ -1,7 +1,7 @@
1
- import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as ie}from"../chunk-S4QKN5WW.mjs";var B={};ie(B,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>we,adminCompanyRetrieve:()=>Oe,adminCompanyUpdate:()=>ge,adminCredentialsCreate:()=>be,adminCredentialsDestroy:()=>Te,adminCredentialsList:()=>Re,adminCredentialsPartialUpdate:()=>xe,adminCredentialsRetrieve:()=>Ae,adminCredentialsUpdate:()=>Ce,adminLayoutTemplatesList:()=>Ee,adminLayoutTemplatesRetrieve:()=>Se,adminLayoutsCreate:()=>De,adminLayoutsDestroy:()=>ze,adminLayoutsList:()=>ke,adminLayoutsPartialUpdate:()=>Ue,adminLayoutsRetrieve:()=>Le,adminLayoutsUpdate:()=>Pe,adminLogsList:()=>je,adminLogsRetrieve:()=>qe,adminLogsSendCreate:()=>Ne,adminNotificationsCreate:()=>Ie,adminNotificationsDestroy:()=>Ke,adminNotificationsList:()=>ve,adminNotificationsPartialUpdate:()=>$e,adminNotificationsRetrieve:()=>Be,adminNotificationsTriggerCreate:()=>We,adminNotificationsUpdate:()=>_e,adminTemplatesList:()=>He,adminTemplatesRetrieve:()=>Ve,adminWebhookCreate:()=>Fe,deactivateCreate:()=>Je,userLogsList:()=>Me,userLogsPartialUpdate:()=>Ge,userLogsRetrieve:()=>Qe,userLogsUpdate:()=>Xe,userNotificationsList:()=>Ye,userNotificationsPartialUpdate:()=>et,userNotificationsRetrieve:()=>Ze,userNotificationsUpdate:()=>tt,webhookCreate:()=>rt});var N={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},it=Object.entries(ae);var M=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:d,sseMaxRetryDelay:a,sseSleepFn:p,url:h,...u})=>{let n,w=p??(b=>new Promise(c=>setTimeout(c,b)));return{stream:async function*(){let b=l??3e3,c=0,O=u.signal??new AbortController().signal;for(;!O.aborted;){c++;let S=u.headers instanceof Headers?u.headers:new Headers(u.headers);n!==void 0&&S.set("Last-Event-ID",n);try{let T={redirect:"follow",...u,body:u.serializedBody,headers:S,signal:O},A=new Request(h,T);e&&(A=await e(h,T));let f=await(u.fetch??globalThis.fetch)(A);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="",$=()=>{try{m.cancel()}catch{}};O.addEventListener("abort",$);try{for(;;){let{done:te,value:re}=await m.read();if(te)break;y+=re,y=y.replace(/\r\n/g,`
1
+ import{a as F,c as J}from"../chunk-S5UXBHRU.mjs";import{a as ie}from"../chunk-S4QKN5WW.mjs";var B={};ie(B,{activateCreate:()=>he,adminCompanyPartialUpdate:()=>ge,adminCompanyRetrieve:()=>Oe,adminCompanyUpdate:()=>we,adminCredentialsCreate:()=>Te,adminCredentialsDestroy:()=>Ae,adminCredentialsList:()=>Re,adminCredentialsPartialUpdate:()=>xe,adminCredentialsRetrieve:()=>be,adminCredentialsUpdate:()=>Ce,adminLayoutTemplatesList:()=>Ee,adminLayoutTemplatesRetrieve:()=>Se,adminLayoutsCreate:()=>De,adminLayoutsDestroy:()=>ze,adminLayoutsList:()=>ke,adminLayoutsPartialUpdate:()=>Ue,adminLayoutsRetrieve:()=>Le,adminLayoutsUpdate:()=>Pe,adminLogsList:()=>je,adminLogsRetrieve:()=>qe,adminLogsSendCreate:()=>Ne,adminNotificationsCreate:()=>Ie,adminNotificationsDestroy:()=>Ke,adminNotificationsList:()=>ve,adminNotificationsPartialUpdate:()=>$e,adminNotificationsRetrieve:()=>Be,adminNotificationsTriggerCreate:()=>We,adminNotificationsUpdate:()=>_e,adminTemplatesList:()=>He,adminTemplatesRetrieve:()=>Ve,adminWebhookCreate:()=>Fe,deactivateCreate:()=>Je,userLogsList:()=>Me,userLogsPartialUpdate:()=>Ge,userLogsRetrieve:()=>Qe,userLogsUpdate:()=>Xe,userNotificationsList:()=>Ye,userNotificationsPartialUpdate:()=>et,userNotificationsRetrieve:()=>Ze,userNotificationsUpdate:()=>tt,webhookCreate:()=>rt});var N={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)};var ae={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},it=Object.entries(ae);var M=({onRequest:e,onSseError:t,onSseEvent:r,responseTransformer:i,responseValidator:o,sseDefaultRetryDelay:l,sseMaxRetryAttempts:d,sseMaxRetryDelay:a,sseSleepFn:p,url:u,...n})=>{let m,C=p??(c=>new Promise(O=>setTimeout(O,c)));return{stream:async function*(){let c=l??3e3,O=0,T=n.signal??new AbortController().signal;for(;!T.aborted;){O++;let E=n.headers instanceof Headers?n.headers:new Headers(n.headers);m!==void 0&&E.set("Last-Event-ID",m);try{let A={redirect:"follow",...n,body:n.serializedBody,headers:E,signal:T},R=new Request(u,A);e&&(R=await e(u,A));let y=await(n.fetch??globalThis.fetch)(R);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),S="",$=()=>{try{h.cancel()}catch{}};T.addEventListener("abort",$);try{for(;;){let{done:te,value:re}=await h.read();if(te)break;S+=re,S=S.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
- `);let _=y.split(`
3
+ `);let _=S.split(`
4
4
 
5
- `);y=_.pop()??"";for(let ne of _){let oe=ne.split(`
6
- `),U=[],W;for(let R of oe)if(R.startsWith("data:"))U.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))W=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))n=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let V=Number.parseInt(R.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(b=V)}let x,H=!1;if(U.length){let R=U.join(`
7
- `);try{x=JSON.parse(R),H=!0}catch{x=R}}H&&(o&&await o(x),i&&(x=await i(x))),r?.({data:x,event:W,id:n,retry:b}),U.length&&(yield x)}}}finally{O.removeEventListener("abort",$),m.releaseLock()}break}catch(T){if(t?.(T),d!==void 0&&c>=d)break;let A=Math.min(b*2**(c-1),a??3e4);await w(A)}}}()}};var se=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","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},P=({allowReserved:e,explode:t,name:r,style:i,value:o})=>{if(!t){let a=(e?o:o.map(p=>encodeURIComponent(p))).join(de(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${r}=${a}`;case"simple":return a;default:return`${r}=${a}`}}let l=se(i),d=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):E({allowReserved:e,name:r,value:a})).join(l);return i==="label"||i==="matrix"?l+d:d},E=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${r}=${o.toISOString()}`;if(i!=="deepObject"&&!t){let p=[];Object.entries(o).forEach(([u,n])=>{p=[...p,u,e?n:encodeURIComponent(n)]});let h=p.join(",");switch(i){case"form":return`${r}=${h}`;case"label":return`.${h}`;case"matrix":return`;${r}=${h}`;default:return h}}let d=pe(i),a=Object.entries(o).map(([p,h])=>E({allowReserved:e,name:i==="deepObject"?`${r}[${p}]`:p,value:h})).join(d);return i==="label"||i==="matrix"?d+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,i=t.match(le);if(i)for(let o of i){let l=!1,d=o.substring(1,o.length-1),a="simple";d.endsWith("*")&&(l=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),a="label"):d.startsWith(";")&&(d=d.substring(1),a="matrix");let p=e[d];if(p==null)continue;if(Array.isArray(p)){r=r.replace(o,P({explode:l,name:d,style:a,value:p}));continue}if(typeof p=="object"){r=r.replace(o,j({explode:l,name:d,style:a,value:p,valueOnly:!0}));continue}if(a==="matrix"){r=r.replace(o,`;${E({name:d,value:p})}`);continue}let h=encodeURIComponent(a==="label"?`.${p}`:p);r=r.replace(o,h)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,d=(e??"")+l;t&&(d=ce({path:t,url:d}));let a=r?i(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(d+=`?${a}`),d};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let d=i[l];if(d==null)continue;let a=e[l]||t;if(Array.isArray(d)){let p=P({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:d,...a.array});p&&o.push(p)}else if(typeof d=="object"){let p=j({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:d,...a.object});p&&o.push(p)}else{let p=E({allowReserved:a.allowReserved,name:l,value:d});p&&o.push(p)}}return o.join("&")},Y=e=>{if(!e)return"stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let i=await G(r,t.auth);if(!i)continue;let o=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[o]=i;break;case"cookie":t.headers.append("Cookie",`${o}=${i}`);break;case"header":default:t.headers.set(o,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=q(e.headers,t.headers),r},fe=e=>{let t=[];return e.forEach((r,i)=>{t.push([i,r])}),t},q=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let i=r instanceof Headers?fe(r):Object.entries(r);for(let[o,l]of i)if(l===null)t.delete(o);else if(Array.isArray(l))for(let d of l)t.append(o,d);else l!==void 0&&t.set(o,typeof l=="object"?JSON.stringify(l):l)}return t},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let i=this.getInterceptorIndex(t);return this.fns[i]?(this.fns[i]=r,t):!1}use(t){return this.fns.push(t),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={})=>({...N,headers:me,parseAs:"auto",querySerializer:ye,...e});var z=(e={})=>{let t=K(D(),e),r=()=>({...t}),i=u=>(t=K(t,u),r()),o=ee(),l=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:q(t.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=I(n);return{opts:n,url:w}},d=async u=>{let{opts:n,url:w}=await l(u),L={redirect:"follow",...n,body:v(n)},g=new Request(w,L);for(let f of o.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 o.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 o.response.fns)f&&(c=await f(c,g,n));let O={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,...O}}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,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(m),n.responseTransformer&&(m=await n.responseTransformer(m))),n.responseStyle==="data"?m:{data:m,...O}}let S=await c.text(),T;try{T=JSON.parse(S)}catch{}let A=T??S,C=A;for(let f of o.error.fns)f&&(C=await f(A,c,g,n));if(C=C||{},n.throwOnError)throw C;return n.responseStyle==="data"?void 0:{error:C,...O}},a=u=>n=>d({...n,method:u}),p=u=>async n=>{let{opts:w,url:L}=await l(n);return M({...w,body:w.body,headers:w.headers,method:u,onRequest:async(g,b)=>{let c=new Request(g,b);for(let O of o.request.fns)O&&(c=await O(c,w));return c},serializedBody:v(w),url:L})};return{buildUrl:u=>I({...t,...u}),connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:d,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:a("TRACE")}};var s=z(D({baseUrl:"https://notification.services.rehive.com/api/"}));var he=e=>(e.client??s).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),we=e=>(e?.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),ge=e=>(e?.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Re=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e}),be=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),Ae=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),xe=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/",...e}),Se=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/{id}/",...e}),ke=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e}),De=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Le=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Ue=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/",...e}),qe=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/",...e}),Ne=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e}),Ie=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),Be=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),$e=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/trigger/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/",...e}),Ve=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/{template_id}/",...e}),Fe=e=>(e.client??s).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??s).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/",...e}),Qe=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e}),Ge=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/",...e}),Ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e}),et=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tt=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rt=e=>(e.client??s).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function nt(e){let t=z(J(e,"https://notification.services.rehive.com/api/"));return F(B,t)}export{nt as createNotificationsApi};
5
+ `);S=_.pop()??"";for(let ne of _){let oe=ne.split(`
6
+ `),U=[],W;for(let w of oe)if(w.startsWith("data:"))U.push(w.replace(/^data:\s*/,""));else if(w.startsWith("event:"))W=w.replace(/^event:\s*/,"");else if(w.startsWith("id:"))m=w.replace(/^id:\s*/,"");else if(w.startsWith("retry:")){let V=Number.parseInt(w.replace(/^retry:\s*/,""),10);Number.isNaN(V)||(c=V)}let b,H=!1;if(U.length){let w=U.join(`
7
+ `);try{b=JSON.parse(w),H=!0}catch{b=w}}H&&(o&&await o(b),i&&(b=await i(b))),r?.({data:b,event:W,id:m,retry:c}),U.length&&(yield b)}}}finally{T.removeEventListener("abort",$),h.releaseLock()}break}catch(A){if(t?.(A),d!==void 0&&O>=d)break;let R=Math.min(c*2**(O-1),a??3e4);await C(R)}}}()}};var se=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","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},P=({allowReserved:e,explode:t,name:r,style:i,value:o})=>{if(!t){let a=(e?o:o.map(p=>encodeURIComponent(p))).join(de(i));switch(i){case"label":return`.${a}`;case"matrix":return`;${r}=${a}`;case"simple":return a;default:return`${r}=${a}`}}let l=se(i),d=o.map(a=>i==="label"||i==="simple"?e?a:encodeURIComponent(a):x({allowReserved:e,name:r,value:a})).join(l);return i==="label"||i==="matrix"?l+d:d},x=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},j=({allowReserved:e,explode:t,name:r,style:i,value:o,valueOnly:l})=>{if(o instanceof Date)return l?o.toISOString():`${r}=${o.toISOString()}`;if(i!=="deepObject"&&!t){let p=[];Object.entries(o).forEach(([n,m])=>{p=[...p,n,e?m:encodeURIComponent(m)]});let u=p.join(",");switch(i){case"form":return`${r}=${u}`;case"label":return`.${u}`;case"matrix":return`;${r}=${u}`;default:return u}}let d=pe(i),a=Object.entries(o).map(([p,u])=>x({allowReserved:e,name:i==="deepObject"?`${r}[${p}]`:p,value:u})).join(d);return i==="label"||i==="matrix"?d+a:a};var le=/\{[^{}]+\}/g,ce=({path:e,url:t})=>{let r=t,i=t.match(le);if(i)for(let o of i){let l=!1,d=o.substring(1,o.length-1),a="simple";d.endsWith("*")&&(l=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),a="label"):d.startsWith(";")&&(d=d.substring(1),a="matrix");let p=e[d];if(p==null)continue;if(Array.isArray(p)){r=r.replace(o,P({explode:l,name:d,style:a,value:p}));continue}if(typeof p=="object"){r=r.replace(o,j({explode:l,name:d,style:a,value:p,valueOnly:!0}));continue}if(a==="matrix"){r=r.replace(o,`;${x({name:d,value:p})}`);continue}let u=encodeURIComponent(a==="label"?`.${p}`:p);r=r.replace(o,u)}return r},Q=({baseUrl:e,path:t,query:r,querySerializer:i,url:o})=>{let l=o.startsWith("/")?o:`/${o}`,d=(e??"")+l;t&&(d=ce({path:t,url:d}));let a=r?i(r):"";return a.startsWith("?")&&(a=a.substring(1)),a&&(d+=`?${a}`),d};function v(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}var G=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r};var X=({parameters:e={},...t}={})=>i=>{let o=[];if(i&&typeof i=="object")for(let l in i){let d=i[l];if(d==null)continue;let a=e[l]||t;if(Array.isArray(d)){let p=P({allowReserved:a.allowReserved,explode:!0,name:l,style:"form",value:d,...a.array});p&&o.push(p)}else if(typeof d=="object"){let p=j({allowReserved:a.allowReserved,explode:!0,name:l,style:"deepObject",value:d,...a.object});p&&o.push(p)}else{let p=x({allowReserved:a.allowReserved,name:l,value:d});p&&o.push(p)}}return o.join("&")},Y=e=>{if(!e)return"stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},ue=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1,Z=async({security:e,...t})=>{for(let r of e){if(ue(t,r.name))continue;let i=await G(r,t.auth);if(!i)continue;let o=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[o]=i;break;case"cookie":t.headers.append("Cookie",`${o}=${i}`);break;case"header":default:t.headers.set(o,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),K=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=q(e.headers,t.headers),r},ye=e=>{let t=[];return e.forEach((r,i)=>{t.push([i,r])}),t},q=(...e)=>{let t=new Headers;for(let r of e){if(!r)continue;let i=r instanceof Headers?ye(r):Object.entries(r);for(let[o,l]of i)if(l===null)t.delete(o);else if(Array.isArray(l))for(let d of l)t.append(o,d);else l!==void 0&&t.set(o,typeof l=="object"?JSON.stringify(l):l)}return t},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(t){let r=this.getInterceptorIndex(t);this.fns[r]&&(this.fns[r]=null)}exists(t){let r=this.getInterceptorIndex(t);return!!this.fns[r]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,r){let i=this.getInterceptorIndex(t);return this.fns[i]?(this.fns[i]=r,t):!1}use(t){return this.fns.push(t),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={})=>({...N,headers:me,parseAs:"auto",querySerializer:fe,...e});var z=(e={})=>{let t=K(D(),e),r=()=>({...t}),i=u=>(t=K(t,u),r()),o=ee(),l=async u=>{let n={...t,...u,fetch:u.fetch??t.fetch??globalThis.fetch,headers:q(t.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=I(n);return{opts:n,url:m}},d=async u=>{let{opts:n,url:m}=await l(u),C={redirect:"follow",...n,body:v(n)},g=new Request(m,C);for(let f of o.request.fns)f&&(g=await f(g,n));let L=n.fetch,c;try{c=await L(g)}catch(f){let y=f;for(let h of o.error.fns)h&&(y=await h(f,void 0,g,n));if(y=y||{},n.throwOnError)throw y;return n.responseStyle==="data"?void 0:{error:y,request:g,response:void 0}}for(let f of o.response.fns)f&&(c=await f(c,g,n));let O={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 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,...O}}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,...O}}return f==="json"&&(n.responseValidator&&await n.responseValidator(y),n.responseTransformer&&(y=await n.responseTransformer(y))),n.responseStyle==="data"?y:{data:y,...O}}let T=await c.text(),E;try{E=JSON.parse(T)}catch{}let A=E??T,R=A;for(let f of o.error.fns)f&&(R=await f(A,c,g,n));if(R=R||{},n.throwOnError)throw R;return n.responseStyle==="data"?void 0:{error:R,...O}},a=u=>n=>d({...n,method:u}),p=u=>async n=>{let{opts:m,url:C}=await l(n);return M({...m,body:m.body,headers:m.headers,method:u,onRequest:async(g,L)=>{let c=new Request(g,L);for(let O of o.request.fns)O&&(c=await O(c,m));return c},serializedBody:v(m),url:C})};return{buildUrl:I,connect:a("CONNECT"),delete:a("DELETE"),get:a("GET"),getConfig:r,head:a("HEAD"),interceptors:o,options:a("OPTIONS"),patch:a("PATCH"),post:a("POST"),put:a("PUT"),request:d,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:a("TRACE")}};var s=z(D({baseUrl:"https://notification.services.rehive.com/api/"}));var he=e=>(e.client??s).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),ge=e=>(e?.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),we=e=>(e?.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Re=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e}),Te=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),be=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e}),xe=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ce=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/credentials/{credential_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/",...e}),Se=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layout-templates/{id}/",...e}),ke=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e}),De=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Le=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e}),Ue=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/layouts/{id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/",...e}),qe=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/",...e}),Ne=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/logs/{log_id}/send/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ve=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e}),Ie=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),Be=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e}),$e=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),_e=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/notifications/{notification_id}/trigger/",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/",...e}),Ve=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/templates/{template_id}/",...e}),Fe=e=>(e.client??s).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Je=e=>(e.client??s).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/",...e}),Qe=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e}),Ge=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/logs/{log_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/",...e}),Ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e}),et=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),tt=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/user/notifications/{notification_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rt=e=>(e.client??s).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function nt(e){let t=z(J(e,"https://notification.services.rehive.com/api/"));return F(B,t)}export{nt as createNotificationsApi};
@@ -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>>;
@@ -561,7 +561,6 @@ type CompanyConfiguration = {
561
561
  readonly request_notification_id: string | null;
562
562
  reminder_default?: boolean;
563
563
  request_param_config?: string | null;
564
- generate_user_operational_accounts?: boolean;
565
564
  };
566
565
  type CompanyConfigurationResponse = {
567
566
  status?: string;
@@ -907,7 +906,6 @@ type PatchedCompanyConfiguration = {
907
906
  readonly request_notification_id?: string | null;
908
907
  reminder_default?: boolean;
909
908
  request_param_config?: string | null;
910
- generate_user_operational_accounts?: boolean;
911
909
  };
912
910
  /**
913
911
  * A ModelSerializer that takes additional arguments for
@@ -1604,7 +1602,6 @@ type CompanyConfigurationWritable = {
1604
1602
  base_redirect_url?: string | null;
1605
1603
  reminder_default?: boolean;
1606
1604
  request_param_config?: string | null;
1607
- generate_user_operational_accounts?: boolean;
1608
1605
  };
1609
1606
  type CompanyConfigurationResponseWritable = {
1610
1607
  status?: string;
@@ -1896,7 +1893,6 @@ type PatchedCompanyConfigurationWritable = {
1896
1893
  base_redirect_url?: string | null;
1897
1894
  reminder_default?: boolean;
1898
1895
  request_param_config?: string | null;
1899
- generate_user_operational_accounts?: boolean;
1900
1896
  };
1901
1897
  /**
1902
1898
  * A ModelSerializer that takes additional arguments for
@@ -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>>;
@@ -561,7 +561,6 @@ type CompanyConfiguration = {
561
561
  readonly request_notification_id: string | null;
562
562
  reminder_default?: boolean;
563
563
  request_param_config?: string | null;
564
- generate_user_operational_accounts?: boolean;
565
564
  };
566
565
  type CompanyConfigurationResponse = {
567
566
  status?: string;
@@ -907,7 +906,6 @@ type PatchedCompanyConfiguration = {
907
906
  readonly request_notification_id?: string | null;
908
907
  reminder_default?: boolean;
909
908
  request_param_config?: string | null;
910
- generate_user_operational_accounts?: boolean;
911
909
  };
912
910
  /**
913
911
  * A ModelSerializer that takes additional arguments for
@@ -1604,7 +1602,6 @@ type CompanyConfigurationWritable = {
1604
1602
  base_redirect_url?: string | null;
1605
1603
  reminder_default?: boolean;
1606
1604
  request_param_config?: string | null;
1607
- generate_user_operational_accounts?: boolean;
1608
1605
  };
1609
1606
  type CompanyConfigurationResponseWritable = {
1610
1607
  status?: string;
@@ -1896,7 +1893,6 @@ type PatchedCompanyConfigurationWritable = {
1896
1893
  base_redirect_url?: string | null;
1897
1894
  reminder_default?: boolean;
1898
1895
  request_param_config?: string | null;
1899
- generate_user_operational_accounts?: boolean;
1900
1896
  };
1901
1897
  /**
1902
1898
  * A ModelSerializer that takes additional arguments for