brainerce 2.5.0 → 2.8.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
@@ -294,7 +294,7 @@ interface StoreInfo {
294
294
  * Marketing tag ids for this sales channel (sales-channel mode only).
295
295
  *
296
296
  * Resolved server-side from the marketplace apps the merchant already
297
- * connected — connecting the Google & YouTube app runs GA4 discovery and the
297
+ * connected — connecting the Google app runs GA4 discovery and the
298
298
  * measurement id lands here on its own; same for the Meta and TikTok pixels.
299
299
  * The merchant types nothing, and the storefront needs no redeploy: a newly
300
300
  * connected app shows up here within 5 minutes.
@@ -313,7 +313,7 @@ interface StoreInfo {
313
313
  * it is safe to interpolate into a tag bootstrap.
314
314
  */
315
315
  interface StoreTracking {
316
- /** GA4 measurement id, `G-XXXXXXX`. Auto-discovered by the Google & YouTube app. */
316
+ /** GA4 measurement id, `G-XXXXXXX`. Auto-discovered by the Google app. */
317
317
  ga4MeasurementId?: string;
318
318
  /**
319
319
  * Google Tag Manager container id, `GTM-XXXXXX`. The one tag that cannot be
@@ -874,6 +874,21 @@ interface Product {
874
874
  * single product card always shows the lowest available price. Matches
875
875
  * WooCommerce / Shopify storefront semantics. For `SIMPLE` products it is
876
876
  * the product's own stored price.
877
+ *
878
+ * ⛔ ONE EXCEPTION, and the type does not model it: a `KIT` with nothing
879
+ * inside it, or one the server could not resolve, comes back from the public
880
+ * product reads with **no `basePrice` and no `salePrice` at all**, alongside
881
+ * `kitAvailable: 0`. Such a kit has no price — it resolves to zero, and
882
+ * returning that zero published a product that costs nothing. The fields are
883
+ * omitted rather than nulled on purpose: `Number(null)` is `0` and would put
884
+ * the free price straight back, while `Number(undefined)` is `NaN` and
885
+ * cannot be mistaken for an amount.
886
+ *
887
+ * So guard the kit case before you format: `product.basePrice` is
888
+ * `string | undefined` in practice, and calling `parseFloat` on it yields
889
+ * `NaN` for an unsellable kit. It is typed as required because widening it
890
+ * would be a breaking change for every storefront that reads an ordinary
891
+ * product's price, which is the overwhelmingly common case.
877
892
  */
878
893
  basePrice: string;
879
894
  /**
@@ -920,6 +935,10 @@ interface Product {
920
935
  * inventory row of its own (read `kitAvailable`), and outside FIXED pricing
921
936
  * its stored `basePrice` is a placeholder, though storefront reads overlay it
922
937
  * with the resolved price.
938
+ *
939
+ * A kit with NOTHING inside it has no price to overlay: the public reads omit
940
+ * `basePrice` and `salePrice` entirely and return `kitAvailable: 0`. Do not
941
+ * coerce the missing price to a number — see `basePrice`.
923
942
  */
924
943
  type: 'SIMPLE' | 'VARIABLE' | 'KIT';
925
944
  /**
@@ -950,6 +969,11 @@ interface Product {
950
969
  * figure and returns `salePrice: null`. Never cache a kit price or recompute
951
970
  * one client-side in these modes, and do not present a "was" price: there
952
971
  * isn't one.
972
+ *
973
+ * Present in every mode, EXCEPT on a kit the server could not resolve at all
974
+ * — that one arrives with no pricing mode and no prices, only
975
+ * `kitAvailable: 0`. Treat a kit with no `basePrice` as not for sale
976
+ * whatever its mode says.
953
977
  */
954
978
  kitPricingMode?: 'FIXED' | 'SUM' | 'SUM_MINUS_PERCENT';
955
979
  /** Whether product is downloadable/digital. */
@@ -2357,6 +2381,66 @@ interface CreateOrderDto {
2357
2381
  interface UpdateOrderDto {
2358
2382
  status?: OrderStatus;
2359
2383
  }
2384
+ /**
2385
+ * A merchant-defined field that can hold a value on an order.
2386
+ *
2387
+ * These are the fields the STORE manages on an order (`adminFieldValues`), not
2388
+ * the ones a shopper fills in during checkout. They are how an integration
2389
+ * attaches data that only exists after the purchase — a licence key, a booking
2390
+ * reference, a warranty number issued by a third party — to the order it
2391
+ * belongs to. What is written travels to the merchant's own order email
2392
+ * templates as `orderCustomFields`, so the customer can be told without a
2393
+ * bespoke email being built for each integration.
2394
+ *
2395
+ * ⛔ No default template PRINTS it. The merchant adds the block to their
2396
+ * template once; until then a written value is invisible to the customer.
2397
+ */
2398
+ interface OrderCustomFieldDefinition {
2399
+ id: string;
2400
+ storeId: string;
2401
+ /** Display label. Renders beside the value in order emails. */
2402
+ name: string;
2403
+ /** The property name to use in `setOrderCustomFieldValues`. */
2404
+ key: string;
2405
+ description: string | null;
2406
+ type: 'TEXT' | 'TEXTAREA' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'DATE' | 'DATETIME' | 'IMAGE';
2407
+ /** A required field cannot be cleared once it holds a value. */
2408
+ required: boolean;
2409
+ /**
2410
+ * When true the value is exposed to the storefront through the SDK, so the
2411
+ * customer can see it on their own order page and not only in the email.
2412
+ */
2413
+ isPublic: boolean;
2414
+ position: number;
2415
+ /**
2416
+ * An inactive definition refuses new values but still resolves its label on
2417
+ * orders that already carry one.
2418
+ */
2419
+ isActive: boolean;
2420
+ /** SELECT only. */
2421
+ options?: Array<{
2422
+ value: string;
2423
+ label: string;
2424
+ }> | null;
2425
+ minLength?: number | null;
2426
+ maxLength?: number | null;
2427
+ minValue?: string | null;
2428
+ maxValue?: string | null;
2429
+ dateAvailability?: unknown;
2430
+ translations?: Record<string, unknown> | null;
2431
+ createdAt: string;
2432
+ updatedAt: string;
2433
+ }
2434
+ /** The custom field values stored on one order, keyed by definition `key`. */
2435
+ interface OrderCustomFieldValues {
2436
+ orderId: string;
2437
+ /**
2438
+ * Values AFTER coercion to each field's type — a NUMBER field written as
2439
+ * `'5'` reads back as `5`. Keys with no matching definition were never
2440
+ * stored and so never appear here.
2441
+ */
2442
+ fields: Record<string, unknown>;
2443
+ }
2360
2444
  interface UpdateInventoryDto {
2361
2445
  quantity: number;
2362
2446
  variantId?: string;
@@ -4517,6 +4601,20 @@ interface AddressDetailsResult {
4517
4601
  }
4518
4602
  interface CompleteCheckoutResponse {
4519
4603
  orderId: string;
4604
+ /** Human-readable order number, e.g. `"ORD-20260907-0012"`. */
4605
+ orderNumber: string;
4606
+ /** Order status after completion. */
4607
+ status: string;
4608
+ /**
4609
+ * Order total as a decimal STRING, e.g. `"46.96"`.
4610
+ *
4611
+ * It was a JSON number until 2026-09-07, which disagreed with the sibling
4612
+ * `POST /v1/orders` and with every other money field on the API. Use
4613
+ * `parseFloat` if you need to compute on it.
4614
+ */
4615
+ total: string;
4616
+ /** Confirmation message, e.g. `"Order created successfully"`. */
4617
+ message: string;
4520
4618
  }
4521
4619
  interface WebhookEvent {
4522
4620
  event: WebhookEventType;
@@ -4595,6 +4693,34 @@ interface UpdateVariantInventoryDto {
4595
4693
  newTotal: number;
4596
4694
  reason?: string;
4597
4695
  }
4696
+ /**
4697
+ * `GET /v1/products/{id}/inventory` — the product's inventory state.
4698
+ *
4699
+ * The endpoint returns the whole `InventoryItem`, not just the three counters
4700
+ * it used to be documented as. Its `PUT` sibling has always returned this
4701
+ * shape.
4702
+ *
4703
+ * ⛔ **Two shapes, one status code.** A product with **no inventory row** (and
4704
+ * an id this key cannot see) reads back as the three counters at zero and
4705
+ * nothing else, rather than a 404 — every field below `total` is absent on
4706
+ * that branch. Branch on `id` being present, not on a 404.
4707
+ */
4708
+ interface ProductInventoryResponse {
4709
+ /** `total - reserved`. */
4710
+ available: number;
4711
+ reserved: number;
4712
+ total: number;
4713
+ /** The `InventoryItem` id. Absent on the all-zeroes no-row response. */
4714
+ id?: string;
4715
+ productId?: string;
4716
+ trackingMode?: InventoryTrackingMode;
4717
+ /** Backorder policy for this item, e.g. `"NONE"`. */
4718
+ backorderMode?: string;
4719
+ backorderLimit?: number | null;
4720
+ lowStockThreshold?: number | null;
4721
+ lastInventorySyncAt?: string | null;
4722
+ updatedAt?: string;
4723
+ }
4598
4724
  interface VariantInventoryResponse {
4599
4725
  trackingMode: InventoryTrackingMode;
4600
4726
  total: number;
@@ -7321,6 +7447,146 @@ interface SubscribeMarketingInput {
7321
7447
  interface SubscribeMarketingResponse {
7322
7448
  ok: true;
7323
7449
  }
7450
+ type NewsletterBenefitDiscountKind = 'PERCENTAGE' | 'FIXED_AMOUNT';
7451
+ /**
7452
+ * The offer to render beside a newsletter signup field.
7453
+ *
7454
+ * `null` from `marketing.getBenefit()` means the store offers nothing — render
7455
+ * the plain signup form and promise nothing.
7456
+ */
7457
+ interface PublicNewsletterBenefitOffer {
7458
+ enabled: boolean;
7459
+ discountType: NewsletterBenefitDiscountKind;
7460
+ /** Percent for PERCENTAGE, an amount in the store currency for FIXED_AMOUNT. */
7461
+ discountValue: number;
7462
+ /** How long the coupon lasts once issued, in days. */
7463
+ validityDays: number;
7464
+ minimumOrderAmount: number | null;
7465
+ /** Cap on the discount a percentage offer can produce. Null for no cap. */
7466
+ maximumDiscount: number | null;
7467
+ /** Restricted to buyers with no previous order. Guest orders count. */
7468
+ firstOrderOnly: boolean;
7469
+ /** Merchant-written, resolved for the requested locale. May be null. */
7470
+ headline: string | null;
7471
+ /** Merchant-written terms, resolved for the requested locale. May be null. */
7472
+ terms: string | null;
7473
+ }
7474
+ /** Lifecycle of one address's benefit. */
7475
+ type NewsletterBenefitGrantState = 'PENDING' | 'ISSUING' | 'ISSUED' | 'EXPIRED' | 'FAILED';
7476
+ /** The merchant's configuration, as the admin API returns it. */
7477
+ interface NewsletterBenefitSettings {
7478
+ id: string;
7479
+ storeId: string;
7480
+ enabled: boolean;
7481
+ /** Bumped on every save and copied into each new grant. */
7482
+ version: number;
7483
+ discountType: NewsletterBenefitDiscountKind;
7484
+ discountValue: number;
7485
+ minimumOrderAmount: number | null;
7486
+ maximumDiscount: number | null;
7487
+ combinesWithOther: boolean;
7488
+ validityDays: number;
7489
+ eligibilityTtlHours: number;
7490
+ firstOrderOnly: boolean;
7491
+ applicableProducts: string[];
7492
+ excludedProducts: string[];
7493
+ applicableCategories: string[];
7494
+ excludedCategories: string[];
7495
+ /** `salesChannelId` values. Empty means every enabled channel. */
7496
+ salesChannelIds: string[];
7497
+ content: Record<string, {
7498
+ headline?: string;
7499
+ terms?: string;
7500
+ }>;
7501
+ createdAt: string;
7502
+ updatedAt: string;
7503
+ }
7504
+ /**
7505
+ * A FULL REPLACEMENT, not a patch. Every field is written, so omitting one
7506
+ * clears it rather than leaving it alone.
7507
+ */
7508
+ interface UpdateNewsletterBenefitSettingsInput {
7509
+ enabled: boolean;
7510
+ discountType: NewsletterBenefitDiscountKind;
7511
+ /** 1-100 for PERCENTAGE, an amount in the store currency for FIXED_AMOUNT. */
7512
+ discountValue: number;
7513
+ minimumOrderAmount?: number;
7514
+ /** Percentage offers only. Ignored, and stored as null, for a fixed amount. */
7515
+ maximumDiscount?: number;
7516
+ combinesWithOther: boolean;
7517
+ /** 1-365. Counted from issuance, not from the signup. */
7518
+ validityDays: number;
7519
+ /**
7520
+ * 1-8760. How long a signup stays eligible, counted from the moment the form
7521
+ * was submitted.
7522
+ *
7523
+ * ⛔ THE ONLY DEADLINE IN THE FLOW. The confirmation link itself never
7524
+ * expires, so a click after this window still subscribes the address and
7525
+ * earns no coupon.
7526
+ */
7527
+ eligibilityTtlHours: number;
7528
+ firstOrderOnly: boolean;
7529
+ applicableProducts?: string[];
7530
+ excludedProducts?: string[];
7531
+ applicableCategories?: string[];
7532
+ excludedCategories?: string[];
7533
+ /**
7534
+ * `salesChannelId` values the coupon may be redeemed on. Leave empty for
7535
+ * every enabled channel: empty is expanded at issuance, because a coupon with
7536
+ * no channel rows is refused on every vibe-coded storefront.
7537
+ */
7538
+ salesChannelIds?: string[];
7539
+ /** `{ en: { headline, terms }, he: { … } }`. Shown on the form and in the email. */
7540
+ content?: Record<string, {
7541
+ headline?: string;
7542
+ terms?: string;
7543
+ }>;
7544
+ }
7545
+ /** One row of the issued-benefits list. */
7546
+ interface NewsletterBenefitGrant {
7547
+ id: string;
7548
+ email: string;
7549
+ status: NewsletterBenefitGrantState;
7550
+ /** Where the signup came from. A CSV-imported contact never gets a row here. */
7551
+ source: string;
7552
+ couponCode: string | null;
7553
+ /** Derived from the coupon being used, so it is true the moment an order completes. */
7554
+ redeemed: boolean;
7555
+ expiresAt: string | null;
7556
+ /** Deadline for confirming. A click after this subscribes but earns nothing. */
7557
+ eligibleUntil: string | null;
7558
+ confirmedAt: string | null;
7559
+ emailSentAt: string | null;
7560
+ attempts: number;
7561
+ lastError: string | null;
7562
+ settingsVersion: number;
7563
+ createdAt: string;
7564
+ }
7565
+ /**
7566
+ * Filters for the issued-benefits list.
7567
+ *
7568
+ * ⛔ NO EMAIL FILTER, and the API refuses one. A lookup-by-address would turn a
7569
+ * merchant list into a "does this person shop here" probe for any leaked key.
7570
+ */
7571
+ interface ListNewsletterBenefitGrantsParams {
7572
+ page?: number;
7573
+ /** Max 100, like every other paginated list. */
7574
+ limit?: number;
7575
+ status?: NewsletterBenefitGrantState;
7576
+ /** ISO-8601. Signups created on or after this moment. */
7577
+ from?: string;
7578
+ /** ISO-8601. Signups created on or before this moment. */
7579
+ to?: string;
7580
+ }
7581
+ /** What a resend hands back: the coupon that was re-sent, never a new one. */
7582
+ interface ResendNewsletterBenefitResult {
7583
+ code: string;
7584
+ discountType: NewsletterBenefitDiscountKind;
7585
+ discountValue: number;
7586
+ expiresAt: string;
7587
+ minimumOrderAmount: number | null;
7588
+ firstOrderOnly: boolean;
7589
+ }
7324
7590
  interface CreateStockAlertInput {
7325
7591
  /** Address to notify. Lowercased and trimmed server-side. */
7326
7592
  email: string;
@@ -8715,8 +8981,13 @@ declare class BrainerceClient {
8715
8981
  *
8716
8982
  * Rejected: a product that is not a KIT, a component from another store, a
8717
8983
  * component that is itself a KIT, a VARIABLE component with no variant
8718
- * pinned, a variant that does not belong to its product, and the same slot
8719
- * listed twice.
8984
+ * pinned, a variant that does not belong to its product, the same slot
8985
+ * listed twice, and a component whose product or pinned variant is not
8986
+ * published.
8987
+ *
8988
+ * That last one is checked over the WHOLE list you send, not just the rows
8989
+ * you changed. Once a product already inside a kit is unpublished, no edit
8990
+ * to that kit saves until you publish it again or drop it from the list.
8720
8991
  *
8721
8992
  * @example
8722
8993
  * ```typescript
@@ -8910,6 +9181,63 @@ declare class BrainerceClient {
8910
9181
  * Update an order (e.g., change status)
8911
9182
  */
8912
9183
  updateOrder(orderId: string, data: UpdateOrderDto): Promise<Order>;
9184
+ /**
9185
+ * List the store's order custom field definitions.
9186
+ *
9187
+ * Call this before writing values: the `key` of each definition is what
9188
+ * {@link setOrderCustomFieldValues} accepts, and `type` is what a value has
9189
+ * to fit. Inactive definitions are included, so you can tell "the merchant
9190
+ * turned this field off" apart from "the merchant never created it".
9191
+ *
9192
+ * Requires an API key with the `orders:read` scope.
9193
+ */
9194
+ getOrderCustomFieldDefinitions(): Promise<OrderCustomFieldDefinition[]>;
9195
+ /**
9196
+ * Read the custom field values stored on one order.
9197
+ *
9198
+ * Requires an API key with the `orders:read` scope.
9199
+ */
9200
+ getOrderCustomFieldValues(orderId: string): Promise<OrderCustomFieldValues>;
9201
+ /**
9202
+ * Write custom field values onto an order.
9203
+ *
9204
+ * This is how work that finishes OUTSIDE Brainerce gets back onto the order
9205
+ * it belongs to. Subscribe to the `order.paid` webhook, call whatever third
9206
+ * party issues the thing you sell — a licence key, a booking reference, a
9207
+ * warranty number — then write the answer here. The value travels to the
9208
+ * merchant's own order email templates as `orderCustomFields` and, when the
9209
+ * definition is `isPublic`, to the customer's own order page. No email
9210
+ * template or endpoint has to be built per integration.
9211
+ *
9212
+ * ⛔ No default template PRINTS `orderCustomFields`. The variable reaches
9213
+ * every order email, but until the merchant adds the block to their template
9214
+ * once, a value written here is invisible to the customer. Writing the field
9215
+ * is not the same as the customer being told.
9216
+ *
9217
+ * The write is a MERGE: keys you leave out keep their current value, and
9218
+ * `null` clears a field that is not required. Values are coerced to the
9219
+ * definition's type and rejected with a 400 when they cannot be — but a key
9220
+ * with no active definition on the store is IGNORED rather than failing the
9221
+ * whole call, so read the returned `fields` to confirm what was stored.
9222
+ *
9223
+ * Pass an `idempotencyKey` when the caller may retry: an identical re-send
9224
+ * then replays the original response instead of writing again.
9225
+ *
9226
+ * Requires an API key with the `orders:write` scope.
9227
+ *
9228
+ * @example
9229
+ * ```typescript
9230
+ * // after the third party answered
9231
+ * await client.setOrderCustomFieldValues(
9232
+ * order.id,
9233
+ * { licence_key: 'ABCD-EFGH-IJKL' },
9234
+ * { idempotencyKey: `licence-${order.id}` }
9235
+ * );
9236
+ * // fires the "order completed" email, which carries the field
9237
+ * await client.updateOrder(order.id, { status: 'COMPLETED' });
9238
+ * ```
9239
+ */
9240
+ setOrderCustomFieldValues(orderId: string, fields: Record<string, unknown>, options?: IdempotentRequestOptions): Promise<OrderCustomFieldValues>;
8913
9241
  /**
8914
9242
  * Update order status.
8915
9243
  *
@@ -9172,12 +9500,15 @@ declare class BrainerceClient {
9172
9500
  * exist and 404'd silently. The live route is product-scoped:
9173
9501
  * `GET /api/v1/products/:id/inventory`. A product with no inventory row
9174
9502
  * reads back as all zeroes rather than 404ing.
9503
+ *
9504
+ * The response carries the whole {@link ProductInventoryResponse} — the
9505
+ * `InventoryItem` id, `trackingMode`, `backorderMode`, `backorderLimit`,
9506
+ * `lowStockThreshold`, `lastInventorySyncAt` and `updatedAt` alongside the
9507
+ * three counters. It always did; only the three counters were declared.
9508
+ * On the all-zeroes no-row branch everything but the counters is absent,
9509
+ * so test `id` rather than expecting a 404.
9175
9510
  */
9176
- getInventory(productId: string): Promise<{
9177
- available: number;
9178
- reserved: number;
9179
- total: number;
9180
- }>;
9511
+ getInventory(productId: string): Promise<ProductInventoryResponse>;
9181
9512
  /**
9182
9513
  * Edit inventory manually with a reason for the audit trail.
9183
9514
  *
@@ -9898,10 +10229,14 @@ declare class BrainerceClient {
9898
10229
  * Storefront (public) and vibe-coded modes only. Rate-limited server-side to
9899
10230
  * 3 requests / 60s per IP, plus one confirmation email per address per 24h.
9900
10231
  *
9901
- * **Where the discount goes.** A "10% off your first order" popup needs a
9902
- * coupon from the dashboard create one with the `customer_first_order`
9903
- * condition and show the code after a successful call. Subscribing does not
9904
- * mint a code on its own.
10232
+ * **Where the discount goes.** Configure the newsletter welcome offer and the
10233
+ * platform issues the coupon itself: read it with `marketing.getBenefit()`,
10234
+ * show those terms beside the field, and stop there.
10235
+ *
10236
+ * ⛔ DO NOT SHOW A CODE AFTER THIS CALL RESOLVES. No coupon exists yet. It is
10237
+ * minted when the recipient clicks the confirmation link, and it is mailed to
10238
+ * them at that moment — a code rendered here is a code that was never issued.
10239
+ * Say "check your email", the same as for the subscription itself.
9905
10240
  *
9906
10241
  * @example
9907
10242
  * ```typescript
@@ -9917,6 +10252,117 @@ declare class BrainerceClient {
9917
10252
  */
9918
10253
  marketing: {
9919
10254
  subscribe: (input: SubscribeMarketingInput) => Promise<SubscribeMarketingResponse>;
10255
+ /**
10256
+ * The welcome offer to render beside the signup field, or `null` when this
10257
+ * store offers none.
10258
+ *
10259
+ * Show the discount, how long the coupon lasts, any minimum order, whether
10260
+ * it is first-order only, and the merchant's own headline and terms. Then
10261
+ * post to `marketing.subscribe()` and tell the shopper to check their
10262
+ * inbox.
10263
+ *
10264
+ * ⛔ THE COUPON DOES NOT EXIST YET at any point in that sequence. It is
10265
+ * created when the recipient clicks the confirmation link in their email,
10266
+ * and it is mailed to them there. Rendering a code on this screen renders a
10267
+ * code nobody was issued.
10268
+ *
10269
+ * ⛔ Takes no email address and returns nothing about any individual, on
10270
+ * purpose. There is no "has this person already claimed" call, because an
10271
+ * unauthenticated one would be an oracle for who shops here. If you need to
10272
+ * discourage a repeat signup, say the offer is one per address; do not try
10273
+ * to detect it.
10274
+ *
10275
+ * `null` is the common case on a store that never set this up, so handle it
10276
+ * rather than assuming the object. Cache it per page load: it belongs to
10277
+ * the store, not to the visitor.
10278
+ *
10279
+ * Storefront (public) and vibe-coded modes.
10280
+ *
10281
+ * @param locale - Storefront locale, e.g. `"he"`. Picks the language of the
10282
+ * headline and terms; falls back to the store language when omitted.
10283
+ *
10284
+ * @example
10285
+ * ```typescript
10286
+ * const offer = await brainerce.marketing.getBenefit('he');
10287
+ * if (offer) {
10288
+ * // "10% הנחה על ההזמנה הראשונה"
10289
+ * render(offer.headline ?? defaultHeadline(offer), offer.terms);
10290
+ * }
10291
+ * await brainerce.marketing.subscribe({ email, locale: 'he', honeypot });
10292
+ * // → "בדקו את המייל שלכם" — never a coupon code
10293
+ * ```
10294
+ */
10295
+ getBenefit: (locale?: string) => Promise<PublicNewsletterBenefitOffer | null>;
10296
+ };
10297
+ /**
10298
+ * Manage the newsletter welcome offer: the terms merchants configure, and the
10299
+ * benefits that offer has produced.
10300
+ *
10301
+ * Admin mode (`apiKey`) only, on the `coupons:read` / `coupons:write` scopes.
10302
+ * The benefit IS a coupon feature — it mints a Coupon row and the coupon
10303
+ * machinery enforces it — so it carries no scope of its own.
10304
+ *
10305
+ * ⛔ THERE IS NO "ISSUE A BENEFIT TO THIS ADDRESS" CALL, and there will not
10306
+ * be one. A benefit exists because someone submitted the signup form AND
10307
+ * clicked the confirmation link; handing one out directly would skip the
10308
+ * consent the double opt-in exists to collect and break the one-per-address
10309
+ * guarantee that the grant's unique constraint provides. `resend` re-sends a
10310
+ * code that already exists; it never creates one.
10311
+ */
10312
+ newsletterBenefit: {
10313
+ /**
10314
+ * The store's configuration, or `null` when none was ever saved.
10315
+ *
10316
+ * `null` and `{ enabled: false }` are different: never configured, versus
10317
+ * configured and switched off. Both mean "offer nothing" to a storefront.
10318
+ */
10319
+ getSettings: () => Promise<NewsletterBenefitSettings | null>;
10320
+ /**
10321
+ * Create or replace the offer.
10322
+ *
10323
+ * ⛔ A FULL REPLACEMENT, not a patch. Every field is written, so a field you
10324
+ * omit is cleared rather than kept.
10325
+ *
10326
+ * Saving never rewrites a promise already made: signups still waiting for a
10327
+ * confirmation click keep the terms they were shown, and coupons already
10328
+ * issued are untouched. Switching `enabled` off stops new offers and leaves
10329
+ * every issued coupon working until it expires.
10330
+ *
10331
+ * @example
10332
+ * ```typescript
10333
+ * await brainerce.newsletterBenefit.updateSettings({
10334
+ * enabled: true,
10335
+ * discountType: 'PERCENTAGE',
10336
+ * discountValue: 10,
10337
+ * minimumOrderAmount: 200,
10338
+ * combinesWithOther: false,
10339
+ * validityDays: 7,
10340
+ * eligibilityTtlHours: 168,
10341
+ * firstOrderOnly: true,
10342
+ * content: { he: { headline: '10% הנחה על ההזמנה הראשונה' } },
10343
+ * });
10344
+ * ```
10345
+ */
10346
+ updateSettings: (input: UpdateNewsletterBenefitSettingsInput) => Promise<NewsletterBenefitSettings>;
10347
+ /**
10348
+ * Issued benefits, newest first, as `{ data, meta }`.
10349
+ *
10350
+ * ⛔ NO EMAIL FILTER — the API refuses the parameter. Filter the page you
10351
+ * get back rather than asking the server about one address.
10352
+ */
10353
+ listGrants: (params?: ListNewsletterBenefitGrantsParams) => Promise<PaginatedResponse<NewsletterBenefitGrant>>;
10354
+ /**
10355
+ * Re-send one benefit that went astray.
10356
+ *
10357
+ * ⛔ SENDS THE SAME CODE. It never mints a second coupon, so a support
10358
+ * ticket cannot become two discounts. For a benefit whose issuance failed
10359
+ * before any coupon existed, this retries the issuance and mails the result.
10360
+ *
10361
+ * Rejects a signup that has not been confirmed and one that lapsed before a
10362
+ * coupon was minted: there is nothing to re-send in either case, and
10363
+ * nothing that may be created.
10364
+ */
10365
+ resend: (grantId: string) => Promise<ResendNewsletterBenefitResult | null>;
9920
10366
  };
9921
10367
  /**
9922
10368
  * "Email me when this is back."
@@ -13857,7 +14303,7 @@ declare class BrainerceError extends Error {
13857
14303
  constructor(message: string, statusCode: number, details?: unknown);
13858
14304
  }
13859
14305
 
13860
- declare const SDK_VERSION = "2.5.0";
14306
+ declare const SDK_VERSION = "2.8.0";
13861
14307
 
13862
14308
  /**
13863
14309
  * Verify a webhook signature from Brainerce
@@ -14358,4 +14804,4 @@ interface CategorySitemapOptions {
14358
14804
  */
14359
14805
  declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
14360
14806
 
14361
- export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AssignTaxClassDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AutoRegionResponse, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundleOfferOfferedProduct, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartItemUnavailableReason, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CheckoutTender, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateRegionDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateStockAlertInput, type CreateTagDto as CreateTagInput, type CreateTaxClassDto, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type CustomizationFieldOption, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GiftCardAdmin, type GiftCardAdminDetail, type GiftCardBalance, type GiftCardLiability, type GiftCardTransaction, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type I18nSettings, type IdempotentRequestOptions, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type IssueGiftCardAdminDto, type IssuedGiftCardAdmin, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyBadge, type LoyaltyMembershipPlan, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyRewardRecommendation, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type NestedModifierSelection, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthErrorCode, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type PaidMembershipInfo, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublicRegion, type PublicRegionDetail, type PublicRegionPaymentProvider, type PublicTaxClass, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type Region, type RegionPaymentProvider, type RegisterCustomerDto, type ReissuedGiftCardAdmin, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SavedPaymentMethodSummary, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAlertResponse, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreCapabilities, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type StorefrontSavedPaymentMethod, type SubmitProductReviewInput, type SubscribeMarketingInput, type SubscribeMarketingResponse, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxClass, type TaxEstimateResponse, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type TranslatableEntityType, type TranslationStatusEntry, type TranslationsMap, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateRegionDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxClassDto, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsellSettings, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
14807
+ export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AssignTaxClassDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AutoRegionResponse, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundleOfferOfferedProduct, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartItemUnavailableReason, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CheckoutTender, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateRegionDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateStockAlertInput, type CreateTagDto as CreateTagInput, type CreateTaxClassDto, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type CustomizationFieldOption, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GiftCardAdmin, type GiftCardAdminDetail, type GiftCardBalance, type GiftCardLiability, type GiftCardTransaction, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type I18nSettings, type IdempotentRequestOptions, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type IssueGiftCardAdminDto, type IssuedGiftCardAdmin, type JsonLdOptions, type ListModifierGroupsParams, type ListNewsletterBenefitGrantsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyBadge, type LoyaltyMembershipPlan, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyRewardRecommendation, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type NestedModifierSelection, type NewsletterBenefitDiscountKind, type NewsletterBenefitGrant, type NewsletterBenefitGrantState, type NewsletterBenefitSettings, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthErrorCode, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomFieldDefinition, type OrderCustomFieldValues, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type PaidMembershipInfo, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductInventoryResponse, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublicNewsletterBenefitOffer, type PublicRegion, type PublicRegionDetail, type PublicRegionPaymentProvider, type PublicTaxClass, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type Region, type RegionPaymentProvider, type RegisterCustomerDto, type ReissuedGiftCardAdmin, type RelativeDateBounds, type ResendNewsletterBenefitResult, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SavedPaymentMethodSummary, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAlertResponse, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreCapabilities, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type StorefrontSavedPaymentMethod, type SubmitProductReviewInput, type SubscribeMarketingInput, type SubscribeMarketingResponse, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxClass, type TaxEstimateResponse, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type TranslatableEntityType, type TranslationStatusEntry, type TranslationsMap, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateNewsletterBenefitSettingsInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateRegionDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxClassDto, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsellSettings, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };