@hanzo/commerce 7.8.3 → 7.9.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/dist/client.d.ts CHANGED
@@ -1,432 +1,1276 @@
1
1
  /**
2
- * @hanzo/commerce/client
2
+ * @hanzo/commerce/client — the Commerce and Billing API, as the document
3
+ * describes it.
3
4
  *
4
- * Universal TypeScript client for the Hanzo Commerce API.
5
- * Works in browser, Node.js, and edge runtimes no backend required.
6
- * Covers billing, subscriptions, payments, checkout, coupons,
7
- * referrals, affiliates, usage, and plans.
5
+ * GENERATED from `cloud/openapi.yaml`. Do not hand-edit: a method here exists
6
+ * because an operation exists, and it is named by that operation's own id. The
7
+ * previous client was written by hand and eleven of its twenty-six addresses had
8
+ * stopped existing, which nothing reported until a call 404'd.
8
9
  *
9
- * @example
10
- * ```ts
11
- * import { Commerce } from '@hanzo/commerce/client'
10
+ * Two surfaces, orthogonal and both here because a store needs both: `commerce`
11
+ * is the storefront — cart, catalog, product, variant, discount, store — and
12
+ * `billing` is the ledger balance, credits, invoices, methods, subscriptions,
13
+ * usage. They share one noun, `plans`.
12
14
  *
13
- * const commerce = new Commerce({ baseUrl: 'https://api.hanzo.ai', token: iamToken })
14
- *
15
- * // Validate a coupon before checkout
16
- * const coupon = await commerce.validateCoupon('LAUNCH50')
17
- *
18
- * // Create a checkout session
19
- * const session = await commerce.createCheckoutSession({
20
- * items: [{ id: 'plan_pro', quantity: 1 }],
21
- * couponCode: 'LAUNCH50',
22
- * referrerId: 'ref_abc123',
23
- * successUrl: 'https://app.example.com/success',
24
- * cancelUrl: 'https://app.example.com/cancel',
25
- * })
26
- * window.location.href = session.checkoutUrl
27
- *
28
- * // Subscribe
29
- * const sub = await commerce.subscribe({ planId: 'pro', userId: 'user_xyz' })
30
- * ```
15
+ * const commerce = new Commerce({ baseUrl: 'https://api.hanzo.ai', token })
16
+ * const balance = await commerce.getBillingBalance()
31
17
  */
32
- export type CommerceClientConfig = {
33
- /**
34
- * Commerce API base URL.
35
- * Defaults to https://api.hanzo.ai
36
- */
18
+ /** Where to reach the API, and as whom. */
19
+ export interface CommerceClientConfig {
37
20
  baseUrl?: string;
38
- /** @deprecated use baseUrl */
39
- commerceUrl?: string;
40
- /** IAM access token for authenticated requests. */
41
21
  token?: string;
42
- /** Request timeout in milliseconds. Default 15 000. */
22
+ /** Milliseconds before a request is abandoned. Default 30s. */
43
23
  timeoutMs?: number;
44
- };
45
- export type Balance = {
46
- balance: number;
47
- holds: number;
48
- available: number;
49
- };
24
+ }
50
25
  /**
51
- * Tier-aware balance from GET /v1/billing/tier. effectiveAvailable folds the
52
- * tenant's included plan allotment (e.g. the free-tier daily credit) into the
53
- * prepaid available balance gate on this to honor included usage first.
26
+ * A refusal, carrying what the service said about it.
27
+ *
28
+ * RFC 9457 problem documents are what this API answers with, so `detail` is the
29
+ * member to read; `status` is the code. The raw body is kept because a problem
30
+ * document may carry extension members this class does not name.
54
31
  */
