brainerce 1.63.0 → 2.0.2
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 +665 -298
- package/dist/index.d.mts +530 -201
- package/dist/index.d.ts +530 -201
- package/dist/index.js +389 -244
- package/dist/index.mjs +389 -244
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ interface BrainerceClientOptions {
|
|
|
14
14
|
salesChannelId?: string;
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated Use `salesChannelId` instead. `connectionId` is kept as a
|
|
17
|
-
* backwards-compatible alias and
|
|
17
|
+
* backwards-compatible alias. It is permanent and is not scheduled for removal.
|
|
18
18
|
*/
|
|
19
19
|
connectionId?: string;
|
|
20
20
|
/**
|
|
@@ -202,13 +202,13 @@ interface StoreInfo {
|
|
|
202
202
|
socialLinks?: Record<string, string> | null;
|
|
203
203
|
/** Sales Channel ID (sales-channel mode only) */
|
|
204
204
|
salesChannelId?: string;
|
|
205
|
-
/** @deprecated alias of `salesChannelId` —
|
|
205
|
+
/** @deprecated permanent back-compat alias of `salesChannelId` — not scheduled for removal */
|
|
206
206
|
connectionId?: string;
|
|
207
207
|
/** Store name (sales-channel mode only - same as name) */
|
|
208
208
|
storeName?: string;
|
|
209
209
|
/** Sales channel status (sales-channel mode only) */
|
|
210
210
|
salesChannelStatus?: string;
|
|
211
|
-
/** @deprecated alias of `salesChannelStatus` —
|
|
211
|
+
/** @deprecated permanent back-compat alias of `salesChannelStatus` — not scheduled for removal */
|
|
212
212
|
status?: string;
|
|
213
213
|
/** Allowed API scopes (sales-channel mode only) */
|
|
214
214
|
allowedScopes?: string[];
|
|
@@ -619,6 +619,15 @@ interface ProductMetafield {
|
|
|
619
619
|
*/
|
|
620
620
|
name?: string;
|
|
621
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* Publish state of a product. **Lowercase**, unlike order statuses.
|
|
624
|
+
*
|
|
625
|
+
* `active` is visible to shoppers; `draft` is merchant-only. The backend
|
|
626
|
+
* validates this exact pair on both the query filter and the write DTOs, and
|
|
627
|
+
* defaults a product to `active`. There is no `archived` product state on this
|
|
628
|
+
* platform. Archiving exists for modifier groups and modifiers, not products.
|
|
629
|
+
*/
|
|
630
|
+
type ProductStatus = 'active' | 'draft';
|
|
622
631
|
interface Product {
|
|
623
632
|
id: string;
|
|
624
633
|
name: string;
|
|
@@ -707,7 +716,7 @@ interface Product {
|
|
|
707
716
|
/** ISO 4217 currency of `displayPrice` (the buyer's region currency). */
|
|
708
717
|
displayCurrency?: string;
|
|
709
718
|
/** Product status (active, draft). Always returned by backend. */
|
|
710
|
-
status:
|
|
719
|
+
status: ProductStatus;
|
|
711
720
|
type: 'SIMPLE' | 'VARIABLE';
|
|
712
721
|
/** Whether product is downloadable/digital. */
|
|
713
722
|
isDownloadable?: boolean;
|
|
@@ -756,7 +765,7 @@ interface Product {
|
|
|
756
765
|
attribute: {
|
|
757
766
|
id: string;
|
|
758
767
|
name: string;
|
|
759
|
-
displayType?:
|
|
768
|
+
displayType?: AttributeDisplayType;
|
|
760
769
|
translations?: Record<string, Record<string, string>> | null;
|
|
761
770
|
} | null;
|
|
762
771
|
attributeOption: {
|
|
@@ -776,14 +785,14 @@ interface Product {
|
|
|
776
785
|
name: string;
|
|
777
786
|
connectionId: string;
|
|
778
787
|
};
|
|
779
|
-
/** @deprecated alias of `salesChannel` —
|
|
788
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
780
789
|
connection?: {
|
|
781
790
|
id: string;
|
|
782
791
|
name: string;
|
|
783
792
|
connectionId: string;
|
|
784
793
|
};
|
|
785
794
|
}>;
|
|
786
|
-
/** @deprecated alias of `channelPublishes` —
|
|
795
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
787
796
|
vibeCodedPublishes?: Array<{
|
|
788
797
|
salesChannel: {
|
|
789
798
|
id: string;
|
|
@@ -838,6 +847,20 @@ interface ProductReviewImageAdmin extends ProductReviewImage {
|
|
|
838
847
|
hiddenAt: string | null;
|
|
839
848
|
createdAt: string;
|
|
840
849
|
}
|
|
850
|
+
/**
|
|
851
|
+
* Moderation states of a marketplace **app** submission, the values the
|
|
852
|
+
* platform stores on an app review submission while Brainerce staff approve or
|
|
853
|
+
* reject a listed app.
|
|
854
|
+
*
|
|
855
|
+
* ⛔ **This has nothing to do with product reviews.** Customer product reviews
|
|
856
|
+
* publish immediately and carry no status field at all: see `ProductReview`
|
|
857
|
+
* below. Do not build a product-review moderation queue on this type; the
|
|
858
|
+
* platform does not have one.
|
|
859
|
+
*
|
|
860
|
+
* Exported for completeness of the platform vocabulary. No SDK method returns
|
|
861
|
+
* or accepts it today.
|
|
862
|
+
*/
|
|
863
|
+
type ReviewStatus = 'PENDING' | 'IN_REVIEW' | 'APPROVED' | 'REJECTED' | 'CHANGES_REQUESTED';
|
|
841
864
|
/**
|
|
842
865
|
* Product review submitted by a customer.
|
|
843
866
|
* Reviews publish immediately (no PENDING state). Merchants hide via the admin
|
|
@@ -990,8 +1013,13 @@ interface ProductVariant {
|
|
|
990
1013
|
} | null;
|
|
991
1014
|
/** Display position/order for sorting variants */
|
|
992
1015
|
position: number;
|
|
993
|
-
/**
|
|
994
|
-
|
|
1016
|
+
/**
|
|
1017
|
+
* Variant publish state. Same lowercase pair as `ProductStatus`, and the
|
|
1018
|
+
* backend validates it with the same `active` / `draft` enum on the create
|
|
1019
|
+
* and update DTOs. Null when the merchant never set it, which the server
|
|
1020
|
+
* treats as `active`.
|
|
1021
|
+
*/
|
|
1022
|
+
status?: VariantStatus | null;
|
|
995
1023
|
createdAt: string;
|
|
996
1024
|
updatedAt: string;
|
|
997
1025
|
/** Per-sales-channel field overrides keyed by connectionId */
|
|
@@ -1441,7 +1469,7 @@ interface ProductQueryParams {
|
|
|
1441
1469
|
page?: number;
|
|
1442
1470
|
limit?: number;
|
|
1443
1471
|
search?: string;
|
|
1444
|
-
status?:
|
|
1472
|
+
status?: ProductStatus;
|
|
1445
1473
|
/** Filter by category IDs (comma-separated or array) */
|
|
1446
1474
|
categories?: string | string[];
|
|
1447
1475
|
/** Filter by brand IDs (comma-separated or array) */
|
|
@@ -1467,8 +1495,27 @@ interface ProductQueryParams {
|
|
|
1467
1495
|
* ```
|
|
1468
1496
|
*/
|
|
1469
1497
|
metafields?: Record<string, string | string[]>;
|
|
1470
|
-
/**
|
|
1471
|
-
|
|
1498
|
+
/**
|
|
1499
|
+
* Sort field. **Which values actually take effect depends on the SDK mode.**
|
|
1500
|
+
*
|
|
1501
|
+
* - `storeId` (public storefront) and `apiKey` (admin) modes validate against
|
|
1502
|
+
* the full set: `name`, `price`, `createdAt`, `updatedAt`, `menuOrder`.
|
|
1503
|
+
* Anything outside it is rejected with a 400.
|
|
1504
|
+
* - `salesChannelId` (vibe-coded) mode honours only `name`, `price` and
|
|
1505
|
+
* `createdAt`. It does **not** reject `updatedAt` or `menuOrder`; it
|
|
1506
|
+
* silently ignores them and returns the merchant's curated order instead,
|
|
1507
|
+
* so a sort that looks accepted may simply not have happened.
|
|
1508
|
+
*
|
|
1509
|
+
* Omit `sortBy` entirely and every mode returns the merchant's curated order
|
|
1510
|
+
* (`menuOrder` ascending, then newest first). That is the right default for a
|
|
1511
|
+
* storefront listing, because it is the order the merchant arranged in the
|
|
1512
|
+
* dashboard.
|
|
1513
|
+
*
|
|
1514
|
+
* `price` sorts on the stored `basePrice` column. For VARIABLE products that
|
|
1515
|
+
* can differ from the effective price a shopper sees, which is the minimum
|
|
1516
|
+
* across variants.
|
|
1517
|
+
*/
|
|
1518
|
+
sortBy?: 'name' | 'price' | 'createdAt' | 'updatedAt' | 'menuOrder';
|
|
1472
1519
|
sortOrder?: 'asc' | 'desc';
|
|
1473
1520
|
/** Locale for translated content (e.g., "he", "es"). Falls back to store default. */
|
|
1474
1521
|
locale?: string;
|
|
@@ -1598,7 +1645,7 @@ interface CreateProductDto {
|
|
|
1598
1645
|
basePrice: number;
|
|
1599
1646
|
salePrice?: number;
|
|
1600
1647
|
costPrice?: number;
|
|
1601
|
-
status?:
|
|
1648
|
+
status?: ProductStatus;
|
|
1602
1649
|
type?: 'SIMPLE' | 'VARIABLE';
|
|
1603
1650
|
isDownloadable?: boolean;
|
|
1604
1651
|
/** Existing category IDs to assign. Unknown/cross-store IDs are rejected with 400. To assign by name (auto-creating if missing), use `categoryNames`. */
|
|
@@ -1732,7 +1779,7 @@ interface UpdateProductDto {
|
|
|
1732
1779
|
basePrice?: number;
|
|
1733
1780
|
salePrice?: number | null;
|
|
1734
1781
|
costPrice?: number | null;
|
|
1735
|
-
status?:
|
|
1782
|
+
status?: ProductStatus;
|
|
1736
1783
|
isDownloadable?: boolean;
|
|
1737
1784
|
/** Existing category IDs to assign (replaces the current set). Pass `[]` to clear. Unknown/cross-store IDs are rejected with 400. To assign by name (auto-creating if missing), use `categoryNames`. */
|
|
1738
1785
|
categories?: string[];
|
|
@@ -1886,10 +1933,21 @@ interface OrderStatusChange {
|
|
|
1886
1933
|
note?: string | null;
|
|
1887
1934
|
}
|
|
1888
1935
|
/**
|
|
1889
|
-
*
|
|
1890
|
-
*
|
|
1936
|
+
* The canonical order statuses. **The wire format is UPPERCASE.**
|
|
1937
|
+
*
|
|
1938
|
+
* These are the exact values the API returns on `Order.status` and the exact
|
|
1939
|
+
* values it accepts when you set a status. Send `'CANCELLED'`, never
|
|
1940
|
+
* `'cancelled'`.
|
|
1941
|
+
*
|
|
1942
|
+
* The server enforces a state machine on top of this list, so not every value
|
|
1943
|
+
* is reachable from every other one. Terminal states (`CANCELLED`, `REFUNDED`)
|
|
1944
|
+
* do not transition anywhere.
|
|
1945
|
+
*
|
|
1946
|
+
* **Breaking change in SDK 2.0.** Earlier releases declared a shorter,
|
|
1947
|
+
* lowercase union that never matched the API. If you were comparing against
|
|
1948
|
+
* `'pending'` or `'cancelled'`, uppercase those comparisons.
|
|
1891
1949
|
*/
|
|
1892
|
-
type OrderStatus = '
|
|
1950
|
+
type OrderStatus = 'DRAFT' | 'PENDING' | 'PROCESSING' | 'ON_HOLD' | 'PAID' | 'SHIPPED' | 'DELIVERED' | 'COMPLETED' | 'FULFILLED' | 'CANCELLED' | 'REFUNDED' | 'PARTIALLY_REFUNDED';
|
|
1893
1951
|
interface OrderCustomer {
|
|
1894
1952
|
email: string;
|
|
1895
1953
|
name?: string;
|
|
@@ -1991,6 +2049,11 @@ interface OrderDownloadLink {
|
|
|
1991
2049
|
interface OrderQueryParams {
|
|
1992
2050
|
page?: number;
|
|
1993
2051
|
limit?: number;
|
|
2052
|
+
/**
|
|
2053
|
+
* Filter by canonical status, UPPERCASE. The server also accepts the id of a
|
|
2054
|
+
* custom status label for stores using that feature, which this union does
|
|
2055
|
+
* not model. Cast if you need to filter by a label id.
|
|
2056
|
+
*/
|
|
1994
2057
|
status?: OrderStatus;
|
|
1995
2058
|
sortBy?: 'createdAt' | 'totalAmount';
|
|
1996
2059
|
sortOrder?: 'asc' | 'desc';
|
|
@@ -2081,14 +2144,14 @@ interface Coupon {
|
|
|
2081
2144
|
name: string;
|
|
2082
2145
|
connectionId: string;
|
|
2083
2146
|
};
|
|
2084
|
-
/** @deprecated alias of `salesChannel` —
|
|
2147
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
2085
2148
|
connection?: {
|
|
2086
2149
|
id: string;
|
|
2087
2150
|
name: string;
|
|
2088
2151
|
connectionId: string;
|
|
2089
2152
|
};
|
|
2090
2153
|
}>;
|
|
2091
|
-
/** @deprecated alias of `channelPublishes` —
|
|
2154
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
2092
2155
|
vibeCodedPublishes?: Array<{
|
|
2093
2156
|
salesChannel: {
|
|
2094
2157
|
id: string;
|
|
@@ -3039,6 +3102,19 @@ type GuestCheckoutStartResponse = {
|
|
|
3039
3102
|
message: string;
|
|
3040
3103
|
};
|
|
3041
3104
|
type CheckoutStatus = 'PENDING' | 'SHIPPING_SET' | 'PAYMENT_PENDING' | 'PAYMENT_PROCESSING' | 'COMPLETED' | 'FAILED' | 'EXPIRED';
|
|
3105
|
+
/**
|
|
3106
|
+
* How the order reaches the customer. **Lowercase**, unlike `CheckoutStatus`.
|
|
3107
|
+
*
|
|
3108
|
+
* `shipping` is the server default when a checkout is created. `pickup` means
|
|
3109
|
+
* the customer collects from a store location, so the checkout carries a
|
|
3110
|
+
* `pickupLocation` instead of a shipping address, and shipping rates are not
|
|
3111
|
+
* quoted. Set it with `client.setDeliveryType(checkoutId, deliveryType)`.
|
|
3112
|
+
*
|
|
3113
|
+
* These two are the only values the API accepts. Checkout custom fields are
|
|
3114
|
+
* also gated on this value, so a field scoped to pickup does not appear on a
|
|
3115
|
+
* shipping checkout.
|
|
3116
|
+
*/
|
|
3117
|
+
type DeliveryType = 'shipping' | 'pickup';
|
|
3042
3118
|
/**
|
|
3043
3119
|
* Individual tax line item in the breakdown
|
|
3044
3120
|
* @example
|
|
@@ -3188,6 +3264,13 @@ interface CheckoutLineItem {
|
|
|
3188
3264
|
name: string;
|
|
3189
3265
|
sku: string;
|
|
3190
3266
|
images?: ProductImage[];
|
|
3267
|
+
/**
|
|
3268
|
+
* Whether this product is a digital/downloadable one. The server always
|
|
3269
|
+
* sends it on checkout line items, so this is how you detect an
|
|
3270
|
+
* all-digital cart: `items.every(i => i.product.isDownloadable)`. Use that
|
|
3271
|
+
* to skip the shipping address step and the delivery-method picker.
|
|
3272
|
+
*/
|
|
3273
|
+
isDownloadable?: boolean;
|
|
3191
3274
|
};
|
|
3192
3275
|
/**
|
|
3193
3276
|
* Nested variant information (null for simple products).
|
|
@@ -3406,7 +3489,7 @@ interface Checkout {
|
|
|
3406
3489
|
/** Customer ID if linked to a customer account */
|
|
3407
3490
|
customerId?: string | null;
|
|
3408
3491
|
/** Delivery method: "shipping" (default) or "pickup" */
|
|
3409
|
-
deliveryType?:
|
|
3492
|
+
deliveryType?: DeliveryType;
|
|
3410
3493
|
/** Pickup location details (when deliveryType is "pickup") */
|
|
3411
3494
|
pickupLocation?: PickupLocation | null;
|
|
3412
3495
|
/** Shipping address (required before selecting shipping) */
|
|
@@ -3803,7 +3886,7 @@ interface WebhookEvent {
|
|
|
3803
3886
|
data: unknown;
|
|
3804
3887
|
timestamp: string;
|
|
3805
3888
|
}
|
|
3806
|
-
type WebhookEventType = '
|
|
3889
|
+
type WebhookEventType = 'order.created' | 'order.updated' | 'order.paid' | 'order.fulfilled' | 'order.cancelled' | 'order.refunded' | 'customer.created' | 'customer.updated' | 'customer.deleted' | 'product.created' | 'product.updated' | 'product.deleted' | 'inventory.updated' | 'inventory.low' | 'checkout.completed' | 'checkout.abandoned' | 'payment.succeeded' | 'payment.failed' | 'payment.refunded' | 'blog.post.published' | 'blog.post.updated';
|
|
3807
3890
|
type VariantStatus = 'active' | 'draft';
|
|
3808
3891
|
interface CreateVariantDto {
|
|
3809
3892
|
sku?: string;
|
|
@@ -3901,7 +3984,19 @@ interface MediaAsset {
|
|
|
3901
3984
|
alt: string | null;
|
|
3902
3985
|
createdAt: string;
|
|
3903
3986
|
}
|
|
3904
|
-
/**
|
|
3987
|
+
/**
|
|
3988
|
+
* Query params for `listMedia`.
|
|
3989
|
+
*
|
|
3990
|
+
* These three are the complete set. The public `GET /api/v1/media` endpoint
|
|
3991
|
+
* that this SDK calls reads only `page`, `limit` and `search`, and `search`
|
|
3992
|
+
* matches on name and filename.
|
|
3993
|
+
*
|
|
3994
|
+
* ⛔ The dashboard's own media browser has a richer filter set (asset type,
|
|
3995
|
+
* sort field, sort direction, in-use vs unused, folder scope), but that lives
|
|
3996
|
+
* on a **different** internal route. Sending those names here does nothing:
|
|
3997
|
+
* they are dropped without an error, and you get an unfiltered first page back
|
|
3998
|
+
* that looks like a successful filter.
|
|
3999
|
+
*/
|
|
3905
4000
|
interface ListMediaParams {
|
|
3906
4001
|
page?: number;
|
|
3907
4002
|
limit?: number;
|
|
@@ -3936,6 +4031,16 @@ interface Refund {
|
|
|
3936
4031
|
currency: string;
|
|
3937
4032
|
reason?: string;
|
|
3938
4033
|
items?: RefundLineItemResponse[];
|
|
4034
|
+
/**
|
|
4035
|
+
* ⛔ **Deliberately left as `string`, because the casing is not consistent
|
|
4036
|
+
* across the two methods that return this type.**
|
|
4037
|
+
*
|
|
4038
|
+
* `createRefund()` passes the stored payment-refund status straight through,
|
|
4039
|
+
* so you get an UPPERCASE `PaymentRecordStatus` value such as `'PENDING'`.
|
|
4040
|
+
* `getOrderRefunds()` lowercases it on the way out, so the same refund comes
|
|
4041
|
+
* back as `'pending'`. Compare case-insensitively
|
|
4042
|
+
* (`status.toUpperCase() === 'PENDING'`) rather than against a literal.
|
|
4043
|
+
*/
|
|
3939
4044
|
status: string;
|
|
3940
4045
|
}
|
|
3941
4046
|
interface UpdateOrderShippingDto {
|
|
@@ -4389,6 +4494,20 @@ interface PaymentIntent {
|
|
|
4389
4494
|
/** Runtime client SDK overrides (merged with provider manifest config) */
|
|
4390
4495
|
clientSdk?: PaymentClientSdk;
|
|
4391
4496
|
}
|
|
4497
|
+
/**
|
|
4498
|
+
* The stored payment-record vocabulary. **UPPERCASE.**
|
|
4499
|
+
*
|
|
4500
|
+
* These are the values the platform writes to a payment record, a payment
|
|
4501
|
+
* refund record, and a checkout's `paymentStatus` column. `CAPTURED` is the
|
|
4502
|
+
* only state that means the money actually moved. `AUTHORIZED` is a hold, not
|
|
4503
|
+
* a charge, and only a `CAPTURED` payment can be refunded.
|
|
4504
|
+
*
|
|
4505
|
+
* **This is not the same thing as the `PaymentStatus` interface below**, which
|
|
4506
|
+
* is the live checkout-polling object and carries its own lowercase
|
|
4507
|
+
* `pending | processing | succeeded | failed | canceled` field. It is also not
|
|
4508
|
+
* what `Refund.status` returns: see the note on `Refund`.
|
|
4509
|
+
*/
|
|
4510
|
+
type PaymentRecordStatus = 'PENDING' | 'AUTHORIZED' | 'CAPTURED' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED' | 'CANCELLED';
|
|
4392
4511
|
/**
|
|
4393
4512
|
* Payment status for a checkout.
|
|
4394
4513
|
* Use this to poll for payment completion after redirect-based flows.
|
|
@@ -4578,14 +4697,14 @@ interface Category {
|
|
|
4578
4697
|
name: string;
|
|
4579
4698
|
connectionId: string;
|
|
4580
4699
|
};
|
|
4581
|
-
/** @deprecated alias of `salesChannel` —
|
|
4700
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
4582
4701
|
connection?: {
|
|
4583
4702
|
id: string;
|
|
4584
4703
|
name: string;
|
|
4585
4704
|
connectionId: string;
|
|
4586
4705
|
};
|
|
4587
4706
|
}>;
|
|
4588
|
-
/** @deprecated alias of `channelPublishes` —
|
|
4707
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
4589
4708
|
vibeCodedPublishes?: Array<{
|
|
4590
4709
|
salesChannel: {
|
|
4591
4710
|
id: string;
|
|
@@ -4666,14 +4785,14 @@ interface Brand {
|
|
|
4666
4785
|
name: string;
|
|
4667
4786
|
connectionId: string;
|
|
4668
4787
|
};
|
|
4669
|
-
/** @deprecated alias of `salesChannel` —
|
|
4788
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
4670
4789
|
connection?: {
|
|
4671
4790
|
id: string;
|
|
4672
4791
|
name: string;
|
|
4673
4792
|
connectionId: string;
|
|
4674
4793
|
};
|
|
4675
4794
|
}>;
|
|
4676
|
-
/** @deprecated alias of `channelPublishes` —
|
|
4795
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
4677
4796
|
vibeCodedPublishes?: Array<{
|
|
4678
4797
|
salesChannel: {
|
|
4679
4798
|
id: string;
|
|
@@ -4735,14 +4854,14 @@ interface Tag {
|
|
|
4735
4854
|
name: string;
|
|
4736
4855
|
connectionId: string;
|
|
4737
4856
|
};
|
|
4738
|
-
/** @deprecated alias of `salesChannel` —
|
|
4857
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
4739
4858
|
connection?: {
|
|
4740
4859
|
id: string;
|
|
4741
4860
|
name: string;
|
|
4742
4861
|
connectionId: string;
|
|
4743
4862
|
};
|
|
4744
4863
|
}>;
|
|
4745
|
-
/** @deprecated alias of `channelPublishes` —
|
|
4864
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
4746
4865
|
vibeCodedPublishes?: Array<{
|
|
4747
4866
|
salesChannel: {
|
|
4748
4867
|
id: string;
|
|
@@ -4771,6 +4890,11 @@ interface UpdateTagDto {
|
|
|
4771
4890
|
* Attribute source type
|
|
4772
4891
|
*/
|
|
4773
4892
|
type AttributeSource = 'GLOBAL' | 'PLATFORM';
|
|
4893
|
+
/**
|
|
4894
|
+
* How an attribute's options render as swatches on the storefront.
|
|
4895
|
+
* `'DEFAULT'` is a plain text/dropdown option list.
|
|
4896
|
+
*/
|
|
4897
|
+
type AttributeDisplayType = 'DEFAULT' | 'COLOR_SWATCH' | 'IMAGE_SWATCH' | 'MIXED_SWATCH';
|
|
4774
4898
|
/**
|
|
4775
4899
|
* Attribute for product variations
|
|
4776
4900
|
*/
|
|
@@ -4779,7 +4903,7 @@ interface Attribute {
|
|
|
4779
4903
|
accountId: string;
|
|
4780
4904
|
storeId?: string | null;
|
|
4781
4905
|
name: string;
|
|
4782
|
-
displayType?:
|
|
4906
|
+
displayType?: AttributeDisplayType;
|
|
4783
4907
|
source: AttributeSource;
|
|
4784
4908
|
platform?: ConnectorPlatform | null;
|
|
4785
4909
|
externalId?: string | null;
|
|
@@ -4811,7 +4935,7 @@ interface AttributeOption {
|
|
|
4811
4935
|
}
|
|
4812
4936
|
interface CreateAttributeDto {
|
|
4813
4937
|
name: string;
|
|
4814
|
-
displayType?:
|
|
4938
|
+
displayType?: AttributeDisplayType;
|
|
4815
4939
|
source: AttributeSource;
|
|
4816
4940
|
platform?: ConnectorPlatform;
|
|
4817
4941
|
storeId?: string;
|
|
@@ -4821,7 +4945,7 @@ interface CreateAttributeDto {
|
|
|
4821
4945
|
}
|
|
4822
4946
|
interface UpdateAttributeDto {
|
|
4823
4947
|
name?: string;
|
|
4824
|
-
displayType?:
|
|
4948
|
+
displayType?: AttributeDisplayType;
|
|
4825
4949
|
platformMetadata?: Record<string, unknown>;
|
|
4826
4950
|
isActive?: boolean;
|
|
4827
4951
|
}
|
|
@@ -5006,6 +5130,72 @@ interface ShippingZoneQueryParams {
|
|
|
5006
5130
|
sortBy?: string;
|
|
5007
5131
|
sortOrder?: 'asc' | 'desc';
|
|
5008
5132
|
}
|
|
5133
|
+
/**
|
|
5134
|
+
* Parcel override for a return label. Omit to use the installed shipping
|
|
5135
|
+
* app's configured defaults — what the customer packs a return into is
|
|
5136
|
+
* rarely what left the warehouse.
|
|
5137
|
+
*/
|
|
5138
|
+
interface ReturnLabelParcel {
|
|
5139
|
+
length?: string;
|
|
5140
|
+
width?: string;
|
|
5141
|
+
height?: string;
|
|
5142
|
+
weight?: string;
|
|
5143
|
+
distanceUnit?: 'in' | 'cm';
|
|
5144
|
+
massUnit?: 'lb' | 'oz' | 'g' | 'kg';
|
|
5145
|
+
}
|
|
5146
|
+
/**
|
|
5147
|
+
* Buy a return label for an order: the customer ships, the merchant receives.
|
|
5148
|
+
* See {@link BrainerceClient.createReturnLabel}.
|
|
5149
|
+
*
|
|
5150
|
+
* There is no `rateId` here, unlike a normal shipment. A return is a distinct
|
|
5151
|
+
* kind of shipment at the carrier, fixed when it is created and not amendable
|
|
5152
|
+
* afterwards, so it cannot be rate-shopped first — this quotes and buys in
|
|
5153
|
+
* one call. `preferredCarrier` / `preferredService` are the only steering;
|
|
5154
|
+
* omit both and the cheapest rate wins, with the response reporting what was
|
|
5155
|
+
* actually billed.
|
|
5156
|
+
*
|
|
5157
|
+
* The merchant's carrier account pays. There is no mechanism for charging the
|
|
5158
|
+
* customer for return postage — the cost lands on
|
|
5159
|
+
* {@link CreateReturnLabelResponse.rate} so it can be deducted from a refund
|
|
5160
|
+
* deliberately rather than absorbed silently.
|
|
5161
|
+
*/
|
|
5162
|
+
interface CreateReturnLabelDto {
|
|
5163
|
+
/** Parcel dimensions for the return. Defaults to the shipping app config. */
|
|
5164
|
+
parcel?: ReturnLabelParcel;
|
|
5165
|
+
/**
|
|
5166
|
+
* Label file format. `'PDF'` prints from a browser, which is what a
|
|
5167
|
+
* customer needs; `'ZPL'`/`'EPL'` drive warehouse thermal printers.
|
|
5168
|
+
* Defaults to `'PDF'`. If the carrier cannot produce the requested format
|
|
5169
|
+
* it returns its closest match rather than failing the purchase.
|
|
5170
|
+
*/
|
|
5171
|
+
labelFormat?: 'PDF' | 'PNG' | 'ZPL' | 'EPL';
|
|
5172
|
+
/** Preferred carrier slug (e.g. `'USPS'`). Falls back to the cheapest rate. */
|
|
5173
|
+
preferredCarrier?: string;
|
|
5174
|
+
/** Preferred service slug (e.g. `'GroundAdvantage'`). Falls back to the cheapest rate. */
|
|
5175
|
+
preferredService?: string;
|
|
5176
|
+
/**
|
|
5177
|
+
* The outbound `Shipment.id` this return reverses. Recorded on the return
|
|
5178
|
+
* for the merchant's own records; not required, since a return can predate
|
|
5179
|
+
* any shipment record.
|
|
5180
|
+
*/
|
|
5181
|
+
returnForShipmentId?: string;
|
|
5182
|
+
/** Why the customer is returning it. Stored on the shipment, shown to the merchant. */
|
|
5183
|
+
reason?: string;
|
|
5184
|
+
}
|
|
5185
|
+
/** Response from {@link BrainerceClient.createReturnLabel}. */
|
|
5186
|
+
interface CreateReturnLabelResponse {
|
|
5187
|
+
shipmentId: string;
|
|
5188
|
+
labelUrl: string;
|
|
5189
|
+
trackingNumber: string;
|
|
5190
|
+
carrier: string;
|
|
5191
|
+
/**
|
|
5192
|
+
* What the merchant's carrier account was billed for this return. `null`
|
|
5193
|
+
* only when the app reported no usable figure — the label is real either
|
|
5194
|
+
* way, and showing nothing beats showing a guess.
|
|
5195
|
+
*/
|
|
5196
|
+
rate: string | null;
|
|
5197
|
+
rateCurrency: string | null;
|
|
5198
|
+
}
|
|
5009
5199
|
/**
|
|
5010
5200
|
* Tax rate configuration
|
|
5011
5201
|
*/
|
|
@@ -5388,14 +5578,14 @@ interface MetafieldDefinition {
|
|
|
5388
5578
|
name: string;
|
|
5389
5579
|
connectionId: string;
|
|
5390
5580
|
};
|
|
5391
|
-
/** @deprecated alias of `salesChannel` —
|
|
5581
|
+
/** @deprecated permanent back-compat alias of `salesChannel` — not scheduled for removal */
|
|
5392
5582
|
connection?: {
|
|
5393
5583
|
id: string;
|
|
5394
5584
|
name: string;
|
|
5395
5585
|
connectionId: string;
|
|
5396
5586
|
};
|
|
5397
5587
|
}>;
|
|
5398
|
-
/** @deprecated alias of `channelPublishes` —
|
|
5588
|
+
/** @deprecated permanent back-compat alias of `channelPublishes` — not scheduled for removal */
|
|
5399
5589
|
vibeCodedPublishes?: Array<{
|
|
5400
5590
|
salesChannel: {
|
|
5401
5591
|
id: string;
|
|
@@ -6927,6 +7117,75 @@ interface BlogPostListResponse {
|
|
|
6927
7117
|
totalPages: number;
|
|
6928
7118
|
};
|
|
6929
7119
|
}
|
|
7120
|
+
/**
|
|
7121
|
+
* Entity types that carry a `translations` JSON blob and are reachable via
|
|
7122
|
+
* the Translations admin API (`client.getTranslations`, `setTranslation`,
|
|
7123
|
+
* `deleteTranslation`, `aiTranslateSingle`, `aiTranslateBulk`,
|
|
7124
|
+
* `getTranslationStatus`).
|
|
7125
|
+
*/
|
|
7126
|
+
type TranslatableEntityType = 'store' | 'product' | 'category' | 'brand' | 'tag' | 'variant' | 'attribute' | 'attributeOption' | 'metafield' | 'metafieldDefinition' | 'contactForm' | 'contactFormField' | 'modifierGroup' | 'modifier' | 'bundleOffer' | 'orderBump' | 'discountRule' | 'blogPost';
|
|
7127
|
+
/** One locale's translated field values for an entity. `undefined`/missing keys fall back to the base (default-locale) field. */
|
|
7128
|
+
type LocaleTranslation = Record<string, string | undefined>;
|
|
7129
|
+
/** All persisted translations for one entity, keyed by BCP-47 locale (e.g. `"he"`, `"fr-CA"`). */
|
|
7130
|
+
type TranslationsMap = Record<string, LocaleTranslation>;
|
|
7131
|
+
/**
|
|
7132
|
+
* Body for `setTranslation`. Only the fields valid for the target
|
|
7133
|
+
* `entityType` are persisted server-side (e.g. `blogPost` accepts
|
|
7134
|
+
* `title`/`excerpt`/`content`/`seoTitle`/`seoDescription`/`slug`; `category`
|
|
7135
|
+
* accepts `name`/`description`/`slug`) — passing others is a silent no-op,
|
|
7136
|
+
* not an error. Omitted fields leave the existing translation untouched.
|
|
7137
|
+
*/
|
|
7138
|
+
interface SetTranslationFields {
|
|
7139
|
+
name?: string;
|
|
7140
|
+
description?: string;
|
|
7141
|
+
title?: string;
|
|
7142
|
+
excerpt?: string;
|
|
7143
|
+
content?: string;
|
|
7144
|
+
seoTitle?: string;
|
|
7145
|
+
seoDescription?: string;
|
|
7146
|
+
slug?: string;
|
|
7147
|
+
}
|
|
7148
|
+
/** Input for `aiTranslateSingle`. */
|
|
7149
|
+
interface AiTranslateSingleInput {
|
|
7150
|
+
entityType: TranslatableEntityType;
|
|
7151
|
+
entityId: string;
|
|
7152
|
+
/** BCP-47 locale code, e.g. `"he"`, `"fr-CA"`. */
|
|
7153
|
+
targetLocale: string;
|
|
7154
|
+
/**
|
|
7155
|
+
* Optional in-flight source text (e.g. unsaved editor state) to translate
|
|
7156
|
+
* from instead of the entity's persisted base fields. Keys must match the
|
|
7157
|
+
* entity's translatable fields (e.g. `seoDescription`, not `metaDescription`);
|
|
7158
|
+
* unrecognized keys are ignored.
|
|
7159
|
+
*/
|
|
7160
|
+
sourceFields?: Record<string, string>;
|
|
7161
|
+
}
|
|
7162
|
+
/** Input for `aiTranslateBulk`. */
|
|
7163
|
+
interface AiTranslateBulkInput {
|
|
7164
|
+
/** Bulk-supported types: `product`, `category`, `brand`, `tag`, `attribute`, `modifierGroup`, `metafieldDefinition`, `blogPost`. */
|
|
7165
|
+
entityType: TranslatableEntityType;
|
|
7166
|
+
/** Explicit ids to translate. Omitted = every entity of `entityType` in the store missing a complete translation for `targetLocale`. */
|
|
7167
|
+
entityIds?: string[];
|
|
7168
|
+
/** BCP-47 locale code, e.g. `"he"`, `"fr-CA"`. Must differ from the store's default language. */
|
|
7169
|
+
targetLocale: string;
|
|
7170
|
+
}
|
|
7171
|
+
/** Result of `aiTranslateBulk` — job count, not finished translations (the work runs async). */
|
|
7172
|
+
interface AiTranslateBulkResult {
|
|
7173
|
+
queued: number;
|
|
7174
|
+
}
|
|
7175
|
+
/** One row of `getTranslationStatus`'s per-entity-type, per-locale breakdown. */
|
|
7176
|
+
interface TranslationStatusEntry {
|
|
7177
|
+
entityType: TranslatableEntityType;
|
|
7178
|
+
/** BCP-47 locale code this row's counts apply to. */
|
|
7179
|
+
locale: string;
|
|
7180
|
+
/** Total entities of this type in the store (exact count, not sampled). */
|
|
7181
|
+
total: number;
|
|
7182
|
+
/** Entities with every translatable field filled for `locale`. */
|
|
7183
|
+
translated: number;
|
|
7184
|
+
/** Entities with some but not all translatable fields filled for `locale`. */
|
|
7185
|
+
partial: number;
|
|
7186
|
+
/** Entities with no translation for `locale` at all. */
|
|
7187
|
+
missing: number;
|
|
7188
|
+
}
|
|
6930
7189
|
/**
|
|
6931
7190
|
* Payload for `client.trackEvent()` — the programmatic counterpart to the
|
|
6932
7191
|
* `t.js` script-tag pixel. Every field is optional; the server degrades
|
|
@@ -6999,8 +7258,9 @@ declare function getDirectionForLocale(locale: string | undefined | null): 'ltr'
|
|
|
6999
7258
|
* const client = new BrainerceClient({ salesChannelId: 'vc_abc123...' });
|
|
7000
7259
|
* const products = await client.getProducts();
|
|
7001
7260
|
* ```
|
|
7002
|
-
* (`connectionId` is a deprecated alias of `salesChannelId`. It still works
|
|
7003
|
-
* logs a deprecation warning on every construction
|
|
7261
|
+
* (`connectionId` is a deprecated alias of `salesChannelId`. It still works and
|
|
7262
|
+
* logs a deprecation warning on every construction — it is a permanent
|
|
7263
|
+
* backward-compat alias and is not scheduled for removal.)
|
|
7004
7264
|
*
|
|
7005
7265
|
* **Storefront Mode (Frontend)** - Use storeId for public access:
|
|
7006
7266
|
* ```typescript
|
|
@@ -7853,85 +8113,56 @@ declare class BrainerceClient {
|
|
|
7853
8113
|
*/
|
|
7854
8114
|
updateOrder(orderId: string, data: UpdateOrderDto): Promise<Order>;
|
|
7855
8115
|
/**
|
|
7856
|
-
* Update order status
|
|
8116
|
+
* Update order status.
|
|
8117
|
+
*
|
|
8118
|
+
* **Not callable — use {@link updateOrder} instead.** Status changes do work
|
|
8119
|
+
* over the API key, just by a different route.
|
|
8120
|
+
*
|
|
8121
|
+
* @deprecated Call `updateOrder(orderId, { status })`.
|
|
7857
8122
|
*
|
|
7858
8123
|
* @example
|
|
7859
8124
|
* ```typescript
|
|
7860
|
-
* const order = await client.
|
|
8125
|
+
* const order = await client.updateOrder('order_123', { status: 'SHIPPED' });
|
|
7861
8126
|
* ```
|
|
7862
8127
|
*/
|
|
7863
8128
|
updateOrderStatus(orderId: string, status: string): Promise<Order>;
|
|
7864
8129
|
/**
|
|
7865
|
-
* Update order payment method
|
|
7866
|
-
* Note: Only WooCommerce supports syncing payment method changes back to platform
|
|
8130
|
+
* Update order payment method.
|
|
7867
8131
|
*
|
|
7868
|
-
*
|
|
7869
|
-
*
|
|
7870
|
-
*
|
|
7871
|
-
* ```
|
|
8132
|
+
* **Not callable.** The API-key `/v1` surface has no payment-method route,
|
|
8133
|
+
* so this throws in every mode. Change the payment method from the
|
|
8134
|
+
* dashboard until the route ships.
|
|
7872
8135
|
*/
|
|
7873
8136
|
updatePaymentMethod(orderId: string, paymentMethod: string): Promise<Order>;
|
|
7874
8137
|
/**
|
|
7875
|
-
* Update order notes
|
|
8138
|
+
* Update order notes.
|
|
7876
8139
|
*
|
|
7877
|
-
*
|
|
7878
|
-
*
|
|
7879
|
-
*
|
|
7880
|
-
* ```
|
|
8140
|
+
* **Not callable.** The API-key `/v1` surface has no order-notes route, so
|
|
8141
|
+
* this throws in every mode. Edit notes from the dashboard until the route
|
|
8142
|
+
* ships.
|
|
7881
8143
|
*/
|
|
7882
8144
|
updateOrderNotes(orderId: string, notes: string): Promise<Order>;
|
|
7883
8145
|
/**
|
|
7884
|
-
* Get refunds for an order
|
|
7885
|
-
* Returns refunds from the source platform (Shopify/WooCommerce only)
|
|
8146
|
+
* Get refunds for an order.
|
|
7886
8147
|
*
|
|
7887
|
-
*
|
|
7888
|
-
*
|
|
7889
|
-
*
|
|
7890
|
-
* console.log('Total refunds:', refunds.length);
|
|
7891
|
-
* ```
|
|
8148
|
+
* **Not callable.** The API-key `/v1` surface has no refunds route, so this
|
|
8149
|
+
* throws in every mode. Read refunds from the dashboard until the route
|
|
8150
|
+
* ships.
|
|
7892
8151
|
*/
|
|
7893
8152
|
getOrderRefunds(orderId: string): Promise<Refund[]>;
|
|
7894
8153
|
/**
|
|
7895
|
-
* Create a refund for an order
|
|
7896
|
-
* Creates refund on the source platform (Shopify/WooCommerce only)
|
|
7897
|
-
*
|
|
7898
|
-
* @example
|
|
7899
|
-
* ```typescript
|
|
7900
|
-
* // Full refund
|
|
7901
|
-
* const refund = await client.createRefund('order_123', {
|
|
7902
|
-
* type: 'full',
|
|
7903
|
-
* restockInventory: true,
|
|
7904
|
-
* notifyCustomer: true,
|
|
7905
|
-
* reason: 'Customer request',
|
|
7906
|
-
* });
|
|
8154
|
+
* Create a refund for an order.
|
|
7907
8155
|
*
|
|
7908
|
-
*
|
|
7909
|
-
*
|
|
7910
|
-
* type: 'partial',
|
|
7911
|
-
* items: [
|
|
7912
|
-
* { lineItemId: 'item_456', quantity: 1 },
|
|
7913
|
-
* ],
|
|
7914
|
-
* restockInventory: true,
|
|
7915
|
-
* });
|
|
7916
|
-
* ```
|
|
8156
|
+
* **Not callable.** The API-key `/v1` surface has no refunds route, so this
|
|
8157
|
+
* throws in every mode. Refund from the dashboard until the route ships.
|
|
7917
8158
|
*/
|
|
7918
8159
|
createRefund(orderId: string, data: CreateRefundDto): Promise<Refund>;
|
|
7919
8160
|
/**
|
|
7920
|
-
* Update order shipping address
|
|
7921
|
-
* Syncs to source platform (Shopify/WooCommerce only)
|
|
8161
|
+
* Update order shipping address.
|
|
7922
8162
|
*
|
|
7923
|
-
*
|
|
7924
|
-
*
|
|
7925
|
-
*
|
|
7926
|
-
* firstName: 'John',
|
|
7927
|
-
* lastName: 'Doe',
|
|
7928
|
-
* line1: '456 New Address',
|
|
7929
|
-
* city: 'Los Angeles',
|
|
7930
|
-
* state: 'CA',
|
|
7931
|
-
* country: 'US',
|
|
7932
|
-
* postalCode: '90001',
|
|
7933
|
-
* });
|
|
7934
|
-
* ```
|
|
8163
|
+
* **Not callable.** The API-key `/v1` surface has no order-shipping route,
|
|
8164
|
+
* so this throws in every mode. Correct the address from the dashboard
|
|
8165
|
+
* until the route ships.
|
|
7935
8166
|
*/
|
|
7936
8167
|
updateOrderShipping(orderId: string, data: UpdateOrderShippingDto): Promise<Order>;
|
|
7937
8168
|
/**
|
|
@@ -8039,15 +8270,36 @@ declare class BrainerceClient {
|
|
|
8039
8270
|
}>;
|
|
8040
8271
|
}>>;
|
|
8041
8272
|
/**
|
|
8042
|
-
*
|
|
8043
|
-
*
|
|
8273
|
+
* Buy a return label the merchant sends to their customer to print.
|
|
8274
|
+
*
|
|
8275
|
+
* Requires admin mode (`apiKey`) with `FULFILL_ORDERS` permission — it
|
|
8276
|
+
* spends the store's carrier balance, same as {@link createShippingLabel}.
|
|
8277
|
+
*
|
|
8278
|
+
* Unlike {@link createShippingLabel}, this is **not** on the API-key `/v1`
|
|
8279
|
+
* surface — it calls the internal `/api/orders/:id/shipments/return-label`
|
|
8280
|
+
* route, which takes `storeId` explicitly rather than resolving it from the
|
|
8281
|
+
* key. There is no `rateId` in the body: a return is quoted and bought in
|
|
8282
|
+
* one call at the shipping app, because the carrier fixes a shipment as a
|
|
8283
|
+
* return when it is created and will not amend it afterwards.
|
|
8044
8284
|
*
|
|
8045
8285
|
* @example
|
|
8046
8286
|
* ```typescript
|
|
8047
|
-
* const
|
|
8048
|
-
*
|
|
8287
|
+
* const label = await client.createReturnLabel('store_abc', 'order_abc', {
|
|
8288
|
+
* reason: 'Wrong size',
|
|
8289
|
+
* returnForShipmentId: 'shp_original123',
|
|
8290
|
+
* });
|
|
8291
|
+
* console.log('Return label URL:', label.labelUrl);
|
|
8049
8292
|
* ```
|
|
8050
8293
|
*/
|
|
8294
|
+
createReturnLabel(storeId: string, orderId: string, data: CreateReturnLabelDto): Promise<CreateReturnLabelResponse>;
|
|
8295
|
+
/**
|
|
8296
|
+
* Cancel an order.
|
|
8297
|
+
*
|
|
8298
|
+
* **Not callable.** The API-key `/v1` surface has no cancel route, so this
|
|
8299
|
+
* throws in every mode. A status move to cancelled may be reachable through
|
|
8300
|
+
* {@link updateOrder} depending on what the order's state machine allows;
|
|
8301
|
+
* otherwise cancel from the dashboard.
|
|
8302
|
+
*/
|
|
8051
8303
|
cancelOrder(orderId: string): Promise<Order>;
|
|
8052
8304
|
/**
|
|
8053
8305
|
* Fulfill an order (mark as shipped), or correct the tracking of an order
|
|
@@ -8061,89 +8313,51 @@ declare class BrainerceClient {
|
|
|
8061
8313
|
* ship date is not rewritten, and no fulfilment event fires. That is the way
|
|
8062
8314
|
* to fix a mistyped tracking number.
|
|
8063
8315
|
*
|
|
8064
|
-
*
|
|
8065
|
-
*
|
|
8066
|
-
*
|
|
8067
|
-
*
|
|
8068
|
-
*
|
|
8069
|
-
* trackingCompany: 'UPS',
|
|
8070
|
-
* trackingUrl: 'https://www.ups.com/track?tracknum=1Z999AA10123456784',
|
|
8071
|
-
* notifyCustomer: true,
|
|
8072
|
-
* });
|
|
8073
|
-
*
|
|
8074
|
-
* // Correction — silent unless you opt back in.
|
|
8075
|
-
* await client.fulfillOrder('order_123', {
|
|
8076
|
-
* trackingNumber: '1Z999AA10123456785',
|
|
8077
|
-
* });
|
|
8078
|
-
* ```
|
|
8316
|
+
* **Not callable.** The API-key `/v1` surface has no fulfil route, so this
|
|
8317
|
+
* throws in every mode. To ship an order over the API today, buy a label
|
|
8318
|
+
* with {@link createShippingLabel} — the carrier's webhooks then move the
|
|
8319
|
+
* shipment through in-transit and delivered on their own. Otherwise fulfil
|
|
8320
|
+
* from the dashboard.
|
|
8079
8321
|
*/
|
|
8080
8322
|
fulfillOrder(orderId: string, data?: FulfillOrderDto): Promise<Order>;
|
|
8081
8323
|
/**
|
|
8082
|
-
* Sync draft orders from connected platforms
|
|
8324
|
+
* Sync draft orders from connected platforms.
|
|
8083
8325
|
*
|
|
8084
|
-
*
|
|
8085
|
-
*
|
|
8086
|
-
*
|
|
8087
|
-
* console.log('Draft orders synced');
|
|
8088
|
-
* ```
|
|
8326
|
+
* **Not callable.** The API-key `/v1` surface has no draft-order routes at
|
|
8327
|
+
* all, so this throws in every mode. {@link triggerSync} covers a general
|
|
8328
|
+
* platform sync; draft orders are managed from the dashboard.
|
|
8089
8329
|
*/
|
|
8090
8330
|
syncDraftOrders(): Promise<{
|
|
8091
8331
|
message: string;
|
|
8092
8332
|
}>;
|
|
8093
8333
|
/**
|
|
8094
|
-
* Complete a draft order (convert to regular order)
|
|
8334
|
+
* Complete a draft order (convert to regular order).
|
|
8095
8335
|
*
|
|
8096
|
-
*
|
|
8097
|
-
*
|
|
8098
|
-
* const order = await client.completeDraftOrder('draft_123', {
|
|
8099
|
-
* paymentPending: false,
|
|
8100
|
-
* });
|
|
8101
|
-
* ```
|
|
8336
|
+
* **Not callable.** The API-key `/v1` surface has no draft-order routes at
|
|
8337
|
+
* all, so this throws in every mode. Complete drafts from the dashboard.
|
|
8102
8338
|
*/
|
|
8103
8339
|
completeDraftOrder(orderId: string, data?: CompleteDraftDto): Promise<Order>;
|
|
8104
8340
|
/**
|
|
8105
|
-
* Send invoice for a draft order
|
|
8341
|
+
* Send invoice for a draft order.
|
|
8106
8342
|
*
|
|
8107
|
-
*
|
|
8108
|
-
*
|
|
8109
|
-
* await client.sendDraftInvoice('draft_123', {
|
|
8110
|
-
* to: 'customer@example.com',
|
|
8111
|
-
* subject: 'Your Invoice',
|
|
8112
|
-
* customMessage: 'Thank you for your order!',
|
|
8113
|
-
* });
|
|
8114
|
-
* ```
|
|
8343
|
+
* **Not callable.** The API-key `/v1` surface has no draft-order routes at
|
|
8344
|
+
* all, so this throws in every mode. Send the invoice from the dashboard.
|
|
8115
8345
|
*/
|
|
8116
8346
|
sendDraftInvoice(orderId: string, data?: SendInvoiceDto): Promise<{
|
|
8117
8347
|
message: string;
|
|
8118
8348
|
}>;
|
|
8119
8349
|
/**
|
|
8120
|
-
* Delete a draft order
|
|
8350
|
+
* Delete a draft order.
|
|
8121
8351
|
*
|
|
8122
|
-
*
|
|
8123
|
-
*
|
|
8124
|
-
* await client.deleteDraftOrder('draft_123');
|
|
8125
|
-
* ```
|
|
8352
|
+
* **Not callable.** The API-key `/v1` surface has no draft-order routes at
|
|
8353
|
+
* all, so this throws in every mode. Delete drafts from the dashboard.
|
|
8126
8354
|
*/
|
|
8127
8355
|
deleteDraftOrder(orderId: string): Promise<void>;
|
|
8128
8356
|
/**
|
|
8129
|
-
* Update a draft order
|
|
8357
|
+
* Update a draft order.
|
|
8130
8358
|
*
|
|
8131
|
-
*
|
|
8132
|
-
*
|
|
8133
|
-
* const order = await client.updateDraftOrder('draft_123', {
|
|
8134
|
-
* note: 'Updated customer note',
|
|
8135
|
-
* email: 'newemail@example.com',
|
|
8136
|
-
* shippingAddress: {
|
|
8137
|
-
* firstName: 'John',
|
|
8138
|
-
* lastName: 'Doe',
|
|
8139
|
-
* address1: '123 Main St',
|
|
8140
|
-
* city: 'New York',
|
|
8141
|
-
* province: 'NY',
|
|
8142
|
-
* country: 'US',
|
|
8143
|
-
* zip: '10001',
|
|
8144
|
-
* },
|
|
8145
|
-
* });
|
|
8146
|
-
* ```
|
|
8359
|
+
* **Not callable.** The API-key `/v1` surface has no draft-order routes at
|
|
8360
|
+
* all, so this throws in every mode. Edit drafts from the dashboard.
|
|
8147
8361
|
*/
|
|
8148
8362
|
updateDraftOrder(orderId: string, data: UpdateDraftDto): Promise<Order>;
|
|
8149
8363
|
/**
|
|
@@ -8152,7 +8366,14 @@ declare class BrainerceClient {
|
|
|
8152
8366
|
*/
|
|
8153
8367
|
updateInventory(productId: string, data: UpdateInventoryDto): Promise<void>;
|
|
8154
8368
|
/**
|
|
8155
|
-
* Get current inventory for a product
|
|
8369
|
+
* Get current inventory for a product.
|
|
8370
|
+
*
|
|
8371
|
+
* **Admin mode only** — the API key needs the `inventory:read` scope.
|
|
8372
|
+
*
|
|
8373
|
+
* This used to request `/api/v1/inventory/:productId`, which does not
|
|
8374
|
+
* exist and 404'd silently. The live route is product-scoped:
|
|
8375
|
+
* `GET /api/v1/products/:id/inventory`. A product with no inventory row
|
|
8376
|
+
* reads back as all zeroes rather than 404ing.
|
|
8156
8377
|
*/
|
|
8157
8378
|
getInventory(productId: string): Promise<{
|
|
8158
8379
|
available: number;
|
|
@@ -8160,16 +8381,16 @@ declare class BrainerceClient {
|
|
|
8160
8381
|
total: number;
|
|
8161
8382
|
}>;
|
|
8162
8383
|
/**
|
|
8163
|
-
* Edit inventory manually with reason for audit trail
|
|
8384
|
+
* Edit inventory manually with a reason for the audit trail.
|
|
8164
8385
|
*
|
|
8165
|
-
*
|
|
8166
|
-
*
|
|
8167
|
-
*
|
|
8168
|
-
*
|
|
8169
|
-
*
|
|
8170
|
-
*
|
|
8171
|
-
*
|
|
8172
|
-
*
|
|
8386
|
+
* **Not callable.** The API-key `/v1` surface carries no `inventory`
|
|
8387
|
+
* namespace, so this throws in every mode.
|
|
8388
|
+
*
|
|
8389
|
+
* {@link updateInventory} is the closest working call: it sets the same
|
|
8390
|
+
* absolute stock level over `PUT /api/v1/products/:id/inventory`, but the
|
|
8391
|
+
* reason is not yours to choose — the server records a generic
|
|
8392
|
+
* "Updated via External API" against the audit trail. If the reason text
|
|
8393
|
+
* matters, make the edit from the dashboard.
|
|
8173
8394
|
*/
|
|
8174
8395
|
editInventory(data: EditInventoryDto): Promise<{
|
|
8175
8396
|
total: number;
|
|
@@ -8177,41 +8398,29 @@ declare class BrainerceClient {
|
|
|
8177
8398
|
available: number;
|
|
8178
8399
|
}>;
|
|
8179
8400
|
/**
|
|
8180
|
-
* Get inventory sync status for all products in the store
|
|
8401
|
+
* Get inventory sync status for all products in the store.
|
|
8181
8402
|
*
|
|
8182
|
-
*
|
|
8183
|
-
*
|
|
8184
|
-
*
|
|
8185
|
-
* console.log(`${status.pending} products pending sync`);
|
|
8186
|
-
* console.log(`Last sync: ${status.lastSyncAt}`);
|
|
8187
|
-
* ```
|
|
8403
|
+
* **Not callable.** The API-key `/v1` surface carries no `inventory`
|
|
8404
|
+
* namespace, so this throws in every mode. Sync state is visible in the
|
|
8405
|
+
* dashboard; {@link getSyncStatus} covers platform sync jobs.
|
|
8188
8406
|
*/
|
|
8189
8407
|
getInventorySyncStatus(): Promise<InventorySyncStatus>;
|
|
8190
8408
|
/**
|
|
8191
|
-
* Get inventory for multiple products at once
|
|
8409
|
+
* Get inventory for multiple products at once.
|
|
8192
8410
|
*
|
|
8193
|
-
*
|
|
8194
|
-
*
|
|
8195
|
-
*
|
|
8196
|
-
*
|
|
8197
|
-
* console.log(`${inv.productId}: ${inv.available} available`);
|
|
8198
|
-
* });
|
|
8199
|
-
* ```
|
|
8411
|
+
* **Not callable.** The API-key `/v1` surface carries no `inventory`
|
|
8412
|
+
* namespace, so this throws in every mode. There is no bulk stock read on
|
|
8413
|
+
* the API key today: fall back to {@link getInventory} per product, or read
|
|
8414
|
+
* the stock that {@link getProducts} already returns on each product.
|
|
8200
8415
|
*/
|
|
8201
8416
|
getBulkInventory(productIds: string[]): Promise<BulkInventoryResponse[]>;
|
|
8202
8417
|
/**
|
|
8203
|
-
* Reconcile inventory between Brainerce and connected platforms
|
|
8204
|
-
* Detects and optionally fixes discrepancies
|
|
8205
|
-
*
|
|
8206
|
-
* @example
|
|
8207
|
-
* ```typescript
|
|
8208
|
-
* // Reconcile single product (dry run)
|
|
8209
|
-
* const result = await client.reconcileInventory({ productId: 'prod_123' });
|
|
8418
|
+
* Reconcile inventory between Brainerce and connected platforms.
|
|
8419
|
+
* Detects and optionally fixes discrepancies.
|
|
8210
8420
|
*
|
|
8211
|
-
*
|
|
8212
|
-
*
|
|
8213
|
-
*
|
|
8214
|
-
* ```
|
|
8421
|
+
* **Not callable.** The API-key `/v1` surface carries no `inventory`
|
|
8422
|
+
* namespace, so this throws in every mode, `autoFix` included. Reconcile
|
|
8423
|
+
* from the dashboard.
|
|
8215
8424
|
*/
|
|
8216
8425
|
reconcileInventory(options?: {
|
|
8217
8426
|
productId?: string;
|
|
@@ -8221,6 +8430,10 @@ declare class BrainerceClient {
|
|
|
8221
8430
|
* Check stock availability for one or more items before adding to cart or checkout
|
|
8222
8431
|
* Use this to validate stock before operations that might fail due to insufficient inventory
|
|
8223
8432
|
*
|
|
8433
|
+
* **Vibe-coded or storefront mode only.** There is no stock-check route on
|
|
8434
|
+
* the API-key `/v1` surface; in admin mode this throws. The same applies to
|
|
8435
|
+
* {@link checkCartStock}, which routes through here.
|
|
8436
|
+
*
|
|
8224
8437
|
* @example
|
|
8225
8438
|
* ```typescript
|
|
8226
8439
|
* // Check if items are available before adding to cart
|
|
@@ -8485,20 +8698,32 @@ declare class BrainerceClient {
|
|
|
8485
8698
|
* Request a password reset email for a customer
|
|
8486
8699
|
* Works in vibe-coded, storefront, and admin mode
|
|
8487
8700
|
*
|
|
8488
|
-
* The
|
|
8489
|
-
*
|
|
8490
|
-
*
|
|
8491
|
-
*
|
|
8492
|
-
*
|
|
8493
|
-
*
|
|
8494
|
-
*
|
|
8701
|
+
* The reset link's host is chosen by the server, not by the caller: it is
|
|
8702
|
+
* derived from the sales channel's own domain, falling back to the backend's
|
|
8703
|
+
* configured frontend URL, and the request is rejected if neither resolves.
|
|
8704
|
+
*
|
|
8705
|
+
* The SDK used to send a `resetUrl` in the request body. The backend
|
|
8706
|
+
* deliberately removed that field: any caller could submit an arbitrary URL
|
|
8707
|
+
* and have it emailed, from a Brainerce-domained sender, to the address
|
|
8708
|
+
* holder — a phishing-link injection. `ForgotPasswordDto` now declares
|
|
8709
|
+
* `email` and nothing else, and the API's global validation pipe runs with
|
|
8710
|
+
* `whitelist` + `forbidNonWhitelisted`, so a body carrying `resetUrl` fails
|
|
8711
|
+
* the whole call with `400 property resetUrl should not exist`. Only `email`
|
|
8712
|
+
* is sent.
|
|
8713
|
+
*
|
|
8714
|
+
* The endpoint always answers 200 so it cannot be used to enumerate
|
|
8715
|
+
* accounts; the mail is only sent when a matching customer exists.
|
|
8495
8716
|
*
|
|
8496
8717
|
* @param email - Customer email address
|
|
8497
|
-
* @param options -
|
|
8498
|
-
* @param options.resetUrl - Reset URL the email links should point to.
|
|
8499
|
-
* Required outside the browser; recommended inside it.
|
|
8718
|
+
* @param options - Accepted for source compatibility only. Ignored.
|
|
8500
8719
|
*/
|
|
8501
8720
|
forgotPassword(email: string, options?: {
|
|
8721
|
+
/**
|
|
8722
|
+
* @deprecated Ignored, and never sent. The server derives the reset URL
|
|
8723
|
+
* itself (sales-channel domain, then the configured frontend URL) and
|
|
8724
|
+
* rejects the field outright, so passing it has no effect. To change
|
|
8725
|
+
* where reset links point, set the sales channel's domain.
|
|
8726
|
+
*/
|
|
8502
8727
|
resetUrl?: string;
|
|
8503
8728
|
}): Promise<{
|
|
8504
8729
|
message: string;
|
|
@@ -12222,6 +12447,110 @@ declare class BrainerceClient {
|
|
|
12222
12447
|
* Requires Admin mode (apiKey)
|
|
12223
12448
|
*/
|
|
12224
12449
|
deleteOAuthProvider(provider: OAuthProviderType): Promise<void>;
|
|
12450
|
+
/**
|
|
12451
|
+
* Get translation completeness across every translatable entity type, for
|
|
12452
|
+
* one or more locales. Useful as a pre-flight before a bulk import to see
|
|
12453
|
+
* which entity types/locales still need coverage.
|
|
12454
|
+
* Requires Admin mode (apiKey).
|
|
12455
|
+
*
|
|
12456
|
+
* @param storeId - Store to inspect.
|
|
12457
|
+
* @param locales - BCP-47 locale codes to check (e.g. `['he', 'fr']`). Omit
|
|
12458
|
+
* or pass an empty array to get rows with `total` populated but no
|
|
12459
|
+
* locale breakdown.
|
|
12460
|
+
*
|
|
12461
|
+
* @example
|
|
12462
|
+
* ```typescript
|
|
12463
|
+
* const status = await client.getTranslationStatus('store_123', ['he', 'fr']);
|
|
12464
|
+
* const blogHe = status.find((s) => s.entityType === 'blogPost' && s.locale === 'he');
|
|
12465
|
+
* console.log(`${blogHe?.missing} blog posts still need Hebrew`);
|
|
12466
|
+
* ```
|
|
12467
|
+
*/
|
|
12468
|
+
getTranslationStatus(storeId: string, locales?: string[]): Promise<TranslationStatusEntry[]>;
|
|
12469
|
+
/**
|
|
12470
|
+
* Get every persisted translation for a single entity, keyed by locale.
|
|
12471
|
+
* Requires Admin mode (apiKey).
|
|
12472
|
+
*
|
|
12473
|
+
* @example
|
|
12474
|
+
* ```typescript
|
|
12475
|
+
* const translations = await client.getTranslations('store_123', 'product', 'prod_abc');
|
|
12476
|
+
* console.log(translations.he?.name); // Hebrew product name, if set
|
|
12477
|
+
* ```
|
|
12478
|
+
*/
|
|
12479
|
+
getTranslations(storeId: string, entityType: TranslatableEntityType, entityId: string): Promise<TranslationsMap>;
|
|
12480
|
+
/**
|
|
12481
|
+
* Set/update one locale's translation for an entity. Only the fields valid
|
|
12482
|
+
* for `entityType` are persisted (e.g. `title`/`excerpt`/`content` for
|
|
12483
|
+
* `blogPost`, `name`/`description` for `category`) — fields outside that
|
|
12484
|
+
* entity's allowlist are silently ignored server-side, and omitted fields
|
|
12485
|
+
* leave any existing translation for them untouched (this is a merge, not
|
|
12486
|
+
* a replace, of the locale's fields).
|
|
12487
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
12488
|
+
* scope for the target entity type).
|
|
12489
|
+
*
|
|
12490
|
+
* @example
|
|
12491
|
+
* ```typescript
|
|
12492
|
+
* // Bulk-import a pre-translated blog post
|
|
12493
|
+
* await client.setTranslation('store_123', 'blogPost', 'post_abc', 'fr', {
|
|
12494
|
+
* title: 'Le titre en français',
|
|
12495
|
+
* excerpt: "L'extrait en français",
|
|
12496
|
+
* content: '<p>Le contenu en français</p>',
|
|
12497
|
+
* });
|
|
12498
|
+
* ```
|
|
12499
|
+
*/
|
|
12500
|
+
setTranslation(storeId: string, entityType: TranslatableEntityType, entityId: string, locale: string, fields: SetTranslationFields): Promise<TranslationsMap>;
|
|
12501
|
+
/**
|
|
12502
|
+
* Delete one locale's translation for an entity. The entity's base
|
|
12503
|
+
* (default-locale) fields are unaffected.
|
|
12504
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
12505
|
+
* scope for the target entity type).
|
|
12506
|
+
*/
|
|
12507
|
+
deleteTranslation(storeId: string, entityType: TranslatableEntityType, entityId: string, locale: string): Promise<void>;
|
|
12508
|
+
/**
|
|
12509
|
+
* AI-translate a single entity into one target locale and persist the
|
|
12510
|
+
* result inline (synchronous — the response already reflects the write).
|
|
12511
|
+
* Only fields that are still empty for `targetLocale` are filled; existing
|
|
12512
|
+
* translated values are never overwritten.
|
|
12513
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
12514
|
+
* scope for the target entity type).
|
|
12515
|
+
*
|
|
12516
|
+
* @param sourceFields - Optional override of the source-language text to
|
|
12517
|
+
* translate from (e.g. unsaved edits from an open editor), instead of the
|
|
12518
|
+
* entity's persisted base fields. Keys outside the entity's translatable
|
|
12519
|
+
* field set are ignored.
|
|
12520
|
+
*
|
|
12521
|
+
* @example
|
|
12522
|
+
* ```typescript
|
|
12523
|
+
* const translations = await client.aiTranslateSingle('store_123', {
|
|
12524
|
+
* entityType: 'product',
|
|
12525
|
+
* entityId: 'prod_abc',
|
|
12526
|
+
* targetLocale: 'he',
|
|
12527
|
+
* });
|
|
12528
|
+
* ```
|
|
12529
|
+
*/
|
|
12530
|
+
aiTranslateSingle(storeId: string, input: AiTranslateSingleInput): Promise<TranslationsMap>;
|
|
12531
|
+
/**
|
|
12532
|
+
* Bulk AI-translate — enqueues a background job per entity (and, for
|
|
12533
|
+
* `entityType: 'attribute'`, one per attribute option too) rather than
|
|
12534
|
+
* translating inline. Returns the number of jobs queued, not the finished
|
|
12535
|
+
* translations; poll `getTranslationStatus` or `getTranslations` to see
|
|
12536
|
+
* results land.
|
|
12537
|
+
* Requires Admin mode (apiKey) with `products:write` (or the equivalent
|
|
12538
|
+
* scope for the target entity type).
|
|
12539
|
+
*
|
|
12540
|
+
* @param entityIds - Optional explicit ids to translate. Omit to target
|
|
12541
|
+
* every entity of `entityType` in the store that isn't already fully
|
|
12542
|
+
* translated for `targetLocale`.
|
|
12543
|
+
*
|
|
12544
|
+
* @example
|
|
12545
|
+
* ```typescript
|
|
12546
|
+
* // Translate every blog post missing French coverage
|
|
12547
|
+
* const { queued } = await client.aiTranslateBulk('store_123', {
|
|
12548
|
+
* entityType: 'blogPost',
|
|
12549
|
+
* targetLocale: 'fr',
|
|
12550
|
+
* });
|
|
12551
|
+
* ```
|
|
12552
|
+
*/
|
|
12553
|
+
aiTranslateBulk(storeId: string, input: AiTranslateBulkInput): Promise<AiTranslateBulkResult>;
|
|
12225
12554
|
}
|
|
12226
12555
|
/**
|
|
12227
12556
|
* Custom error class for Brainerce API errors
|
|
@@ -12232,7 +12561,7 @@ declare class BrainerceError extends Error {
|
|
|
12232
12561
|
constructor(message: string, statusCode: number, details?: unknown);
|
|
12233
12562
|
}
|
|
12234
12563
|
|
|
12235
|
-
declare const SDK_VERSION = "
|
|
12564
|
+
declare const SDK_VERSION = "2.0.1";
|
|
12236
12565
|
|
|
12237
12566
|
/**
|
|
12238
12567
|
* Verify a webhook signature from Brainerce
|
|
@@ -12733,4 +13062,4 @@ interface CategorySitemapOptions {
|
|
|
12733
13062
|
*/
|
|
12734
13063
|
declare function getCategorySitemapEntries(client: BrainerceClient, opts: CategorySitemapOptions): Promise<SitemapEntry[]>;
|
|
12735
13064
|
|
|
12736
|
-
export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AttachModifierGroupInput, type Attribute, type AttributeOption, type AttributeSource, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateTagDto as CreateTagInput, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type CustomApiAuthType, type CustomApiConnectionStatus, type CustomApiCredentials, type CustomApiIntegration, type CustomApiSyncConfig, type CustomApiSyncDirection, type CustomApiTestResult, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LockedVariant, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductSitemapOptions, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type RichTextContent, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type SubmitProductReviewInput, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type UpdateAddressDto, type UpdateAttachmentInput, type UpdateAttributeDto as UpdateAttributeInput, type UpdateAttributeOptionDto as UpdateAttributeOptionInput, type UpdateBrandDto as UpdateBrandInput, type UpdateCartItemDto, type UpdateCategoryDto as UpdateCategoryInput, type UpdateContentInput, type UpdateCouponDto, type UpdateCustomApiDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
|
|
13065
|
+
export { type AddToCartDto, type AddressDetailsResult, type AddressSuggestion, type AiTranslateBulkInput, type AiTranslateBulkResult, type AiTranslateSingleInput, type AnnouncementContent, type AnnouncementSeverity, type AppliedDiscount, type ApplyCouponDto, type AttachModifierGroupInput, type Attribute, type AttributeDisplayType, type AttributeOption, type AttributeSource, type AvailabilityClock, type BlogPost, type BlogPostListParams, type BlogPostListResponse, type BlogSitemapOptions, type BrainerceApiError, BrainerceClient, type BrainerceClientOptions, BrainerceError, type Brand, type BulkCreateProductsDto, type BulkCreateProductsError, type BulkCreateProductsJob, type BulkCreateProductsStatus, type BulkInventoryResponse, type BulkSaveVariantsDto, type BulkSaveVariantsResponse, type BulkVariantInput, type BusinessHoursWindow, type Cart, type CartAppliedDiscount, type CartBundleOffer, type CartBundlesResponse, type CartIncludeOption, type CartIncludeOptions, type CartItem, type CartItemModifierLine, type CartNudge, type CartRecommendationsResponse, type CartStatus, type CartUpgradeSuggestion, type CartUpgradesResponse, type CartWithIncludes, type Category, type CategoryDetail, type CategoryNode, type CategorySitemapOptions, type CategorySuggestion, type Checkout, type CheckoutAddress, type CheckoutBumpsResponse, type CheckoutCustomFieldDefinition, type CheckoutFieldPricing, type CheckoutFieldVisibility, type CheckoutLineItem, type CheckoutPrefillData, type CheckoutStatus, type CompleteCheckoutResponse, type CompleteDraftDto, type ConfigureOAuthProviderDto as ConfigureOAuthProviderInput, type ConflictStatus, type ConnectorPlatform, type ContactFormFieldType, type ContactFormFieldValidation, type ContactFormPublic, type ContactFormPublicField, type ContactFormSummary, type Content, type ContentDataMap, type ContentStatus, type ContentSummary, type ContentType, type Coupon, type CouponCreateResponse, type CouponQueryParams, type CouponStatus, type CouponType, type CouponValidationWarning, type CreateAddressDto, type CreateAttributeDto as CreateAttributeInput, type CreateAttributeOptionDto as CreateAttributeOptionInput, type CreateBrandDto as CreateBrandInput, type CreateCategoryDto as CreateCategoryInput, type CreateCheckoutDto, type CreateContentInput, type CreateCouponDto, type CreateCustomApiDto, type CreateCustomerDto, type CreateEmailTemplateDto as CreateEmailTemplateInput, type CreateGuestOrderDto, type CreateInquiryInput, type CreateInquiryResponse, type CreateMetafieldDefinitionDto as CreateMetafieldDefinitionInput, type CreateModifierGroupInput, type CreateModifierInput, type CreateOrderDto, type CreateProductDto, type CreateRefundDto, type CreateReturnLabelDto as CreateReturnLabelInput, type CreateReturnLabelResponse, type CreateShippingRateDto as CreateShippingRateInput, type CreateShippingZoneDto as CreateShippingZoneInput, type CreateTagDto as CreateTagInput, type CreateTaxRateDto as CreateTaxRateInput, type CreateVariantDto, type CustomApiAuthType, type CustomApiConnectionStatus, type CustomApiCredentials, type CustomApiIntegration, type CustomApiSyncConfig, type CustomApiSyncDirection, type CustomApiTestResult, type Customer, type CustomerAddress, type CustomerAuthResponse, type CustomerOAuthProvider, type CustomerProfile, type CustomerQueryParams, type DateAvailabilityConstraints, type DateAvailabilitySurface, type DateFieldParseResult, type DeleteProductResponse, type DeliveryType, type DiscountBanner, type DiscountRuleType, type DownloadFile, type DraftLineItem, type EditInventoryDto, type EmailDomain, type EmailEventSettings, type EmailEventType, type EmailSettings, type EmailTemplate, type EmailTemplatePreview, type EmailTemplatesResponse, type EmailVerificationResponse, type ExtendReservationResponse, type FaqContent, type FaqItem, type FooterColumn, type FooterContent, type FooterLink, type FooterSocialLink, type FormatPriceOptions, type FormatProductPriceOptions, type FreeAllocationPolicy, type FulfillOrderDto, type GuestCheckoutStartResponse, type GuestOrderResponse, type HeaderContent, type HeaderCta, type HeaderLogo, type HeaderNavItem, type InsufficientStockError, type InventoryInfo, type InventoryReservationStrategy, type InventorySyncStatus, type InventoryTrackingMode, type InvitationStatus, type InviteMemberDto as InviteMemberInput, type InviteStoreMemberDto as InviteStoreMemberInput, type JsonLdOptions, type ListModifierGroupsParams, type LocalCart, type LocalCartItem, type LocaleTranslation, type LockedVariant, type LoyaltyNextTierSummary, type LoyaltyReward, type LoyaltyStatus, type LoyaltyTierSummary, type MergeCartsDto, type MetafieldConflict, type MetafieldConflictResolution, type MetafieldDefinition, type MetafieldFilter, type MetafieldFilterValue, type MetafieldFiltersResponse, type MetafieldType, type Modifier, type ModifierGroup, type ModifierSelection, type ModifierSelectionType, type ModifierValidationCode, type ModifierValidationError, type ModifierValidationFailedError, type MyProductReview, type OAuthAuthorizeResponse, type OAuthCallbackResponse, type OAuthConnection, type OAuthConnectionsResponse, type OAuthProviderConfig, type OAuthProviderType, type OAuthProvidersResponse, type Order, type OrderAddress, type OrderBump, type OrderCustomer, type OrderDownloadLink, type OrderItem, type OrderQueryParams, type OrderStatus, type OrderStatusChange, type PageContent, type PageSeo, type PaginatedResponse, type ParsedDateFieldValue, type PaymentClientSdk, type PaymentConfig, type PaymentIntent, type PaymentProvider, type PaymentProviderConfig, type PaymentProvidersConfig, type PaymentRecordStatus, type PaymentStatus, type PaymentUrlOptions, type PickupLocation, type PlatformCouponCapabilities, type PlatformMetafieldMetadata, type PreviewEmailTemplateDto as PreviewEmailTemplateInput, type PriceDriftError, type Product, type ProductAttributeInput, type ProductAvailability, type ProductCustomizationField, type ProductDiscount, type ProductDiscountBadge, type ProductImage, type ProductMetafield, type ProductMetafieldValue, type ProductModifierGroupAttachment, type ProductQueryParams, type ProductRecommendation, type ProductRecommendationsResponse, type ProductRelationType, type ProductReview, type ProductReviewAdmin, type ProductReviewImage, type ProductReviewImageAdmin, type ProductSitemapOptions, type ProductStatus, type ProductSuggestion, type ProductUnavailableError, type ProductVariant, type PublicMetafieldDefinition, type PublishProductResponse, RTL_LOCALES, type RecommendationVariant, type ReconcileInventoryResponse, type RedeemRewardResult, type ReferralInfo, type Refund, type RefundLineItem, type RefundLineItemResponse, type RefundType, type RegisterCustomerDto, type RelativeDateBounds, type ReservationInfo, type ResolveMetafieldConflictDto as ResolveMetafieldConflictInput, type ResolveSyncConflictDto as ResolveSyncConflictInput, type ReturnLabelParcel, type ReviewPhotoUpload, type ReviewStatus, type RichTextContent, SDK_VERSION, type SearchSuggestions, type SelectPickupLocationDto, type SelectShippingMethodDto, type SendInvoiceDto, type SessionCartRef, type SetBillingAddressDto, type SetCheckoutCustomFieldsDto, type SetCheckoutCustomerDto, type SetDefinitionProductsDto as SetDefinitionProductsInput, type SetMetafieldPlatformsDto as SetMetafieldPlatformsInput, type SetShippingAddressDto, type SetShippingAddressResponse, type SetTranslationFields, type ShippingDestinations, type ShippingLine, type ShippingRate, type ShippingRateConfig, type ShippingRateType, type ShippingSummaryEntry, type ShippingZone, type ShippingZoneQueryParams, type SitemapEntry, type StockAvailabilityRequest, type StockAvailabilityResponse, type StockAvailabilityResult, type StoreInfo, type StoreInvitation, type StoreInvitationDetails, type StoreMember, type StorePermission, type StoreRole, type StoreTeamResponse, type StoreTracking, type SubmitProductReviewInput, type SupportedLocaleObject, type SyncConflict, type SyncConflictResolution, type SyncJob, type Tag, type TaxBreakdown, type TaxBreakdownItem, type TaxRate, type TaxonomyQueryParams, type TeamInvitation, type TeamInvitationsResponse, type TeamMember, type TeamMembersResponse, type TeamRole, type TrackingEventItem, type TrackingEventName, type TrackingEventPayload, type 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 UpdateCustomApiDto, type UpdateCustomerDto, type UpdateDraftDto, type UpdateEmailSettingsDto as UpdateEmailSettingsInput, type UpdateEmailTemplateDto as UpdateEmailTemplateInput, type UpdateInventoryDto, type UpdateMemberRoleDto as UpdateMemberRoleInput, type UpdateMetafieldDefinitionDto as UpdateMetafieldDefinitionInput, type UpdateModifierGroupInput, type UpdateModifierInput, type UpdateOAuthProviderDto as UpdateOAuthProviderInput, type UpdateOrderDto, type UpdateOrderShippingDto, type UpdateProductDto, type UpdateShippingRateDto as UpdateShippingRateInput, type UpdateShippingZoneDto as UpdateShippingZoneInput, type UpdateStoreMemberDto as UpdateStoreMemberInput, type UpdateTagDto as UpdateTagInput, type UpdateTaxRateDto as UpdateTaxRateInput, type UpdateVariantDto, type UpdateVariantInventoryDto, type UpsertProductMetafieldDto as UpsertProductMetafieldInput, type UserStore, type UserStorePermissions, type VariantInventoryResponse, type VariantPlatformOverlay, type VariantStatus, type WaitForOrderOptions, type WaitForOrderResult, type WebhookEvent, type WebhookEventType, type WriteProductReviewInput, buildArticleJsonLd, buildBreadcrumbJsonLd, buildCollectionPageJsonLd, buildOrganizationJsonLd, buildProductFaqJsonLd, buildProductJsonLd, buildWebsiteJsonLd, computeAvailableSlots, createWebhookHandler, deriveSeoDescription, enableDevGuards, formatMoney, formatPrice, formatProductPrice, formatVariantPrice, getBlogSitemapEntries, getBusinessHoursForDate, getCartItemImage, getCartItemName, getCartTotals, getCategorySitemapEntries, getDescriptionContent, getDirectionForLocale, formatPrice as getPriceDisplay, getProductCustomizationFields, getProductMetafield, getProductMetafieldValue, getProductMetafieldsByType, getProductPrice, getProductPriceInfo, getProductSitemapEntries, getProductSwatches, getStockStatus, getVariantOptions, getVariantPrice, isAllowedPaymentUrl, isCalendarDateAllowed, isCouponApplicableToProduct, isDateValueAllowed, isHtmlDescription, isWebhookEventType, jsonLdScriptProps, parseDateFieldValue, parseWebhookEvent, resolveRelativeBounds, resolveStoreLocalParts, safePaymentRedirect, stripHtml, validateDateAvailabilityConfig, verifyWebhook };
|