brainerce 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -224,6 +224,21 @@ interface StoreInfo {
224
224
  * like it worked and quietly does nothing.
225
225
  */
226
226
  stockAlertsEnabled?: boolean;
227
+ /**
228
+ * Whether this store takes donations.
229
+ *
230
+ * Gate the whole donation page on it. Unlike almost every other conditional
231
+ * surface in this SDK, a donation page does NOT auto-hide: `createDonation`
232
+ * is rejected outright while donations are closed, so a page built for a
233
+ * store that has not opened them collects a donor's name, email and card
234
+ * details and then fails on submit.
235
+ *
236
+ * Present on both `/info` endpoints, so this works in storefront mode as well
237
+ * as vibe-coded mode. `getStoreCapabilities().features.hasDonations` carries
238
+ * the same fact but is vibe-coded only. Absent on an older backend, and
239
+ * absent means closed.
240
+ */
241
+ donationsEnabled?: boolean;
227
242
  /**
228
243
  * Whether new customer registrations require email verification.
229
244
  * If true, your site MUST implement an email verification flow:
@@ -398,6 +413,116 @@ interface SupportedLocaleObject {
398
413
  /** Whether this is the store's default locale */
399
414
  isDefault: boolean;
400
415
  }
416
+ /**
417
+ * What the merchant has actually configured on this sales channel — the
418
+ * response of {@link BrainerceClient.getStoreCapabilities}.
419
+ *
420
+ * Build against this instead of hardcoding. A storefront that hardcodes a
421
+ * low-stock threshold shows the wrong badge on every store whose merchant
422
+ * chose a different one, and a storefront that renders a feature the merchant
423
+ * never switched on ships a control that does nothing.
424
+ */
425
+ interface StoreCapabilities {
426
+ store: {
427
+ /** Parent store name (account level). */
428
+ name: string;
429
+ /** Per-channel display name — what the merchant sees in the dashboard. */
430
+ channelName: string;
431
+ /** ISO 4217 code the store prices in. */
432
+ currency: string;
433
+ /** The store's content language (BCP-47). */
434
+ language: string;
435
+ /**
436
+ * Present ONLY when the merchant enabled multi-language on this store.
437
+ * Absent means single-language: render `language` and do not build a
438
+ * locale switcher. When present, `enabled` is always `true`.
439
+ */
440
+ i18n?: I18nSettings;
441
+ };
442
+ connection: {
443
+ /** API scopes granted to this channel. A call outside them is rejected. */
444
+ allowedScopes: string[];
445
+ /** Whether this channel may create orders (`orders:write`). */
446
+ ordersWriteEnabled: boolean;
447
+ /** Whether guest checkout sessions are recorded for abandoned-cart recovery. */
448
+ guestCheckoutTracking: boolean;
449
+ /** Whether a newly registered customer must verify their email address. */
450
+ requireEmailVerification: boolean;
451
+ /**
452
+ * The merchant made the birthday mandatory at registration on this channel.
453
+ * Render the signup form's month and day as required when true: the register
454
+ * route rejects a registration without one, and a form that does not read
455
+ * this cannot be submitted and tells the shopper nothing about why.
456
+ */
457
+ requireBirthday: boolean;
458
+ /** Whether test orders may complete without a real payment. */
459
+ sandboxPaymentsEnabled: boolean;
460
+ /** When stock is held: at cart, at checkout creation, or at payment. */
461
+ reservationStrategy: 'ON_CART' | 'ON_CHECKOUT' | 'ON_PAYMENT';
462
+ /** Minutes a reservation is held before it expires. */
463
+ reservationTimeout: number;
464
+ /**
465
+ * Whether the storefront should call out low stock at all. When `false`,
466
+ * show no low-stock treatment regardless of `lowStockThreshold` — the
467
+ * merchant turned the urgency messaging off on purpose.
468
+ */
469
+ lowStockWarning: boolean;
470
+ /** Units at or below which stock counts as low. Merchant-configured; defaults to 5. */
471
+ lowStockThreshold: number;
472
+ /**
473
+ * Whether the storefront should offer "email me when this is back" on a
474
+ * sold-out product. When `false`, do not render the affordance at all:
475
+ * `stockAlerts.subscribe()` still answers `{ ok: true }` and records
476
+ * nothing, so a button left up looks like it worked and quietly does not.
477
+ */
478
+ stockAlertsEnabled: boolean;
479
+ };
480
+ features: {
481
+ /** Payment gateways the merchant installed. Empty means checkout cannot take money yet. */
482
+ paymentProviders: Array<{
483
+ name: string;
484
+ provider: string;
485
+ }>;
486
+ /** Social login providers configured on the store, with their on/off state. */
487
+ oauthProviders: Array<{
488
+ provider: string;
489
+ isEnabled: boolean;
490
+ }>;
491
+ /** At least one active shipping zone exists. */
492
+ hasShippingZones: boolean;
493
+ /** At least one enabled automatic discount rule exists. */
494
+ hasDiscountRules: boolean;
495
+ /** At least one product is a digital download. */
496
+ hasDownloadableProducts: boolean;
497
+ /** At least one coupon exists. */
498
+ hasCoupons: boolean;
499
+ /** At least one active checkout custom field is defined. */
500
+ hasCheckoutCustomFields: boolean;
501
+ /**
502
+ * Gift cards are switched on for this store.
503
+ *
504
+ * A per-store switch, not a count — a store that has issued no cards yet
505
+ * still reports true once the merchant enables the feature. Build the
506
+ * redemption field regardless: it auto-hides, and the day a card is issued
507
+ * the storefront already honours it.
508
+ */
509
+ hasGiftCards: boolean;
510
+ /** At least one PUBLISHED content entry (page, blog post, FAQ) exists. */
511
+ hasContent: boolean;
512
+ /** The store has an ACTIVE loyalty program. */
513
+ hasLoyaltyProgram: boolean;
514
+ /** The loyalty program has referrals enabled. */
515
+ hasReferralProgram: boolean;
516
+ /** The loyalty program has birthday gifts enabled. */
517
+ hasBirthdayRewards: boolean;
518
+ /** The loyalty program has at least one milestone badge configured. */
519
+ hasBadges: boolean;
520
+ /** The loyalty program has at least one active paid membership plan. */
521
+ hasPaidMembership: boolean;
522
+ /** AI reward recommendation is available — true whenever loyalty is active. */
523
+ hasAiRewardRecommendation: boolean;
524
+ };
525
+ }
401
526
  /** Upsell feature configuration exposed to the storefront */
