brainerce 1.59.0 → 1.63.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;
@@ -787,6 +814,30 @@ interface Product {
787
814
  createdAt: string;
788
815
  updatedAt: string;
789
816
  }
817
+ /**
818
+ * A customer-uploaded photo on a review, as shoppers see it.
819
+ * `width`/`height` are the intrinsic pixel size — set them on your `<img>` so the
820
+ * gallery reserves space instead of shifting layout as photos load.
821
+ */
822
+ interface ProductReviewImage {
823
+ id: string;
824
+ url: string;
825
+ thumbnailUrl: string | null;
826
+ width: number | null;
827
+ height: number | null;
828
+ position: number;
829
+ }
830
+ /**
831
+ * Moderation view of a photo — adds the two states a shopper never sees.
832
+ * `approvedAt: null` means the photo is waiting on the merchant, which only ever
833
+ * happens on stores that opted into review-photo approval.
834
+ */
835
+ interface ProductReviewImageAdmin extends ProductReviewImage {
836
+ assetKey: string;
837
+ approvedAt: string | null;
838
+ hiddenAt: string | null;
839
+ createdAt: string;
840
+ }
790
841
  /**
791
842
  * Product review submitted by a customer.
792
843
  * Reviews publish immediately (no PENDING state). Merchants hide via the admin
@@ -802,13 +853,17 @@ interface ProductReview {
802
853
  /** Only present in admin responses; null on storefront responses. */
803
854
  hiddenAt?: string | null;
804
855
  createdAt: string;
856
+ /** Visible photos, in display order. Always an array; empty when there are none. */
857
+ images: ProductReviewImage[];
805
858
  }
806
859
  /** Admin-mode review with full PII. Returned by `client.adminReviews.*`. */
807
- interface ProductReviewAdmin extends ProductReview {
860
+ interface ProductReviewAdmin extends Omit<ProductReview, 'images'> {
808
861
  customerId: string | null;
809
862
  authorEmail: string | null;
810
863
  orderId: string | null;
811
864
  updatedAt: string;
865
+ /** ALL photos, including pending and hidden — this is the moderation surface. */
866
+ images: ProductReviewImageAdmin[];
812
867
  }
813
868
  /**
814
869
  * Body for customer-authenticated submit / update.
@@ -817,6 +872,16 @@ interface ProductReviewAdmin extends ProductReview {
817
872
  interface WriteProductReviewInput {
818
873
  rating: number;
819
874
  body?: string;
875
+ /**
876
+ * Storage keys from `uploadReviewPhoto()`, in display order. Keys, not URLs —
877
+ * the server resolves each one against the store's own assets and rejects
878
+ * anything that is not a review photo.
879
+ *
880
+ * On update this REPLACES the photo set, so pass the keys you want to keep.
881
+ * OMITTING the field leaves the existing photos untouched; passing `[]` removes
882
+ * them all.
883
+ */
884
+ imageKeys?: string[];
820
885
  }
821
886
  /**
822
887
  * @deprecated Use `WriteProductReviewInput`. Customers no longer pass author info
@@ -826,6 +891,15 @@ interface SubmitProductReviewInput extends WriteProductReviewInput {
826
891
  authorName?: string;
827
892
  authorEmail?: string;
828
893
  }
894
+ /** What `uploadReviewPhoto()` gives back. Pass `key` to the submit/update call. */
895
+ interface ReviewPhotoUpload {
896
+ /** The value to put in `imageKeys`. */
897
+ key: string;
898
+ /** For rendering a local preview before submitting. Not what you send back. */
899
+ url: string;
900
+ width: number | null;
901
+ height: number | null;
902
+ }
829
903
  /**
830
904
  * Returned by `client.getMyProductReview(productId)`. Tells the storefront which
831
905
  * UI to render: sign-in / not-eligible / submit / edit.
@@ -836,6 +910,24 @@ interface MyProductReview {
836
910
  reason: 'no_eligible_order' | 'reviews_disabled' | 'product_not_found' | null;
837
911
  /** The customer's existing review for this product, or null. */
838
912
  myReview: ProductReview | null;
913
+ /**
914
+ * The store's photo policy. Read this instead of hard-coding limits: render the
915
+ * picker only when `enabled`, cap selection at `maxPerReview`, reject oversized
916
+ * files client-side at `maxBytes`, and when `requiresApproval` is true tell the
917
+ * customer their photo waits for the merchant before it appears.
918
+ */
919
+ photos: {
920
+ enabled: boolean;
921
+ maxPerReview: number;
922
+ maxBytes: number;
923
+ requiresApproval: boolean;
924
+ };
925
+ /**
926
+ * The customer's OWN photos including any still pending, so you can show them
927
+ * their upload sitting in the queue rather than looking like it failed. Note
928
+ * `myReview.images` carries only the publicly visible subset.
929
+ */
930
+ myImages: ProductReviewImageAdmin[];
839
931
  }
