@ecomweb/sdk 0.14.1 → 0.16.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 +18 -2
- package/dist/index.d.ts +235 -73
- package/dist/index.js +272 -135
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,14 +38,30 @@ The SDK lives in the storefront's pnpm workspace (`packages/sdk`). The app
|
|
|
38
38
|
imports its source directly, so edits are visible immediately. Run
|
|
39
39
|
`pnpm --filter @ecomweb/sdk test` before you push.
|
|
40
40
|
|
|
41
|
+
### Two keys, three factories
|
|
42
|
+
|
|
43
|
+
A store has a publishable key (`pk_...`, safe in a browser) and a secret key
|
|
44
|
+
(`sk_storefront_...`, server only). Pick the factory by where the code runs:
|
|
45
|
+
|
|
46
|
+
| Factory | Runs in | Key | Modules |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| `createEcomwebSdk({ publicHttp, authHttp })` | browser or server | publishable | catalog and content reads: products, collections, categories, blog, stores, themes, metaobjects, search, shipping locations, promotion suggestions, payment methods, review reads, content pages, menus, redirects |
|
|
49
|
+
| `createEcomwebServerSdk({ publicHttp, authHttp, secretKey })` | server only | secret | all of the above plus `cart`, `orders`, `payments`, `customers`, `addresses`, and the private methods of `blog`, `reviews`, `shipping` and `promotions` (`validate`, `calculate`, ...) |
|
|
50
|
+
| `createEcomwebProxiedSdk({ publicHttp, proxyHttp })` | browser | publishable (direct), none (proxy) | same shape as the server SDK; private calls go to `proxyHttp`, a same-origin proxy that holds the secret |
|
|
51
|
+
|
|
52
|
+
The server SDK sets `x-storefront-api-key` to the secret on every request and
|
|
53
|
+
overrides any value the caller set. It throws when `secretKey` is blank, starts
|
|
54
|
+
with `pk_`, or when `window` exists. Never put a secret key in a browser
|
|
55
|
+
bundle, a `NEXT_PUBLIC_*` variable, an image or a log.
|
|
56
|
+
|
|
41
57
|
### The `X-Ecomweb-Client` header
|
|
42
58
|
|
|
43
|
-
|
|
59
|
+
All three factories wrap the HTTP clients so every request sends
|
|
44
60
|
`X-Ecomweb-Client: @ecomweb/sdk/<version>` (`SDK_VERSION`, set by tsup's
|
|
45
61
|
`define` at build; `dev` when the source runs without it). Pass
|
|
46
62
|
`clientInfo: "name/version"` to put your own tokens first, as the storefront
|
|
47
63
|
kit does. A header the caller sets itself wins. `withClientHeader(http)`
|
|
48
|
-
wraps a client used outside
|
|
64
|
+
wraps a client used outside the factories.
|
|
49
65
|
|
|
50
66
|
## Layout
|
|
51
67
|
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,12 @@ interface ApiResponse<T = any> {
|
|
|
17
17
|
data?: T;
|
|
18
18
|
error?: ApiError;
|
|
19
19
|
success: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The response headers, names in lowercase, when the HTTP client passes
|
|
22
|
+
* them on. Read for totals such as `x-total-count`; optional, so a client
|
|
23
|
+
* that leaves them out still works.
|
|
24
|
+
*/
|
|
25
|
+
headers?: Record<string, string>;
|
|
20
26
|
}
|
|
21
27
|
interface IHttpClient {
|
|
22
28
|
get<T>(url: string, options?: RequestOptions): Promise<ApiResponse<T>>;
|
|
@@ -4298,11 +4304,12 @@ interface UpdateCartItemRequest {
|
|
|
4298
4304
|
* A shopper's cart: a guest cart keyed by a session id, or the signed-in customer's cart, reached through `sdk.cart`.
|
|
4299
4305
|
*/
|
|
4300
4306
|
declare class CartApi {
|
|
4301
|
-
private
|
|
4302
|
-
private
|
|
4303
|
-
constructor(
|
|
4307
|
+
private privateHttp;
|
|
4308
|
+
private shopperHttp;
|
|
4309
|
+
constructor(privateHttp: IHttpClient, shopperHttp: IHttpClient);
|
|
4304
4310
|
private client;
|
|
4305
|
-
|
|
4311
|
+
/** Guest cart: `/storefront/stores/:ref/cart`; signed-in: `.../customers/cart`. */
|
|
4312
|
+
private cartPath;
|
|
4306
4313
|
/**
|
|
4307
4314
|
* Gets the shopper's cart.
|
|
4308
4315
|
*
|
|
@@ -4465,9 +4472,9 @@ interface GuestOrderLookupParams {
|
|
|
4465
4472
|
* Placing orders, and reading them back as a guest or as the signed-in customer, reached through `sdk.orders`.
|
|
4466
4473
|
*/
|
|
4467
4474
|
declare class OrdersApi {
|
|
4468
|
-
private
|
|
4469
|
-
private
|
|
4470
|
-
constructor(
|
|
4475
|
+
private privateHttp;
|
|
4476
|
+
private shopperHttp;
|
|
4477
|
+
constructor(privateHttp: IHttpClient, shopperHttp: IHttpClient);
|
|
4471
4478
|
/**
|
|
4472
4479
|
* Look up a guest order. The API answers with the bare order when it
|
|
4473
4480
|
* matches and `{ message }` (HTTP 200) when it does not; a 404 is treated
|
|
@@ -4526,6 +4533,21 @@ interface BlogPostQueryParams extends BaseQueryParams {
|
|
|
4526
4533
|
include_tags?: boolean;
|
|
4527
4534
|
include_author?: boolean;
|
|
4528
4535
|
}
|
|
4536
|
+
/** Paging and order for a post's comments. */
|
|
4537
|
+
interface BlogPostCommentsQuery {
|
|
4538
|
+
/** At most 100 (the default); a larger value is lowered to 100. */
|
|
4539
|
+
limit?: number;
|
|
4540
|
+
/** Comments to skip. Defaults to 0. */
|
|
4541
|
+
offset?: number;
|
|
4542
|
+
/** `asc` (oldest first, the default) or `desc` (newest first). */
|
|
4543
|
+
sort_order?: "asc" | "desc";
|
|
4544
|
+
}
|
|
4545
|
+
/** One page of a post's comments, with the total across all pages. */
|
|
4546
|
+
interface BlogPostCommentsPage {
|
|
4547
|
+
items: any[];
|
|
4548
|
+
/** Every comment the caller can see on the post, across all pages; `null` when the HTTP client does not pass response headers on. */
|
|
4549
|
+
total: number | null;
|
|
4550
|
+
}
|
|
4529
4551
|
interface BlogCategoryQueryParams extends BaseQueryParams {
|
|
4530
4552
|
include_post_counts?: boolean;
|
|
4531
4553
|
}
|
|
@@ -4537,8 +4559,10 @@ interface BlogTagQueryParams extends BaseQueryParams {
|
|
|
4537
4559
|
* Published blog posts, categories, tags and comments of a store, reached through `sdk.blog`.
|
|
4538
4560
|
*/
|
|
4539
4561
|
declare class BlogApi {
|
|
4540
|
-
|
|
4541
|
-
|
|
4562
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
4563
|
+
protected publicHttp: IHttpClient;
|
|
4564
|
+
/** Client for the calls that read the shopper's session (comments), sent with the shopper's bearer. */
|
|
4565
|
+
protected authHttp: IHttpClient;
|
|
4542
4566
|
constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
|
|
4543
4567
|
/**
|
|
4544
4568
|
* Lists published blog posts.
|
|
@@ -4578,21 +4602,49 @@ declare class BlogApi {
|
|
|
4578
4602
|
*/
|
|
4579
4603
|
getTags(storeRef: string, query?: BlogTagQueryParams): Promise<PaginatedResponse<BlogTag>>;
|
|
4580
4604
|
/**
|
|
4581
|
-
* Lists the approved comments of a post, as an anonymous visitor.
|
|
4605
|
+
* Lists the approved comments of a post, as an anonymous visitor. Returns at
|
|
4606
|
+
* most 100 per call, oldest first unless `sort_order` is `desc`; use
|
|
4607
|
+
* {@link BlogApi.getPostCommentsPage} for the total.
|
|
4582
4608
|
*
|
|
4583
4609
|
* @param storeRef - the store's ref or handle
|
|
4584
4610
|
* @param postId - the post id
|
|
4611
|
+
* @param query - `limit` (at most 100), `offset` and `sort_order`
|
|
4585
4612
|
* @returns The comments; throws {@link ApiClientError} when the API answers with an error
|
|
4586
4613
|
*/
|
|
4587
|
-
getPostComments(storeRef: string, postId: number): Promise<any[]>;
|
|
4614
|
+
getPostComments(storeRef: string, postId: number, query?: BlogPostCommentsQuery): Promise<any[]>;
|
|
4588
4615
|
/**
|
|
4589
|
-
* Lists the approved comments of a post, sending the signed-in customer's
|
|
4616
|
+
* Lists the approved comments of a post, sending the signed-in customer's
|
|
4617
|
+
* credentials, so that customer's own comments still waiting for approval
|
|
4618
|
+
* are included. Paging as in {@link BlogApi.getPostComments}.
|
|
4590
4619
|
*
|
|
4591
4620
|
* @param storeRef - the store's ref or handle
|
|
4592
4621
|
* @param postId - the post id
|
|
4622
|
+
* @param query - `limit` (at most 100), `offset` and `sort_order`
|
|
4593
4623
|
* @returns The comments; throws {@link ApiClientError} when the API answers with an error
|
|
4594
4624
|
*/
|
|
4595
|
-
getPostCommentsAuth(storeRef: string, postId: number): Promise<any[]>;
|
|
4625
|
+
getPostCommentsAuth(storeRef: string, postId: number, query?: BlogPostCommentsQuery): Promise<any[]>;
|
|
4626
|
+
/**
|
|
4627
|
+
* One page of a post's comments with the total across all pages, for
|
|
4628
|
+
* "load more" or a comment count. Set `asCustomer` to include the signed-in
|
|
4629
|
+
* customer's own pending comments, as {@link BlogApi.getPostCommentsAuth} does.
|
|
4630
|
+
*
|
|
4631
|
+
* @param storeRef - the store's ref or handle
|
|
4632
|
+
* @param postId - the post id
|
|
4633
|
+
* @param query - `limit` (at most 100), `offset` and `sort_order`
|
|
4634
|
+
* @param options - `asCustomer` sends the signed-in customer's credentials
|
|
4635
|
+
* @returns The page and the total (`null` when the HTTP client does not pass response headers on); throws {@link ApiClientError} when the API answers with an error
|
|
4636
|
+
*/
|
|
4637
|
+
getPostCommentsPage(storeRef: string, postId: number, query?: BlogPostCommentsQuery, options?: {
|
|
4638
|
+
asCustomer?: boolean;
|
|
4639
|
+
}): Promise<BlogPostCommentsPage>;
|
|
4640
|
+
private fetchComments;
|
|
4641
|
+
}
|
|
4642
|
+
/**
|
|
4643
|
+
* Blog comment submission, reached through `sdk.blog` on the server and proxied SDKs.
|
|
4644
|
+
*
|
|
4645
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
4646
|
+
*/
|
|
4647
|
+
declare class BlogServerApi extends BlogApi {
|
|
4596
4648
|
/**
|
|
4597
4649
|
* Submits a comment on a post, as the signed-in customer. It may wait for moderation.
|
|
4598
4650
|
*
|
|
@@ -4635,7 +4687,7 @@ type StoreConfigurationInfo = Store & {
|
|
|
4635
4687
|
/** Shop metafields with storefront access (spec §6.4). */
|
|
4636
4688
|
metafields?: StorefrontMetafields;
|
|
4637
4689
|
};
|
|
4638
|
-
/** `GET /
|
|
4690
|
+
/** `GET /storefront/stores/domain/:domain`: the store a host serves. */
|
|
4639
4691
|
type StoreByDomainInfo = StoreConfigurationInfo & {
|
|
4640
4692
|
/**
|
|
4641
4693
|
* The live theme's URL when it is external (the shared storefront sends
|
|
@@ -5116,14 +5168,24 @@ interface ShippingQuoteChangedDetails {
|
|
|
5116
5168
|
* Shipping areas and shipping rates for a store, reached through `sdk.shipping`.
|
|
5117
5169
|
*/
|
|
5118
5170
|
declare class ShippingApi {
|
|
5119
|
-
|
|
5120
|
-
|
|
5171
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
5172
|
+
protected publicHttp: IHttpClient;
|
|
5173
|
+
constructor(publicHttp: IHttpClient);
|
|
5121
5174
|
/**
|
|
5122
5175
|
* List administrative areas. Pass `level` for one tier or `parent_code`
|
|
5123
5176
|
* for one area's children; passing neither returns every area, which for
|
|
5124
5177
|
* Vietnam is 3,355 rows and about 900 KB. Prefer a filter.
|
|
5125
5178
|
*/
|
|
5126
5179
|
listLocationAreas(storeRef: string, query?: LocationAreaQuery): Promise<LocationAreasResponse>;
|
|
5180
|
+
}
|
|
5181
|
+
/**
|
|
5182
|
+
* Shipping rates for a cart, reached through `sdk.shipping` on the server and proxied SDKs.
|
|
5183
|
+
*
|
|
5184
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
5185
|
+
*/
|
|
5186
|
+
declare class ShippingServerApi extends ShippingApi {
|
|
5187
|
+
private privateHttp;
|
|
5188
|
+
constructor(publicHttp: IHttpClient, privateHttp: IHttpClient);
|
|
5127
5189
|
/**
|
|
5128
5190
|
* Works out the shipping options and prices for a cart and a destination.
|
|
5129
5191
|
*
|
|
@@ -5184,16 +5246,9 @@ interface PromotionSuggestionsResponse {
|
|
|
5184
5246
|
* Promotion codes and offers of a store, reached through `sdk.promotions`.
|
|
5185
5247
|
*/
|
|
5186
5248
|
declare class PromotionsApi {
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
* Checks a promotion code against a cart.
|
|
5191
|
-
*
|
|
5192
|
-
* @param storeRef - the store's ref or handle
|
|
5193
|
-
* @param data - the code and the cart details
|
|
5194
|
-
* @returns The validation result; throws {@link ApiClientError} when the API answers with an error
|
|
5195
|
-
*/
|
|
5196
|
-
validate(storeRef: string, data: ValidatePromotionCodeRequest): Promise<ValidatePromotionCodeResponse>;
|
|
5249
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
5250
|
+
protected publicHttp: IHttpClient;
|
|
5251
|
+
constructor(publicHttp: IHttpClient);
|
|
5197
5252
|
/**
|
|
5198
5253
|
* Lists promotions the shopper could use, optionally for a given cart subtotal.
|
|
5199
5254
|
*
|
|
@@ -5203,6 +5258,23 @@ declare class PromotionsApi {
|
|
|
5203
5258
|
*/
|
|
5204
5259
|
getSuggestions(storeRef: string, subtotal?: number): Promise<PromotionSuggestionsResponse>;
|
|
5205
5260
|
}
|
|
5261
|
+
/**
|
|
5262
|
+
* Promotion code checks, reached through `sdk.promotions` on the server and proxied SDKs.
|
|
5263
|
+
*
|
|
5264
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
5265
|
+
*/
|
|
5266
|
+
declare class PromotionsServerApi extends PromotionsApi {
|
|
5267
|
+
private privateHttp;
|
|
5268
|
+
constructor(publicHttp: IHttpClient, privateHttp: IHttpClient);
|
|
5269
|
+
/**
|
|
5270
|
+
* Checks a promotion code against a cart.
|
|
5271
|
+
*
|
|
5272
|
+
* @param storeRef - the store's ref or handle
|
|
5273
|
+
* @param data - the code and the cart details
|
|
5274
|
+
* @returns The validation result; throws {@link ApiClientError} when the API answers with an error
|
|
5275
|
+
*/
|
|
5276
|
+
validate(storeRef: string, data: ValidatePromotionCodeRequest): Promise<ValidatePromotionCodeResponse>;
|
|
5277
|
+
}
|
|
5206
5278
|
|
|
5207
5279
|
interface BankAccount {
|
|
5208
5280
|
id: number;
|
|
@@ -5285,14 +5357,12 @@ interface PaymentCredentialStatus {
|
|
|
5285
5357
|
* since the dashboard talks to it directly and this SDK must never carry a
|
|
5286
5358
|
* plaintext credential shape.
|
|
5287
5359
|
*
|
|
5288
|
-
* Both endpoints
|
|
5289
|
-
*
|
|
5290
|
-
* authenticated one.
|
|
5360
|
+
* Both endpoints need a storefront secret key, so both go through the one
|
|
5361
|
+
* private HTTP client (the server SDK's, or the proxy's), never the public one.
|
|
5291
5362
|
*/
|
|
5292
5363
|
declare class PaymentsApi {
|
|
5293
|
-
private
|
|
5294
|
-
|
|
5295
|
-
constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
|
|
5364
|
+
private privateHttp;
|
|
5365
|
+
constructor(privateHttp: IHttpClient);
|
|
5296
5366
|
/**
|
|
5297
5367
|
* Start a gateway charge attempt for an order. Keyed by `order_code`,
|
|
5298
5368
|
* never `order_id` — the API route was deliberately re-keyed away from a
|
|
@@ -5350,8 +5420,9 @@ interface BatchOrderReviewInvitationsResult {
|
|
|
5350
5420
|
* Product reviews and the invitations that ask customers to write them, reached through `sdk.reviews`.
|
|
5351
5421
|
*/
|
|
5352
5422
|
declare class ReviewsApi {
|
|
5353
|
-
|
|
5354
|
-
|
|
5423
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
5424
|
+
protected publicHttp: IHttpClient;
|
|
5425
|
+
constructor(publicHttp: IHttpClient);
|
|
5355
5426
|
/**
|
|
5356
5427
|
* Lists the published reviews of a product.
|
|
5357
5428
|
*
|
|
@@ -5361,6 +5432,15 @@ declare class ReviewsApi {
|
|
|
5361
5432
|
* @returns A page of reviews; throws {@link ApiClientError} when the API answers with an error
|
|
5362
5433
|
*/
|
|
5363
5434
|
getProductReviews(storeRef: string, productId: string | number, query?: Omit<ProductReviewFilters, "product_id">): Promise<PaginatedReviewsResponse>;
|
|
5435
|
+
}
|
|
5436
|
+
/**
|
|
5437
|
+
* The review invitation calls, reached through `sdk.reviews` on the server and proxied SDKs.
|
|
5438
|
+
*
|
|
5439
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
5440
|
+
*/
|
|
5441
|
+
declare class ReviewsServerApi extends ReviewsApi {
|
|
5442
|
+
private privateHttp;
|
|
5443
|
+
constructor(publicHttp: IHttpClient, privateHttp: IHttpClient);
|
|
5364
5444
|
/**
|
|
5365
5445
|
* Gets the public details behind a review invitation link.
|
|
5366
5446
|
*
|
|
@@ -5754,9 +5834,9 @@ type AuthErrorCode = "AUTH_INVALID_CREDENTIALS" | "AUTH_ACCOUNT_LOCKED"
|
|
|
5754
5834
|
/**
|
|
5755
5835
|
* One store's auth surface.
|
|
5756
5836
|
*
|
|
5757
|
-
*
|
|
5758
|
-
* `
|
|
5759
|
-
* store_id matches the route's store.
|
|
5837
|
+
* Every route lives under `/storefront/stores/<ref>/auth/`. Token routes
|
|
5838
|
+
* (`me`, `logout`, ...) require an access token and assert that the token's
|
|
5839
|
+
* store_id matches the route's store; the rest are unauthenticated and throttled.
|
|
5760
5840
|
*
|
|
5761
5841
|
* This class does not supply `x-storefront-api-key` — StorefrontApiKeyGuard
|
|
5762
5842
|
* requires it on every route, and the injected IHttpClient owns that header.
|
|
@@ -5935,21 +6015,13 @@ interface Options {
|
|
|
5935
6015
|
*/
|
|
5936
6016
|
declare function createAuthAwareHttpClient(inner: IHttpClient, { storage, auth }: Options): IHttpClient;
|
|
5937
6017
|
|
|
5938
|
-
/**
|
|
5939
|
-
* The EcomWeb storefront SDK: a typed client for a store's public API.
|
|
5940
|
-
*
|
|
5941
|
-
* Call {@link createEcomwebSdk} with two HTTP clients and use the returned
|
|
5942
|
-
* object, for example `sdk.products.getBySlug(storeRef, slug)`. The package
|
|
5943
|
-
* also exports the schema and DTO types the API uses, the image URL helpers,
|
|
5944
|
-
* and {@link ApiClientError}, which the client methods throw when the API
|
|
5945
|
-
* answers with an error.
|
|
5946
|
-
*
|
|
5947
|
-
* @packageDocumentation
|
|
5948
|
-
*/
|
|
5949
|
-
|
|
5950
6018
|
/** What {@link createEcomwebSdk} needs: the two HTTP clients, and optional client info. */
|
|
5951
6019
|
interface EcomwebSdkOptions {
|
|
5952
|
-
/**
|
|
6020
|
+
/**
|
|
6021
|
+
* Client for the public API routes and the calls that need no shopper
|
|
6022
|
+
* session. {@link createEcomwebSdk} sends it as is (with a publishable key);
|
|
6023
|
+
* {@link createEcomwebServerSdk} adds the secret key to it.
|
|
6024
|
+
*/
|
|
5953
6025
|
publicHttp: IHttpClient;
|
|
5954
6026
|
/** Client for the routes that need the signed-in customer's credentials. */
|
|
5955
6027
|
authHttp: IHttpClient;
|
|
@@ -5959,42 +6031,132 @@ interface EcomwebSdkOptions {
|
|
|
5959
6031
|
*/
|
|
5960
6032
|
clientInfo?: string;
|
|
5961
6033
|
}
|
|
5962
|
-
/**
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
6034
|
+
/** What {@link createEcomwebServerSdk} needs: the public options plus the storefront secret key. */
|
|
6035
|
+
type EcomwebServerSdkOptions = EcomwebSdkOptions & {
|
|
6036
|
+
/** The store's storefront secret key (`sk_storefront_...`). Server only; never ship it to a browser. */
|
|
6037
|
+
secretKey: string;
|
|
6038
|
+
};
|
|
6039
|
+
/** What {@link createEcomwebProxiedSdk} needs: a direct client for public routes and one that reaches a same-origin proxy. */
|
|
6040
|
+
interface EcomwebProxiedSdkOptions {
|
|
6041
|
+
/** Client for the public API routes, called directly with the publishable key. */
|
|
6042
|
+
publicHttp: IHttpClient;
|
|
6043
|
+
/** Client that sends private calls to a same-origin proxy, which holds the secret key. */
|
|
6044
|
+
proxyHttp: IHttpClient;
|
|
6045
|
+
/**
|
|
6046
|
+
* Tokens put before this SDK's own in the `X-Ecomweb-Client` header
|
|
6047
|
+
* (space-separated `name/version`).
|
|
6048
|
+
*/
|
|
6049
|
+
clientInfo?: string;
|
|
6050
|
+
}
|
|
6051
|
+
/** The public SDK: catalog and content reads, safe with a publishable key. */
|
|
6052
|
+
interface EcomwebSdk {
|
|
6053
|
+
/** Products. */
|
|
5976
6054
|
products: ProductsApi;
|
|
6055
|
+
/** Collections. */
|
|
5977
6056
|
collections: CollectionsApi;
|
|
6057
|
+
/** Categories. */
|
|
5978
6058
|
categories: CategoriesApi;
|
|
5979
|
-
|
|
5980
|
-
orders: OrdersApi;
|
|
6059
|
+
/** Published blog posts, categories, tags and comments. */
|
|
5981
6060
|
blog: BlogApi;
|
|
6061
|
+
/** Stores. */
|
|
5982
6062
|
stores: StoresApi;
|
|
6063
|
+
/** Themes. */
|
|
5983
6064
|
themes: ThemesApi;
|
|
6065
|
+
/** Metaobject entries. */
|
|
5984
6066
|
metaobjects: MetaobjectsApi;
|
|
6067
|
+
/** Search. */
|
|
5985
6068
|
search: SearchApi;
|
|
6069
|
+
/** Shipping locations. */
|
|
5986
6070
|
shipping: ShippingApi;
|
|
6071
|
+
/** Promotion suggestions. */
|
|
5987
6072
|
promotions: PromotionsApi;
|
|
6073
|
+
/** Payment methods a store accepts. */
|
|
5988
6074
|
paymentMethods: PaymentMethodsApi;
|
|
5989
|
-
|
|
6075
|
+
/** Product reviews (reads). */
|
|
5990
6076
|
reviews: ReviewsApi;
|
|
5991
|
-
|
|
5992
|
-
addresses: AddressesApi;
|
|
6077
|
+
/** Content pages. */
|
|
5993
6078
|
contentPages: ContentPagesApi;
|
|
6079
|
+
/** Menus. */
|
|
5994
6080
|
menus: MenusApi;
|
|
6081
|
+
/** URL redirects. */
|
|
5995
6082
|
redirects: RedirectsApi;
|
|
5996
|
-
}
|
|
5997
|
-
/** The
|
|
5998
|
-
|
|
6083
|
+
}
|
|
6084
|
+
/** The server SDK: everything on {@link EcomwebSdk} plus the private modules. */
|
|
6085
|
+
interface EcomwebServerSdk extends Omit<EcomwebSdk, "blog" | "reviews" | "shipping" | "promotions"> {
|
|
6086
|
+
/** Blog, with comment submission. */
|
|
6087
|
+
blog: BlogServerApi;
|
|
6088
|
+
/** Reviews, with submission and invitations. */
|
|
6089
|
+
reviews: ReviewsServerApi;
|
|
6090
|
+
/** Shipping, with rate calculation. */
|
|
6091
|
+
shipping: ShippingServerApi;
|
|
6092
|
+
/** Promotions, with code validation. */
|
|
6093
|
+
promotions: PromotionsServerApi;
|
|
6094
|
+
/** Carts. */
|
|
6095
|
+
cart: CartApi;
|
|
6096
|
+
/** Orders. */
|
|
6097
|
+
orders: OrdersApi;
|
|
6098
|
+
/** Payments. */
|
|
6099
|
+
payments: PaymentsApi;
|
|
6100
|
+
/** Customers. */
|
|
6101
|
+
customers: CustomersApi;
|
|
6102
|
+
/** Customer addresses. */
|
|
6103
|
+
addresses: AddressesApi;
|
|
6104
|
+
}
|
|
6105
|
+
/**
|
|
6106
|
+
* Creates the public SDK. It reads the catalog and content only (products,
|
|
6107
|
+
* collections, categories, blog, stores, themes, search and so on) and is safe
|
|
6108
|
+
* to use in a browser with a publishable key. For carts, orders, payments,
|
|
6109
|
+
* customers and the private methods of other modules, use
|
|
6110
|
+
* {@link createEcomwebServerSdk} on a server or {@link createEcomwebProxiedSdk}
|
|
6111
|
+
* in a browser.
|
|
6112
|
+
*
|
|
6113
|
+
* @example
|
|
6114
|
+
* ```ts
|
|
6115
|
+
* const sdk = createEcomwebSdk({ publicHttp, authHttp });
|
|
6116
|
+
* const product = await sdk.products.getBySlug("my-store", "blue-shirt");
|
|
6117
|
+
* ```
|
|
6118
|
+
*
|
|
6119
|
+
* @param options - the HTTP clients, and optional client info for the `X-Ecomweb-Client` header
|
|
6120
|
+
* @returns An object with one API class per public resource
|
|
6121
|
+
*/
|
|
6122
|
+
declare function createEcomwebSdk(options: EcomwebSdkOptions): EcomwebSdk;
|
|
6123
|
+
/**
|
|
6124
|
+
* Creates the server SDK: the public modules plus carts, orders, payments,
|
|
6125
|
+
* customers, addresses and the private methods of blog, reviews, shipping and
|
|
6126
|
+
* promotions. Every request carries the secret in `x-storefront-api-key`, and
|
|
6127
|
+
* a key header set by the caller is overridden. Run it on a server only.
|
|
6128
|
+
*
|
|
6129
|
+
* @example
|
|
6130
|
+
* ```ts
|
|
6131
|
+
* const sdk = createEcomwebServerSdk({
|
|
6132
|
+
* publicHttp,
|
|
6133
|
+
* authHttp,
|
|
6134
|
+
* secretKey: process.env.ECOMWEB_SECRET_KEY!,
|
|
6135
|
+
* });
|
|
6136
|
+
* const cart = await sdk.cart.getCart("my-store", sessionId, false);
|
|
6137
|
+
* ```
|
|
6138
|
+
*
|
|
6139
|
+
* @param options - the HTTP clients, the storefront secret key, and optional client info
|
|
6140
|
+
* @returns The public modules and the private ones
|
|
6141
|
+
* @throws Error when `secretKey` is blank or is a publishable key (`pk_...`), or when called in a browser; the message never includes the key
|
|
6142
|
+
*/
|
|
6143
|
+
declare function createEcomwebServerSdk(options: EcomwebServerSdkOptions): EcomwebServerSdk;
|
|
6144
|
+
/**
|
|
6145
|
+
* Creates the SDK for browser code that needs private modules. Public calls go
|
|
6146
|
+
* straight to the API with the publishable key; private ones (cart, orders,
|
|
6147
|
+
* payments, customers, addresses and the private methods of other modules) go
|
|
6148
|
+
* to `proxyHttp`, a same-origin proxy that holds the secret key. No secret
|
|
6149
|
+
* reaches the browser.
|
|
6150
|
+
*
|
|
6151
|
+
* @example
|
|
6152
|
+
* ```ts
|
|
6153
|
+
* const sdk = createEcomwebProxiedSdk({ publicHttp, proxyHttp });
|
|
6154
|
+
* const cart = await sdk.cart.getCart("my-store", sessionId, false);
|
|
6155
|
+
* ```
|
|
6156
|
+
*
|
|
6157
|
+
* @param options - the direct client, the proxy client, and optional client info
|
|
6158
|
+
* @returns The same shape as {@link createEcomwebServerSdk}
|
|
6159
|
+
*/
|
|
6160
|
+
declare function createEcomwebProxiedSdk(options: EcomwebProxiedSdkOptions): EcomwebServerSdk;
|
|
5999
6161
|
|
|
6000
|
-
export { ADJUSTABLE_STATES, ADMIN_ORDER_SOURCES, type AddToCartRequest, type Address, AddressesApi, type AdjustQuantitiesRequest, type AdjustableState, type AdminOrderSource, ApiClientError, type ApiError, type ApiResponse, type AppliedPromotion, type AttributeLink, AuthApi, type AuthErrorCode, type AuthIdentity, type AuthResult, type AuthTokens, type AutocompleteParams, type BankAccount, type BaseDeleteOptions, type BaseDeleteResult, type BaseQueryParams, type BatchOrderReviewInvitationsResult, BlogApi, type BlogCategory, type BlogCategoryQueryParams, type BlogComment, type BlogCommentWithReplies, type BlogPost, type BlogPostCategory, type BlogPostQueryParams, type BlogPostStatus, type BlogPostTag, type BlogPostWithRelations, type BlogSearchParams, type BlogSearchResponse, type BlogSettings, type BlogTag, type BlogTagQueryParams, CLIENT_HEADER, COLLECTION_RULE_MATRIX, CONDITION_TYPE_LABELS, CartApi, type CartApiItem, type CartApiResponse, CategoriesApi, type Category, type CategoryQueryParams, type CategorySearchResponse, type CategoryTree, type CategoryWithChildren, type ChangeEmailPayload, type ChangeEmailResult, type ChangePasswordPayload, type ChangedResult, type Collection, type CollectionQueryParams, type CollectionRule, type CollectionRuleSet, type CollectionRuleSetCriteria, type CollectionSearchCriteria, CollectionsApi, ConditionType, ConditionTypeSchema, type ConditionTypeType, type ContentPage, ContentPagesApi, type CreateAddressDto, type CreateBlogCategory, type CreateBlogComment, type CreateBlogPost, type CreateBlogSettings, type CreateBlogTag, type CreateCategory, type CreateContentPage, type CreateEmbeddedScript, type CreateOrder, type CreateOrderItem, type CreateOrderItemRequest, type CreateOrderRequest, type CreateProduct, type CreateProductReview, type CreateProductReviewReply, type CreateProductVariant, type CreatePromotion, CreatePromotionSchema, type CreateStore, type CreateStoreConfig, type CreateStoreSettings, type CreateVariantOption, type CreateVariantOptionValue, type CurrentIdentity, type Customer, type CustomerAccess, type CustomerOrderFilter, type CustomerOrderSummary, CustomersApi, DEFAULT_BUCKET, DISCOUNT_METHOD_LABELS, type DeleteApiFunction, type DeletedAt, DiscountMethod, DiscountMethodSchema, type DiscountMethodType, EMAIL_COLOR_PATTERN, EMAIL_PALETTE_DEFAULTS, ENTRY_HANDLE_PATTERN, type EcomwebSdk, type EcomwebSdkOptions, type EmbeddedScript, type EmbeddedScriptPlacement, type EngineResult, FILTERABLE_TYPES, type FileKind, type FulfillmentStatus, type GoogleAuthUrl, type GuestOrderLookupParams, type IHttpClient, INVENTORY_ADJUSTMENT_REASONS, INVENTORY_ERROR_CODES, INVENTORY_POLICIES, INVENTORY_STATES, INVENTORY_STATUS_LABELS, type Id, type ImageFormat, type ImageTransformOptions, type InitiatePaymentResult, type InsufficientInventoryItem, type IntegrationStatus, type InventoryActor, type InventoryAdjustmentReason, type InventoryErrorCode, type InventoryHistoryEntry, type InventoryImportResponse, type InventoryLevelRow, type InventoryLocation, type InventoryPolicy, type InventoryQuantities, type InventoryState, InventoryStatus, KNOWN_PAYMENT_METHODS, LEGACY_STATUS_MIGRATION_MAP, LEVEL_PROVINCE, LEVEL_WARD, type LegacyOrderStatus, type LegacyProductStatus, type LinkValue, type LocationArea, type LocationAreaQuery, type LocationAreasResponse, type LoginPayload, MAX_RULES_PER_SET, MAX_RULE_VALUE_ENTRIES, MEASUREMENT_UNITS, MEDIA_TYPES, MERCHANT_ADJUSTMENT_REASONS, METAFIELD_BASE_TYPES, METAFIELD_KEY_PATTERN, METAFIELD_LIMITS, METAFIELD_OWNER_TYPES, METAFIELD_TYPE_GROUPS, METAOBJECT_REFERENCE_TYPES, METAOBJECT_TYPE_PATTERN, type MeasurementType, type MeasurementValue, MemoryTokenStorage, MenusApi, type MerchantAdjustmentReason, type MessageOutboxStatus, type MetafieldBaseType, type MetafieldBound, type MetafieldContext, type MetafieldDefinitionShape, type MetafieldIssue, type MetafieldIssueCode, type MetafieldListType, type MetafieldOwnerType, type MetafieldType, type MetafieldTypeGroup, type MetafieldValidationKey, type MetafieldValidations, type MetafieldWrite, type MetaobjectDefinitionShape, type MetaobjectFieldShape, type MetaobjectListParams, type MetaobjectListResult, MetaobjectsApi, type MoneyValue, type MoveQuantitiesRequest, type MutationApiFunction, OBJECT_PREFIX, ORDER_ACTOR_TYPES, ORDER_EVENT_TYPES, ORDER_SHIPMENT_ERROR_CODES, ORDER_SOURCES, type OptionalTimestamp, type Order, type OrderActorType, type OrderCommentMutationResult, type OrderCreatedBy, type OrderEventType, type OrderItem, type PaymentMethod$1 as OrderPaymentMethod, type OrderReviewInvitationSummary, type OrderShipmentEvent, type OrderShipmentSummary, type OrderSource, type OrderStatus, type OrderTimelineActor, type OrderTimelineComment, type OrderTimelineCommentAuthor, type OrderTimelineEntry, type OrderTimelineEvent, type OrderTimelineResponse, type OrderWithItems, OrdersApi, PAGINATION_DEFAULTS, PRIVATE_REFERENCE_TYPES, PRODUCT_STATUS_LABELS, PROMOTION_MODE_COLORS, PROMOTION_MODE_LABELS, PROMOTION_STATUS_COLORS, PROMOTION_STATUS_LABELS, PROMOTION_TYPE_COLORS, PROMOTION_TYPE_LABELS, type PaginatedApiFunction, type PaginatedPromotionsResponse, PaginatedPromotionsResponseSchema, type PaginatedResponse, type PaginatedReviewsResponse, type PaginationMeta, type PasswordPolicy, type PaymentCredentialStatus, type PaymentMethod$1 as PaymentMethod, PaymentMethodsApi, type PaymentStateResult, type PaymentStatus, PaymentsApi, type Product, type ProductDetail, type ProductImage, type ProductQueryParams, type ProductReview, type ProductReviewFilters, type ProductReviewReply, type ProductReviewReplyFilters, type ProductReviewStats, type ProductReviewWithReplies, type ProductSearchParams, type ProductSearchResponse, type ProductService, ProductStatus, type ProductVariant, type ProductVariantCombination, type ProductVariantCombinationEntry, type ProductVariantWithCombinations, type ProductVideo, type ProductWithReviewStats, type ProductWithVariants, ProductsApi, type Promotion, type PromotionData, PromotionMode, PromotionModeSchema, type PromotionModeType, type PromotionQueryParams, PromotionQueryParamsSchema, PromotionSchema, type PromotionStatistics, PromotionStatisticsSchema, PromotionStatus, PromotionStatusSchema, type PromotionStatusType, type PromotionSuggestion, type PromotionSuggestionsResponse, PromotionType, PromotionTypeSchema, type PromotionTypeType, type PromotionWithDiscount, PromotionWithDiscountSchema, PromotionsApi, type PublicAuthConfig, type PublishedStoreTheme, type QuantitiesResponse, RENDER_PREFIX, RESOURCE_REFERENCE_TYPES, RULE_FIELDS, type RatingValue, RedirectsApi, type RegisterPayload, type RegisterResult, type RequestOptions, type ResetPasswordPayload, type ResetResult, type ResizeMode, type ResolvedAsset, type ResolvedBlogPostRef, type ResolvedCollectionRef, type ResolvedImage, type ResolvedMetaobjectRef, type ResolvedMetaobjectStub, type ResolvedPageRef, type ResolvedProductRef, type ResolvedVariantRef, type ReviewInvitationPublicData, type ReviewStatus, ReviewsApi, type RichTextBlock, type RichTextHeading, type RichTextInline, type RichTextLink, type RichTextList, type RichTextListItem, type RichTextNode, type RichTextParagraph, type RichTextRoot, type RichTextText, type RuleField, type RuleFieldSpec, type RuleOperator, type RuleOperatorSpec, type RuleValueKind, SDK_CLIENT_TOKEN, SDK_VERSION, SHIPMENT_STATUSES, SHIPPING_CONDITION_TYPES, SHIPPING_DELIVERY_TYPES, SHIPPING_ERROR_CODES, SHIPPING_RATE_TYPES, SearchApi, type SearchCategory, type SearchProduct, type SentResult, type SeoMetadata$3 as SeoMetadata, type ServerComputedOrderAmounts, type SetQuantitiesRequest, type SetQuantitiesResponse, type ShipmentStatus, ShippingApi, type ShippingCalculationRequest, type ShippingConditionType, type ShippingDeliveryType, type ShippingOption, type ShippingQuoteChangedDetails, type ShippingRate, type ShippingRateType, type ShippingStatus, type ShippingZone, type SingleEntityApiFunction, type StaleQuantity, type Store, type StoreByDomainInfo, type StoreConfig, type StoreConfigurationInfo, type StoreEmailBrandingSettings, type StoreMenu, type StoreMenuItem, type PaymentMethod as StorePaymentMethod, type StoreSettings, type StoreStatus, type StoreWithRelations, type StorefrontMetafield, type StorefrontMetafields, type StorefrontMetaobjectEntry, StoresApi, type SubmitReviewInvitationPayload, THEME_HEX_COLOR, type ThemeDisplayItem, type ThemeMigration, type ThemeMigrationReport, type ThemeMigrationStep, type ThemeSchema, type ThemeSchemaGroup, type ThemeSchemaItem, type ThemeSetting, type ThemeSettingType, type ThemeSettingsOf, type ThemeValue, type ThemeValueError, type ThemeValues, type ThemeVisibleIf, ThemesApi, type Timestamp, type TocItem, type TokenStorage, UNAVAILABLE_STATES, type UnavailableState, type UpdateAddressDto, type UpdateBlogCategory, type UpdateBlogComment, type UpdateBlogPost, type UpdateBlogSettings, type UpdateBlogTag, type UpdateCartItemRequest, type UpdateCategory, type UpdateContentPage, type UpdateEmbeddedScript, type UpdateOrder, type UpdateOrderItem, type UpdateProduct, type UpdateProductReview, type UpdateProductReviewReply, type UpdateProductVariant, type UpdatePromotion, UpdatePromotionSchema, type UpdateStore, type UpdateStoreConfig, type UpdateStoreSettings, type UpdateVariantOption, type UpdateVariantOptionValue, type UpsertCustomerForAuthPayload, type UrlRedirect, VALIDATION_KEYS, type ValidatePromotionCodeRequest, type ValidatePromotionCodeResponse, type VariantOption, type VariantOptionValue, type VariantStatus, type VerifiedResult, type VerifyOtpPayload, type WithMetafields, type WithSeoMetadata$3 as WithSeoMetadata, allowedCustomerAccess, allowedFileKinds, allowedValuesFor, appliedPromotionSchema, applyThemeMigration, assetBaseUrl, attributeLinkSchema, attributeLinkValueSchema, baseDeleteOptionsSchema, baseDeleteResultSchema, baseQueryParamsSchema, baseTypeOf, blogCategorySchema, blogCommentSchema, blogCommentWithRepliesSchema, blogPostCategorySchema, blogPostSchema, blogPostStatusSchema, blogPostTagSchema, blogPostWithRelationsSchema, blogSettingsSchema, blogTagSchema, buildTransformQuery, categorySchema, categoryTreeSchema, categoryWithChildrenSchema, checkMetaobjectFieldChanges, clientHeaderValue, colorSchema, compareDecimal, contentPageSchema, createAuthAwareHttpClient, createBlogCategorySchema, createBlogCommentSchema, createBlogPostSchema, createBlogSettingsSchema, createBlogTagSchema, createCategorySchema, createContentPageSchema, createEcomwebSdk, createEmbeddedScriptSchema, createOrderItemSchema, createOrderSchema, createProductReviewReplySchema, createProductReviewSchema, createProductSchema, createProductVariantSchema, createStoreConfigSchema, createStoreSchema, createStoreSettingsSchema, createVariantOptionSchema, createVariantOptionValueSchema, customerOrderSummarySchema, decimalSchema, deletedAtSchema, dimensionsSchema, emailBrandingSchema, emailBrandingShape, emailSchema, embeddedScriptPlacementSchema, embeddedScriptSchema, ensureSuccess, entryDisplayName, fromObjectPublicUrlToRender, fulfillmentStatusSchema, idSchema, integrationStatusSchema, inventoryStatusSchema, isBlankValue, isBlankValueFor, isEditableStatus, isListType, isMetafieldType, isPublishableStatus, isRuleField, isSafeRegex, isSettingVisible, isUnpublishedStatus, isValidEntryHandle, jsonSchema, legacyOrderStatusSchema, legacyProductStatusSchema, legalLinksSchema, measurementInBaseUnit, messageOutboxStatusSchema, metafieldIdentifier, moneySchema, normalizeDate, normalizeDateTime, normalizeDecimal, normalizeId, onHand, operatorsForField, optionalTimestampSchema, optionalUrlSchema, orderItemSchema, orderSchema, orderStatusSchema, orderWithItemsSchema, paginatedResponseSchema, paginationMetaSchema, paginationSchema, parseMetafieldIdentifier, parseStorageUrl, parseThemeMigration, parseThemeSchema, paymentMethodSchema, paymentStatusSchema, phoneSchema, positionOrderSchema, productReviewFiltersSchema, productReviewReplyFiltersSchema, productReviewReplySchema, productReviewSchema, productReviewStatsSchema, productReviewWithRepliesSchema, productSchema, productStatusSchema, productVariantCombinationEntrySchema, productVariantCombinationSchema, productVariantSchema, productVariantWithCombinationsSchema, productWithReviewStatsSchema, productWithVariantsAndReviewStatsSchema, productWithVariantsSchema, resolveAssetUrl, resolveThemeSettings, reviewStatusSchema, rewriteSupabaseUrl, richTextLength, safeParseBaseQueryParams, safeParsePaginationMeta, shippingStatusSchema, slugSchema, sortOrderSchema, storeConfigSchema, storeIdSchema, storeSchema, storeSettingsSchema, storeStatusSchema, storeWithRelationsSchema, storefrontAccessAllowed, strictUrlSchema, themeDefaults, themeMajor, themeMigrationSchema, themeSchemaSchema, themeSettings, timestampSchema, toEntryHandle, toMetafieldKey, toObjectUrl, toRenderUrl, tocItemSchema, transformationsEnabled, unavailable, unwrap, unwrapOrNull, updateBlogCategorySchema, updateBlogCommentSchema, updateBlogPostSchema, updateBlogSettingsSchema, updateBlogTagSchema, updateCategorySchema, updateContentPageSchema, updateEmbeddedScriptSchema, updateOrderItemSchema, updateOrderSchema, updateProductReviewReplySchema, updateProductReviewSchema, updateProductSchema, updateProductVariantSchema, updateStoreConfigSchema, updateStoreSchema, updateStoreSettingsSchema, updateVariantOptionSchema, updateVariantOptionValueSchema, urlSchema, uuidSchema, validateMetafieldDefinition, validateMetafieldValue, validateMetaobjectDefinition, validateMetaobjectEntry, validatePaginationMeta, validateRichText, validateThemeValues, validateValidations, valueKindFor, variantOptionSchema, variantOptionValueSchema, variantStatusSchema, withClientHeader };
|
|
6162
|
+
export { ADJUSTABLE_STATES, ADMIN_ORDER_SOURCES, type AddToCartRequest, type Address, AddressesApi, type AdjustQuantitiesRequest, type AdjustableState, type AdminOrderSource, ApiClientError, type ApiError, type ApiResponse, type AppliedPromotion, type AttributeLink, AuthApi, type AuthErrorCode, type AuthIdentity, type AuthResult, type AuthTokens, type AutocompleteParams, type BankAccount, type BaseDeleteOptions, type BaseDeleteResult, type BaseQueryParams, type BatchOrderReviewInvitationsResult, BlogApi, type BlogCategory, type BlogCategoryQueryParams, type BlogComment, type BlogCommentWithReplies, type BlogPost, type BlogPostCategory, type BlogPostCommentsPage, type BlogPostCommentsQuery, type BlogPostQueryParams, type BlogPostStatus, type BlogPostTag, type BlogPostWithRelations, type BlogSearchParams, type BlogSearchResponse, BlogServerApi, type BlogSettings, type BlogTag, type BlogTagQueryParams, CLIENT_HEADER, COLLECTION_RULE_MATRIX, CONDITION_TYPE_LABELS, CartApi, type CartApiItem, type CartApiResponse, CategoriesApi, type Category, type CategoryQueryParams, type CategorySearchResponse, type CategoryTree, type CategoryWithChildren, type ChangeEmailPayload, type ChangeEmailResult, type ChangePasswordPayload, type ChangedResult, type Collection, type CollectionQueryParams, type CollectionRule, type CollectionRuleSet, type CollectionRuleSetCriteria, type CollectionSearchCriteria, CollectionsApi, ConditionType, ConditionTypeSchema, type ConditionTypeType, type ContentPage, ContentPagesApi, type CreateAddressDto, type CreateBlogCategory, type CreateBlogComment, type CreateBlogPost, type CreateBlogSettings, type CreateBlogTag, type CreateCategory, type CreateContentPage, type CreateEmbeddedScript, type CreateOrder, type CreateOrderItem, type CreateOrderItemRequest, type CreateOrderRequest, type CreateProduct, type CreateProductReview, type CreateProductReviewReply, type CreateProductVariant, type CreatePromotion, CreatePromotionSchema, type CreateStore, type CreateStoreConfig, type CreateStoreSettings, type CreateVariantOption, type CreateVariantOptionValue, type CurrentIdentity, type Customer, type CustomerAccess, type CustomerOrderFilter, type CustomerOrderSummary, CustomersApi, DEFAULT_BUCKET, DISCOUNT_METHOD_LABELS, type DeleteApiFunction, type DeletedAt, DiscountMethod, DiscountMethodSchema, type DiscountMethodType, EMAIL_COLOR_PATTERN, EMAIL_PALETTE_DEFAULTS, ENTRY_HANDLE_PATTERN, type EcomwebProxiedSdkOptions, type EcomwebSdk, type EcomwebSdkOptions, type EcomwebServerSdk, type EcomwebServerSdkOptions, type EmbeddedScript, type EmbeddedScriptPlacement, type EngineResult, FILTERABLE_TYPES, type FileKind, type FulfillmentStatus, type GoogleAuthUrl, type GuestOrderLookupParams, type IHttpClient, INVENTORY_ADJUSTMENT_REASONS, INVENTORY_ERROR_CODES, INVENTORY_POLICIES, INVENTORY_STATES, INVENTORY_STATUS_LABELS, type Id, type ImageFormat, type ImageTransformOptions, type InitiatePaymentResult, type InsufficientInventoryItem, type IntegrationStatus, type InventoryActor, type InventoryAdjustmentReason, type InventoryErrorCode, type InventoryHistoryEntry, type InventoryImportResponse, type InventoryLevelRow, type InventoryLocation, type InventoryPolicy, type InventoryQuantities, type InventoryState, InventoryStatus, KNOWN_PAYMENT_METHODS, LEGACY_STATUS_MIGRATION_MAP, LEVEL_PROVINCE, LEVEL_WARD, type LegacyOrderStatus, type LegacyProductStatus, type LinkValue, type LocationArea, type LocationAreaQuery, type LocationAreasResponse, type LoginPayload, MAX_RULES_PER_SET, MAX_RULE_VALUE_ENTRIES, MEASUREMENT_UNITS, MEDIA_TYPES, MERCHANT_ADJUSTMENT_REASONS, METAFIELD_BASE_TYPES, METAFIELD_KEY_PATTERN, METAFIELD_LIMITS, METAFIELD_OWNER_TYPES, METAFIELD_TYPE_GROUPS, METAOBJECT_REFERENCE_TYPES, METAOBJECT_TYPE_PATTERN, type MeasurementType, type MeasurementValue, MemoryTokenStorage, MenusApi, type MerchantAdjustmentReason, type MessageOutboxStatus, type MetafieldBaseType, type MetafieldBound, type MetafieldContext, type MetafieldDefinitionShape, type MetafieldIssue, type MetafieldIssueCode, type MetafieldListType, type MetafieldOwnerType, type MetafieldType, type MetafieldTypeGroup, type MetafieldValidationKey, type MetafieldValidations, type MetafieldWrite, type MetaobjectDefinitionShape, type MetaobjectFieldShape, type MetaobjectListParams, type MetaobjectListResult, MetaobjectsApi, type MoneyValue, type MoveQuantitiesRequest, type MutationApiFunction, OBJECT_PREFIX, ORDER_ACTOR_TYPES, ORDER_EVENT_TYPES, ORDER_SHIPMENT_ERROR_CODES, ORDER_SOURCES, type OptionalTimestamp, type Order, type OrderActorType, type OrderCommentMutationResult, type OrderCreatedBy, type OrderEventType, type OrderItem, type PaymentMethod$1 as OrderPaymentMethod, type OrderReviewInvitationSummary, type OrderShipmentEvent, type OrderShipmentSummary, type OrderSource, type OrderStatus, type OrderTimelineActor, type OrderTimelineComment, type OrderTimelineCommentAuthor, type OrderTimelineEntry, type OrderTimelineEvent, type OrderTimelineResponse, type OrderWithItems, OrdersApi, PAGINATION_DEFAULTS, PRIVATE_REFERENCE_TYPES, PRODUCT_STATUS_LABELS, PROMOTION_MODE_COLORS, PROMOTION_MODE_LABELS, PROMOTION_STATUS_COLORS, PROMOTION_STATUS_LABELS, PROMOTION_TYPE_COLORS, PROMOTION_TYPE_LABELS, type PaginatedApiFunction, type PaginatedPromotionsResponse, PaginatedPromotionsResponseSchema, type PaginatedResponse, type PaginatedReviewsResponse, type PaginationMeta, type PasswordPolicy, type PaymentCredentialStatus, type PaymentMethod$1 as PaymentMethod, PaymentMethodsApi, type PaymentStateResult, type PaymentStatus, PaymentsApi, type Product, type ProductDetail, type ProductImage, type ProductQueryParams, type ProductReview, type ProductReviewFilters, type ProductReviewReply, type ProductReviewReplyFilters, type ProductReviewStats, type ProductReviewWithReplies, type ProductSearchParams, type ProductSearchResponse, type ProductService, ProductStatus, type ProductVariant, type ProductVariantCombination, type ProductVariantCombinationEntry, type ProductVariantWithCombinations, type ProductVideo, type ProductWithReviewStats, type ProductWithVariants, ProductsApi, type Promotion, type PromotionData, PromotionMode, PromotionModeSchema, type PromotionModeType, type PromotionQueryParams, PromotionQueryParamsSchema, PromotionSchema, type PromotionStatistics, PromotionStatisticsSchema, PromotionStatus, PromotionStatusSchema, type PromotionStatusType, type PromotionSuggestion, type PromotionSuggestionsResponse, PromotionType, PromotionTypeSchema, type PromotionTypeType, type PromotionWithDiscount, PromotionWithDiscountSchema, PromotionsApi, PromotionsServerApi, type PublicAuthConfig, type PublishedStoreTheme, type QuantitiesResponse, RENDER_PREFIX, RESOURCE_REFERENCE_TYPES, RULE_FIELDS, type RatingValue, RedirectsApi, type RegisterPayload, type RegisterResult, type RequestOptions, type ResetPasswordPayload, type ResetResult, type ResizeMode, type ResolvedAsset, type ResolvedBlogPostRef, type ResolvedCollectionRef, type ResolvedImage, type ResolvedMetaobjectRef, type ResolvedMetaobjectStub, type ResolvedPageRef, type ResolvedProductRef, type ResolvedVariantRef, type ReviewInvitationPublicData, type ReviewStatus, ReviewsApi, ReviewsServerApi, type RichTextBlock, type RichTextHeading, type RichTextInline, type RichTextLink, type RichTextList, type RichTextListItem, type RichTextNode, type RichTextParagraph, type RichTextRoot, type RichTextText, type RuleField, type RuleFieldSpec, type RuleOperator, type RuleOperatorSpec, type RuleValueKind, SDK_CLIENT_TOKEN, SDK_VERSION, SHIPMENT_STATUSES, SHIPPING_CONDITION_TYPES, SHIPPING_DELIVERY_TYPES, SHIPPING_ERROR_CODES, SHIPPING_RATE_TYPES, SearchApi, type SearchCategory, type SearchProduct, type SentResult, type SeoMetadata$3 as SeoMetadata, type ServerComputedOrderAmounts, type SetQuantitiesRequest, type SetQuantitiesResponse, type ShipmentStatus, ShippingApi, type ShippingCalculationRequest, type ShippingConditionType, type ShippingDeliveryType, type ShippingOption, type ShippingQuoteChangedDetails, type ShippingRate, type ShippingRateType, ShippingServerApi, type ShippingStatus, type ShippingZone, type SingleEntityApiFunction, type StaleQuantity, type Store, type StoreByDomainInfo, type StoreConfig, type StoreConfigurationInfo, type StoreEmailBrandingSettings, type StoreMenu, type StoreMenuItem, type PaymentMethod as StorePaymentMethod, type StoreSettings, type StoreStatus, type StoreWithRelations, type StorefrontMetafield, type StorefrontMetafields, type StorefrontMetaobjectEntry, StoresApi, type SubmitReviewInvitationPayload, THEME_HEX_COLOR, type ThemeDisplayItem, type ThemeMigration, type ThemeMigrationReport, type ThemeMigrationStep, type ThemeSchema, type ThemeSchemaGroup, type ThemeSchemaItem, type ThemeSetting, type ThemeSettingType, type ThemeSettingsOf, type ThemeValue, type ThemeValueError, type ThemeValues, type ThemeVisibleIf, ThemesApi, type Timestamp, type TocItem, type TokenStorage, UNAVAILABLE_STATES, type UnavailableState, type UpdateAddressDto, type UpdateBlogCategory, type UpdateBlogComment, type UpdateBlogPost, type UpdateBlogSettings, type UpdateBlogTag, type UpdateCartItemRequest, type UpdateCategory, type UpdateContentPage, type UpdateEmbeddedScript, type UpdateOrder, type UpdateOrderItem, type UpdateProduct, type UpdateProductReview, type UpdateProductReviewReply, type UpdateProductVariant, type UpdatePromotion, UpdatePromotionSchema, type UpdateStore, type UpdateStoreConfig, type UpdateStoreSettings, type UpdateVariantOption, type UpdateVariantOptionValue, type UpsertCustomerForAuthPayload, type UrlRedirect, VALIDATION_KEYS, type ValidatePromotionCodeRequest, type ValidatePromotionCodeResponse, type VariantOption, type VariantOptionValue, type VariantStatus, type VerifiedResult, type VerifyOtpPayload, type WithMetafields, type WithSeoMetadata$3 as WithSeoMetadata, allowedCustomerAccess, allowedFileKinds, allowedValuesFor, appliedPromotionSchema, applyThemeMigration, assetBaseUrl, attributeLinkSchema, attributeLinkValueSchema, baseDeleteOptionsSchema, baseDeleteResultSchema, baseQueryParamsSchema, baseTypeOf, blogCategorySchema, blogCommentSchema, blogCommentWithRepliesSchema, blogPostCategorySchema, blogPostSchema, blogPostStatusSchema, blogPostTagSchema, blogPostWithRelationsSchema, blogSettingsSchema, blogTagSchema, buildTransformQuery, categorySchema, categoryTreeSchema, categoryWithChildrenSchema, checkMetaobjectFieldChanges, clientHeaderValue, colorSchema, compareDecimal, contentPageSchema, createAuthAwareHttpClient, createBlogCategorySchema, createBlogCommentSchema, createBlogPostSchema, createBlogSettingsSchema, createBlogTagSchema, createCategorySchema, createContentPageSchema, createEcomwebProxiedSdk, createEcomwebSdk, createEcomwebServerSdk, createEmbeddedScriptSchema, createOrderItemSchema, createOrderSchema, createProductReviewReplySchema, createProductReviewSchema, createProductSchema, createProductVariantSchema, createStoreConfigSchema, createStoreSchema, createStoreSettingsSchema, createVariantOptionSchema, createVariantOptionValueSchema, customerOrderSummarySchema, decimalSchema, deletedAtSchema, dimensionsSchema, emailBrandingSchema, emailBrandingShape, emailSchema, embeddedScriptPlacementSchema, embeddedScriptSchema, ensureSuccess, entryDisplayName, fromObjectPublicUrlToRender, fulfillmentStatusSchema, idSchema, integrationStatusSchema, inventoryStatusSchema, isBlankValue, isBlankValueFor, isEditableStatus, isListType, isMetafieldType, isPublishableStatus, isRuleField, isSafeRegex, isSettingVisible, isUnpublishedStatus, isValidEntryHandle, jsonSchema, legacyOrderStatusSchema, legacyProductStatusSchema, legalLinksSchema, measurementInBaseUnit, messageOutboxStatusSchema, metafieldIdentifier, moneySchema, normalizeDate, normalizeDateTime, normalizeDecimal, normalizeId, onHand, operatorsForField, optionalTimestampSchema, optionalUrlSchema, orderItemSchema, orderSchema, orderStatusSchema, orderWithItemsSchema, paginatedResponseSchema, paginationMetaSchema, paginationSchema, parseMetafieldIdentifier, parseStorageUrl, parseThemeMigration, parseThemeSchema, paymentMethodSchema, paymentStatusSchema, phoneSchema, positionOrderSchema, productReviewFiltersSchema, productReviewReplyFiltersSchema, productReviewReplySchema, productReviewSchema, productReviewStatsSchema, productReviewWithRepliesSchema, productSchema, productStatusSchema, productVariantCombinationEntrySchema, productVariantCombinationSchema, productVariantSchema, productVariantWithCombinationsSchema, productWithReviewStatsSchema, productWithVariantsAndReviewStatsSchema, productWithVariantsSchema, resolveAssetUrl, resolveThemeSettings, reviewStatusSchema, rewriteSupabaseUrl, richTextLength, safeParseBaseQueryParams, safeParsePaginationMeta, shippingStatusSchema, slugSchema, sortOrderSchema, storeConfigSchema, storeIdSchema, storeSchema, storeSettingsSchema, storeStatusSchema, storeWithRelationsSchema, storefrontAccessAllowed, strictUrlSchema, themeDefaults, themeMajor, themeMigrationSchema, themeSchemaSchema, themeSettings, timestampSchema, toEntryHandle, toMetafieldKey, toObjectUrl, toRenderUrl, tocItemSchema, transformationsEnabled, unavailable, unwrap, unwrapOrNull, updateBlogCategorySchema, updateBlogCommentSchema, updateBlogPostSchema, updateBlogSettingsSchema, updateBlogTagSchema, updateCategorySchema, updateContentPageSchema, updateEmbeddedScriptSchema, updateOrderItemSchema, updateOrderSchema, updateProductReviewReplySchema, updateProductReviewSchema, updateProductSchema, updateProductVariantSchema, updateStoreConfigSchema, updateStoreSchema, updateStoreSettingsSchema, updateVariantOptionSchema, updateVariantOptionValueSchema, urlSchema, uuidSchema, validateMetafieldDefinition, validateMetafieldValue, validateMetaobjectDefinition, validateMetaobjectEntry, validatePaginationMeta, validateRichText, validateThemeValues, validateValidations, valueKindFor, variantOptionSchema, variantOptionValueSchema, variantStatusSchema, withClientHeader };
|