/** * @hanzo/commerce/client — the Commerce and Billing API, as the document * describes it. * * GENERATED from `cloud/openapi.yaml`. Do not hand-edit: a method here exists * because an operation exists, and it is named by that operation's own id. The * previous client was written by hand and eleven of its twenty-six addresses had * stopped existing, which nothing reported until a call 404'd. * * Two surfaces, orthogonal and both here because a store needs both: `commerce` * is the storefront — cart, catalog, product, variant, discount, store — and * `billing` is the ledger — balance, credits, invoices, methods, subscriptions, * usage. They share one noun, `plans`. * * const commerce = new Commerce({ baseUrl: 'https://api.hanzo.ai', token }) * const balance = await commerce.getBillingBalance() */ /** Where to reach the API, and as whom. */ export interface CommerceClientConfig { baseUrl?: string; token?: string; /** Milliseconds before a request is abandoned. Default 30s. */ timeoutMs?: number; } /** * A refusal, carrying what the service said about it. * * RFC 9457 problem documents are what this API answers with, so `detail` is the * member to read; `status` is the code. The raw body is kept because a problem * document may carry extension members this class does not name. */ export declare class CommerceApiError extends Error { readonly status: number; readonly detail: string; readonly body: unknown; constructor(status: number, detail: string, body: unknown); } export declare const DEFAULT_BASE_URL = "https://api.hanzo.ai"; /** From the document. */ export interface Transaction { amount?: number; createdAt?: string; currency?: string; expiresAt?: string; id?: string; metadata?: unknown; notes?: string; tags?: string; type?: string; } /** From the document. */ export interface Subscription { cancelAtPeriodEnd?: boolean; canceledAt?: string; createdAt?: string; currentPeriodEnd?: string; currentPeriodStart?: string; defaultPaymentMethod?: string; endedAt?: string; id?: string; mrrCents?: number; plan?: SubscriptionPlan; planId?: string; providerType?: string; quantity?: number; status?: string; trialEnd?: string; trialStart?: string; updatedAt?: string; userId?: string; } /** From the document. */ export interface CreditGrant { active?: boolean; amountCents?: number; createdAt?: string; currency?: string; effectiveAt?: string; expiresAt?: string; id?: string; name?: string; priority?: number; remainingCents?: number; tags?: string; userId?: string; voided?: boolean; } /** From the document. */ export interface SubscriptionPlan { currency?: string; id?: string; interval?: string; name?: string; price?: number; } export declare class Commerce { private readonly baseUrl; private token; private readonly timeoutMs; constructor(config?: CommerceClientConfig); /** Use this token from now on — after a sign-in, or a refresh. */ setToken(token: string): void; /** * One request, one place. * * A per-call token overrides the client's, which is what a server rendering * for one user among many needs: the client is shared, the identity is not. * * Public because a few addresses this API serves are in neither document. * Everything the documents DO describe has a method below; reach for this only * when nothing there fits, and say why at the call site. */ request(method: string, path: string, opts?: { query?: Record; body?: unknown; token?: string; headers?: Record; }): Promise; /** Answers the caller's billing accounts: the org itself, its currency, when it was opened, and the caller's own standing in it. */ getBillingAccounts(opts?: { token?: string; headers?: Record; }): Promise; /** Answers one billing account's roster. */ getBillingAccountsByIdMembers(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Lists this org's spend caps: the ceiling, its scope, whether it enforces, and how much of it has been spent this period. */ getBillingAlerts(opts?: { token?: string; headers?: Record; }): Promise; /** Opens a spend cap on the caller's own org. */ postBillingAlerts(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Answers whether one proposed spend fits inside this org's caps. */ getBillingAlertsAuthorize(opts?: { query?: Record; token?: string; headers?: Record; }): Promise; /** Removes one of the caller's spend caps and answers 204. */ deleteBillingAlertsById(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Changes one spend cap: raise or lower the ceiling, flip enforcement, retune the rate limit. */ patchBillingAlertsById(id: string, opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Prepaid credit the caller's org can still spend */ getBillingBalance(opts?: { token?: string; headers?: Record; }): Promise; /** Answers what the caller can spend right now, one entry per currency. */ getBillingCreditBalance(opts?: { token?: string; headers?: Record; }): Promise; /** Answers that same spendable credit split by grant tag, with the earliest expiry under each and the total across all of them. */ getBillingCreditBalanceBreakdown(opts?: { token?: string; headers?: Record; }): Promise; /** Lists the caller's credit grants — every one of them, spent and lapsed and voided included. */ getBillingCredits(opts?: { token?: string; headers?: Record; }): Promise; /** Issues a deposit address the caller can send crypto to, on the asset they ask for. */ postBillingCryptoDeposit(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Reads one of the caller's own deposit intents back — pending, confirming, or succeeded. */ getBillingCryptoDepositById(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Answers which chains and tokens the crypto rail accepts — what an asset picker renders. */ getBillingCryptoOptions(opts?: { token?: string; headers?: Record; }): Promise; /** Lists the caller's invoices, newest first, with the count beside them. */ getBillingInvoices(opts?: { token?: string; headers?: Record; }): Promise; /** Raise a draft invoice against a customer */ raiseInvoice(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Read one invoice */ getInvoice(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Collect an issued invoice from credits, balance, then card */ collectInvoice(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Issue a draft invoice, making it collectible */ issueInvoice(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Download one invoice as a PDF */ getBillingInvoicesByIdPdf(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Void a draft or issued invoice */ voidInvoice(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Answers the org's own postings inside `range=`, each as a signed entry: a DEPOSIT CREDITS the wallet (positive, account `credits:`) and every other posting DEBITS it (negative, account `usage:`), described by its notes or its tags. */ getBillingLedger(opts?: { query?: Record; token?: string; headers?: Record; }): Promise; /** Cards and accounts on file for the caller */ getBillingMethods(opts?: { token?: string; headers?: Record; }): Promise; /** Save a card or account for the caller */ postBillingMethods(opts?: { token?: string; headers?: Record; }): Promise; /** Removes one card or account the caller has saved. */ deleteBillingMethodsById(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Moves this org between sandbox money and real money. */ postBillingMode(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Answers the org's outbound payouts, newest first — amount, destination, status, and the failure reason where one applies. */ getBillingPayouts(opts?: { token?: string; headers?: Record; }): Promise; /** The plan catalog, priced with whatever offer is in force */ getBillingPlans(opts?: { token?: string; headers?: Record; }): Promise; /** Cards and accounts on file for the caller */ getBillingPortalMethods(opts?: { token?: string; headers?: Record; }): Promise; /** Save a card or account for the caller */ postBillingPortalMethods(opts?: { token?: string; headers?: Record; }): Promise; /** DetachPortalMethod is DetachMethod at the address a hosted checkout addresses it by. */ deleteBillingPortalMethodsById(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Reads the caller's auto-reload rule: top the balance up by `amountCents` whenever it falls below `thresholdCents`, charging the card on file off-session. */ getBillingRecharge(opts?: { token?: string; headers?: Record; }): Promise; /** Sets the caller's auto-reload rule, and answers with the rule as stored. */ putBillingRecharge(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Sweeps every org's auto-recharge and answers what it did. */ postBillingRechargeRunAll(opts?: { token?: string; headers?: Record; }): Promise; /** Answers the PUBLIC half of this org's processor configuration — the ids a browser needs to tokenize a card, and the environment it must tokenize against. */ getBillingSettings(opts?: { token?: string; headers?: Record; }): Promise; /** Buy a plan with a card */ postBillingSubscribeCard(opts?: { token?: string; headers?: Record; }): Promise; /** Lists the plans the caller holds, with the count beside them. */ getBillingSubscriptions(opts?: { token?: string; headers?: Record; }): Promise; /** End a subscription */ cancelSubscription(id: string, opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Put a canceled subscription back on its plan */ reactivateSubscription(id: string, opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Answers which tier the caller is on, what it allows, and what is left to spend. */ getBillingTier(opts?: { token?: string; headers?: Record; }): Promise; /** Charges a card the caller already saved and credits the balance. */ postBillingTopup(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Charges a single-use card token and credits the caller's balance. */ postBillingTopupToken(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Answers one page of the caller's own ledger, newest first: what moved, how much, when, and what it was tagged with. */ getBillingTransactions(opts?: { query?: Record; token?: string; headers?: Record; }): Promise; /** Reads one ledger entry by its id. */ getBillingTransactionsById(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Every billed call the caller's org made, attributed to a product */ getBillingUsage(opts?: { token?: string; headers?: Record; }): Promise; /** Answers per-account totals for the linked provider accounts the gateway ROUTED this caller's traffic through — requests, prompt and completion tokens, recorded cost — plus their honest sum. */ getBillingUsageAccounts(opts?: { token?: string; headers?: Record; }): Promise; /** Answers the caller's month: what their plan includes, what has been consumed against it, and the wallet beside it. */ getBillingUsageRollup(opts?: { token?: string; headers?: Record; }): Promise; /** Answers where to send a wire top-up: the receiving bank details, with the caller's own payment reference. */ getBillingWire(opts?: { token?: string; headers?: Record; }): Promise; /** The catalog projection with cost and margin included */ getCommerceAdminCatalog(opts?: { token?: string; headers?: Record; }): Promise; /** Open a cart for a shopper to fill */ openCart(opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** Read one cart with its lines and totals */ getCart(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Discard a cart the shopper abandoned */ discardCart(id: string, opts?: { token?: string; headers?: Record; }): Promise; /** Set one item's quantity in a cart; zero removes it */ setCartItem(id: string, opts?: { body?: unknown; token?: string; headers?: Record; }): Promise; /** The public product catalog projection for a brand */ getCommerceCatalog(opts?: { token?: string; headers?: Record; }): Promise; /** The raw catalog entries, including the unpublished ones */ getCommerceCatalogEntries(opts?: { token?: string; headers?: Record; }): Promise; /** Add a catalog entry */ postCommerceCatalogEntries(opts?: { token?: string; headers?: Record; }): Promise; /** Land a syncer's view of the model catalog: upstream costs and machine facts */ postCommerceCatalogModels(opts?: { token?: string; headers?: Record; }): Promise; /** Refresh the model catalog by reading the upstream provider */ postCommerceCatalogModelsRefresh(opts?: { token?: string; headers?: Record; }): Promise; /** Seed the embedded catalog, without disturbing edits already made */ postCommerceCatalogSeed(opts?: { token?: string; headers?: Record; }): Promise; /** List your org's collections, as a page */ getCommerceCollection(opts?: { token?: string; headers?: Record; }): Promise; /** Create a collection */ postCommerceCollection(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a collection, keeping a recoverable copy */ deleteCommerceCollectionByCollectionid(collectionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one collection */ getCommerceCollectionByCollectionid(collectionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a collection */ patchCommerceCollectionByCollectionid(collectionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a collection — for clients that cannot send PUT, PATCH or DELETE */ postCommerceCollectionByCollectionid(collectionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a collection outright */ putCommerceCollectionByCollectionid(collectionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** The reference currency list the price and settings pickers render */ getCommerceCurrencies(opts?: { token?: string; headers?: Record; }): Promise; /** Read the crypto deposit watcher's runtime state, asset by asset */ getCommerceDeposits(opts?: { token?: string; headers?: Record; }): Promise; /** List your org's disclosures, as a page */ getCommerceDisclosure(opts?: { token?: string; headers?: Record; }): Promise; /** Create a disclosure */ postCommerceDisclosure(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a disclosure, keeping a recoverable copy */ deleteCommerceDisclosureByDisclosureid(disclosureid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one disclosure */ getCommerceDisclosureByDisclosureid(disclosureid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a disclosure */ patchCommerceDisclosureByDisclosureid(disclosureid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a disclosure — for clients that cannot send PUT, PATCH or DELETE */ postCommerceDisclosureByDisclosureid(disclosureid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a disclosure outright */ putCommerceDisclosureByDisclosureid(disclosureid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's discounts, as a page */ getCommerceDiscount(opts?: { token?: string; headers?: Record; }): Promise; /** Create a discount */ postCommerceDiscount(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a discount, keeping a recoverable copy */ deleteCommerceDiscountByDiscountid(discountid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one discount */ getCommerceDiscountByDiscountid(discountid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a discount */ patchCommerceDiscountByDiscountid(discountid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a discount — for clients that cannot send PUT, PATCH or DELETE */ postCommerceDiscountByDiscountid(discountid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a discount outright */ putCommerceDiscountByDiscountid(discountid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Answers ok whenever the commerce subsystem is mounted. */ getCommerceHealth(opts?: { token?: string; headers?: Record; }): Promise; /** List your org's movies, as a page */ getCommerceMovie(opts?: { token?: string; headers?: Record; }): Promise; /** Create a movie */ postCommerceMovie(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a movie, keeping a recoverable copy */ deleteCommerceMovieByMovieid(movieid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one movie */ getCommerceMovieByMovieid(movieid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a movie */ patchCommerceMovieByMovieid(movieid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a movie — for clients that cannot send PUT, PATCH or DELETE */ postCommerceMovieByMovieid(movieid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a movie outright */ putCommerceMovieByMovieid(movieid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's notes, as a page */ getCommerceNote(opts?: { token?: string; headers?: Record; }): Promise; /** Create a note */ postCommerceNote(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a note, keeping a recoverable copy */ deleteCommerceNoteByNoteid(noteid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one note */ getCommerceNoteByNoteid(noteid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a note */ patchCommerceNoteByNoteid(noteid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a note — for clients that cannot send PUT, PATCH or DELETE */ postCommerceNoteByNoteid(noteid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a note outright */ putCommerceNoteByNoteid(noteid: string, opts?: { token?: string; headers?: Record; }): Promise; /** The public org configuration a checkout page boots from */ getCommerceOrg(opts?: { token?: string; headers?: Record; }): Promise; /** The raw plan authority rows */ getCommercePlansEntries(opts?: { token?: string; headers?: Record; }): Promise; /** Add a subscription plan */ postCommercePlansEntries(opts?: { token?: string; headers?: Record; }): Promise; /** Remove a plan from the authority */ deleteCommercePlansEntriesBySlug(slug: string, opts?: { token?: string; headers?: Record; }): Promise; /** Edit a plan, leaving the fields you omit alone */ putCommercePlansEntriesBySlug(slug: string, opts?: { token?: string; headers?: Record; }): Promise; /** Seed the embedded plan catalog, without overwriting administrative edits */ postCommercePlansSeed(opts?: { token?: string; headers?: Record; }): Promise; /** List your org's products, as a page */ getCommerceProduct(opts?: { token?: string; headers?: Record; }): Promise; /** Create a product */ postCommerceProduct(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a product, keeping a recoverable copy */ deleteCommerceProductByProductid(productid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one product */ getCommerceProductByProductid(productid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a product */ patchCommerceProductByProductid(productid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a product — for clients that cannot send PUT, PATCH or DELETE */ postCommerceProductByProductid(productid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a product outright */ putCommerceProductByProductid(productid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List what one unit of each metered thing costs */ getCommerceRatesEntries(opts?: { token?: string; headers?: Record; }): Promise; /** Add a rate */ postCommerceRatesEntries(opts?: { token?: string; headers?: Record; }): Promise; /** Remove a rate outright */ deleteCommerceRatesEntriesByProductByMeter(product: string, meter: string, opts?: { token?: string; headers?: Record; }): Promise; /** Edit a rate, and mark it as operator-set */ putCommerceRatesEntriesByProductByMeter(product: string, meter: string, opts?: { token?: string; headers?: Record; }): Promise; /** Load the published price document, reconciling rather than replacing */ postCommerceRatesImport(opts?: { token?: string; headers?: Record; }): Promise; /** List your org's returns, as a page */ getCommerceReturn(opts?: { token?: string; headers?: Record; }): Promise; /** Create a return */ postCommerceReturn(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a return, keeping a recoverable copy */ deleteCommerceReturnByReturnid(returnid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one return */ getCommerceReturnByReturnid(returnid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a return */ patchCommerceReturnByReturnid(returnid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a return — for clients that cannot send PUT, PATCH or DELETE */ postCommerceReturnByReturnid(returnid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a return outright */ putCommerceReturnByReturnid(returnid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's sales channels, as a page */ getCommerceSaleschannel(opts?: { token?: string; headers?: Record; }): Promise; /** Create a sales channel */ postCommerceSaleschannel(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a sales channel, keeping a recoverable copy */ deleteCommerceSaleschannelBySaleschannelid(saleschannelid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one sales channel */ getCommerceSaleschannelBySaleschannelid(saleschannelid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a sales channel */ patchCommerceSaleschannelBySaleschannelid(saleschannelid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a sales channel — for clients that cannot send PUT, PATCH or DELETE */ postCommerceSaleschannelBySaleschannelid(saleschannelid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a sales channel outright */ putCommerceSaleschannelBySaleschannelid(saleschannelid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's stock locations, as a page */ getCommerceStocklocation(opts?: { token?: string; headers?: Record; }): Promise; /** Create a stock location */ postCommerceStocklocation(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a stock location, keeping a recoverable copy */ deleteCommerceStocklocationByStocklocationid(stocklocationid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one stock location */ getCommerceStocklocationByStocklocationid(stocklocationid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a stock location */ patchCommerceStocklocationByStocklocationid(stocklocationid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a stock location — for clients that cannot send PUT, PATCH or DELETE */ postCommerceStocklocationByStocklocationid(stocklocationid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a stock location outright */ putCommerceStocklocationByStocklocationid(stocklocationid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's storefronts as a page */ getCommerceStore(opts?: { token?: string; headers?: Record; }): Promise; /** Create a storefront */ postCommerceStore(opts?: { token?: string; headers?: Record; }): Promise; /** Whether a store is entitled to trade, and why */ getCommerceStoreAccess(opts?: { token?: string; headers?: Record; }): Promise; /** Resolve your org's active storefront without naming an id */ getCommerceStoreCurrent(opts?: { token?: string; headers?: Record; }): Promise; /** Mint your org's least-privilege storefront read key */ postCommerceStoreToken(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a storefront, keeping a recoverable copy */ deleteCommerceStoreByStoreid(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one storefront */ getCommerceStoreByStoreid(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a storefront */ patchCommerceStoreByStoreid(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for clients that cannot send PUT, PATCH or DELETE */ postCommerceStoreByStoreid(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a storefront outright */ putCommerceStoreByStoreid(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Authorize a new order against a storefront, holding the funds without settling them */ postCommerceStoreByStoreidAuthorize(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Authorize an order that already exists, holding the funds without settling them */ postCommerceStoreByStoreidAuthorizeByOrderid(storeid: string, orderid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch a bundle as this storefront sells it */ getCommerceStoreByStoreidBundleByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** Capture a previously authorized order and settle the payment */ postCommerceStoreByStoreidCaptureByOrderid(storeid: string, orderid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Authorize and capture a new order in one call */ postCommerceStoreByStoreidCharge(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Authorize a new order against a storefront, holding the funds — the checkout spelling */ postCommerceStoreByStoreidCheckoutAuthorize(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Authorize an existing order, holding the funds — the checkout spelling */ postCommerceStoreByStoreidCheckoutAuthorizeByOrderid(storeid: string, orderid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Capture a previously authorized order and settle it — the checkout spelling */ postCommerceStoreByStoreidCheckoutCaptureByOrderid(storeid: string, orderid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Authorize and capture a new order in one call — the checkout spelling */ postCommerceStoreByStoreidCheckoutCharge(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** PayPal cancel by pay key — refuses, exactly as the unprefixed address does */ postCommerceStoreByStoreidCheckoutPaypalCancelByPaykey(storeid: string, payKey: string, opts?: { token?: string; headers?: Record; }): Promise; /** PayPal confirm by pay key — refuses, exactly as the unprefixed address does */ postCommerceStoreByStoreidCheckoutPaypalConfirmByPaykey(storeid: string, payKey: string, opts?: { token?: string; headers?: Record; }): Promise; /** Start a PayPal authorization for a new order — the checkout spelling */ postCommerceStoreByStoreidCheckoutPaypalPay(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** The storefront's whole listing override map */ getCommerceStoreByStoreidListing(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Remove a listing override */ deleteCommerceStoreByStoreidListingByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one listing override, by item id or by its slug or SKU */ getCommerceStoreByStoreidListingByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** Confirm a listing override exists and re-save the store */ patchCommerceStoreByStoreidListingByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** Add a listing override under a new key */ postCommerceStoreByStoreidListingByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** Upsert a listing override */ putCommerceStoreByStoreidListingByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** PayPal cancel by pay key — refuses, because a pay key alone does not identify the order */ postCommerceStoreByStoreidPaypalCancelByPaykey(storeid: string, payKey: string, opts?: { token?: string; headers?: Record; }): Promise; /** PayPal confirm by pay key — refuses, because a pay key alone does not identify the order */ postCommerceStoreByStoreidPaypalConfirmByPaykey(storeid: string, payKey: string, opts?: { token?: string; headers?: Record; }): Promise; /** Start a PayPal authorization for a new order */ postCommerceStoreByStoreidPaypalPay(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch a product as this storefront sells it */ getCommerceStoreByStoreidProductByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** Start this store's no-card trial on the entry plan */ postCommerceStoreByStoreidTrial(storeid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch a variant as this storefront sells it */ getCommerceStoreByStoreidVariantByKey(storeid: string, key: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's submissions, as a page */ getCommerceSubmission(opts?: { token?: string; headers?: Record; }): Promise; /** Create a submission */ postCommerceSubmission(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a submission, keeping a recoverable copy */ deleteCommerceSubmissionBySubmissionid(submissionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one submission */ getCommerceSubmissionBySubmissionid(submissionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a submission */ patchCommerceSubmissionBySubmissionid(submissionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a submission — for clients that cannot send PUT, PATCH or DELETE */ postCommerceSubmissionBySubmissionid(submissionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a submission outright */ putCommerceSubmissionBySubmissionid(submissionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's subscribers, as a page */ getCommerceSubscriber(opts?: { token?: string; headers?: Record; }): Promise; /** Create a subscriber */ postCommerceSubscriber(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a subscriber, keeping a recoverable copy */ deleteCommerceSubscriberBySubscriberid(subscriberid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one subscriber */ getCommerceSubscriberBySubscriberid(subscriberid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a subscriber */ patchCommerceSubscriberBySubscriberid(subscriberid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a subscriber — for clients that cannot send PUT, PATCH or DELETE */ postCommerceSubscriberBySubscriberid(subscriberid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a subscriber outright */ putCommerceSubscriberBySubscriberid(subscriberid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's token transactions, as a page */ getCommerceTokentransaction(opts?: { token?: string; headers?: Record; }): Promise; /** Create a token transaction */ postCommerceTokentransaction(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a token transaction, keeping a recoverable copy */ deleteCommerceTokentransactionByTokentransactionid(tokentransactionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one token transaction */ getCommerceTokentransactionByTokentransactionid(tokentransactionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a token transaction */ patchCommerceTokentransactionByTokentransactionid(tokentransactionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a token transaction — for clients that cannot send PUT, PATCH or DELETE */ postCommerceTokentransactionByTokentransactionid(tokentransactionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a token transaction outright */ putCommerceTokentransactionByTokentransactionid(tokentransactionid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's transfers, as a page */ getCommerceTransfer(opts?: { token?: string; headers?: Record; }): Promise; /** Create a transfer */ postCommerceTransfer(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a transfer, keeping a recoverable copy */ deleteCommerceTransferByTransferid(transferid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one transfer */ getCommerceTransferByTransferid(transferid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a transfer */ patchCommerceTransferByTransferid(transferid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a transfer — for clients that cannot send PUT, PATCH or DELETE */ postCommerceTransferByTransferid(transferid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a transfer outright */ putCommerceTransferByTransferid(transferid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's variants, as a page */ getCommerceVariant(opts?: { token?: string; headers?: Record; }): Promise; /** Create a variant */ postCommerceVariant(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a variant, keeping a recoverable copy */ deleteCommerceVariantByVariantid(variantid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one variant */ getCommerceVariantByVariantid(variantid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a variant */ patchCommerceVariantByVariantid(variantid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a variant — for clients that cannot send PUT, PATCH or DELETE */ postCommerceVariantByVariantid(variantid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a variant outright */ putCommerceVariantByVariantid(variantid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's wallets, as a page */ getCommerceWallet(opts?: { token?: string; headers?: Record; }): Promise; /** Create a wallet */ postCommerceWallet(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a wallet, keeping a recoverable copy */ deleteCommerceWalletByWalletid(walletid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one wallet */ getCommerceWalletByWalletid(walletid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a wallet */ patchCommerceWalletByWalletid(walletid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a wallet — for clients that cannot send PUT, PATCH or DELETE */ postCommerceWalletByWalletid(walletid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a wallet outright */ putCommerceWalletByWalletid(walletid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's watchlists, as a page */ getCommerceWatchlist(opts?: { token?: string; headers?: Record; }): Promise; /** Create a watchlist */ postCommerceWatchlist(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a watchlist, keeping a recoverable copy */ deleteCommerceWatchlistByWatchlistid(watchlistid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one watchlist */ getCommerceWatchlistByWatchlistid(watchlistid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a watchlist */ patchCommerceWatchlistByWatchlistid(watchlistid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a watchlist — for clients that cannot send PUT, PATCH or DELETE */ postCommerceWatchlistByWatchlistid(watchlistid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a watchlist outright */ putCommerceWatchlistByWatchlistid(watchlistid: string, opts?: { token?: string; headers?: Record; }): Promise; /** List your org's webhooks, as a page */ getCommerceWebhook(opts?: { token?: string; headers?: Record; }): Promise; /** Create a webhook */ postCommerceWebhook(opts?: { token?: string; headers?: Record; }): Promise; /** Delete a webhook, keeping a recoverable copy */ deleteCommerceWebhookByWebhookid(webhookid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Fetch one webhook */ getCommerceWebhookByWebhookid(webhookid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Change part of a webhook */ patchCommerceWebhookByWebhookid(webhookid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Method-override tunnel for a webhook — for clients that cannot send PUT, PATCH or DELETE */ postCommerceWebhookByWebhookid(webhookid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Replace a webhook outright */ putCommerceWebhookByWebhookid(webhookid: string, opts?: { token?: string; headers?: Record; }): Promise; /** Payment-provider webhook intake for settlement and subscription lifecycle events */ postCommerceWebhooksByProvider(provider: string, opts?: { token?: string; headers?: Record; }): Promise; } /** * The process-wide client. * * One instance because the base url and the timeout are properties of the * deployment, not of a call. Pass a token per call where the identity varies. */ export declare function hanzoCommerce(config?: CommerceClientConfig): Commerce;