rehive 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/admin.d.mts +614 -116
- package/dist/admin.d.ts +614 -116
- package/dist/admin.js +1 -1
- package/dist/admin.mjs +1 -1
- package/dist/auth.d.mts +2 -2
- package/dist/auth.d.ts +2 -2
- package/dist/auth.js +1 -1
- package/dist/auth.mjs +1 -1
- package/dist/{chunk-PCR54D6A.mjs → chunk-A53KSFBA.mjs} +1 -1
- package/dist/chunk-CRNPJD3E.js +6 -0
- package/dist/{chunk-ERD2XKSM.js → chunk-HXAEBUQM.js} +1 -1
- package/dist/chunk-IJBXROTB.mjs +6 -0
- package/dist/chunk-OV77OD2G.js +1 -0
- package/dist/chunk-RO2QGTSG.mjs +1 -0
- package/dist/chunk-TAABJLJG.mjs +6 -0
- package/dist/chunk-Y33FT632.js +6 -0
- package/dist/{create-api-client-B4Q01gHp.d.mts → create-api-client-Bkkri-AM.d.mts} +1 -1
- package/dist/{create-api-client-ADSlg8HX.d.ts → create-api-client-CgvKBlQ_.d.ts} +1 -1
- package/dist/{create-auth-CT_IFt3T.d.mts → create-auth-ChOASbvo.d.mts} +111 -100
- package/dist/{create-auth-CT_IFt3T.d.ts → create-auth-ChOASbvo.d.ts} +111 -100
- package/dist/extensions/alchemy.d.mts +175 -41
- package/dist/extensions/alchemy.d.ts +175 -41
- package/dist/extensions/alchemy.js +5 -6
- package/dist/extensions/alchemy.mjs +5 -6
- package/dist/extensions/app.d.mts +11 -10
- package/dist/extensions/app.d.ts +11 -10
- package/dist/extensions/app.js +5 -6
- package/dist/extensions/app.mjs +5 -6
- package/dist/extensions/billing.d.mts +11 -10
- package/dist/extensions/billing.d.ts +11 -10
- package/dist/extensions/billing.js +5 -6
- package/dist/extensions/billing.mjs +5 -6
- package/dist/extensions/bridge.d.mts +537 -38
- package/dist/extensions/bridge.d.ts +537 -38
- package/dist/extensions/bridge.js +5 -6
- package/dist/extensions/bridge.mjs +5 -6
- package/dist/extensions/builder.d.mts +8 -7
- package/dist/extensions/builder.d.ts +8 -7
- package/dist/extensions/builder.js +5 -6
- package/dist/extensions/builder.mjs +5 -6
- package/dist/extensions/business.d.mts +99 -63
- package/dist/extensions/business.d.ts +99 -63
- package/dist/extensions/business.js +5 -6
- package/dist/extensions/business.mjs +5 -6
- package/dist/extensions/conversion.d.mts +10 -9
- package/dist/extensions/conversion.d.ts +10 -9
- package/dist/extensions/conversion.js +5 -6
- package/dist/extensions/conversion.mjs +5 -6
- package/dist/extensions/mass-send.d.mts +8 -7
- package/dist/extensions/mass-send.d.ts +8 -7
- package/dist/extensions/mass-send.js +5 -6
- package/dist/extensions/mass-send.mjs +5 -6
- package/dist/extensions/notifications.d.mts +16 -15
- package/dist/extensions/notifications.d.ts +16 -15
- package/dist/extensions/notifications.js +5 -6
- package/dist/extensions/notifications.mjs +5 -6
- package/dist/extensions/payment-requests.d.mts +15 -10
- package/dist/extensions/payment-requests.d.ts +15 -10
- package/dist/extensions/payment-requests.js +5 -6
- package/dist/extensions/payment-requests.mjs +5 -6
- package/dist/extensions/products.d.mts +43 -42
- package/dist/extensions/products.d.ts +43 -42
- package/dist/extensions/products.js +5 -6
- package/dist/extensions/products.mjs +5 -6
- package/dist/extensions/rain.d.mts +22 -21
- package/dist/extensions/rain.d.ts +22 -21
- package/dist/extensions/rain.js +5 -6
- package/dist/extensions/rain.mjs +5 -6
- package/dist/extensions/rewards.d.mts +8 -7
- package/dist/extensions/rewards.d.ts +8 -7
- package/dist/extensions/rewards.js +5 -6
- package/dist/extensions/rewards.mjs +5 -6
- package/dist/extensions/stellar-testnet.d.mts +16 -15
- package/dist/extensions/stellar-testnet.d.ts +16 -15
- package/dist/extensions/stellar-testnet.js +5 -6
- package/dist/extensions/stellar-testnet.mjs +5 -6
- package/dist/extensions/stellar.d.mts +16 -15
- package/dist/extensions/stellar.d.ts +16 -15
- package/dist/extensions/stellar.js +5 -6
- package/dist/extensions/stellar.mjs +5 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.d.mts +3 -11
- package/dist/react.d.ts +3 -11
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/user.d.mts +21 -10
- package/dist/user.d.ts +21 -10
- package/dist/user.js +1 -1
- package/dist/user.mjs +1 -1
- package/package.json +1 -1
- package/src/auth/create-auth.ts +184 -781
- package/src/auth/index.ts +2 -25
- package/src/auth/types/index.ts +0 -48
- package/src/extensions/alchemy/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/alchemy/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/alchemy/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/alchemy/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/alchemy/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/alchemy/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/alchemy/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/alchemy/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/alchemy/openapi-ts/index.ts +2 -2
- package/src/extensions/alchemy/openapi-ts/sdk.gen.ts +44 -2
- package/src/extensions/alchemy/openapi-ts/types.gen.ts +177 -34
- package/src/extensions/app/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/app/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/app/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/app/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/app/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/app/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/app/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/app/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/app/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/app/openapi-ts/types.gen.ts +3 -3
- package/src/extensions/billing/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/billing/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/billing/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/billing/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/billing/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/billing/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/billing/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/billing/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/billing/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/billing/openapi-ts/types.gen.ts +3 -3
- package/src/extensions/bridge/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/bridge/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/bridge/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/bridge/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/bridge/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/bridge/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/bridge/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/bridge/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/bridge/openapi-ts/index.ts +2 -2
- package/src/extensions/bridge/openapi-ts/sdk.gen.ts +90 -2
- package/src/extensions/bridge/openapi-ts/types.gen.ts +572 -29
- package/src/extensions/builder/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/builder/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/builder/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/builder/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/builder/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/builder/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/builder/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/builder/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/builder/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/business/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/business/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/business/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/business/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/business/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/business/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/business/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/business/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/business/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/business/openapi-ts/types.gen.ts +91 -56
- package/src/extensions/conversion/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/conversion/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/conversion/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/conversion/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/conversion/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/conversion/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/conversion/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/conversion/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/conversion/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/conversion/openapi-ts/types.gen.ts +2 -2
- package/src/extensions/mass-send/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/mass-send/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/mass-send/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/mass-send/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/mass-send/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/mass-send/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/mass-send/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/mass-send/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/mass-send/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/notifications/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/notifications/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/notifications/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/notifications/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/notifications/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/notifications/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/notifications/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/notifications/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/notifications/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/notifications/openapi-ts/types.gen.ts +8 -8
- package/src/extensions/payment-requests/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/payment-requests/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/payment-requests/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/payment-requests/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/payment-requests/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/payment-requests/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/payment-requests/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/payment-requests/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/payment-requests/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/payment-requests/openapi-ts/types.gen.ts +7 -3
- package/src/extensions/products/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/products/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/products/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/products/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/products/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/products/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/products/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/products/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/products/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/products/openapi-ts/types.gen.ts +35 -35
- package/src/extensions/rain/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/rain/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/rain/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/rain/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/rain/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/rain/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/rain/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/rain/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/rain/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/rain/openapi-ts/types.gen.ts +14 -14
- package/src/extensions/rewards/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/rewards/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/rewards/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/rewards/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/rewards/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/rewards/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/rewards/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/rewards/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/rewards/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/stellar/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/stellar/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/stellar/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/stellar/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/stellar/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/stellar/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/stellar/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/stellar/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/stellar/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/stellar/openapi-ts/types.gen.ts +8 -8
- package/src/extensions/stellar-testnet/openapi-ts/client/client.gen.ts +17 -7
- package/src/extensions/stellar-testnet/openapi-ts/client/types.gen.ts +2 -1
- package/src/extensions/stellar-testnet/openapi-ts/client/utils.gen.ts +1 -1
- package/src/extensions/stellar-testnet/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/extensions/stellar-testnet/openapi-ts/core/params.gen.ts +1 -1
- package/src/extensions/stellar-testnet/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/extensions/stellar-testnet/openapi-ts/core/types.gen.ts +1 -1
- package/src/extensions/stellar-testnet/openapi-ts/core/utils.gen.ts +1 -1
- package/src/extensions/stellar-testnet/openapi-ts/sdk.gen.ts +1 -1
- package/src/extensions/stellar-testnet/openapi-ts/types.gen.ts +8 -8
- package/src/platform/admin/openapi-ts/client/client.gen.ts +17 -7
- package/src/platform/admin/openapi-ts/client/types.gen.ts +2 -1
- package/src/platform/admin/openapi-ts/client/utils.gen.ts +1 -1
- package/src/platform/admin/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/platform/admin/openapi-ts/core/params.gen.ts +1 -1
- package/src/platform/admin/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/platform/admin/openapi-ts/core/types.gen.ts +1 -1
- package/src/platform/admin/openapi-ts/core/utils.gen.ts +1 -1
- package/src/platform/admin/openapi-ts/index.ts +2 -2
- package/src/platform/admin/openapi-ts/sdk.gen.ts +54 -12
- package/src/platform/admin/openapi-ts/types.gen.ts +623 -107
- package/src/platform/user/openapi-ts/client/client.gen.ts +17 -7
- package/src/platform/user/openapi-ts/client/types.gen.ts +2 -1
- package/src/platform/user/openapi-ts/client/utils.gen.ts +1 -1
- package/src/platform/user/openapi-ts/core/bodySerializer.gen.ts +6 -8
- package/src/platform/user/openapi-ts/core/params.gen.ts +1 -1
- package/src/platform/user/openapi-ts/core/serverSentEvents.gen.ts +4 -5
- package/src/platform/user/openapi-ts/core/types.gen.ts +1 -1
- package/src/platform/user/openapi-ts/core/utils.gen.ts +1 -1
- package/src/platform/user/openapi-ts/index.ts +2 -2
- package/src/platform/user/openapi-ts/sdk.gen.ts +30 -4
- package/src/platform/user/openapi-ts/types.gen.ts +116 -52
- package/dist/chunk-7USVOK77.js +0 -7
- package/dist/chunk-G3M5QMRX.js +0 -1
- package/dist/chunk-HSPTEN45.mjs +0 -1
- package/dist/chunk-HWXE5WBF.js +0 -7
- package/dist/chunk-MUN3POSM.mjs +0 -7
- package/dist/chunk-ZUZHOLAX.mjs +0 -7
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkGR5TETAUjs = require('../chunk-GR5TETAU.js');var _chunkOEIQFP6Tjs = require('../chunk-OEIQFP6T.js');var K={};_chunkOEIQFP6Tjs.a.call(void 0, K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>
|
|
2
|
-
`).
|
|
3
|
-
`);let $=x.split(`
|
|
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:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>ds,managerBusinessesCreate:()=>as,managerBusinessesDocumentsCreate:()=>ls,managerBusinessesDocumentsList:()=>cs,managerBusinessesDocumentsRetrieve:()=>ys,managerBusinessesInvoicesCreate:()=>hs,managerBusinessesInvoicesList:()=>ms,managerBusinessesInvoicesLogsList:()=>ws,managerBusinessesInvoicesPartialUpdate:()=>fs,managerBusinessesInvoicesRefundsCreate:()=>bs,managerBusinessesInvoicesRefundsList:()=>Rs,managerBusinessesInvoicesRetrieve:()=>gs,managerBusinessesInvoicesTransactionsList:()=>Bs,managerBusinessesInvoicesUpdate:()=>Os,managerBusinessesList:()=>ts,managerBusinessesMetricsList:()=>Ts,managerBusinessesMetricsPointsList:()=>Es,managerBusinessesMetricsRetrieve:()=>Cs,managerBusinessesPartialUpdate:()=>os,managerBusinessesPayoutsCreate:()=>xs,managerBusinessesPayoutsList:()=>As,managerBusinessesPayoutsRetrieve:()=>Ds,managerBusinessesPayoutsTransactionsList:()=>vs,managerBusinessesRetrieve:()=>is,managerBusinessesTransactionsList:()=>ks,managerBusinessesTransactionsRetrieve:()=>Ms,managerBusinessesUpdate:()=>us,managerBusinessesUsersCreate:()=>Ss,managerBusinessesUsersList:()=>Us,managerBusinessesUsersPartialUpdate:()=>Ps,managerBusinessesUsersRetrieve:()=>zs,managerBusinessesUsersUpdate:()=>Ls,managerCompanyRetrieve:()=>qs,userBusinessCategoriesList:()=>Ks,userBusinessCategoriesRetrieve:()=>_s,userBusinessesList:()=>$s,userBusinessesRetrieve:()=>Ns,userCompanyRetrieve:()=>Ws,webhookCreate:()=>Hs});var L={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Js=Object.entries(ie);function J({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:d,sseMaxRetryAttempts:u,sseMaxRetryDelay:o,sseSleepFn:p,url:g,...l}){let t,f=_nullishCoalesce(p, () => ((b=>new Promise(c=>setTimeout(c,b)))));return{stream:async function*(){let b=_nullishCoalesce(d, () => (3e3)),c=0,O=_nullishCoalesce(l.signal, () => (new AbortController().signal));for(;!O.aborted;){c++;let D=l.headers instanceof Headers?l.headers:new Headers(l.headers);t!==void 0&&D.set("Last-Event-ID",t);try{let B={redirect:"follow",...l,body:l.serializedBody,headers:D,signal:O},T=new Request(g,B);e&&(T=await e(g,B));let y=await(_nullishCoalesce(l.fetch, () => (globalThis.fetch)))(T);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),m="",_=()=>{try{h.cancel()}catch (e2){}};O.addEventListener("abort",_);try{for(;;){let{done:se,value:re}=await h.read();if(se)break;m+=re,m=m.replace(/\r\n?/g,`
|
|
2
|
+
`);let $=m.split(`
|
|
4
3
|
|
|
5
|
-
`);
|
|
6
|
-
`),U=[],N;for(let
|
|
7
|
-
`);try{T=JSON.parse(w),W=!0}catch (e3){T=w}}W&&(a&&await a(T),i&&(T=await i(T))),_optionalChain([n, 'optionalCall', _2 => _2({data:T,event:N,id:h,retry:d})]),U.length&&(yield T)}}}finally{b.removeEventListener("abort",_),g.releaseLock()}break}catch(B){if(_optionalChain([r, 'optionalCall', _3 => _3(B)]),u!==void 0&&f>=u)break;let R=Math.min(d*2**(f-1),_nullishCoalesce(o, () => (3e4)));await E(R)}}}()}};var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let c=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):C({allowReserved:e,name:n,value:o})).join(c);return i==="label"||i==="matrix"?c+u:u},C=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:c})=>{if(a instanceof Date)return c?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([t,h])=>{p=[...p,t,e?h:encodeURIComponent(h)]});let l=p.join(",");switch(i){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let u=pe(i),o=Object.entries(a).map(([p,l])=>C({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:l})).join(u);return i==="label"||i==="matrix"?u+o:o};var ce=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let n=r,i=r.match(ce);if(i)for(let a of i){let c=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(c=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:c,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:c,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${C({name:u,value:p})}`);continue}let l=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,l)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let c=a.startsWith("/")?a:`/${a}`,u=(_nullishCoalesce(e, () => ("")))+c;r&&(u=de({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let c in i){let u=i[c];if(u==null)continue;let o=e[c]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=C({allowReserved:o.allowReserved,name:c,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=_nullishCoalesce(n.name, () => ("Authorization"));switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return _optionalChain([n, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,c]of i)if(c===null)r.delete(a);else if(Array.isArray(c))for(let u of c)r.append(a,u);else c!==void 0&&r.set(a,typeof c=="object"?JSON.stringify(c):c)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},v=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var k=(e={})=>{let r=q(v(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),c=async l=>{let t={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let h=I(t);return{opts:t,url:h}},u=async l=>{let{opts:t,url:h}=await c(l),E={redirect:"follow",...t,body:j(t)},O=new Request(h,E);for(let m of a.request.fns)m&&(O=await m(O,t));let M=t.fetch,d;try{d=await M(O)}catch(m){let y=m;for(let g of a.error.fns)g&&(y=await g(m,void 0,O,t));if(y=y||{},t.throwOnError)throw y;return t.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of a.response.fns)m&&(d=await m(d,O,t));let f={request:O,response:d};if(d.ok){let m=_nullishCoalesce((t.parseAs==="auto"?Y(d.headers.get("Content-Type")):t.parseAs), () => ("json"));if(d.status===204||d.headers.get("Content-Length")==="0"){let g;switch(m){case"arrayBuffer":case"blob":case"text":g=await d[m]();break;case"formData":g=new FormData;break;case"stream":g=d.body;break;case"json":default:g={};break}return t.responseStyle==="data"?g:{data:g,...f}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[m]();break;case"json":{let g=await d.text();y=g?JSON.parse(g):{};break}case"stream":return t.responseStyle==="data"?d.body:{data:d.body,...f}}return m==="json"&&(t.responseValidator&&await t.responseValidator(y),t.responseTransformer&&(y=await t.responseTransformer(y))),t.responseStyle==="data"?y:{data:y,...f}}let b=await d.text(),A;try{A=JSON.parse(b)}catch (e4){}let B=_nullishCoalesce(A, () => (b)),R=B;for(let m of a.error.fns)m&&(R=await m(B,d,O,t));if(R=R||{},t.throwOnError)throw R;return t.responseStyle==="data"?void 0:{error:R,...f}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:h,url:E}=await c(t);return J({...h,body:h.body,headers:h.headers,method:l,onRequest:async(O,M)=>{let d=new Request(O,M);for(let f of a.request.fns)f&&(d=await f(d,h));return d},serializedBody:j(h),url:E})};return{buildUrl:I,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=k(v({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),Qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=k(_chunkGR5TETAUjs.c.call(void 0, e,"https://business.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, K,r)}exports.createBusinessApi = Vs;
|
|
4
|
+
`);m=_nullishCoalesce($.pop(), () => (""));for(let ne of $){let te=ne.split(`
|
|
5
|
+
`),U=[],N;for(let R of te)if(R.startsWith("data:"))U.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))N=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))t=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let H=Number.parseInt(R.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(b=H)}let C,W=!1;if(U.length){let R=U.join(`
|
|
6
|
+
`);try{C=JSON.parse(R),W=!0}catch (e3){C=R}}W&&(a&&await a(C),i&&(C=await i(C))),_optionalChain([n, 'optionalCall', _2 => _2({data:C,event:N,id:t,retry:b})]),U.length&&(yield C)}}}finally{O.removeEventListener("abort",_),h.releaseLock()}break}catch(B){if(_optionalChain([r, 'optionalCall', _3 => _3(B)]),u!==void 0&&c>=u)break;let T=Math.min(b*2**(c-1),_nullishCoalesce(o, () => (3e4)));await f(T)}}}()}}var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let d=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):x({allowReserved:e,name:n,value:o})).join(d);return i==="label"||i==="matrix"?d+u:u},x=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:d})=>{if(a instanceof Date)return d?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([l,t])=>{p=[...p,l,e?t:encodeURIComponent(t)]});let g=p.join(",");switch(i){case"form":return`${n}=${g}`;case"label":return`.${g}`;case"matrix":return`;${n}=${g}`;default:return g}}let u=pe(i),o=Object.entries(a).map(([p,g])=>x({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:g})).join(u);return i==="label"||i==="matrix"?u+o:o};var de=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let n=r,i=r.match(de);if(i)for(let a of i){let d=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(d=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:d,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:d,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${x({name:u,value:p})}`);continue}let g=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,g)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let d=a.startsWith("/")?a:`/${a}`,u=(_nullishCoalesce(e, () => ("")))+d;r&&(u=ce({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let d in i){let u=i[d];if(u==null)continue;let o=e[d]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:d,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:d,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=x({allowReserved:o.allowReserved,name:d,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=_optionalChain([e, 'access', _4 => _4.split, 'call', _5 => _5(";"), 'access', _6 => _6[0], 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]);if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||_optionalChain([e, 'access', _9 => _9.query, 'optionalAccess', _10 => _10[r]])||_optionalChain([e, 'access', _11 => _11.headers, 'access', _12 => _12.get, 'call', _13 => _13("Cookie"), 'optionalAccess', _14 => _14.includes, 'call', _15 => _15(`${r}=`)])):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=_nullishCoalesce(n.name, () => ("Authorization"));switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return _optionalChain([n, 'access', _16 => _16.baseUrl, 'optionalAccess', _17 => _17.endsWith, 'call', _18 => _18("/")])&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,d]of i)if(d===null)r.delete(a);else if(Array.isArray(d))for(let u of d)r.append(a,u);else d!==void 0&&r.set(a,typeof d=="object"?JSON.stringify(d):d)}return r},v=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new v,request:new v,response:new v}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},k=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var M=(e={})=>{let r=q(k(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),d=async l=>{let t={...r,...l,fetch:_nullishCoalesce(_nullishCoalesce(l.fetch, () => (r.fetch)), () => (globalThis.fetch)),headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let f=t,E=I(f);return{opts:f,url:E}},u=async l=>{let{opts:t,url:f}=await d(l),E={redirect:"follow",...t,body:j(t)},w=new Request(f,E);for(let y of a.request.fns)y&&(w=await y(w,t));let b=t.fetch,c;try{c=await b(w)}catch(y){let h=y;for(let m of a.error.fns)m&&(h=await m(y,void 0,w,t));if(h=h||{},t.throwOnError)throw h;return t.responseStyle==="data"?void 0:{error:h,request:w,response:void 0}}for(let y of a.response.fns)y&&(c=await y(c,w,t));let O={request:w,response:c};if(c.ok){let y=_nullishCoalesce((t.parseAs==="auto"?Y(c.headers.get("Content-Type")):t.parseAs), () => ("json"));if(c.status===204||c.headers.get("Content-Length")==="0"){let m;switch(y){case"arrayBuffer":case"blob":case"text":m=await c[y]();break;case"formData":m=new FormData;break;case"stream":m=c.body;break;case"json":default:m={};break}return t.responseStyle==="data"?m:{data:m,...O}}let h;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":h=await c[y]();break;case"json":{let m=await c.text();h=m?JSON.parse(m):{};break}case"stream":return t.responseStyle==="data"?c.body:{data:c.body,...O}}return y==="json"&&(t.responseValidator&&await t.responseValidator(h),t.responseTransformer&&(h=await t.responseTransformer(h))),t.responseStyle==="data"?h:{data:h,...O}}let D=await c.text(),B;try{B=JSON.parse(D)}catch (e4){}let T=_nullishCoalesce(B, () => (D)),A=T;for(let y of a.error.fns)y&&(A=await y(T,c,w,t));if(A=A||{},t.throwOnError)throw A;return t.responseStyle==="data"?void 0:{error:A,...O}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:f,url:E}=await d(t);return J({...f,body:f.body,headers:f.headers,method:l,onRequest:async(w,b)=>{let c=new Request(w,b);for(let O of a.request.fns)O&&(c=await O(c,f));return c},serializedBody:j(f),url:E})};return{buildUrl:l=>I({...r,...l}),connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=M(k({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _19 => _19.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _20 => _20.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _21 => _21.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _22 => _22.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _23 => _23.client]), () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _24 => _24.headers])}}),Je=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _25 => _25.client]), () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",..._optionalChain([e, 'optionalAccess', _26 => _26.headers])}}),Qe=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _27 => _27.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _28 => _28.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _29 => _29.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _30 => _30.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(_nullishCoalesce(e.client, () => (s))).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(_nullishCoalesce(e.client, () => (s))).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(_nullishCoalesce(e.client, () => (s))).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(_nullishCoalesce(e.client, () => (s))).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _31 => _31.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _32 => _32.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _33 => _33.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(_nullishCoalesce(e.client, () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(_nullishCoalesce(_optionalChain([e, 'optionalAccess', _34 => _34.client]), () => (s))).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(_nullishCoalesce(e.client, () => (s))).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=M(_chunkGR5TETAUjs.c.call(void 0, e,"https://business.services.rehive.com/api/"));return _chunkGR5TETAUjs.a.call(void 0, K,r)}exports.createBusinessApi = Vs;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import{a as V,c as F}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>
|
|
2
|
-
`).
|
|
3
|
-
`);let $=x.split(`
|
|
1
|
+
import{a as V,c as F}from"../chunk-S5UXBHRU.mjs";import{a as ae}from"../chunk-S4QKN5WW.mjs";var K={};ae(K,{activateCreate:()=>ge,adminBusinessCategoriesCreate:()=>Oe,adminBusinessCategoriesDestroy:()=>we,adminBusinessCategoriesList:()=>fe,adminBusinessCategoriesPartialUpdate:()=>be,adminBusinessCategoriesRetrieve:()=>Re,adminBusinessCategoriesUpdate:()=>Be,adminBusinessUsersCreate:()=>Ce,adminBusinessUsersList:()=>Te,adminBusinessUsersPartialUpdate:()=>Ae,adminBusinessUsersRetrieve:()=>Ee,adminBusinessUsersUpdate:()=>xe,adminBusinessesCategoriesCreate:()=>He,adminBusinessesCategoriesDestroy:()=>Ue,adminBusinessesCategoriesList:()=>We,adminBusinessesCategoriesRetrieve:()=>Se,adminBusinessesDocumentsCreate:()=>Pe,adminBusinessesDocumentsDestroy:()=>Le,adminBusinessesDocumentsList:()=>ze,adminBusinessesDocumentsPartialUpdate:()=>Ie,adminBusinessesDocumentsRetrieve:()=>je,adminBusinessesDocumentsUpdate:()=>qe,adminBusinessesList:()=>De,adminBusinessesPartialUpdate:()=>ke,adminBusinessesPayoutsCreate:()=>_e,adminBusinessesPayoutsList:()=>Ke,adminBusinessesPayoutsRetrieve:()=>$e,adminBusinessesPayoutsTransactionsList:()=>Ne,adminBusinessesRetrieve:()=>ve,adminBusinessesUpdate:()=>Me,adminCompanyPartialUpdate:()=>Fe,adminCompanyRetrieve:()=>Ve,adminCompanyUpdate:()=>Je,adminCurrenciesList:()=>Qe,adminCurrenciesRetrieve:()=>Ge,adminWebhookCreate:()=>Xe,customerBusinessesList:()=>Ye,customerBusinessesRetrieve:()=>Ze,customerEnrollCreate:()=>es,deactivateCreate:()=>ss,managerBusinessCategoriesList:()=>rs,managerBusinessCategoriesRetrieve:()=>ns,managerBusinessesCategoriesCreate:()=>Is,managerBusinessesCategoriesDestroy:()=>ps,managerBusinessesCategoriesList:()=>js,managerBusinessesCategoriesRetrieve:()=>ds,managerBusinessesCreate:()=>as,managerBusinessesDocumentsCreate:()=>ls,managerBusinessesDocumentsList:()=>cs,managerBusinessesDocumentsRetrieve:()=>ys,managerBusinessesInvoicesCreate:()=>hs,managerBusinessesInvoicesList:()=>ms,managerBusinessesInvoicesLogsList:()=>ws,managerBusinessesInvoicesPartialUpdate:()=>fs,managerBusinessesInvoicesRefundsCreate:()=>bs,managerBusinessesInvoicesRefundsList:()=>Rs,managerBusinessesInvoicesRetrieve:()=>gs,managerBusinessesInvoicesTransactionsList:()=>Bs,managerBusinessesInvoicesUpdate:()=>Os,managerBusinessesList:()=>ts,managerBusinessesMetricsList:()=>Ts,managerBusinessesMetricsPointsList:()=>Es,managerBusinessesMetricsRetrieve:()=>Cs,managerBusinessesPartialUpdate:()=>os,managerBusinessesPayoutsCreate:()=>xs,managerBusinessesPayoutsList:()=>As,managerBusinessesPayoutsRetrieve:()=>Ds,managerBusinessesPayoutsTransactionsList:()=>vs,managerBusinessesRetrieve:()=>is,managerBusinessesTransactionsList:()=>ks,managerBusinessesTransactionsRetrieve:()=>Ms,managerBusinessesUpdate:()=>us,managerBusinessesUsersCreate:()=>Ss,managerBusinessesUsersList:()=>Us,managerBusinessesUsersPartialUpdate:()=>Ps,managerBusinessesUsersRetrieve:()=>zs,managerBusinessesUsersUpdate:()=>Ls,managerCompanyRetrieve:()=>qs,userBusinessCategoriesList:()=>Ks,userBusinessCategoriesRetrieve:()=>_s,userBusinessesList:()=>$s,userBusinessesRetrieve:()=>Ns,userCompanyRetrieve:()=>Ws,webhookCreate:()=>Hs});var L={bodySerializer:e=>JSON.stringify(e,(r,n)=>typeof n=="bigint"?n.toString():n)};var ie={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Js=Object.entries(ie);function J({onRequest:e,onSseError:r,onSseEvent:n,responseTransformer:i,responseValidator:a,sseDefaultRetryDelay:d,sseMaxRetryAttempts:u,sseMaxRetryDelay:o,sseSleepFn:p,url:g,...l}){let t,f=p??(b=>new Promise(c=>setTimeout(c,b)));return{stream:async function*(){let b=d??3e3,c=0,O=l.signal??new AbortController().signal;for(;!O.aborted;){c++;let D=l.headers instanceof Headers?l.headers:new Headers(l.headers);t!==void 0&&D.set("Last-Event-ID",t);try{let B={redirect:"follow",...l,body:l.serializedBody,headers:D,signal:O},T=new Request(g,B);e&&(T=await e(g,B));let y=await(l.fetch??globalThis.fetch)(T);if(!y.ok)throw new Error(`SSE failed: ${y.status} ${y.statusText}`);if(!y.body)throw new Error("No body in SSE response");let h=y.body.pipeThrough(new TextDecoderStream).getReader(),m="",_=()=>{try{h.cancel()}catch{}};O.addEventListener("abort",_);try{for(;;){let{done:se,value:re}=await h.read();if(se)break;m+=re,m=m.replace(/\r\n?/g,`
|
|
2
|
+
`);let $=m.split(`
|
|
4
3
|
|
|
5
|
-
`);
|
|
6
|
-
`),U=[],N;for(let
|
|
7
|
-
`);try{T=JSON.parse(w),W=!0}catch{T=w}}W&&(a&&await a(T),i&&(T=await i(T))),n?.({data:T,event:N,id:h,retry:d}),U.length&&(yield T)}}}finally{b.removeEventListener("abort",_),g.releaseLock()}break}catch(B){if(r?.(B),u!==void 0&&f>=u)break;let R=Math.min(d*2**(f-1),o??3e4);await E(R)}}}()}};var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let c=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):C({allowReserved:e,name:n,value:o})).join(c);return i==="label"||i==="matrix"?c+u:u},C=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:c})=>{if(a instanceof Date)return c?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([t,h])=>{p=[...p,t,e?h:encodeURIComponent(h)]});let l=p.join(",");switch(i){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let u=pe(i),o=Object.entries(a).map(([p,l])=>C({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:l})).join(u);return i==="label"||i==="matrix"?u+o:o};var ce=/\{[^{}]+\}/g,de=({path:e,url:r})=>{let n=r,i=r.match(ce);if(i)for(let a of i){let c=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(c=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:c,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:c,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${C({name:u,value:p})}`);continue}let l=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,l)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let c=a.startsWith("/")?a:`/${a}`,u=(e??"")+c;r&&(u=de({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let c in i){let u=i[c];if(u==null)continue;let o=e[c]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:c,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:c,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=C({allowReserved:o.allowReserved,name:c,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=n.name??"Authorization";switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,c]of i)if(c===null)r.delete(a);else if(Array.isArray(c))for(let u of c)r.append(a,u);else c!==void 0&&r.set(a,typeof c=="object"?JSON.stringify(c):c)}return r},D=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new D,request:new D,response:new D}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},v=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var k=(e={})=>{let r=q(v(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),c=async l=>{let t={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let h=I(t);return{opts:t,url:h}},u=async l=>{let{opts:t,url:h}=await c(l),E={redirect:"follow",...t,body:j(t)},O=new Request(h,E);for(let m of a.request.fns)m&&(O=await m(O,t));let M=t.fetch,d;try{d=await M(O)}catch(m){let y=m;for(let g of a.error.fns)g&&(y=await g(m,void 0,O,t));if(y=y||{},t.throwOnError)throw y;return t.responseStyle==="data"?void 0:{error:y,request:O,response:void 0}}for(let m of a.response.fns)m&&(d=await m(d,O,t));let f={request:O,response:d};if(d.ok){let m=(t.parseAs==="auto"?Y(d.headers.get("Content-Type")):t.parseAs)??"json";if(d.status===204||d.headers.get("Content-Length")==="0"){let g;switch(m){case"arrayBuffer":case"blob":case"text":g=await d[m]();break;case"formData":g=new FormData;break;case"stream":g=d.body;break;case"json":default:g={};break}return t.responseStyle==="data"?g:{data:g,...f}}let y;switch(m){case"arrayBuffer":case"blob":case"formData":case"text":y=await d[m]();break;case"json":{let g=await d.text();y=g?JSON.parse(g):{};break}case"stream":return t.responseStyle==="data"?d.body:{data:d.body,...f}}return m==="json"&&(t.responseValidator&&await t.responseValidator(y),t.responseTransformer&&(y=await t.responseTransformer(y))),t.responseStyle==="data"?y:{data:y,...f}}let b=await d.text(),A;try{A=JSON.parse(b)}catch{}let B=A??b,R=B;for(let m of a.error.fns)m&&(R=await m(B,d,O,t));if(R=R||{},t.throwOnError)throw R;return t.responseStyle==="data"?void 0:{error:R,...f}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:h,url:E}=await c(t);return J({...h,body:h.body,headers:h.headers,method:l,onRequest:async(O,M)=>{let d=new Request(O,M);for(let f of a.request.fns)f&&(d=await f(d,h));return d},serializedBody:j(h),url:E})};return{buildUrl:I,connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=k(v({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(e.client??s).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(e?.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Je=e=>(e?.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Qe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(e.client??s).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(e.client??s).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(e.client??s).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=k(F(e,"https://business.services.rehive.com/api/"));return V(K,r)}export{Vs as createBusinessApi};
|
|
4
|
+
`);m=$.pop()??"";for(let ne of $){let te=ne.split(`
|
|
5
|
+
`),U=[],N;for(let R of te)if(R.startsWith("data:"))U.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))N=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))t=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let H=Number.parseInt(R.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(b=H)}let C,W=!1;if(U.length){let R=U.join(`
|
|
6
|
+
`);try{C=JSON.parse(R),W=!0}catch{C=R}}W&&(a&&await a(C),i&&(C=await i(C))),n?.({data:C,event:N,id:t,retry:b}),U.length&&(yield C)}}}finally{O.removeEventListener("abort",_),h.releaseLock()}break}catch(B){if(r?.(B),u!==void 0&&c>=u)break;let T=Math.min(b*2**(c-1),o??3e4);await f(T)}}}()}}var oe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ue=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},pe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=({allowReserved:e,explode:r,name:n,style:i,value:a})=>{if(!r){let o=(e?a:a.map(p=>encodeURIComponent(p))).join(ue(i));switch(i){case"label":return`.${o}`;case"matrix":return`;${n}=${o}`;case"simple":return o;default:return`${n}=${o}`}}let d=oe(i),u=a.map(o=>i==="label"||i==="simple"?e?o:encodeURIComponent(o):x({allowReserved:e,name:n,value:o})).join(d);return i==="label"||i==="matrix"?d+u:u},x=({allowReserved:e,name:r,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?n:encodeURIComponent(n)}`},z=({allowReserved:e,explode:r,name:n,style:i,value:a,valueOnly:d})=>{if(a instanceof Date)return d?a.toISOString():`${n}=${a.toISOString()}`;if(i!=="deepObject"&&!r){let p=[];Object.entries(a).forEach(([l,t])=>{p=[...p,l,e?t:encodeURIComponent(t)]});let g=p.join(",");switch(i){case"form":return`${n}=${g}`;case"label":return`.${g}`;case"matrix":return`;${n}=${g}`;default:return g}}let u=pe(i),o=Object.entries(a).map(([p,g])=>x({allowReserved:e,name:i==="deepObject"?`${n}[${p}]`:p,value:g})).join(u);return i==="label"||i==="matrix"?u+o:o};var de=/\{[^{}]+\}/g,ce=({path:e,url:r})=>{let n=r,i=r.match(de);if(i)for(let a of i){let d=!1,u=a.substring(1,a.length-1),o="simple";u.endsWith("*")&&(d=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),o="label"):u.startsWith(";")&&(u=u.substring(1),o="matrix");let p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(a,S({explode:d,name:u,style:o,value:p}));continue}if(typeof p=="object"){n=n.replace(a,z({explode:d,name:u,style:o,value:p,valueOnly:!0}));continue}if(o==="matrix"){n=n.replace(a,`;${x({name:u,value:p})}`);continue}let g=encodeURIComponent(o==="label"?`.${p}`:p);n=n.replace(a,g)}return n},Q=({baseUrl:e,path:r,query:n,querySerializer:i,url:a})=>{let d=a.startsWith("/")?a:`/${a}`,u=(e??"")+d;r&&(u=ce({path:r,url:u}));let o=n?i(n):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(u+=`?${o}`),u};function j(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var G=async(e,r)=>{let n=typeof r=="function"?await r(e):r;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n};var X=({parameters:e={},...r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let d in i){let u=i[d];if(u==null)continue;let o=e[d]||r;if(Array.isArray(u)){let p=S({allowReserved:o.allowReserved,explode:!0,name:d,style:"form",value:u,...o.array});p&&a.push(p)}else if(typeof u=="object"){let p=z({allowReserved:o.allowReserved,explode:!0,name:d,style:"deepObject",value:u,...o.object});p&&a.push(p)}else{let p=x({allowReserved:o.allowReserved,name:d,value:u});p&&a.push(p)}}return a.join("&")},Y=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>r.startsWith(n)))return"blob";if(r.startsWith("text/"))return"text"}},le=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,Z=async({security:e,...r})=>{for(let n of e){if(le(r,n.name))continue;let i=await G(n,r.auth);if(!i)continue;let a=n.name??"Authorization";switch(n.in){case"query":r.query||(r.query={}),r.query[a]=i;break;case"cookie":r.headers.append("Cookie",`${a}=${i}`);break;case"header":default:r.headers.set(a,i);break}}},I=e=>Q({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),q=(e,r)=>{let n={...e,...r};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=P(e.headers,r.headers),n},ye=e=>{let r=[];return e.forEach((n,i)=>{r.push([i,n])}),r},P=(...e)=>{let r=new Headers;for(let n of e){if(!n)continue;let i=n instanceof Headers?ye(n):Object.entries(n);for(let[a,d]of i)if(d===null)r.delete(a);else if(Array.isArray(d))for(let u of d)r.append(a,u);else d!==void 0&&r.set(a,typeof d=="object"?JSON.stringify(d):d)}return r},v=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let n=this.getInterceptorIndex(r);this.fns[n]&&(this.fns[n]=null)}exists(r){let n=this.getInterceptorIndex(r);return!!this.fns[n]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,n){let i=this.getInterceptorIndex(r);return this.fns[i]?(this.fns[i]=n,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=()=>({error:new v,request:new v,response:new v}),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),he={"Content-Type":"application/json"},k=(e={})=>({...L,headers:he,parseAs:"auto",querySerializer:me,...e});var M=(e={})=>{let r=q(k(),e),n=()=>({...r}),i=l=>(r=q(r,l),n()),a=ee(),d=async l=>{let t={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:P(r.headers,l.headers),serializedBody:void 0};t.security&&await Z({...t,security:t.security}),t.requestValidator&&await t.requestValidator(t),t.body!==void 0&&t.bodySerializer&&(t.serializedBody=t.bodySerializer(t.body)),(t.body===void 0||t.serializedBody==="")&&t.headers.delete("Content-Type");let f=t,E=I(f);return{opts:f,url:E}},u=async l=>{let{opts:t,url:f}=await d(l),E={redirect:"follow",...t,body:j(t)},w=new Request(f,E);for(let y of a.request.fns)y&&(w=await y(w,t));let b=t.fetch,c;try{c=await b(w)}catch(y){let h=y;for(let m of a.error.fns)m&&(h=await m(y,void 0,w,t));if(h=h||{},t.throwOnError)throw h;return t.responseStyle==="data"?void 0:{error:h,request:w,response:void 0}}for(let y of a.response.fns)y&&(c=await y(c,w,t));let O={request:w,response:c};if(c.ok){let y=(t.parseAs==="auto"?Y(c.headers.get("Content-Type")):t.parseAs)??"json";if(c.status===204||c.headers.get("Content-Length")==="0"){let m;switch(y){case"arrayBuffer":case"blob":case"text":m=await c[y]();break;case"formData":m=new FormData;break;case"stream":m=c.body;break;case"json":default:m={};break}return t.responseStyle==="data"?m:{data:m,...O}}let h;switch(y){case"arrayBuffer":case"blob":case"formData":case"text":h=await c[y]();break;case"json":{let m=await c.text();h=m?JSON.parse(m):{};break}case"stream":return t.responseStyle==="data"?c.body:{data:c.body,...O}}return y==="json"&&(t.responseValidator&&await t.responseValidator(h),t.responseTransformer&&(h=await t.responseTransformer(h))),t.responseStyle==="data"?h:{data:h,...O}}let D=await c.text(),B;try{B=JSON.parse(D)}catch{}let T=B??D,A=T;for(let y of a.error.fns)y&&(A=await y(T,c,w,t));if(A=A||{},t.throwOnError)throw A;return t.responseStyle==="data"?void 0:{error:A,...O}},o=l=>t=>u({...t,method:l}),p=l=>async t=>{let{opts:f,url:E}=await d(t);return J({...f,body:f.body,headers:f.headers,method:l,onRequest:async(w,b)=>{let c=new Request(w,b);for(let O of a.request.fns)O&&(c=await O(c,f));return c},serializedBody:j(f),url:E})};return{buildUrl:l=>I({...r,...l}),connect:o("CONNECT"),delete:o("DELETE"),get:o("GET"),getConfig:n,head:o("HEAD"),interceptors:a,options:o("OPTIONS"),patch:o("PATCH"),post:o("POST"),put:o("PUT"),request:u,setConfig:i,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:o("TRACE")}};var s=M(k({baseUrl:"https://business.services.rehive.com/api/"}));var ge=e=>(e.client??s).post({url:"/activate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),fe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e}),Oe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),Re=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e}),be=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Be=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-categories/{identifier}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Te=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e}),Ce=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e}),Ae=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/business-users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),De=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/",...e}),ve=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e}),ke=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Me=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ue=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),Se=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/categories/{category_id}/",...e}),ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e}),Pe=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Le=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),je=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e}),Ie=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qe=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/documents/{document_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ke=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e}),_e=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/",...e}),Ne=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),We=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e}),He=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e}),Fe=e=>(e?.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Je=e=>(e?.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/company/",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Qe=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/",...e}),Ge=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/admin/currencies/{code}/",...e}),Xe=e=>(e.client??s).post({url:"/admin/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ye=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/",...e}),Ze=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/businesses/{business_id}/",...e}),es=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/customer/enroll/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ss=e=>(e.client??s).post({url:"/deactivate/",...e,headers:{"Content-Type":"application/json",...e.headers}}),rs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/",...e}),ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/business-categories/{identifier}/",...e}),ts=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e}),as=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/",...e,headers:{"Content-Type":"application/json",...e.headers}}),is=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e}),os=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),us=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ps=e=>(e.client??s).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/categories/{category_id}/",...e}),cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e}),ls=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ys=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/documents/{document_id}/",...e}),ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e}),hs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/",...e,headers:{"Content-Type":"application/json",...e.headers}}),gs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e}),fs=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Os=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),ws=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/logs/",...e}),Rs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e}),bs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/refunds/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/invoices/{invoice_id}/transactions/",...e}),Ts=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/",...e}),Cs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/",...e}),Es=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/metrics/{metric_id}/points/",...e}),As=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e}),xs=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ds=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/",...e}),vs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/payouts/{payout_id}/transactions/",...e}),ks=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/",...e}),Ms=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/transactions/{transaction_id}/",...e}),Us=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e}),Ss=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/",...e,headers:{"Content-Type":"application/json",...e.headers}}),zs=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e}),Ps=e=>(e.client??s).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ls=e=>(e.client??s).put({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{business_id}/users/{user_id}/",...e,headers:{"Content-Type":"application/json",...e.headers}}),js=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e}),Is=e=>(e.client??s).post({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/businesses/{identifier}/categories/",...e,headers:{"Content-Type":"application/json",...e.headers}}),qs=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/manager/company/",...e}),Ks=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/",...e}),_s=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/business-categories/{identifier}/",...e}),$s=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/",...e}),Ns=e=>(e.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/businesses/{identifier}/",...e}),Ws=e=>(e?.client??s).get({security:[{name:"Authorization",type:"apiKey"}],url:"/user/company/",...e}),Hs=e=>(e.client??s).post({url:"/webhook/",...e,headers:{"Content-Type":"application/json",...e.headers}});function Vs(e){let r=M(F(e,"https://business.services.rehive.com/api/"));return V(K,r)}export{Vs as createBusinessApi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-Bkkri-AM.mjs';
|
|
2
|
+
import '../create-auth-ChOASbvo.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:
|
|
33
|
+
type BodySerializer = (body: unknown) => unknown;
|
|
34
34
|
type QuerySerializerOptionsObject = {
|
|
35
35
|
allowReserved?: boolean;
|
|
36
36
|
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
@@ -105,7 +105,7 @@ interface Config$1 {
|
|
|
105
105
|
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
106
106
|
/**
|
|
107
107
|
* A function transforming response data before it's returned. This is useful
|
|
108
|
-
* for post-processing data, e.g
|
|
108
|
+
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
109
109
|
*/
|
|
110
110
|
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
111
111
|
/**
|
|
@@ -265,6 +265,7 @@ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle =
|
|
|
265
265
|
url: Url;
|
|
266
266
|
}
|
|
267
267
|
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
268
|
+
headers: Headers;
|
|
268
269
|
serializedBody?: string;
|
|
269
270
|
}
|
|
270
271
|
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'data'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
@@ -287,7 +288,7 @@ interface ClientOptions$1 {
|
|
|
287
288
|
throwOnError?: boolean;
|
|
288
289
|
}
|
|
289
290
|
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
290
|
-
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<
|
|
291
|
+
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
291
292
|
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
292
293
|
type BuildUrlFn = <TData extends {
|
|
293
294
|
body?: unknown;
|
|
@@ -433,7 +434,7 @@ type AdminCreateConversion = {
|
|
|
433
434
|
* * `complete` - Complete
|
|
434
435
|
* * `failed` - Failed
|
|
435
436
|
*/
|
|
436
|
-
status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
437
|
+
readonly status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
437
438
|
readonly collection: string | null;
|
|
438
439
|
readonly txns: Array<string>;
|
|
439
440
|
metadata?: {
|
|
@@ -1015,7 +1016,7 @@ type UserCreateConversion = {
|
|
|
1015
1016
|
* * `complete` - Complete
|
|
1016
1017
|
* * `failed` - Failed
|
|
1017
1018
|
*/
|
|
1018
|
-
status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
1019
|
+
readonly status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
1019
1020
|
readonly collection: string | null;
|
|
1020
1021
|
readonly txns: Array<string>;
|
|
1021
1022
|
metadata?: {
|
|
@@ -2461,7 +2462,7 @@ type WebhookCreateResponses = {
|
|
|
2461
2462
|
};
|
|
2462
2463
|
type WebhookCreateResponse = WebhookCreateResponses[keyof WebhookCreateResponses];
|
|
2463
2464
|
|
|
2464
|
-
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
2465
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
2465
2466
|
/**
|
|
2466
2467
|
* You can provide a client instance returned by `createClient()` instead of
|
|
2467
2468
|
* individual options. This might be also useful if you want to implement a
|
|
@@ -2715,7 +2716,7 @@ declare const userSettingsUpdate: <ThrowOnError extends boolean = false>(options
|
|
|
2715
2716
|
*/
|
|
2716
2717
|
declare const webhookCreate: <ThrowOnError extends boolean = false>(options: Options<WebhookCreateData, ThrowOnError>) => RequestResult<WebhookCreateResponses, unknown, ThrowOnError, "data">;
|
|
2717
2718
|
|
|
2718
|
-
type sdk_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options<TData, ThrowOnError>;
|
|
2719
|
+
type sdk_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options<TData, ThrowOnError, TResponse>;
|
|
2719
2720
|
declare const sdk_activateCreate: typeof activateCreate;
|
|
2720
2721
|
declare const sdk_adminCompanyPartialUpdate: typeof adminCompanyPartialUpdate;
|
|
2721
2722
|
declare const sdk_adminCompanyRetrieve: typeof adminCompanyRetrieve;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-
|
|
2
|
-
import '../create-auth-
|
|
1
|
+
import { A as ApiFactoryConfig, B as BoundSdk } from '../create-api-client-CgvKBlQ_.js';
|
|
2
|
+
import '../create-auth-ChOASbvo.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:
|
|
33
|
+
type BodySerializer = (body: unknown) => unknown;
|
|
34
34
|
type QuerySerializerOptionsObject = {
|
|
35
35
|
allowReserved?: boolean;
|
|
36
36
|
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
@@ -105,7 +105,7 @@ interface Config$1 {
|
|
|
105
105
|
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
106
106
|
/**
|
|
107
107
|
* A function transforming response data before it's returned. This is useful
|
|
108
|
-
* for post-processing data, e.g
|
|
108
|
+
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
109
109
|
*/
|
|
110
110
|
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
111
111
|
/**
|
|
@@ -265,6 +265,7 @@ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle =
|
|
|
265
265
|
url: Url;
|
|
266
266
|
}
|
|
267
267
|
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'data', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
268
|
+
headers: Headers;
|
|
268
269
|
serializedBody?: string;
|
|
269
270
|
}
|
|
270
271
|
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'data'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
@@ -287,7 +288,7 @@ interface ClientOptions$1 {
|
|
|
287
288
|
throwOnError?: boolean;
|
|
288
289
|
}
|
|
289
290
|
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
290
|
-
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<
|
|
291
|
+
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
291
292
|
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'data'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
292
293
|
type BuildUrlFn = <TData extends {
|
|
293
294
|
body?: unknown;
|
|
@@ -433,7 +434,7 @@ type AdminCreateConversion = {
|
|
|
433
434
|
* * `complete` - Complete
|
|
434
435
|
* * `failed` - Failed
|
|
435
436
|
*/
|
|
436
|
-
status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
437
|
+
readonly status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
437
438
|
readonly collection: string | null;
|
|
438
439
|
readonly txns: Array<string>;
|
|
439
440
|
metadata?: {
|
|
@@ -1015,7 +1016,7 @@ type UserCreateConversion = {
|
|
|
1015
1016
|
* * `complete` - Complete
|
|
1016
1017
|
* * `failed` - Failed
|
|
1017
1018
|
*/
|
|
1018
|
-
status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
1019
|
+
readonly status: 'quoted' | 'pending' | 'complete' | 'failed';
|
|
1019
1020
|
readonly collection: string | null;
|
|
1020
1021
|
readonly txns: Array<string>;
|
|
1021
1022
|
metadata?: {
|
|
@@ -2461,7 +2462,7 @@ type WebhookCreateResponses = {
|
|
|
2461
2462
|
};
|
|
2462
2463
|
type WebhookCreateResponse = WebhookCreateResponses[keyof WebhookCreateResponses];
|
|
2463
2464
|
|
|
2464
|
-
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
2465
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$1<TData, ThrowOnError, TResponse> & {
|
|
2465
2466
|
/**
|
|
2466
2467
|
* You can provide a client instance returned by `createClient()` instead of
|
|
2467
2468
|
* individual options. This might be also useful if you want to implement a
|
|
@@ -2715,7 +2716,7 @@ declare const userSettingsUpdate: <ThrowOnError extends boolean = false>(options
|
|
|
2715
2716
|
*/
|
|
2716
2717
|
declare const webhookCreate: <ThrowOnError extends boolean = false>(options: Options<WebhookCreateData, ThrowOnError>) => RequestResult<WebhookCreateResponses, unknown, ThrowOnError, "data">;
|
|
2717
2718
|
|
|
2718
|
-
type sdk_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options<TData, ThrowOnError>;
|
|
2719
|
+
type sdk_Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options<TData, ThrowOnError, TResponse>;
|
|
2719
2720
|
declare const sdk_activateCreate: typeof activateCreate;
|
|
2720
2721
|
declare const sdk_adminCompanyPartialUpdate: typeof adminCompanyPartialUpdate;
|
|
2721
2722
|
declare const sdk_adminCompanyRetrieve: typeof adminCompanyRetrieve;
|