840
932
  interface ProductImage {
841
933
  url: string;
@@ -940,6 +1032,18 @@ interface InventoryInfo {
940
1032
  * false if trackingMode is DISABLED or if out of stock.
941
1033
  */
942
1034
  canPurchase: boolean;
1035
+ /**
1036
+ * Whether the merchant lets this item be ordered while out of stock.
1037
+ * Present on `TRACKED` items only — the one mode where it means anything.
1038
+ *
1039
+ * Use it to decide where a back-in-stock alert belongs: an alert on a
1040
+ * backorderable item tells someone to come back and do what they can already
1041
+ * do, so `stockAlerts.subscribe()` silently discards those requests. The gate
1042
+ * is `!canPurchase && trackingMode === 'TRACKED' && backorderMode === 'NONE'`.
1043
+ *
1044
+ * Absent on older backends — treat `undefined` as `'NONE'`.
1045
+ */
1046
+ backorderMode?: 'NONE' | 'ALLOW' | 'NOTIFY';
943
1047
  /** Last inventory sync timestamp (admin mode only) */
944
1048
  lastInventorySyncAt?: string | null;
945
1049
  }
@@ -1725,7 +1829,14 @@ interface Order {
1725
1829
  notes?: string | null;
1726
1830
  /** Payment method used (e.g., "card", "paypal", "cash_on_delivery"). */
1727
1831
  paymentMethod?: string | null;
1728
- /** Financial status: "pending", "paid", "refunded", "partially_refunded", "voided". */
1832
+ /**
1833
+ * Financial status: "pending", "authorized", "partially_paid", "paid",
1834
+ * "partially_refunded", "refunded", "voided".
1835
+ *
1836
+ * `"paid"` does not imply a payment provider was involved — a merchant can
1837
+ * record an out-of-band payment (cash on delivery, bank transfer) and the
1838
+ * order reads `"paid"` with no provider behind it.
1839
+ */
1729
1840
  financialStatus?: string | null;
1730
1841
  /** Fulfillment status: "unfulfilled", "partial", "fulfilled". */
1731
1842
  fulfillmentStatus?: string | null;
@@ -2114,9 +2225,32 @@ interface Customer {
2114
2225
  hasAccount: boolean;
2115
2226
  emailVerified: boolean;
2116
2227
  acceptsMarketing: boolean;
2228
+ /**
2229
+ * Whether a marketing campaign can actually REACH this address — a different
2230
+ * question from `acceptsMarketing`. Audience resolution drops a recipient on
2231
+ * either the consent flag or a suppression row, and the suppression row wins:
2232
+ * an address whose consent box was re-ticked in the dashboard still reads
2233
+ * `'UNSUBSCRIBED'`, because only the recipient's own confirmed opt-in clears
2234
+ * it. `'BLOCKED'` cannot be cleared at all. Only `'SUBSCRIBED'` is mailable.
2235
+ *
2236
+ * Returned by the single-customer read (`GET /api/v1/customers/{id}`) and by
2237
+ * the customer list. Optional because it is computed, not stored: responses
2238
+ * that never compute it (create, update, register) omit it rather than
2239
+ * guessing, and an older API build omits it everywhere. Fall back to
2240
+ * `acceptsMarketing` when it is absent.
2241
+ */
2242
+ marketingStatus?: 'SUBSCRIBED' | 'NOT_SUBSCRIBED' | 'UNSUBSCRIBED' | 'BOUNCED' | 'COMPLAINED' | 'BLOCKED';
2117
2243
  tags: string[];
2118
2244
  /** Free-form segment set by the merchant (e.g. "wholesale", "vip") — use to gate custom storefront features. Admin-set only, never customer-editable. */
2119
2245
  role?: string;
2246
+ /**
2247
+ * Birthday month (1-12) the customer saved. Month and day only, never a
2248
+ * year. Returned together with `birthDay` or not at all, so a form can test
2249
+ * one field and trust the other.
2250
+ */
2251
+ birthMonth?: number;
2252
+ /** Birthday day of the month (1-31). Returned together with `birthMonth` or not at all. */
2253
+ birthDay?: number;
2120
2254
  totalOrders: number;
2121
2255
  lastOrderAt?: string;
2122
2256
  metadata?: Record<string, unknown>;
@@ -2217,6 +2351,13 @@ interface CheckoutPrefillData {
2217
2351
  lastName?: string;
2218
2352
  phone?: string;
2219
2353
  emailVerified: boolean;
2354
+ /**
2355
+ * Birthday month (1-12). Month and day only, never a year. Returned
2356
+ * together with `birthDay` or not at all.
2357
+ */
2358
+ birthMonth?: number;
2359
+ /** Birthday day of the month (1-31). Returned together with `birthMonth` or not at all. */
2360
+ birthDay?: number;
2220
2361
  };
2221
2362
  /** Customer's default address (if any) */
2222
2363
  defaultAddress: CustomerAddress | null;
@@ -2249,6 +2390,15 @@ interface CreateCustomerDto {
2249
2390
  tags?: string[];
2250
2391
  /** Free-form merchant-set segment (e.g. "wholesale", "vip"), max 50 chars. */
2251
2392
  role?: string;
2393
+ /**
2394
+ * Birthday month (1-12). Month and day only, never a year, so there is no
2395
+ * age to store. Send `birthMonth` and `birthDay` together: one without the
2396
+ * other is rejected with HTTP 400, and so is a day the month does not have
2397
+ * (February has no 31st).
2398
+ */
2399
+ birthMonth?: number;
2400
+ /** Birthday day of the month (1-31). Send it together with `birthMonth`. */
2401
+ birthDay?: number;
2252
2402
  /**
2253
2403
  * Explicit FIRST-TOUCH channel (internal SalesChannel id or public `vc_*`).
2254
2404
  * Creating a customer through the API is not itself a channel sighting, so
@@ -2388,6 +2538,19 @@ interface RegisterCustomerDto {
2388
2538
  lastName?: string;
2389
2539
  phone?: string;
2390
2540
  acceptsMarketing?: boolean;
2541
+ /**
2542
+ * Birthday month (1-12). Month and day only, never a year, so there is no
2543
+ * age to store. Send `birthMonth` and `birthDay` together: one without the
2544
+ * other is rejected with HTTP 400, and so is a day the month does not have.
2545
+ *
2546
+ * Optional by default. A merchant can make the birthday mandatory at
2547
+ * registration on a sales channel, which surfaces as `requireBirthday` on
2548
+ * `getStoreInfo()`; on such a channel a register call that omits the two
2549
+ * fields is rejected with HTTP 400.
2550
+ */
2551
+ birthMonth?: number;
2552
+ /** Birthday day of the month (1-31). Send it together with `birthMonth`. */
2553
+ birthDay?: number;
2391
2554
  /**
2392
2555
  * Loyalty referral share code (REF-XXXXXXXX) from a referrer's link.
2393
2556
  * Validated asynchronously after registration — an invalid code never fails
@@ -5124,6 +5287,25 @@ interface DateAvailabilityConstraints {
5124
5287
  minDate?: string;
5125
5288
  /** "YYYY-MM-DD", inclusive. */
5126
5289
  maxDate?: string;
5290
+ /**
5291
+ * Preparation time in minutes. The earliest bookable moment is
5292
+ * `now + leadTimeMinutes`, re-resolved on every call. This is the thing
5293
+ * `minDate` cannot express: an absolute date authored to mean "tomorrow"
5294
+ * is wrong by the following morning and goes on being wrong.
5295
+ */
5296
+ leadTimeMinutes?: number;
5297
+ /**
5298
+ * Rolling ceiling in days, counted from today store-local. Stands to
5299
+ * `leadTimeMinutes` as `maxDate` stands to `minDate`, without the rot.
5300
+ * Both may be set at once; whichever ceiling falls earlier wins.
5301
+ */
5302
+ maxDaysAhead?: number;
5303
+ /**
5304
+ * Daily order deadline, store-local "HH:mm". At or past it, the earliest
5305
+ * bookable date moves on by a further day. This is the rule that keeps new
5306
+ * orders out of a day whose picking run has already been planned.
5307
+ */
5308
+ cutoffTime?: string;
5127
5309
  /** Subset of 0-6; any weekday(s) fully blocked regardless of date. */
5128
5310
  blockedWeekdays?: number[];
5129
5311
  /** Specific blocked calendar dates, e.g. holidays: ["2026-12-25"]. */
@@ -6234,6 +6416,72 @@ interface ContactFormSummary {
6234
6416
  name: string;
6235
6417
  isDefault: boolean;
6236
6418
  }
6419
+ interface SubscribeMarketingInput {
6420
+ /** Address to subscribe. Lowercased and trimmed server-side. */
6421
+ email: string;
6422
+ /** Given name, when the form collects one — greets them in the confirmation email. */
6423
+ firstName?: string;
6424
+ /** Family name, when the form collects one. */
6425
+ lastName?: string;
6426
+ /**
6427
+ * Storefront locale at submission time, e.g. `"he"`. Picks the language of
6428
+ * the confirmation email. Falls back to the store language when omitted —
6429
+ * pass it on a multi-language storefront or Hebrew shoppers get English.
6430
+ */
6431
+ locale?: string;
6432
+ /** Where the signup came from — `"popup"`, `"footer"`, `"exit-intent"`. Free-form. */
6433
+ source?: string;
6434
+ /** Arbitrary provenance: referrer, UTM params, the page the popup fired on. */
6435
+ sourceMetadata?: Record<string, unknown>;
6436
+ /**
6437
+ * Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
6438
+ * non-empty value rejects the request. Bots fill every text input.
6439
+ */
6440
+ honeypot?: string;
6441
+ }
6442
+ /**
6443
+ * Deliberately uniform — identical for a brand-new address, one that already
6444
+ * confirmed, and one suppressed for a hard bounce. The endpoint cannot be used
6445
+ * to test whether somebody is a customer of the store, so there is nothing here
6446
+ * to branch on: show one "check your email" message for every success.
6447
+ */
6448
+ interface SubscribeMarketingResponse {
6449
+ ok: true;
6450
+ }
6451
+ interface CreateStockAlertInput {
6452
+ /** Address to notify. Lowercased and trimmed server-side. */
6453
+ email: string;
6454
+ /** Product the shopper is waiting for. */
6455
+ productId: string;
6456
+ /**
6457
+ * Specific variant, when the product has them. An alert on the blue medium
6458
+ * fires only when the blue medium is back, never when another size returns —
6459
+ * so pass this on any variable product, or shoppers get alerts for stock they
6460
+ * cannot use.
6461
+ */
6462
+ variantId?: string;
6463
+ /**
6464
+ * Storefront locale at submission time, e.g. `"he"`. Sets the language of the
6465
+ * alert email. Falls back to the store language when omitted, so pass it on a
6466
+ * multi-language storefront or Hebrew shoppers get English.
6467
+ */
6468
+ locale?: string;
6469
+ /**
6470
+ * Anti-bot honeypot. Render a hidden input and pass whatever it holds; a
6471
+ * non-empty value rejects the request. Bots fill every text input.
6472
+ */
6473
+ honeypot?: string;
6474
+ }
6475
+ /**
6476
+ * Deliberately uniform — identical for a new request, a duplicate, an unknown
6477
+ * product, an item that is already in stock, and an address that has bounced
6478
+ * before. The endpoint cannot be used to read a store's stock levels or
6479
+ * customer list, so there is nothing here to branch on: show one "we will email
6480
+ * you" message for every success.
6481
+ */
6482
+ interface StockAlertResponse {
6483
+ ok: true;
6484
+ }
6237
6485
  type ContentType = 'FAQ' | 'FOOTER' | 'HEADER' | 'ANNOUNCEMENT' | 'RICH_TEXT' | 'PAGE';
6238
6486
  type ContentStatus = 'DRAFT' | 'PUBLISHED';
6239
6487
  interface FaqItem {
@@ -8215,6 +8463,11 @@ declare class BrainerceClient {
8215
8463
  * Register a new customer with password (creates account)
8216
8464
  * Works in vibe-coded, storefront, and admin mode
8217
8465
  *
8466
+ * `birthMonth`/`birthDay` are optional and must be sent together. When
8467
+ * `getStoreInfo().requireBirthday` is true the merchant made the birthday
8468
+ * mandatory on that sales channel, and a call without both fields is
8469
+ * rejected with HTTP 400.
8470
+ *
8218
8471
  * @example
8219
8472
  * ```typescript
8220
8473
  * const auth = await client.registerCustomer({
@@ -8222,6 +8475,8 @@ declare class BrainerceClient {
8222
8475
  * password: 'securepassword123',
8223
8476
  * firstName: 'Jane',
8224
8477
  * lastName: 'Doe',
8478
+ * birthMonth: 4, // optional, unless the channel requires a birthday
8479
+ * birthDay: 17,
8225
8480
  * });
8226
8481
  * ```
8227
8482
  */
@@ -8595,6 +8850,67 @@ declare class BrainerceClient {
8595
8850
  */
8596
8851
  get: (formKey?: string, locale?: string) => Promise<ContactFormPublic>;
8597
8852
  };
8853
+ /**
8854
+ * Email marketing signup for a storefront — a newsletter popup, a footer
8855
+ * capture bar, an exit-intent modal.
8856
+ *
8857
+ * **Confirmed opt-in, always.** `subscribe()` creates the contact and mails
8858
+ * them a confirmation link. The address is NOT subscribed and CANNOT receive
8859
+ * a campaign until the recipient clicks that link. This is not a setting:
8860
+ * consent has to come from the mailbox, or anyone could subscribe anyone.
8861
+ *
8862
+ * So do not render "You're subscribed!" on success — render "Check your
8863
+ * email to confirm." The one is a lie until the click lands.
8864
+ *
8865
+ * The response is identical for a brand-new address, one that is already
8866
+ * subscribed, and one suppressed after a bounce, so the form can't be used to
8867
+ * probe who shops here. Show the same message for every success.
8868
+ *
8869
+ * Storefront (public) and vibe-coded modes only. Rate-limited server-side to
8870
+ * 3 requests / 60s per IP, plus one confirmation email per address per 24h.
8871
+ *
8872
+ * **Where the discount goes.** A "10% off your first order" popup needs a
8873
+ * coupon from the dashboard — create one with the `customer_first_order`
8874
+ * condition and show the code after a successful call. Subscribing does not
8875
+ * mint a code on its own.
8876
+ *
8877
+ * @example
8878
+ * ```typescript
8879
+ * // Newsletter popup — hidden honeypot input, Hebrew storefront
8880
+ * await brainerce.marketing.subscribe({
8881
+ * email: 'jane@example.com',
8882
+ * locale: 'he',
8883
+ * source: 'popup',
8884
+ * honeypot: hiddenFieldValue,
8885
+ * });
8886
+ * // → show "בדקו את המייל שלכם כדי לאשר" — NOT "נרשמת בהצלחה"
8887
+ * ```
8888
+ */
8889
+ marketing: {
8890
+ subscribe: (input: SubscribeMarketingInput) => Promise<SubscribeMarketingResponse>;
8891
+ };
8892
+ /**
8893
+ * "Email me when this is back."
8894
+ *
8895
+ * ⛔ Not a newsletter signup, and must not be worded as one. It grants no
8896
+ * marketing consent, creates no customer account, and the person is never
8897
+ * mailed anything else as a result — exactly one message, about this item,
8898
+ * with a link that stops it. Someone who unsubscribed from marketing can
8899
+ * still use this, so do not gate it on consent.
8900
+ *
8901
+ * Show the affordance only on an item that is out of stock AND cannot be
8902
+ * backordered. Every other case is silently ignored server-side — the
8903
+ * response is uniform on purpose, so it cannot be used to read stock levels
8904
+ * or test who is a customer — which means a button on an in-stock item looks
8905
+ * like it worked and does nothing.
8906
+ *
8907
+ * Pass `variantId` on any product with variants. Without it the alert waits
8908
+ * on the product as a whole, and a shopper who wanted the medium hears when
8909
+ * the small comes back.
8910
+ */
8911
+ stockAlerts: {
8912
+ subscribe: (input: CreateStockAlertInput) => Promise<StockAlertResponse>;
8913
+ };
8598
8914
  /**
8599
8915
  * Typed merchant content store: FAQ, Footer, Header, Announcement,
8600
8916
  * Rich Text, and Page.
@@ -9069,15 +9385,26 @@ declare class BrainerceClient {
9069
9385
  * List visible reviews for a product (storefront / sales-channel modes).
9070
9386
  * Reviews that the merchant has hidden are excluded.
9071
9387
  *
9388
+ * Each review carries `images` — the photos its author attached, already
9389
+ * filtered to the ones shoppers are allowed to see. Always an array.
9390
+ *
9391
+ * Ordering defaults to `photos_first`: reviews carrying photos lead, newest-first
9392
+ * within each group. Pass `sort: 'newest'` for plain chronological order. On a
9393
+ * store with no review photos the two are identical.
9394
+ *
9072
9395
  * @example
9073
9396
  * ```typescript
9074
9397
  * const { data, meta } = await client.listProductReviews('prod_123', { page: 1, limit: 20 });
9075
- * data.forEach(r => console.log(r.rating, r.body, r.verifiedPurchase));
9398
+ * data.forEach(r => {
9399
+ * console.log(r.rating, r.body, r.verifiedPurchase);
9400
+ * r.images.forEach(img => console.log(img.thumbnailUrl ?? img.url));
9401
+ * });
9076
9402
  * ```
9077
9403
  */
9078
9404
  listProductReviews(productId: string, params?: {
9079
9405
  page?: number;
9080
9406
  limit?: number;
9407
+ sort?: 'photos_first' | 'newest';
9081
9408
  }): Promise<PaginatedResponse<ProductReview>>;
9082
9409
  /**
9083
9410
  * Get the current customer's review state for a product (storefront / sales-channel modes).
@@ -9136,6 +9463,17 @@ declare class BrainerceClient {
9136
9463
  }): Promise<PaginatedResponse<ProductReviewAdmin>>;
9137
9464
  /** Admin: hide a review (sets hiddenAt). */
9138
9465
  hideProductReview(reviewId: string, storeId?: string): Promise<ProductReviewAdmin>;
9466
+ /**
9467
+ * Admin: hide ONE photo on a review, leaving the review and its other photos
9468
+ * visible. Requires an API key with `reviews:write`.
9469
+ */
9470
+ hideProductReviewImage(imageId: string, storeId?: string): Promise<ProductReviewImageAdmin>;
9471
+ /**
9472
+ * Admin: show one review photo. This is also the approve action — a photo that
9473
+ * has never been approved carries no `approvedAt`, and showing it stamps one, so
9474
+ * stores using review-photo approval need no separate verb.
9475
+ */
9476
+ showProductReviewImage(imageId: string, storeId?: string): Promise<ProductReviewImageAdmin>;
9139
9477
  /** Admin: unhide a previously hidden review. */
9140
9478
  showProductReview(reviewId: string, storeId?: string): Promise<ProductReviewAdmin>;
9141
9479
  /**
@@ -10357,19 +10695,28 @@ declare class BrainerceClient {
10357
10695
  */
10358
10696
  getCheckoutPrefillData(): Promise<CheckoutPrefillData>;
10359
10697
  /**
10360
- * Update the current customer's profile (requires customerToken)
10361
- * Only available in storefront mode
10698
+ * Update the current customer's profile (requires customerToken).
10699
+ * Only available in storefront and vibe-coded mode.
10362
10700
  *
10363
- * `birthMonth`/`birthDay` (1-12 / 1-31, no year — privacy) power the loyalty
10364
- * birthday gift; they must be provided together.
10701
+ * `birthMonth`/`birthDay` (1-12 / 1-31) power the loyalty birthday gift.
10702
+ * Month and day only, never a year, for privacy. Send both or neither, and
10703
+ * the day has to exist in the month: anything else is rejected with HTTP 400.
10704
+ * Send `null` for both to REMOVE a stored birthday. Leaving the keys out is a
10705
+ * different request and keeps the stored value, so a profile form whose
10706
+ * fields the shopper cleared has to send nulls, not omit them.
10707
+ *
10708
+ * The saved values now come back on the returned `CustomerProfile`, on
10709
+ * `getMyProfile()` and on every customer read type, so a profile form can
10710
+ * re-render the birthday it just saved. Before this, no API returned the two
10711
+ * fields at all and the form always came back blank.
10365
10712
  */
10366
10713
  updateMyProfile(data: {
10367
10714
  firstName?: string;
10368
10715
  lastName?: string;
10369
10716
  phone?: string;
10370
10717
  acceptsMarketing?: boolean;
10371
- birthMonth?: number;
10372
- birthDay?: number;
10718
+ birthMonth?: number | null;
10719
+ birthDay?: number | null;
10373
10720
  }): Promise<CustomerProfile>;
10374
10721
  /**
10375
10722
  * Get the logged-in customer's loyalty status: enrollment, points balance,
@@ -11532,6 +11879,50 @@ declare class BrainerceClient {
11532
11879
  url: string;
11533
11880
  key: string;
11534
11881
  }>;
11882
+ /**
11883
+ * Upload one photo to attach to a product review.
11884
+ *
11885
+ * Available in storefront and vibe-coded modes, and — unlike
11886
+ * `uploadCustomizationFile` — it REQUIRES a logged-in customer who has actually
11887
+ * bought the product. Call `setCustomerToken(...)` first. That is the same bar as
11888
+ * writing the review itself, checked here so an ineligible shopper is told before
11889
+ * they wait for the upload rather than after.
11890
+ *
11891
+ * Returns a storage `key`. Collect the keys and pass them as `imageKeys` when you
11892
+ * submit or update the review — the `url` is for a local preview only, and sending
11893
+ * it back instead of the key will be rejected.
11894
+ *
11895
+ * Server rules:
11896
+ * - `image/jpeg|png|webp|gif` only, cross-checked against the file's real bytes.
11897
+ * - Max 5 MB and 40 megapixels per file.
11898
+ * - Throttled to 10 uploads / minute → HTTP 429.
11899
+ * - 403 when the store has review photos turned off, or the customer has not
11900
+ * bought the product; 400 once the review is already at its photo cap.
11901
+ * - EXIF is stripped (so GPS coordinates never reach the storefront) while the
11902
+ * orientation tag is applied first, so phone photos stay upright.
11903
+ * - A photo uploaded but never attached to a submitted review is reclaimed after
11904
+ * 7 days.
11905
+ *
11906
+ * Read `photos` from `getMyProductReview()` for the store's live limits rather
11907
+ * than hard-coding them.
11908
+ *
11909
+ * @example
11910
+ * ```ts
11911
+ * const { photos } = await client.getMyProductReview(productId);
11912
+ * if (photos.enabled) {
11913
+ * const uploads = await Promise.all(
11914
+ * [...fileInput.files].slice(0, photos.maxPerReview)
11915
+ * .map(f => client.uploadReviewPhoto(productId, f))
11916
+ * );
11917
+ * await client.submitProductReview(productId, {
11918
+ * rating: 5,
11919
+ * body: 'Arrived beautifully wrapped.',
11920
+ * imageKeys: uploads.map(u => u.key),
11921
+ * });
11922
+ * }
11923
+ * ```
11924
+ */
11925
+ uploadReviewPhoto(productId: string, file: File | Blob): Promise<ReviewPhotoUpload>;
11535
11926
  /**
11536
11927
  * @deprecated Retiring, but there is no API-key replacement yet: `getStoreTeam`
11537
11928
  * is dashboard-only (403 for api_key). Keep using this until one ships.
@@ -11841,7 +12232,7 @@ declare class BrainerceError extends Error {
11841
12232
  constructor(message: string, statusCode: number, details?: unknown);
11842
12233
  }
11843
12234
 
11844
- declare const SDK_VERSION = "1.54.0";
12235
+ declare const SDK_VERSION = "1.60.0";
11845
12236
 
11846
12237
  /**
11847
12238
  * Verify a webhook signature from Brainerce
@@ -11987,7 +12378,20 @@ declare function formatMoney(amount: number, currency: string, locale?: string):
11987
12378
  * generally need this (only admins author the config), but it's exposed for
11988
12379
  * any storefront building its own admin-like UI on top of the SDK.
11989
12380
  */
11990
- declare function validateDateAvailabilityConfig(config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME'): string[];
12381
+ /**
12382
+ * Which definition family a config belongs to. It matters because the relative
12383
+ * bounds are answers to "how long before the requested date must the ORDER
12384
+ * arrive", and only the checkout surface has an order arriving.
12385
+ *
12386
+ * A product metafield and an order custom field are both written by an admin,
12387
+ * often long after the fact: a merchant correcting yesterday's delivery date
12388
+ * would be refused against a lead time measured from today. So those two
12389
+ * surfaces reject the relative keys outright, the same way a DATE field
12390
+ * already rejects `businessHours`. `minDate`/`maxDate`/`blockedDates` stay
12391
+ * available everywhere.
12392
+ */
12393
+ type DateAvailabilitySurface = 'checkout' | 'product' | 'order';
12394
+ declare function validateDateAvailabilityConfig(config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME', surface?: DateAvailabilitySurface): string[];
11991
12395
  interface StoreLocalParts {
11992
12396
  /** "YYYY-MM-DD" in the given timezone. */
11993
12397
  dateYYYYMMDD: string;
@@ -12004,6 +12408,56 @@ interface StoreLocalParts {
12004
12408
  * Falls back to UTC parts on an invalid IANA timezone string — never throws.
12005
12409
  */
12006
12410
  declare function resolveStoreLocalParts(instant: Date, timezone: string): StoreLocalParts;
12411
+ /**
12412
+ * The "when is now" half of a relative constraint. `leadTimeMinutes`,
12413
+ * `cutoffTime` and `maxDaysAhead` cannot be resolved from the config alone,
12414
+ * so every function that honours them accepts one of these.
12415
+ *
12416
+ * Leaving it out is allowed and means "skip the relative bounds"; the
12417
+ * absolute ones (min/max date, blocked days, business hours) still apply.
12418
+ * That degradation is deliberate and safe in exactly one direction: a picker
12419
+ * built without a clock offers MORE dates than the server will accept, never
12420
+ * fewer. The server always passes one, so this is never the enforcement path.
12421
+ */
12422
+ interface AvailabilityClock {
12423
+ /** IANA timezone of the store: `getStoreInfo().timezone`, never the buyer's. */
12424
+ timezone: string;
12425
+ /** Defaults to the current instant. Pass it explicitly to keep tests deterministic. */
12426
+ now?: Date;
12427
+ }
12428
+ /** The concrete dates the relative constraints resolve to at one moment in time. */
12429
+ interface RelativeDateBounds {
12430
+ /** Earliest bookable calendar date, "YYYY-MM-DD" store-local. Absent = no relative floor. */
12431
+ earliestDate?: string;
12432
+ /** Latest bookable calendar date, "YYYY-MM-DD" store-local. Absent = no relative ceiling. */
12433
+ latestDate?: string;
12434
+ /**
12435
+ * Earliest bookable instant, from `leadTimeMinutes` alone. Finer-grained
12436
+ * than `earliestDate`: on the boundary day this is what rules out the slots
12437
+ * that have already gone past, without ruling out the whole date.
12438
+ */
12439
+ earliestInstant?: Date;
12440
+ }
12441
+ /**
12442
+ * Resolves the relative constraints into the concrete dates they mean right now.
12443
+ *
12444
+ * `minDate`/`maxDate` are absolute strings compared lexically, so a merchant
12445
+ * who means "earliest is tomorrow" watches that answer rot overnight and go on
12446
+ * rotting. These three keys are the relative counterparts, re-resolved on
12447
+ * every call:
12448
+ *
12449
+ * - `leadTimeMinutes` — preparation time. The floor is `now + leadTime`.
12450
+ * - `cutoffTime` — the daily order deadline, store-local "HH:mm". Once the
12451
+ * store-local clock reaches it, the floor moves on by a further day. This is
12452
+ * the rule that stops orders pouring in for a day whose picking run is
12453
+ * already planned, which is where a holiday-eve backlog actually starts.
12454
+ * - `maxDaysAhead` — a rolling ceiling measured from today rather than from a
12455
+ * fixed calendar date.
12456
+ *
12457
+ * Returns an empty object when no relative key is set or no clock was given,
12458
+ * which is what lets every caller take `clock` as an optional argument.
12459
+ */
12460
+ declare function resolveRelativeBounds(config: DateAvailabilityConstraints | null | undefined, clock: AvailabilityClock | null | undefined): RelativeDateBounds;
12007
12461
  interface ParsedDateFieldValue {
12008
12462
  /**
12009
12463
  * The absolute instant the value denotes. For a DATE field this is UTC
@@ -12052,7 +12506,7 @@ type DateFieldParseResult = {
12052
12506
  */
12053
12507
  declare function parseDateFieldValue(raw: unknown, fieldType: 'DATE' | 'DATETIME', timezone: string): DateFieldParseResult;
12054
12508
  /** Day-level gate: minDate/maxDate/blockedWeekdays/blockedDates only (no time-of-day). */
12055
- declare function isCalendarDateAllowed(dateYYYYMMDD: string, config: DateAvailabilityConstraints | null | undefined): boolean;
12509
+ declare function isCalendarDateAllowed(dateYYYYMMDD: string, config: DateAvailabilityConstraints | null | undefined, clock?: AvailabilityClock | null): boolean;
12056
12510
  /**
12057
12511
  * Discrete slot starts ("HH:mm", store-local) for one calendar date. Empty
12058
12512
  * array if: the date fails `isCalendarDateAllowed`, no `businessHours` window
@@ -12069,7 +12523,7 @@ declare function isCalendarDateAllowed(dateYYYYMMDD: string, config: DateAvailab
12069
12523
  * const slots = computeAvailableSlots(deliveryField?.dateAvailability, local.dateYYYYMMDD);
12070
12524
  * ```
12071
12525
  */
12072
- declare function computeAvailableSlots(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string): string[];
12526
+ declare function computeAvailableSlots(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string, clock?: AvailabilityClock | null): string[];
12073
12527
  /**
12074
12528
  * The open/close windows that apply on one calendar date — `[]` when the date
12075
12529
  * is blocked outright or the weekday has no window (which, per
@@ -12082,14 +12536,14 @@ declare function computeAvailableSlots(config: DateAvailabilityConstraints | nul
12082
12536
  * time input by these windows", which is exactly what `isDateValueAllowed`
12083
12537
  * enforces on the way back in.
12084
12538
  */
12085
- declare function getBusinessHoursForDate(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string): BusinessHoursWindow[];
12539
+ declare function getBusinessHoursForDate(config: DateAvailabilityConstraints | null | undefined, dateYYYYMMDD: string, clock?: AvailabilityClock | null): BusinessHoursWindow[];
12086
12540
  /**
12087
12541
  * Full value validation for a candidate date/datetime a shopper is about to
12088
12542
  * submit — use this to disable a "Continue" button client-side before the
12089
12543
  * backend's own (authoritative) rejection would otherwise surface as an
12090
12544
  * error after a round trip.
12091
12545
  */
12092
- declare function isDateValueAllowed(instant: Date, config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME', timezone: string): {
12546
+ declare function isDateValueAllowed(instant: Date, config: DateAvailabilityConstraints | null | undefined, fieldType: 'DATE' | 'DATETIME', timezone: string, now?: Date): {
12093
12547
  allowed: boolean;
12094
12548
  reason?: string;
12095
12549
  };
@@ -12279,4 +12733,4 @@ interface CategorySitemapOptions {
12279
12733
  */
12280
12734
  declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
12281
12735
 
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 };
12736
+ 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 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 RelativeDateBounds, 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, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };