@ecomweb/sdk 0.14.1 → 0.15.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 +189 -69
- package/dist/index.js +230 -126
- 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
|
@@ -4298,11 +4298,12 @@ interface UpdateCartItemRequest {
|
|
|
4298
4298
|
* A shopper's cart: a guest cart keyed by a session id, or the signed-in customer's cart, reached through `sdk.cart`.
|
|
4299
4299
|
*/
|
|
4300
4300
|
declare class CartApi {
|
|
4301
|
-
private
|
|
4302
|
-
private
|
|
4303
|
-
constructor(
|
|
4301
|
+
private privateHttp;
|
|
4302
|
+
private shopperHttp;
|
|
4303
|
+
constructor(privateHttp: IHttpClient, shopperHttp: IHttpClient);
|
|
4304
4304
|
private client;
|
|
4305
|
-
|
|
4305
|
+
/** Guest cart: `/storefront/stores/:ref/cart`; signed-in: `.../customers/cart`. */
|
|
4306
|
+
private cartPath;
|
|
4306
4307
|
/**
|
|
4307
4308
|
* Gets the shopper's cart.
|
|
4308
4309
|
*
|
|
@@ -4465,9 +4466,9 @@ interface GuestOrderLookupParams {
|
|
|
4465
4466
|
* Placing orders, and reading them back as a guest or as the signed-in customer, reached through `sdk.orders`.
|
|
4466
4467
|
*/
|
|
4467
4468
|
declare class OrdersApi {
|
|
4468
|
-
private
|
|
4469
|
-
private
|
|
4470
|
-
constructor(
|
|
4469
|
+
private privateHttp;
|
|
4470
|
+
private shopperHttp;
|
|
4471
|
+
constructor(privateHttp: IHttpClient, shopperHttp: IHttpClient);
|
|
4471
4472
|
/**
|
|
4472
4473
|
* Look up a guest order. The API answers with the bare order when it
|
|
4473
4474
|
* matches and `{ message }` (HTTP 200) when it does not; a 404 is treated
|
|
@@ -4537,8 +4538,10 @@ interface BlogTagQueryParams extends BaseQueryParams {
|
|
|
4537
4538
|
* Published blog posts, categories, tags and comments of a store, reached through `sdk.blog`.
|
|
4538
4539
|
*/
|
|
4539
4540
|
declare class BlogApi {
|
|
4540
|
-
|
|
4541
|
-
|
|
4541
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
4542
|
+
protected publicHttp: IHttpClient;
|
|
4543
|
+
/** Client for the calls that read the shopper's session (comments), sent with the shopper's bearer. */
|
|
4544
|
+
protected authHttp: IHttpClient;
|
|
4542
4545
|
constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
|
|
4543
4546
|
/**
|
|
4544
4547
|
* Lists published blog posts.
|
|
@@ -4593,6 +4596,13 @@ declare class BlogApi {
|
|
|
4593
4596
|
* @returns The comments; throws {@link ApiClientError} when the API answers with an error
|
|
4594
4597
|
*/
|
|
4595
4598
|
getPostCommentsAuth(storeRef: string, postId: number): Promise<any[]>;
|
|
4599
|
+
}
|
|
4600
|
+
/**
|
|
4601
|
+
* Blog comment submission, reached through `sdk.blog` on the server and proxied SDKs.
|
|
4602
|
+
*
|
|
4603
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
4604
|
+
*/
|
|
4605
|
+
declare class BlogServerApi extends BlogApi {
|
|
4596
4606
|
/**
|
|
4597
4607
|
* Submits a comment on a post, as the signed-in customer. It may wait for moderation.
|
|
4598
4608
|
*
|
|
@@ -4635,7 +4645,7 @@ type StoreConfigurationInfo = Store & {
|
|
|
4635
4645
|
/** Shop metafields with storefront access (spec §6.4). */
|
|
4636
4646
|
metafields?: StorefrontMetafields;
|
|
4637
4647
|
};
|
|
4638
|
-
/** `GET /
|
|
4648
|
+
/** `GET /storefront/stores/domain/:domain`: the store a host serves. */
|
|
4639
4649
|
type StoreByDomainInfo = StoreConfigurationInfo & {
|
|
4640
4650
|
/**
|
|
4641
4651
|
* The live theme's URL when it is external (the shared storefront sends
|
|
@@ -5116,14 +5126,24 @@ interface ShippingQuoteChangedDetails {
|
|
|
5116
5126
|
* Shipping areas and shipping rates for a store, reached through `sdk.shipping`.
|
|
5117
5127
|
*/
|
|
5118
5128
|
declare class ShippingApi {
|
|
5119
|
-
|
|
5120
|
-
|
|
5129
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
5130
|
+
protected publicHttp: IHttpClient;
|
|
5131
|
+
constructor(publicHttp: IHttpClient);
|
|
5121
5132
|
/**
|
|
5122
5133
|
* List administrative areas. Pass `level` for one tier or `parent_code`
|
|
5123
5134
|
* for one area's children; passing neither returns every area, which for
|
|
5124
5135
|
* Vietnam is 3,355 rows and about 900 KB. Prefer a filter.
|
|
5125
5136
|
*/
|
|
5126
5137
|
listLocationAreas(storeRef: string, query?: LocationAreaQuery): Promise<LocationAreasResponse>;
|
|
5138
|
+
}
|
|
5139
|
+
/**
|
|
5140
|
+
* Shipping rates for a cart, reached through `sdk.shipping` on the server and proxied SDKs.
|
|
5141
|
+
*
|
|
5142
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
5143
|
+
*/
|
|
5144
|
+
declare class ShippingServerApi extends ShippingApi {
|
|
5145
|
+
private privateHttp;
|
|
5146
|
+
constructor(publicHttp: IHttpClient, privateHttp: IHttpClient);
|
|
5127
5147
|
/**
|
|
5128
5148
|
* Works out the shipping options and prices for a cart and a destination.
|
|
5129
5149
|
*
|
|
@@ -5184,16 +5204,9 @@ interface PromotionSuggestionsResponse {
|
|
|
5184
5204
|
* Promotion codes and offers of a store, reached through `sdk.promotions`.
|
|
5185
5205
|
*/
|
|
5186
5206
|
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>;
|
|
5207
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
5208
|
+
protected publicHttp: IHttpClient;
|
|
5209
|
+
constructor(publicHttp: IHttpClient);
|
|
5197
5210
|
/**
|
|
5198
5211
|
* Lists promotions the shopper could use, optionally for a given cart subtotal.
|
|
5199
5212
|
*
|
|
@@ -5203,6 +5216,23 @@ declare class PromotionsApi {
|
|
|
5203
5216
|
*/
|
|
5204
5217
|
getSuggestions(storeRef: string, subtotal?: number): Promise<PromotionSuggestionsResponse>;
|
|
5205
5218
|
}
|
|
5219
|
+
/**
|
|
5220
|
+
* Promotion code checks, reached through `sdk.promotions` on the server and proxied SDKs.
|
|
5221
|
+
*
|
|
5222
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
5223
|
+
*/
|
|
5224
|
+
declare class PromotionsServerApi extends PromotionsApi {
|
|
5225
|
+
private privateHttp;
|
|
5226
|
+
constructor(publicHttp: IHttpClient, privateHttp: IHttpClient);
|
|
5227
|
+
/**
|
|
5228
|
+
* Checks a promotion code against a cart.
|
|
5229
|
+
*
|
|
5230
|
+
* @param storeRef - the store's ref or handle
|
|
5231
|
+
* @param data - the code and the cart details
|
|
5232
|
+
* @returns The validation result; throws {@link ApiClientError} when the API answers with an error
|
|
5233
|
+
*/
|
|
5234
|
+
validate(storeRef: string, data: ValidatePromotionCodeRequest): Promise<ValidatePromotionCodeResponse>;
|
|
5235
|
+
}
|
|
5206
5236
|
|
|
5207
5237
|
interface BankAccount {
|
|
5208
5238
|
id: number;
|
|
@@ -5285,14 +5315,12 @@ interface PaymentCredentialStatus {
|
|
|
5285
5315
|
* since the dashboard talks to it directly and this SDK must never carry a
|
|
5286
5316
|
* plaintext credential shape.
|
|
5287
5317
|
*
|
|
5288
|
-
* Both endpoints
|
|
5289
|
-
*
|
|
5290
|
-
* authenticated one.
|
|
5318
|
+
* Both endpoints need a storefront secret key, so both go through the one
|
|
5319
|
+
* private HTTP client (the server SDK's, or the proxy's), never the public one.
|
|
5291
5320
|
*/
|
|
5292
5321
|
declare class PaymentsApi {
|
|
5293
|
-
private
|
|
5294
|
-
|
|
5295
|
-
constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
|
|
5322
|
+
private privateHttp;
|
|
5323
|
+
constructor(privateHttp: IHttpClient);
|
|
5296
5324
|
/**
|
|
5297
5325
|
* Start a gateway charge attempt for an order. Keyed by `order_code`,
|
|
5298
5326
|
* never `order_id` — the API route was deliberately re-keyed away from a
|
|
@@ -5350,8 +5378,9 @@ interface BatchOrderReviewInvitationsResult {
|
|
|
5350
5378
|
* Product reviews and the invitations that ask customers to write them, reached through `sdk.reviews`.
|
|
5351
5379
|
*/
|
|
5352
5380
|
declare class ReviewsApi {
|
|
5353
|
-
|
|
5354
|
-
|
|
5381
|
+
/** Client for the public routes, sent with the publishable key. */
|
|
5382
|
+
protected publicHttp: IHttpClient;
|
|
5383
|
+
constructor(publicHttp: IHttpClient);
|
|
5355
5384
|
/**
|
|
5356
5385
|
* Lists the published reviews of a product.
|
|
5357
5386
|
*
|
|
@@ -5361,6 +5390,15 @@ declare class ReviewsApi {
|
|
|
5361
5390
|
* @returns A page of reviews; throws {@link ApiClientError} when the API answers with an error
|
|
5362
5391
|
*/
|
|
5363
5392
|
getProductReviews(storeRef: string, productId: string | number, query?: Omit<ProductReviewFilters, "product_id">): Promise<PaginatedReviewsResponse>;
|
|
5393
|
+
}
|
|
5394
|
+
/**
|
|
5395
|
+
* The review invitation calls, reached through `sdk.reviews` on the server and proxied SDKs.
|
|
5396
|
+
*
|
|
5397
|
+
* Needs a storefront secret key: available on `createEcomwebServerSdk` and `createEcomwebProxiedSdk`, never on `createEcomwebSdk`.
|
|
5398
|
+
*/
|
|
5399
|
+
declare class ReviewsServerApi extends ReviewsApi {
|
|
5400
|
+
private privateHttp;
|
|
5401
|
+
constructor(publicHttp: IHttpClient, privateHttp: IHttpClient);
|
|
5364
5402
|
/**
|
|
5365
5403
|
* Gets the public details behind a review invitation link.
|
|
5366
5404
|
*
|
|
@@ -5754,9 +5792,9 @@ type AuthErrorCode = "AUTH_INVALID_CREDENTIALS" | "AUTH_ACCOUNT_LOCKED"
|
|
|
5754
5792
|
/**
|
|
5755
5793
|
* One store's auth surface.
|
|
5756
5794
|
*
|
|
5757
|
-
*
|
|
5758
|
-
* `
|
|
5759
|
-
* store_id matches the route's store.
|
|
5795
|
+
* Every route lives under `/storefront/stores/<ref>/auth/`. Token routes
|
|
5796
|
+
* (`me`, `logout`, ...) require an access token and assert that the token's
|
|
5797
|
+
* store_id matches the route's store; the rest are unauthenticated and throttled.
|
|
5760
5798
|
*
|
|
5761
5799
|
* This class does not supply `x-storefront-api-key` — StorefrontApiKeyGuard
|
|
5762
5800
|
* requires it on every route, and the injected IHttpClient owns that header.
|
|
@@ -5935,21 +5973,13 @@ interface Options {
|
|
|
5935
5973
|
*/
|
|
5936
5974
|
declare function createAuthAwareHttpClient(inner: IHttpClient, { storage, auth }: Options): IHttpClient;
|
|
5937
5975
|
|
|
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
5976
|
/** What {@link createEcomwebSdk} needs: the two HTTP clients, and optional client info. */
|
|
5951
5977
|
interface EcomwebSdkOptions {
|
|
5952
|
-
/**
|
|
5978
|
+
/**
|
|
5979
|
+
* Client for the public API routes and the calls that need no shopper
|
|
5980
|
+
* session. {@link createEcomwebSdk} sends it as is (with a publishable key);
|
|
5981
|
+
* {@link createEcomwebServerSdk} adds the secret key to it.
|
|
5982
|
+
*/
|
|
5953
5983
|
publicHttp: IHttpClient;
|
|
5954
5984
|
/** Client for the routes that need the signed-in customer's credentials. */
|
|
5955
5985
|
authHttp: IHttpClient;
|
|
@@ -5959,42 +5989,132 @@ interface EcomwebSdkOptions {
|
|
|
5959
5989
|
*/
|
|
5960
5990
|
clientInfo?: string;
|
|
5961
5991
|
}
|
|
5962
|
-
/**
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5992
|
+
/** What {@link createEcomwebServerSdk} needs: the public options plus the storefront secret key. */
|
|
5993
|
+
type EcomwebServerSdkOptions = EcomwebSdkOptions & {
|
|
5994
|
+
/** The store's storefront secret key (`sk_storefront_...`). Server only; never ship it to a browser. */
|
|
5995
|
+
secretKey: string;
|
|
5996
|
+
};
|
|
5997
|
+
/** What {@link createEcomwebProxiedSdk} needs: a direct client for public routes and one that reaches a same-origin proxy. */
|
|
5998
|
+
interface EcomwebProxiedSdkOptions {
|
|
5999
|
+
/** Client for the public API routes, called directly with the publishable key. */
|
|
6000
|
+
publicHttp: IHttpClient;
|
|
6001
|
+
/** Client that sends private calls to a same-origin proxy, which holds the secret key. */
|
|
6002
|
+
proxyHttp: IHttpClient;
|
|
6003
|
+
/**
|
|
6004
|
+
* Tokens put before this SDK's own in the `X-Ecomweb-Client` header
|
|
6005
|
+
* (space-separated `name/version`).
|
|
6006
|
+
*/
|
|
6007
|
+
clientInfo?: string;
|
|
6008
|
+
}
|
|
6009
|
+
/** The public SDK: catalog and content reads, safe with a publishable key. */
|
|
6010
|
+
interface EcomwebSdk {
|
|
6011
|
+
/** Products. */
|
|
5976
6012
|
products: ProductsApi;
|
|
6013
|
+
/** Collections. */
|
|
5977
6014
|
collections: CollectionsApi;
|
|
6015
|
+
/** Categories. */
|
|
5978
6016
|
categories: CategoriesApi;
|
|
5979
|
-
|
|
5980
|
-
orders: OrdersApi;
|
|
6017
|
+
/** Published blog posts, categories, tags and comments. */
|
|
5981
6018
|
blog: BlogApi;
|
|
6019
|
+
/** Stores. */
|
|
5982
6020
|
stores: StoresApi;
|
|
6021
|
+
/** Themes. */
|
|
5983
6022
|
themes: ThemesApi;
|
|
6023
|
+
/** Metaobject entries. */
|
|
5984
6024
|
metaobjects: MetaobjectsApi;
|
|
6025
|
+
/** Search. */
|
|
5985
6026
|
search: SearchApi;
|
|
6027
|
+
/** Shipping locations. */
|
|
5986
6028
|
shipping: ShippingApi;
|
|
6029
|
+
/** Promotion suggestions. */
|
|
5987
6030
|
promotions: PromotionsApi;
|
|
6031
|
+
/** Payment methods a store accepts. */
|
|
5988
6032
|
paymentMethods: PaymentMethodsApi;
|
|
5989
|
-
|
|
6033
|
+
/** Product reviews (reads). */
|
|
5990
6034
|
reviews: ReviewsApi;
|
|
5991
|
-
|
|
5992
|
-
addresses: AddressesApi;
|
|
6035
|
+
/** Content pages. */
|
|
5993
6036
|
contentPages: ContentPagesApi;
|
|
6037
|
+
/** Menus. */
|
|
5994
6038
|
menus: MenusApi;
|
|
6039
|
+
/** URL redirects. */
|
|
5995
6040
|
redirects: RedirectsApi;
|
|
5996
|
-
}
|
|
5997
|
-
/** The
|
|
5998
|
-
|
|
6041
|
+
}
|
|
6042
|
+
/** The server SDK: everything on {@link EcomwebSdk} plus the private modules. */
|
|
6043
|
+
interface EcomwebServerSdk extends Omit<EcomwebSdk, "blog" | "reviews" | "shipping" | "promotions"> {
|
|
6044
|
+
/** Blog, with comment submission. */
|
|
6045
|
+
blog: BlogServerApi;
|
|
6046
|
+
/** Reviews, with submission and invitations. */
|
|
6047
|
+
reviews: ReviewsServerApi;
|
|
6048
|
+
/** Shipping, with rate calculation. */
|
|
6049
|
+
shipping: ShippingServerApi;
|
|
6050
|
+
/** Promotions, with code validation. */
|
|
6051
|
+
promotions: PromotionsServerApi;
|
|
6052
|
+
/** Carts. */
|
|
6053
|
+
cart: CartApi;
|
|
6054
|
+
/** Orders. */
|
|
6055
|
+
orders: OrdersApi;
|
|
6056
|
+
/** Payments. */
|
|
6057
|
+
payments: PaymentsApi;
|
|
6058
|
+
/** Customers. */
|
|
6059
|
+
customers: CustomersApi;
|
|
6060
|
+
/** Customer addresses. */
|
|
6061
|
+
addresses: AddressesApi;
|
|
6062
|
+
}
|
|
6063
|
+
/**
|
|
6064
|
+
* Creates the public SDK. It reads the catalog and content only (products,
|
|
6065
|
+
* collections, categories, blog, stores, themes, search and so on) and is safe
|
|
6066
|
+
* to use in a browser with a publishable key. For carts, orders, payments,
|
|
6067
|
+
* customers and the private methods of other modules, use
|
|
6068
|
+
* {@link createEcomwebServerSdk} on a server or {@link createEcomwebProxiedSdk}
|
|
6069
|
+
* in a browser.
|
|
6070
|
+
*
|
|
6071
|
+
* @example
|
|
6072
|
+
* ```ts
|
|
6073
|
+
* const sdk = createEcomwebSdk({ publicHttp, authHttp });
|
|
6074
|
+
* const product = await sdk.products.getBySlug("my-store", "blue-shirt");
|
|
6075
|
+
* ```
|
|
6076
|
+
*
|
|
6077
|
+
* @param options - the HTTP clients, and optional client info for the `X-Ecomweb-Client` header
|
|
6078
|
+
* @returns An object with one API class per public resource
|
|
6079
|
+
*/
|
|
6080
|
+
declare function createEcomwebSdk(options: EcomwebSdkOptions): EcomwebSdk;
|
|
6081
|
+
/**
|
|
6082
|
+
* Creates the server SDK: the public modules plus carts, orders, payments,
|
|
6083
|
+
* customers, addresses and the private methods of blog, reviews, shipping and
|
|
6084
|
+
* promotions. Every request carries the secret in `x-storefront-api-key`, and
|
|
6085
|
+
* a key header set by the caller is overridden. Run it on a server only.
|
|
6086
|
+
*
|
|
6087
|
+
* @example
|
|
6088
|
+
* ```ts
|
|
6089
|
+
* const sdk = createEcomwebServerSdk({
|
|
6090
|
+
* publicHttp,
|
|
6091
|
+
* authHttp,
|
|
6092
|
+
* secretKey: process.env.ECOMWEB_SECRET_KEY!,
|
|
6093
|
+
* });
|
|
6094
|
+
* const cart = await sdk.cart.getCart("my-store", sessionId, false);
|
|
6095
|
+
* ```
|
|
6096
|
+
*
|
|
6097
|
+
* @param options - the HTTP clients, the storefront secret key, and optional client info
|
|
6098
|
+
* @returns The public modules and the private ones
|
|
6099
|
+
* @throws Error when `secretKey` is blank or is a publishable key (`pk_...`), or when called in a browser; the message never includes the key
|
|
6100
|
+
*/
|
|
6101
|
+
declare function createEcomwebServerSdk(options: EcomwebServerSdkOptions): EcomwebServerSdk;
|
|
6102
|
+
/**
|
|
6103
|
+
* Creates the SDK for browser code that needs private modules. Public calls go
|
|
6104
|
+
* straight to the API with the publishable key; private ones (cart, orders,
|
|
6105
|
+
* payments, customers, addresses and the private methods of other modules) go
|
|
6106
|
+
* to `proxyHttp`, a same-origin proxy that holds the secret key. No secret
|
|
6107
|
+
* reaches the browser.
|
|
6108
|
+
*
|
|
6109
|
+
* @example
|
|
6110
|
+
* ```ts
|
|
6111
|
+
* const sdk = createEcomwebProxiedSdk({ publicHttp, proxyHttp });
|
|
6112
|
+
* const cart = await sdk.cart.getCart("my-store", sessionId, false);
|
|
6113
|
+
* ```
|
|
6114
|
+
*
|
|
6115
|
+
* @param options - the direct client, the proxy client, and optional client info
|
|
6116
|
+
* @returns The same shape as {@link createEcomwebServerSdk}
|
|
6117
|
+
*/
|
|
6118
|
+
declare function createEcomwebProxiedSdk(options: EcomwebProxiedSdkOptions): EcomwebServerSdk;
|
|
5999
6119
|
|
|
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 };
|
|
6120
|
+
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, 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 };
|