brainerce 2.4.0 → 2.7.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/README.md +8361 -8090
- package/dist/index.d.mts +746 -94
- package/dist/index.d.ts +746 -94
- package/dist/index.js +563 -116
- package/dist/index.mjs +563 -116
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
@@ -776,6 +776,52 @@ interface ProductMetafield {
|
|
|
776
776
|
* platform. Archiving exists for modifier groups and modifiers, not products.
|
|
777
777
|
*/
|
|
778
778
|
type ProductStatus = 'active' | 'draft';
|
|
779
|
+
/** One product inside a KIT, as the storefront sees it. Display only. */
|
|
780
|
+
interface KitComponentSummary {
|
|
781
|
+
productId: string;
|
|
782
|
+
/** Set when the kit pins one variant of a variable component. */
|
|
783
|
+
variantId: string | null;
|
|
784
|
+
/** Component name, variant included when one is pinned. */
|
|
785
|
+
name: string;
|
|
786
|
+
sku: string | null;
|
|
787
|
+
/** Units of this component in ONE kit. A box with two glasses reads `2`. */
|
|
788
|
+
quantity: number;
|
|
789
|
+
/** Thumbnail: the pinned variant's image, else the product's first. */
|
|
790
|
+
image: string | null;
|
|
791
|
+
}
|
|
792
|
+
/** A kit's contents and derived pricing, from `getKitComponents`. */
|
|
793
|
+
interface KitDetail {
|
|
794
|
+
components: Array<KitComponentSummary & {
|
|
795
|
+
id: string;
|
|
796
|
+
position: number;
|
|
797
|
+
/** Effective unit price of the component. String decimal. */
|
|
798
|
+
unitPrice: string;
|
|
799
|
+
/** `null` = not stock-tracked, and never limits the kit. */
|
|
800
|
+
available: number | null;
|
|
801
|
+
}>;
|
|
802
|
+
/** How the kit is priced. */
|
|
803
|
+
pricingMode: 'FIXED' | 'SUM' | 'SUM_MINUS_PERCENT';
|
|
804
|
+
/** Percent off the component sum. Only for `SUM_MINUS_PERCENT`. */
|
|
805
|
+
discountValue: number | null;
|
|
806
|
+
/** Resolved kit price. String decimal. */
|
|
807
|
+
price: string;
|
|
808
|
+
/**
|
|
809
|
+
* How `price` divides across the components, in order, in MINOR units.
|
|
810
|
+
* Sums exactly to `price`. This is the taxable amount per component and the
|
|
811
|
+
* credit amount per component on a refund.
|
|
812
|
+
*/
|
|
813
|
+
allocationMinor: number[];
|
|
814
|
+
/** Sellable kits. `null` = unlimited; `0` = not sellable. */
|
|
815
|
+
available: number | null;
|
|
816
|
+
}
|
|
817
|
+
/** One component slot to write with `setKitComponents`. */
|
|
818
|
+
interface KitComponentWriteInput {
|
|
819
|
+
componentProductId: string;
|
|
820
|
+
/** Required when the component product is VARIABLE. */
|
|
821
|
+
componentVariantId?: string | null;
|
|
822
|
+
/** Units of this component in ONE kit. */
|
|
823
|
+
quantity: number;
|
|
824
|
+
}
|
|
779
825
|
interface Product {
|
|
780
826
|
id: string;
|
|
781
827
|
name: string;
|
|
@@ -828,6 +874,21 @@ interface Product {
|
|
|
828
874
|
* single product card always shows the lowest available price. Matches
|
|
829
875
|
* WooCommerce / Shopify storefront semantics. For `SIMPLE` products it is
|
|
830
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.
|
|
831
892
|
*/
|
|
832
893
|
basePrice: string;
|
|
833
894
|
/**
|
|
@@ -866,12 +927,55 @@ interface Product {
|
|
|
866
927
|
/** Product status (active, draft). Always returned by backend. */
|
|
867
928
|
status: ProductStatus;
|
|
868
929
|
/**
|
|
869
|
-
* Catalog structure. `KIT` is a sellable kit ("maaraz")
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
930
|
+
* Catalog structure. `KIT` is a sellable kit ("maaraz") assembled from other
|
|
931
|
+
* catalog products. It IS directly purchasable: add the KIT'S OWN `productId`
|
|
932
|
+
* as ONE cart line, with no `variantId` (a kit has no variants and passing
|
|
933
|
+
* one is rejected) and no modifier `selections`. NEVER add its components as
|
|
934
|
+
* separate lines — that charges twice and reserves twice. It carries no
|
|
935
|
+
* inventory row of its own (read `kitAvailable`), and outside FIXED pricing
|
|
936
|
+
* its stored `basePrice` is a placeholder, though storefront reads overlay it
|
|
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`.
|
|
873
942
|
*/
|
|
874
943
|
type: 'SIMPLE' | 'VARIABLE' | 'KIT';
|
|
944
|
+
/**
|
|
945
|
+
* What a KIT contains, returned on the single-product (by slug) read only.
|
|
946
|
+
* Absent on every other product type and on list responses.
|
|
947
|
+
*
|
|
948
|
+
* Render it: a shopper looking at a gift box needs to see what is inside
|
|
949
|
+
* before buying. These are display rows, NOT separate line items — the kit is
|
|
950
|
+
* added to the cart as ONE line, and its components are reserved behind the
|
|
951
|
+
* scenes. Do not add them individually.
|
|
952
|
+
*/
|
|
953
|
+
kitComponents?: KitComponentSummary[];
|
|
954
|
+
/**
|
|
955
|
+
* How many of this KIT can be sold: the component that runs out first decides.
|
|
956
|
+
* `null` means unlimited (every component untracked). `0` means not sellable,
|
|
957
|
+
* including a kit with no components. Absent on non-kits — a kit has no
|
|
958
|
+
* `inventory` block, so this is the field to read for stock.
|
|
959
|
+
*/
|
|
960
|
+
kitAvailable?: number | null;
|
|
961
|
+
/**
|
|
962
|
+
* How this KIT is priced, and therefore whether its prices are real numbers
|
|
963
|
+
* or placeholders. Absent on non-kits.
|
|
964
|
+
*
|
|
965
|
+
* `FIXED` — `basePrice` and `salePrice` are the merchant's own values and
|
|
966
|
+
* behave exactly like any other product's, sale logic included.
|
|
967
|
+
* `SUM` / `SUM_MINUS_PERCENT` — the price is recomputed from the components on
|
|
968
|
+
* every read, so the storefront read overlays `basePrice` with the resolved
|
|
969
|
+
* figure and returns `salePrice: null`. Never cache a kit price or recompute
|
|
970
|
+
* one client-side in these modes, and do not present a "was" price: there
|
|
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.
|
|
977
|
+
*/
|
|
978
|
+
kitPricingMode?: 'FIXED' | 'SUM' | 'SUM_MINUS_PERCENT';
|
|
875
979
|
/** Whether product is downloadable/digital. */
|
|
876
980
|
isDownloadable?: boolean;
|
|
877
981
|
/** Download files available for this product (when isDownloadable is true) */
|
|
@@ -1806,6 +1910,15 @@ interface CreateProductDto {
|
|
|
1806
1910
|
* its contents set before it can be sold.
|
|
1807
1911
|
*/
|
|
1808
1912
|
type?: 'SIMPLE' | 'VARIABLE' | 'KIT';
|
|
1913
|
+
/**
|
|
1914
|
+
* How a `KIT` is priced. `FIXED` (default) — you set `basePrice` and it stays.
|
|
1915
|
+
* `SUM` — the kit costs what its components cost, recomputed on every read.
|
|
1916
|
+
* `SUM_MINUS_PERCENT` — that sum less `kitDiscountValue` percent.
|
|
1917
|
+
* Ignored on `SIMPLE` and `VARIABLE`.
|
|
1918
|
+
*/
|
|
1919
|
+
kitPricingMode?: 'FIXED' | 'SUM' | 'SUM_MINUS_PERCENT';
|
|
1920
|
+
/** Percent off the component sum, 0-100. Only for `SUM_MINUS_PERCENT`. */
|
|
1921
|
+
kitDiscountValue?: number;
|
|
1809
1922
|
isDownloadable?: boolean;
|
|
1810
1923
|
/** Existing category IDs to assign. Unknown/cross-store IDs are rejected with 400. To assign by name (auto-creating if missing), use `categoryNames`. */
|
|
1811
1924
|
categories?: string[];
|
|
@@ -1927,6 +2040,15 @@ interface BulkCreateProductsError {
|
|
|
1927
2040
|
message: string;
|
|
1928
2041
|
}
|
|
1929
2042
|
interface UpdateProductDto {
|
|
2043
|
+
/**
|
|
2044
|
+
* How a `KIT` is priced. `FIXED` (default) — you set `basePrice` and it stays.
|
|
2045
|
+
* `SUM` — the kit costs what its components cost, recomputed on every read.
|
|
2046
|
+
* `SUM_MINUS_PERCENT` — that sum less `kitDiscountValue` percent.
|
|
2047
|
+
* Omit to leave the kit's current mode unchanged.
|
|
2048
|
+
*/
|
|
2049
|
+
kitPricingMode?: 'FIXED' | 'SUM' | 'SUM_MINUS_PERCENT';
|
|
2050
|
+
/** Percent off the component sum, 0-100. Only for `SUM_MINUS_PERCENT`. */
|
|
2051
|
+
kitDiscountValue?: number;
|
|
1930
2052
|
name?: string;
|
|
1931
2053
|
slug?: string;
|
|
1932
2054
|
sku?: string;
|
|
@@ -4419,6 +4541,20 @@ interface AddressDetailsResult {
|
|
|
4419
4541
|
}
|
|
4420
4542
|
interface CompleteCheckoutResponse {
|
|
4421
4543
|
orderId: string;
|
|
4544
|
+
/** Human-readable order number, e.g. `"ORD-20260907-0012"`. */
|
|
4545
|
+
orderNumber: string;
|
|
4546
|
+
/** Order status after completion. */
|
|
4547
|
+
status: string;
|
|
4548
|
+
/**
|
|
4549
|
+
* Order total as a decimal STRING, e.g. `"46.96"`.
|
|
4550
|
+
*
|
|
4551
|
+
* It was a JSON number until 2026-09-07, which disagreed with the sibling
|
|
4552
|
+
* `POST /v1/orders` and with every other money field on the API. Use
|
|
4553
|
+
* `parseFloat` if you need to compute on it.
|
|
4554
|
+
*/
|
|
4555
|
+
total: string;
|
|
4556
|
+
/** Confirmation message, e.g. `"Order created successfully"`. */
|
|
4557
|
+
message: string;
|
|
4422
4558
|
}
|
|
4423
4559
|
interface WebhookEvent {
|
|
4424
4560
|
event: WebhookEventType;
|
|
@@ -4497,6 +4633,34 @@ interface UpdateVariantInventoryDto {
|
|
|
4497
4633
|
newTotal: number;
|
|
4498
4634
|
reason?: string;
|
|
4499
4635
|
}
|
|
4636
|
+
/**
|
|
4637
|
+
* `GET /v1/products/{id}/inventory` — the product's inventory state.
|
|
4638
|
+
*
|
|
4639
|
+
* The endpoint returns the whole `InventoryItem`, not just the three counters
|
|
4640
|
+
* it used to be documented as. Its `PUT` sibling has always returned this
|
|
4641
|
+
* shape.
|
|
4642
|
+
*
|
|
4643
|
+
* ⛔ **Two shapes, one status code.** A product with **no inventory row** (and
|
|
4644
|
+
* an id this key cannot see) reads back as the three counters at zero and
|
|
4645
|
+
* nothing else, rather than a 404 — every field below `total` is absent on
|
|
4646
|
+
* that branch. Branch on `id` being present, not on a 404.
|
|
4647
|
+
*/
|
|
4648
|
+
interface ProductInventoryResponse {
|
|
4649
|
+
/** `total - reserved`. */
|
|
4650
|
+
available: number;
|
|
4651
|
+
reserved: number;
|
|
4652
|
+
total: number;
|
|
4653
|
+
/** The `InventoryItem` id. Absent on the all-zeroes no-row response. */
|
|
4654
|
+
id?: string;
|
|
4655
|
+
productId?: string;
|
|
4656
|
+
trackingMode?: InventoryTrackingMode;
|
|
4657
|
+
/** Backorder policy for this item, e.g. `"NONE"`. */
|
|
4658
|
+
backorderMode?: string;
|
|
4659
|
+
backorderLimit?: number | null;
|
|
4660
|
+
lowStockThreshold?: number | null;
|
|
4661
|
+
lastInventorySyncAt?: string | null;
|
|
4662
|
+
updatedAt?: string;
|
|
4663
|
+
}
|
|
4500
4664
|
interface VariantInventoryResponse {
|
|
4501
4665
|
trackingMode: InventoryTrackingMode;
|
|
4502
4666
|
total: number;
|
|
@@ -7223,6 +7387,146 @@ interface SubscribeMarketingInput {
|
|
|
7223
7387
|
interface SubscribeMarketingResponse {
|
|
7224
7388
|
ok: true;
|
|
7225
7389
|
}
|
|
7390
|
+
type NewsletterBenefitDiscountKind = 'PERCENTAGE' | 'FIXED_AMOUNT';
|
|
7391
|
+
/**
|
|
7392
|
+
* The offer to render beside a newsletter signup field.
|
|
7393
|
+
*
|
|
7394
|
+
* `null` from `marketing.getBenefit()` means the store offers nothing — render
|
|
7395
|
+
* the plain signup form and promise nothing.
|
|
7396
|
+
*/
|
|
7397
|
+
interface PublicNewsletterBenefitOffer {
|
|
7398
|
+
enabled: boolean;
|
|
7399
|
+
discountType: NewsletterBenefitDiscountKind;
|
|
7400
|
+
/** Percent for PERCENTAGE, an amount in the store currency for FIXED_AMOUNT. */
|
|
7401
|
+
discountValue: number;
|
|
7402
|
+
/** How long the coupon lasts once issued, in days. */
|
|
7403
|
+
validityDays: number;
|
|
7404
|
+
minimumOrderAmount: number | null;
|
|
7405
|
+
/** Cap on the discount a percentage offer can produce. Null for no cap. */
|
|
7406
|
+
maximumDiscount: number | null;
|
|
7407
|
+
/** Restricted to buyers with no previous order. Guest orders count. */
|
|
7408
|
+
firstOrderOnly: boolean;
|
|
7409
|
+
/** Merchant-written, resolved for the requested locale. May be null. */
|
|
7410
|
+
headline: string | null;
|
|
7411
|
+
/** Merchant-written terms, resolved for the requested locale. May be null. */
|
|
7412
|
+
terms: string | null;
|
|
7413
|
+
}
|
|
7414
|
+
/** Lifecycle of one address's benefit. */
|
|
7415
|
+
type NewsletterBenefitGrantState = 'PENDING' | 'ISSUING' | 'ISSUED' | 'EXPIRED' | 'FAILED';
|
|
7416
|
+
/** The merchant's configuration, as the admin API returns it. */
|
|
7417
|
+
interface NewsletterBenefitSettings {
|
|
7418
|
+
id: string;
|
|
7419
|
+
storeId: string;
|
|
7420
|
+
enabled: boolean;
|
|
7421
|
+
/** Bumped on every save and copied into each new grant. */
|
|
7422
|
+
version: number;
|
|
7423
|
+
discountType: NewsletterBenefitDiscountKind;
|
|
7424
|
+
discountValue: number;
|
|
7425
|
+
minimumOrderAmount: number | null;
|
|
7426
|
+
maximumDiscount: number | null;
|
|
7427
|
+
combinesWithOther: boolean;
|
|
7428
|
+
validityDays: number;
|
|
7429
|
+
eligibilityTtlHours: number;
|
|
7430
|
+
firstOrderOnly: boolean;
|
|
7431
|
+
applicableProducts: string[];
|
|
7432
|
+
excludedProducts: string[];
|
|
7433
|
+
applicableCategories: string[];
|
|
7434
|
+
excludedCategories: string[];
|
|
7435
|
+
/** `salesChannelId` values. Empty means every enabled channel. */
|
|
7436
|
+
salesChannelIds: string[];
|
|
7437
|
+
content: Record<string, {
|
|
7438
|
+
headline?: string;
|
|
7439
|
+
terms?: string;
|
|
7440
|
+
}>;
|
|
7441
|
+
createdAt: string;
|
|
7442
|
+
updatedAt: string;
|
|
7443
|
+
}
|
|
7444
|
+
/**
|
|
7445
|
+
* A FULL REPLACEMENT, not a patch. Every field is written, so omitting one
|
|
7446
|
+
* clears it rather than leaving it alone.
|
|
7447
|
+
*/
|
|
7448
|
+
interface UpdateNewsletterBenefitSettingsInput {
|
|
7449
|
+
enabled: boolean;
|
|
7450
|
+
discountType: NewsletterBenefitDiscountKind;
|
|
7451
|
+
/** 1-100 for PERCENTAGE, an amount in the store currency for FIXED_AMOUNT. */
|
|
7452
|
+
discountValue: number;
|
|
7453
|
+
minimumOrderAmount?: number;
|
|
7454
|
+
/** Percentage offers only. Ignored, and stored as null, for a fixed amount. */
|
|
7455
|
+
maximumDiscount?: number;
|
|
7456
|
+
combinesWithOther: boolean;
|
|
7457
|
+
/** 1-365. Counted from issuance, not from the signup. */
|
|
7458
|
+
validityDays: number;
|
|
7459
|
+
/**
|
|
7460
|
+
* 1-8760. How long a signup stays eligible, counted from the moment the form
|
|
7461
|
+
* was submitted.
|
|
7462
|
+
*
|
|
7463
|
+
* ⛔ THE ONLY DEADLINE IN THE FLOW. The confirmation link itself never
|
|
7464
|
+
* expires, so a click after this window still subscribes the address and
|
|
7465
|
+
* earns no coupon.
|
|
7466
|
+
*/
|
|
7467
|
+
eligibilityTtlHours: number;
|
|
7468
|
+
firstOrderOnly: boolean;
|
|
7469
|
+
applicableProducts?: string[];
|
|
7470
|
+
excludedProducts?: string[];
|
|
7471
|
+
applicableCategories?: string[];
|
|
7472
|
+
excludedCategories?: string[];
|
|
7473
|
+
/**
|
|
7474
|
+
* `salesChannelId` values the coupon may be redeemed on. Leave empty for
|
|
7475
|
+
* every enabled channel: empty is expanded at issuance, because a coupon with
|
|
7476
|
+
* no channel rows is refused on every vibe-coded storefront.
|
|
7477
|
+
*/
|
|
7478
|
+
salesChannelIds?: string[];
|
|
7479
|
+
/** `{ en: { headline, terms }, he: { … } }`. Shown on the form and in the email. */
|
|
7480
|
+
content?: Record<string, {
|
|
7481
|
+
headline?: string;
|
|
7482
|
+
terms?: string;
|
|
7483
|
+
}>;
|
|
7484
|
+
}
|
|
7485
|
+
/** One row of the issued-benefits list. */
|
|
7486
|
+
interface NewsletterBenefitGrant {
|
|
7487
|
+
id: string;
|
|
7488
|
+
email: string;
|
|
7489
|
+
status: NewsletterBenefitGrantState;
|
|
7490
|
+
/** Where the signup came from. A CSV-imported contact never gets a row here. */
|
|
7491
|
+
source: string;
|
|
7492
|
+
couponCode: string | null;
|
|
7493
|
+
/** Derived from the coupon being used, so it is true the moment an order completes. */
|
|
7494
|
+
redeemed: boolean;
|
|
7495
|
+
expiresAt: string | null;
|
|
7496
|
+
/** Deadline for confirming. A click after this subscribes but earns nothing. */
|
|
7497
|
+
eligibleUntil: string | null;
|
|
7498
|
+
confirmedAt: string | null;
|
|
7499
|
+
emailSentAt: string | null;
|
|
7500
|
+
attempts: number;
|
|
7501
|
+
lastError: string | null;
|
|
7502
|
+
settingsVersion: number;
|
|
7503
|
+
createdAt: string;
|
|
7504
|
+
}
|
|
7505
|
+
/**
|
|
7506
|
+
* Filters for the issued-benefits list.
|
|
7507
|
+
*
|
|
7508
|
+
* ⛔ NO EMAIL FILTER, and the API refuses one. A lookup-by-address would turn a
|
|
7509
|
+
* merchant list into a "does this person shop here" probe for any leaked key.
|
|
7510
|
+
*/
|
|
7511
|
+
interface ListNewsletterBenefitGrantsParams {
|
|
7512
|
+
page?: number;
|
|
7513
|
+
/** Max 100, like every other paginated list. */
|
|
7514
|
+
limit?: number;
|
|
7515
|
+
status?: NewsletterBenefitGrantState;
|
|
7516
|
+
/** ISO-8601. Signups created on or after this moment. */
|
|
7517
|
+
from?: string;
|
|
7518
|
+
/** ISO-8601. Signups created on or before this moment. */
|
|
7519
|
+
to?: string;
|
|
7520
|
+
}
|
|
7521
|
+
/** What a resend hands back: the coupon that was re-sent, never a new one. */
|
|
7522
|
+
interface ResendNewsletterBenefitResult {
|
|
7523
|
+
code: string;
|
|
7524
|
+
discountType: NewsletterBenefitDiscountKind;
|
|
7525
|
+
discountValue: number;
|
|
7526
|
+
expiresAt: string;
|
|
7527
|
+
minimumOrderAmount: number | null;
|
|
7528
|
+
firstOrderOnly: boolean;
|
|
7529
|
+
}
|
|
7226
7530
|
interface CreateStockAlertInput {
|
|
7227
7531
|
/** Address to notify. Lowercased and trimmed server-side. */
|
|
7228
7532
|
email: string;
|
|
@@ -8591,6 +8895,57 @@ declare class BrainerceClient {
|
|
|
8591
8895
|
* console.log('Product type:', product.type); // 'VARIABLE'
|
|
8592
8896
|
* ```
|
|
8593
8897
|
*/
|
|
8898
|
+
/**
|
|
8899
|
+
* Read a kit's contents, with its resolved price and how many can be sold.
|
|
8900
|
+
*
|
|
8901
|
+
* A KIT is one purchasable product assembled from other catalog products. It
|
|
8902
|
+
* holds no inventory of its own: `available` is whichever component runs out
|
|
8903
|
+
* first. Outside `FIXED` pricing the product row's `basePrice` is a
|
|
8904
|
+
* placeholder, so use the `price` returned here.
|
|
8905
|
+
*
|
|
8906
|
+
* Safe to call for any product — a non-KIT returns an empty, unsellable
|
|
8907
|
+
* shape rather than throwing, so callers need not branch on product type.
|
|
8908
|
+
*
|
|
8909
|
+
* @example
|
|
8910
|
+
* ```typescript
|
|
8911
|
+
* const kit = await client.getKitComponents('prod_123');
|
|
8912
|
+
* console.log(kit.price, kit.available, kit.components.length);
|
|
8913
|
+
* ```
|
|
8914
|
+
*/
|
|
8915
|
+
getKitComponents(productId: string): Promise<KitDetail>;
|
|
8916
|
+
/**
|
|
8917
|
+
* Replace a kit's contents, and optionally how it is priced.
|
|
8918
|
+
*
|
|
8919
|
+
* A full replace, not a patch: send the list you want the kit to end up with.
|
|
8920
|
+
* Omit `pricingMode` to leave the kit's current mode untouched.
|
|
8921
|
+
*
|
|
8922
|
+
* Rejected: a product that is not a KIT, a component from another store, a
|
|
8923
|
+
* component that is itself a KIT, a VARIABLE component with no variant
|
|
8924
|
+
* pinned, a variant that does not belong to its product, the same slot
|
|
8925
|
+
* listed twice, and a component whose product or pinned variant is not
|
|
8926
|
+
* published.
|
|
8927
|
+
*
|
|
8928
|
+
* That last one is checked over the WHOLE list you send, not just the rows
|
|
8929
|
+
* you changed. Once a product already inside a kit is unpublished, no edit
|
|
8930
|
+
* to that kit saves until you publish it again or drop it from the list.
|
|
8931
|
+
*
|
|
8932
|
+
* @example
|
|
8933
|
+
* ```typescript
|
|
8934
|
+
* await client.setKitComponents('prod_123', {
|
|
8935
|
+
* components: [
|
|
8936
|
+
* { componentProductId: 'prod_bottle', quantity: 1 },
|
|
8937
|
+
* { componentProductId: 'prod_glass', quantity: 2 },
|
|
8938
|
+
* ],
|
|
8939
|
+
* pricingMode: 'SUM_MINUS_PERCENT',
|
|
8940
|
+
* discountValue: 10,
|
|
8941
|
+
* });
|
|
8942
|
+
* ```
|
|
8943
|
+
*/
|
|
8944
|
+
setKitComponents(productId: string, body: {
|
|
8945
|
+
components: KitComponentWriteInput[];
|
|
8946
|
+
pricingMode?: 'FIXED' | 'SUM' | 'SUM_MINUS_PERCENT';
|
|
8947
|
+
discountValue?: number;
|
|
8948
|
+
}): Promise<KitDetail>;
|
|
8594
8949
|
convertToVariable(productId: string): Promise<Product>;
|
|
8595
8950
|
/**
|
|
8596
8951
|
* Convert a VARIABLE product back to SIMPLE.
|
|
@@ -9028,12 +9383,15 @@ declare class BrainerceClient {
|
|
|
9028
9383
|
* exist and 404'd silently. The live route is product-scoped:
|
|
9029
9384
|
* `GET /api/v1/products/:id/inventory`. A product with no inventory row
|
|
9030
9385
|
* reads back as all zeroes rather than 404ing.
|
|
9386
|
+
*
|
|
9387
|
+
* The response carries the whole {@link ProductInventoryResponse} — the
|
|
9388
|
+
* `InventoryItem` id, `trackingMode`, `backorderMode`, `backorderLimit`,
|
|
9389
|
+
* `lowStockThreshold`, `lastInventorySyncAt` and `updatedAt` alongside the
|
|
9390
|
+
* three counters. It always did; only the three counters were declared.
|
|
9391
|
+
* On the all-zeroes no-row branch everything but the counters is absent,
|
|
9392
|
+
* so test `id` rather than expecting a 404.
|
|
9031
9393
|
*/
|
|
9032
|
-
getInventory(productId: string): Promise<
|
|
9033
|
-
available: number;
|
|
9034
|
-
reserved: number;
|
|
9035
|
-
total: number;
|
|
9036
|
-
}>;
|
|
9394
|
+
getInventory(productId: string): Promise<ProductInventoryResponse>;
|
|
9037
9395
|
/**
|
|
9038
9396
|
* Edit inventory manually with a reason for the audit trail.
|
|
9039
9397
|
*
|
|
@@ -9754,10 +10112,14 @@ declare class BrainerceClient {
|
|
|
9754
10112
|
* Storefront (public) and vibe-coded modes only. Rate-limited server-side to
|
|
9755
10113
|
* 3 requests / 60s per IP, plus one confirmation email per address per 24h.
|
|
9756
10114
|
*
|
|
9757
|
-
* **Where the discount goes.**
|
|
9758
|
-
*
|
|
9759
|
-
*
|
|
9760
|
-
*
|
|
10115
|
+
* **Where the discount goes.** Configure the newsletter welcome offer and the
|
|
10116
|
+
* platform issues the coupon itself: read it with `marketing.getBenefit()`,
|
|
10117
|
+
* show those terms beside the field, and stop there.
|
|
10118
|
+
*
|
|
10119
|
+
* ⛔ DO NOT SHOW A CODE AFTER THIS CALL RESOLVES. No coupon exists yet. It is
|
|
10120
|
+
* minted when the recipient clicks the confirmation link, and it is mailed to
|
|
10121
|
+
* them at that moment — a code rendered here is a code that was never issued.
|
|
10122
|
+
* Say "check your email", the same as for the subscription itself.
|
|
9761
10123
|
*
|
|
9762
10124
|
* @example
|
|
9763
10125
|
* ```typescript
|
|
@@ -9773,6 +10135,117 @@ declare class BrainerceClient {
|
|
|
9773
10135
|
*/
|
|
9774
10136
|
marketing: {
|
|
9775
10137
|
subscribe: (input: SubscribeMarketingInput) => Promise<SubscribeMarketingResponse>;
|
|
10138
|
+
/**
|
|
10139
|
+
* The welcome offer to render beside the signup field, or `null` when this
|
|
10140
|
+
* store offers none.
|
|
10141
|
+
*
|
|
10142
|
+
* Show the discount, how long the coupon lasts, any minimum order, whether
|
|
10143
|
+
* it is first-order only, and the merchant's own headline and terms. Then
|
|
10144
|
+
* post to `marketing.subscribe()` and tell the shopper to check their
|
|
10145
|
+
* inbox.
|
|
10146
|
+
*
|
|
10147
|
+
* ⛔ THE COUPON DOES NOT EXIST YET at any point in that sequence. It is
|
|
10148
|
+
* created when the recipient clicks the confirmation link in their email,
|
|
10149
|
+
* and it is mailed to them there. Rendering a code on this screen renders a
|
|
10150
|
+
* code nobody was issued.
|
|
10151
|
+
*
|
|
10152
|
+
* ⛔ Takes no email address and returns nothing about any individual, on
|
|
10153
|
+
* purpose. There is no "has this person already claimed" call, because an
|
|
10154
|
+
* unauthenticated one would be an oracle for who shops here. If you need to
|
|
10155
|
+
* discourage a repeat signup, say the offer is one per address; do not try
|
|
10156
|
+
* to detect it.
|
|
10157
|
+
*
|
|
10158
|
+
* `null` is the common case on a store that never set this up, so handle it
|
|
10159
|
+
* rather than assuming the object. Cache it per page load: it belongs to
|
|
10160
|
+
* the store, not to the visitor.
|
|
10161
|
+
*
|
|
10162
|
+
* Storefront (public) and vibe-coded modes.
|
|
10163
|
+
*
|
|
10164
|
+
* @param locale - Storefront locale, e.g. `"he"`. Picks the language of the
|
|
10165
|
+
* headline and terms; falls back to the store language when omitted.
|
|
10166
|
+
*
|
|
10167
|
+
* @example
|
|
10168
|
+
* ```typescript
|
|
10169
|
+
* const offer = await brainerce.marketing.getBenefit('he');
|
|
10170
|
+
* if (offer) {
|
|
10171
|
+
* // "10% הנחה על ההזמנה הראשונה"
|
|
10172
|
+
* render(offer.headline ?? defaultHeadline(offer), offer.terms);
|
|
10173
|
+
* }
|
|
10174
|
+
* await brainerce.marketing.subscribe({ email, locale: 'he', honeypot });
|
|
10175
|
+
* // → "בדקו את המייל שלכם" — never a coupon code
|
|
10176
|
+
* ```
|
|
10177
|
+
*/
|
|
10178
|
+
getBenefit: (locale?: string) => Promise<PublicNewsletterBenefitOffer | null>;
|
|
10179
|
+
};
|
|
10180
|
+
/**
|
|
10181
|
+
* Manage the newsletter welcome offer: the terms merchants configure, and the
|
|
10182
|
+
* benefits that offer has produced.
|
|
10183
|
+
*
|
|
10184
|
+
* Admin mode (`apiKey`) only, on the `coupons:read` / `coupons:write` scopes.
|
|
10185
|
+
* The benefit IS a coupon feature — it mints a Coupon row and the coupon
|
|
10186
|
+
* machinery enforces it — so it carries no scope of its own.
|
|
10187
|
+
*
|
|
10188
|
+
* ⛔ THERE IS NO "ISSUE A BENEFIT TO THIS ADDRESS" CALL, and there will not
|
|
10189
|
+
* be one. A benefit exists because someone submitted the signup form AND
|
|
10190
|
+
* clicked the confirmation link; handing one out directly would skip the
|
|
10191
|
+
* consent the double opt-in exists to collect and break the one-per-address
|
|
10192
|
+
* guarantee that the grant's unique constraint provides. `resend` re-sends a
|
|
10193
|
+
* code that already exists; it never creates one.
|
|
10194
|
+
*/
|
|
10195
|
+
newsletterBenefit: {
|
|
10196
|
+
/**
|
|
10197
|
+
* The store's configuration, or `null` when none was ever saved.
|
|
10198
|
+
*
|
|
10199
|
+
* `null` and `{ enabled: false }` are different: never configured, versus
|
|
10200
|
+
* configured and switched off. Both mean "offer nothing" to a storefront.
|
|
10201
|
+
*/
|
|
10202
|
+
getSettings: () => Promise<NewsletterBenefitSettings | null>;
|
|
10203
|
+
/**
|
|
10204
|
+
* Create or replace the offer.
|
|
10205
|
+
*
|
|
10206
|
+
* ⛔ A FULL REPLACEMENT, not a patch. Every field is written, so a field you
|
|
10207
|
+
* omit is cleared rather than kept.
|
|
10208
|
+
*
|
|
10209
|
+
* Saving never rewrites a promise already made: signups still waiting for a
|
|
10210
|
+
* confirmation click keep the terms they were shown, and coupons already
|
|
10211
|
+
* issued are untouched. Switching `enabled` off stops new offers and leaves
|
|
10212
|
+
* every issued coupon working until it expires.
|
|
10213
|
+
*
|
|
10214
|
+
* @example
|
|
10215
|
+
* ```typescript
|
|
10216
|
+
* await brainerce.newsletterBenefit.updateSettings({
|
|
10217
|
+
* enabled: true,
|
|
10218
|
+
* discountType: 'PERCENTAGE',
|
|
10219
|
+
* discountValue: 10,
|
|
10220
|
+
* minimumOrderAmount: 200,
|
|
10221
|
+
* combinesWithOther: false,
|
|
10222
|
+
* validityDays: 7,
|
|
10223
|
+
* eligibilityTtlHours: 168,
|
|
10224
|
+
* firstOrderOnly: true,
|
|
10225
|
+
* content: { he: { headline: '10% הנחה על ההזמנה הראשונה' } },
|
|
10226
|
+
* });
|
|
10227
|
+
* ```
|
|
10228
|
+
*/
|
|
10229
|
+
updateSettings: (input: UpdateNewsletterBenefitSettingsInput) => Promise<NewsletterBenefitSettings>;
|
|
10230
|
+
/**
|
|
10231
|
+
* Issued benefits, newest first, as `{ data, meta }`.
|
|
10232
|
+
*
|
|
10233
|
+
* ⛔ NO EMAIL FILTER — the API refuses the parameter. Filter the page you
|
|
10234
|
+
* get back rather than asking the server about one address.
|
|
10235
|
+
*/
|
|
10236
|
+
listGrants: (params?: ListNewsletterBenefitGrantsParams) => Promise<PaginatedResponse<NewsletterBenefitGrant>>;
|
|
10237
|
+
/**
|
|
10238
|
+
* Re-send one benefit that went astray.
|
|
10239
|
+
*
|
|
10240
|
+
* ⛔ SENDS THE SAME CODE. It never mints a second coupon, so a support
|
|
10241
|
+
* ticket cannot become two discounts. For a benefit whose issuance failed
|
|
10242
|
+
* before any coupon existed, this retries the issuance and mails the result.
|
|
10243
|
+
*
|
|
10244
|
+
* Rejects a signup that has not been confirmed and one that lapsed before a
|
|
10245
|
+
* coupon was minted: there is nothing to re-send in either case, and
|
|
10246
|
+
* nothing that may be created.
|
|
10247
|
+
*/
|
|
10248
|
+
resend: (grantId: string) => Promise<ResendNewsletterBenefitResult | null>;
|
|
9776
10249
|
};
|
|
9777
10250
|
/**
|
|
9778
10251
|
* "Email me when this is back."
|
|
@@ -9801,10 +10274,20 @@ declare class BrainerceClient {
|
|
|
9801
10274
|
* Rich Text, and Page.
|
|
9802
10275
|
*
|
|
9803
10276
|
* Works in all three SDK modes (vibe-coded, storefront, admin):
|
|
9804
|
-
* - **Public reads** (`get`, `list`, `getBySlug`):
|
|
9805
|
-
*
|
|
9806
|
-
*
|
|
9807
|
-
*
|
|
10277
|
+
* - **Public reads** (`get`, `list`, `getBySlug`): storefront and
|
|
10278
|
+
* vibe-coded mode. There is no admin equivalent of a by-key/by-slug
|
|
10279
|
+
* read — in admin mode they throw and point you at `listAdmin()` /
|
|
10280
|
+
* `findById()`.
|
|
10281
|
+
* - **Admin reads** (`listAdmin`, `findById`) and **writes** (`create`,
|
|
10282
|
+
* `update`, `publish`, `unpublish`, `remove`): admin mode only — they
|
|
10283
|
+
* call `/api/content/...` with the API key. Calling from storefront /
|
|
10284
|
+
* vibe-coded mode throws.
|
|
10285
|
+
*
|
|
10286
|
+
* **⚠️ Every admin method takes an explicit `storeId`.** Admin mode has no
|
|
10287
|
+
* ambient store (`storeId` is only set in storefront mode), and the routes
|
|
10288
|
+
* are store-scoped: omitting it is rejected fail-closed by the store scope
|
|
10289
|
+
* guard (`403 STORE_SCOPE_REQUIRED`). Pass the id of the store your API key
|
|
10290
|
+
* is bound to — naming any other store is rejected as cross-tenant.
|
|
9808
10291
|
*
|
|
9809
10292
|
* **Default key:** every type has `'main'` as its universal default key.
|
|
9810
10293
|
* Pass no argument to fetch the main entry; pass a custom key (e.g.
|
|
@@ -9829,12 +10312,15 @@ declare class BrainerceClient {
|
|
|
9829
10312
|
* });
|
|
9830
10313
|
* }
|
|
9831
10314
|
*
|
|
9832
|
-
* // Admin — create a shipping FAQ in DRAFT
|
|
9833
|
-
* await client.content.faq.create(
|
|
9834
|
-
*
|
|
9835
|
-
*
|
|
9836
|
-
*
|
|
9837
|
-
* }
|
|
10315
|
+
* // Admin — create a shipping FAQ in DRAFT (storeId is required)
|
|
10316
|
+
* await client.content.faq.create(
|
|
10317
|
+
* {
|
|
10318
|
+
* key: 'shipping',
|
|
10319
|
+
* name: 'Shipping FAQ',
|
|
10320
|
+
* data: { items: [{ question: '…', answer: '…' }] },
|
|
10321
|
+
* },
|
|
10322
|
+
* 'store_123'
|
|
10323
|
+
* );
|
|
9838
10324
|
* ```
|
|
9839
10325
|
*/
|
|
9840
10326
|
content: {
|
|
@@ -9845,10 +10331,17 @@ declare class BrainerceClient {
|
|
|
9845
10331
|
* hasn't seeded yet.
|
|
9846
10332
|
*/
|
|
9847
10333
|
get: (key?: string, locale?: string) => Promise<Content<"FAQ"> | null>;
|
|
9848
|
-
/**
|
|
10334
|
+
/**
|
|
10335
|
+
* List all PUBLISHED entries of this type (storefront / vibe-coded
|
|
10336
|
+
* mode). In admin mode this throws — use
|
|
10337
|
+
* `client.content.listAdmin({ storeId, type })`.
|
|
10338
|
+
*/
|
|
9849
10339
|
list: (locale?: string) => Promise<Content<"FAQ">[]>;
|
|
9850
|
-
/**
|
|
9851
|
-
|
|
10340
|
+
/**
|
|
10341
|
+
* Create a new entry in DRAFT (admin mode).
|
|
10342
|
+
* `storeId` is required — see the namespace docs above.
|
|
10343
|
+
*/
|
|
10344
|
+
create: (input: Omit<CreateContentInput<"FAQ">, "type">, storeId: string) => Promise<Content<"FAQ">>;
|
|
9852
10345
|
};
|
|
9853
10346
|
footer: {
|
|
9854
10347
|
/**
|
|
@@ -9857,10 +10350,17 @@ declare class BrainerceClient {
|
|
|
9857
10350
|
* hasn't seeded yet.
|
|
9858
10351
|
*/
|
|
9859
10352
|
get: (key?: string, locale?: string) => Promise<Content<"FOOTER"> | null>;
|
|
9860
|
-
/**
|
|
10353
|
+
/**
|
|
10354
|
+
* List all PUBLISHED entries of this type (storefront / vibe-coded
|
|
10355
|
+
* mode). In admin mode this throws — use
|
|
10356
|
+
* `client.content.listAdmin({ storeId, type })`.
|
|
10357
|
+
*/
|
|
9861
10358
|
list: (locale?: string) => Promise<Content<"FOOTER">[]>;
|
|
9862
|
-
/**
|
|
9863
|
-
|
|
10359
|
+
/**
|
|
10360
|
+
* Create a new entry in DRAFT (admin mode).
|
|
10361
|
+
* `storeId` is required — see the namespace docs above.
|
|
10362
|
+
*/
|
|
10363
|
+
create: (input: Omit<CreateContentInput<"FOOTER">, "type">, storeId: string) => Promise<Content<"FOOTER">>;
|
|
9864
10364
|
};
|
|
9865
10365
|
header: {
|
|
9866
10366
|
/**
|
|
@@ -9869,10 +10369,17 @@ declare class BrainerceClient {
|
|
|
9869
10369
|
* hasn't seeded yet.
|
|
9870
10370
|
*/
|
|
9871
10371
|
get: (key?: string, locale?: string) => Promise<Content<"HEADER"> | null>;
|
|
9872
|
-
/**
|
|
10372
|
+
/**
|
|
10373
|
+
* List all PUBLISHED entries of this type (storefront / vibe-coded
|
|
10374
|
+
* mode). In admin mode this throws — use
|
|
10375
|
+
* `client.content.listAdmin({ storeId, type })`.
|
|
10376
|
+
*/
|
|
9873
10377
|
list: (locale?: string) => Promise<Content<"HEADER">[]>;
|
|
9874
|
-
/**
|
|
9875
|
-
|
|
10378
|
+
/**
|
|
10379
|
+
* Create a new entry in DRAFT (admin mode).
|
|
10380
|
+
* `storeId` is required — see the namespace docs above.
|
|
10381
|
+
*/
|
|
10382
|
+
create: (input: Omit<CreateContentInput<"HEADER">, "type">, storeId: string) => Promise<Content<"HEADER">>;
|
|
9876
10383
|
};
|
|
9877
10384
|
announcement: {
|
|
9878
10385
|
/**
|
|
@@ -9881,10 +10388,17 @@ declare class BrainerceClient {
|
|
|
9881
10388
|
* hasn't seeded yet.
|
|
9882
10389
|
*/
|
|
9883
10390
|
get: (key?: string, locale?: string) => Promise<Content<"ANNOUNCEMENT"> | null>;
|
|
9884
|
-
/**
|
|
10391
|
+
/**
|
|
10392
|
+
* List all PUBLISHED entries of this type (storefront / vibe-coded
|
|
10393
|
+
* mode). In admin mode this throws — use
|
|
10394
|
+
* `client.content.listAdmin({ storeId, type })`.
|
|
10395
|
+
*/
|
|
9885
10396
|
list: (locale?: string) => Promise<Content<"ANNOUNCEMENT">[]>;
|
|
9886
|
-
/**
|
|
9887
|
-
|
|
10397
|
+
/**
|
|
10398
|
+
* Create a new entry in DRAFT (admin mode).
|
|
10399
|
+
* `storeId` is required — see the namespace docs above.
|
|
10400
|
+
*/
|
|
10401
|
+
create: (input: Omit<CreateContentInput<"ANNOUNCEMENT">, "type">, storeId: string) => Promise<Content<"ANNOUNCEMENT">>;
|
|
9888
10402
|
};
|
|
9889
10403
|
richText: {
|
|
9890
10404
|
/**
|
|
@@ -9893,10 +10407,17 @@ declare class BrainerceClient {
|
|
|
9893
10407
|
* hasn't seeded yet.
|
|
9894
10408
|
*/
|
|
9895
10409
|
get: (key?: string, locale?: string) => Promise<Content<"RICH_TEXT"> | null>;
|
|
9896
|
-
/**
|
|
10410
|
+
/**
|
|
10411
|
+
* List all PUBLISHED entries of this type (storefront / vibe-coded
|
|
10412
|
+
* mode). In admin mode this throws — use
|
|
10413
|
+
* `client.content.listAdmin({ storeId, type })`.
|
|
10414
|
+
*/
|
|
9897
10415
|
list: (locale?: string) => Promise<Content<"RICH_TEXT">[]>;
|
|
9898
|
-
/**
|
|
9899
|
-
|
|
10416
|
+
/**
|
|
10417
|
+
* Create a new entry in DRAFT (admin mode).
|
|
10418
|
+
* `storeId` is required — see the namespace docs above.
|
|
10419
|
+
*/
|
|
10420
|
+
create: (input: Omit<CreateContentInput<"RICH_TEXT">, "type">, storeId: string) => Promise<Content<"RICH_TEXT">>;
|
|
9900
10421
|
};
|
|
9901
10422
|
page: {
|
|
9902
10423
|
/**
|
|
@@ -9911,62 +10432,191 @@ declare class BrainerceClient {
|
|
|
9911
10432
|
* hasn't seeded yet.
|
|
9912
10433
|
*/
|
|
9913
10434
|
get: (key?: string, locale?: string) => Promise<Content<"PAGE"> | null>;
|
|
9914
|
-
/**
|
|
10435
|
+
/**
|
|
10436
|
+
* List all PUBLISHED entries of this type (storefront / vibe-coded
|
|
10437
|
+
* mode). In admin mode this throws — use
|
|
10438
|
+
* `client.content.listAdmin({ storeId, type })`.
|
|
10439
|
+
*/
|
|
9915
10440
|
list: (locale?: string) => Promise<Content<"PAGE">[]>;
|
|
9916
|
-
/**
|
|
9917
|
-
|
|
10441
|
+
/**
|
|
10442
|
+
* Create a new entry in DRAFT (admin mode).
|
|
10443
|
+
* `storeId` is required — see the namespace docs above.
|
|
10444
|
+
*/
|
|
10445
|
+
create: (input: Omit<CreateContentInput<"PAGE">, "type">, storeId: string) => Promise<Content<"PAGE">>;
|
|
9918
10446
|
};
|
|
9919
|
-
/**
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
10447
|
+
/**
|
|
10448
|
+
* Find a single row by its admin id (admin mode).
|
|
10449
|
+
*
|
|
10450
|
+
* @example
|
|
10451
|
+
* ```typescript
|
|
10452
|
+
* const row = await client.content.findById('cnt_123', 'store_123');
|
|
10453
|
+
* ```
|
|
10454
|
+
*/
|
|
10455
|
+
findById: <T_1 extends ContentType = ContentType>(id: string, storeId: string) => Promise<Content<T_1>>;
|
|
10456
|
+
/**
|
|
10457
|
+
* List rows in admin mode. `storeId` is required; `type` and `status`
|
|
10458
|
+
* are optional filters.
|
|
10459
|
+
*
|
|
10460
|
+
* @example
|
|
10461
|
+
* ```typescript
|
|
10462
|
+
* const faqs = await client.content.listAdmin({
|
|
10463
|
+
* storeId: 'store_123',
|
|
10464
|
+
* type: 'FAQ',
|
|
10465
|
+
* status: 'DRAFT',
|
|
10466
|
+
* });
|
|
10467
|
+
* ```
|
|
10468
|
+
*/
|
|
10469
|
+
listAdmin: <T_1 extends ContentType = ContentType>(filters: {
|
|
10470
|
+
storeId: string;
|
|
9923
10471
|
type?: T_1;
|
|
9924
10472
|
status?: "DRAFT" | "PUBLISHED";
|
|
9925
10473
|
}) => Promise<Array<Content<T_1>>>;
|
|
9926
|
-
/**
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
10474
|
+
/**
|
|
10475
|
+
* Replace `data` (and optional metadata) on an existing row.
|
|
10476
|
+
*
|
|
10477
|
+
* @example
|
|
10478
|
+
* ```typescript
|
|
10479
|
+
* await client.content.update('cnt_123', { name: 'Shipping FAQ' }, 'store_123');
|
|
10480
|
+
* ```
|
|
10481
|
+
*/
|
|
10482
|
+
update: <T_1 extends ContentType>(id: string, input: UpdateContentInput<T_1>, storeId: string) => Promise<Content<T_1>>;
|
|
10483
|
+
/**
|
|
10484
|
+
* Transition status DRAFT → PUBLISHED.
|
|
10485
|
+
*
|
|
10486
|
+
* @example
|
|
10487
|
+
* ```typescript
|
|
10488
|
+
* await client.content.publish('cnt_123', 'store_123');
|
|
10489
|
+
* ```
|
|
10490
|
+
*/
|
|
10491
|
+
publish: (id: string, storeId: string) => Promise<Content>;
|
|
10492
|
+
/**
|
|
10493
|
+
* Transition status PUBLISHED → DRAFT.
|
|
10494
|
+
*
|
|
10495
|
+
* @example
|
|
10496
|
+
* ```typescript
|
|
10497
|
+
* await client.content.unpublish('cnt_123', 'store_123');
|
|
10498
|
+
* ```
|
|
10499
|
+
*/
|
|
10500
|
+
unpublish: (id: string, storeId: string) => Promise<Content>;
|
|
10501
|
+
/**
|
|
10502
|
+
* Hard delete the row. Admin mode only.
|
|
10503
|
+
*
|
|
10504
|
+
* @example
|
|
10505
|
+
* ```typescript
|
|
10506
|
+
* await client.content.remove('cnt_123', 'store_123');
|
|
10507
|
+
* ```
|
|
10508
|
+
*/
|
|
10509
|
+
remove: (id: string, storeId: string) => Promise<void>;
|
|
9934
10510
|
};
|
|
9935
10511
|
/**
|
|
9936
10512
|
* Read and manage blog posts.
|
|
9937
10513
|
*
|
|
10514
|
+
* **⚠️ Every admin call takes an explicit `storeId`.** Admin mode has no
|
|
10515
|
+
* ambient store (`storeId` is only set in storefront mode) and the admin
|
|
10516
|
+
* routes are store-scoped: omitting it is rejected fail-closed by the store
|
|
10517
|
+
* scope guard (`403 STORE_SCOPE_REQUIRED`). Pass the id of the store your
|
|
10518
|
+
* API key is bound to — naming any other store is rejected as cross-tenant.
|
|
10519
|
+
*
|
|
10520
|
+
* Admin lookups are **by id**, not by slug (`getPost(slug)` is a public read
|
|
10521
|
+
* and throws in admin mode — use `findById(id, storeId)`).
|
|
10522
|
+
*
|
|
9938
10523
|
* ```typescript
|
|
9939
10524
|
* // Storefront / vibe-coded: list published posts
|
|
9940
10525
|
* const { data: posts } = await brainerce.blog.getPosts({ category: 'news' });
|
|
9941
10526
|
*
|
|
9942
|
-
* // Fetch one by slug
|
|
10527
|
+
* // Fetch one by slug (storefront / vibe-coded)
|
|
9943
10528
|
* const post = await brainerce.blog.getPost('my-first-post');
|
|
9944
10529
|
*
|
|
9945
|
-
* // Admin: create a draft
|
|
9946
|
-
* const
|
|
10530
|
+
* // Admin: list, read one, and create a draft
|
|
10531
|
+
* const all = await brainerce.blog.getPosts({}, 'store_123');
|
|
10532
|
+
* const one = await brainerce.blog.findById('post_123', 'store_123');
|
|
10533
|
+
* const draft = await brainerce.blog.create({ title: 'Hello World' }, 'store_123');
|
|
9947
10534
|
* ```
|
|
9948
10535
|
*/
|
|
9949
10536
|
blog: {
|
|
9950
10537
|
/**
|
|
9951
|
-
* List
|
|
9952
|
-
*
|
|
10538
|
+
* List posts. Filters: `category`, `tag`, `page`, `limit`.
|
|
10539
|
+
*
|
|
10540
|
+
* Storefront / vibe-coded mode lists PUBLISHED posts and ignores
|
|
10541
|
+
* `storeId` (the store is already in the base URL). Admin mode lists
|
|
10542
|
+
* drafts too and REQUIRES `storeId`.
|
|
10543
|
+
*
|
|
10544
|
+
* @example
|
|
10545
|
+
* ```typescript
|
|
10546
|
+
* const { data } = await client.blog.getPosts({ category: 'news' }); // storefront
|
|
10547
|
+
* const { data } = await client.blog.getPosts({}, 'store_123'); // admin
|
|
10548
|
+
* ```
|
|
9953
10549
|
*/
|
|
9954
|
-
getPosts: (params?: BlogPostListParams) => Promise<BlogPostListResponse>;
|
|
10550
|
+
getPosts: (params?: BlogPostListParams, storeId?: string) => Promise<BlogPostListResponse>;
|
|
9955
10551
|
/**
|
|
9956
|
-
* Fetch one
|
|
9957
|
-
*
|
|
10552
|
+
* Fetch one PUBLISHED post by its slug. Returns `null` on 404.
|
|
10553
|
+
*
|
|
10554
|
+
* Storefront / vibe-coded mode only — the admin API has no by-slug
|
|
10555
|
+
* lookup (`GET /api/blog/posts/:id` is by id), so this throws in admin
|
|
10556
|
+
* mode rather than issuing a request that can only 404.
|
|
10557
|
+
*
|
|
10558
|
+
* @example
|
|
10559
|
+
* ```typescript
|
|
10560
|
+
* const post = await client.blog.getPost('my-first-post');
|
|
10561
|
+
* ```
|
|
9958
10562
|
*/
|
|
9959
10563
|
getPost: (slug: string) => Promise<BlogPost | null>;
|
|
9960
|
-
/**
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
10564
|
+
/**
|
|
10565
|
+
* Fetch one post by its admin id — drafts included. Admin mode only.
|
|
10566
|
+
* Returns `null` on 404.
|
|
10567
|
+
*
|
|
10568
|
+
* @example
|
|
10569
|
+
* ```typescript
|
|
10570
|
+
* const post = await client.blog.findById('post_123', 'store_123');
|
|
10571
|
+
* ```
|
|
10572
|
+
*/
|
|
10573
|
+
findById: (id: string, storeId: string) => Promise<BlogPost | null>;
|
|
10574
|
+
/**
|
|
10575
|
+
* Create a blog post in DRAFT status. Admin mode only.
|
|
10576
|
+
*
|
|
10577
|
+
* @example
|
|
10578
|
+
* ```typescript
|
|
10579
|
+
* const draft = await client.blog.create({ title: 'Hello World' }, 'store_123');
|
|
10580
|
+
* ```
|
|
10581
|
+
*/
|
|
10582
|
+
create: (input: CreateBlogPostInput, storeId: string) => Promise<BlogPost>;
|
|
10583
|
+
/**
|
|
10584
|
+
* Update a blog post by ID. Admin mode only.
|
|
10585
|
+
*
|
|
10586
|
+
* @example
|
|
10587
|
+
* ```typescript
|
|
10588
|
+
* await client.blog.update('post_123', { title: 'Renamed' }, 'store_123');
|
|
10589
|
+
* ```
|
|
10590
|
+
*/
|
|
10591
|
+
update: (id: string, input: UpdateBlogPostInput, storeId: string) => Promise<BlogPost>;
|
|
10592
|
+
/**
|
|
10593
|
+
* Transition status → PUBLISHED (sets publishedAt = now if unset).
|
|
10594
|
+
* Admin mode only.
|
|
10595
|
+
*
|
|
10596
|
+
* @example
|
|
10597
|
+
* ```typescript
|
|
10598
|
+
* await client.blog.publish('post_123', 'store_123');
|
|
10599
|
+
* ```
|
|
10600
|
+
*/
|
|
10601
|
+
publish: (id: string, storeId: string) => Promise<BlogPost>;
|
|
10602
|
+
/**
|
|
10603
|
+
* Transition status PUBLISHED → DRAFT. Admin mode only.
|
|
10604
|
+
*
|
|
10605
|
+
* @example
|
|
10606
|
+
* ```typescript
|
|
10607
|
+
* await client.blog.unpublish('post_123', 'store_123');
|
|
10608
|
+
* ```
|
|
10609
|
+
*/
|
|
10610
|
+
unpublish: (id: string, storeId: string) => Promise<BlogPost>;
|
|
10611
|
+
/**
|
|
10612
|
+
* Hard-delete a blog post. Admin mode only.
|
|
10613
|
+
*
|
|
10614
|
+
* @example
|
|
10615
|
+
* ```typescript
|
|
10616
|
+
* await client.blog.remove('post_123', 'store_123');
|
|
10617
|
+
* ```
|
|
10618
|
+
*/
|
|
10619
|
+
remove: (id: string, storeId: string) => Promise<void>;
|
|
9970
10620
|
};
|
|
9971
10621
|
/**
|
|
9972
10622
|
* Submit a contact inquiry from a storefront contact form.
|
|
@@ -13079,41 +13729,43 @@ declare class BrainerceClient {
|
|
|
13079
13729
|
* ```
|
|
13080
13730
|
*/
|
|
13081
13731
|
uploadReviewPhoto(productId: string, file: File | Blob): Promise<ReviewPhotoUpload>;
|
|
13732
|
+
/** The message every team method throws. One string so they cannot drift. */
|
|
13733
|
+
private teamIsDashboardOnly;
|
|
13082
13734
|
/**
|
|
13083
|
-
* @deprecated Retiring, but
|
|
13084
|
-
* is dashboard-only
|
|
13735
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13736
|
+
* api_key principal and `getStoreTeam` is dashboard-only. Use the dashboard.
|
|
13085
13737
|
*/
|
|
13086
13738
|
getTeamMembers(): Promise<TeamMembersResponse>;
|
|
13087
13739
|
/**
|
|
13088
|
-
* @deprecated Retiring, but
|
|
13089
|
-
* is dashboard-only
|
|
13740
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13741
|
+
* api_key principal and `getStoreTeam` is dashboard-only. Use the dashboard.
|
|
13090
13742
|
*/
|
|
13091
13743
|
getTeamInvitations(): Promise<TeamInvitationsResponse>;
|
|
13092
13744
|
/**
|
|
13093
|
-
* @deprecated Retiring, but
|
|
13094
|
-
*
|
|
13745
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13746
|
+
* api_key principal and the store-level route is dashboard-only. Use the dashboard.
|
|
13095
13747
|
*/
|
|
13096
|
-
inviteTeamMember(
|
|
13748
|
+
inviteTeamMember(_data: InviteMemberDto): Promise<TeamInvitation>;
|
|
13097
13749
|
/**
|
|
13098
|
-
* @deprecated Retiring, but
|
|
13099
|
-
*
|
|
13750
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13751
|
+
* api_key principal and the store-level route is dashboard-only. Use the dashboard.
|
|
13100
13752
|
*/
|
|
13101
|
-
resendTeamInvitation(
|
|
13753
|
+
resendTeamInvitation(_invitationId: string): Promise<TeamInvitation>;
|
|
13102
13754
|
/**
|
|
13103
|
-
* @deprecated Retiring, but
|
|
13104
|
-
*
|
|
13755
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13756
|
+
* api_key principal and the store-level route is dashboard-only. Use the dashboard.
|
|
13105
13757
|
*/
|
|
13106
|
-
revokeTeamInvitation(
|
|
13758
|
+
revokeTeamInvitation(_invitationId: string): Promise<void>;
|
|
13107
13759
|
/**
|
|
13108
|
-
* @deprecated Retiring, but
|
|
13109
|
-
*
|
|
13760
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13761
|
+
* api_key principal and the store-level route is dashboard-only. Use the dashboard.
|
|
13110
13762
|
*/
|
|
13111
|
-
updateTeamMemberRole(
|
|
13763
|
+
updateTeamMemberRole(_memberId: string, _data: UpdateMemberRoleDto): Promise<TeamMember>;
|
|
13112
13764
|
/**
|
|
13113
|
-
* @deprecated Retiring, but
|
|
13114
|
-
*
|
|
13765
|
+
* @deprecated Retiring, but this ALWAYS throws: `/v1/team/*` rejects the
|
|
13766
|
+
* api_key principal and the store-level route is dashboard-only. Use the dashboard.
|
|
13115
13767
|
*/
|
|
13116
|
-
removeTeamMember(
|
|
13768
|
+
removeTeamMember(_memberId: string): Promise<void>;
|
|
13117
13769
|
/**
|
|
13118
13770
|
* Every store-level team operation is dashboard-only.
|
|
13119
13771
|
*
|
|
@@ -13534,7 +14186,7 @@ declare class BrainerceError extends Error {
|
|
|
13534
14186
|
constructor(message: string, statusCode: number, details?: unknown);
|
|
13535
14187
|
}
|
|
13536
14188
|
|
|
13537
|
-
declare const SDK_VERSION = "2.
|
|
14189
|
+
declare const SDK_VERSION = "2.7.0";
|
|
13538
14190
|
|
|
13539
14191
|
/**
|
|
13540
14192
|
* Verify a webhook signature from Brainerce
|
|
@@ -14035,4 +14687,4 @@ interface CategorySitemapOptions {
|
|
|
14035
14687
|
*/
|
|
14036
14688
|
declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
|
|
14037
14689
|
|
|
14038
|
-
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 };
|
|
14690
|
+
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 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 };
|