55
- export type TierResponse = {
56
- user: string;
57
- tier: {
58
- name: string;
59
- displayName?: string;
60
- maxAgents?: number;
61
- unlimitedAgents?: boolean;
62
- dailyCreditsCents?: number;
63
- allowedModels?: string[];
64
- };
65
- balance: {
66
- currency: string;
67
- prepaidAvailable: number;
68
- dailyRemaining: number;
69
- effectiveAvailable: number;
70
- };
71
- };
72
- export type Transaction = {
73
- id?: string;
74
- owner?: string;
75
- type: 'hold' | 'hold-removed' | 'transfer' | 'deposit' | 'withdraw';
76
- destinationId?: string;
77
- destinationKind?: string;
78
- sourceId?: string;
79
- sourceKind?: string;
80
- currency: string;
81
- amount: number;
82
- tags?: string[];
83
- expiresAt?: string;
84
- metadata?: Record<string, unknown>;
32
+ export declare class CommerceApiError extends Error {
33
+ readonly status: number;
34
+ readonly detail: string;
35
+ readonly body: unknown;
36
+ constructor(status: number, detail: string, body: unknown);
37
+ }
38
+ export declare const DEFAULT_BASE_URL = "https://api.hanzo.ai";
39
+ /** From the document. */
40
+ export interface Transaction {
41
+ amount?: number;
85
42
  createdAt?: string;
86
- };
87
- export type Subscription = {
43
+ currency?: string;
44
+ expiresAt?: string;
88
45
  id?: string;
89
- planId?: string;
90
- userId?: string;
91
- customerId?: string;
92
- status?: 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | string;
93
- billingType?: 'charge_automatically' | 'send_invoice';
94
- periodStart?: string;
95
- periodEnd?: string;
96
- trialStart?: string;
97
- trialEnd?: string;
98
- quantity?: number;
99
- createdAt?: string;
46
+ metadata?: unknown;
47
+ notes?: string;
48
+ tags?: string;
49
+ type?: string;
50
+ }
51
+ /** From the document. */
52
+ export interface Subscription {
100
53
  cancelAtPeriodEnd?: boolean;
54
+ canceledAt?: string;
55
+ createdAt?: string;
101
56
  currentPeriodEnd?: string;
102
- };
103
- export type Plan = {
104
- id?: string;
105
- slug?: string;
106
- name?: string;
107
- description?: string;
108
- price?: number;
109
- priceMonthly?: number;
110
- priceAnnual?: number;
111
- currency?: string;
112
- interval?: 'monthly' | 'yearly' | string;
113
- intervalCount?: number;
114
- trialPeriodDays?: number;
115
- features?: string[];
116
- popular?: boolean;
117
- contactSales?: boolean;
118
- metadata?: Record<string, unknown>;
119
- };
120
- export type Payment = {
57
+ currentPeriodStart?: string;
58
+ defaultPaymentMethod?: string;
59
+ endedAt?: string;
121
60
  id?: string;
122
- orderId?: string;
61
+ mrrCents?: number;
62
+ plan?: SubscriptionPlan;
63
+ planId?: string;
64
+ providerType?: string;
65
+ quantity?: number;
66
+ status?: string;
67
+ trialEnd?: string;
68
+ trialStart?: string;
69
+ updatedAt?: string;
123
70
  userId?: string;
124
- amount?: number;
125
- amountRefunded?: number;
126
- fee?: number;
127
- currency?: string;
128
- status?: 'cancelled' | 'credit' | 'disputed' | 'failed' | 'fraudulent' | 'paid' | 'refunded' | 'unpaid' | string;
129
- captured?: boolean;
130
- live?: boolean;
71
+ }
72
+ /** From the document. */
73
+ export interface CreditGrant {
74
+ active?: boolean;
75
+ amountCents?: number;
131
76
  createdAt?: string;
132
- };
133
- export type UsageRecord = {
134
- user: string;
135
77
  currency?: string;
136
- amount: number;
137
- model?: string;
138
- provider?: string;
139
- tokens?: number;
140
- promptTokens?: number;
141
- completionTokens?: number;
142
- };
143
- export type CouponType = 'Percent' | 'Flat' | 'FreeShipping' | 'FreeItem';
144
- export type Coupon = {
145
- id?: string;
146
- code: string;
147
- type: CouponType;
148
- /** Amount: percentage (0-100) for Percent, cents for Flat */
149
- amount: number;
150
- description?: string;
151
- limit?: number;
152
- used?: number;
153
- startDate?: string;
154
- endDate?: string;
155
- enabled?: boolean;
156
- /** Calculated discount in cents (returned by validateCoupon) */
157
- discountCents?: number;
158
- };
159
- export type CouponValidateResult = {
160
- valid: boolean;
161
- coupon?: Coupon;
162
- error?: string;
163
- /** Discount in cents for a given subtotal */
164
- discountCents?: number;
165
- };
166
- export type Discount = {
78
+ effectiveAt?: string;
79
+ expiresAt?: string;
167
80
  id?: string;
168
- type: 'Percent' | 'Flat' | 'FreeShipping' | 'FreeItem' | 'Bulk';
169
- amount: number;
170
- scope?: 'Product' | 'Variant' | 'Collection' | 'Store';
171
- enabled?: boolean;
172
- startDate?: string;
173
- endDate?: string;
174
- };
175
- export type CheckoutItem = {
176
- id: string;
177
- quantity?: number;
178
- /** Price override in cents */
179
- price?: number;
180
81
  name?: string;
181
- description?: string;
182
- imageUrl?: string;
183
- metadata?: Record<string, unknown>;
184
- };
185
- export type CheckoutSessionRequest = {
186
- items: CheckoutItem[];
187
- successUrl: string;
188
- cancelUrl: string;
189
- couponCode?: string;
190
- referrerId?: string;
191
- affiliateId?: string;
192
- currency?: string;
193
- customer?: {
194
- email?: string;
195
- name?: string;
196
- address?: string;
197
- city?: string;
198
- zip?: string;
199
- };
200
- metadata?: Record<string, unknown>;
201
- };
202
- export type CheckoutSessionResponse = {
203
- checkoutUrl: string;
204
- sessionId: string;
205
- /** Original total in cents before discount */
206
- originalTotal?: number;
207
- /** Final total in cents after discount */
208
- finalTotal?: number;
209
- discount?: {
210
- code: string;
211
- type: CouponType;
212
- amount: number;
213
- discountCents: number;
214
- };
215
- };
216
- export type PaymentMethodType = 'card' | 'bank_account' | 'balance' | 'crypto' | 'wire';
217
- export type PaymentMethod = {
218
- id: string;
219
- type: PaymentMethodType;
220
- isDefault?: boolean;
221
- customerId?: string;
222
- card?: {
223
- brand: string;
224
- last4: string;
225
- expMonth: number;
226
- expYear: number;
227
- };
228
- bank_account?: {
229
- bankName?: string;
230
- last4?: string;
231
- accountType?: 'checking' | 'savings';
232
- routingNumber?: string;
233
- };
234
- crypto?: {
235
- chain: string;
236
- address: string;
237
- label?: string;
238
- };
239
- providerRef?: string;
240
- providerType?: string;
241
- createdAt?: string;
242
- };
243
- export type Referral = {
244
- id?: string;
245
- userId?: string;
246
- referrerId?: string;
247
- affiliateId?: string;
248
- orderId?: string;
249
- fee?: number;
250
- createdAt?: string;
251
- };
252
- export type Referrer = {
253
- id?: string;
254
- userId?: string;
255
- enabled?: boolean;
256
- code?: string;
257
- referrals?: Referral[];
258
- };
259
- export type Affiliate = {
260
- id?: string;
82
+ priority?: number;
83
+ remainingCents?: number;
84
+ tags?: string;
261
85
  userId?: string;
262
- enabled?: boolean;
263
- commission?: number;
264
- couponId?: string;
265
- connectUrl?: string;
266
- };
267
- export type CreditGrant = {
86
+ voided?: boolean;
87
+ }
88
+ /** From the document. */
89
+ export interface SubscriptionPlan {
90
+ currency?: string;
268
91
  id?: string;
269
- userId?: string;
270
- amount: number;
271
- currency: string;
272
- expiresAt?: string;
273
- tags?: string[];
274
- };
92
+ interval?: string;
93
+ name?: string;
94
+ price?: number;
95
+ }
275
96
  export declare class Commerce {
276
97
  private readonly baseUrl;
277
98
  private token;
278
99
  private readonly timeoutMs;
279
100
  constructor(config?: CommerceClientConfig);
280
- /** Update the auth token (e.g. after IAM token refresh). */
101
+ /** Use this token from now on — after a sign-in, or a refresh. */
281
102
  setToken(token: string): void;
282
- private request;
283
- getBalance(user: string, currency?: string, token?: string, headers?: Record<string, string>): Promise<Balance>;
284
- getAllBalances(user: string, token?: string): Promise<Record<string, Balance>>;
285
- /**
286
- * Tier-aware balance: prepaid available plus the tenant's included plan
287
- * allotment (effectiveAvailable). Use this for the metering gate when you
288
- * want included usage (e.g. free-tier daily credit) honored before prepaid
289
- * funds are drawn down.
290
- */
291
- getTier(user: string, opts?: {
292
- token?: string;
293
- headers?: Record<string, string>;
294
- }): Promise<TierResponse>;
295
- addUsageRecord(record: UsageRecord, token?: string, headers?: Record<string, string>): Promise<Transaction>;
296
- getUsageRecords(user: string, currency?: string, token?: string): Promise<Transaction[]>;
297
- addDeposit(params: {
298
- user: string;
299
- currency?: string;
300
- amount: number;
301
- notes?: string;
302
- tags?: string[];
303
- expiresIn?: string;
304
- }, token?: string): Promise<Transaction>;
305
- grantStarterCredit(user: string, token?: string): Promise<Transaction>;
306
- getPlans(token?: string): Promise<Plan[]>;
307
- getPlan(planId: string, token?: string): Promise<Plan | null>;
308
- subscribe(params: {
309
- planId: string;
310
- userId?: string;
311
- customerId?: string;
312
- paymentMethodId?: string;
313
- couponCode?: string;
314
- trialDays?: number;
315
- }, token?: string): Promise<Subscription>;
316
- getSubscription(subscriptionId: string, token?: string): Promise<Subscription | null>;
317
- listSubscriptions(params?: {
318
- customerId?: string;
319
- }, token?: string): Promise<Subscription[]>;
320
- updateSubscription(subscriptionId: string, update: Partial<Subscription>, token?: string): Promise<Subscription>;
321
- cancelSubscription(subscriptionId: string, immediately?: boolean, token?: string): Promise<Subscription>;
322
- reactivateSubscription(subscriptionId: string, token?: string): Promise<Subscription>;
323
- /**
324
- * Create a hosted checkout session.
325
- * Returns a URL to redirect the customer to for payment.
326
- * Supports coupons, referral tracking, and multiple currencies.
327
- */
328
- createCheckoutSession(params: CheckoutSessionRequest, token?: string): Promise<CheckoutSessionResponse>;
329
- addPaymentMethod(params: {
330
- customerId: string;
331
- type: PaymentMethodType;
332
- token?: string;
333
- providerRef?: string;
334
- providerType?: string;
335
- }, token?: string): Promise<PaymentMethod>;
336
- listPaymentMethods(customerId: string, token?: string): Promise<PaymentMethod[]>;
337
- removePaymentMethod(paymentMethodId: string, token?: string): Promise<void>;
338
- setDefaultPaymentMethod(customerId: string, paymentMethodId: string, token?: string): Promise<PaymentMethod>;
339
- /**
340
- * Validate a coupon code.
341
- * Optionally pass a subtotalCents to get the calculated discount amount.
342
- */
343
- validateCoupon(code: string, subtotalCents?: number, token?: string): Promise<CouponValidateResult>;
344
- /**
345
- * Redeem a coupon for a user. Creates credit grant records.
346
- */
347
- redeemCoupon(code: string, userId: string, token?: string): Promise<CreditGrant[]>;
348
- /**
349
- * Get or create a referrer record for a user.
350
- * Returns the referral code/link the user can share.
351
- */
352
- getOrCreateReferrer(userId: string, token?: string): Promise<Referrer>;
353
- getReferrals(userId: string, token?: string): Promise<Referral[]>;
354
- getReferrers(userId: string, token?: string): Promise<Referrer[]>;
355
- /**
356
- * Get affiliate details for a user.
357
- */
358
- getAffiliate(userId: string, token?: string): Promise<Affiliate | null>;
359
- /**
360
- * Create an affiliate account for a user.
361
- * After creation, user can connect their bank via the returnedconnectUrl.
362
- */
363
- createAffiliate(userId: string, token?: string): Promise<Affiliate>;
364
- getAffiliateReferrals(affiliateId: string, token?: string): Promise<Referral[]>;
365
- getAffiliateOrders(affiliateId: string, token?: string): Promise<unknown[]>;
366
- getAffiliateTransactions(affiliateId: string, token?: string): Promise<Transaction[]>;
367
- authorize(orderId: string, token?: string): Promise<Payment>;
368
- capture(orderId: string, token?: string): Promise<Payment>;
369
- charge(orderId: string, token?: string): Promise<Payment>;
370
- refund(paymentId: string, token?: string): Promise<Payment>;
371
- billingRefund(params: {
372
- user: string;
373
- amount: number;
374
- originalTransactionId: string;
375
- currency?: string;
376
- notes?: string;
377
- }, token?: string): Promise<Transaction>;
378
- /**
379
- * Get or create a deposit address for a given chain.
380
- * Used for crypto top-up — user sends funds to this address.
381
- */
382
- getWalletAddress(params: {
383
- chain: string;
384
- userId: string;
385
- }, token?: string): Promise<{
386
- address: string;
387
- chain: string;
388
- qrCode?: string;
389
- }>;
390
- /**
391
- * Add a bank account payment method (ACH).
392
- * plaidToken from Plaid Link or Square bank OAuth.
393
- */
394
- addBankAccount(params: {
395
- customerId: string;
396
- plaidToken?: string;
397
- bankName?: string;
398
- accountType?: 'checking' | 'savings';
399
- }, token?: string): Promise<PaymentMethod>;
400
- addCryptoWallet(params: {
401
- customerId: string;
402
- chain: string;
403
- address: string;
404
- label?: string;
405
- }, token?: string): Promise<PaymentMethod>;
406
103
  /**
407
- * Convenience: charge a saved payment method and deposit credits.
408
- * amount is in cents.
104
+ * One request, one place.
105
+ *
106
+ * A per-call token overrides the client's, which is what a server rendering
107
+ * for one user among many needs: the client is shared, the identity is not.
108
+ *
109
+ * Public because a few addresses this API serves are in neither document.
110
+ * Everything the documents DO describe has a method below; reach for this only
111
+ * when nothing there fits, and say why at the call site.
409
112
  */
410
- topup(params: {
411
- userId: string;
412
- paymentMethodId: string;
413
- amountCents: number;
414
- currency?: string;
415
- }, token?: string): Promise<Transaction>;
416
- }
417
- /**
418
- * Create a commerce client pre-configured for api.hanzo.ai.
419
- * Pass your IAM access token (read from localStorage or cookie).
420
- *
421
- * @example
422
- * ```ts
423
- * import { hanzoCommerce } from '@hanzo/commerce/client'
424
- * const commerce = hanzoCommerce(localStorage.getItem('hanzo-auth-token') ?? undefined)
425
- * const plans = await commerce.getPlans()
426
- * ```
427
- */
428
- export declare function hanzoCommerce(token?: string): Commerce;
429
- export declare class CommerceApiError extends Error {
430
- readonly status: number;
431
- constructor(status: number, message: string);
432
- }
113
+ request<T>(method: string, path: string, opts?: {
114
+ query?: Record<string, string | number | boolean | undefined>;
115
+ body?: unknown;
116
+ token?: string;
117
+ headers?: Record<string, string>;
118
+ }): Promise<T>;
119
+ /** Answers the caller's billing accounts: the org itself, its currency, when it was opened, and the caller's own standing in it. */
120
+ getBillingAccounts<T = unknown>(opts?: {
121
+ token?: string;
122
+ headers?: Record<string, string>;
123
+ }): Promise<T>;
124
+ /** Answers one billing account's roster. */
125
+ getBillingAccountsByIdMembers<T = unknown>(id: string, opts?: {
126
+ token?: string;
127
+ headers?: Record<string, string>;
128
+ }): Promise<T>;
129
+ /** Lists this org's spend caps: the ceiling, its scope, whether it enforces, and how much of it has been spent this period. */
130
+ getBillingAlerts<T = unknown>(opts?: {
131
+ token?: string;
132
+ headers?: Record<string, string>;
133
+ }): Promise<T>;
134
+ /** Opens a spend cap on the caller's own org. */
135
+ postBillingAlerts<T = unknown>(opts?: {
136
+ body?: unknown;
137
+ token?: string;
138
+ headers?: Record<string, string>;
139
+ }): Promise<T>;
140
+ /** Answers whether one proposed spend fits inside this org's caps. */
141
+ getBillingAlertsAuthorize<T = unknown>(opts?: {
142
+ query?: Record<string, string | number | boolean | undefined>;
143
+ token?: string;
144
+ headers?: Record<string, string>;
145
+ }): Promise<T>;
146
+ /** Removes one of the caller's spend caps and answers 204. */
147
+ deleteBillingAlertsById<T = unknown>(id: string, opts?: {
148
+ token?: string;
149
+ headers?: Record<string, string>;
150
+ }): Promise<T>;
151
+ /** Changes one spend cap: raise or lower the ceiling, flip enforcement, retune the rate limit. */
152
+ patchBillingAlertsById<T = unknown>(id: string, opts?: {
153
+ body?: unknown;
154
+ token?: string;
155
+ headers?: Record<string, string>;
156
+ }): Promise<T>;
157
+ /** Prepaid credit the caller's org can still spend */
158
+ getBillingBalance<T = unknown>(opts?: {
159
+ token?: string;
160
+ headers?: Record<string, string>;
161
+ }): Promise<T>;
162
+ /** Answers what the caller can spend right now, one entry per currency. */
163
+ getBillingCreditBalance<T = unknown>(opts?: {
164
+ token?: string;
165
+ headers?: Record<string, string>;
166
+ }): Promise<T>;
167
+ /** Answers that same spendable credit split by grant tag, with the earliest expiry under each and the total across all of them. */
168
+ getBillingCreditBalanceBreakdown<T = unknown>(opts?: {
169
+ token?: string;
170
+ headers?: Record<string, string>;
171
+ }): Promise<T>;
172
+ /** Lists the caller's credit grants — every one of them, spent and lapsed and voided included. */
173
+ getBillingCredits<T = unknown>(opts?: {
174
+ token?: string;
175
+ headers?: Record<string, string>;
176
+ }): Promise<T>;
177
+ /** Issues a deposit address the caller can send crypto to, on the asset they ask for. */
178
+ postBillingCryptoDeposit<T = unknown>(opts?: {
179
+ body?: unknown;
180
+ token?: string;
181
+ headers?: Record<string, string>;
182
+ }): Promise<T>;
183
+ /** Reads one of the caller's own deposit intents back — pending, confirming, or succeeded. */
184
+ getBillingCryptoDepositById<T = unknown>(id: string, opts?: {
185
+ token?: string;
186
+ headers?: Record<string, string>;
187
+ }): Promise<T>;
188
+ /** Answers which chains and tokens the crypto rail accepts — what an asset picker renders. */
189
+ getBillingCryptoOptions<T = unknown>(opts?: {
190
+ token?: string;
191
+ headers?: Record<string, string>;
192
+ }): Promise<T>;
193
+ /** Lists the caller's invoices, newest first, with the count beside them. */
194
+ getBillingInvoices<T = unknown>(opts?: {
195
+ token?: string;
196
+ headers?: Record<string, string>;
197
+ }): Promise<T>;
198
+ /** Raise a draft invoice against a customer */
199
+ raiseInvoice<T = unknown>(opts?: {
200
+ body?: unknown;
201
+ token?: string;
202
+ headers?: Record<string, string>;
203
+ }): Promise<T>;
204
+ /** Read one invoice */
205
+ getInvoice<T = unknown>(id: string, opts?: {
206
+ token?: string;
207
+ headers?: Record<string, string>;
208
+ }): Promise<T>;
209
+ /** Collect an issued invoice from credits, balance, then card */
210
+ collectInvoice<T = unknown>(id: string, opts?: {
211
+ token?: string;
212
+ headers?: Record<string, string>;
213
+ }): Promise<T>;
214
+ /** Issue a draft invoice, making it collectible */
215
+ issueInvoice<T = unknown>(id: string, opts?: {
216
+ token?: string;
217
+ headers?: Record<string, string>;
218
+ }): Promise<T>;
219
+ /** Download one invoice as a PDF */
220
+ getBillingInvoicesByIdPdf<T = unknown>(id: string, opts?: {
221
+ token?: string;
222
+ headers?: Record<string, string>;
223
+ }): Promise<T>;
224
+ /** Void a draft or issued invoice */
225
+ voidInvoice<T = unknown>(id: string, opts?: {
226
+ token?: string;
227
+ headers?: Record<string, string>;
228
+ }): Promise<T>;
229
+ /** Answers the org's own postings inside `range=`, each as a signed entry: a DEPOSIT CREDITS the wallet (positive, account `credits:<org>`) and every other posting DEBITS it (negative, account `usage:<org>`), described by its notes or its tags. */
230
+ getBillingLedger<T = unknown>(opts?: {
231
+ query?: Record<string, string | number | boolean | undefined>;
232
+ token?: string;
233
+ headers?: Record<string, string>;
234
+ }): Promise<T>;
235
+ /** Cards and accounts on file for the caller */
236
+ getBillingMethods<T = unknown>(opts?: {
237
+ token?: string;
238
+ headers?: Record<string, string>;
239
+ }): Promise<T>;
240
+ /** Save a card or account for the caller */
241
+ postBillingMethods<T = unknown>(opts?: {
242
+ token?: string;
243
+ headers?: Record<string, string>;
244
+ }): Promise<T>;
245
+ /** Removes one card or account the caller has saved. */
246
+ deleteBillingMethodsById<T = unknown>(id: string, opts?: {
247
+ token?: string;
248
+ headers?: Record<string, string>;
249
+ }): Promise<T>;
250
+ /** Moves this org between sandbox money and real money. */
251
+ postBillingMode<T = unknown>(opts?: {
252
+ body?: unknown;
253
+ token?: string;
254
+ headers?: Record<string, string>;
255
+ }): Promise<T>;
256
+ /** Answers the org's outbound payouts, newest first — amount, destination, status, and the failure reason where one applies. */
257
+ getBillingPayouts<T = unknown>(opts?: {
258
+ token?: string;
259
+ headers?: Record<string, string>;
260
+ }): Promise<T>;
261
+ /** The plan catalog, priced with whatever offer is in force */
262
+ getBillingPlans<T = unknown>(opts?: {
263
+ token?: string;
264
+ headers?: Record<string, string>;
265
+ }): Promise<T>;
266
+ /** Cards and accounts on file for the caller */
267
+ getBillingPortalMethods<T = unknown>(opts?: {
268
+ token?: string;
269
+ headers?: Record<string, string>;
270
+ }): Promise<T>;
271
+ /** Save a card or account for the caller */
272
+ postBillingPortalMethods<T = unknown>(opts?: {
273
+ token?: string;
274
+ headers?: Record<string, string>;
275
+ }): Promise<T>;
276
+ /** DetachPortalMethod is DetachMethod at the address a hosted checkout addresses it by. */
277
+ deleteBillingPortalMethodsById<T = unknown>(id: string, opts?: {
278
+ token?: string;
279
+ headers?: Record<string, string>;
280
+ }): Promise<T>;
281
+ /** 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. */
282
+ getBillingRecharge<T = unknown>(opts?: {
283
+ token?: string;
284
+ headers?: Record<string, string>;
285
+ }): Promise<T>;
286
+ /** Sets the caller's auto-reload rule, and answers with the rule as stored. */
287
+ putBillingRecharge<T = unknown>(opts?: {
288
+ body?: unknown;
289
+ token?: string;
290
+ headers?: Record<string, string>;
291
+ }): Promise<T>;
292
+ /** Sweeps every org's auto-recharge and answers what it did. */
293
+ postBillingRechargeRunAll<T = unknown>(opts?: {
294
+ token?: string;
295
+ headers?: Record<string, string>;
296
+ }): Promise<T>;
297
+ /** 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. */
298
+ getBillingSettings<T = unknown>(opts?: {
299
+ token?: string;
300
+ headers?: Record<string, string>;
301
+ }): Promise<T>;
302
+ /** Buy a plan with a card */
303
+ postBillingSubscribeCard<T = unknown>(opts?: {
304
+ token?: string;
305
+ headers?: Record<string, string>;
306
+ }): Promise<T>;
307
+ /** Lists the plans the caller holds, with the count beside them. */
308
+ getBillingSubscriptions<T = unknown>(opts?: {
309
+ token?: string;
310
+ headers?: Record<string, string>;
311
+ }): Promise<T>;
312
+ /** End a subscription */
313
+ cancelSubscription<T = unknown>(id: string, opts?: {
314
+ body?: unknown;
315
+ token?: string;
316
+ headers?: Record<string, string>;
317
+ }): Promise<T>;
318
+ /** Put a canceled subscription back on its plan */
319
+ reactivateSubscription<T = unknown>(id: string, opts?: {
320
+ body?: unknown;
321
+ token?: string;
322
+ headers?: Record<string, string>;
323
+ }): Promise<T>;
324
+ /** Answers which tier the caller is on, what it allows, and what is left to spend. */
325
+ getBillingTier<T = unknown>(opts?: {
326
+ token?: string;
327
+ headers?: Record<string, string>;
328
+ }): Promise<T>;
329
+ /** Charges a card the caller already saved and credits the balance. */
330
+ postBillingTopup<T = unknown>(opts?: {
331
+ body?: unknown;
332
+ token?: string;
333
+ headers?: Record<string, string>;
334
+ }): Promise<T>;
335
+ /** Charges a single-use card token and credits the caller's balance. */
336
+ postBillingTopupToken<T = unknown>(opts?: {
337
+ body?: unknown;
338
+ token?: string;
339
+ headers?: Record<string, string>;
340
+ }): Promise<T>;
341
+ /** Answers one page of the caller's own ledger, newest first: what moved, how much, when, and what it was tagged with. */
342
+ getBillingTransactions<T = unknown>(opts?: {
343
+ query?: Record<string, string | number | boolean | undefined>;
344
+ token?: string;
345
+ headers?: Record<string, string>;
346
+ }): Promise<T>;
347
+ /** Reads one ledger entry by its id. */
348
+ getBillingTransactionsById<T = unknown>(id: string, opts?: {
349
+ token?: string;
350
+ headers?: Record<string, string>;
351
+ }): Promise<T>;
352
+ /** Every billed call the caller's org made, attributed to a product */
353
+ getBillingUsage<T = unknown>(opts?: {
354
+ token?: string;
355
+ headers?: Record<string, string>;
356
+ }): Promise<T>;
357
+ /** 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. */
358
+ getBillingUsageAccounts<T = unknown>(opts?: {
359
+ token?: string;
360
+ headers?: Record<string, string>;
361
+ }): Promise<T>;
362
+ /** Answers the caller's month: what their plan includes, what has been consumed against it, and the wallet beside it. */
363
+ getBillingUsageRollup<T = unknown>(opts?: {
364
+ token?: string;
365
+ headers?: Record<string, string>;
366
+ }): Promise<T>;
367
+ /** Answers where to send a wire top-up: the receiving bank details, with the caller's own payment reference. */
368
+ getBillingWire<T = unknown>(opts?: {
369
+ token?: string;
370
+ headers?: Record<string, string>;
371
+ }): Promise<T>;
372
+ /** The catalog projection with cost and margin included */
373
+ getCommerceAdminCatalog<T = unknown>(opts?: {
374
+ token?: string;
375
+ headers?: Record<string, string>;
376
+ }): Promise<T>;
377
+ /** Open a cart for a shopper to fill */
378
+ openCart<T = unknown>(opts?: {
379
+ body?: unknown;
380
+ token?: string;
381
+ headers?: Record<string, string>;
382
+ }): Promise<T>;
383
+ /** Read one cart with its lines and totals */
384
+ getCart<T = unknown>(id: string, opts?: {
385
+ token?: string;
386
+ headers?: Record<string, string>;
387
+ }): Promise<T>;
388
+ /** Discard a cart the shopper abandoned */
389
+ discardCart<T = unknown>(id: string, opts?: {
390
+ token?: string;
391
+ headers?: Record<string, string>;
392
+ }): Promise<T>;
393
+ /** Set one item's quantity in a cart; zero removes it */
394
+ setCartItem<T = unknown>(id: string, opts?: {
395
+ body?: unknown;
396
+ token?: string;
397
+ headers?: Record<string, string>;
398
+ }): Promise<T>;
399
+ /** The public product catalog projection for a brand */
400
+ getCommerceCatalog<T = unknown>(opts?: {
401
+ token?: string;
402
+ headers?: Record<string, string>;
403
+ }): Promise<T>;
404
+ /** The raw catalog entries, including the unpublished ones */
405
+ getCommerceCatalogEntries<T = unknown>(opts?: {
406
+ token?: string;
407
+ headers?: Record<string, string>;
408
+ }): Promise<T>;
409
+ /** Add a catalog entry */
410
+ postCommerceCatalogEntries<T = unknown>(opts?: {
411
+ token?: string;
412
+ headers?: Record<string, string>;
413
+ }): Promise<T>;
414
+ /** Land a syncer's view of the model catalog: upstream costs and machine facts */
415
+ postCommerceCatalogModels<T = unknown>(opts?: {
416
+ token?: string;
417
+ headers?: Record<string, string>;
418
+ }): Promise<T>;
419
+ /** Refresh the model catalog by reading the upstream provider */
420
+ postCommerceCatalogModelsRefresh<T = unknown>(opts?: {
421
+ token?: string;
422
+ headers?: Record<string, string>;
423
+ }): Promise<T>;
424
+ /** Seed the embedded catalog, without disturbing edits already made */
425
+ postCommerceCatalogSeed<T = unknown>(opts?: {
426
+ token?: string;
427
+ headers?: Record<string, string>;
428
+ }): Promise<T>;
429
+ /** List your org's collections, as a page */
430
+ getCommerceCollection<T = unknown>(opts?: {
431
+ token?: string;
432
+ headers?: Record<string, string>;
433
+ }): Promise<T>;
434
+ /** Create a collection */
435
+ postCommerceCollection<T = unknown>(opts?: {
436
+ token?: string;
437
+ headers?: Record<string, string>;
438
+ }): Promise<T>;
439
+ /** Delete a collection, keeping a recoverable copy */
440
+ deleteCommerceCollectionByCollectionid<T = unknown>(collectionid: string, opts?: {
441
+ token?: string;
442
+ headers?: Record<string, string>;
443
+ }): Promise<T>;
444
+ /** Fetch one collection */
445
+ getCommerceCollectionByCollectionid<T = unknown>(collectionid: string, opts?: {
446
+ token?: string;
447
+ headers?: Record<string, string>;
448
+ }): Promise<T>;
449
+ /** Change part of a collection */
450
+ patchCommerceCollectionByCollectionid<T = unknown>(collectionid: string, opts?: {
451
+ token?: string;
452
+ headers?: Record<string, string>;
453
+ }): Promise<T>;
454
+ /** Method-override tunnel for a collection — for clients that cannot send PUT, PATCH or DELETE */
455
+ postCommerceCollectionByCollectionid<T = unknown>(collectionid: string, opts?: {
456
+ token?: string;
457
+ headers?: Record<string, string>;
458
+ }): Promise<T>;
459
+ /** Replace a collection outright */
460
+ putCommerceCollectionByCollectionid<T = unknown>(collectionid: string, opts?: {
461
+ token?: string;
462
+ headers?: Record<string, string>;
463
+ }): Promise<T>;
464
+ /** The reference currency list the price and settings pickers render */
465
+ getCommerceCurrencies<T = unknown>(opts?: {
466
+ token?: string;
467
+ headers?: Record<string, string>;
468
+ }): Promise<T>;
469
+ /** Read the crypto deposit watcher's runtime state, asset by asset */
470
+ getCommerceDeposits<T = unknown>(opts?: {
471
+ token?: string;
472
+ headers?: Record<string, string>;
473
+ }): Promise<T>;
474
+ /** List your org's disclosures, as a page */
475
+ getCommerceDisclosure<T = unknown>(opts?: {
476
+ token?: string;
477
+ headers?: Record<string, string>;
478
+ }): Promise<T>;
479
+ /** Create a disclosure */
480
+ postCommerceDisclosure<T = unknown>(opts?: {
481
+ token?: string;
482
+ headers?: Record<string, string>;
483
+ }): Promise<T>;
484
+ /** Delete a disclosure, keeping a recoverable copy */
485
+ deleteCommerceDisclosureByDisclosureid<T = unknown>(disclosureid: string, opts?: {
486
+ token?: string;
487
+ headers?: Record<string, string>;
488
+ }): Promise<T>;
489
+ /** Fetch one disclosure */
490
+ getCommerceDisclosureByDisclosureid<T = unknown>(disclosureid: string, opts?: {
491
+ token?: string;
492
+ headers?: Record<string, string>;
493
+ }): Promise<T>;
494
+ /** Change part of a disclosure */
495
+ patchCommerceDisclosureByDisclosureid<T = unknown>(disclosureid: string, opts?: {
496
+ token?: string;
497
+ headers?: Record<string, string>;
498
+ }): Promise<T>;
499
+ /** Method-override tunnel for a disclosure — for clients that cannot send PUT, PATCH or DELETE */
500
+ postCommerceDisclosureByDisclosureid<T = unknown>(disclosureid: string, opts?: {
501
+ token?: string;
502
+ headers?: Record<string, string>;
503
+ }): Promise<T>;
504
+ /** Replace a disclosure outright */
505
+ putCommerceDisclosureByDisclosureid<T = unknown>(disclosureid: string, opts?: {
506
+ token?: string;
507
+ headers?: Record<string, string>;
508
+ }): Promise<T>;
509
+ /** List your org's discounts, as a page */
510
+ getCommerceDiscount<T = unknown>(opts?: {
511
+ token?: string;
512
+ headers?: Record<string, string>;
513
+ }): Promise<T>;
514
+ /** Create a discount */
515
+ postCommerceDiscount<T = unknown>(opts?: {
516
+ token?: string;
517
+ headers?: Record<string, string>;
518
+ }): Promise<T>;
519
+ /** Delete a discount, keeping a recoverable copy */
520
+ deleteCommerceDiscountByDiscountid<T = unknown>(discountid: string, opts?: {
521
+ token?: string;
522
+ headers?: Record<string, string>;
523
+ }): Promise<T>;
524
+ /** Fetch one discount */
525
+ getCommerceDiscountByDiscountid<T = unknown>(discountid: string, opts?: {
526
+ token?: string;
527
+ headers?: Record<string, string>;
528
+ }): Promise<T>;
529
+ /** Change part of a discount */
530
+ patchCommerceDiscountByDiscountid<T = unknown>(discountid: string, opts?: {
531
+ token?: string;
532
+ headers?: Record<string, string>;
533
+ }): Promise<T>;
534
+ /** Method-override tunnel for a discount — for clients that cannot send PUT, PATCH or DELETE */
535
+ postCommerceDiscountByDiscountid<T = unknown>(discountid: string, opts?: {
536
+ token?: string;
537
+ headers?: Record<string, string>;
538
+ }): Promise<T>;
539
+ /** Replace a discount outright */
540
+ putCommerceDiscountByDiscountid<T = unknown>(discountid: string, opts?: {
541
+ token?: string;
542
+ headers?: Record<string, string>;
543
+ }): Promise<T>;
544
+ /** Answers ok whenever the commerce subsystem is mounted. */
545
+ getCommerceHealth<T = unknown>(opts?: {
546
+ token?: string;
547
+ headers?: Record<string, string>;
548
+ }): Promise<T>;
549
+ /** List your org's movies, as a page */
550
+ getCommerceMovie<T = unknown>(opts?: {
551
+ token?: string;
552
+ headers?: Record<string, string>;
553
+ }): Promise<T>;
554
+ /** Create a movie */
555
+ postCommerceMovie<T = unknown>(opts?: {
556
+ token?: string;
557
+ headers?: Record<string, string>;
558
+ }): Promise<T>;
559
+ /** Delete a movie, keeping a recoverable copy */
560
+ deleteCommerceMovieByMovieid<T = unknown>(movieid: string, opts?: {
561
+ token?: string;
562
+ headers?: Record<string, string>;
563
+ }): Promise<T>;
564
+ /** Fetch one movie */
565
+ getCommerceMovieByMovieid<T = unknown>(movieid: string, opts?: {
566
+ token?: string;
567
+ headers?: Record<string, string>;
568
+ }): Promise<T>;
569
+ /** Change part of a movie */
570
+ patchCommerceMovieByMovieid<T = unknown>(movieid: string, opts?: {
571
+ token?: string;
572
+ headers?: Record<string, string>;
573
+ }): Promise<T>;
574
+ /** Method-override tunnel for a movie — for clients that cannot send PUT, PATCH or DELETE */
575
+ postCommerceMovieByMovieid<T = unknown>(movieid: string, opts?: {
576
+ token?: string;
577
+ headers?: Record<string, string>;
578
+ }): Promise<T>;
579
+ /** Replace a movie outright */
580
+ putCommerceMovieByMovieid<T = unknown>(movieid: string, opts?: {
581
+ token?: string;
582
+ headers?: Record<string, string>;
583
+ }): Promise<T>;
584
+ /** List your org's notes, as a page */
585
+ getCommerceNote<T = unknown>(opts?: {
586
+ token?: string;
587
+ headers?: Record<string, string>;
588
+ }): Promise<T>;
589
+ /** Create a note */
590
+ postCommerceNote<T = unknown>(opts?: {
591
+ token?: string;
592
+ headers?: Record<string, string>;
593
+ }): Promise<T>;
594
+ /** Delete a note, keeping a recoverable copy */
595
+ deleteCommerceNoteByNoteid<T = unknown>(noteid: string, opts?: {
596
+ token?: string;
597
+ headers?: Record<string, string>;
598
+ }): Promise<T>;
599
+ /** Fetch one note */
600
+ getCommerceNoteByNoteid<T = unknown>(noteid: string, opts?: {
601
+ token?: string;
602
+ headers?: Record<string, string>;
603
+ }): Promise<T>;
604
+ /** Change part of a note */
605
+ patchCommerceNoteByNoteid<T = unknown>(noteid: string, opts?: {
606
+ token?: string;
607
+ headers?: Record<string, string>;
608
+ }): Promise<T>;
609
+ /** Method-override tunnel for a note — for clients that cannot send PUT, PATCH or DELETE */
610
+ postCommerceNoteByNoteid<T = unknown>(noteid: string, opts?: {
611
+ token?: string;
612
+ headers?: Record<string, string>;
613
+ }): Promise<T>;
614
+ /** Replace a note outright */
615
+ putCommerceNoteByNoteid<T = unknown>(noteid: string, opts?: {
616
+ token?: string;
617
+ headers?: Record<string, string>;
618
+ }): Promise<T>;
619
+ /** The public org configuration a checkout page boots from */
620
+ getCommerceOrg<T = unknown>(opts?: {
621
+ token?: string;
622
+ headers?: Record<string, string>;
623
+ }): Promise<T>;
624
+ /** The raw plan authority rows */
625
+ getCommercePlansEntries<T = unknown>(opts?: {
626
+ token?: string;
627
+ headers?: Record<string, string>;
628
+ }): Promise<T>;
629
+ /** Add a subscription plan */
630
+ postCommercePlansEntries<T = unknown>(opts?: {
631
+ token?: string;
632
+ headers?: Record<string, string>;
633
+ }): Promise<T>;
634
+ /** Remove a plan from the authority */
635
+ deleteCommercePlansEntriesBySlug<T = unknown>(slug: string, opts?: {
636
+ token?: string;
637
+ headers?: Record<string, string>;
638
+ }): Promise<T>;
639
+ /** Edit a plan, leaving the fields you omit alone */
640
+ putCommercePlansEntriesBySlug<T = unknown>(slug: string, opts?: {
641
+ token?: string;
642
+ headers?: Record<string, string>;
643
+ }): Promise<T>;
644
+ /** Seed the embedded plan catalog, without overwriting administrative edits */
645
+ postCommercePlansSeed<T = unknown>(opts?: {
646
+ token?: string;
647
+ headers?: Record<string, string>;
648
+ }): Promise<T>;
649
+ /** List your org's products, as a page */
650
+ getCommerceProduct<T = unknown>(opts?: {
651
+ token?: string;
652
+ headers?: Record<string, string>;
653
+ }): Promise<T>;
654
+ /** Create a product */
655
+ postCommerceProduct<T = unknown>(opts?: {
656
+ token?: string;
657
+ headers?: Record<string, string>;
658
+ }): Promise<T>;
659
+ /** Delete a product, keeping a recoverable copy */
660
+ deleteCommerceProductByProductid<T = unknown>(productid: string, opts?: {
661
+ token?: string;
662
+ headers?: Record<string, string>;
663
+ }): Promise<T>;
664
+ /** Fetch one product */
665
+ getCommerceProductByProductid<T = unknown>(productid: string, opts?: {
666
+ token?: string;
667
+ headers?: Record<string, string>;
668
+ }): Promise<T>;
669
+ /** Change part of a product */
670
+ patchCommerceProductByProductid<T = unknown>(productid: string, opts?: {
671
+ token?: string;
672
+ headers?: Record<string, string>;
673
+ }): Promise<T>;
674
+ /** Method-override tunnel for a product — for clients that cannot send PUT, PATCH or DELETE */
675
+ postCommerceProductByProductid<T = unknown>(productid: string, opts?: {
676
+ token?: string;
677
+ headers?: Record<string, string>;
678
+ }): Promise<T>;
679
+ /** Replace a product outright */
680
+ putCommerceProductByProductid<T = unknown>(productid: string, opts?: {
681
+ token?: string;
682
+ headers?: Record<string, string>;
683
+ }): Promise<T>;
684
+ /** List what one unit of each metered thing costs */
685
+ getCommerceRatesEntries<T = unknown>(opts?: {
686
+ token?: string;
687
+ headers?: Record<string, string>;
688
+ }): Promise<T>;
689
+ /** Add a rate */
690
+ postCommerceRatesEntries<T = unknown>(opts?: {
691
+ token?: string;
692
+ headers?: Record<string, string>;
693
+ }): Promise<T>;
694
+ /** Remove a rate outright */
695
+ deleteCommerceRatesEntriesByProductByMeter<T = unknown>(product: string, meter: string, opts?: {
696
+ token?: string;
697
+ headers?: Record<string, string>;
698
+ }): Promise<T>;
699
+ /** Edit a rate, and mark it as operator-set */
700
+ putCommerceRatesEntriesByProductByMeter<T = unknown>(product: string, meter: string, opts?: {
701
+ token?: string;
702
+ headers?: Record<string, string>;
703
+ }): Promise<T>;
704
+ /** Load the published price document, reconciling rather than replacing */
705
+ postCommerceRatesImport<T = unknown>(opts?: {
706
+ token?: string;
707
+ headers?: Record<string, string>;
708
+ }): Promise<T>;
709
+ /** List your org's returns, as a page */
710
+ getCommerceReturn<T = unknown>(opts?: {
711
+ token?: string;
712
+ headers?: Record<string, string>;
713
+ }): Promise<T>;
714
+ /** Create a return */
715
+ postCommerceReturn<T = unknown>(opts?: {
716
+ token?: string;
717
+ headers?: Record<string, string>;
718
+ }): Promise<T>;
719
+ /** Delete a return, keeping a recoverable copy */
720
+ deleteCommerceReturnByReturnid<T = unknown>(returnid: string, opts?: {
721
+ token?: string;
722
+ headers?: Record<string, string>;
723
+ }): Promise<T>;
724
+ /** Fetch one return */
725
+ getCommerceReturnByReturnid<T = unknown>(returnid: string, opts?: {
726
+ token?: string;
727
+ headers?: Record<string, string>;
728
+ }): Promise<T>;
729
+ /** Change part of a return */
730
+ patchCommerceReturnByReturnid<T = unknown>(returnid: string, opts?: {
731
+ token?: string;
732
+ headers?: Record<string, string>;
733
+ }): Promise<T>;
734
+ /** Method-override tunnel for a return — for clients that cannot send PUT, PATCH or DELETE */
735
+ postCommerceReturnByReturnid<T = unknown>(returnid: string, opts?: {
736
+ token?: string;
737
+ headers?: Record<string, string>;
738
+ }): Promise<T>;
739
+ /** Replace a return outright */
740
+ putCommerceReturnByReturnid<T = unknown>(returnid: string, opts?: {
741
+ token?: string;
742
+ headers?: Record<string, string>;
743
+ }): Promise<T>;
744
+ /** List your org's sales channels, as a page */
745
+ getCommerceSaleschannel<T = unknown>(opts?: {
746
+ token?: string;
747
+ headers?: Record<string, string>;
748
+ }): Promise<T>;
749
+ /** Create a sales channel */
750
+ postCommerceSaleschannel<T = unknown>(opts?: {
751
+ token?: string;
752
+ headers?: Record<string, string>;
753
+ }): Promise<T>;
754
+ /** Delete a sales channel, keeping a recoverable copy */
755
+ deleteCommerceSaleschannelBySaleschannelid<T = unknown>(saleschannelid: string, opts?: {
756
+ token?: string;
757
+ headers?: Record<string, string>;
758
+ }): Promise<T>;
759
+ /** Fetch one sales channel */
760
+ getCommerceSaleschannelBySaleschannelid<T = unknown>(saleschannelid: string, opts?: {
761
+ token?: string;
762
+ headers?: Record<string, string>;
763
+ }): Promise<T>;
764
+ /** Change part of a sales channel */
765
+ patchCommerceSaleschannelBySaleschannelid<T = unknown>(saleschannelid: string, opts?: {
766
+ token?: string;
767
+ headers?: Record<string, string>;
768
+ }): Promise<T>;
769
+ /** Method-override tunnel for a sales channel — for clients that cannot send PUT, PATCH or DELETE */
770
+ postCommerceSaleschannelBySaleschannelid<T = unknown>(saleschannelid: string, opts?: {
771
+ token?: string;
772
+ headers?: Record<string, string>;
773
+ }): Promise<T>;
774
+ /** Replace a sales channel outright */
775
+ putCommerceSaleschannelBySaleschannelid<T = unknown>(saleschannelid: string, opts?: {
776
+ token?: string;
777
+ headers?: Record<string, string>;
778
+ }): Promise<T>;
779
+ /** List your org's stock locations, as a page */
780
+ getCommerceStocklocation<T = unknown>(opts?: {
781
+ token?: string;
782
+ headers?: Record<string, string>;
783
+ }): Promise<T>;
784
+ /** Create a stock location */
785
+ postCommerceStocklocation<T = unknown>(opts?: {
786
+ token?: string;
787
+ headers?: Record<string, string>;
788
+ }): Promise<T>;
789
+ /** Delete a stock location, keeping a recoverable copy */
790
+ deleteCommerceStocklocationByStocklocationid<T = unknown>(stocklocationid: string, opts?: {
791
+ token?: string;
792
+ headers?: Record<string, string>;
793
+ }): Promise<T>;
794
+ /** Fetch one stock location */
795
+ getCommerceStocklocationByStocklocationid<T = unknown>(stocklocationid: string, opts?: {
796
+ token?: string;
797
+ headers?: Record<string, string>;
798
+ }): Promise<T>;
799
+ /** Change part of a stock location */
800
+ patchCommerceStocklocationByStocklocationid<T = unknown>(stocklocationid: string, opts?: {
801
+ token?: string;
802
+ headers?: Record<string, string>;
803
+ }): Promise<T>;
804
+ /** Method-override tunnel for a stock location — for clients that cannot send PUT, PATCH or DELETE */
805
+ postCommerceStocklocationByStocklocationid<T = unknown>(stocklocationid: string, opts?: {
806
+ token?: string;
807
+ headers?: Record<string, string>;
808
+ }): Promise<T>;
809
+ /** Replace a stock location outright */
810
+ putCommerceStocklocationByStocklocationid<T = unknown>(stocklocationid: string, opts?: {
811
+ token?: string;
812
+ headers?: Record<string, string>;
813
+ }): Promise<T>;
814
+ /** List your org's storefronts as a page */
815
+ getCommerceStore<T = unknown>(opts?: {
816
+ token?: string;
817
+ headers?: Record<string, string>;
818
+ }): Promise<T>;
819
+ /** Create a storefront */
820
+ postCommerceStore<T = unknown>(opts?: {
821
+ token?: string;
822
+ headers?: Record<string, string>;
823
+ }): Promise<T>;
824
+ /** Whether a store is entitled to trade, and why */
825
+ getCommerceStoreAccess<T = unknown>(opts?: {
826
+ token?: string;
827
+ headers?: Record<string, string>;
828
+ }): Promise<T>;
829
+ /** Resolve your org's active storefront without naming an id */
830
+ getCommerceStoreCurrent<T = unknown>(opts?: {
831
+ token?: string;
832
+ headers?: Record<string, string>;
833
+ }): Promise<T>;
834
+ /** Mint your org's least-privilege storefront read key */
835
+ postCommerceStoreToken<T = unknown>(opts?: {
836
+ token?: string;
837
+ headers?: Record<string, string>;
838
+ }): Promise<T>;
839
+ /** Delete a storefront, keeping a recoverable copy */
840
+ deleteCommerceStoreByStoreid<T = unknown>(storeid: string, opts?: {
841
+ token?: string;
842
+ headers?: Record<string, string>;
843
+ }): Promise<T>;
844
+ /** Fetch one storefront */
845
+ getCommerceStoreByStoreid<T = unknown>(storeid: string, opts?: {
846
+ token?: string;
847
+ headers?: Record<string, string>;
848
+ }): Promise<T>;
849
+ /** Change part of a storefront */
850
+ patchCommerceStoreByStoreid<T = unknown>(storeid: string, opts?: {
851
+ token?: string;
852
+ headers?: Record<string, string>;
853
+ }): Promise<T>;
854
+ /** Method-override tunnel for clients that cannot send PUT, PATCH or DELETE */
855
+ postCommerceStoreByStoreid<T = unknown>(storeid: string, opts?: {
856
+ token?: string;
857
+ headers?: Record<string, string>;
858
+ }): Promise<T>;
859
+ /** Replace a storefront outright */
860
+ putCommerceStoreByStoreid<T = unknown>(storeid: string, opts?: {
861
+ token?: string;
862
+ headers?: Record<string, string>;
863
+ }): Promise<T>;
864
+ /** Authorize a new order against a storefront, holding the funds without settling them */
865
+ postCommerceStoreByStoreidAuthorize<T = unknown>(storeid: string, opts?: {
866
+ token?: string;
867
+ headers?: Record<string, string>;
868
+ }): Promise<T>;
869
+ /** Authorize an order that already exists, holding the funds without settling them */
870
+ postCommerceStoreByStoreidAuthorizeByOrderid<T = unknown>(storeid: string, orderid: string, opts?: {
871
+ token?: string;
872
+ headers?: Record<string, string>;
873
+ }): Promise<T>;
874
+ /** Fetch a bundle as this storefront sells it */
875
+ getCommerceStoreByStoreidBundleByKey<T = unknown>(storeid: string, key: string, opts?: {
876
+ token?: string;
877
+ headers?: Record<string, string>;
878
+ }): Promise<T>;
879
+ /** Capture a previously authorized order and settle the payment */
880
+ postCommerceStoreByStoreidCaptureByOrderid<T = unknown>(storeid: string, orderid: string, opts?: {
881
+ token?: string;
882
+ headers?: Record<string, string>;
883
+ }): Promise<T>;
884
+ /** Authorize and capture a new order in one call */
885
+ postCommerceStoreByStoreidCharge<T = unknown>(storeid: string, opts?: {
886
+ token?: string;
887
+ headers?: Record<string, string>;
888
+ }): Promise<T>;
889
+ /** Authorize a new order against a storefront, holding the funds — the checkout spelling */
890
+ postCommerceStoreByStoreidCheckoutAuthorize<T = unknown>(storeid: string, opts?: {
891
+ token?: string;
892
+ headers?: Record<string, string>;
893
+ }): Promise<T>;
894
+ /** Authorize an existing order, holding the funds — the checkout spelling */
895
+ postCommerceStoreByStoreidCheckoutAuthorizeByOrderid<T = unknown>(storeid: string, orderid: string, opts?: {
896
+ token?: string;
897
+ headers?: Record<string, string>;
898
+ }): Promise<T>;
899
+ /** Capture a previously authorized order and settle it — the checkout spelling */
900
+ postCommerceStoreByStoreidCheckoutCaptureByOrderid<T = unknown>(storeid: string, orderid: string, opts?: {
901
+ token?: string;
902
+ headers?: Record<string, string>;
903
+ }): Promise<T>;
904
+ /** Authorize and capture a new order in one call — the checkout spelling */
905
+ postCommerceStoreByStoreidCheckoutCharge<T = unknown>(storeid: string, opts?: {
906
+ token?: string;
907
+ headers?: Record<string, string>;
908
+ }): Promise<T>;
909
+ /** PayPal cancel by pay key — refuses, exactly as the unprefixed address does */
910
+ postCommerceStoreByStoreidCheckoutPaypalCancelByPaykey<T = unknown>(storeid: string, payKey: string, opts?: {
911
+ token?: string;
912
+ headers?: Record<string, string>;
913
+ }): Promise<T>;
914
+ /** PayPal confirm by pay key — refuses, exactly as the unprefixed address does */
915
+ postCommerceStoreByStoreidCheckoutPaypalConfirmByPaykey<T = unknown>(storeid: string, payKey: string, opts?: {
916
+ token?: string;
917
+ headers?: Record<string, string>;
918
+ }): Promise<T>;
919
+ /** Start a PayPal authorization for a new order — the checkout spelling */
920
+ postCommerceStoreByStoreidCheckoutPaypalPay<T = unknown>(storeid: string, opts?: {
921
+ token?: string;
922
+ headers?: Record<string, string>;
923
+ }): Promise<T>;
924
+ /** The storefront's whole listing override map */
925
+ getCommerceStoreByStoreidListing<T = unknown>(storeid: string, opts?: {
926
+ token?: string;
927
+ headers?: Record<string, string>;
928
+ }): Promise<T>;
929
+ /** Remove a listing override */
930
+ deleteCommerceStoreByStoreidListingByKey<T = unknown>(storeid: string, key: string, opts?: {
931
+ token?: string;
932
+ headers?: Record<string, string>;
933
+ }): Promise<T>;
934
+ /** Fetch one listing override, by item id or by its slug or SKU */
935
+ getCommerceStoreByStoreidListingByKey<T = unknown>(storeid: string, key: string, opts?: {
936
+ token?: string;
937
+ headers?: Record<string, string>;
938
+ }): Promise<T>;
939
+ /** Confirm a listing override exists and re-save the store */
940
+ patchCommerceStoreByStoreidListingByKey<T = unknown>(storeid: string, key: string, opts?: {
941
+ token?: string;
942
+ headers?: Record<string, string>;
943
+ }): Promise<T>;
944
+ /** Add a listing override under a new key */
945
+ postCommerceStoreByStoreidListingByKey<T = unknown>(storeid: string, key: string, opts?: {
946
+ token?: string;
947
+ headers?: Record<string, string>;
948
+ }): Promise<T>;
949
+ /** Upsert a listing override */
950
+ putCommerceStoreByStoreidListingByKey<T = unknown>(storeid: string, key: string, opts?: {
951
+ token?: string;
952
+ headers?: Record<string, string>;
953
+ }): Promise<T>;
954
+ /** PayPal cancel by pay key — refuses, because a pay key alone does not identify the order */
955
+ postCommerceStoreByStoreidPaypalCancelByPaykey<T = unknown>(storeid: string, payKey: string, opts?: {
956
+ token?: string;
957
+ headers?: Record<string, string>;
958
+ }): Promise<T>;
959
+ /** PayPal confirm by pay key — refuses, because a pay key alone does not identify the order */
960
+ postCommerceStoreByStoreidPaypalConfirmByPaykey<T = unknown>(storeid: string, payKey: string, opts?: {
961
+ token?: string;
962
+ headers?: Record<string, string>;
963
+ }): Promise<T>;
964
+ /** Start a PayPal authorization for a new order */
965
+ postCommerceStoreByStoreidPaypalPay<T = unknown>(storeid: string, opts?: {
966
+ token?: string;
967
+ headers?: Record<string, string>;
968
+ }): Promise<T>;
969
+ /** Fetch a product as this storefront sells it */
970
+ getCommerceStoreByStoreidProductByKey<T = unknown>(storeid: string, key: string, opts?: {
971
+ token?: string;
972
+ headers?: Record<string, string>;
973
+ }): Promise<T>;
974
+ /** Start this store's no-card trial on the entry plan */
975
+ postCommerceStoreByStoreidTrial<T = unknown>(storeid: string, opts?: {
976
+ token?: string;
977
+ headers?: Record<string, string>;
978
+ }): Promise<T>;
979
+ /** Fetch a variant as this storefront sells it */
980
+ getCommerceStoreByStoreidVariantByKey<T = unknown>(storeid: string, key: string, opts?: {
981
+ token?: string;
982
+ headers?: Record<string, string>;
983
+ }): Promise<T>;
984
+ /** List your org's submissions, as a page */
985
+ getCommerceSubmission<T = unknown>(opts?: {
986
+ token?: string;
987
+ headers?: Record<string, string>;
988
+ }): Promise<T>;
989
+ /** Create a submission */
990
+ postCommerceSubmission<T = unknown>(opts?: {
991
+ token?: string;
992
+ headers?: Record<string, string>;
993
+ }): Promise<T>;
994
+ /** Delete a submission, keeping a recoverable copy */
995
+ deleteCommerceSubmissionBySubmissionid<T = unknown>(submissionid: string, opts?: {
996
+ token?: string;
997
+ headers?: Record<string, string>;
998
+ }): Promise<T>;
999
+ /** Fetch one submission */
1000
+ getCommerceSubmissionBySubmissionid<T = unknown>(submissionid: string, opts?: {
1001
+ token?: string;
1002
+ headers?: Record<string, string>;
1003
+ }): Promise<T>;
1004
+ /** Change part of a submission */
1005
+ patchCommerceSubmissionBySubmissionid<T = unknown>(submissionid: string, opts?: {
1006
+ token?: string;
1007
+ headers?: Record<string, string>;
1008
+ }): Promise<T>;
1009
+ /** Method-override tunnel for a submission — for clients that cannot send PUT, PATCH or DELETE */
1010
+ postCommerceSubmissionBySubmissionid<T = unknown>(submissionid: string, opts?: {
1011
+ token?: string;
1012
+ headers?: Record<string, string>;
1013
+ }): Promise<T>;
1014
+ /** Replace a submission outright */
1015
+ putCommerceSubmissionBySubmissionid<T = unknown>(submissionid: string, opts?: {
1016
+ token?: string;
1017
+ headers?: Record<string, string>;
1018
+ }): Promise<T>;
1019
+ /** List your org's subscribers, as a page */
1020
+ getCommerceSubscriber<T = unknown>(opts?: {
1021
+ token?: string;
1022
+ headers?: Record<string, string>;
1023
+ }): Promise<T>;
1024
+ /** Create a subscriber */
1025
+ postCommerceSubscriber<T = unknown>(opts?: {
1026
+ token?: string;
1027
+ headers?: Record<string, string>;
1028
+ }): Promise<T>;
1029
+ /** Delete a subscriber, keeping a recoverable copy */
1030
+ deleteCommerceSubscriberBySubscriberid<T = unknown>(subscriberid: string, opts?: {
1031
+ token?: string;
1032
+ headers?: Record<string, string>;
1033
+ }): Promise<T>;
1034
+ /** Fetch one subscriber */
1035
+ getCommerceSubscriberBySubscriberid<T = unknown>(subscriberid: string, opts?: {
1036
+ token?: string;
1037
+ headers?: Record<string, string>;
1038
+ }): Promise<T>;
1039
+ /** Change part of a subscriber */
1040
+ patchCommerceSubscriberBySubscriberid<T = unknown>(subscriberid: string, opts?: {
1041
+ token?: string;
1042
+ headers?: Record<string, string>;
1043
+ }): Promise<T>;
1044
+ /** Method-override tunnel for a subscriber — for clients that cannot send PUT, PATCH or DELETE */
1045
+ postCommerceSubscriberBySubscriberid<T = unknown>(subscriberid: string, opts?: {
1046
+ token?: string;
1047
+ headers?: Record<string, string>;
1048
+ }): Promise<T>;
1049
+ /** Replace a subscriber outright */
1050
+ putCommerceSubscriberBySubscriberid<T = unknown>(subscriberid: string, opts?: {
1051
+ token?: string;
1052
+ headers?: Record<string, string>;
1053
+ }): Promise<T>;
1054
+ /** List your org's token transactions, as a page */
1055
+ getCommerceTokentransaction<T = unknown>(opts?: {
1056
+ token?: string;
1057
+ headers?: Record<string, string>;
1058
+ }): Promise<T>;
1059
+ /** Create a token transaction */
1060
+ postCommerceTokentransaction<T = unknown>(opts?: {
1061
+ token?: string;
1062
+ headers?: Record<string, string>;
1063
+ }): Promise<T>;
1064
+ /** Delete a token transaction, keeping a recoverable copy */
1065
+ deleteCommerceTokentransactionByTokentransactionid<T = unknown>(tokentransactionid: string, opts?: {
1066
+ token?: string;
1067
+ headers?: Record<string, string>;
1068
+ }): Promise<T>;
1069
+ /** Fetch one token transaction */
1070
+ getCommerceTokentransactionByTokentransactionid<T = unknown>(tokentransactionid: string, opts?: {
1071
+ token?: string;
1072
+ headers?: Record<string, string>;
1073
+ }): Promise<T>;
1074
+ /** Change part of a token transaction */
1075
+ patchCommerceTokentransactionByTokentransactionid<T = unknown>(tokentransactionid: string, opts?: {
1076
+ token?: string;
1077
+ headers?: Record<string, string>;
1078
+ }): Promise<T>;
1079
+ /** Method-override tunnel for a token transaction — for clients that cannot send PUT, PATCH or DELETE */
1080
+ postCommerceTokentransactionByTokentransactionid<T = unknown>(tokentransactionid: string, opts?: {
1081
+ token?: string;
1082
+ headers?: Record<string, string>;
1083
+ }): Promise<T>;
1084
+ /** Replace a token transaction outright */
1085
+ putCommerceTokentransactionByTokentransactionid<T = unknown>(tokentransactionid: string, opts?: {
1086
+ token?: string;
1087
+ headers?: Record<string, string>;
1088
+ }): Promise<T>;
1089
+ /** List your org's transfers, as a page */
1090
+ getCommerceTransfer<T = unknown>(opts?: {
1091
+ token?: string;
1092
+ headers?: Record<string, string>;
1093
+ }): Promise<T>;
1094
+ /** Create a transfer */
1095
+ postCommerceTransfer<T = unknown>(opts?: {
1096
+ token?: string;
1097
+ headers?: Record<string, string>;
1098
+ }): Promise<T>;
1099
+ /** Delete a transfer, keeping a recoverable copy */
1100
+ deleteCommerceTransferByTransferid<T = unknown>(transferid: string, opts?: {
1101
+ token?: string;
1102
+ headers?: Record<string, string>;
1103
+ }): Promise<T>;
1104
+ /** Fetch one transfer */
1105
+ getCommerceTransferByTransferid<T = unknown>(transferid: string, opts?: {
1106
+ token?: string;
1107
+ headers?: Record<string, string>;
1108
+ }): Promise<T>;
1109
+ /** Change part of a transfer */
1110
+ patchCommerceTransferByTransferid<T = unknown>(transferid: string, opts?: {
1111
+ token?: string;
1112
+ headers?: Record<string, string>;
1113
+ }): Promise<T>;
1114
+ /** Method-override tunnel for a transfer — for clients that cannot send PUT, PATCH or DELETE */
1115
+ postCommerceTransferByTransferid<T = unknown>(transferid: string, opts?: {
1116
+ token?: string;
1117
+ headers?: Record<string, string>;
1118
+ }): Promise<T>;
1119
+ /** Replace a transfer outright */
1120
+ putCommerceTransferByTransferid<T = unknown>(transferid: string, opts?: {
1121
+ token?: string;
1122
+ headers?: Record<string, string>;
1123
+ }): Promise<T>;
1124
+ /** List your org's variants, as a page */
1125
+ getCommerceVariant<T = unknown>(opts?: {
1126
+ token?: string;
1127
+ headers?: Record<string, string>;
1128
+ }): Promise<T>;
1129
+ /** Create a variant */
1130
+ postCommerceVariant<T = unknown>(opts?: {
1131
+ token?: string;
1132
+ headers?: Record<string, string>;
1133
+ }): Promise<T>;
1134
+ /** Delete a variant, keeping a recoverable copy */
1135
+ deleteCommerceVariantByVariantid<T = unknown>(variantid: string, opts?: {
1136
+ token?: string;
1137
+ headers?: Record<string, string>;
1138
+ }): Promise<T>;
1139
+ /** Fetch one variant */
1140
+ getCommerceVariantByVariantid<T = unknown>(variantid: string, opts?: {
1141
+ token?: string;
1142
+ headers?: Record<string, string>;
1143
+ }): Promise<T>;
1144
+ /** Change part of a variant */
1145
+ patchCommerceVariantByVariantid<T = unknown>(variantid: string, opts?: {
1146
+ token?: string;
1147
+ headers?: Record<string, string>;
1148
+ }): Promise<T>;
1149
+ /** Method-override tunnel for a variant — for clients that cannot send PUT, PATCH or DELETE */
1150
+ postCommerceVariantByVariantid<T = unknown>(variantid: string, opts?: {
1151
+ token?: string;
1152
+ headers?: Record<string, string>;
1153
+ }): Promise<T>;
1154
+ /** Replace a variant outright */
1155
+ putCommerceVariantByVariantid<T = unknown>(variantid: string, opts?: {
1156
+ token?: string;
1157
+ headers?: Record<string, string>;
1158
+ }): Promise<T>;
1159
+ /** List your org's wallets, as a page */
1160
+ getCommerceWallet<T = unknown>(opts?: {
1161
+ token?: string;
1162
+ headers?: Record<string, string>;
1163
+ }): Promise<T>;
1164
+ /** Create a wallet */
1165
+ postCommerceWallet<T = unknown>(opts?: {
1166
+ token?: string;
1167
+ headers?: Record<string, string>;
1168
+ }): Promise<T>;
1169
+ /** Delete a wallet, keeping a recoverable copy */
1170
+ deleteCommerceWalletByWalletid<T = unknown>(walletid: string, opts?: {
1171
+ token?: string;
1172
+ headers?: Record<string, string>;
1173
+ }): Promise<T>;
1174
+ /** Fetch one wallet */
1175
+ getCommerceWalletByWalletid<T = unknown>(walletid: string, opts?: {
1176
+ token?: string;
1177
+ headers?: Record<string, string>;
1178
+ }): Promise<T>;
1179
+ /** Change part of a wallet */
1180
+ patchCommerceWalletByWalletid<T = unknown>(walletid: string, opts?: {
1181
+ token?: string;
1182
+ headers?: Record<string, string>;
1183
+ }): Promise<T>;
1184
+ /** Method-override tunnel for a wallet — for clients that cannot send PUT, PATCH or DELETE */
1185
+ postCommerceWalletByWalletid<T = unknown>(walletid: string, opts?: {
1186
+ token?: string;
1187
+ headers?: Record<string, string>;
1188
+ }): Promise<T>;
1189
+ /** Replace a wallet outright */
1190
+ putCommerceWalletByWalletid<T = unknown>(walletid: string, opts?: {
1191
+ token?: string;
1192
+ headers?: Record<string, string>;
1193
+ }): Promise<T>;
1194
+ /** List your org's watchlists, as a page */
1195
+ getCommerceWatchlist<T = unknown>(opts?: {
1196
+ token?: string;
1197
+ headers?: Record<string, string>;
1198
+ }): Promise<T>;
1199
+ /** Create a watchlist */
1200
+ postCommerceWatchlist<T = unknown>(opts?: {
1201
+ token?: string;
1202
+ headers?: Record<string, string>;
1203
+ }): Promise<T>;
1204
+ /** Delete a watchlist, keeping a recoverable copy */
1205
+ deleteCommerceWatchlistByWatchlistid<T = unknown>(watchlistid: string, opts?: {
1206
+ token?: string;
1207
+ headers?: Record<string, string>;
1208
+ }): Promise<T>;
1209
+ /** Fetch one watchlist */
1210
+ getCommerceWatchlistByWatchlistid<T = unknown>(watchlistid: string, opts?: {
1211
+ token?: string;
1212
+ headers?: Record<string, string>;
1213
+ }): Promise<T>;
1214
+ /** Change part of a watchlist */
1215
+ patchCommerceWatchlistByWatchlistid<T = unknown>(watchlistid: string, opts?: {
1216
+ token?: string;
1217
+ headers?: Record<string, string>;
1218
+ }): Promise<T>;
1219
+ /** Method-override tunnel for a watchlist — for clients that cannot send PUT, PATCH or DELETE */
1220
+ postCommerceWatchlistByWatchlistid<T = unknown>(watchlistid: string, opts?: {
1221
+ token?: string;
1222
+ headers?: Record<string, string>;
1223
+ }): Promise<T>;
1224
+ /** Replace a watchlist outright */
1225
+ putCommerceWatchlistByWatchlistid<T = unknown>(watchlistid: string, opts?: {
1226
+ token?: string;
1227
+ headers?: Record<string, string>;
1228
+ }): Promise<T>;
1229
+ /** List your org's webhooks, as a page */
1230
+ getCommerceWebhook<T = unknown>(opts?: {
1231
+ token?: string;
1232
+ headers?: Record<string, string>;
1233
+ }): Promise<T>;
1234
+ /** Create a webhook */
1235
+ postCommerceWebhook<T = unknown>(opts?: {
1236
+ token?: string;
1237
+ headers?: Record<string, string>;
1238
+ }): Promise<T>;
1239
+ /** Delete a webhook, keeping a recoverable copy */
1240
+ deleteCommerceWebhookByWebhookid<T = unknown>(webhookid: string, opts?: {
1241
+ token?: string;
1242
+ headers?: Record<string, string>;
1243
+ }): Promise<T>;
1244
+ /** Fetch one webhook */
1245
+ getCommerceWebhookByWebhookid<T = unknown>(webhookid: string, opts?: {
1246
+ token?: string;
1247
+ headers?: Record<string, string>;
1248
+ }): Promise<T>;
1249
+ /** Change part of a webhook */
1250
+ patchCommerceWebhookByWebhookid<T = unknown>(webhookid: string, opts?: {
1251
+ token?: string;
1252
+ headers?: Record<string, string>;
1253
+ }): Promise<T>;
1254
+ /** Method-override tunnel for a webhook — for clients that cannot send PUT, PATCH or DELETE */
1255
+ postCommerceWebhookByWebhookid<T = unknown>(webhookid: string, opts?: {
1256
+ token?: string;
1257
+ headers?: Record<string, string>;
1258
+ }): Promise<T>;
1259
+ /** Replace a webhook outright */
1260
+ putCommerceWebhookByWebhookid<T = unknown>(webhookid: string, opts?: {
1261
+ token?: string;
1262
+ headers?: Record<string, string>;
1263
+ }): Promise<T>;
1264
+ /** Payment-provider webhook intake for settlement and subscription lifecycle events */
1265
+ postCommerceWebhooksByProvider<T = unknown>(provider: string, opts?: {
1266
+ token?: string;
1267
+ headers?: Record<string, string>;
1268
+ }): Promise<T>;
1269
+ }
1270
+ /**
1271
+ * The process-wide client.
1272
+ *
1273
+ * One instance because the base url and the timeout are properties of the
1274
+ * deployment, not of a call. Pass a token per call where the identity varies.
1275
+ */
1276
+ export declare function hanzoCommerce(config?: CommerceClientConfig): Commerce;