brainerce 1.59.0 → 2.0.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
@@ -216,6 +216,14 @@ interface StoreInfo {
216
216
  ordersWriteEnabled?: boolean;
217
217
  /** Whether guest checkout is tracked (sales-channel mode only) */
218
218
  guestCheckoutTracking?: boolean;
219
+ /**
220
+ * Whether the merchant has back-in-stock alerts switched on for this
221
+ * storefront (sales-channel mode only). When false, do not render the
222
+ * "email me when this is back" affordance at all — `stockAlerts.subscribe()`
223
+ * still answers `{ ok: true }` and records nothing, so a button left up looks
224
+ * like it worked and quietly does nothing.
225
+ */
226
+ stockAlertsEnabled?: boolean;
219
227
  /**
220
228
  * Whether new customer registrations require email verification.
221
229
  * If true, your site MUST implement an email verification flow:
@@ -224,6 +232,17 @@ interface StoreInfo {
224
232
  * 3. Call verifyEmail(code) with the code they received via email
225
233
  */
226
234
  requireEmailVerification?: boolean;
235
+ /**
236
+ * Whether the merchant requires a birthday at registration on this channel.
237
+ * When true, `registerCustomer()` is rejected with HTTP 400 unless the call
238
+ * carries both `birthMonth` and `birthDay`, so render the two fields on the
239
+ * signup form and validate them before you submit.
240
+ *
241
+ * Sales-channel mode only, because the flag lives on the sales channel: a
242
+ * `storeId`-mode storefront never receives it and its register route never
243
+ * enforces it. Absent (an older API build) means the same as false.
244
+ */
245
+ requireBirthday?: boolean;
227
246
  /** Upsell feature settings (storefront mode) */
228
247
  upsell?: UpsellSettings;
229
248
  /** Multi-language / i18n settings */
@@ -404,6 +423,14 @@ interface CustomerProfile {
404
423
  acceptsMarketing: boolean;
405
424
  /** Free-form segment set by the merchant (e.g. "wholesale", "vip") — use to gate custom storefront features. Admin-set only, never customer-editable. */
406
425
  role?: string;
426
+ /**
427
+ * Birthday month (1-12) the customer saved on their profile. Month and day
428
+ * only, never a year. Returned together with `birthDay` or not at all, so a
429
+ * form can test one field and trust the other.
430
+ */
431
+ birthMonth?: number;
432
+ /** Birthday day of the month (1-31). Returned together with `birthMonth` or not at all. */
433
+ birthDay?: number;
407
434
  addresses: CustomerAddress[];
408
435
  createdAt: string;
409
436
  updatedAt: string;
@@ -592,6 +619,15 @@ interface ProductMetafield {
592
619
  */
593
620
  name?: string;
594
621
  }
622
+ /**
623
+ * Publish state of a product. **Lowercase**, unlike order statuses.
624
+ *
625
+ * `active` is visible to shoppers; `draft` is merchant-only. The backend
626
+ * validates this exact pair on both the query filter and the write DTOs, and
627
+ * defaults a product to `active`. There is no `archived` product state on this
628
+ * platform. Archiving exists for modifier groups and modifiers, not products.
629
+ */
630
+ type ProductStatus = 'active' | 'draft';
595
631
  interface Product {
596
632
  id: string;
597
633
  name: string;
@@ -680,7 +716,7 @@ interface Product {
680
716
  /** ISO 4217 currency of `displayPrice` (the buyer's region currency). */
681
717
  displayCurrency?: string;
682
718
  /** Product status (active, draft). Always returned by backend. */
683
- status: string;
719
+ status: ProductStatus;
684
720
  type: 'SIMPLE' | 'VARIABLE';
685
721
  /** Whether product is downloadable/digital. */
686
722
  isDownloadable?: boolean;
@@ -787,6 +823,44 @@ interface Product {
787
823
  createdAt: string;
788
824
  updatedAt: string;
789
825
  }
826
+ /**
827
+ * A customer-uploaded photo on a review, as shoppers see it.
828
+ * `width`/`height` are the intrinsic pixel size — set them on your `<img>` so the
829
+ * gallery reserves space instead of shifting layout as photos load.
830
+ */
831
+ interface ProductReviewImage {
832
+ id: string;
833
+ url: string;
834
+ thumbnailUrl: string | null;
835
+ width: number | null;
836
+ height: number | null;
837
+ position: number;
838
+ }
839
+ /**
840
+ * Moderation view of a photo — adds the two states a shopper never sees.
841
+ * `approvedAt: null` means the photo is waiting on the merchant, which only ever
842
+ * happens on stores that opted into review-photo approval.
843
+ */
844
+ interface ProductReviewImageAdmin extends ProductReviewImage {
845
+ assetKey: string;
846
+ approvedAt: string | null;
847
+ hiddenAt: string | null;
848
+ createdAt: string;
849
+ }
850
+ /**
851
+ * Moderation states of a marketplace **app** submission, the values the
852
+ * platform stores on an app review submission while Brainerce staff approve or
853
+ * reject a listed app.
854
+ *
855
+ * ⛔ **This has nothing to do with product reviews.** Customer product reviews
856
+ * publish immediately and carry no status field at all: see `ProductReview`
857
+ * below. Do not build a product-review moderation queue on this type; the
858
+ * platform does not have one.
859
+ *
860
+ * Exported for completeness of the platform vocabulary. No SDK method returns
861
+ * or accepts it today.
862
+ */
863
+ type ReviewStatus = 'PENDING' | 'IN_REVIEW' | 'APPROVED' | 'REJECTED' | 'CHANGES_REQUESTED';
790
864
  /**
791
865
  * Product review submitted by a customer.
792
866
  * Reviews publish immediately (no PENDING state). Merchants hide via the admin
@@ -802,13 +876,17 @@ interface ProductReview {
802
876
  /** Only present in admin responses; null on storefront responses. */
803
877
  hiddenAt?: string | null;
804
878
  createdAt: string;
879
+ /** Visible photos, in display order. Always an array; empty when there are none. */
880
+ images: ProductReviewImage[];
805
881
  }
806
882
  /** Admin-mode review with full PII. Returned by `client.adminReviews.*`. */
807
- interface ProductReviewAdmin extends ProductReview {
883
+ interface ProductReviewAdmin extends Omit<ProductReview, 'images'> {
808
884
  customerId: string | null;
809
885
  authorEmail: string | null;
810
886
  orderId: string | null;
811
887
  updatedAt: string;
888
+ /** ALL photos, including pending and hidden — this is the moderation surface. */
889
+ images: ProductReviewImageAdmin[];
812
890
  }
813
891
  /**
814
892
  * Body for customer-authenticated submit / update.
@@ -817,6 +895,16 @@ interface ProductReviewAdmin extends ProductReview {
817
895
  interface WriteProductReviewInput {
818
896
  rating: number;
819
897
  body?: string;
898
+ /**
899
+ * Storage keys from `uploadReviewPhoto()`, in display order. Keys, not URLs —
900
+ * the server resolves each one against the store's own assets and rejects
901
+ * anything that is not a review photo.
902
+ *
903
+ * On update this REPLACES the photo set, so pass the keys you want to keep.
904
+ * OMITTING the field leaves the existing photos untouched; passing `[]` removes
905
+ * them all.
906
+ */
907
+ imageKeys?: string[];
820
908
  }
821
909
  /**
822
910
  * @deprecated Use `WriteProductReviewInput`. Customers no longer pass author info
@@ -826,6 +914,15 @@ interface SubmitProductReviewInput extends WriteProductReviewInput {
826
914
  authorName?: string;
827
915
  authorEmail?: string;
828
916
  }
917
+ /** What `uploadReviewPhoto()` gives back. Pass `key` to the submit/update call. */
918
+ interface ReviewPhotoUpload {
919
+ /** The value to put in `imageKeys`. */
920
+ key: string;
921
+ /** For rendering a local preview before submitting. Not what you send back. */
922
+ url: string;
923
+ width: number | null;
924
+ height: number | null;
925
+ }
829
926
  /**
830
927
  * Returned by `client.getMyProductReview(productId)`. Tells the storefront which
831
928
  * UI to render: sign-in / not-eligible / submit / edit.
@@ -836,6 +933,24 @@ interface MyProductReview {
836
933
  reason: 'no_eligible_order' | 'reviews_disabled' | 'product_not_found' | null;
837
934
  /** The customer's existing review for this product, or null. */
838
935
  myReview: ProductReview | null;
936
+ /**
937
+ * The store's photo policy. Read this instead of hard-coding limits: render the
938
+ * picker only when `enabled`, cap selection at `maxPerReview`, reject oversized
939
+ * files client-side at `maxBytes`, and when `requiresApproval` is true tell the
940
+ * customer their photo waits for the merchant before it appears.
941
+ */
942
+ photos: {
943
+ enabled: boolean;
944
+ maxPerReview: number;
945
+ maxBytes: number;
946
+ requiresApproval: boolean;
947
+ };
948
+ /**
949
+ * The customer's OWN photos including any still pending, so you can show them
950
+ * their upload sitting in the queue rather than looking like it failed. Note
951
+ * `myReview.images` carries only the publicly visible subset.
952
+ */
953
+ myImages: ProductReviewImageAdmin[];
839
954
  }
840
955
  interface ProductImage {
841
956
  url: string;
@@ -898,8 +1013,13 @@ interface ProductVariant {
898
1013
  } | null;
899
1014
  /** Display position/order for sorting variants */
900
1015
  position: number;
901
- /** Variant status */
902
- status?: string | null;
1016
+ /**
1017
+ * Variant publish state. Same lowercase pair as `ProductStatus`, and the
1018
+ * backend validates it with the same `active` / `draft` enum on the create
1019
+ * and update DTOs. Null when the merchant never set it, which the server
1020
+ * treats as `active`.
1021
+ */
1022
+ status?: VariantStatus | null;
903
1023
  createdAt: string;
904
1024
  updatedAt: string;
905
1025
  /** Per-sales-channel field overrides keyed by connectionId */
@@ -940,6 +1060,18 @@ interface InventoryInfo {
940
1060
  * false if trackingMode is DISABLED or if out of stock.
941
1061
  */
942
1062
  canPurchase: boolean;
1063
+ /**
1064
+ * Whether the merchant lets this item be ordered while out of stock.
1065
+ * Present on `TRACKED` items only — the one mode where it means anything.
1066
+ *
1067
+ * Use it to decide where a back-in-stock alert belongs: an alert on a
1068
+ * backorderable item tells someone to come back and do what they can already
1069
+ * do, so `stockAlerts.subscribe()` silently discards those requests. The gate
1070
+ * is `!canPurchase && trackingMode === 'TRACKED' && backorderMode === 'NONE'`.
1071
+ *
1072
+ * Absent on older backends — treat `undefined` as `'NONE'`.
1073
+ */
1074
+ backorderMode?: 'NONE' | 'ALLOW' | 'NOTIFY';
943
1075
  /** Last inventory sync timestamp (admin mode only) */
944
1076
  lastInventorySyncAt?: string | null;
945
1077
  }
@@ -1337,7 +1469,7 @@ interface ProductQueryParams {
1337
1469
  page?: number;
1338
1470
  limit?: number;
1339
1471
  search?: string;
1340
- status?: 'active' | 'draft';
1472
+ status?: ProductStatus;
1341
1473
  /** Filter by category IDs (comma-separated or array) */
1342
1474
  categories?: string | string[];
1343
1475
  /** Filter by brand IDs (comma-separated or array) */
@@ -1363,8 +1495,27 @@ interface ProductQueryParams {
1363
1495
  * ```
1364
1496
  */
1365
1497
  metafields?: Record<string, string | string[]>;
1366
- /** Sort by field (default: menuOrder) */
1367
- sortBy?: 'name' | 'price' | 'createdAt';
1498
+ /**
1499
+ * Sort field. **Which values actually take effect depends on the SDK mode.**
1500
+ *
1501
+ * - `storeId` (public storefront) and `apiKey` (admin) modes validate against
1502
+ * the full set: `name`, `price`, `createdAt`, `updatedAt`, `menuOrder`.
1503
+ * Anything outside it is rejected with a 400.
1504
+ * - `salesChannelId` (vibe-coded) mode honours only `name`, `price` and
1505
+ * `createdAt`. It does **not** reject `updatedAt` or `menuOrder`; it
1506
+ * silently ignores them and returns the merchant's curated order instead,
1507
+ * so a sort that looks accepted may simply not have happened.
1508
+ *
1509
+ * Omit `sortBy` entirely and every mode returns the merchant's curated order
1510
+ * (`menuOrder` ascending, then newest first). That is the right default for a
1511
+ * storefront listing, because it is the order the merchant arranged in the
1512
+ * dashboard.
1513
+ *
1514
+ * `price` sorts on the stored `basePrice` column. For VARIABLE products that
1515
+ * can differ from the effective price a shopper sees, which is the minimum
1516
+ * across variants.
1517
+ */
1518
+ sortBy?: 'name' | 'price' | 'createdAt' | 'updatedAt' | 'menuOrder';
1368
1519
  sortOrder?: 'asc' | 'desc';
1369
1520
  /** Locale for translated content (e.g., "he", "es"). Falls back to store default. */
1370
1521
  locale?: string;
@@ -1494,7 +1645,7 @@ interface CreateProductDto {
1494
1645
  basePrice: number;
1495
1646
  salePrice?: number;
1496
1647
  costPrice?: number;
1497
- status?: 'active' | 'draft';
1648
+ status?: ProductStatus;
1498
1649
  type?: 'SIMPLE' | 'VARIABLE';
1499
1650
  isDownloadable?: boolean;
1500
1651
  /** Existing category IDs to assign. Unknown/cross-store IDs are rejected with 400. To assign by name (auto-creating if missing), use `categoryNames`. */
@@ -1628,7 +1779,7 @@ interface UpdateProductDto {
1628
1779
  basePrice?: number;
1629
1780
  salePrice?: number | null;
1630
1781
  costPrice?: number | null;
1631
- status?: 'active' | 'draft';
1782
+ status?: ProductStatus;
1632
1783
  isDownloadable?: boolean;
1633
1784
  /** Existing category IDs to assign (replaces the current set). Pass `[]` to clear. Unknown/cross-store IDs are rejected with 400. To assign by name (auto-creating if missing), use `categoryNames`. */
1634
1785
  categories?: string[];
@@ -1725,7 +1876,14 @@ interface Order {
1725
1876
  notes?: string | null;
1726
1877
  /** Payment method used (e.g., "card", "paypal", "cash_on_delivery"). */
1727
1878
  paymentMethod?: string | null;
1728
- /** Financial status: "pending", "paid", "refunded", "partially_refunded", "voided". */
1879
+ /**
1880
+ * Financial status: "pending", "authorized", "partially_paid", "paid",
1881
+ * "partially_refunded", "refunded", "voided".
1882
+ *
1883
+ * `"paid"` does not imply a payment provider was involved — a merchant can
1884
+ * record an out-of-band payment (cash on delivery, bank transfer) and the
1885
+ * order reads `"paid"` with no provider behind it.
1886
+ */
1729
1887
  financialStatus?: string | null;
1730
1888
  /** Fulfillment status: "unfulfilled", "partial", "fulfilled". */
1731
1889
  fulfillmentStatus?: string | null;
@@ -1775,10 +1933,21 @@ interface OrderStatusChange {
1775
1933
  note?: string | null;
1776
1934
  }
1777
1935
  /**
1778
- * Order status values are **lowercase**.
1779
- * Do NOT use uppercase values like 'COMPLETED' or 'CANCELLED'.
1936
+ * The canonical order statuses. **The wire format is UPPERCASE.**
1937
+ *
1938
+ * These are the exact values the API returns on `Order.status` and the exact
1939
+ * values it accepts when you set a status. Send `'CANCELLED'`, never
1940
+ * `'cancelled'`.
1941
+ *
1942
+ * The server enforces a state machine on top of this list, so not every value
1943
+ * is reachable from every other one. Terminal states (`CANCELLED`, `REFUNDED`)
1944
+ * do not transition anywhere.
1945
+ *
1946
+ * **Breaking change in SDK 2.0.** Earlier releases declared a shorter,
1947
+ * lowercase union that never matched the API. If you were comparing against
1948
+ * `'pending'` or `'cancelled'`, uppercase those comparisons.
1780
1949
  */
1781
- type OrderStatus = 'pending' | 'processing' | 'shipped' | 'delivered' | 'cancelled' | 'refunded';
1950
+ type OrderStatus = 'DRAFT' | 'PENDING' | 'PROCESSING' | 'ON_HOLD' | 'PAID' | 'SHIPPED' | 'DELIVERED' | 'COMPLETED' | 'FULFILLED' | 'CANCELLED' | 'REFUNDED' | 'PARTIALLY_REFUNDED';
1782
1951
  interface OrderCustomer {
1783
1952
  email: string;
1784
1953
  name?: string;
@@ -1880,6 +2049,11 @@ interface OrderDownloadLink {
1880
2049
  interface OrderQueryParams {
1881
2050
  page?: number;
1882
2051
  limit?: number;
2052
+ /**
2053
+ * Filter by canonical status, UPPERCASE. The server also accepts the id of a
2054
+ * custom status label for stores using that feature, which this union does
2055
+ * not model. Cast if you need to filter by a label id.
2056
+ */
1883
2057
  status?: OrderStatus;
1884
2058
  sortBy?: 'createdAt' | 'totalAmount';
1885
2059
  sortOrder?: 'asc' | 'desc';
@@ -2114,9 +2288,32 @@ interface Customer {
2114
2288
  hasAccount: boolean;
2115
2289
  emailVerified: boolean;
2116
2290
  acceptsMarketing: boolean;
2291
+ /**
2292
+ * Whether a marketing campaign can actually REACH this address — a different
2293
+ * question from `acceptsMarketing`. Audience resolution drops a recipient on
2294
+ * either the consent flag or a suppression row, and the suppression row wins:
2295
+ * an address whose consent box was re-ticked in the dashboard still reads
2296
+ * `'UNSUBSCRIBED'`, because only the recipient's own confirmed opt-in clears
2297
+ * it. `'BLOCKED'` cannot be cleared at all. Only `'SUBSCRIBED'` is mailable.
2298
+ *
2299
+ * Returned by the single-customer read (`GET /api/v1/customers/{id}`) and by
2300
+ * the customer list. Optional because it is computed, not stored: responses
2301
+ * that never compute it (create, update, register) omit it rather than
2302
+ * guessing, and an older API build omits it everywhere. Fall back to
2303
+ * `acceptsMarketing` when it is absent.
2304
+ */
2305
+ marketingStatus?: 'SUBSCRIBED' | 'NOT_SUBSCRIBED' | 'UNSUBSCRIBED' | 'BOUNCED' | 'COMPLAINED' | 'BLOCKED';
2117
2306
  tags: string[];
2118
2307
  /** Free-form segment set by the merchant (e.g. "wholesale", "vip") — use to gate custom storefront features. Admin-set only, never customer-editable. */
2119
2308
  role?: string;
2309
+ /**
2310
+ * Birthday month (1-12) the customer saved. Month and day only, never a
2311
+ * year. Returned together with `birthDay` or not at all, so a form can test
2312
+ * one field and trust the other.
2313
+ */
2314
+ birthMonth?: number;
2315
+ /** Birthday day of the month (1-31). Returned together with `birthMonth` or not at all. */
2316
+ birthDay?: number;
2120
2317
  totalOrders: number;
2121
2318
  lastOrderAt?: string;
2122
2319
  metadata?: Record<string, unknown>;
@@ -2217,6 +2414,13 @@ interface CheckoutPrefillData {
2217
2414
  lastName?: string;
2218
2415
  phone?: string;
2219
2416
  emailVerified: boolean;
2417
+ /**
2418
+ * Birthday month (1-12). Month and day only, never a year. Returned
2419
+ * together with `birthDay` or not at all.
2420
+ */
2421
+ birthMonth?: number;
2422
+ /** Birthday day of the month (1-31). Returned together with `birthMonth` or not at all. */
2423
+ birthDay?: number;
2220
2424
  };
2221
2425
  /** Customer's default address (if any) */
2222
2426
  defaultAddress: CustomerAddress | null;
@@ -2249,6 +2453,15 @@ interface CreateCustomerDto {
2249
2453
  tags?: string[];
2250
2454
  /** Free-form merchant-set segment (e.g. "wholesale", "vip"), max 50 chars. */
2251
2455
  role?: string;
2456
+ /**
2457
+ * Birthday month (1-12). Month and day only, never a year, so there is no
2458
+ * age to store. Send `birthMonth` and `birthDay` together: one without the
2459
+ * other is rejected with HTTP 400, and so is a day the month does not have
2460
+ * (February has no 31st).
2461
+ */
2462
+ birthMonth?: number;
2463
+ /** Birthday day of the month (1-31). Send it together with `birthMonth`. */
2464
+ birthDay?: number;
2252
2465
  /**
2253
2466
  * Explicit FIRST-TOUCH channel (internal SalesChannel id or public `vc_*`).
2254
2467
  * Creating a customer through the API is not itself a channel sighting, so
@@ -2388,6 +2601,19 @@ interface RegisterCustomerDto {
2388
2601
  lastName?: string;
2389
2602
  phone?: string;
2390
2603
  acceptsMarketing?: boolean;
2604
+ /**
2605
+ * Birthday month (1-12). Month and day only, never a year, so there is no
2606
+ * age to store. Send `birthMonth` and `birthDay` together: one without the
2607
+ * other is rejected with HTTP 400, and so is a day the month does not have.
2608
+ *
2609
+ * Optional by default. A merchant can make the birthday mandatory at
2610
+ * registration on a sales channel, which surfaces as `requireBirthday` on
2611
+ * `getStoreInfo()`; on such a channel a register call that omits the two
2612
+ * fields is rejected with HTTP 400.
2613
+ */
2614
+ birthMonth?: number;
2615
+ /** Birthday day of the month (1-31). Send it together with `birthMonth`. */
2616
+ birthDay?: number;
2391
2617
  /**
2392
2618
  * Loyalty referral share code (REF-XXXXXXXX) from a referrer's link.
2393
2619
  * Validated asynchronously after registration — an invalid code never fails
@@ -2876,6 +3102,19 @@ type GuestCheckoutStartResponse = {
2876
3102
  message: string;
2877
3103
  };
2878
3104
  type CheckoutStatus = 'PENDING' | 'SHIPPING_SET' | 'PAYMENT_PENDING' | 'PAYMENT_PROCESSING' | 'COMPLETED' | 'FAILED' | 'EXPIRED';
3105
+ /**
3106
+ * How the order reaches the customer. **Lowercase**, unlike `CheckoutStatus`.
3107
+ *
3108
+ * `shipping` is the server default when a checkout is created. `pickup` means
3109
+ * the customer collects from a store location, so the checkout carries a
3110
+ * `pickupLocation` instead of a shipping address, and shipping rates are not
3111
+ * quoted. Set it with `client.setDeliveryType(checkoutId, deliveryType)`.
3112
+ *
3113
+ * These two are the only values the API accepts. Checkout custom fields are
3114
+ * also gated on this value, so a field scoped to pickup does not appear on a
3115
+ * shipping checkout.
3116
+ */
3117
+ type DeliveryType = 'shipping' | 'pickup';
2879
3118
  /**
2880
3119
  * Individual tax line item in the breakdown
2881
3120
  * @example
@@ -3025,6 +3264,13 @@ interface CheckoutLineItem {
3025
3264
  name: string;
3026
3265
  sku: string;
3027
3266
  images?: ProductImage[];
3267
+ /**
3268
+ * Whether this product is a digital/downloadable one. The server always
3269
+ * sends it on checkout line items, so this is how you detect an
3270
+ * all-digital cart: `items.every(i => i.product.isDownloadable)`. Use that
3271
+ * to skip the shipping address step and the delivery-method picker.
3272
+ */
3273
+ isDownloadable?: boolean;
3028
3274
  };
3029
3275
  /**
3030
3276
  * Nested variant information (null for simple products).
@@ -3243,7 +3489,7 @@ interface Checkout {
3243
3489
  /** Customer ID if linked to a customer account */
3244
3490
  customerId?: string | null;
3245
3491
  /** Delivery method: "shipping" (default) or "pickup" */
3246
- deliveryType?: 'shipping' | 'pickup';
3492
+ deliveryType?: DeliveryType;
3247
3493
  /** Pickup location details (when deliveryType is "pickup") */
3248
3494
  pickupLocation?: PickupLocation | null;
3249
3495
  /** Shipping address (required before selecting shipping) */
@@ -3738,7 +3984,19 @@ interface MediaAsset {
3738
3984
  alt: string | null;
3739
3985
  createdAt: string;
3740
3986
  }
3741
- /** Query params for `listMedia`. */
3987
+ /**
3988
+ * Query params for `listMedia`.
3989
+ *
3990
+ * These three are the complete set. The public `GET /api/v1/media` endpoint
3991
+ * that this SDK calls reads only `page`, `limit` and `search`, and `search`
3992
+ * matches on name and filename.
3993
+ *
3994
+ * ⛔ The dashboard's own media browser has a richer filter set (asset type,
3995
+ * sort field, sort direction, in-use vs unused, folder scope), but that lives
3996
+ * on a **different** internal route. Sending those names here does nothing:
3997
+ * they are dropped without an error, and you get an unfiltered first page back
3998
+ * that looks like a successful filter.
3999
+ */
3742
4000
  interface ListMediaParams {
3743
4001
  page?: number;
3744
4002
  limit?: number;
@@ -3773,6 +4031,16 @@ interface Refund {
3773
4031
  currency: string;
3774
4032
  reason?: string;
3775
4033
  items?: RefundLineItemResponse[];
4034
+ /**
4035
+ * ⛔ **Deliberately left as `string`, because the casing is not consistent
4036
+ * across the two methods that return this type.**
4037
+ *
4038
+ * `createRefund()` passes the stored payment-refund status straight through,
4039
+ * so you get an UPPERCASE `PaymentRecordStatus` value such as `'PENDING'`.
4040
+ * `getOrderRefunds()` lowercases it on the way out, so the same refund comes
4041
+ * back as `'pending'`. Compare case-insensitively
4042
+ * (`status.toUpperCase() === 'PENDING'`) rather than against a literal.
4043
+ */
3776
4044
  status: string;
3777
4045
  }
3778
4046
  interface UpdateOrderShippingDto {
@@ -4226,6 +4494,20 @@ interface PaymentIntent {
4226
4494
  /** Runtime client SDK overrides (merged with provider manifest config) */
4227
4495
  clientSdk?: PaymentClientSdk;
4228
4496
  }
4497
+ /**
4498
+ * The stored payment-record vocabulary. **UPPERCASE.**
4499
+ *
4500
+ * These are the values the platform writes to a payment record, a payment
4501
+ * refund record, and a checkout's `paymentStatus` column. `CAPTURED` is the
4502
+ * only state that means the money actually moved. `AUTHORIZED` is a hold, not
4503
+ * a charge, and only a `CAPTURED` payment can be refunded.
4504
+ *
4505
+ * **This is not the same thing as the `PaymentStatus` interface below**, which
4506
+ * is the live checkout-polling object and carries its own lowercase
4507
+ * `pending | processing | succeeded | failed | canceled` field. It is also not
4508
+ * what `Refund.status` returns: see the note on `Refund`.
4509
+ */
4510
+ type PaymentRecordStatus = 'PENDING' | 'AUTHORIZED' | 'CAPTURED' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'CANCELLED';
4229
4511
  /**
4230
4512
  * Payment status for a checkout.
4231
4513
  * Use this to poll for payment completion after redirect-based flows.
@@ -5124,6 +5406,25 @@ interface DateAvailabilityConstraints {
5124
5406
  minDate?: string;
5125
5407
  /** "YYYY-MM-DD", inclusive. */
5126
5408
  maxDate?: string;
5409
+ /**
5410
+ * Preparation time in minutes. The earliest bookable moment is
5411
+ * `now + leadTimeMinutes`, re-resolved on every call. This is the thing
5412
+ * `minDate` cannot express: an absolute date authored to mean "tomorrow"
5413
+ * is wrong by the following morning and goes on being wrong.
5414
+ */
5415
+ leadTimeMinutes?: number;
5416
+ /**
5417
+ * Rolling ceiling in days, counted from today store-local. Stands to
5418
+ * `leadTimeMinutes` as `maxDate` stands to `minDate`, without the rot.
5419
+ * Both may be set at once; whichever ceiling falls earlier wins.
5420
+ */
5421
+ maxDaysAhead?: number;
5422
+ /**
5423
+ * Daily order deadline, store-local "HH:mm". At or past it, the earliest
5424
+ * bookable date moves on by a further day. This is the rule that keeps new
5425
+ * orders out of a day whose picking run has already been planned.
5426
+ */
5427
+ cutoffTime?: string;
5127
5428
  /** Subset of 0-6; any weekday(s) fully blocked regardless of date. */
5128
5429
  blockedWeekdays?: number[];
5129
5430
  /** Specific blocked calendar dates, e.g. holidays: ["2026-12-25"]. */
@@ -6234,6 +6535,72 @@ interface ContactFormSummary {
6234
6535
  name: string;
6235
6536
  isDefault: boolean;
6236
6537
  }
6538
+ interface SubscribeMarketingInput {
6539
+ /** Address to subscribe. Lowercased and trimmed server-side. */
6540
+ email: string;
6541
+ /** Given name, when the form collects one — greets them in the confirmation email. */
6542
+ firstName?: string;
6543
+ /** Family name, when the form collects one. */
6544
+ lastName?: string;
6545
+ /**
6546
+ * Storefront locale at submission time, e.g. `"he"`. Picks the language of
6547
+ * the confirmation email. Falls back to the store language when omitted —
6548
+ * pass it on a multi-language storefront or Hebrew shoppers get English.
6549
+ */
6550
+ locale?: string;
6551
+ /** Where the signup came from — `"popup"`, `"footer"`, `"exit-intent"`. Free-form. */
6552
+ source?: string;
6553
+ /** Arbitrary provenance: referrer, UTM params, the page the popup fired on. */
6554
+ sourceMetadata?: Record<string, unknown>;
6555
+ /**
6556
+ * Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
6557
+ * non-empty value rejects the request. Bots fill every text input.
6558
+ */
6559
+ honeypot?: string;
6560
+ }
6561
+ /**
6562
+ * Deliberately uniform — identical for a brand-new address, one that already
6563
+ * confirmed, and one suppressed for a hard bounce. The endpoint cannot be used
6564
+ * to test whether somebody is a customer of the store, so there is nothing here
6565
+ * to branch on: show one "check your email" message for every success.
6566
+ */
6567
+ interface SubscribeMarketingResponse {
6568
+ ok: true;
6569
+ }
6570
+ interface CreateStockAlertInput {
6571
+ /** Address to notify. Lowercased and trimmed server-side. */
6572
+ email: string;
6573
+ /** Product the shopper is waiting for. */
6574
+ productId: string;
6575
+ /**
6576
+ * Specific variant, when the product has them. An alert on the blue medium
6577
+ * fires only when the blue medium is back, never when another size returns —
6578
+ * so pass this on any variable product, or shoppers get alerts for stock they
6579
+ * cannot use.
6580
+ */
6581
+ variantId?: string;
6582
+ /**
6583
+ * Storefront locale at submission time, e.g. `"he"`. Sets the language of the
6584
+ * alert email. Falls back to the store language when omitted, so pass it on a
6585
+ * multi-language storefront or Hebrew shoppers get English.
6586
+ */
6587
+ locale?: string;
6588
+ /**
6589
+ * Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
6590
+ * non-empty value rejects the request. Bots fill every text input.
6591
+ */
6592
+ honeypot?: string;
6593
+ }
6594
+ /**
6595
+ * Deliberately uniform — identical for a new request, a duplicate, an unknown
6596
+ * product, an item that is already in stock, and an address that has bounced
6597
+ * before. The endpoint cannot be used to read a store's stock levels or
6598
+ * customer list, so there is nothing here to branch on: show one "we will email
6599
+ * you" message for every success.
6600
+ */
6601
+ interface StockAlertResponse {
6602
+ ok: true;
6603
+ }
6237
6604
  type ContentType = 'FAQ' | 'FOOTER' | 'HEADER' | 'ANNOUNCEMENT' | 'RICH_TEXT' | 'PAGE';
6238
6605
  type ContentStatus = 'DRAFT' | 'PUBLISHED';
6239
6606
  interface FaqItem {
@@ -7605,85 +7972,56 @@ declare class BrainerceClient {
7605
7972
  */
7606
7973
  updateOrder(orderId: string, data: UpdateOrderDto): Promise<Order>;
7607
7974
  /**
7608
- * Update order status
7975
+ * Update order status.
7976
+ *
7977
+ * **Not callable — use {@link updateOrder} instead.** Status changes do work
7978
+ * over the API key, just by a different route.
7979
+ *
7980
+ * @deprecated Call `updateOrder(orderId, { status })`.
7609
7981
  *
7610
7982
  * @example
7611
7983
  * ```typescript
7612
- * const order = await client.updateOrderStatus('order_123', 'shipped');
7984
+ * const order = await client.updateOrder('order_123', { status: 'SHIPPED' });
7613
7985
  * ```
7614
7986
  */
7615
7987
  updateOrderStatus(orderId: string, status: string): Promise<Order>;
7616
7988
  /**
7617
- * Update order payment method
7618
- * Note: Only WooCommerce supports syncing payment method changes back to platform
7989
+ * Update order payment method.
7619
7990
  *
7620
- * @example
7621
- * ```typescript
7622
- * const order = await client.updatePaymentMethod('order_123', 'credit_card');
7623
- * ```
7991
+ * **Not callable.** The API-key `/v1` surface has no payment-method route,
7992
+ * so this throws in every mode. Change the payment method from the
7993
+ * dashboard until the route ships.
7624
7994
  */
7625
7995
  updatePaymentMethod(orderId: string, paymentMethod: string): Promise<Order>;
7626
7996
  /**
7627
- * Update order notes
7997
+ * Update order notes.
7628
7998
  *
7629
- * @example
7630
- * ```typescript
7631
- * const order = await client.updateOrderNotes('order_123', 'Customer requested gift wrapping');
7632
- * ```
7999
+ * **Not callable.** The API-key `/v1` surface has no order-notes route, so
8000
+ * this throws in every mode. Edit notes from the dashboard until the route
8001
+ * ships.
7633
8002
  */
7634
8003
  updateOrderNotes(orderId: string, notes: string): Promise<Order>;
7635
8004
  /**
7636
- * Get refunds for an order
7637
- * Returns refunds from the source platform (Shopify/WooCommerce only)
8005
+ * Get refunds for an order.
7638
8006
  *
7639
- * @example
7640
- * ```typescript
7641
- * const refunds = await client.getOrderRefunds('order_123');
7642
- * console.log('Total refunds:', refunds.length);
7643
- * ```
8007
+ * **Not callable.** The API-key `/v1` surface has no refunds route, so this
8008
+ * throws in every mode. Read refunds from the dashboard until the route
8009
+ * ships.
7644
8010
  */
7645
8011
  getOrderRefunds(orderId: string): Promise<Refund[]>;
7646
8012
  /**
7647
- * Create a refund for an order
7648
- * Creates refund on the source platform (Shopify/WooCommerce only)
8013
+ * Create a refund for an order.
7649
8014
  *
7650
- * @example
7651
- * ```typescript
7652
- * // Full refund
7653
- * const refund = await client.createRefund('order_123', {
7654
- * type: 'full',
7655
- * restockInventory: true,
7656
- * notifyCustomer: true,
7657
- * reason: 'Customer request',
7658
- * });
7659
- *
7660
- * // Partial refund
7661
- * const partialRefund = await client.createRefund('order_123', {
7662
- * type: 'partial',
7663
- * items: [
7664
- * { lineItemId: 'item_456', quantity: 1 },
7665
- * ],
7666
- * restockInventory: true,
7667
- * });
7668
- * ```
8015
+ * **Not callable.** The API-key `/v1` surface has no refunds route, so this
8016
+ * throws in every mode. Refund from the dashboard until the route ships.
7669
8017
  */
7670
8018
  createRefund(orderId: string, data: CreateRefundDto): Promise<Refund>;
7671
8019
  /**
7672
- * Update order shipping address
7673
- * Syncs to source platform (Shopify/WooCommerce only)
8020
+ * Update order shipping address.
7674
8021
  *
7675
- * @example
7676
- * ```typescript
7677
- * const order = await client.updateOrderShipping('order_123', {
7678
- * firstName: 'John',
7679
- * lastName: 'Doe',
7680
- * line1: '456 New Address',
7681
- * city: 'Los Angeles',
7682
- * state: 'CA',
7683
- * country: 'US',
7684
- * postalCode: '90001',
7685
- * });
7686
- * ```
8022
+ * **Not callable.** The API-key `/v1` surface has no order-shipping route,
8023
+ * so this throws in every mode. Correct the address from the dashboard
8024
+ * until the route ships.
7687
8025
  */
7688
8026
  updateOrderShipping(orderId: string, data: UpdateOrderShippingDto): Promise<Order>;
7689
8027
  /**
@@ -7791,14 +8129,12 @@ declare class BrainerceClient {
7791
8129
  }>;
7792
8130
  }>>;
7793
8131
  /**
7794
- * Cancel an order
7795
- * Works for Shopify and WooCommerce orders that haven't been fulfilled
8132
+ * Cancel an order.
7796
8133
  *
7797
- * @example
7798
- * ```typescript
7799
- * const order = await client.cancelOrder('order_123');
7800
- * console.log('Order status:', order.status); // 'cancelled'
7801
- * ```
8134
+ * **Not callable.** The API-key `/v1` surface has no cancel route, so this
8135
+ * throws in every mode. A status move to cancelled may be reachable through
8136
+ * {@link updateOrder} depending on what the order's state machine allows;
8137
+ * otherwise cancel from the dashboard.
7802
8138
  */
7803
8139
  cancelOrder(orderId: string): Promise<Order>;
7804
8140
  /**
@@ -7813,89 +8149,51 @@ declare class BrainerceClient {
7813
8149
  * ship date is not rewritten, and no fulfilment event fires. That is the way
7814
8150
  * to fix a mistyped tracking number.
7815
8151
  *
7816
- * @example
7817
- * ```typescript
7818
- * // First fulfilmentemails the shopper by default.
7819
- * await client.fulfillOrder('order_123', {
7820
- * trackingNumber: '1Z999AA10123456784',
7821
- * trackingCompany: 'UPS',
7822
- * trackingUrl: 'https://www.ups.com/track?tracknum=1Z999AA10123456784',
7823
- * notifyCustomer: true,
7824
- * });
7825
- *
7826
- * // Correction — silent unless you opt back in.
7827
- * await client.fulfillOrder('order_123', {
7828
- * trackingNumber: '1Z999AA10123456785',
7829
- * });
7830
- * ```
8152
+ * **Not callable.** The API-key `/v1` surface has no fulfil route, so this
8153
+ * throws in every mode. To ship an order over the API today, buy a label
8154
+ * with {@link createShippingLabel} — the carrier's webhooks then move the
8155
+ * shipment through in-transit and delivered on their own. Otherwise fulfil
8156
+ * from the dashboard.
7831
8157
  */
7832
8158
  fulfillOrder(orderId: string, data?: FulfillOrderDto): Promise<Order>;
7833
8159
  /**
7834
- * Sync draft orders from connected platforms
8160
+ * Sync draft orders from connected platforms.
7835
8161
  *
7836
- * @example
7837
- * ```typescript
7838
- * const result = await client.syncDraftOrders();
7839
- * console.log('Draft orders synced');
7840
- * ```
8162
+ * **Not callable.** The API-key `/v1` surface has no draft-order routes at
8163
+ * all, so this throws in every mode. {@link triggerSync} covers a general
8164
+ * platform sync; draft orders are managed from the dashboard.
7841
8165
  */
7842
8166
  syncDraftOrders(): Promise<{
7843
8167
  message: string;
7844
8168
  }>;
7845
8169
  /**
7846
- * Complete a draft order (convert to regular order)
8170
+ * Complete a draft order (convert to regular order).
7847
8171
  *
7848
- * @example
7849
- * ```typescript
7850
- * const order = await client.completeDraftOrder('draft_123', {
7851
- * paymentPending: false,
7852
- * });
7853
- * ```
8172
+ * **Not callable.** The API-key `/v1` surface has no draft-order routes at
8173
+ * all, so this throws in every mode. Complete drafts from the dashboard.
7854
8174
  */
7855
8175
  completeDraftOrder(orderId: string, data?: CompleteDraftDto): Promise<Order>;
7856
8176
  /**
7857
- * Send invoice for a draft order
8177
+ * Send invoice for a draft order.
7858
8178
  *
7859
- * @example
7860
- * ```typescript
7861
- * await client.sendDraftInvoice('draft_123', {
7862
- * to: 'customer@example.com',
7863
- * subject: 'Your Invoice',
7864
- * customMessage: 'Thank you for your order!',
7865
- * });
7866
- * ```
8179
+ * **Not callable.** The API-key `/v1` surface has no draft-order routes at
8180
+ * all, so this throws in every mode. Send the invoice from the dashboard.
7867
8181
  */
7868
8182
  sendDraftInvoice(orderId: string, data?: SendInvoiceDto): Promise<{
7869
8183
  message: string;
7870
8184
  }>;
7871
8185
  /**
7872
- * Delete a draft order
8186
+ * Delete a draft order.
7873
8187
  *
7874
- * @example
7875
- * ```typescript
7876
- * await client.deleteDraftOrder('draft_123');
7877
- * ```
8188
+ * **Not callable.** The API-key `/v1` surface has no draft-order routes at
8189
+ * all, so this throws in every mode. Delete drafts from the dashboard.
7878
8190
  */
7879
8191
  deleteDraftOrder(orderId: string): Promise<void>;
7880
8192
  /**
7881
- * Update a draft order
8193
+ * Update a draft order.
7882
8194
  *
7883
- * @example
7884
- * ```typescript
7885
- * const order = await client.updateDraftOrder('draft_123', {
7886
- * note: 'Updated customer note',
7887
- * email: 'newemail@example.com',
7888
- * shippingAddress: {
7889
- * firstName: 'John',
7890
- * lastName: 'Doe',
7891
- * address1: '123 Main St',
7892
- * city: 'New York',
7893
- * province: 'NY',
7894
- * country: 'US',
7895
- * zip: '10001',
7896
- * },
7897
- * });
7898
- * ```
8195
+ * **Not callable.** The API-key `/v1` surface has no draft-order routes at
8196
+ * all, so this throws in every mode. Edit drafts from the dashboard.
7899
8197
  */
7900
8198
  updateDraftOrder(orderId: string, data: UpdateDraftDto): Promise<Order>;
7901
8199
  /**
@@ -7904,7 +8202,14 @@ declare class BrainerceClient {
7904
8202
  */
7905
8203
  updateInventory(productId: string, data: UpdateInventoryDto): Promise<void>;
7906
8204
  /**
7907
- * Get current inventory for a product
8205
+ * Get current inventory for a product.
8206
+ *
8207
+ * **Admin mode only** — the API key needs the `inventory:read` scope.
8208
+ *
8209
+ * This used to request `/api/v1/inventory/:productId`, which does not
8210
+ * exist and 404'd silently. The live route is product-scoped:
8211
+ * `GET /api/v1/products/:id/inventory`. A product with no inventory row
8212
+ * reads back as all zeroes rather than 404ing.
7908
8213
  */
7909
8214
  getInventory(productId: string): Promise<{
7910
8215
  available: number;
@@ -7912,16 +8217,16 @@ declare class BrainerceClient {
7912
8217
  total: number;
7913
8218
  }>;
7914
8219
  /**
7915
- * Edit inventory manually with reason for audit trail
8220
+ * Edit inventory manually with a reason for the audit trail.
7916
8221
  *
7917
- * @example
7918
- * ```typescript
7919
- * const inventory = await client.editInventory({
7920
- * productId: 'prod_123',
7921
- * newTotal: 100,
7922
- * reason: 'Restocked from warehouse',
7923
- * });
7924
- * ```
8222
+ * **Not callable.** The API-key `/v1` surface carries no `inventory`
8223
+ * namespace, so this throws in every mode.
8224
+ *
8225
+ * {@link updateInventory} is the closest working call: it sets the same
8226
+ * absolute stock level over `PUT /api/v1/products/:id/inventory`, but the
8227
+ * reason is not yours to choose — the server records a generic
8228
+ * "Updated via External API" against the audit trail. If the reason text
8229
+ * matters, make the edit from the dashboard.
7925
8230
  */
7926
8231
  editInventory(data: EditInventoryDto): Promise<{
7927
8232
  total: number;
@@ -7929,41 +8234,29 @@ declare class BrainerceClient {
7929
8234
  available: number;
7930
8235
  }>;
7931
8236
  /**
7932
- * Get inventory sync status for all products in the store
8237
+ * Get inventory sync status for all products in the store.
7933
8238
  *
7934
- * @example
7935
- * ```typescript
7936
- * const status = await client.getInventorySyncStatus();
7937
- * console.log(`${status.pending} products pending sync`);
7938
- * console.log(`Last sync: ${status.lastSyncAt}`);
7939
- * ```
8239
+ * **Not callable.** The API-key `/v1` surface carries no `inventory`
8240
+ * namespace, so this throws in every mode. Sync state is visible in the
8241
+ * dashboard; {@link getSyncStatus} covers platform sync jobs.
7940
8242
  */
7941
8243
  getInventorySyncStatus(): Promise<InventorySyncStatus>;
7942
8244
  /**
7943
- * Get inventory for multiple products at once
8245
+ * Get inventory for multiple products at once.
7944
8246
  *
7945
- * @example
7946
- * ```typescript
7947
- * const inventories = await client.getBulkInventory(['prod_123', 'prod_456', 'prod_789']);
7948
- * inventories.forEach(inv => {
7949
- * console.log(`${inv.productId}: ${inv.available} available`);
7950
- * });
7951
- * ```
8247
+ * **Not callable.** The API-key `/v1` surface carries no `inventory`
8248
+ * namespace, so this throws in every mode. There is no bulk stock read on
8249
+ * the API key today: fall back to {@link getInventory} per product, or read
8250
+ * the stock that {@link getProducts} already returns on each product.
7952
8251
  */
7953
8252
  getBulkInventory(productIds: string[]): Promise<BulkInventoryResponse[]>;
7954
8253
  /**
7955
- * Reconcile inventory between Brainerce and connected platforms
7956
- * Detects and optionally fixes discrepancies
7957
- *
7958
- * @example
7959
- * ```typescript
7960
- * // Reconcile single product (dry run)
7961
- * const result = await client.reconcileInventory({ productId: 'prod_123' });
8254
+ * Reconcile inventory between Brainerce and connected platforms.
8255
+ * Detects and optionally fixes discrepancies.
7962
8256
  *
7963
- * // Reconcile all products with auto-fix
7964
- * const summary = await client.reconcileInventory({ autoFix: true });
7965
- * console.log(`Reconciled ${summary.reconciled} products`);
7966
- * ```
8257
+ * **Not callable.** The API-key `/v1` surface carries no `inventory`
8258
+ * namespace, so this throws in every mode, `autoFix` included. Reconcile
8259
+ * from the dashboard.
7967
8260
  */
7968
8261
  reconcileInventory(options?: {
7969
8262
  productId?: string;
@@ -7973,6 +8266,10 @@ declare class BrainerceClient {
7973
8266
  * Check stock availability for one or more items before adding to cart or checkout
7974
8267
  * Use this to validate stock before operations that might fail due to insufficient inventory
7975
8268
  *
8269
+ * **Vibe-coded or storefront mode only.** There is no stock-check route on
8270
+ * the API-key `/v1` surface; in admin mode this throws. The same applies to
8271
+ * {@link checkCartStock}, which routes through here.
8272
+ *
7976
8273
  * @example
7977
8274
  * ```typescript
7978
8275
  * // Check if items are available before adding to cart
@@ -8215,6 +8512,11 @@ declare class BrainerceClient {
8215
8512
  * Register a new customer with password (creates account)
8216
8513
  * Works in vibe-coded, storefront, and admin mode
8217
8514
  *
8515
+ * `birthMonth`/`birthDay` are optional and must be sent together. When
8516
+ * `getStoreInfo().requireBirthday` is true the merchant made the birthday
8517
+ * mandatory on that sales channel, and a call without both fields is
8518
+ * rejected with HTTP 400.
8519
+ *
8218
8520
  * @example
8219
8521
  * ```typescript
8220
8522
  * const auth = await client.registerCustomer({
@@ -8222,6 +8524,8 @@ declare class BrainerceClient {
8222
8524
  * password: 'securepassword123',
8223
8525
  * firstName: 'Jane',
8224
8526
  * lastName: 'Doe',
8527
+ * birthMonth: 4, // optional, unless the channel requires a birthday
8528
+ * birthDay: 17,
8225
8529
  * });
8226
8530
  * ```
8227
8531
  */
@@ -8230,20 +8534,32 @@ declare class BrainerceClient {
8230
8534
  * Request a password reset email for a customer
8231
8535
  * Works in vibe-coded, storefront, and admin mode
8232
8536
  *
8233
- * The `resetUrl` MUST be supplied explicitly in non-browser (SSR / Node)
8234
- * contexts auto-deriving it from `window.location.origin` is impossible
8235
- * there and historically resulted in `undefined` being sent to the backend,
8236
- * which then bounced the email to a broken link. In browser contexts the
8237
- * origin is still used as a fallback but the SDK logs a one-time warning
8238
- * recommending an explicit value so server-rendered + proxied dashboards
8239
- * don't silently rely on the wrong host.
8537
+ * The reset link's host is chosen by the server, not by the caller: it is
8538
+ * derived from the sales channel's own domain, falling back to the backend's
8539
+ * configured frontend URL, and the request is rejected if neither resolves.
8540
+ *
8541
+ * The SDK used to send a `resetUrl` in the request body. The backend
8542
+ * deliberately removed that field: any caller could submit an arbitrary URL
8543
+ * and have it emailed, from a Brainerce-domained sender, to the address
8544
+ * holder — a phishing-link injection. `ForgotPasswordDto` now declares
8545
+ * `email` and nothing else, and the API's global validation pipe runs with
8546
+ * `whitelist` + `forbidNonWhitelisted`, so a body carrying `resetUrl` fails
8547
+ * the whole call with `400 property resetUrl should not exist`. Only `email`
8548
+ * is sent.
8549
+ *
8550
+ * The endpoint always answers 200 so it cannot be used to enumerate
8551
+ * accounts; the mail is only sent when a matching customer exists.
8240
8552
  *
8241
8553
  * @param email - Customer email address
8242
- * @param options - Optional settings
8243
- * @param options.resetUrl - Reset URL the email links should point to.
8244
- * Required outside the browser; recommended inside it.
8554
+ * @param options - Accepted for source compatibility only. Ignored.
8245
8555
  */
8246
8556
  forgotPassword(email: string, options?: {
8557
+ /**
8558
+ * @deprecated Ignored, and never sent. The server derives the reset URL
8559
+ * itself (sales-channel domain, then the configured frontend URL) and
8560
+ * rejects the field outright, so passing it has no effect. To change
8561
+ * where reset links point, set the sales channel's domain.
8562
+ */
8247
8563
  resetUrl?: string;
8248
8564
  }): Promise<{
8249
8565
  message: string;
@@ -8595,6 +8911,67 @@ declare class BrainerceClient {
8595
8911
  */
8596
8912
  get: (formKey?: string, locale?: string) => Promise<ContactFormPublic>;
8597
8913
  };
8914
+ /**
8915
+ * Email marketing signup for a storefront — a newsletter popup, a footer
8916
+ * capture bar, an exit-intent modal.
8917
+ *
8918
+ * **Confirmed opt-in, always.** `subscribe()` creates the contact and mails
8919
+ * them a confirmation link. The address is NOT subscribed and CANNOT receive
8920
+ * a campaign until the recipient clicks that link. This is not a setting:
8921
+ * consent has to come from the mailbox, or anyone could subscribe anyone.
8922
+ *
8923
+ * So do not render "You're subscribed!" on success — render "Check your
8924
+ * email to confirm." The one is a lie until the click lands.
8925
+ *
8926
+ * The response is identical for a brand-new address, one that is already
8927
+ * subscribed, and one suppressed after a bounce, so the form can't be used to
8928
+ * probe who shops here. Show the same message for every success.
8929
+ *
8930
+ * Storefront (public) and vibe-coded modes only. Rate-limited server-side to
8931
+ * 3 requests / 60s per IP, plus one confirmation email per address per 24h.
8932
+ *
8933
+ * **Where the discount goes.** A "10% off your first order" popup needs a
8934
+ * coupon from the dashboard — create one with the `customer_first_order`
8935
+ * condition and show the code after a successful call. Subscribing does not
8936
+ * mint a code on its own.
8937
+ *
8938
+ * @example
8939
+ * ```typescript
8940
+ * // Newsletter popup — hidden honeypot input, Hebrew storefront
8941
+ * await brainerce.marketing.subscribe({
8942
+ * email: 'jane@example.com',
8943
+ * locale: 'he',
8944
+ * source: 'popup',
8945
+ * honeypot: hiddenFieldValue,
8946
+ * });
8947
+ * // → show "בדקו את המייל שלכם כדי לאשר" — NOT "נרשמת בהצלחה"
8948
+ * ```
8949
+ */
8950
+ marketing: {
8951
+ subscribe: (input: SubscribeMarketingInput) => Promise<SubscribeMarketingResponse>;
8952
+ };
8953
+ /**
8954
+ * "Email me when this is back."
8955
+ *
8956
+ * ⛔ Not a newsletter signup, and must not be worded as one. It grants no
8957
+ * marketing consent, creates no customer account, and the person is never
8958
+ * mailed anything else as a result — exactly one message, about this item,
8959
+ * with a link that stops it. Someone who unsubscribed from marketing can
8960
+ * still use this, so do not gate it on consent.
8961
+ *
8962
+ * Show the affordance only on an item that is out of stock AND cannot be
8963
+ * backordered. Every other case is silently ignored server-side — the
8964
+ * response is uniform on purpose, so it cannot be used to read stock levels
8965
+ * or test who is a customer — which means a button on an in-stock item looks
8966
+ * like it worked and does nothing.
8967
+ *
8968
+ * Pass `variantId` on any product with variants. Without it the alert waits
8969
+ * on the product as a whole, and a shopper who wanted the medium hears when
8970
+ * the small comes back.
8971
+ */
8972
+ stockAlerts: {
8973
+ subscribe: (input: CreateStockAlertInput) => Promise<StockAlertResponse>;
8974
+ };
8598
8975
  /**
8599
8976
  * Typed merchant content store: FAQ, Footer, Header, Announcement,
8600
8977
  * Rich Text, and Page.
@@ -9069,15 +9446,26 @@ declare class BrainerceClient {
9069
9446
  * List visible reviews for a product (storefront / sales-channel modes).
9070
9447
  * Reviews that the merchant has hidden are excluded.
9071
9448
  *
9449
+ * Each review carries `images` — the photos its author attached, already
9450
+ * filtered to the ones shoppers are allowed to see. Always an array.
9451
+ *
9452
+ * Ordering defaults to `photos_first`: reviews carrying photos lead, newest-first
9453
+ * within each group. Pass `sort: 'newest'` for plain chronological order. On a
9454
+ * store with no review photos the two are identical.
9455
+ *
9072
9456
  * @example
9073
9457
  * ```typescript
9074
9458
  * const { data, meta } = await client.listProductReviews('prod_123', { page: 1, limit: 20 });
9075
- * data.forEach(r => console.log(r.rating, r.body, r.verifiedPurchase));
9459
+ * data.forEach(r => {
9460
+ * console.log(r.rating, r.body, r.verifiedPurchase);
9461
+ * r.images.forEach(img => console.log(img.thumbnailUrl ?? img.url));
9462
+ * });
9076
9463
  * ```
9077
9464
  */
9078
9465
  listProductReviews(productId: string, params?: {
9079
9466
  page?: number;
9080
9467
  limit?: number;
9468
+ sort?: 'photos_first' | 'newest';
9081
9469
  }): Promise<PaginatedResponse<ProductReview>>;
9082
9470
  /**
9083
9471
  * Get the current customer's review state for a product (storefront / sales-channel modes).
@@ -9136,6 +9524,17 @@ declare class BrainerceClient {
9136
9524
  }): Promise<PaginatedResponse<ProductReviewAdmin>>;
9137
9525
  /** Admin: hide a review (sets hiddenAt). */
9138
9526
  hideProductReview(reviewId: string, storeId?: string): Promise<ProductReviewAdmin>;
9527
+ /**
9528
+ * Admin: hide ONE photo on a review, leaving the review and its other photos
9529
+ * visible. Requires an API key with `reviews:write`.
9530
+ */
9531
+ hideProductReviewImage(imageId: string, storeId?: string): Promise<ProductReviewImageAdmin>;
9532
+ /**
9533
+ * Admin: show one review photo. This is also the approve action — a photo that
9534
+ * has never been approved carries no `approvedAt`, and showing it stamps one, so
9535
+ * stores using review-photo approval need no separate verb.
9536
+ */
9537
+ showProductReviewImage(imageId: string, storeId?: string): Promise<ProductReviewImageAdmin>;
9139
9538
  /** Admin: unhide a previously hidden review. */
9140
9539
  showProductReview(reviewId: string, storeId?: string): Promise<ProductReviewAdmin>;
9141
9540
  /**
@@ -10357,19 +10756,28 @@ declare class BrainerceClient {
10357
10756
  */
10358
10757
  getCheckoutPrefillData(): Promise<CheckoutPrefillData>;
10359
10758
  /**
10360
- * Update the current customer's profile (requires customerToken)
10361
- * Only available in storefront mode
10759
+ * Update the current customer's profile (requires customerToken).
10760
+ * Only available in storefront and vibe-coded mode.
10761
+ *
10762
+ * `birthMonth`/`birthDay` (1-12 / 1-31) power the loyalty birthday gift.
10763
+ * Month and day only, never a year, for privacy. Send both or neither, and
10764
+ * the day has to exist in the month: anything else is rejected with HTTP 400.
10765
+ * Send `null` for both to REMOVE a stored birthday. Leaving the keys out is a
10766
+ * different request and keeps the stored value, so a profile form whose
10767
+ * fields the shopper cleared has to send nulls, not omit them.
10362
10768
  *
10363
- * `birthMonth`/`birthDay` (1-12 / 1-31, no year privacy) power the loyalty
10364
- * birthday gift; they must be provided together.
10769
+ * The saved values now come back on the returned `CustomerProfile`, on
10770
+ * `getMyProfile()` and on every customer read type, so a profile form can
10771
+ * re-render the birthday it just saved. Before this, no API returned the two
10772
+ * fields at all and the form always came back blank.
10365
10773
  */
10366
10774
  updateMyProfile(data: {
10367
10775
  firstName?: string;
10368
10776
  lastName?: string;
10369
10777
  phone?: string;
10370
10778
  acceptsMarketing?: boolean;
10371
- birthMonth?: number;
10372
- birthDay?: number;
10779
+ birthMonth?: number | null;
10780
+ birthDay?: number | null;
10373
10781
  }): Promise<CustomerProfile>;
10374
10782
  /**
10375
10783
  * Get the logged-in customer's loyalty status: enrollment, points balance,
@@ -11532,6 +11940,50 @@ declare class BrainerceClient {
11532
11940
  url: string;
11533
11941
  key: string;
11534
11942
  }>;
11943
+ /**
11944
+ * Upload one photo to attach to a product review.
11945
+ *
11946
+ * Available in storefront and vibe-coded modes, and — unlike
11947
+ * `uploadCustomizationFile` — it REQUIRES a logged-in customer who has actually
11948
+ * bought the product. Call `setCustomerToken(...)` first. That is the same bar as
11949
+ * writing the review itself, checked here so an ineligible shopper is told before
11950
+ * they wait for the upload rather than after.
11951
+ *
11952
+ * Returns a storage `key`. Collect the keys and pass them as `imageKeys` when you
11953
+ * submit or update the review — the `url` is for a local preview only, and sending
11954
+ * it back instead of the key will be rejected.
11955
+ *
11956
+ * Server rules:
11957
+ * - `image/jpeg|png|webp|gif` only, cross-checked against the file's real bytes.
11958
+ * - Max 5 MB and 40 megapixels per file.
11959
+ * - Throttled to 10 uploads / minute → HTTP 429.
11960
+ * - 403 when the store has review photos turned off, or the customer has not
11961
+ * bought the product; 400 once the review is already at its photo cap.
11962
+ * - EXIF is stripped (so GPS coordinates never reach the storefront) while the
11963
+ * orientation tag is applied first, so phone photos stay upright.
11964
+ * - A photo uploaded but never attached to a submitted review is reclaimed after
11965
+ * 7 days.
11966
+ *
11967
+ * Read `photos` from `getMyProductReview()` for the store's live limits rather
11968
+ * than hard-coding them.
11969
+ *
11970
+ * @example
11971
+ * ```ts
11972
+ * const { photos } = await client.getMyProductReview(productId);
11973
+ * if (photos.enabled) {
11974
+ * const uploads = await Promise.all(
11975
+ * [...fileInput.files].slice(0, photos.maxPerReview)
11976
+ * .map(f => client.uploadReviewPhoto(productId, f))
11977
+ * );
11978
+ * await client.submitProductReview(productId, {
11979
+ * rating: 5,
11980
+ * body: 'Arrived beautifully wrapped.',
11981
+ * imageKeys: uploads.map(u => u.key),
11982
+ * });
11983
+ * }
11984
+ * ```
11985
+ */
11986
+ uploadReviewPhoto(productId: string, file: File | Blob): Promise<ReviewPhotoUpload>;
11535
11987
  /**
11536
11988
  * @deprecated Retiring, but there is no API-key replacement yet: `getStoreTeam`
11537
11989
  * is dashboard-only (403 for api_key). Keep using this until one ships.
@@ -11841,7 +12293,7 @@ declare class BrainerceError extends Error {
11841
12293
  constructor(message: string, statusCode: number, details?: unknown);
11842
12294
  }
11843
12295
 
11844
- declare const SDK_VERSION = "1.54.0";
12296
+ declare const SDK_VERSION = "2.0.0";
11845
12297
 
11846
12298
  /**
11847
12299
  * Verify a webhook signature from Brainerce
@@ -11987,7 +12439,20 @@ declare function formatMoney(amount: number, currency: string, locale?: string):
11987
12439
  * generally need this (only admins author the config), but it's exposed for
11988
12440
  * any storefront building its own admin-like UI on top of the SDK.
11989
12441
  */
11990
- declare function validateDateAvailabilityConfig(config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME'): string[];
12442
+ /**
12443
+ * Which definition family a config belongs to. It matters because the relative
12444
+ * bounds are answers to "how long before the requested date must the ORDER
12445
+ * arrive", and only the checkout surface has an order arriving.
12446
+ *
12447
+ * A product metafield and an order custom field are both written by an admin,
12448
+ * often long after the fact: a merchant correcting yesterday's delivery date
12449
+ * would be refused against a lead time measured from today. So those two
12450
+ * surfaces reject the relative keys outright, the same way a DATE field
12451
+ * already rejects `businessHours`. `minDate`/`maxDate`/`blockedDates` stay
12452
+ * available everywhere.
12453
+ */
12454
+ type DateAvailabilitySurface = 'checkout' | 'product' | 'order';
12455
+ declare function validateDateAvailabilityConfig(config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME', surface?: DateAvailabilitySurface): string[];
11991
12456
  interface StoreLocalParts {
11992
12457
  /** "YYYY-MM-DD" in the given timezone. */
11993
12458
  dateYYYYMMDD: string;
@@ -12004,6 +12469,56 @@ interface StoreLocalParts {
12004
12469
  * Falls back to UTC parts on an invalid IANA timezone string — never throws.
12005
12470
  */
12006
12471
  declare function resolveStoreLocalParts(instant: Date, timezone: string): StoreLocalParts;
12472
+ /**
12473
+ * The "when is now" half of a relative constraint. `leadTimeMinutes`,
12474
+ * `cutoffTime` and `maxDaysAhead` cannot be resolved from the config alone,
12475
+ * so every function that honours them accepts one of these.
12476
+ *
12477
+ * Leaving it out is allowed and means "skip the relative bounds"; the
12478
+ * absolute ones (min/max date, blocked days, business hours) still apply.
12479
+ * That degradation is deliberate and safe in exactly one direction: a picker
12480
+ * built without a clock offers MORE dates than the server will accept, never
12481
+ * fewer. The server always passes one, so this is never the enforcement path.
12482
+ */
12483
+ interface AvailabilityClock {
12484
+ /** IANA timezone of the store: `getStoreInfo().timezone`, never the buyer's. */
12485
+ timezone: string;
12486
+ /** Defaults to the current instant. Pass it explicitly to keep tests deterministic. */
12487
+ now?: Date;
12488
+ }
12489
+ /** The concrete dates the relative constraints resolve to at one moment in time. */
12490
+ interface RelativeDateBounds {
12491
+ /** Earliest bookable calendar date, "YYYY-MM-DD" store-local. Absent = no relative floor. */
12492
+ earliestDate?: string;
12493
+ /** Latest bookable calendar date, "YYYY-MM-DD" store-local. Absent = no relative ceiling. */
12494
+ latestDate?: string;
12495
+ /**
12496
+ * Earliest bookable instant, from `leadTimeMinutes` alone. Finer-grained
12497
+ * than `earliestDate`: on the boundary day this is what rules out the slots
12498
+ * that have already gone past, without ruling out the whole date.
12499
+ */
12500
+ earliestInstant?: Date;
12501
+ }
12502
+ /**
12503
+ * Resolves the relative constraints into the concrete dates they mean right now.
12504
+ *
12505
+ * `minDate`/`maxDate` are absolute strings compared lexically, so a merchant
12506
+ * who means "earliest is tomorrow" watches that answer rot overnight and go on
12507
+ * rotting. These three keys are the relative counterparts, re-resolved on
12508
+ * every call:
12509
+ *
12510
+ * - `leadTimeMinutes` — preparation time. The floor is `now + leadTime`.
12511
+ * - `cutoffTime` — the daily order deadline, store-local "HH:mm". Once the
12512
+ * store-local clock reaches it, the floor moves on by a further day. This is
12513
+ * the rule that stops orders pouring in for a day whose picking run is
12514
+ * already planned, which is where a holiday-eve backlog actually starts.
12515
+ * - `maxDaysAhead` — a rolling ceiling measured from today rather than from a
12516
+ * fixed calendar date.
12517
+ *
12518
+ * Returns an empty object when no relative key is set or no clock was given,
12519
+ * which is what lets every caller take `clock` as an optional argument.
12520
+ */
12521
+ declare function resolveRelativeBounds(config: DateAvailabilityConstraints | null | undefined, clock: AvailabilityClock | null | undefined): RelativeDateBounds;
12007
12522
  interface ParsedDateFieldValue {
12008
12523
  /**
12009
12524
  * The absolute instant the value denotes. For a DATE field this is UTC
@@ -12052,7 +12567,7 @@ type DateFieldParseResult = {
12052
12567
  */
12053
12568
  declare function parseDateFieldValue(raw: unknown, fieldType: 'DATE' | 'DATETIME', timezone: string): DateFieldParseResult;
12054
12569
  /** Day-level gate: minDate/maxDate/blockedWeekdays/blockedDates only (no time-of-day). */
12055
- declare function isCalendarDateAllowed(dateYYYYMMDD: string, config: DateAvailabilityConstraints | null | undefined): boolean;
12570
+ declare function isCalendarDateAllowed(dateYYYYMMDD: string, config: DateAvailabilityConstraints | null | undefined, clock?: AvailabilityClock | null): boolean;
12056
12571
  /**
12057
12572
  * Discrete slot starts ("HH:mm", store-local) for one calendar date. Empty
12058
12573
  * array if: the date fails `isCalendarDateAllowed`, no `businessHours` window
@@ -12069,7 +12584,7 @@ declare function isCalendarDateAllowed(dateYYYYMMDD: string, config: DateAvailab
12069
12584
  * const slots = computeAvailableSlots(deliveryField?.dateAvailability, local.dateYYYYMMDD);
12070
12585
  * ```
12071
12586
  */
12072
- declare function computeAvailableSlots(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string): string[];
12587
+ declare function computeAvailableSlots(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string, clock?: AvailabilityClock | null): string[];
12073
12588
  /**
12074
12589
  * The open/close windows that apply on one calendar date — `[]` when the date
12075
12590
  * is blocked outright or the weekday has no window (which, per
@@ -12082,14 +12597,14 @@ declare function computeAvailableSlots(config: DateAvailabilityConstraints | nul
12082
12597
  * time input by these windows", which is exactly what `isDateValueAllowed`
12083
12598
  * enforces on the way back in.
12084
12599
  */
12085
- declare function getBusinessHoursForDate(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string): BusinessHoursWindow[];
12600
+ declare function getBusinessHoursForDate(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string, clock?: AvailabilityClock | null): BusinessHoursWindow[];
12086
12601
  /**
12087
12602
  * Full value validation for a candidate date/datetime a shopper is about to
12088
12603
  * submit — use this to disable a "Continue" button client-side before the
12089
12604
  * backend's own (authoritative) rejection would otherwise surface as an
12090
12605
  * error after a round trip.
12091
12606
  */
12092
- declare function isDateValueAllowed(instant: Date, config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME', timezone: string): {
12607
+ declare function isDateValueAllowed(instant: Date, config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME', timezone: string, now?: Date): {
12093
12608
  allowed: boolean;
12094
12609
  reason?: string;
12095
12610
  };
@@ -12279,4 +12794,4 @@ interface CategorySitemapOptions {
12279
12794
  */
12280
12795
  declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
12281
12796
 
12282
- export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AttachModifierGroupInput, type Attribute, type AttributeOption, type AttributeSource, 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 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 DateFieldParseResult, type DeleteProductResponse, 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 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 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 ProductSitemapOptions, 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 ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, 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 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 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, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
12797
+ export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AttachModifierGroupInput, type Attribute, 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 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 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 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 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 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 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 };