brainerce 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -579,8 +579,25 @@ interface LoyaltyNextTierSummary extends LoyaltyTierSummary {
579
579
  interface LoyaltyStatus {
580
580
  /** Whether the customer has a membership in the program. */
581
581
  enrolled: boolean;
582
- /** Redeemable points balance (pending earns excluded). */
582
+ /** Redeemable points balance (pending earns excluded — see `pendingPoints`). */
583
583
  pointsBalance: number;
584
+ /**
585
+ * Points already earned but still inside the program's return window, so not
586
+ * yet spendable and NOT counted in `pointsBalance`.
587
+ *
588
+ * ⛔ Render this whenever it is above zero. A shopper who just ordered has
589
+ * their points here, not in the balance, and a panel that shows only
590
+ * `pointsBalance` tells them "0" the day they bought something — which reads
591
+ * as a broken programme rather than a waiting period.
592
+ */
593
+ pendingPoints: number;
594
+ /**
595
+ * When `pendingPoints` becomes spendable — the nightly confirm run after the
596
+ * oldest pending earn's window closes. ISO 8601, or null when nothing is
597
+ * pending. Later pending earns confirm on their own later dates; this is the
598
+ * next date on which the balance goes up.
599
+ */
600
+ pendingPointsConfirmAt: string | null;
584
601
  /** Total points ever earned (confirmed). */
585
602
  lifetimeEarned: number;
586
603
  /** Program display config, or null when the store has no loyalty program. */
@@ -589,6 +606,12 @@ interface LoyaltyStatus {
589
606
  pointsName: string;
590
607
  /** Points needed to redeem one unit of store currency. */
591
608
  currencyRatio: number;
609
+ /**
610
+ * Days a new earn stays pending before it can be spent — the merchant's
611
+ * return window. Use it to explain the wait ("points arrive 14 days after
612
+ * your order"); use `pendingPointsConfirmAt` for the actual date.
613
+ */
614
+ pendingDays: number;
592
615
  status: 'DRAFT' | 'ACTIVE' | 'PAUSED';
593
616
  } | null;
594
617
  /** The customer's current tier, or null if untiered / no tiers configured. */
@@ -842,7 +865,13 @@ interface Product {
842
865
  displayCurrency?: string;
843
866
  /** Product status (active, draft). Always returned by backend. */
844
867
  status: ProductStatus;
845
- type: 'SIMPLE' | 'VARIABLE';
868
+ /**
869
+ * Catalog structure. `KIT` is a sellable kit ("maaraz") whose price and
870
+ * availability derive from its component products — it carries no inventory
871
+ * row of its own, and outside FIXED pricing its `basePrice` is a placeholder.
872
+ * Treat it as not-directly-purchasable unless you resolve its components.
873
+ */
874
+ type: 'SIMPLE' | 'VARIABLE' | 'KIT';
846
875
  /** Whether product is downloadable/digital. */
847
876
  isDownloadable?: boolean;
848
877
  /** Download files available for this product (when isDownloadable is true) */
@@ -1651,7 +1680,7 @@ interface ProductQueryParams {
1651
1680
  * `salePrice` stay in the store currency. Display-only — checkout still
1652
1681
  * charges in the store currency. */
1653
1682
  regionId?: string;
1654
- type?: 'SIMPLE' | 'VARIABLE';
1683
+ type?: 'SIMPLE' | 'VARIABLE' | 'KIT';
1655
1684
  isDownloadable?: boolean;
1656
1685
  }
1657
1686
  /**
@@ -1675,7 +1704,7 @@ interface ProductSuggestion {
1675
1704
  basePrice: string;
1676
1705
  /** Sale price as string. Use parseFloat() for calculations. */
1677
1706
  salePrice?: string | null;
1678
- type: 'SIMPLE' | 'VARIABLE';
1707
+ type: 'SIMPLE' | 'VARIABLE' | 'KIT';
1679
1708
  }
1680
1709
  /**
1681
1710
  * Category node in the tree returned by `getCategories()`.
@@ -1771,7 +1800,12 @@ interface CreateProductDto {
1771
1800
  salePrice?: number;
1772
1801
  costPrice?: number;
1773
1802
  status?: ProductStatus;
1774
- type?: 'SIMPLE' | 'VARIABLE';
1803
+ /**
1804
+ * `KIT` creates an EMPTY kit. It is not purchasable until components are
1805
+ * added — this endpoint cannot carry them, so a kit created here still needs
1806
+ * its contents set before it can be sold.
1807
+ */
1808
+ type?: 'SIMPLE' | 'VARIABLE' | 'KIT';
1775
1809
  isDownloadable?: boolean;
1776
1810
  /** Existing category IDs to assign. Unknown/cross-store IDs are rejected with 400. To assign by name (auto-creating if missing), use `categoryNames`. */
1777
1811
  categories?: string[];
@@ -2010,6 +2044,31 @@ interface Order {
2010
2044
  * order reads `"paid"` with no provider behind it.
2011
2045
  */
2012
2046
  financialStatus?: string | null;
2047
+ /**
2048
+ * Gift cards that settled part of this order.
2049
+ *
2050
+ * `total` is what the order was WORTH; these are what actually paid for it.
2051
+ * A receipt showing only the total tells a customer they handed over money
2052
+ * they did not — so render each tender as its own line and, when there is at
2053
+ * least one, an "amount charged" figure of `total` minus their sum.
2054
+ *
2055
+ * Empty or absent on an order paid entirely by card or cash. Snapshotted at
2056
+ * order creation, so this is a historical record: it does not change if the
2057
+ * gift card is later adjusted, disabled or re-issued.
2058
+ */
2059
+ tenders?: Array<{
2060
+ id: string;
2061
+ /** `GIFT_CARD` today. The field exists so a second internal tender type does not break callers. */
2062
+ type: string;
2063
+ /** What this tender paid, in `currencyBase`. Decimal string. */
2064
+ amountBase: string;
2065
+ currencyBase: string;
2066
+ /** Last four of the code. The full code is stored as an HMAC and cannot be returned. */
2067
+ giftCard?: {
2068
+ id: string;
2069
+ codeLast4: string;
2070
+ } | null;
2071
+ }>;
2013
2072
  /** Fulfillment status: "unfulfilled", "partial", "fulfilled". */
2014
2073
  fulfillmentStatus?: string | null;
2015
2074
  /** Tracking number, e.g., "1Z999AA10123456784". */
@@ -2180,7 +2239,10 @@ interface OrderQueryParams {
2180
2239
  * not model. Cast if you need to filter by a label id.
2181
2240
  */
2182
2241
  status?: OrderStatus;
2183
- sortBy?: 'createdAt' | 'totalAmount';
2242
+ /** Mirrors `VALID_ORDER_SORT` (orders.service.ts:674), the allowlist that
2243
+ * actually gates this — the v1 route takes `sortBy` as a bare string with no
2244
+ * `@IsEnum`, so the service set is the contract. */
2245
+ sortBy?: 'createdAt' | 'totalAmount' | 'status';
2184
2246
  sortOrder?: 'asc' | 'desc';
2185
2247
  }
2186
2248
  interface CreateOrderDto {
@@ -2299,7 +2361,12 @@ interface CouponQueryParams {
2299
2361
  status?: CouponStatus;
2300
2362
  type?: CouponType;
2301
2363
  platform?: ConnectorPlatform;
2302
- sortBy?: 'code' | 'createdAt' | 'updatedAt' | 'value';
2364
+ /**
2365
+ * Mirrors the `@IsIn` on `coupon-query.dto.ts:44` exactly. It previously
2366
+ * offered `'value'`, which the API rejects with a 400, and omitted three
2367
+ * members it accepts.
2368
+ */
2369
+ sortBy?: 'code' | 'createdAt' | 'updatedAt' | 'startsAt' | 'endsAt' | 'usageCount';
2303
2370
  sortOrder?: 'asc' | 'desc';
2304
2371
  }
2305
2372
  interface CreateCouponDto {
@@ -3664,6 +3731,136 @@ interface SelectPickupLocationDto {
3664
3731
  * anything about who owns it. A storefront needs the tender id (to remove it),
3665
3732
  * how much went on, and what the provider will now be charged.
3666
3733
  */
3734
+ /**
3735
+ * A gift card as the admin API returns it.
3736
+ *
3737
+ * The full code is NOT here and never will be: only an HMAC of it is stored, so
3738
+ * there is nothing to return. `maskedCode` and `codeLast4` are the whole of what
3739
+ * can be shown after issuance.
3740
+ */
3741
+ interface GiftCardAdmin {
3742
+ id: string;
3743
+ /** `••••-••••-••••-••••-V2D3`. */
3744
+ maskedCode: string;
3745
+ codeLast4: string;
3746
+ /** Decimal strings, all of them. These are balances; never parse them to float for arithmetic. */
3747
+ initialAmount: string;
3748
+ /** Settled value on the card. */
3749
+ balance: string;
3750
+ /** Reserved by a checkout in progress and not available to spend. */
3751
+ heldAmount: string;
3752
+ /** `balance - heldAmount` — what a shopper could actually use right now. */
3753
+ spendable: string;
3754
+ currency: string;
3755
+ status: 'ACTIVE' | 'DISABLED' | 'REVOKED';
3756
+ customerId: string | null;
3757
+ recipientEmail: string | null;
3758
+ expiresAt: string | null;
3759
+ /**
3760
+ * Always `null` today. Nothing stamps it: there is no expiry job anywhere in
3761
+ * the platform, and no `EXPIRE` ledger row is ever written. Expiry is enforced
3762
+ * at read time instead — branch on `expired`, never on this. The balance is
3763
+ * deliberately NOT zeroed when a card lapses.
3764
+ */
3765
+ expiredAt: string | null;
3766
+ /** Derived at read time, so it is true the moment validity lapses. */
3767
+ expired: boolean;
3768
+ createdAt: string;
3769
+ }
3770
+ /** One movement of value. The ledger is append-only — nothing here is ever rewritten. */
3771
+ interface GiftCardTransaction {
3772
+ id: string;
3773
+ /**
3774
+ * `EXPIRE` is declared for a write-off that does not exist yet: nothing in the
3775
+ * platform writes one, for the same reason nothing stamps
3776
+ * {@link GiftCardAdmin.expiredAt}. Handle it — the union is the contract — but
3777
+ * do not build a report that expects to find any.
3778
+ */
3779
+ type: 'ISSUE' | 'REDEEM' | 'REFUND' | 'ADJUST' | 'EXPIRE';
3780
+ /** Signed decimal string. Negative debits the card. */
3781
+ amount: string;
3782
+ balanceAfter: string;
3783
+ orderId: string | null;
3784
+ actorUserId: string | null;
3785
+ note: string | null;
3786
+ createdAt: string;
3787
+ }
3788
+ /** A card with its full history. */
3789
+ interface GiftCardAdminDetail extends GiftCardAdmin {
3790
+ recipientName: string | null;
3791
+ orderId: string | null;
3792
+ transactions: GiftCardTransaction[];
3793
+ }
3794
+ /**
3795
+ * Outstanding liability for a store — the figure reconciled at month-end close.
3796
+ *
3797
+ * Reported PER CURRENCY. Balances in different currencies do not add up, so the
3798
+ * top-level figures cover one currency and `byCurrency` carries the rest.
3799
+ * Expired value is separate and is NOT written off: whether expiry extinguishes
3800
+ * the obligation is an open legal question, so it is never folded into either
3801
+ * side.
3802
+ */
3803
+ interface GiftCardLiability {
3804
+ active: string;
3805
+ held: string;
3806
+ expiredNotWrittenOff: string;
3807
+ currency: string | null;
3808
+ byCurrency: Array<{
3809
+ currency: string;
3810
+ active: string;
3811
+ held: string;
3812
+ expiredNotWrittenOff: string;
3813
+ }>;
3814
+ /** Whether the store may issue at all. Redemption is NOT gated on this. */
3815
+ enabled: boolean;
3816
+ }
3817
+ /**
3818
+ * The response to issuing or re-issuing.
3819
+ *
3820
+ * ⚠️ `plaintextCode` is returned EXACTLY ONCE. Persist it from this response or
3821
+ * deliver it now — it is stored only as an HMAC and no API, dashboard or
3822
+ * database query can produce it again.
3823
+ */
3824
+ interface IssuedGiftCardAdmin {
3825
+ giftCardId: string;
3826
+ plaintextCode: string;
3827
+ last4: string;
3828
+ }
3829
+ /** Re-issue also reports what moved across from the card it revoked. */
3830
+ interface ReissuedGiftCardAdmin extends IssuedGiftCardAdmin {
3831
+ movedAmount: string;
3832
+ /** Where the replacement was emailed, or null if the merchant must hand it over. */
3833
+ deliveredTo: string | null;
3834
+ }
3835
+ /**
3836
+ * Per-call options for a write that the server accepts an `Idempotency-Key` on.
3837
+ *
3838
+ * The SDK sends the value as the HTTP header; it never goes in the request body,
3839
+ * because the backend DTOs reject unknown properties. Without a key a retried
3840
+ * timeout runs the write twice — on a gift-card issue that means a second card
3841
+ * and a second real liability nobody asked for.
3842
+ *
3843
+ * Any string up to 255 characters. Use one the caller can reproduce for the
3844
+ * SAME logical operation (an order id, a support-ticket id, a UUID you stored
3845
+ * before the first attempt) — a fresh random key on every retry defeats the
3846
+ * whole mechanism. Keys are remembered for 24 hours and are scoped to the API
3847
+ * key, so two integrations cannot collide.
3848
+ */
3849
+ interface IdempotentRequestOptions {
3850
+ idempotencyKey?: string;
3851
+ }
3852
+ interface IssueGiftCardAdminDto {
3853
+ /** Decimal string, e.g. "200.00". Must be greater than zero. */
3854
+ amount: string;
3855
+ /** REQUIRED. Written to the ledger — issuing value with no stated reason is not auditable. */
3856
+ note: string;
3857
+ customerId?: string;
3858
+ /** ISO 8601. Must be in the future. Omit for a card that never expires. */
3859
+ expiresAt?: string;
3860
+ recipientEmail?: string;
3861
+ recipientName?: string;
3862
+ personalMessage?: string;
3863
+ }
3667
3864
  interface CheckoutTender {
3668
3865
  /** Pass this to `removeGiftCard` — a checkout can carry more than one card. */
3669
3866
  tenderId: string;
@@ -6707,7 +6904,7 @@ interface ProductRecommendation {
6707
6904
  basePrice: string;
6708
6905
  salePrice: string | null;
6709
6906
  images: ProductImage[];
6710
- type: 'SIMPLE' | 'VARIABLE';
6907
+ type: 'SIMPLE' | 'VARIABLE' | 'KIT';
6711
6908
  inventory?: InventoryInfo | null;
6712
6909
  relationType: ProductRelationType;
6713
6910
  /** Pinned variant of the target (VARIABLE only); null = customer chooses. */
@@ -7807,6 +8004,13 @@ declare class BrainerceClient {
7807
8004
  * Clear the customer token (logout)
7808
8005
  */
7809
8006
  clearCustomerToken(): void;
8007
+ /**
8008
+ * Turn an `idempotencyKey` option into the header the backend reads.
8009
+ *
8010
+ * Returns `undefined` when there is no key, so the header is absent rather
8011
+ * than empty — the interceptor rejects a present-but-blank key with a 400.
8012
+ */
8013
+ private idempotencyHeaders;
7810
8014
  /**
7811
8015
  * Make a request to the Admin API (requires apiKey)
7812
8016
  */
@@ -8392,13 +8596,18 @@ declare class BrainerceClient {
8392
8596
  */
8393
8597
  convertToSimple(productId: string): Promise<Product>;
8394
8598
  /**
8395
- * Publish a product to specific platforms
8599
+ * Publish a product to specific platforms.
8396
8600
  *
8397
- * @example
8398
- * ```typescript
8399
- * const result = await client.publishProduct('prod_123', ['SHOPIFY', 'WOOCOMMERCE']);
8400
- * console.log('Publish results:', result.results);
8401
- * ```
8601
+ * **Not callable.** The API-key `/v1` surface has no `products/:id/publish`
8602
+ * route. Platform publishing for products exists only on the dashboard
8603
+ * surface (`POST /api/products/:id/publish?storeId=`,
8604
+ * `products.controller.ts:556`), which resolves the acting user from a
8605
+ * dashboard session an API key does not carry. The generic trigger
8606
+ * `POST /v1/sync` answers `501 Not Implemented` and points at per-resource
8607
+ * publish endpoints — and products have none.
8608
+ *
8609
+ * {@link publishProductToSalesChannel} is a DIFFERENT operation: it controls
8610
+ * visibility on a vibe-coded storefront, not a push to an external platform.
8402
8611
  */
8403
8612
  publishProduct(productId: string, platforms: string[]): Promise<PublishProductResponse>;
8404
8613
  /**
@@ -9582,7 +9791,7 @@ declare class BrainerceClient {
9582
9791
  * Works in all three SDK modes (vibe-coded, storefront, admin):
9583
9792
  * - **Public reads** (`get`, `list`, `getBySlug`): work in any mode.
9584
9793
  * - **Write operations** (`create`, `update`, `publish`, `unpublish`,
9585
- * `remove`): admin mode only — they call `/api/v1/content/...` with
9794
+ * `remove`): admin mode only — they call `/api/content/...` with
9586
9795
  * the API key. Calling from storefront / vibe-coded mode throws.
9587
9796
  *
9588
9797
  * **Default key:** every type has `'main'` as its universal default key.
@@ -9923,6 +10132,9 @@ declare class BrainerceClient {
9923
10132
  * flags reflect the live state. Call this on cart load if you want to
9924
10133
  * surface drift to the customer before they reach checkout.
9925
10134
  *
10135
+ * **Storefront and vibe-coded modes only.** There is no admin (`apiKey`)
10136
+ * route for this, so an admin-mode client throws instead of 404ing.
10137
+ *
9926
10138
  * @example
9927
10139
  * ```typescript
9928
10140
  * const cart = await client.recalculateCart('cart_123');
@@ -9938,6 +10150,9 @@ declare class BrainerceClient {
9938
10150
  * subsequent `createCheckout` call will then succeed (it would otherwise
9939
10151
  * throw `PRICE_DRIFT`).
9940
10152
  *
10153
+ * **Storefront and vibe-coded modes only.** There is no admin (`apiKey`)
10154
+ * route for this, so an admin-mode client throws instead of 404ing.
10155
+ *
9941
10156
  * @example
9942
10157
  * ```typescript
9943
10158
  * try {
@@ -10577,6 +10792,137 @@ declare class BrainerceClient {
10577
10792
  * Show "we cannot use this code" and let the shopper re-enter it.
10578
10793
  */
10579
10794
  checkGiftCardBalance(code: string): Promise<GiftCardBalance>;
10795
+ /**
10796
+ * List gift cards.
10797
+ *
10798
+ * `search` matches the LAST FOUR of a code or part of a recipient email. It
10799
+ * cannot match a full code: only an HMAC is stored, so there is nothing to
10800
+ * search against.
10801
+ *
10802
+ * Requires `gift_cards:read`.
10803
+ */
10804
+ listGiftCards(params?: {
10805
+ page?: number;
10806
+ limit?: number;
10807
+ /** `all` | `active` | `withBalance` | `expired` | `disabled` */
10808
+ filter?: string;
10809
+ search?: string;
10810
+ }): Promise<PaginatedResponse<GiftCardAdmin>>;
10811
+ /**
10812
+ * Outstanding gift card liability, per currency.
10813
+ *
10814
+ * This is the month-end number. Read `byCurrency` if the store sells in more
10815
+ * than one — currencies are never summed together.
10816
+ *
10817
+ * Requires `gift_cards:read`.
10818
+ */
10819
+ getGiftCardLiability(): Promise<GiftCardLiability>;
10820
+ /**
10821
+ * One gift card with its full ledger.
10822
+ *
10823
+ * Requires `gift_cards:read`.
10824
+ */
10825
+ getGiftCard(giftCardId: string): Promise<GiftCardAdminDetail>;
10826
+ /**
10827
+ * Issue a gift card.
10828
+ *
10829
+ * ⚠️ **The code comes back exactly once.** It is stored only as an HMAC, so
10830
+ * this response is the only time it exists in readable form anywhere. Persist
10831
+ * it or deliver it before you discard the response — no later call, dashboard
10832
+ * screen or database query can recover it.
10833
+ *
10834
+ * A `note` is required. Refused when gift cards are switched off for the
10835
+ * store.
10836
+ *
10837
+ * ⚠️ **Pass an `idempotencyKey`.** It is the ONLY recovery that exists here:
10838
+ * re-sending the identical request with the same key inside 24 hours replays
10839
+ * the cached response, code included. Without one, a retried timeout mints a
10840
+ * SECOND card and a second real liability. The key is sent as the
10841
+ * `Idempotency-Key` header; reuse the same value across retries of the same
10842
+ * logical issue, never a fresh random one.
10843
+ *
10844
+ * Requires `gift_cards:issue`.
10845
+ *
10846
+ * @example
10847
+ * ```typescript
10848
+ * const card = await client.issueGiftCard(
10849
+ * {
10850
+ * amount: '200.00',
10851
+ * note: 'Compensation for order #1042',
10852
+ * recipientEmail: 'dana@example.com',
10853
+ * },
10854
+ * { idempotencyKey: 'compensation-order-1042' }
10855
+ * );
10856
+ * await sendToCustomer(card.plaintextCode); // your only chance
10857
+ * ```
10858
+ */
10859
+ issueGiftCard(data: IssueGiftCardAdminDto, options?: IdempotentRequestOptions): Promise<IssuedGiftCardAdmin>;
10860
+ /**
10861
+ * Re-issue a gift card onto a new code.
10862
+ *
10863
+ * The answer to a customer losing their code. Mints a new code, moves the
10864
+ * WHOLE balance to it, and REVOKES the old card.
10865
+ *
10866
+ * **This is not a resend.** The old code stops working the moment this
10867
+ * returns — if the customer still holds a printed card, it dies. Refused
10868
+ * while a checkout holds value on the card. The original expiry carries
10869
+ * forward, so this cannot be used to restart an expiry clock.
10870
+ *
10871
+ * The new code is returned exactly once, under the same rules as issuance —
10872
+ * so pass an `idempotencyKey` here for the same reason, and with the same
10873
+ * force: a retried timeout without one revokes the replacement it just made
10874
+ * and mints another.
10875
+ *
10876
+ * Requires `gift_cards:issue`.
10877
+ */
10878
+ reissueGiftCard(giftCardId: string, note: string, options?: IdempotentRequestOptions): Promise<ReissuedGiftCardAdmin>;
10879
+ /**
10880
+ * Adjust a gift card balance.
10881
+ *
10882
+ * `delta` is a SIGNED decimal string: `"25.00"` adds, `"-25.00"` takes away.
10883
+ * The `note` is required and is written to the ledger permanently — it is the
10884
+ * row a finance review reads a year from now.
10885
+ *
10886
+ * A debit cannot take the balance below what live checkout holds have already
10887
+ * reserved; that refusal names the held amount so you can act on it.
10888
+ *
10889
+ * Pass an `idempotencyKey`: an adjustment is a relative move, so a retried
10890
+ * timeout without one applies the delta twice.
10891
+ *
10892
+ * Requires `gift_cards:adjust`.
10893
+ */
10894
+ adjustGiftCardBalance(giftCardId: string, delta: string, note: string, options?: IdempotentRequestOptions): Promise<{
10895
+ balanceAfter: string;
10896
+ }>;
10897
+ /**
10898
+ * Enable, disable or revoke one gift card.
10899
+ *
10900
+ * Deliberately does NOT touch live holds: a checkout that already reserved
10901
+ * value settles normally, because pulling it out from under a shopper
10902
+ * mid-payment would strand a provider charge already in flight. Disabling
10903
+ * stops NEW holds, which is what "off" actually means.
10904
+ *
10905
+ * Requires `gift_cards:write`.
10906
+ */
10907
+ setGiftCardStatus(giftCardId: string, status: 'ACTIVE' | 'DISABLED' | 'REVOKED', options?: IdempotentRequestOptions): Promise<{
10908
+ success: true;
10909
+ }>;
10910
+ /**
10911
+ * Disable or reactivate many gift cards at once.
10912
+ *
10913
+ * `REVOKED` is not accepted here — it belongs to re-issue, which moves the
10914
+ * balance to a replacement first. Revoking in bulk would strand balances with
10915
+ * nowhere to go. Cards already revoked are skipped, so the returned count is
10916
+ * the honest one and may be lower than the ids you sent.
10917
+ *
10918
+ * There is no bulk delete, here or anywhere: the ledger is append-only and a
10919
+ * card may carry a statutory retention life.
10920
+ *
10921
+ * Requires `gift_cards:write`.
10922
+ */
10923
+ bulkSetGiftCardStatus(giftCardIds: string[], status: 'ACTIVE' | 'DISABLED', options?: IdempotentRequestOptions): Promise<{
10924
+ updated: number;
10925
+ }>;
10580
10926
  /**
10581
10927
  * Start a donation.
10582
10928
  *
@@ -10785,6 +11131,9 @@ declare class BrainerceClient {
10785
11131
  /**
10786
11132
  * Set delivery type on checkout (shipping or pickup).
10787
11133
  *
11134
+ * **Storefront and vibe-coded modes only.** There is no admin (`apiKey`)
11135
+ * route for this, so an admin-mode client throws instead of 404ing.
11136
+ *
10788
11137
  * @example
10789
11138
  * ```typescript
10790
11139
  * const checkout = await client.setDeliveryType('checkout_123', 'pickup');
@@ -10796,6 +11145,9 @@ declare class BrainerceClient {
10796
11145
  * This sets the delivery type to "pickup", records customer info, and prepares for payment.
10797
11146
  * Equivalent to setShippingAddress + selectShippingMethod for delivery orders.
10798
11147
  *
11148
+ * **Storefront and vibe-coded modes only.** There is no admin (`apiKey`)
11149
+ * route for this, so an admin-mode client throws instead of 404ing.
11150
+ *
10799
11151
  * @example
10800
11152
  * ```typescript
10801
11153
  * const checkout = await client.selectPickupLocation('checkout_123', {
@@ -11487,13 +11839,17 @@ declare class BrainerceClient {
11487
11839
  * lifetime earned, the program's display config, earned milestone `badges`,
11488
11840
  * and the `paidMembership` subscription state (null for free members).
11489
11841
  * Requires customerToken. Only available in storefront mode. `program` is
11490
- * null when the store has no loyalty program.
11842
+ * null when the store has no loyalty program. `pointsBalance` excludes points
11843
+ * still inside the return window - those are in `pendingPoints`, and a panel
11844
+ * that ignores them shows a shopper 0 the day they order.
11491
11845
  *
11492
11846
  * @example
11493
11847
  * ```typescript
11494
11848
  * client.setCustomerToken(auth.token);
11495
11849
  * const status = await client.getLoyaltyStatus();
11496
11850
  * if (status.enrolled) console.log(`${status.pointsBalance} ${status.program?.pointsName}`);
11851
+ * // Points from an order just placed are in pendingPoints, NOT pointsBalance.
11852
+ * if (status.pendingPoints > 0) console.log(`+${status.pendingPoints} on ${status.pendingPointsConfirmAt}`);
11497
11853
  * status.badges?.forEach((b) => console.log(`🏅 ${b.name}`));
11498
11854
  * if (status.paidMembership?.status === 'ACTIVE') showPremiumPerks(status.paidMembership.plan);
11499
11855
  * ```
@@ -11881,8 +12237,20 @@ declare class BrainerceClient {
11881
12237
  */
11882
12238
  createTag(data: CreateTagDto): Promise<Tag>;
11883
12239
  /**
11884
- * Update an existing tag
11885
- * Requires Admin mode (apiKey)
12240
+ * Update an existing tag.
12241
+ *
12242
+ * **Not callable.** The API-key `/v1` surface serves `GET`, `POST` and
12243
+ * `DELETE` on tags (`external-api.controller.ts:3276`, `:3310`, `:3331`) but
12244
+ * no update verb — `PATCH /api/v1/tags/:id` 404'd silently. Tag editing lives
12245
+ * only on the dashboard surface (`PATCH /api/stores/:storeId/tags/:id`,
12246
+ * `tags.controller.ts:127`), which needs a `storeId` in the path that this
12247
+ * signature does not carry, and resolves the acting user from a dashboard
12248
+ * session an API key does not have.
12249
+ *
12250
+ * Edit the tag in the Brainerce dashboard. {@link deleteTag} +
12251
+ * {@link createTag} is NOT an equivalent workaround: it drops the tag's
12252
+ * product assignments, and `CreateTagDto` has no `translations` field, so any
12253
+ * per-locale names are lost too.
11886
12254
  */
11887
12255
  updateTag(tagId: string, data: UpdateTagDto): Promise<Tag>;
11888
12256
  /**
@@ -11944,13 +12312,26 @@ declare class BrainerceClient {
11944
12312
  */
11945
12313
  createAttributeOption(attributeId: string, data: CreateAttributeOptionDto): Promise<AttributeOption>;
11946
12314
  /**
11947
- * Update an attribute option
11948
- * Requires Admin mode (apiKey)
12315
+ * Update an attribute option.
12316
+ *
12317
+ * **Not callable.** The API-key `/v1` surface serves attribute options for
12318
+ * list and create only (`external-api.controller.ts:3517`, `:3543`); there is
12319
+ * no per-option route, so this 404'd silently. Editing an option lives on the
12320
+ * dashboard surface (`PUT /api/stores/:storeId/attributes/:id/options/:optionId`,
12321
+ * `attributes.controller.ts:132` — note it is `PUT` there, not `PATCH`), which
12322
+ * needs a path `storeId` this signature does not carry.
12323
+ *
12324
+ * Edit the option in the Brainerce dashboard.
11949
12325
  */
11950
12326
  updateAttributeOption(attributeId: string, optionId: string, data: UpdateAttributeOptionDto): Promise<AttributeOption>;
11951
12327
  /**
11952
- * Delete an attribute option
11953
- * Requires Admin mode (apiKey)
12328
+ * Delete an attribute option.
12329
+ *
12330
+ * **Not callable.** Same gap as {@link updateAttributeOption}: the `/v1`
12331
+ * surface has no per-option route. Deleting an option lives on the dashboard
12332
+ * surface (`DELETE /api/stores/:storeId/attributes/:id/options/:optionId`,
12333
+ * `attributes.controller.ts:145`), which needs a path `storeId` this signature
12334
+ * does not carry.
11954
12335
  */
11955
12336
  deleteAttributeOption(attributeId: string, optionId: string): Promise<void>;
11956
12337
  /**
@@ -12430,16 +12811,37 @@ declare class BrainerceClient {
12430
12811
  */
12431
12812
  setMetafieldPlatforms(definitionId: string, data: SetMetafieldPlatformsDto): Promise<MetafieldDefinition>;
12432
12813
  /**
12433
- * Publish a metafield definition to a vibe-coded site (admin mode).
12434
- * @example
12435
- * ```typescript
12436
- * await client.publishMetafieldDefinitionToVibeCodedSite('def_123', 'conn_456');
12437
- * ```
12814
+ * Publish a metafield definition to a sales channel (admin mode).
12815
+ *
12816
+ * **Not callable.** This asked for `publish-vibe-coded`, which is a
12817
+ * deprecated backend alias, not the canonical route. The canonical spelling
12818
+ * is `publish-sales-channel`, and the `/v1` surface serves it for products
12819
+ * (`external-api.controller.ts:862`), coupons (`:947`), customers (`:1548`),
12820
+ * categories (`:3039`), brands (`:3211`) and tags (`:3349`) — but NOT for
12821
+ * metafield definitions. Both spellings 404 there.
12822
+ *
12823
+ * The operation exists only on the dashboard surface
12824
+ * (`POST /api/stores/:storeId/metafield-definitions/:id/publish-sales-channel`,
12825
+ * `metafields.controller.ts:190`), which needs a path `storeId` this signature
12826
+ * does not carry.
12827
+ *
12828
+ * Publish the definition to a sales channel from the Brainerce dashboard. A
12829
+ * definition with no publishes stays visible to every sales channel of the
12830
+ * store, so leaving it unpublished is the permissive default, not a lockout.
12438
12831
  */
12439
12832
  publishMetafieldDefinitionToVibeCodedSite(definitionId: string, vibeCodedConnectionId: string): Promise<{
12440
12833
  success: boolean;
12441
12834
  }>;
12442
- /** Unpublish a metafield definition from a vibe-coded site (admin mode). */
12835
+ /**
12836
+ * Unpublish a metafield definition from a sales channel (admin mode).
12837
+ *
12838
+ * **Not callable.** Same gap as
12839
+ * {@link publishMetafieldDefinitionToVibeCodedSite} — the `/v1` surface
12840
+ * carries no per-sales-channel routes for metafield definitions under either
12841
+ * the canonical `unpublish-sales-channel` spelling or the deprecated
12842
+ * `unpublish-vibe-coded` alias. The dashboard route is
12843
+ * `metafields.controller.ts:217`.
12844
+ */
12443
12845
  unpublishMetafieldDefinitionFromVibeCodedSite(definitionId: string, vibeCodedConnectionId: string): Promise<{
12444
12846
  success: boolean;
12445
12847
  }>;
@@ -12562,13 +12964,28 @@ declare class BrainerceClient {
12562
12964
  deleteProductMetafield(productId: string, definitionId: string): Promise<void>;
12563
12965
  /**
12564
12966
  * Get customization fields assigned to a product.
12565
- * Requires Admin mode (apiKey).
12967
+ *
12968
+ * **Not callable.** The API-key `/v1` surface has no
12969
+ * `metafield-definitions/products/:productId/customization-fields` route, so
12970
+ * this 404'd silently. It exists only on the dashboard surface
12971
+ * (`GET /api/stores/:storeId/metafield-definitions/products/:productId/customization-fields`,
12972
+ * `metafields.controller.ts:277`), which needs a path `storeId` this signature
12973
+ * does not carry.
12974
+ *
12975
+ * {@link getProductMetafields} is the closest working call — it returns the
12976
+ * metafield VALUES stored on a product over
12977
+ * `GET /api/v1/products/:productId/metafields`, not the customer-input field
12978
+ * definitions attached to it.
12566
12979
  */
12567
12980
  getProductCustomizationFields(productId: string): Promise<ProductCustomizationField[]>;
12568
12981
  /**
12569
12982
  * Set customization fields for a product (replaces all existing assignments).
12570
- * Only definitions marked as `isCustomerInput: true` can be assigned.
12571
- * Requires Admin mode (apiKey).
12983
+ *
12984
+ * **Not callable.** Same gap as {@link getProductCustomizationFields}: the
12985
+ * `/v1` surface carries no customization-field routes. The dashboard route is
12986
+ * `PATCH /api/stores/:storeId/metafield-definitions/products/:productId/customization-fields`
12987
+ * (`metafields.controller.ts:298`), which needs a path `storeId` this
12988
+ * signature does not carry.
12572
12989
  */
12573
12990
  setProductCustomizationFields(productId: string, definitionIds: string[]): Promise<ProductCustomizationField[]>;
12574
12991
  /**
@@ -12685,6 +13102,22 @@ declare class BrainerceClient {
12685
13102
  * is dashboard-only (403 for api_key). Keep using this until one ships.
12686
13103
  */
12687
13104
  removeTeamMember(memberId: string): Promise<void>;
13105
+ /**
13106
+ * Every store-level team operation is dashboard-only.
13107
+ *
13108
+ * `store-team.controller.ts:53` carries `DashboardOnlyGuard`, which rejects
13109
+ * `api_key` and `app_installation` principals outright, so no SDK caller can
13110
+ * reach these however the URL is spelled. They additionally pointed at
13111
+ * `/api/v1/stores/:storeId/team*`, and `@Controller('v1')`
13112
+ * (external-api.controller.ts:181) has no `stores` root — so what they
13113
+ * actually returned was a 404, not the 403 you would expect from the guard.
13114
+ *
13115
+ * Throwing beats either status code: a 404 reads as "wrong id" and a 403 as
13116
+ * "missing permission", and both send the caller looking for a fix that does
13117
+ * not exist. Use the account-level `getTeamMembers()` family, or the
13118
+ * dashboard.
13119
+ */
13120
+ private dashboardOnlyTeamOperation;
12688
13121
  /**
12689
13122
  * Get the team for a specific store (members + pending invitations)
12690
13123
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
@@ -12694,7 +13127,7 @@ declare class BrainerceClient {
12694
13127
  * const { members, invitations } = await client.getStoreTeam('store_id');
12695
13128
  * ```
12696
13129
  */
12697
- getStoreTeam(storeId: string): Promise<StoreTeamResponse>;
13130
+ getStoreTeam(_storeId: string): Promise<StoreTeamResponse>;
12698
13131
  /**
12699
13132
  * Invite a new member to a store
12700
13133
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
@@ -12710,7 +13143,7 @@ declare class BrainerceClient {
12710
13143
  * });
12711
13144
  * ```
12712
13145
  */
12713
- inviteStoreMember(storeId: string, data: InviteStoreMemberDto): Promise<StoreInvitation>;
13146
+ inviteStoreMember(_storeId: string, _data: InviteStoreMemberDto): Promise<StoreInvitation>;
12714
13147
  /**
12715
13148
  * Update a store team member's role and/or permissions
12716
13149
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
@@ -12726,7 +13159,7 @@ declare class BrainerceClient {
12726
13159
  * });
12727
13160
  * ```
12728
13161
  */
12729
- updateStoreMember(storeId: string, memberId: string, data: UpdateStoreMemberDto): Promise<StoreMember>;
13162
+ updateStoreMember(_storeId: string, _memberId: string, _data: UpdateStoreMemberDto): Promise<StoreMember>;
12730
13163
  /**
12731
13164
  * Replace the set of vibe-coded sales channels a store member is restricted to.
12732
13165
  * Channels are identified by their public `connectionId` (`vc_*` format). Pass
@@ -12746,22 +13179,22 @@ declare class BrainerceClient {
12746
13179
  * });
12747
13180
  * ```
12748
13181
  */
12749
- updateStoreMemberSalesChannels(storeId: string, memberId: string, data: UpdateStoreMemberSalesChannelsDto): Promise<StoreMember>;
13182
+ updateStoreMemberSalesChannels(_storeId: string, _memberId: string, _data: UpdateStoreMemberSalesChannelsDto): Promise<StoreMember>;
12750
13183
  /**
12751
13184
  * Remove a member from a store team
12752
13185
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
12753
13186
  */
12754
- removeStoreMember(storeId: string, memberId: string): Promise<void>;
13187
+ removeStoreMember(_storeId: string, _memberId: string): Promise<void>;
12755
13188
  /**
12756
13189
  * Resend a store invitation email
12757
13190
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
12758
13191
  */
12759
- resendStoreInvitation(storeId: string, invitationId: string): Promise<StoreInvitation>;
13192
+ resendStoreInvitation(_storeId: string, _invitationId: string): Promise<StoreInvitation>;
12760
13193
  /**
12761
13194
  * Revoke a store invitation
12762
13195
  * Requires Admin mode (apiKey) and MANAGE_TEAM permission
12763
13196
  */
12764
- revokeStoreInvitation(storeId: string, invitationId: string): Promise<void>;
13197
+ revokeStoreInvitation(_storeId: string, _invitationId: string): Promise<void>;
12765
13198
  /**
12766
13199
  * Get public invitation details by token (no auth required)
12767
13200
  * Used on the invitation acceptance page
@@ -12798,7 +13231,18 @@ declare class BrainerceClient {
12798
13231
  * }
12799
13232
  * ```
12800
13233
  */
12801
- getMyStorePermissions(storeId: string): Promise<UserStorePermissions>;
13234
+ getMyStorePermissions(_storeId: string): Promise<UserStorePermissions>;
13235
+ /**
13236
+ * `/me/*` answers "who am I and what can I reach", which only a real user can
13237
+ * ask. `UserContextController` (store-team.controller.ts:246) is guarded by
13238
+ * `DashboardOnlyGuard` for a load-bearing reason its own G16 comment spells
13239
+ * out: both routes resolve access purely from `@CurrentUserId()`, which is
13240
+ * `undefined` for an api_key principal, so the store filter would be stripped
13241
+ * and every store on the platform returned. The guard is the control. These
13242
+ * also pointed at `/api/v1/me/*`, which no controller serves, so the observed
13243
+ * failure was a 404 rather than the guard's 403.
13244
+ */
13245
+ private dashboardOnlyUserContext;
12802
13246
  /**
12803
13247
  * Get email settings for the store
12804
13248
  * Requires Admin mode (apiKey)
@@ -12896,6 +13340,21 @@ declare class BrainerceClient {
12896
13340
  * @param resolution - 'MERGE' to link to existing product, 'CREATE_NEW' to create new product
12897
13341
  */
12898
13342
  resolveSyncConflict(conflictId: string, resolution: SyncConflictResolution): Promise<SyncConflict>;
13343
+ /**
13344
+ * Sync conflicts were never implemented on the server.
13345
+ *
13346
+ * There is no `sync-conflict` route anywhere in the backend — not under
13347
+ * `@Controller('v1')`, not on any other controller. These two methods have
13348
+ * called a URL that has never existed, and `SyncConflict` /
13349
+ * `SyncConflictResolution` / `ResolveSyncConflictDto` are exported types with
13350
+ * no producer. The METAFIELD conflict siblings below are real
13351
+ * (external-api.controller.ts:4788, :4802) and are easy to mistake for these.
13352
+ *
13353
+ * Kept as throwing stubs rather than deleted: removing exported methods from a
13354
+ * published package is a breaking change, and a caller who has been swallowing
13355
+ * a 404 deserves to be told why.
13356
+ */
13357
+ private syncConflictsNotImplemented;
12899
13358
  /**
12900
13359
  * Get pending metafield conflicts for the store
12901
13360
  * Requires Admin mode (apiKey)
@@ -13063,7 +13522,7 @@ declare class BrainerceError extends Error {
13063
13522
  constructor(message: string, statusCode: number, details?: unknown);
13064
13523
  }
13065
13524
 
13066
- declare const SDK_VERSION = "2.0.3";
13525
+ declare const SDK_VERSION = "2.3.0";
13067
13526
 
13068
13527
  /**
13069
13528
  * Verify a webhook signature from Brainerce
@@ -13564,4 +14023,4 @@ interface CategorySitemapOptions {
13564
14023
  */
13565
14024
  declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
13566
14025
 
13567
- export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AssignTaxClassDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AutoRegionResponse, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundleOfferOfferedProduct, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartItemUnavailableReason, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CheckoutTender, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateRegionDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateStockAlertInput, type CreateTagDto as CreateTagInput, type CreateTaxClassDto, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type CustomizationFieldOption, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GiftCardBalance, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type I18nSettings, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyBadge, type LoyaltyMembershipPlan, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyRewardRecommendation, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type NestedModifierSelection, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthErrorCode, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type PaidMembershipInfo, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublicRegion, type PublicRegionDetail, type PublicRegionPaymentProvider, type PublicTaxClass, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type Region, type RegionPaymentProvider, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SavedPaymentMethodSummary, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAlertResponse, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreCapabilities, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type StorefrontSavedPaymentMethod, type SubmitProductReviewInput, type SubscribeMarketingInput, type SubscribeMarketingResponse, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxClass, type TaxEstimateResponse, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type TranslatableEntityType, type TranslationStatusEntry, type TranslationsMap, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateRegionDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxClassDto, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsellSettings, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
14026
+ 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 IdempotentRequestOptions, 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 };