402
527
  interface UpsellSettings {
403
528
  /** Minimum cart amount for free shipping (null = disabled) */
@@ -2582,6 +2707,47 @@ interface OAuthCallbackResponse extends CustomerAuthResponse {
2582
2707
  provider: CustomerOAuthProvider;
2583
2708
  redirectUrl?: string;
2584
2709
  }
2710
+ /**
2711
+ * Values the `?oauth_error=` query param can take when a social sign-in fails.
2712
+ *
2713
+ * The post-OAuth redirect follows the RFC 6749 §4.1.2.1 shape: a stable
2714
+ * machine-readable code in `oauth_error`, plus an English `error_description`
2715
+ * meant for developers. Switch on the code to render localized copy — the
2716
+ * description is not shopper-facing copy and its wording may change.
2717
+ *
2718
+ * The list is open: the provider's own codes (`access_denied`,
2719
+ * `temporarily_unavailable`, `admin_policy_enforced`, ...) are passed through,
2720
+ * so always handle the unknown case.
2721
+ */
2722
+ type OAuthErrorCode =
2723
+ /** Callback arrived without a usable `code`/`state` pair. */
2724
+ 'invalid_request'
2725
+ /** `state` matches no outstanding authorization request. */
2726
+ | 'invalid_state'
2727
+ /** `state` was already consumed — a replay or a double-submitted callback. */
2728
+ | 'state_already_used'
2729
+ /** `state` sat unused past its 10-minute TTL. Ask the shopper to retry. */
2730
+ | 'state_expired'
2731
+ /** Provider is recognised but not implemented yet. */
2732
+ | 'provider_unsupported'
2733
+ /** Provider reported a failure we could not map onto a safe code. */
2734
+ | 'provider_error'
2735
+ /** Shopper declined consent at the provider. */
2736
+ | 'access_denied'
2737
+ /** The store has this provider turned off. Hide the button. */
2738
+ | 'provider_disabled'
2739
+ /** This customer already has a different account linked for this provider. */
2740
+ | 'provider_already_linked'
2741
+ /** This provider account is already linked to a different customer. */
2742
+ | 'oauth_account_linked_to_another_customer'
2743
+ /**
2744
+ * An account with this email has an unverified password credential, and the
2745
+ * provider would not attest ownership of the address either. Send the shopper
2746
+ * to email verification, not to a retry.
2747
+ */
2748
+ | 'link_blocked_unverified_password_account'
2749
+ /** Unexpected server-side failure. Details are in the platform logs, not here. */
2750
+ | 'server_error' | (string & {});
2585
2751
  interface OAuthConnection {
2586
2752
  id: string;
2587
2753
  provider: CustomerOAuthProvider;
@@ -2900,7 +3066,7 @@ interface AddToCartDto {
2900
3066
  * a picked modifier carries `referencedProductId` and that referenced product
2901
3067
  * itself has modifier groups. Server enforces depth ≤ 3.
2902
3068
  */
2903
- nestedByModifierId?: Record<string, ModifierSelection[]>;
3069
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
2904
3070
  /**
2905
3071
  * Optional product info for local cart (guest mode).
2906
3072
  * If provided, SDK uses this directly without fetching from API.
@@ -2922,7 +3088,7 @@ interface UpdateCartItemDto {
2922
3088
  */
2923
3089
  selections?: ModifierSelection[];
2924
3090
  /** Nested-combo selections (see `AddToCartDto.nestedByModifierId`). */
2925
- nestedByModifierId?: Record<string, ModifierSelection[]>;
3091
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
2926
3092
  }
2927
3093
  interface ApplyCouponDto {
2928
3094
  code: string;
@@ -3126,7 +3292,15 @@ type DeliveryType = 'shipping' | 'pickup';
3126
3292
  * ```
3127
3293
  */
3128
3294
  interface TaxBreakdownItem {
3129
- /** Tax name (e.g., "Israel VAT 18%", "California Sales Tax") */
3295
+ /**
3296
+ * Tax name (e.g. "Israel VAT 18%", "California Sales Tax", "GST", "QST").
3297
+ *
3298
+ * `breakdown` carries ONE ROW PER RATE and has always been able to hold
3299
+ * several. In Canada it routinely does: a Quebec order has a "GST" row and a
3300
+ * "QST" row, a British Columbia order has "GST" and "PST". Render every row —
3301
+ * a GST/QST-registered merchant is required to itemise them, and collapsing
3302
+ * them into one "Tax" line loses information the buyer's own accountant needs.
3303
+ */
3130
3304
  name: string;
3131
3305
  /** Tax rate as decimal (0.17 = 17%) */
3132
3306
  rate: number;
@@ -3141,15 +3315,19 @@ interface TaxBreakdownItem {
3141
3315
  * Tax calculation result with itemized breakdown.
3142
3316
  * Included in checkout response after shipping address is set.
3143
3317
  *
3318
+ * `breakdown` can hold SEVERAL rows and often does — a Quebec address is taxed
3319
+ * GST 5% + QST 9.975%, a British Columbia one GST 5% + PST 7%. Loop it rather
3320
+ * than reading `breakdown[0]`.
3321
+ *
3144
3322
  * @example
3145
3323
  * ```typescript
3146
3324
  * // Check if tax applies
3147
3325
  * if (checkout.taxBreakdown && checkout.taxBreakdown.totalTax > 0) {
3148
3326
  * console.log(`Tax: $${checkout.taxBreakdown.totalTax.toFixed(2)}`);
3149
3327
  *
3150
- * // Show breakdown
3328
+ * // Show EVERY row — Quebec prints two: GST then QST.
3151
3329
  * checkout.taxBreakdown.breakdown.forEach(tax => {
3152
- * const percent = (tax.rate * 100).toFixed(2);
3330
+ * const percent = (tax.rate * 100).toFixed(3);
3153
3331
  * console.log(` ${tax.name} (${percent}%): $${tax.amount.toFixed(2)}`);
3154
3332
  * });
3155
3333
  * }
@@ -3479,6 +3657,137 @@ interface SelectPickupLocationDto {
3479
3657
  * @see CheckoutLineItem for item structure
3480
3658
  * @see ShippingRate for shipping rate structure
3481
3659
  */
3660
+ /**
3661
+ * A gift card applied to a checkout.
3662
+ *
3663
+ * Returned by `applyGiftCard`. Note what is NOT here: the code, the card id, or
3664
+ * anything about who owns it. A storefront needs the tender id (to remove it),
3665
+ * how much went on, and what the provider will now be charged.
3666
+ */
3667
+ interface CheckoutTender {
3668
+ /** Pass this to `removeGiftCard` — a checkout can carry more than one card. */
3669
+ tenderId: string;
3670
+ /**
3671
+ * How much of the card was applied. Capped at what the order still owes, so a
3672
+ * ₪200 card on a ₪50 order applies ₪50 and leaves ₪150 for next time.
3673
+ */
3674
+ amountApplied: string;
3675
+ /**
3676
+ * What the payment provider will be charged.
3677
+ *
3678
+ * The order `total` is deliberately UNCHANGED. A gift card is a tender, not a
3679
+ * discount: the order is still worth what it is worth and tax is still
3680
+ * calculated on that, which is why this is a separate field and not a
3681
+ * reduction of `discountAmount`.
3682
+ */
3683
+ providerAmountDue: string;
3684
+ }
3685
+ /**
3686
+ * The answer from `checkGiftCardBalance`.
3687
+ *
3688
+ * Identical for an unknown code, a disabled card and an expired one. That is on
3689
+ * purpose — see the method's own documentation.
3690
+ */
3691
+ interface GiftCardBalance {
3692
+ /** Spendable balance, or '0.00' when the card cannot be used. */
3693
+ balance: string;
3694
+ currency: string;
3695
+ /** Whether this code can be applied to a checkout right now. */
3696
+ usable: boolean;
3697
+ }
3698
+ /**
3699
+ * A tribute gift.
3700
+ *
3701
+ * `IN_HONOR` for someone living, `IN_MEMORY` for someone who has died. Setting
3702
+ * either requires `tributeName`; the API rejects a tribute with nobody named.
3703
+ */
3704
+ type DonationTributeType = 'IN_HONOR' | 'IN_MEMORY';
3705
+ /**
3706
+ * `PENDING` means an intent exists and no money has moved. A donation is only a
3707
+ * gift once it is `PAID`, which happens when the provider's webhook confirms
3708
+ * it — never when `createDonation` returns.
3709
+ *
3710
+ * There is no `REFUNDED` member on purpose: a refund is recorded against the
3711
+ * payment, not the donation, so one fact lives in one place.
3712
+ */
3713
+ type DonationStatus = 'PENDING' | 'PAID' | 'FAILED' | 'CANCELLED';
3714
+ /** What `createDonation` accepts. */
3715
+ interface CreateDonationInput {
3716
+ /**
3717
+ * The gift itself, in the store's base currency. EXCLUDES `feeCoverAmount` —
3718
+ * this is the figure the donor is credited with.
3719
+ */
3720
+ amount: number;
3721
+ /**
3722
+ * Processing fee the donor volunteered to absorb. Charged on TOP of `amount`,
3723
+ * never subtracted from it. Roughly 55-60% of donors accept this when a form
3724
+ * offers it, so it is worth offering.
3725
+ */
3726
+ feeCoverAmount?: number;
3727
+ /** Required. Also how the donor's giving history is found later. */
3728
+ donorEmail: string;
3729
+ donorName?: string;
3730
+ /**
3731
+ * Hides the donor's name on public surfaces (a donor wall, a thank-you page).
3732
+ * It does NOT hide them from the organisation, which still needs the donor
3733
+ * for its own records.
3734
+ */
3735
+ isAnonymous?: boolean;
3736
+ /** Requires `tributeName` when set. */
3737
+ tributeType?: DonationTributeType;
3738
+ tributeName?: string;
3739
+ /** The donor's own words. Plain text — never render it as HTML. */
3740
+ message?: string;
3741
+ /**
3742
+ * Where to land the donor after paying, as a PATH on your own storefront
3743
+ * (e.g. `/thank-you`). A full URL is rejected: the payment provider redirects
3744
+ * a real browser here, so accepting one would be an open redirect.
3745
+ */
3746
+ returnPath?: string;
3747
+ }
3748
+ /**
3749
+ * What `createDonation` returns.
3750
+ *
3751
+ * ⛔ This is NOT a paid donation. `status` is `PENDING` and the money has not
3752
+ * moved: you have a provider intent to complete, exactly as you would after
3753
+ * `createPaymentIntent` on a checkout. Credit the gift only after the donation
3754
+ * reads back as `PAID`.
3755
+ */
3756
+ interface DonationIntent {
3757
+ donationId: string;
3758
+ status: DonationStatus;
3759
+ /** The gift, excluding any covered fee. */
3760
+ amount: string;
3761
+ feeCoverAmount: string;
3762
+ /** What the provider is actually charging: `amount` + `feeCoverAmount`. */
3763
+ chargeAmount: string;
3764
+ currency: string;
3765
+ payment: {
3766
+ intentId: string;
3767
+ clientSecret?: string | null;
3768
+ clientSdk?: unknown;
3769
+ redirectUrl?: string | null;
3770
+ providerType: string | null;
3771
+ };
3772
+ }
3773
+ /**
3774
+ * A donation read back for a thank-you page.
3775
+ *
3776
+ * Deliberately narrow. There is no failure reason (a decline message tells a
3777
+ * card tester which card is live) and `donorName` is `null` whenever the gift
3778
+ * was marked anonymous.
3779
+ */
3780
+ interface PublicDonation {
3781
+ id: string;
3782
+ status: DonationStatus;
3783
+ amount: string;
3784
+ feeCoverAmount: string;
3785
+ currency: string;
3786
+ donorName: string | null;
3787
+ tributeType: DonationTributeType | null;
3788
+ tributeName: string | null;
3789
+ paidAt: string | null;
3790
+ }
3482
3791
  interface Checkout {
3483
3792
  /** Unique checkout identifier */
3484
3793
  id: string;
@@ -3542,6 +3851,30 @@ interface Checkout {
3542
3851
  customFieldValues?: Record<string, unknown> | null;
3543
3852
  /** Applied coupon code */
3544
3853
  couponCode?: string | null;
3854
+ /**
3855
+ * Gift cards held against this checkout, oldest first.
3856
+ *
3857
+ * Read these to render applied cards after a page reload — a checkout keeps
3858
+ * its holds server-side, so a storefront that only tracks the response from
3859
+ * `applyGiftCard` loses them on refresh and shows a shopper a card they no
3860
+ * longer appear to have.
3861
+ *
3862
+ * Remove one with its `tenderId`, never the code.
3863
+ */
3864
+ tenders?: Array<{
3865
+ tenderId: string;
3866
+ amountApplied: string;
3867
+ }>;
3868
+ /**
3869
+ * What the payment provider will be charged: `total` minus every gift card
3870
+ * applied.
3871
+ *
3872
+ * `total` is deliberately UNCHANGED by a gift card. A gift card is a means of
3873
+ * payment, not a discount — the order is still worth what it is worth and tax
3874
+ * is still calculated on that. Show this as its own line beside the total
3875
+ * ("Gift card −₪54.50"), never folded into `discountAmount`.
3876
+ */
3877
+ providerAmountDue?: string;
3545
3878
  /**
3546
3879
  * Order-level note from the shopper (set via setCheckoutCustomer).
3547
3880
  * Copied onto the order at completion and shown to the merchant.
@@ -3886,7 +4219,7 @@ interface WebhookEvent {
3886
4219
  data: unknown;
3887
4220
  timestamp: string;
3888
4221
  }
3889
- type WebhookEventType = 'order.created' | 'order.updated' | 'order.paid' | 'order.fulfilled' | 'order.cancelled' | 'order.refunded' | 'customer.created' | 'customer.updated' | 'customer.deleted' | 'product.created' | 'product.updated' | 'product.deleted' | 'inventory.updated' | 'inventory.low' | 'checkout.completed' | 'checkout.abandoned' | 'payment.succeeded' | 'payment.failed' | 'payment.refunded' | 'blog.post.published' | 'blog.post.updated';
4222
+ type WebhookEventType = 'order.created' | 'order.updated' | 'order.paid' | 'order.fulfilled' | 'order.cancelled' | 'order.refunded' | 'customer.created' | 'customer.updated' | 'customer.deleted' | 'product.created' | 'product.updated' | 'product.deleted' | 'inventory.updated' | 'inventory.low' | 'checkout.completed' | 'checkout.abandoned' | 'payment.succeeded' | 'payment.failed' | 'payment.refunded' | 'blog.post.published' | 'blog.post.updated' | 'donation.paid' | 'donation.refunded';
3890
4223
  type VariantStatus = 'active' | 'draft';
3891
4224
  interface CreateVariantDto {
3892
4225
  sku?: string;
@@ -4259,63 +4592,6 @@ interface PublishProductResponse {
4259
4592
  error?: string;
4260
4593
  }>;
4261
4594
  }
4262
- type CustomApiAuthType = 'api_key' | 'bearer' | 'basic' | 'oauth2';
4263
- type CustomApiSyncDirection = 'inbound' | 'outbound' | 'bidirectional';
4264
- type CustomApiConnectionStatus = 'CONNECTED' | 'DISCONNECTED' | 'PAUSED' | 'ERROR';
4265
- interface CustomApiCredentials {
4266
- apiKey?: string;
4267
- bearerToken?: string;
4268
- username?: string;
4269
- password?: string;
4270
- headerName?: string;
4271
- }
4272
- interface CustomApiSyncConfig {
4273
- products?: boolean;
4274
- orders?: boolean;
4275
- inventory?: boolean;
4276
- }
4277
- interface CustomApiIntegration {
4278
- id: string;
4279
- storeId: string;
4280
- name: string;
4281
- description?: string | null;
4282
- baseUrl: string;
4283
- authType: CustomApiAuthType;
4284
- credentials?: CustomApiCredentials;
4285
- status: CustomApiConnectionStatus;
4286
- enabled: boolean;
4287
- syncDirection: CustomApiSyncDirection;
4288
- syncConfig?: CustomApiSyncConfig | null;
4289
- lastSyncAt?: string | null;
4290
- lastError?: string | null;
4291
- lastErrorAt?: string | null;
4292
- createdAt: string;
4293
- updatedAt: string;
4294
- }
4295
- interface CreateCustomApiDto {
4296
- name: string;
4297
- description?: string;
4298
- baseUrl: string;
4299
- authType: CustomApiAuthType;
4300
- credentials?: CustomApiCredentials;
4301
- syncDirection?: CustomApiSyncDirection;
4302
- syncConfig?: CustomApiSyncConfig;
4303
- }
4304
- interface UpdateCustomApiDto {
4305
- name?: string;
4306
- description?: string;
4307
- baseUrl?: string;
4308
- authType?: CustomApiAuthType;
4309
- credentials?: CustomApiCredentials;
4310
- enabled?: boolean;
4311
- syncDirection?: CustomApiSyncDirection;
4312
- syncConfig?: CustomApiSyncConfig;
4313
- }
4314
- interface CustomApiTestResult {
4315
- success: boolean;
4316
- latency?: number;
4317
- error?: string;
4318
- }
4319
4595
  /**
4320
4596
  * Client-side SDK configuration for payment providers that render a widget.
4321
4597
  * Returned by the backend in provider config and payment intents.
@@ -5059,7 +5335,33 @@ interface ShippingRateConfig {
5059
5335
  createdAt: string;
5060
5336
  updatedAt: string;
5061
5337
  }
5062
- type ShippingRateType = 'FLAT' | 'FREE' | 'WEIGHT_BASED' | 'PRICE_BASED' | 'QUANTITY_BASED';
5338
+ /**
5339
+ * How a shipping rate computes its price.
5340
+ *
5341
+ * Mirrors the `ShippingRateType` enum the API validates against with
5342
+ * `@IsEnum`; a value outside this set is rejected with 400.
5343
+ *
5344
+ * ⛔ This list was wrong until SDK 2.0.3 and the two corrections bite in
5345
+ * opposite directions, so read both before pinning an older version:
5346
+ *
5347
+ * - It declared `'FLAT'`, which the API has never accepted — the member is
5348
+ * `'FLAT_RATE'`. Flat rate is the commonest rate there is, and no server-side
5349
+ * normaliser exists, so every `createShippingRate` written against the old
5350
+ * type failed with 400 no matter how correct it looked.
5351
+ * - It omitted `'LOCAL_PICKUP'` entirely, which is the only way to express
5352
+ * click-and-collect, and invented `'QUANTITY_BASED'`, which does not exist.
5353
+ */
5354
+ type ShippingRateType =
5355
+ /** One price for the whole order, in `rateConfig.amount`. */
5356
+ 'FLAT_RATE'
5357
+ /** No charge. Pair with `minOrderAmount` for "free over X". */
5358
+ | 'FREE'
5359
+ /** Priced from total cart weight. */
5360
+ | 'WEIGHT_BASED'
5361
+ /** Priced from order value. */
5362
+ | 'PRICE_BASED'
5363
+ /** Collection in person — nothing ships, so no address is required. */
5364
+ | 'LOCAL_PICKUP';
5063
5365
  interface CreateShippingZoneDto {
5064
5366
  name: string;
5065
5367
  countries: string[];
@@ -5230,6 +5532,21 @@ interface TaxRate {
5230
5532
  isCompound: boolean;
5231
5533
  /** Whether tax is included in prices */
5232
5534
  isInclusive: boolean;
5535
+ /**
5536
+ * Charge this rate TOGETHER WITH the other stackable rates matching the same
5537
+ * address, instead of only the most specific one.
5538
+ *
5539
+ * `false` (the default, and every rate created before this field existed) is
5540
+ * the historic rule: the most specific match wins alone and the rest are
5541
+ * discarded. `true` opts into summation — Canada's GST 5% (country row) plus
5542
+ * a province's PST/QST, both charged on the same pre-tax base, producing two
5543
+ * `TaxBreakdownItem` rows.
5544
+ *
5545
+ * Additive, never compound — see the deprecated {@link TaxRate.isCompound}.
5546
+ * Stacking also never crosses a tax class: a class-specific rate REPLACES the
5547
+ * Standard rates rather than adding to them.
5548
+ */
5549
+ stackable: boolean;
5233
5550
  priority: number;
5234
5551
  isActive: boolean;
5235
5552
  /** Countries where this tax rate applies as exception */
@@ -5254,6 +5571,12 @@ interface CreateTaxRateDto {
5254
5571
  */
5255
5572
  isCompound?: boolean;
5256
5573
  isInclusive?: boolean;
5574
+ /**
5575
+ * Charge this rate together with the other stackable rates matching the same
5576
+ * address (Canada GST + PST/QST) rather than only the most specific one.
5577
+ * Defaults to `false`, which keeps the most-specific-wins rule.
5578
+ */
5579
+ stackable?: boolean;
5257
5580
  /** Tax class this rate applies to. Omit/null = Standard. */
5258
5581
  taxClassId?: string;
5259
5582
  priority?: number;
@@ -5275,6 +5598,12 @@ interface UpdateTaxRateDto {
5275
5598
  */
5276
5599
  isCompound?: boolean;
5277
5600
  isInclusive?: boolean;
5601
+ /**
5602
+ * Charge this rate together with the other stackable rates matching the same
5603
+ * address. Flipping an existing rate to `true` changes what future checkouts
5604
+ * collect: rates that used to be mutually exclusive start being summed.
5605
+ */
5606
+ stackable?: boolean;
5278
5607
  priority?: number;
5279
5608
  isActive?: boolean;
5280
5609
  exceptionCountries?: string[];
@@ -5421,9 +5750,27 @@ interface UpsertRegionPricesResult {
5421
5750
  }
5422
5751
  interface TaxEstimateResponse {
5423
5752
  appliesTax: boolean;
5424
- /** Percent — e.g. 18 for 18%. `null` when no matching rule. */
5753
+ /**
5754
+ * Percent — e.g. 18 for 18%. In a stacked jurisdiction this is the SUMMED
5755
+ * effective rate of every rate in `rates`. `null` when no matching rule.
5756
+ */
5425
5757
  rate: number | null;
5758
+ /** One rate's name, or several joined with `" + "` ("GST + QST"). */
5426
5759
  rateName: string | null;
5760
+ /**
5761
+ * One entry per rate behind the estimate. Amounts are 2dp and sum exactly to
5762
+ * `estimatedTax`.
5763
+ *
5764
+ * A preview has no province, so a Canadian estimate shows the federal GST
5765
+ * alone; the provincial PST/QST joins it at checkout once the buyer gives a
5766
+ * shipping address. That is precisely what `note` is for — render it.
5767
+ */
5768
+ rates: Array<{
5769
+ rateId: string;
5770
+ name: string;
5771
+ rate: number;
5772
+ amount: number;
5773
+ }>;
5427
5774
  /** Tax portion of `subtotal` at the store's `pricesIncludeTax` mode. */
5428
5775
  estimatedTax: number;
5429
5776
  pricesIncludeTax: boolean;
@@ -5870,8 +6217,15 @@ interface UpdateMemberRoleDto {
5870
6217
  }
5871
6218
  /** Store-level team member role */
5872
6219
  type StoreRole = 'OWNER' | 'MANAGER' | 'STAFF' | 'VIEWER';
5873
- /** Granular store permission */
5874
- type StorePermission = 'VIEW_PRODUCTS' | 'CREATE_PRODUCTS' | 'EDIT_PRODUCTS' | 'DELETE_PRODUCTS' | 'MANAGE_PRODUCT_CATEGORIES' | 'VIEW_ORDERS' | 'UPDATE_ORDER_STATUS' | 'FULFILL_ORDERS' | 'CANCEL_ORDERS' | 'REFUND_ORDERS' | 'VIEW_INVENTORY' | 'UPDATE_INVENTORY' | 'VIEW_CUSTOMERS' | 'EDIT_CUSTOMERS' | 'VIEW_ANALYTICS' | 'MANAGE_STORE_SETTINGS' | 'MANAGE_INTEGRATIONS' | 'MANAGE_TEAM' | 'MANAGE_BILLING';
6220
+ /**
6221
+ * Granular store permission.
6222
+ *
6223
+ * Mirrors the `StorePermission` enum in the platform database exactly — the
6224
+ * team endpoints return and accept every member below. Keep in sync with
6225
+ * `packages/database/prisma/schema.prisma`; a value missing here is a value
6226
+ * `getMyStorePermissions()` can return that will not type-check for callers.
6227
+ */
6228
+ type StorePermission = 'VIEW_PRODUCTS' | 'CREATE_PRODUCTS' | 'EDIT_PRODUCTS' | 'DELETE_PRODUCTS' | 'MANAGE_PRODUCT_CATEGORIES' | 'VIEW_ORDERS' | 'UPDATE_ORDER_STATUS' | 'FULFILL_ORDERS' | 'CANCEL_ORDERS' | 'REFUND_ORDERS' | 'VIEW_INVENTORY' | 'UPDATE_INVENTORY' | 'VIEW_CUSTOMERS' | 'EDIT_CUSTOMERS' | 'VIEW_CONTACT_INQUIRIES' | 'MANAGE_CONTACT_INQUIRIES' | 'DELETE_CONTACT_INQUIRIES' | 'VIEW_CONTENT' | 'MANAGE_CONTENT' | 'VIEW_BLOG' | 'MANAGE_BLOG' | 'VIEW_ANALYTICS' | 'VIEW_COUPONS' | 'CREATE_COUPONS' | 'EDIT_COUPONS' | 'DELETE_COUPONS' | 'VIEW_DISCOUNT_RULES' | 'CREATE_DISCOUNT_RULES' | 'EDIT_DISCOUNT_RULES' | 'DELETE_DISCOUNT_RULES' | 'VIEW_PRICING_FORMULAS' | 'CREATE_PRICING_FORMULAS' | 'EDIT_PRICING_FORMULAS' | 'DELETE_PRICING_FORMULAS' | 'VIEW_TAXONOMY' | 'MANAGE_TAXONOMY' | 'VIEW_CONNECTORS' | 'VIEW_API_KEYS' | 'MANAGE_API_KEYS' | 'VIEW_WEBHOOKS' | 'MANAGE_WEBHOOKS' | 'VIEW_APPS' | 'INSTALL_APPS' | 'CONFIGURE_APPS' | 'MANAGE_APPS' | 'VIEW_STORE_SETTINGS' | 'MANAGE_STORE_SETTINGS' | 'MANAGE_INTEGRATIONS' | 'MANAGE_TEAM' | 'VIEW_STOREFRONT_BOT_SETTINGS' | 'MANAGE_STOREFRONT_BOT_SETTINGS' | 'VIEW_STOREFRONT_BOT_CONVERSATIONS' | 'MANAGE_STOREFRONT_BOT_CONVERSATIONS' | 'MANAGE_BILLING' | 'MANAGE_DEVELOPER' | 'USE_AI_ASSISTANT' | 'VIEW_LOYALTY' | 'MANAGE_LOYALTY' | 'VIEW_SEO' | 'MANAGE_SEO' | 'VIEW_DONATIONS' | 'MANAGE_DONATIONS' | 'VIEW_GIFT_CARDS' | 'ISSUE_GIFT_CARDS' | 'ADJUST_GIFT_CARDS' | 'MANAGE_GIFT_CARDS';
5875
6229
  /** Store team member info */
5876
6230
  interface StoreMember {
5877
6231
  id: string;
@@ -5981,7 +6335,22 @@ interface UserStorePermissions {
5981
6335
  permissions: StorePermission[];
5982
6336
  }
5983
6337
  /** Email event types */
5984
- type EmailEventType = 'ORDER_CONFIRMATION' | 'ORDER_SHIPPED' | 'ORDER_CANCELLED' | 'NEW_CUSTOMER' | 'LOW_STOCK_ALERT' | 'CART_ABANDONED' | 'TEAM_INVITATION';
6338
+ /**
6339
+ * The transactional emails a merchant can template and configure.
6340
+ *
6341
+ * Mirrors the `EmailEventType` enum in `create-email-template.dto.ts`, which is
6342
+ * what `@IsEnum` actually validates `eventType` against — a value missing here
6343
+ * is a template the API accepts and this SDK refuses to type.
6344
+ *
6345
+ * That DTO enum is deliberately a SUBSET of the platform's `EmailEventType`:
6346
+ * the wider database enum also carries billing, plan-limit, ops and
6347
+ * platform-notice mails (`PLAN_*`, `PAYMENT_*`, `OPS_ALERT`, `SDK_UPDATE`,
6348
+ * `TEST_SEND`, `SUPPORT_MESSAGE`, the ownership-transfer pair, ...). Those are
6349
+ * sent by the platform on its own behalf and are not a merchant's to rewrite,
6350
+ * so they are correctly absent. Do not "complete" this list against
6351
+ * `schema.prisma`.
6352
+ */
6353
+ type EmailEventType = 'ORDER_CONFIRMATION' | 'ORDER_SHIPPED' | 'ORDER_CANCELLED' | 'ORDER_COMPLETED' | 'ORDER_REFUNDED' | 'ORDER_NOTE' | 'ORDERS_LINKED' | 'NEW_ORDER_ADMIN' | 'NEW_CUSTOMER' | 'EMAIL_VERIFICATION' | 'PASSWORD_RESET' | 'INQUIRY_NEW_ADMIN' | 'INQUIRY_REPLY_CUSTOMER' | 'INQUIRY_CONFIRMATION_CUSTOMER' | 'CART_ABANDONED' | 'MARKETING_CAMPAIGN' | 'LOW_STOCK_ALERT' | 'TEAM_INVITATION' | 'STORE_INVITATION' | 'STORE_ROLE_CHANGED' | 'STORE_DELETED' | 'EXPORT_COMPLETE' | 'SCHEDULED_BACKUP_SUCCESS' | 'SCHEDULED_BACKUP_FAILED';
5985
6354
  /** Email event settings */
5986
6355
  interface EmailEventSettings {
5987
6356
  enabled: boolean;
@@ -6559,6 +6928,13 @@ interface CreateInquiryInput {
6559
6928
  locale?: string;
6560
6929
  /** Provenance metadata (referrer, UTM, origin page, etc.). */
6561
6930
  sourceMetadata?: Record<string, unknown>;
6931
+ /**
6932
+ * Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
6933
+ * non-empty value rejects the request. Bots fill every text input.
6934
+ * The API validates this field, but the type omitted it, so a typed caller
6935
+ * could not reach the check at all.
6936
+ */
6937
+ honeypot?: string;
6562
6938
  customerId?: string;
6563
6939
  metadata?: Record<string, unknown>;
6564
6940
  }
@@ -6946,6 +7322,29 @@ interface ModifierSelection {
6946
7322
  modifierGroupId: string;
6947
7323
  modifierIds: string[];
6948
7324
  }
7325
+ /**
7326
+ * One nested-combo node: the product a picked modifier references, plus that
7327
+ * product's own modifier selections, recursing while depth stays ≤ 3.
7328
+ *
7329
+ * Mirrors the backend `NestedSelectionDto`
7330
+ * (`apps/backend/src/modules/cart/dto/add-to-cart.dto.ts`), where `productId`
7331
+ * is REQUIRED. The field used to be typed `Record<string, ModifierSelection[]>`,
7332
+ * which no valid payload could satisfy — a `ModifierSelection` carries no
7333
+ * `productId`, so a caller following the type sent a body the server rejects.
7334
+ * The backend guards the field with `@IsObject()` rather than `@ValidateNested`,
7335
+ * so the shape is enforced downstream in `ModifierGroupsService`, not by the
7336
+ * validator, and the mismatch surfaced as a pricing failure rather than a 400.
7337
+ */
7338
+ interface NestedModifierSelection {
7339
+ /** The nested product referenced by the parent modifier's `referencedProductId`. */
7340
+ productId: string;
7341
+ /** Variant of the nested product, when it has variants. */
7342
+ variantId?: string;
7343
+ /** The nested product's own modifier-group selections. */
7344
+ selections: ModifierSelection[];
7345
+ /** Deeper nesting, keyed by the parent modifier's id. Server enforces depth ≤ 3. */
7346
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
7347
+ }
6949
7348
  /**
6950
7349
  * Per-line modifier breakdown surfaced on `CartItem` and `OrderItem`
6951
7350
  * once the cart line includes selections.
@@ -7440,6 +7839,40 @@ declare class BrainerceClient {
7440
7839
  * `'ltr'` for everything else (including unknown locales).
7441
7840
  */
7442
7841
  getStoreDirection(locale?: string | null): 'ltr' | 'rtl';
7842
+ /**
7843
+ * Get what the merchant actually configured on this sales channel: store
7844
+ * identity and multi-language setup, the channel's own settings (low-stock
7845
+ * warning and threshold, reservation strategy and timeout, birthday and
7846
+ * email-verification requirements, granted scopes) and which optional
7847
+ * features are switched on (payment providers, social login, coupons,
7848
+ * discount rules, shipping zones, downloadables, content, loyalty).
7849
+ *
7850
+ * Read this instead of hardcoding. A storefront with a hardcoded low-stock
7851
+ * threshold shows the wrong badge on every store whose merchant chose a
7852
+ * different one, and a storefront that renders a feature nobody enabled
7853
+ * ships a control that silently does nothing.
7854
+ *
7855
+ * Only available in vibe-coded mode (`salesChannelId`). The payload belongs
7856
+ * to one sales channel: `storeId` mode has no channel to read it from, and
7857
+ * an `apiKey` addresses the store rather than any single channel.
7858
+ *
7859
+ * Call it once for the whole app and share the result. It is per channel,
7860
+ * not per product, so fetching it on every page is wasted work.
7861
+ *
7862
+ * @example
7863
+ * ```typescript
7864
+ * const caps = await client.getStoreCapabilities();
7865
+ *
7866
+ * // Low stock: honour the switch before the number.
7867
+ * const threshold = caps.connection.lowStockWarning
7868
+ * ? caps.connection.lowStockThreshold
7869
+ * : 0;
7870
+ *
7871
+ * if (caps.features.hasCoupons) renderCouponInput();
7872
+ * if (caps.store.i18n?.enabled) renderLocaleSwitcher(caps.store.i18n.supportedLocales);
7873
+ * ```
7874
+ */
7875
+ getStoreCapabilities(): Promise<StoreCapabilities>;
7443
7876
  /**
7444
7877
  * Send a storefront analytics beacon (pageview or engagement).
7445
7878
  *
@@ -8544,14 +8977,20 @@ declare class BrainerceClient {
8544
8977
  */
8545
8978
  publishCoupon(couponId: string, platforms: ConnectorPlatform[]): Promise<SyncJob>;
8546
8979
  /**
8547
- * Get platform capabilities for coupon features.
8548
- * Use this to understand what features each platform supports.
8980
+ * Get platform capabilities for coupon features, keyed by platform.
8981
+ *
8982
+ * ⛔ **Returns an empty object today.** Platform coupon capabilities moved
8983
+ * into the standalone connector apps and are not re-exposed here yet, so the
8984
+ * endpoint answers `{}` for every store. Treat a missing key as "unknown",
8985
+ * never as "the platform lacks the feature", and do not index into a platform
8986
+ * key without checking it exists first — there are none to find.
8549
8987
  *
8550
8988
  * @example
8551
8989
  * ```typescript
8552
8990
  * const capabilities = await client.getCouponPlatformCapabilities();
8553
- * if (!capabilities.SHOPIFY.supportsProductExclusions) {
8554
- * console.log('Shopify does not support product exclusions');
8991
+ * const meta = capabilities['GOOGLE'];
8992
+ * if (meta && !meta.supportsProducts) {
8993
+ * console.log('This platform cannot target individual products');
8555
8994
  * }
8556
8995
  * ```
8557
8996
  */
@@ -9925,7 +10364,7 @@ declare class BrainerceClient {
9925
10364
  /** Modifier-group selections (PRD §7.3 / §8.4). */
9926
10365
  selections?: ModifierSelection[];
9927
10366
  /** Nested-combo selections keyed by parent modifierId. */
9928
- nestedByModifierId?: Record<string, ModifierSelection[]>;
10367
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
9929
10368
  }): Promise<Cart>;
9930
10369
  /**
9931
10370
  * Smart get cart - returns the current cart (server-side for both guests and logged-in users)
@@ -10082,6 +10521,106 @@ declare class BrainerceClient {
10082
10521
  * ```
10083
10522
  */
10084
10523
  removeCheckoutCoupon(checkoutId: string): Promise<Checkout>;
10524
+ /**
10525
+ * Apply a gift card to a checkout.
10526
+ *
10527
+ * Merchants issue cards from the dashboard, so live codes exist and this field
10528
+ * is worth building. There is still no way for a shopper to BUY a gift card —
10529
+ * no product type, no purchase flow — so every card in circulation was issued
10530
+ * by hand.
10531
+ *
10532
+ * Redemption is deliberately NOT gated on the store's gift-card switch: a
10533
+ * store that turned the feature off still owes every card already in a
10534
+ * customer's hand, so the field keeps working. Build it unconditionally.
10535
+ *
10536
+ * A gift card is a **means of payment, not a discount**. The order total does
10537
+ * not change and tax stays calculated on the full value; what changes is
10538
+ * `providerAmountDue`, the amount the payment provider will be charged.
10539
+ *
10540
+ * Render it as its own line — "Gift card −₪54.50" beside the total — and NOT
10541
+ * by adding it to `discountAmount`. A shopper who sees stored value folded
10542
+ * into a discount is being shown the wrong thing, and so is their receipt.
10543
+ *
10544
+ * Only as much of the card as the order still owes is applied, so a card
10545
+ * larger than the basket leaves a balance on it for next time, and a smaller
10546
+ * one leaves an amount for the provider to charge.
10547
+ *
10548
+ * @example
10549
+ * const { amountApplied, providerAmountDue, tenderId } =
10550
+ * await client.applyGiftCard('checkout_123', 'A1B2-C3D4-E5F6-G7H8-J9K0');
10551
+ * // total is unchanged; charge the provider providerAmountDue
10552
+ */
10553
+ applyGiftCard(checkoutId: string, code: string): Promise<CheckoutTender>;
10554
+ /**
10555
+ * Remove a previously applied gift card from a checkout.
10556
+ *
10557
+ * Takes the `tenderId` returned by {@link applyGiftCard}, not the code — a
10558
+ * checkout can carry more than one card, and the code is never echoed back.
10559
+ *
10560
+ * The held value goes straight back to the card. Nothing was ever debited
10561
+ * while it was applied, so removing costs the shopper nothing.
10562
+ */
10563
+ removeGiftCard(checkoutId: string, tenderId: string): Promise<{
10564
+ removed: boolean;
10565
+ providerAmountDue: string;
10566
+ }>;
10567
+ /**
10568
+ * Check what is left on a gift card.
10569
+ *
10570
+ * Rate limited, and deliberately uninformative: a code that does not exist,
10571
+ * one that has been disabled and one that has expired all return the SAME
10572
+ * response — `{ balance: '0.00', usable: false }` — and take the same time to
10573
+ * do it. Do not build UI that tries to tell those apart, because the API will
10574
+ * not tell you, by design: a gift-card code is bearer value, and an endpoint
10575
+ * that confirmed which codes were real would be a free way to find them.
10576
+ *
10577
+ * Show "we cannot use this code" and let the shopper re-enter it.
10578
+ */
10579
+ checkGiftCardBalance(code: string): Promise<GiftCardBalance>;
10580
+ /**
10581
+ * Start a donation.
10582
+ *
10583
+ * A donation does not go through the cart. There is no line item, no
10584
+ * quantity, no shipping and no order — a donor names an amount and pays it,
10585
+ * which is a different shape of transaction from a purchase. Do not model a
10586
+ * donation as a product; if you already have, the amount is the giveaway:
10587
+ * you cannot let a donor type one.
10588
+ *
10589
+ * ⛔ A successful return is NOT a completed gift. You get back a PENDING
10590
+ * donation and a provider intent to complete, exactly as with a checkout.
10591
+ * The gift is only real once the provider's webhook confirms it, which is
10592
+ * when the donation reads back as `PAID`. Show a thank-you that reflects
10593
+ * that, and never send a receipt off the back of this call.
10594
+ *
10595
+ * Requires donations to be switched on for the store; a store that has not
10596
+ * turned them on is rejected rather than silently accepting money.
10597
+ *
10598
+ * ```ts
10599
+ * const donation = await brainerce.createDonation({
10600
+ * amount: 180,
10601
+ * feeCoverAmount: 6.3, // offered as a checkbox; most donors accept
10602
+ * donorEmail: 'sarah@example.com',
10603
+ * donorName: 'Sarah Cohen',
10604
+ * tributeType: 'IN_MEMORY',
10605
+ * tributeName: 'Avraham Cohen',
10606
+ * returnPath: '/thank-you',
10607
+ * });
10608
+ * // → complete donation.payment with your provider, then poll getDonation()
10609
+ * ```
10610
+ */
10611
+ createDonation(input: CreateDonationInput): Promise<DonationIntent>;
10612
+ /**
10613
+ * Read a donation back — for a thank-you page, and to see whether it is paid.
10614
+ *
10615
+ * Rate limited to 5 requests a minute, because an id that either resolves or
10616
+ * 404s is a way to enumerate them. Poll it a handful of times after the donor
10617
+ * returns from the provider; do not put it behind a 1-second interval.
10618
+ *
10619
+ * The payload is narrow on purpose: no failure reason, and `donorName` comes
10620
+ * back `null` whenever the gift was marked anonymous — so you can render this
10621
+ * straight onto a public page without leaking anything.
10622
+ */
10623
+ getDonation(donationId: string): Promise<PublicDonation>;
10085
10624
  /**
10086
10625
  * Set customer information on checkout
10087
10626
  *
@@ -11178,92 +11717,6 @@ declare class BrainerceClient {
11178
11717
  * Only available in storefront mode
11179
11718
  */
11180
11719
  getMyCart(): Promise<Cart>;
11181
- /**
11182
- * Get all Custom API integrations for a store
11183
- * Requires Admin mode (apiKey)
11184
- *
11185
- * @example
11186
- * ```typescript
11187
- * const integrations = await client.getCustomApiIntegrations();
11188
- * integrations.forEach(api => {
11189
- * console.log(`${api.name}: ${api.status}`);
11190
- * });
11191
- * ```
11192
- */
11193
- getCustomApiIntegrations(): Promise<CustomApiIntegration[]>;
11194
- /**
11195
- * Get a single Custom API integration by ID
11196
- * Requires Admin mode (apiKey)
11197
- *
11198
- * @example
11199
- * ```typescript
11200
- * const api = await client.getCustomApiIntegration('api_123');
11201
- * console.log(`API: ${api.name}, URL: ${api.baseUrl}`);
11202
- * ```
11203
- */
11204
- getCustomApiIntegration(integrationId: string): Promise<CustomApiIntegration>;
11205
- /**
11206
- * Create a new Custom API integration
11207
- * Requires Admin mode (apiKey)
11208
- *
11209
- * @example
11210
- * ```typescript
11211
- * const api = await client.createCustomApiIntegration({
11212
- * name: 'My External API',
11213
- * baseUrl: 'https://api.example.com',
11214
- * authType: 'api_key',
11215
- * credentials: {
11216
- * apiKey: 'sk_123...',
11217
- * headerName: 'X-API-Key',
11218
- * },
11219
- * syncDirection: 'bidirectional',
11220
- * syncConfig: {
11221
- * products: true,
11222
- * orders: true,
11223
- * inventory: true,
11224
- * },
11225
- * });
11226
- * ```
11227
- */
11228
- createCustomApiIntegration(data: CreateCustomApiDto): Promise<CustomApiIntegration>;
11229
- /**
11230
- * Update a Custom API integration
11231
- * Requires Admin mode (apiKey)
11232
- *
11233
- * @example
11234
- * ```typescript
11235
- * const api = await client.updateCustomApiIntegration('api_123', {
11236
- * enabled: false,
11237
- * syncConfig: { products: true, orders: false, inventory: true },
11238
- * });
11239
- * ```
11240
- */
11241
- updateCustomApiIntegration(integrationId: string, data: UpdateCustomApiDto): Promise<CustomApiIntegration>;
11242
- /**
11243
- * Delete a Custom API integration
11244
- * Requires Admin mode (apiKey)
11245
- *
11246
- * @example
11247
- * ```typescript
11248
- * await client.deleteCustomApiIntegration('api_123');
11249
- * ```
11250
- */
11251
- deleteCustomApiIntegration(integrationId: string): Promise<void>;
11252
- /**
11253
- * Test connection to a Custom API
11254
- * Requires Admin mode (apiKey)
11255
- *
11256
- * @example
11257
- * ```typescript
11258
- * const result = await client.testCustomApiConnection('api_123');
11259
- * if (result.success) {
11260
- * console.log(`Connection OK, latency: ${result.latency}ms`);
11261
- * } else {
11262
- * console.error(`Connection failed: ${result.error}`);
11263
- * }
11264
- * ```
11265
- */
11266
- testCustomApiConnection(integrationId: string): Promise<CustomApiTestResult>;
11267
11720
  /**
11268
11721
  * Get product availability including reserved quantities.
11269
11722
  * Use this to show accurate stock to customers when reservations are enabled.
@@ -11674,12 +12127,18 @@ declare class BrainerceClient {
11674
12127
  * ```typescript
11675
12128
  * const rate = await client.createZoneShippingRate('zone_123', {
11676
12129
  * name: 'Standard Shipping',
11677
- * type: 'flat',
11678
- * price: 5.99,
11679
- * minOrderValue: 0,
11680
- * estimatedDays: '3-5',
12130
+ * type: 'FLAT_RATE',
12131
+ * rateConfig: { amount: 5.99 },
12132
+ * minDeliveryDays: 3,
12133
+ * maxDeliveryDays: 5,
11681
12134
  * });
11682
12135
  * ```
12136
+ *
12137
+ * The price lives in `rateConfig`, whose shape follows `type` — `FLAT_RATE`
12138
+ * takes `{ amount }`, `WEIGHT_BASED` and `PRICE_BASED` take tier arrays, and
12139
+ * `FREE` and `LOCAL_PICKUP` take none. Unknown top-level properties are
12140
+ * rejected outright rather than ignored, so a stray `price` or
12141
+ * `estimatedDays` fails the whole call with 400.
11683
12142
  */
11684
12143
  createZoneShippingRate(zoneId: string, data: CreateShippingRateDto): Promise<ShippingRateConfig>;
11685
12144
  /**
@@ -11768,6 +12227,10 @@ declare class BrainerceClient {
11768
12227
  *
11769
12228
  * Returns `appliesTax=false` when tax is disabled, the country is missing,
11770
12229
  * or no active rate covers it.
12230
+ *
12231
+ * The preview has no province, so it only sees country-level rates: a
12232
+ * Canadian estimate shows the federal GST alone and the provincial PST/QST
12233
+ * joins it at checkout. Render `note` so the buyer is not surprised.
11771
12234
  */
11772
12235
  estimateTax(params: {
11773
12236
  country?: string;
@@ -11808,8 +12271,47 @@ declare class BrainerceClient {
11808
12271
  /**
11809
12272
  * Get all tax rates for the store
11810
12273
  * Requires Admin mode (apiKey)
12274
+ *
12275
+ * A jurisdiction can need more than one rate. Canada is the common case: a
12276
+ * country-level `GST` row plus a province-level `PST`/`QST` row, both with
12277
+ * `stackable: true`, which the checkout charges together. Provinces on HST
12278
+ * carry a single combined row with `stackable: false`.
11811
12279
  */
11812
12280
  getTaxRates(): Promise<TaxRate[]>;
12281
+ /**
12282
+ * List the country tax presets available to apply.
12283
+ * Requires Admin mode (apiKey)
12284
+ */
12285
+ getTaxPresets(): Promise<Array<{
12286
+ key: string;
12287
+ country: string;
12288
+ label: string;
12289
+ description: string;
12290
+ rateCount: number;
12291
+ }>>;
12292
+ /**
12293
+ * Apply a country's whole tax table in one call, instead of creating a rate
12294
+ * per province by hand. Requires Admin mode (apiKey).
12295
+ *
12296
+ * `CA` writes ten rates: federal GST 5% country-wide, one combined HST row
12297
+ * each for ON/NB/NL/NS/PE, and PST/RST/QST for BC/SK/MB/QC charged on top of
12298
+ * the GST. Alberta and the territories need no row — the GST covers them.
12299
+ *
12300
+ * Throws 409 when the store already has rates for that country; delete those
12301
+ * first if you meant to replace them. Rates land in the Standard tax class.
12302
+ *
12303
+ * Brainerce does not register the store for GST/HST and does not file returns.
12304
+ *
12305
+ * @example
12306
+ * ```typescript
12307
+ * const { created } = await client.applyTaxPreset('CA'); // created === 10
12308
+ * ```
12309
+ */
12310
+ applyTaxPreset(presetKey: string): Promise<{
12311
+ preset: string;
12312
+ created: number;
12313
+ rates: TaxRate[];
12314
+ }>;
11813
12315
  /**
11814
12316
  * Get a single tax rate by ID
11815
12317
  * Requires Admin mode (apiKey)
@@ -12561,7 +13063,7 @@ declare class BrainerceError extends Error {
12561
13063
  constructor(message: string, statusCode: number, details?: unknown);
12562
13064
  }
12563
13065
 
12564
- declare const SDK_VERSION = "2.0.1";
13066
+ declare const SDK_VERSION = "2.0.3";
12565
13067
 
12566
13068
  /**
12567
13069
  * Verify a webhook signature from Brainerce
@@ -13062,4 +13564,4 @@ interface CategorySitemapOptions {
13062
13564
  */
13063
13565
  declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
13064
13566
 
13065
- export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateTagDto as CreateTagInput, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type CustomApiAuthType, type CustomApiConnectionStatus, type CustomApiCredentials, type CustomApiIntegration, type CustomApiSyncConfig, type CustomApiSyncDirection, type CustomApiTestResult, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type SubmitProductReviewInput, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type TranslatableEntityType, type TranslationStatusEntry, type TranslationsMap, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomApiDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
13567
+ export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AssignTaxClassDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AutoRegionResponse, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundleOfferOfferedProduct, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartItemUnavailableReason, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CheckoutTender, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateRegionDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateStockAlertInput, type CreateTagDto as CreateTagInput, type CreateTaxClassDto, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type CustomizationFieldOption, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GiftCardBalance, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type I18nSettings, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyBadge, type LoyaltyMembershipPlan, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyRewardRecommendation, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type NestedModifierSelection, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthErrorCode, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type PaidMembershipInfo, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublicRegion, type PublicRegionDetail, type PublicRegionPaymentProvider, type PublicTaxClass, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type Region, type RegionPaymentProvider, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SavedPaymentMethodSummary, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAlertResponse, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreCapabilities, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type StorefrontSavedPaymentMethod, type SubmitProductReviewInput, type SubscribeMarketingInput, type SubscribeMarketingResponse, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxClass, type TaxEstimateResponse, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type TranslatableEntityType, type TranslationStatusEntry, type TranslationsMap, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateRegionDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxClassDto, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsellSettings, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };