brainerce 2.0.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts 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) */
@@ -1885,6 +2010,31 @@ interface Order {
1885
2010
  * order reads `"paid"` with no provider behind it.
1886
2011
  */
1887
2012
  financialStatus?: string | null;
2013
+ /**
2014
+ * Gift cards that settled part of this order.
2015
+ *
2016
+ * `total` is what the order was WORTH; these are what actually paid for it.
2017
+ * A receipt showing only the total tells a customer they handed over money
2018
+ * they did not — so render each tender as its own line and, when there is at
2019
+ * least one, an "amount charged" figure of `total` minus their sum.
2020
+ *
2021
+ * Empty or absent on an order paid entirely by card or cash. Snapshotted at
2022
+ * order creation, so this is a historical record: it does not change if the
2023
+ * gift card is later adjusted, disabled or re-issued.
2024
+ */
2025
+ tenders?: Array<{
2026
+ id: string;
2027
+ /** `GIFT_CARD` today. The field exists so a second internal tender type does not break callers. */
2028
+ type: string;
2029
+ /** What this tender paid, in `currencyBase`. Decimal string. */
2030
+ amountBase: string;
2031
+ currencyBase: string;
2032
+ /** Last four of the code. The full code is stored as an HMAC and cannot be returned. */
2033
+ giftCard?: {
2034
+ id: string;
2035
+ codeLast4: string;
2036
+ } | null;
2037
+ }>;
1888
2038
  /** Fulfillment status: "unfulfilled", "partial", "fulfilled". */
1889
2039
  fulfillmentStatus?: string | null;
1890
2040
  /** Tracking number, e.g., "1Z999AA10123456784". */
@@ -2055,7 +2205,10 @@ interface OrderQueryParams {
2055
2205
  * not model. Cast if you need to filter by a label id.
2056
2206
  */
2057
2207
  status?: OrderStatus;
2058
- sortBy?: 'createdAt' | 'totalAmount';
2208
+ /** Mirrors `VALID_ORDER_SORT` (orders.service.ts:674), the allowlist that
2209
+ * actually gates this — the v1 route takes `sortBy` as a bare string with no
2210
+ * `@IsEnum`, so the service set is the contract. */
2211
+ sortBy?: 'createdAt' | 'totalAmount' | 'status';
2059
2212
  sortOrder?: 'asc' | 'desc';
2060
2213
  }
2061
2214
  interface CreateOrderDto {
@@ -2174,7 +2327,12 @@ interface CouponQueryParams {
2174
2327
  status?: CouponStatus;
2175
2328
  type?: CouponType;
2176
2329
  platform?: ConnectorPlatform;
2177
- sortBy?: 'code' | 'createdAt' | 'updatedAt' | 'value';
2330
+ /**
2331
+ * Mirrors the `@IsIn` on `coupon-query.dto.ts:44` exactly. It previously
2332
+ * offered `'value'`, which the API rejects with a 400, and omitted three
2333
+ * members it accepts.
2334
+ */
2335
+ sortBy?: 'code' | 'createdAt' | 'updatedAt' | 'startsAt' | 'endsAt' | 'usageCount';
2178
2336
  sortOrder?: 'asc' | 'desc';
2179
2337
  }
2180
2338
  interface CreateCouponDto {
@@ -2582,6 +2740,47 @@ interface OAuthCallbackResponse extends CustomerAuthResponse {
2582
2740
  provider: CustomerOAuthProvider;
2583
2741
  redirectUrl?: string;
2584
2742
  }
2743
+ /**
2744
+ * Values the `?oauth_error=` query param can take when a social sign-in fails.
2745
+ *
2746
+ * The post-OAuth redirect follows the RFC 6749 §4.1.2.1 shape: a stable
2747
+ * machine-readable code in `oauth_error`, plus an English `error_description`
2748
+ * meant for developers. Switch on the code to render localized copy — the
2749
+ * description is not shopper-facing copy and its wording may change.
2750
+ *
2751
+ * The list is open: the provider's own codes (`access_denied`,
2752
+ * `temporarily_unavailable`, `admin_policy_enforced`, ...) are passed through,
2753
+ * so always handle the unknown case.
2754
+ */
2755
+ type OAuthErrorCode =
2756
+ /** Callback arrived without a usable `code`/`state` pair. */
2757
+ 'invalid_request'
2758
+ /** `state` matches no outstanding authorization request. */
2759
+ | 'invalid_state'
2760
+ /** `state` was already consumed — a replay or a double-submitted callback. */
2761
+ | 'state_already_used'
2762
+ /** `state` sat unused past its 10-minute TTL. Ask the shopper to retry. */
2763
+ | 'state_expired'
2764
+ /** Provider is recognised but not implemented yet. */
2765
+ | 'provider_unsupported'
2766
+ /** Provider reported a failure we could not map onto a safe code. */
2767
+ | 'provider_error'
2768
+ /** Shopper declined consent at the provider. */
2769
+ | 'access_denied'
2770
+ /** The store has this provider turned off. Hide the button. */
2771
+ | 'provider_disabled'
2772
+ /** This customer already has a different account linked for this provider. */
2773
+ | 'provider_already_linked'
2774
+ /** This provider account is already linked to a different customer. */
2775
+ | 'oauth_account_linked_to_another_customer'
2776
+ /**
2777
+ * An account with this email has an unverified password credential, and the
2778
+ * provider would not attest ownership of the address either. Send the shopper
2779
+ * to email verification, not to a retry.
2780
+ */
2781
+ | 'link_blocked_unverified_password_account'
2782
+ /** Unexpected server-side failure. Details are in the platform logs, not here. */
2783
+ | 'server_error' | (string & {});
2585
2784
  interface OAuthConnection {
2586
2785
  id: string;
2587
2786
  provider: CustomerOAuthProvider;
@@ -2900,7 +3099,7 @@ interface AddToCartDto {
2900
3099
  * a picked modifier carries `referencedProductId` and that referenced product
2901
3100
  * itself has modifier groups. Server enforces depth ≤ 3.
2902
3101
  */
2903
- nestedByModifierId?: Record<string, ModifierSelection[]>;
3102
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
2904
3103
  /**
2905
3104
  * Optional product info for local cart (guest mode).
2906
3105
  * If provided, SDK uses this directly without fetching from API.
@@ -2922,7 +3121,7 @@ interface UpdateCartItemDto {
2922
3121
  */
2923
3122
  selections?: ModifierSelection[];
2924
3123
  /** Nested-combo selections (see `AddToCartDto.nestedByModifierId`). */
2925
- nestedByModifierId?: Record<string, ModifierSelection[]>;
3124
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
2926
3125
  }
2927
3126
  interface ApplyCouponDto {
2928
3127
  code: string;
@@ -3126,7 +3325,15 @@ type DeliveryType = 'shipping' | 'pickup';
3126
3325
  * ```
3127
3326
  */
3128
3327
  interface TaxBreakdownItem {
3129
- /** Tax name (e.g., "Israel VAT 18%", "California Sales Tax") */
3328
+ /**
3329
+ * Tax name (e.g. "Israel VAT 18%", "California Sales Tax", "GST", "QST").
3330
+ *
3331
+ * `breakdown` carries ONE ROW PER RATE and has always been able to hold
3332
+ * several. In Canada it routinely does: a Quebec order has a "GST" row and a
3333
+ * "QST" row, a British Columbia order has "GST" and "PST". Render every row —
3334
+ * a GST/QST-registered merchant is required to itemise them, and collapsing
3335
+ * them into one "Tax" line loses information the buyer's own accountant needs.
3336
+ */
3130
3337
  name: string;
3131
3338
  /** Tax rate as decimal (0.17 = 17%) */
3132
3339
  rate: number;
@@ -3141,15 +3348,19 @@ interface TaxBreakdownItem {
3141
3348
  * Tax calculation result with itemized breakdown.
3142
3349
  * Included in checkout response after shipping address is set.
3143
3350
  *
3351
+ * `breakdown` can hold SEVERAL rows and often does — a Quebec address is taxed
3352
+ * GST 5% + QST 9.975%, a British Columbia one GST 5% + PST 7%. Loop it rather
3353
+ * than reading `breakdown[0]`.
3354
+ *
3144
3355
  * @example
3145
3356
  * ```typescript
3146
3357
  * // Check if tax applies
3147
3358
  * if (checkout.taxBreakdown && checkout.taxBreakdown.totalTax > 0) {
3148
3359
  * console.log(`Tax: $${checkout.taxBreakdown.totalTax.toFixed(2)}`);
3149
3360
  *
3150
- * // Show breakdown
3361
+ * // Show EVERY row — Quebec prints two: GST then QST.
3151
3362
  * checkout.taxBreakdown.breakdown.forEach(tax => {
3152
- * const percent = (tax.rate * 100).toFixed(2);
3363
+ * const percent = (tax.rate * 100).toFixed(3);
3153
3364
  * console.log(` ${tax.name} (${percent}%): $${tax.amount.toFixed(2)}`);
3154
3365
  * });
3155
3366
  * }
@@ -3479,6 +3690,239 @@ interface SelectPickupLocationDto {
3479
3690
  * @see CheckoutLineItem for item structure
3480
3691
  * @see ShippingRate for shipping rate structure
3481
3692
  */
3693
+ /**
3694
+ * A gift card applied to a checkout.
3695
+ *
3696
+ * Returned by `applyGiftCard`. Note what is NOT here: the code, the card id, or
3697
+ * anything about who owns it. A storefront needs the tender id (to remove it),
3698
+ * how much went on, and what the provider will now be charged.
3699
+ */
3700
+ /**
3701
+ * A gift card as the admin API returns it.
3702
+ *
3703
+ * The full code is NOT here and never will be: only an HMAC of it is stored, so
3704
+ * there is nothing to return. `maskedCode` and `codeLast4` are the whole of what
3705
+ * can be shown after issuance.
3706
+ */
3707
+ interface GiftCardAdmin {
3708
+ id: string;
3709
+ /** `••••-••••-••••-••••-V2D3`. */
3710
+ maskedCode: string;
3711
+ codeLast4: string;
3712
+ /** Decimal strings, all of them. These are balances; never parse them to float for arithmetic. */
3713
+ initialAmount: string;
3714
+ /** Settled value on the card. */
3715
+ balance: string;
3716
+ /** Reserved by a checkout in progress and not available to spend. */
3717
+ heldAmount: string;
3718
+ /** `balance - heldAmount` — what a shopper could actually use right now. */
3719
+ spendable: string;
3720
+ currency: string;
3721
+ status: 'ACTIVE' | 'DISABLED' | 'REVOKED';
3722
+ customerId: string | null;
3723
+ recipientEmail: string | null;
3724
+ expiresAt: string | null;
3725
+ /** Stamped if an expiry was ever processed. The balance is deliberately NOT zeroed. */
3726
+ expiredAt: string | null;
3727
+ /** Derived at read time, so it is true the moment validity lapses. */
3728
+ expired: boolean;
3729
+ createdAt: string;
3730
+ }
3731
+ /** One movement of value. The ledger is append-only — nothing here is ever rewritten. */
3732
+ interface GiftCardTransaction {
3733
+ id: string;
3734
+ type: 'ISSUE' | 'REDEEM' | 'REFUND' | 'ADJUST' | 'EXPIRE';
3735
+ /** Signed decimal string. Negative debits the card. */
3736
+ amount: string;
3737
+ balanceAfter: string;
3738
+ orderId: string | null;
3739
+ actorUserId: string | null;
3740
+ note: string | null;
3741
+ createdAt: string;
3742
+ }
3743
+ /** A card with its full history. */
3744
+ interface GiftCardAdminDetail extends GiftCardAdmin {
3745
+ recipientName: string | null;
3746
+ orderId: string | null;
3747
+ transactions: GiftCardTransaction[];
3748
+ }
3749
+ /**
3750
+ * Outstanding liability for a store — the figure reconciled at month-end close.
3751
+ *
3752
+ * Reported PER CURRENCY. Balances in different currencies do not add up, so the
3753
+ * top-level figures cover one currency and `byCurrency` carries the rest.
3754
+ * Expired value is separate and is NOT written off: whether expiry extinguishes
3755
+ * the obligation is an open legal question, so it is never folded into either
3756
+ * side.
3757
+ */
3758
+ interface GiftCardLiability {
3759
+ active: string;
3760
+ held: string;
3761
+ expiredNotWrittenOff: string;
3762
+ currency: string | null;
3763
+ byCurrency: Array<{
3764
+ currency: string;
3765
+ active: string;
3766
+ held: string;
3767
+ expiredNotWrittenOff: string;
3768
+ }>;
3769
+ /** Whether the store may issue at all. Redemption is NOT gated on this. */
3770
+ enabled: boolean;
3771
+ }
3772
+ /**
3773
+ * The response to issuing or re-issuing.
3774
+ *
3775
+ * ⚠️ `plaintextCode` is returned EXACTLY ONCE. Persist it from this response or
3776
+ * deliver it now — it is stored only as an HMAC and no API, dashboard or
3777
+ * database query can produce it again.
3778
+ */
3779
+ interface IssuedGiftCardAdmin {
3780
+ giftCardId: string;
3781
+ plaintextCode: string;
3782
+ last4: string;
3783
+ }
3784
+ /** Re-issue also reports what moved across from the card it revoked. */
3785
+ interface ReissuedGiftCardAdmin extends IssuedGiftCardAdmin {
3786
+ movedAmount: string;
3787
+ /** Where the replacement was emailed, or null if the merchant must hand it over. */
3788
+ deliveredTo: string | null;
3789
+ }
3790
+ interface IssueGiftCardAdminDto {
3791
+ /** Decimal string, e.g. "200.00". Must be greater than zero. */
3792
+ amount: string;
3793
+ /** REQUIRED. Written to the ledger — issuing value with no stated reason is not auditable. */
3794
+ note: string;
3795
+ customerId?: string;
3796
+ /** ISO 8601. Must be in the future. Omit for a card that never expires. */
3797
+ expiresAt?: string;
3798
+ recipientEmail?: string;
3799
+ recipientName?: string;
3800
+ personalMessage?: string;
3801
+ }
3802
+ interface CheckoutTender {
3803
+ /** Pass this to `removeGiftCard` — a checkout can carry more than one card. */
3804
+ tenderId: string;
3805
+ /**
3806
+ * How much of the card was applied. Capped at what the order still owes, so a
3807
+ * ₪200 card on a ₪50 order applies ₪50 and leaves ₪150 for next time.
3808
+ */
3809
+ amountApplied: string;
3810
+ /**
3811
+ * What the payment provider will be charged.
3812
+ *
3813
+ * The order `total` is deliberately UNCHANGED. A gift card is a tender, not a
3814
+ * discount: the order is still worth what it is worth and tax is still
3815
+ * calculated on that, which is why this is a separate field and not a
3816
+ * reduction of `discountAmount`.
3817
+ */
3818
+ providerAmountDue: string;
3819
+ }
3820
+ /**
3821
+ * The answer from `checkGiftCardBalance`.
3822
+ *
3823
+ * Identical for an unknown code, a disabled card and an expired one. That is on
3824
+ * purpose — see the method's own documentation.
3825
+ */
3826
+ interface GiftCardBalance {
3827
+ /** Spendable balance, or '0.00' when the card cannot be used. */
3828
+ balance: string;
3829
+ currency: string;
3830
+ /** Whether this code can be applied to a checkout right now. */
3831
+ usable: boolean;
3832
+ }
3833
+ /**
3834
+ * A tribute gift.
3835
+ *
3836
+ * `IN_HONOR` for someone living, `IN_MEMORY` for someone who has died. Setting
3837
+ * either requires `tributeName`; the API rejects a tribute with nobody named.
3838
+ */
3839
+ type DonationTributeType = 'IN_HONOR' | 'IN_MEMORY';
3840
+ /**
3841
+ * `PENDING` means an intent exists and no money has moved. A donation is only a
3842
+ * gift once it is `PAID`, which happens when the provider's webhook confirms
3843
+ * it — never when `createDonation` returns.
3844
+ *
3845
+ * There is no `REFUNDED` member on purpose: a refund is recorded against the
3846
+ * payment, not the donation, so one fact lives in one place.
3847
+ */
3848
+ type DonationStatus = 'PENDING' | 'PAID' | 'FAILED' | 'CANCELLED';
3849
+ /** What `createDonation` accepts. */
3850
+ interface CreateDonationInput {
3851
+ /**
3852
+ * The gift itself, in the store's base currency. EXCLUDES `feeCoverAmount` —
3853
+ * this is the figure the donor is credited with.
3854
+ */
3855
+ amount: number;
3856
+ /**
3857
+ * Processing fee the donor volunteered to absorb. Charged on TOP of `amount`,
3858
+ * never subtracted from it. Roughly 55-60% of donors accept this when a form
3859
+ * offers it, so it is worth offering.
3860
+ */
3861
+ feeCoverAmount?: number;
3862
+ /** Required. Also how the donor's giving history is found later. */
3863
+ donorEmail: string;
3864
+ donorName?: string;
3865
+ /**
3866
+ * Hides the donor's name on public surfaces (a donor wall, a thank-you page).
3867
+ * It does NOT hide them from the organisation, which still needs the donor
3868
+ * for its own records.
3869
+ */
3870
+ isAnonymous?: boolean;
3871
+ /** Requires `tributeName` when set. */
3872
+ tributeType?: DonationTributeType;
3873
+ tributeName?: string;
3874
+ /** The donor's own words. Plain text — never render it as HTML. */
3875
+ message?: string;
3876
+ /**
3877
+ * Where to land the donor after paying, as a PATH on your own storefront
3878
+ * (e.g. `/thank-you`). A full URL is rejected: the payment provider redirects
3879
+ * a real browser here, so accepting one would be an open redirect.
3880
+ */
3881
+ returnPath?: string;
3882
+ }
3883
+ /**
3884
+ * What `createDonation` returns.
3885
+ *
3886
+ * ⛔ This is NOT a paid donation. `status` is `PENDING` and the money has not
3887
+ * moved: you have a provider intent to complete, exactly as you would after
3888
+ * `createPaymentIntent` on a checkout. Credit the gift only after the donation
3889
+ * reads back as `PAID`.
3890
+ */
3891
+ interface DonationIntent {
3892
+ donationId: string;
3893
+ status: DonationStatus;
3894
+ /** The gift, excluding any covered fee. */
3895
+ amount: string;
3896
+ feeCoverAmount: string;
3897
+ /** What the provider is actually charging: `amount` + `feeCoverAmount`. */
3898
+ chargeAmount: string;
3899
+ currency: string;
3900
+ payment: {
3901
+ intentId: string;
3902
+ clientSecret?: string | null;
3903
+ clientSdk?: unknown;
3904
+ redirectUrl?: string | null;
3905
+ providerType: string | null;
3906
+ };
3907
+ }
3908
+ /**
3909
+ * A donation read back for a thank-you page.
3910
+ *
3911
+ * Deliberately narrow. There is no failure reason (a decline message tells a
3912
+ * card tester which card is live) and `donorName` is `null` whenever the gift
3913
+ * was marked anonymous.
3914
+ */
3915
+ interface PublicDonation {
3916
+ id: string;
3917
+ status: DonationStatus;
3918
+ amount: string;
3919
+ feeCoverAmount: string;
3920
+ currency: string;
3921
+ donorName: string | null;
3922
+ tributeType: DonationTributeType | null;
3923
+ tributeName: string | null;
3924
+ paidAt: string | null;
3925
+ }
3482
3926
  interface Checkout {
3483
3927
  /** Unique checkout identifier */
3484
3928
  id: string;
@@ -3542,6 +3986,30 @@ interface Checkout {
3542
3986
  customFieldValues?: Record<string, unknown> | null;
3543
3987
  /** Applied coupon code */
3544
3988
  couponCode?: string | null;
3989
+ /**
3990
+ * Gift cards held against this checkout, oldest first.
3991
+ *
3992
+ * Read these to render applied cards after a page reload — a checkout keeps
3993
+ * its holds server-side, so a storefront that only tracks the response from
3994
+ * `applyGiftCard` loses them on refresh and shows a shopper a card they no
3995
+ * longer appear to have.
3996
+ *
3997
+ * Remove one with its `tenderId`, never the code.
3998
+ */
3999
+ tenders?: Array<{
4000
+ tenderId: string;
4001
+ amountApplied: string;
4002
+ }>;
4003
+ /**
4004
+ * What the payment provider will be charged: `total` minus every gift card
4005
+ * applied.
4006
+ *
4007
+ * `total` is deliberately UNCHANGED by a gift card. A gift card is a means of
4008
+ * payment, not a discount — the order is still worth what it is worth and tax
4009
+ * is still calculated on that. Show this as its own line beside the total
4010
+ * ("Gift card −₪54.50"), never folded into `discountAmount`.
4011
+ */
4012
+ providerAmountDue?: string;
3545
4013
  /**
3546
4014
  * Order-level note from the shopper (set via setCheckoutCustomer).
3547
4015
  * Copied onto the order at completion and shown to the merchant.
@@ -3886,7 +4354,7 @@ interface WebhookEvent {
3886
4354
  data: unknown;
3887
4355
  timestamp: string;
3888
4356
  }
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';
4357
+ 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
4358
  type VariantStatus = 'active' | 'draft';
3891
4359
  interface CreateVariantDto {
3892
4360
  sku?: string;
@@ -4259,63 +4727,6 @@ interface PublishProductResponse {
4259
4727
  error?: string;
4260
4728
  }>;
4261
4729
  }
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
4730
  /**
4320
4731
  * Client-side SDK configuration for payment providers that render a widget.
4321
4732
  * Returned by the backend in provider config and payment intents.
@@ -5059,7 +5470,33 @@ interface ShippingRateConfig {
5059
5470
  createdAt: string;
5060
5471
  updatedAt: string;
5061
5472
  }
5062
- type ShippingRateType = 'FLAT' | 'FREE' | 'WEIGHT_BASED' | 'PRICE_BASED' | 'QUANTITY_BASED';
5473
+ /**
5474
+ * How a shipping rate computes its price.
5475
+ *
5476
+ * Mirrors the `ShippingRateType` enum the API validates against with
5477
+ * `@IsEnum`; a value outside this set is rejected with 400.
5478
+ *
5479
+ * ⛔ This list was wrong until SDK 2.0.3 and the two corrections bite in
5480
+ * opposite directions, so read both before pinning an older version:
5481
+ *
5482
+ * - It declared `'FLAT'`, which the API has never accepted — the member is
5483
+ * `'FLAT_RATE'`. Flat rate is the commonest rate there is, and no server-side
5484
+ * normaliser exists, so every `createShippingRate` written against the old
5485
+ * type failed with 400 no matter how correct it looked.
5486
+ * - It omitted `'LOCAL_PICKUP'` entirely, which is the only way to express
5487
+ * click-and-collect, and invented `'QUANTITY_BASED'`, which does not exist.
5488
+ */
5489
+ type ShippingRateType =
5490
+ /** One price for the whole order, in `rateConfig.amount`. */
5491
+ 'FLAT_RATE'
5492
+ /** No charge. Pair with `minOrderAmount` for "free over X". */
5493
+ | 'FREE'
5494
+ /** Priced from total cart weight. */
5495
+ | 'WEIGHT_BASED'
5496
+ /** Priced from order value. */
5497
+ | 'PRICE_BASED'
5498
+ /** Collection in person — nothing ships, so no address is required. */
5499
+ | 'LOCAL_PICKUP';
5063
5500
  interface CreateShippingZoneDto {
5064
5501
  name: string;
5065
5502
  countries: string[];
@@ -5230,6 +5667,21 @@ interface TaxRate {
5230
5667
  isCompound: boolean;
5231
5668
  /** Whether tax is included in prices */
5232
5669
  isInclusive: boolean;
5670
+ /**
5671
+ * Charge this rate TOGETHER WITH the other stackable rates matching the same
5672
+ * address, instead of only the most specific one.
5673
+ *
5674
+ * `false` (the default, and every rate created before this field existed) is
5675
+ * the historic rule: the most specific match wins alone and the rest are
5676
+ * discarded. `true` opts into summation — Canada's GST 5% (country row) plus
5677
+ * a province's PST/QST, both charged on the same pre-tax base, producing two
5678
+ * `TaxBreakdownItem` rows.
5679
+ *
5680
+ * Additive, never compound — see the deprecated {@link TaxRate.isCompound}.
5681
+ * Stacking also never crosses a tax class: a class-specific rate REPLACES the
5682
+ * Standard rates rather than adding to them.
5683
+ */
5684
+ stackable: boolean;
5233
5685
  priority: number;
5234
5686
  isActive: boolean;
5235
5687
  /** Countries where this tax rate applies as exception */
@@ -5254,6 +5706,12 @@ interface CreateTaxRateDto {
5254
5706
  */
5255
5707
  isCompound?: boolean;
5256
5708
  isInclusive?: boolean;
5709
+ /**
5710
+ * Charge this rate together with the other stackable rates matching the same
5711
+ * address (Canada GST + PST/QST) rather than only the most specific one.
5712
+ * Defaults to `false`, which keeps the most-specific-wins rule.
5713
+ */
5714
+ stackable?: boolean;
5257
5715
  /** Tax class this rate applies to. Omit/null = Standard. */
5258
5716
  taxClassId?: string;
5259
5717
  priority?: number;
@@ -5275,6 +5733,12 @@ interface UpdateTaxRateDto {
5275
5733
  */
5276
5734
  isCompound?: boolean;
5277
5735
  isInclusive?: boolean;
5736
+ /**
5737
+ * Charge this rate together with the other stackable rates matching the same
5738
+ * address. Flipping an existing rate to `true` changes what future checkouts
5739
+ * collect: rates that used to be mutually exclusive start being summed.
5740
+ */
5741
+ stackable?: boolean;
5278
5742
  priority?: number;
5279
5743
  isActive?: boolean;
5280
5744
  exceptionCountries?: string[];
@@ -5421,9 +5885,27 @@ interface UpsertRegionPricesResult {
5421
5885
  }
5422
5886
  interface TaxEstimateResponse {
5423
5887
  appliesTax: boolean;
5424
- /** Percent — e.g. 18 for 18%. `null` when no matching rule. */
5888
+ /**
5889
+ * Percent — e.g. 18 for 18%. In a stacked jurisdiction this is the SUMMED
5890
+ * effective rate of every rate in `rates`. `null` when no matching rule.
5891
+ */
5425
5892
  rate: number | null;
5893
+ /** One rate's name, or several joined with `" + "` ("GST + QST"). */
5426
5894
  rateName: string | null;
5895
+ /**
5896
+ * One entry per rate behind the estimate. Amounts are 2dp and sum exactly to
5897
+ * `estimatedTax`.
5898
+ *
5899
+ * A preview has no province, so a Canadian estimate shows the federal GST
5900
+ * alone; the provincial PST/QST joins it at checkout once the buyer gives a
5901
+ * shipping address. That is precisely what `note` is for — render it.
5902
+ */
5903
+ rates: Array<{
5904
+ rateId: string;
5905
+ name: string;
5906
+ rate: number;
5907
+ amount: number;
5908
+ }>;
5427
5909
  /** Tax portion of `subtotal` at the store's `pricesIncludeTax` mode. */
5428
5910
  estimatedTax: number;
5429
5911
  pricesIncludeTax: boolean;
@@ -5870,8 +6352,15 @@ interface UpdateMemberRoleDto {
5870
6352
  }
5871
6353
  /** Store-level team member role */
5872
6354
  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';
6355
+ /**
6356
+ * Granular store permission.
6357
+ *
6358
+ * Mirrors the `StorePermission` enum in the platform database exactly — the
6359
+ * team endpoints return and accept every member below. Keep in sync with
6360
+ * `packages/database/prisma/schema.prisma`; a value missing here is a value
6361
+ * `getMyStorePermissions()` can return that will not type-check for callers.
6362
+ */
6363
+ 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
6364
  /** Store team member info */
5876
6365
  interface StoreMember {
5877
6366
  id: string;
@@ -5981,7 +6470,22 @@ interface UserStorePermissions {
5981
6470
  permissions: StorePermission[];
5982
6471
  }
5983
6472
  /** Email event types */
5984
- type EmailEventType = 'ORDER_CONFIRMATION' | 'ORDER_SHIPPED' | 'ORDER_CANCELLED' | 'NEW_CUSTOMER' | 'LOW_STOCK_ALERT' | 'CART_ABANDONED' | 'TEAM_INVITATION';
6473
+ /**
6474
+ * The transactional emails a merchant can template and configure.
6475
+ *
6476
+ * Mirrors the `EmailEventType` enum in `create-email-template.dto.ts`, which is
6477
+ * what `@IsEnum` actually validates `eventType` against — a value missing here
6478
+ * is a template the API accepts and this SDK refuses to type.
6479
+ *
6480
+ * That DTO enum is deliberately a SUBSET of the platform's `EmailEventType`:
6481
+ * the wider database enum also carries billing, plan-limit, ops and
6482
+ * platform-notice mails (`PLAN_*`, `PAYMENT_*`, `OPS_ALERT`, `SDK_UPDATE`,
6483
+ * `TEST_SEND`, `SUPPORT_MESSAGE`, the ownership-transfer pair, ...). Those are
6484
+ * sent by the platform on its own behalf and are not a merchant's to rewrite,
6485
+ * so they are correctly absent. Do not "complete" this list against
6486
+ * `schema.prisma`.
6487
+ */
6488
+ 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
6489
  /** Email event settings */
5986
6490
  interface EmailEventSettings {
5987
6491
  enabled: boolean;
@@ -6559,6 +7063,13 @@ interface CreateInquiryInput {
6559
7063
  locale?: string;
6560
7064
  /** Provenance metadata (referrer, UTM, origin page, etc.). */
6561
7065
  sourceMetadata?: Record<string, unknown>;
7066
+ /**
7067
+ * Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
7068
+ * non-empty value rejects the request. Bots fill every text input.
7069
+ * The API validates this field, but the type omitted it, so a typed caller
7070
+ * could not reach the check at all.
7071
+ */
7072
+ honeypot?: string;
6562
7073
  customerId?: string;
6563
7074
  metadata?: Record<string, unknown>;
6564
7075
  }
@@ -6946,6 +7457,29 @@ interface ModifierSelection {
6946
7457
  modifierGroupId: string;
6947
7458
  modifierIds: string[];
6948
7459
  }
7460
+ /**
7461
+ * One nested-combo node: the product a picked modifier references, plus that
7462
+ * product's own modifier selections, recursing while depth stays ≤ 3.
7463
+ *
7464
+ * Mirrors the backend `NestedSelectionDto`
7465
+ * (`apps/backend/src/modules/cart/dto/add-to-cart.dto.ts`), where `productId`
7466
+ * is REQUIRED. The field used to be typed `Record<string, ModifierSelection[]>`,
7467
+ * which no valid payload could satisfy — a `ModifierSelection` carries no
7468
+ * `productId`, so a caller following the type sent a body the server rejects.
7469
+ * The backend guards the field with `@IsObject()` rather than `@ValidateNested`,
7470
+ * so the shape is enforced downstream in `ModifierGroupsService`, not by the
7471
+ * validator, and the mismatch surfaced as a pricing failure rather than a 400.
7472
+ */
7473
+ interface NestedModifierSelection {
7474
+ /** The nested product referenced by the parent modifier's `referencedProductId`. */
7475
+ productId: string;
7476
+ /** Variant of the nested product, when it has variants. */
7477
+ variantId?: string;
7478
+ /** The nested product's own modifier-group selections. */
7479
+ selections: ModifierSelection[];
7480
+ /** Deeper nesting, keyed by the parent modifier's id. Server enforces depth ≤ 3. */
7481
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
7482
+ }
6949
7483
  /**
6950
7484
  * Per-line modifier breakdown surfaced on `CartItem` and `OrderItem`
6951
7485
  * once the cart line includes selections.
@@ -7440,6 +7974,40 @@ declare class BrainerceClient {
7440
7974
  * `'ltr'` for everything else (including unknown locales).
7441
7975
  */
7442
7976
  getStoreDirection(locale?: string | null): 'ltr' | 'rtl';
7977
+ /**
7978
+ * Get what the merchant actually configured on this sales channel: store
7979
+ * identity and multi-language setup, the channel's own settings (low-stock
7980
+ * warning and threshold, reservation strategy and timeout, birthday and
7981
+ * email-verification requirements, granted scopes) and which optional
7982
+ * features are switched on (payment providers, social login, coupons,
7983
+ * discount rules, shipping zones, downloadables, content, loyalty).
7984
+ *
7985
+ * Read this instead of hardcoding. A storefront with a hardcoded low-stock
7986
+ * threshold shows the wrong badge on every store whose merchant chose a
7987
+ * different one, and a storefront that renders a feature nobody enabled
7988
+ * ships a control that silently does nothing.
7989
+ *
7990
+ * Only available in vibe-coded mode (`salesChannelId`). The payload belongs
7991
+ * to one sales channel: `storeId` mode has no channel to read it from, and
7992
+ * an `apiKey` addresses the store rather than any single channel.
7993
+ *
7994
+ * Call it once for the whole app and share the result. It is per channel,
7995
+ * not per product, so fetching it on every page is wasted work.
7996
+ *
7997
+ * @example
7998
+ * ```typescript
7999
+ * const caps = await client.getStoreCapabilities();
8000
+ *
8001
+ * // Low stock: honour the switch before the number.
8002
+ * const threshold = caps.connection.lowStockWarning
8003
+ * ? caps.connection.lowStockThreshold
8004
+ * : 0;
8005
+ *
8006
+ * if (caps.features.hasCoupons) renderCouponInput();
8007
+ * if (caps.store.i18n?.enabled) renderLocaleSwitcher(caps.store.i18n.supportedLocales);
8008
+ * ```
8009
+ */
8010
+ getStoreCapabilities(): Promise<StoreCapabilities>;
7443
8011
  /**
7444
8012
  * Send a storefront analytics beacon (pageview or engagement).
7445
8013
  *
@@ -8544,14 +9112,20 @@ declare class BrainerceClient {
8544
9112
  */
8545
9113
  publishCoupon(couponId: string, platforms: ConnectorPlatform[]): Promise<SyncJob>;
8546
9114
  /**
8547
- * Get platform capabilities for coupon features.
8548
- * Use this to understand what features each platform supports.
9115
+ * Get platform capabilities for coupon features, keyed by platform.
9116
+ *
9117
+ * ⛔ **Returns an empty object today.** Platform coupon capabilities moved
9118
+ * into the standalone connector apps and are not re-exposed here yet, so the
9119
+ * endpoint answers `{}` for every store. Treat a missing key as "unknown",
9120
+ * never as "the platform lacks the feature", and do not index into a platform
9121
+ * key without checking it exists first — there are none to find.
8549
9122
  *
8550
9123
  * @example
8551
9124
  * ```typescript
8552
9125
  * const capabilities = await client.getCouponPlatformCapabilities();
8553
- * if (!capabilities.SHOPIFY.supportsProductExclusions) {
8554
- * console.log('Shopify does not support product exclusions');
9126
+ * const meta = capabilities['GOOGLE'];
9127
+ * if (meta && !meta.supportsProducts) {
9128
+ * console.log('This platform cannot target individual products');
8555
9129
  * }
8556
9130
  * ```
8557
9131
  */
@@ -9143,7 +9717,7 @@ declare class BrainerceClient {
9143
9717
  * Works in all three SDK modes (vibe-coded, storefront, admin):
9144
9718
  * - **Public reads** (`get`, `list`, `getBySlug`): work in any mode.
9145
9719
  * - **Write operations** (`create`, `update`, `publish`, `unpublish`,
9146
- * `remove`): admin mode only — they call `/api/v1/content/...` with
9720
+ * `remove`): admin mode only — they call `/api/content/...` with
9147
9721
  * the API key. Calling from storefront / vibe-coded mode throws.
9148
9722
  *
9149
9723
  * **Default key:** every type has `'main'` as its universal default key.
@@ -9925,7 +10499,7 @@ declare class BrainerceClient {
9925
10499
  /** Modifier-group selections (PRD §7.3 / §8.4). */
9926
10500
  selections?: ModifierSelection[];
9927
10501
  /** Nested-combo selections keyed by parent modifierId. */
9928
- nestedByModifierId?: Record<string, ModifierSelection[]>;
10502
+ nestedByModifierId?: Record<string, NestedModifierSelection>;
9929
10503
  }): Promise<Cart>;
9930
10504
  /**
9931
10505
  * Smart get cart - returns the current cart (server-side for both guests and logged-in users)
@@ -10082,6 +10656,221 @@ declare class BrainerceClient {
10082
10656
  * ```
10083
10657
  */
10084
10658
  removeCheckoutCoupon(checkoutId: string): Promise<Checkout>;
10659
+ /**
10660
+ * Apply a gift card to a checkout.
10661
+ *
10662
+ * Merchants issue cards from the dashboard, so live codes exist and this field
10663
+ * is worth building. There is still no way for a shopper to BUY a gift card —
10664
+ * no product type, no purchase flow — so every card in circulation was issued
10665
+ * by hand.
10666
+ *
10667
+ * Redemption is deliberately NOT gated on the store's gift-card switch: a
10668
+ * store that turned the feature off still owes every card already in a
10669
+ * customer's hand, so the field keeps working. Build it unconditionally.
10670
+ *
10671
+ * A gift card is a **means of payment, not a discount**. The order total does
10672
+ * not change and tax stays calculated on the full value; what changes is
10673
+ * `providerAmountDue`, the amount the payment provider will be charged.
10674
+ *
10675
+ * Render it as its own line — "Gift card −₪54.50" beside the total — and NOT
10676
+ * by adding it to `discountAmount`. A shopper who sees stored value folded
10677
+ * into a discount is being shown the wrong thing, and so is their receipt.
10678
+ *
10679
+ * Only as much of the card as the order still owes is applied, so a card
10680
+ * larger than the basket leaves a balance on it for next time, and a smaller
10681
+ * one leaves an amount for the provider to charge.
10682
+ *
10683
+ * @example
10684
+ * const { amountApplied, providerAmountDue, tenderId } =
10685
+ * await client.applyGiftCard('checkout_123', 'A1B2-C3D4-E5F6-G7H8-J9K0');
10686
+ * // total is unchanged; charge the provider providerAmountDue
10687
+ */
10688
+ applyGiftCard(checkoutId: string, code: string): Promise<CheckoutTender>;
10689
+ /**
10690
+ * Remove a previously applied gift card from a checkout.
10691
+ *
10692
+ * Takes the `tenderId` returned by {@link applyGiftCard}, not the code — a
10693
+ * checkout can carry more than one card, and the code is never echoed back.
10694
+ *
10695
+ * The held value goes straight back to the card. Nothing was ever debited
10696
+ * while it was applied, so removing costs the shopper nothing.
10697
+ */
10698
+ removeGiftCard(checkoutId: string, tenderId: string): Promise<{
10699
+ removed: boolean;
10700
+ providerAmountDue: string;
10701
+ }>;
10702
+ /**
10703
+ * Check what is left on a gift card.
10704
+ *
10705
+ * Rate limited, and deliberately uninformative: a code that does not exist,
10706
+ * one that has been disabled and one that has expired all return the SAME
10707
+ * response — `{ balance: '0.00', usable: false }` — and take the same time to
10708
+ * do it. Do not build UI that tries to tell those apart, because the API will
10709
+ * not tell you, by design: a gift-card code is bearer value, and an endpoint
10710
+ * that confirmed which codes were real would be a free way to find them.
10711
+ *
10712
+ * Show "we cannot use this code" and let the shopper re-enter it.
10713
+ */
10714
+ checkGiftCardBalance(code: string): Promise<GiftCardBalance>;
10715
+ /**
10716
+ * List gift cards.
10717
+ *
10718
+ * `search` matches the LAST FOUR of a code or part of a recipient email. It
10719
+ * cannot match a full code: only an HMAC is stored, so there is nothing to
10720
+ * search against.
10721
+ *
10722
+ * Requires `gift_cards:read`.
10723
+ */
10724
+ listGiftCards(params?: {
10725
+ page?: number;
10726
+ limit?: number;
10727
+ /** `all` | `active` | `withBalance` | `expired` | `disabled` */
10728
+ filter?: string;
10729
+ search?: string;
10730
+ }): Promise<PaginatedResponse<GiftCardAdmin>>;
10731
+ /**
10732
+ * Outstanding gift card liability, per currency.
10733
+ *
10734
+ * This is the month-end number. Read `byCurrency` if the store sells in more
10735
+ * than one — currencies are never summed together.
10736
+ *
10737
+ * Requires `gift_cards:read`.
10738
+ */
10739
+ getGiftCardLiability(): Promise<GiftCardLiability>;
10740
+ /**
10741
+ * One gift card with its full ledger.
10742
+ *
10743
+ * Requires `gift_cards:read`.
10744
+ */
10745
+ getGiftCard(giftCardId: string): Promise<GiftCardAdminDetail>;
10746
+ /**
10747
+ * Issue a gift card.
10748
+ *
10749
+ * ⚠️ **The code comes back exactly once.** It is stored only as an HMAC, so
10750
+ * this response is the only time it exists in readable form anywhere. Persist
10751
+ * it or deliver it before you discard the response — no later call, dashboard
10752
+ * screen or database query can recover it.
10753
+ *
10754
+ * A `note` is required. Refused when gift cards are switched off for the
10755
+ * store. Pass an `Idempotency-Key` header to make a retry safe.
10756
+ *
10757
+ * Requires `gift_cards:issue`.
10758
+ *
10759
+ * @example
10760
+ * ```typescript
10761
+ * const card = await client.issueGiftCard({
10762
+ * amount: '200.00',
10763
+ * note: 'Compensation for order #1042',
10764
+ * recipientEmail: 'dana@example.com',
10765
+ * });
10766
+ * await sendToCustomer(card.plaintextCode); // your only chance
10767
+ * ```
10768
+ */
10769
+ issueGiftCard(data: IssueGiftCardAdminDto): Promise<IssuedGiftCardAdmin>;
10770
+ /**
10771
+ * Re-issue a gift card onto a new code.
10772
+ *
10773
+ * The answer to a customer losing their code. Mints a new code, moves the
10774
+ * WHOLE balance to it, and REVOKES the old card.
10775
+ *
10776
+ * **This is not a resend.** The old code stops working the moment this
10777
+ * returns — if the customer still holds a printed card, it dies. Refused
10778
+ * while a checkout holds value on the card. The original expiry carries
10779
+ * forward, so this cannot be used to restart an expiry clock.
10780
+ *
10781
+ * The new code is returned exactly once, under the same rules as issuance.
10782
+ *
10783
+ * Requires `gift_cards:issue`.
10784
+ */
10785
+ reissueGiftCard(giftCardId: string, note: string): Promise<ReissuedGiftCardAdmin>;
10786
+ /**
10787
+ * Adjust a gift card balance.
10788
+ *
10789
+ * `delta` is a SIGNED decimal string: `"25.00"` adds, `"-25.00"` takes away.
10790
+ * The `note` is required and is written to the ledger permanently — it is the
10791
+ * row a finance review reads a year from now.
10792
+ *
10793
+ * A debit cannot take the balance below what live checkout holds have already
10794
+ * reserved; that refusal names the held amount so you can act on it.
10795
+ *
10796
+ * Requires `gift_cards:adjust`.
10797
+ */
10798
+ adjustGiftCardBalance(giftCardId: string, delta: string, note: string): Promise<{
10799
+ balanceAfter: string;
10800
+ }>;
10801
+ /**
10802
+ * Enable, disable or revoke one gift card.
10803
+ *
10804
+ * Deliberately does NOT touch live holds: a checkout that already reserved
10805
+ * value settles normally, because pulling it out from under a shopper
10806
+ * mid-payment would strand a provider charge already in flight. Disabling
10807
+ * stops NEW holds, which is what "off" actually means.
10808
+ *
10809
+ * Requires `gift_cards:write`.
10810
+ */
10811
+ setGiftCardStatus(giftCardId: string, status: 'ACTIVE' | 'DISABLED' | 'REVOKED'): Promise<{
10812
+ success: true;
10813
+ }>;
10814
+ /**
10815
+ * Disable or reactivate many gift cards at once.
10816
+ *
10817
+ * `REVOKED` is not accepted here — it belongs to re-issue, which moves the
10818
+ * balance to a replacement first. Revoking in bulk would strand balances with
10819
+ * nowhere to go. Cards already revoked are skipped, so the returned count is
10820
+ * the honest one and may be lower than the ids you sent.
10821
+ *
10822
+ * There is no bulk delete, here or anywhere: the ledger is append-only and a
10823
+ * card may carry a statutory retention life.
10824
+ *
10825
+ * Requires `gift_cards:write`.
10826
+ */
10827
+ bulkSetGiftCardStatus(giftCardIds: string[], status: 'ACTIVE' | 'DISABLED'): Promise<{
10828
+ updated: number;
10829
+ }>;
10830
+ /**
10831
+ * Start a donation.
10832
+ *
10833
+ * A donation does not go through the cart. There is no line item, no
10834
+ * quantity, no shipping and no order — a donor names an amount and pays it,
10835
+ * which is a different shape of transaction from a purchase. Do not model a
10836
+ * donation as a product; if you already have, the amount is the giveaway:
10837
+ * you cannot let a donor type one.
10838
+ *
10839
+ * ⛔ A successful return is NOT a completed gift. You get back a PENDING
10840
+ * donation and a provider intent to complete, exactly as with a checkout.
10841
+ * The gift is only real once the provider's webhook confirms it, which is
10842
+ * when the donation reads back as `PAID`. Show a thank-you that reflects
10843
+ * that, and never send a receipt off the back of this call.
10844
+ *
10845
+ * Requires donations to be switched on for the store; a store that has not
10846
+ * turned them on is rejected rather than silently accepting money.
10847
+ *
10848
+ * ```ts
10849
+ * const donation = await brainerce.createDonation({
10850
+ * amount: 180,
10851
+ * feeCoverAmount: 6.3, // offered as a checkbox; most donors accept
10852
+ * donorEmail: 'sarah@example.com',
10853
+ * donorName: 'Sarah Cohen',
10854
+ * tributeType: 'IN_MEMORY',
10855
+ * tributeName: 'Avraham Cohen',
10856
+ * returnPath: '/thank-you',
10857
+ * });
10858
+ * // → complete donation.payment with your provider, then poll getDonation()
10859
+ * ```
10860
+ */
10861
+ createDonation(input: CreateDonationInput): Promise<DonationIntent>;
10862
+ /**
10863
+ * Read a donation back — for a thank-you page, and to see whether it is paid.
10864
+ *
10865
+ * Rate limited to 5 requests a minute, because an id that either resolves or
10866
+ * 404s is a way to enumerate them. Poll it a handful of times after the donor
10867
+ * returns from the provider; do not put it behind a 1-second interval.
10868
+ *
10869
+ * The payload is narrow on purpose: no failure reason, and `donorName` comes
10870
+ * back `null` whenever the gift was marked anonymous — so you can render this
10871
+ * straight onto a public page without leaking anything.
10872
+ */
10873
+ getDonation(donationId: string): Promise<PublicDonation>;
10085
10874
  /**
10086
10875
  * Set customer information on checkout
10087
10876
  *
@@ -11178,92 +11967,6 @@ declare class BrainerceClient {
11178
11967
  * Only available in storefront mode
11179
11968
  */
11180
11969
  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
11970
  /**
11268
11971
  * Get product availability including reserved quantities.
11269
11972
  * Use this to show accurate stock to customers when reservations are enabled.
@@ -11674,12 +12377,18 @@ declare class BrainerceClient {
11674
12377
  * ```typescript
11675
12378
  * const rate = await client.createZoneShippingRate('zone_123', {
11676
12379
  * name: 'Standard Shipping',
11677
- * type: 'flat',
11678
- * price: 5.99,
11679
- * minOrderValue: 0,
11680
- * estimatedDays: '3-5',
12380
+ * type: 'FLAT_RATE',
12381
+ * rateConfig: { amount: 5.99 },
12382
+ * minDeliveryDays: 3,
12383
+ * maxDeliveryDays: 5,
11681
12384
  * });
11682
12385
  * ```
12386
+ *
12387
+ * The price lives in `rateConfig`, whose shape follows `type` — `FLAT_RATE`
12388
+ * takes `{ amount }`, `WEIGHT_BASED` and `PRICE_BASED` take tier arrays, and
12389
+ * `FREE` and `LOCAL_PICKUP` take none. Unknown top-level properties are
12390
+ * rejected outright rather than ignored, so a stray `price` or
12391
+ * `estimatedDays` fails the whole call with 400.
11683
12392
  */
11684
12393
  createZoneShippingRate(zoneId: string, data: CreateShippingRateDto): Promise<ShippingRateConfig>;
11685
12394
  /**
@@ -11768,6 +12477,10 @@ declare class BrainerceClient {
11768
12477
  *
11769
12478
  * Returns `appliesTax=false` when tax is disabled, the country is missing,
11770
12479
  * or no active rate covers it.
12480
+ *
12481
+ * The preview has no province, so it only sees country-level rates: a
12482
+ * Canadian estimate shows the federal GST alone and the provincial PST/QST
12483
+ * joins it at checkout. Render `note` so the buyer is not surprised.
11771
12484
  */
11772
12485
  estimateTax(params: {
11773
12486
  country?: string;
@@ -11808,8 +12521,47 @@ declare class BrainerceClient {
11808
12521
  /**
11809
12522
  * Get all tax rates for the store
11810
12523
  * Requires Admin mode (apiKey)
12524
+ *
12525
+ * A jurisdiction can need more than one rate. Canada is the common case: a
12526
+ * country-level `GST` row plus a province-level `PST`/`QST` row, both with
12527
+ * `stackable: true`, which the checkout charges together. Provinces on HST
12528
+ * carry a single combined row with `stackable: false`.
11811
12529
  */
11812
12530
  getTaxRates(): Promise<TaxRate[]>;
12531
+ /**
12532
+ * List the country tax presets available to apply.
12533
+ * Requires Admin mode (apiKey)
12534
+ */
12535
+ getTaxPresets(): Promise<Array<{
12536
+ key: string;
12537
+ country: string;
12538
+ label: string;
12539
+ description: string;
12540
+ rateCount: number;
12541
+ }>>;
12542
+ /**
12543
+ * Apply a country's whole tax table in one call, instead of creating a rate
12544
+ * per province by hand. Requires Admin mode (apiKey).
12545
+ *
12546
+ * `CA` writes ten rates: federal GST 5% country-wide, one combined HST row
12547
+ * each for ON/NB/NL/NS/PE, and PST/RST/QST for BC/SK/MB/QC charged on top of
12548
+ * the GST. Alberta and the territories need no row — the GST covers them.
12549
+ *
12550
+ * Throws 409 when the store already has rates for that country; delete those
12551
+ * first if you meant to replace them. Rates land in the Standard tax class.
12552
+ *
12553
+ * Brainerce does not register the store for GST/HST and does not file returns.
12554
+ *
12555
+ * @example
12556
+ * ```typescript
12557
+ * const { created } = await client.applyTaxPreset('CA'); // created === 10
12558
+ * ```
12559
+ */
12560
+ applyTaxPreset(presetKey: string): Promise<{
12561
+ preset: string;
12562
+ created: number;
12563
+ rates: TaxRate[];
12564
+ }>;
11813
12565
  /**
11814
12566
  * Get a single tax rate by ID
11815
12567
  * Requires Admin mode (apiKey)
@@ -12183,6 +12935,22 @@ declare class BrainerceClient {
12183
12935
  * is dashboard-only (403 for api_key). Keep using this until one ships.
12184
12936
  */
12185
12937
  removeTeamMember(memberId: string): Promise<void>;
12938
+ /**
12939
+ * Every store-level team operation is dashboard-only.
12940
+ *
12941
+ * `store-team.controller.ts:53` carries `DashboardOnlyGuard`, which rejects
12942
+ * `api_key` and `app_installation` principals outright, so no SDK caller can
12943
+ * reach these however the URL is spelled. They additionally pointed at
12944
+ * `/api/v1/stores/:storeId/team*`, and `@Controller('v1')`
12945
+ * (external-api.controller.ts:181) has no `stores` root — so what they
12946
+ * actually returned was a 404, not the 403 you would expect from the guard.
12947
+ *
12948
+ * Throwing beats either status code: a 404 reads as "wrong id" and a 403 as
12949
+ * "missing permission", and both send the caller looking for a fix that does
12950
+ * not exist. Use the account-level `getTeamMembers()` family, or the
12951
+ * dashboard.
12952
+ */
12953
+ private dashboardOnlyTeamOperation;
12186
12954
  /**
12187
12955
  * Get the team for a specific store (members + pending invitations)
12188
12956
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
@@ -12192,7 +12960,7 @@ declare class BrainerceClient {
12192
12960
  * const { members, invitations } = await client.getStoreTeam('store_id');
12193
12961
  * ```
12194
12962
  */
12195
- getStoreTeam(storeId: string): Promise<StoreTeamResponse>;
12963
+ getStoreTeam(_storeId: string): Promise<StoreTeamResponse>;
12196
12964
  /**
12197
12965
  * Invite a new member to a store
12198
12966
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
@@ -12208,7 +12976,7 @@ declare class BrainerceClient {
12208
12976
  * });
12209
12977
  * ```
12210
12978
  */
12211
- inviteStoreMember(storeId: string, data: InviteStoreMemberDto): Promise<StoreInvitation>;
12979
+ inviteStoreMember(_storeId: string, _data: InviteStoreMemberDto): Promise<StoreInvitation>;
12212
12980
  /**
12213
12981
  * Update a store team member's role and/or permissions
12214
12982
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
@@ -12224,7 +12992,7 @@ declare class BrainerceClient {
12224
12992
  * });
12225
12993
  * ```
12226
12994
  */
12227
- updateStoreMember(storeId: string, memberId: string, data: UpdateStoreMemberDto): Promise<StoreMember>;
12995
+ updateStoreMember(_storeId: string, _memberId: string, _data: UpdateStoreMemberDto): Promise<StoreMember>;
12228
12996
  /**
12229
12997
  * Replace the set of vibe-coded sales channels a store member is restricted to.
12230
12998
  * Channels are identified by their public `connectionId` (`vc_*` format). Pass
@@ -12244,22 +13012,22 @@ declare class BrainerceClient {
12244
13012
  * });
12245
13013
  * ```
12246
13014
  */
12247
- updateStoreMemberSalesChannels(storeId: string, memberId: string, data: UpdateStoreMemberSalesChannelsDto): Promise<StoreMember>;
13015
+ updateStoreMemberSalesChannels(_storeId: string, _memberId: string, _data: UpdateStoreMemberSalesChannelsDto): Promise<StoreMember>;
12248
13016
  /**
12249
13017
  * Remove a member from a store team
12250
13018
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
12251
13019
  */
12252
- removeStoreMember(storeId: string, memberId: string): Promise<void>;
13020
+ removeStoreMember(_storeId: string, _memberId: string): Promise<void>;
12253
13021
  /**
12254
13022
  * Resend a store invitation email
12255
13023
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
12256
13024
  */
12257
- resendStoreInvitation(storeId: string, invitationId: string): Promise<StoreInvitation>;
13025
+ resendStoreInvitation(_storeId: string, _invitationId: string): Promise<StoreInvitation>;
12258
13026
  /**
12259
13027
  * Revoke a store invitation
12260
13028
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
12261
13029
  */
12262
- revokeStoreInvitation(storeId: string, invitationId: string): Promise<void>;
13030
+ revokeStoreInvitation(_storeId: string, _invitationId: string): Promise<void>;
12263
13031
  /**
12264
13032
  * Get public invitation details by token (no auth required)
12265
13033
  * Used on the invitation acceptance page
@@ -12296,7 +13064,18 @@ declare class BrainerceClient {
12296
13064
  * }
12297
13065
  * ```
12298
13066
  */
12299
- getMyStorePermissions(storeId: string): Promise<UserStorePermissions>;
13067
+ getMyStorePermissions(_storeId: string): Promise<UserStorePermissions>;
13068
+ /**
13069
+ * `/me/*` answers "who am I and what can I reach", which only a real user can
13070
+ * ask. `UserContextController` (store-team.controller.ts:246) is guarded by
13071
+ * `DashboardOnlyGuard` for a load-bearing reason its own G16 comment spells
13072
+ * out: both routes resolve access purely from `@CurrentUserId()`, which is
13073
+ * `undefined` for an api_key principal, so the store filter would be stripped
13074
+ * and every store on the platform returned. The guard is the control. These
13075
+ * also pointed at `/api/v1/me/*`, which no controller serves, so the observed
13076
+ * failure was a 404 rather than the guard's 403.
13077
+ */
13078
+ private dashboardOnlyUserContext;
12300
13079
  /**
12301
13080
  * Get email settings for the store
12302
13081
  * Requires Admin mode (apiKey)
@@ -12394,6 +13173,21 @@ declare class BrainerceClient {
12394
13173
  * @param resolution - 'MERGE' to link to existing product, 'CREATE_NEW' to create new product
12395
13174
  */
12396
13175
  resolveSyncConflict(conflictId: string, resolution: SyncConflictResolution): Promise<SyncConflict>;
13176
+ /**
13177
+ * Sync conflicts were never implemented on the server.
13178
+ *
13179
+ * There is no `sync-conflict` route anywhere in the backend — not under
13180
+ * `@Controller('v1')`, not on any other controller. These two methods have
13181
+ * called a URL that has never existed, and `SyncConflict` /
13182
+ * `SyncConflictResolution` / `ResolveSyncConflictDto` are exported types with
13183
+ * no producer. The METAFIELD conflict siblings below are real
13184
+ * (external-api.controller.ts:4788, :4802) and are easy to mistake for these.
13185
+ *
13186
+ * Kept as throwing stubs rather than deleted: removing exported methods from a
13187
+ * published package is a breaking change, and a caller who has been swallowing
13188
+ * a 404 deserves to be told why.
13189
+ */
13190
+ private syncConflictsNotImplemented;
12397
13191
  /**
12398
13192
  * Get pending metafield conflicts for the store
12399
13193
  * Requires Admin mode (apiKey)
@@ -12561,7 +13355,7 @@ declare class BrainerceError extends Error {
12561
13355
  constructor(message: string, statusCode: number, details?: unknown);
12562
13356
  }
12563
13357
 
12564
- declare const SDK_VERSION = "2.0.1";
13358
+ declare const SDK_VERSION = "2.2.0";
12565
13359
 
12566
13360
  /**
12567
13361
  * Verify a webhook signature from Brainerce
@@ -13062,4 +13856,4 @@ interface CategorySitemapOptions {
13062
13856
  */
13063
13857
  declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
13064
13858
 
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 };
13859
+ 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 GiftCardAdmin, type GiftCardAdminDetail, type GiftCardBalance, type GiftCardLiability, type GiftCardTransaction, 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 IssueGiftCardAdminDto, type IssuedGiftCardAdmin, 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 ReissuedGiftCardAdmin, 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 };