@ecomweb/sdk 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +631 -0
- package/dist/index.js +452 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,15 +46,42 @@ declare function clientHeaderValue(clientInfo?: string): string;
|
|
|
46
46
|
*/
|
|
47
47
|
declare function withClientHeader(http: IHttpClient, clientInfo?: string): IHttpClient;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* The error thrown when the API answers with an error. Carries the HTTP status and the API's error code.
|
|
51
|
+
*/
|
|
49
52
|
declare class ApiClientError extends Error {
|
|
53
|
+
/**
|
|
54
|
+
* The HTTP status code, or `0` when there was no response.
|
|
55
|
+
*/
|
|
50
56
|
statusCode: number;
|
|
57
|
+
/**
|
|
58
|
+
* The API's machine-readable error code, when it sent one.
|
|
59
|
+
*/
|
|
51
60
|
code?: string;
|
|
52
61
|
/** The business error's structured `details`, when the backend sent any. */
|
|
53
62
|
details?: unknown;
|
|
54
63
|
constructor(message: string, statusCode?: number, code?: string, details?: unknown);
|
|
55
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Returns the data of a successful response and throws on an error response.
|
|
67
|
+
*
|
|
68
|
+
* @param response - the response to read
|
|
69
|
+
* @returns The response data; throws {@link ApiClientError} when the API answers with an error
|
|
70
|
+
*/
|
|
56
71
|
declare function unwrap<T>(response: ApiResponse<T>): T;
|
|
72
|
+
/**
|
|
73
|
+
* Like {@link unwrap}, but resolves `null` for the statuses that mean "not found".
|
|
74
|
+
*
|
|
75
|
+
* @param response - the response to read
|
|
76
|
+
* @param nullStatusCodes - the statuses that resolve `null`, `[404]` by default
|
|
77
|
+
* @returns The response data, or `null` when the status is in `nullStatusCodes`; throws {@link ApiClientError} on any other API error
|
|
78
|
+
*/
|
|
57
79
|
declare function unwrapOrNull<T>(response: ApiResponse<T>, nullStatusCodes?: number[]): T | null;
|
|
80
|
+
/**
|
|
81
|
+
* Throws on an error response and returns nothing on success. Use it when you do not need the data.
|
|
82
|
+
*
|
|
83
|
+
* @param response - the response to check
|
|
84
|
+
*/
|
|
58
85
|
declare function ensureSuccess(response: ApiResponse<any>): void;
|
|
59
86
|
|
|
60
87
|
/**
|
|
@@ -1096,6 +1123,12 @@ interface InventoryQuantities {
|
|
|
1096
1123
|
}
|
|
1097
1124
|
/** What is physically held: everything except incoming. */
|
|
1098
1125
|
declare function onHand(level: InventoryQuantities): number;
|
|
1126
|
+
/**
|
|
1127
|
+
* Adds up the stock that cannot be sold: damaged, quality control, safety stock and other.
|
|
1128
|
+
*
|
|
1129
|
+
* @param level - the quantities of one variant at one location
|
|
1130
|
+
* @returns The total unavailable quantity
|
|
1131
|
+
*/
|
|
1099
1132
|
declare function unavailable(level: Pick<InventoryQuantities, UnavailableState>): number;
|
|
1100
1133
|
/** One row of `GET /inventory/levels`: a variant at a location. */
|
|
1101
1134
|
interface InventoryLevelRow extends InventoryQuantities {
|
|
@@ -3164,8 +3197,27 @@ declare const themeSchemaSchema: z.ZodArray<z.ZodObject<{
|
|
|
3164
3197
|
* an Error whose message lists every problem, readable in a build log.
|
|
3165
3198
|
*/
|
|
3166
3199
|
declare function parseThemeSchema(input: unknown): ThemeSchema;
|
|
3200
|
+
/**
|
|
3201
|
+
* Lists every setting in a theme schema, across all groups, leaving out headers and other non-setting entries.
|
|
3202
|
+
*
|
|
3203
|
+
* @param schema - the theme schema
|
|
3204
|
+
* @returns The settings in schema order
|
|
3205
|
+
*/
|
|
3167
3206
|
declare function themeSettings(schema: ThemeSchema): ThemeSetting[];
|
|
3207
|
+
/**
|
|
3208
|
+
* Builds the default value of every setting in a theme schema.
|
|
3209
|
+
*
|
|
3210
|
+
* @param schema - the theme schema
|
|
3211
|
+
* @returns A map from setting id to its default, or `null` when a setting has none
|
|
3212
|
+
*/
|
|
3168
3213
|
declare function themeDefaults(schema: ThemeSchema): ThemeValues;
|
|
3214
|
+
/**
|
|
3215
|
+
* Checks a set of saved theme values against a theme schema. Settings with no value are skipped.
|
|
3216
|
+
*
|
|
3217
|
+
* @param schema - the theme schema
|
|
3218
|
+
* @param input - the values to check, as an object keyed by setting id
|
|
3219
|
+
* @returns The accepted values and a list of per-setting errors
|
|
3220
|
+
*/
|
|
3169
3221
|
declare function validateThemeValues(schema: ThemeSchema, input: unknown): {
|
|
3170
3222
|
values: Record<string, ThemeValue>;
|
|
3171
3223
|
errors: ThemeValueError[];
|
|
@@ -3249,6 +3301,12 @@ declare const themeMigrationSchema: z.ZodObject<{
|
|
|
3249
3301
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
3250
3302
|
}, z.core.$strict>], "op">>;
|
|
3251
3303
|
}, z.core.$strict>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Parses and validates a theme migration definition.
|
|
3306
|
+
*
|
|
3307
|
+
* @param input - the unparsed migration
|
|
3308
|
+
* @returns The validated migration; throws an `Error` listing the problems when it is invalid
|
|
3309
|
+
*/
|
|
3252
3310
|
declare function parseThemeMigration(input: unknown): ThemeMigration;
|
|
3253
3311
|
/** Runs the steps in order over a copy of `input`. */
|
|
3254
3312
|
declare function applyThemeMigration(input: Record<string, unknown>, migration: ThemeMigration): {
|
|
@@ -3663,9 +3721,37 @@ declare const DEFAULT_BUCKET = "public-cdn";
|
|
|
3663
3721
|
* dynamic `process.env[key]` read is not inlined.
|
|
3664
3722
|
*/
|
|
3665
3723
|
declare function assetBaseUrl(): string;
|
|
3724
|
+
/**
|
|
3725
|
+
* Tells whether image resizing is on. Controlled by `NEXT_PUBLIC_ENABLE_IMAGE_TRANSFORMATIONS`; when unset it is on, except for a local asset host.
|
|
3726
|
+
*
|
|
3727
|
+
* @returns `true` when image URLs should use the resizing endpoint
|
|
3728
|
+
*/
|
|
3666
3729
|
declare function transformationsEnabled(): boolean;
|
|
3730
|
+
/**
|
|
3731
|
+
* Builds the query string for an image resize request.
|
|
3732
|
+
*
|
|
3733
|
+
* @param opts - the resize options; unset or non-finite values are left out
|
|
3734
|
+
* @returns The query string including the leading `?`, or an empty string when there is nothing to add
|
|
3735
|
+
*/
|
|
3667
3736
|
declare function buildTransformQuery(opts?: ImageTransformOptions): string;
|
|
3737
|
+
/**
|
|
3738
|
+
* Builds the URL of a resized version of a stored image. Defaults to `resize=cover` and `quality=80`.
|
|
3739
|
+
*
|
|
3740
|
+
* @param baseUrl - the origin that serves storage objects
|
|
3741
|
+
* @param bucket - the storage bucket
|
|
3742
|
+
* @param path - the object path inside the bucket
|
|
3743
|
+
* @param opts - resize options that override the defaults
|
|
3744
|
+
* @returns The resized image URL
|
|
3745
|
+
*/
|
|
3668
3746
|
declare function toRenderUrl(baseUrl: string, bucket: string, path: string, opts?: ImageTransformOptions): string;
|
|
3747
|
+
/**
|
|
3748
|
+
* Builds the URL of the original, unresized stored image.
|
|
3749
|
+
*
|
|
3750
|
+
* @param baseUrl - the origin that serves storage objects
|
|
3751
|
+
* @param bucket - the storage bucket
|
|
3752
|
+
* @param path - the object path inside the bucket
|
|
3753
|
+
* @returns The original image URL
|
|
3754
|
+
*/
|
|
3669
3755
|
declare function toObjectUrl(baseUrl: string, bucket: string, path: string): string;
|
|
3670
3756
|
/**
|
|
3671
3757
|
* Pull bucket + object path out of a storage URL, whatever host it names.
|
|
@@ -3693,6 +3779,8 @@ declare function fromObjectPublicUrlToRender(publicUrl: string, opts?: ImageTran
|
|
|
3693
3779
|
*/
|
|
3694
3780
|
declare function resolveAssetUrl(imagePathOrUrl: string | null | undefined, opts?: ImageTransformOptions, bucket?: string, baseUrl?: string): string | null;
|
|
3695
3781
|
/**
|
|
3782
|
+
* Resolves a stored image URL to the asset host, resized when options are given.
|
|
3783
|
+
*
|
|
3696
3784
|
* @deprecated Renamed to {@link resolveAssetUrl}. The old name described a
|
|
3697
3785
|
* Supabase-specific rewrite; the implementation is no longer Supabase-aware.
|
|
3698
3786
|
* Kept so existing callers keep compiling.
|
|
@@ -3754,10 +3842,29 @@ type ProductDetail = Product & {
|
|
|
3754
3842
|
metafields?: StorefrontMetafields;
|
|
3755
3843
|
} & WithSeoMetadata$3;
|
|
3756
3844
|
|
|
3845
|
+
/**
|
|
3846
|
+
* Products of a store, reached through `sdk.products`.
|
|
3847
|
+
*/
|
|
3757
3848
|
declare class ProductsApi {
|
|
3758
3849
|
private http;
|
|
3759
3850
|
constructor(http: IHttpClient);
|
|
3851
|
+
/**
|
|
3852
|
+
* Gets one product by id.
|
|
3853
|
+
*
|
|
3854
|
+
* @param storeRef - the store's ref or handle
|
|
3855
|
+
* @param productId - the product id
|
|
3856
|
+
* @param query - optional fields to include
|
|
3857
|
+
* @returns The product, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
3858
|
+
*/
|
|
3760
3859
|
getById(storeRef: string, productId: number, query?: ProductQueryParams): Promise<ProductDetail | null>;
|
|
3860
|
+
/**
|
|
3861
|
+
* Gets one product by slug.
|
|
3862
|
+
*
|
|
3863
|
+
* @param storeRef - the store's ref or handle
|
|
3864
|
+
* @param slug - the product slug
|
|
3865
|
+
* @param query - optional fields to include
|
|
3866
|
+
* @returns The product, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
3867
|
+
*/
|
|
3761
3868
|
getBySlug(storeRef: string, slug: string, query?: ProductQueryParams): Promise<ProductDetail | null>;
|
|
3762
3869
|
}
|
|
3763
3870
|
|
|
@@ -3976,6 +4083,12 @@ declare const RULE_FIELDS: readonly RuleField[];
|
|
|
3976
4083
|
* before the request rather than after it is rejected. */
|
|
3977
4084
|
declare const MAX_RULES_PER_SET = 25;
|
|
3978
4085
|
declare const MAX_RULE_VALUE_ENTRIES = 100;
|
|
4086
|
+
/**
|
|
4087
|
+
* Tells whether a name is a field that smart collection rules can use.
|
|
4088
|
+
*
|
|
4089
|
+
* @param name - the name to test
|
|
4090
|
+
* @returns `true` when it is a rule field
|
|
4091
|
+
*/
|
|
3979
4092
|
declare function isRuleField(name: string): name is RuleField;
|
|
3980
4093
|
/** The operators a field accepts, in display order. Empty for unknown fields. */
|
|
3981
4094
|
declare function operatorsForField(field: string): RuleOperator[];
|
|
@@ -4040,11 +4153,36 @@ interface CollectionQueryParams extends BaseQueryParams {
|
|
|
4040
4153
|
include_product_count?: boolean;
|
|
4041
4154
|
}
|
|
4042
4155
|
|
|
4156
|
+
/**
|
|
4157
|
+
* Product collections of a store, reached through `sdk.collections`.
|
|
4158
|
+
*/
|
|
4043
4159
|
declare class CollectionsApi {
|
|
4044
4160
|
private http;
|
|
4045
4161
|
constructor(http: IHttpClient);
|
|
4162
|
+
/**
|
|
4163
|
+
* Lists collections, one page at a time.
|
|
4164
|
+
*
|
|
4165
|
+
* @param storeRef - the store's ref or handle
|
|
4166
|
+
* @param params - filters, sorting and paging
|
|
4167
|
+
* @returns A page of collections; throws {@link ApiClientError} when the API answers with an error
|
|
4168
|
+
*/
|
|
4046
4169
|
getAllPaginated(storeRef: string, params?: CollectionQueryParams): Promise<PaginatedResponse<Collection>>;
|
|
4170
|
+
/**
|
|
4171
|
+
* Lists up to 100 collections in one call.
|
|
4172
|
+
*
|
|
4173
|
+
* @param storeRef - the store's ref or handle
|
|
4174
|
+
* @param ids - limit the result to these collection ids
|
|
4175
|
+
* @returns The collections; throws {@link ApiClientError} when the API answers with an error
|
|
4176
|
+
*/
|
|
4047
4177
|
getAll(storeRef: string, ids?: number[]): Promise<Collection[]>;
|
|
4178
|
+
/**
|
|
4179
|
+
* Gets one collection by slug.
|
|
4180
|
+
*
|
|
4181
|
+
* @param storeRef - the store's ref or handle
|
|
4182
|
+
* @param slug - the collection slug
|
|
4183
|
+
* @param query - `include_seo_metadata` adds the SEO fields
|
|
4184
|
+
* @returns The collection, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4185
|
+
*/
|
|
4048
4186
|
getBySlug(storeRef: string, slug: string, query?: {
|
|
4049
4187
|
include_seo_metadata?: boolean;
|
|
4050
4188
|
}): Promise<Collection | null>;
|
|
@@ -4056,12 +4194,43 @@ interface CategoryQueryParams extends BaseQueryParams {
|
|
|
4056
4194
|
parent_id?: number | null;
|
|
4057
4195
|
}
|
|
4058
4196
|
|
|
4197
|
+
/**
|
|
4198
|
+
* Product categories of a store, reached through `sdk.categories`.
|
|
4199
|
+
*/
|
|
4059
4200
|
declare class CategoriesApi {
|
|
4060
4201
|
private http;
|
|
4061
4202
|
constructor(http: IHttpClient);
|
|
4203
|
+
/**
|
|
4204
|
+
* Lists categories, one page at a time.
|
|
4205
|
+
*
|
|
4206
|
+
* @param storeRef - the store's ref or handle
|
|
4207
|
+
* @param params - filters, sorting and paging
|
|
4208
|
+
* @returns A page of categories; throws {@link ApiClientError} when the API answers with an error
|
|
4209
|
+
*/
|
|
4062
4210
|
getAllPaginated(storeRef: string, params?: CategoryQueryParams): Promise<PaginatedResponse<Category>>;
|
|
4211
|
+
/**
|
|
4212
|
+
* Lists up to 1,000 categories in one call.
|
|
4213
|
+
*
|
|
4214
|
+
* @param storeRef - the store's ref or handle
|
|
4215
|
+
* @param activeOnly - `true` (the default) returns only active categories
|
|
4216
|
+
* @returns The categories; throws {@link ApiClientError} when the API answers with an error
|
|
4217
|
+
*/
|
|
4063
4218
|
getAll(storeRef: string, activeOnly?: boolean): Promise<Category[]>;
|
|
4219
|
+
/**
|
|
4220
|
+
* Gets one category by id.
|
|
4221
|
+
*
|
|
4222
|
+
* @param storeRef - the store's ref or handle
|
|
4223
|
+
* @param categoryId - the category id
|
|
4224
|
+
* @returns The category, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4225
|
+
*/
|
|
4064
4226
|
getById(storeRef: string, categoryId: number): Promise<Category | null>;
|
|
4227
|
+
/**
|
|
4228
|
+
* Gets one category by slug.
|
|
4229
|
+
*
|
|
4230
|
+
* @param storeRef - the store's ref or handle
|
|
4231
|
+
* @param slug - the category slug
|
|
4232
|
+
* @returns The category, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4233
|
+
*/
|
|
4065
4234
|
getBySlug(storeRef: string, slug: string): Promise<Category | null>;
|
|
4066
4235
|
}
|
|
4067
4236
|
|
|
@@ -4125,25 +4294,72 @@ interface UpdateCartItemRequest {
|
|
|
4125
4294
|
quantity: number;
|
|
4126
4295
|
}
|
|
4127
4296
|
|
|
4297
|
+
/**
|
|
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
|
+
*/
|
|
4128
4300
|
declare class CartApi {
|
|
4129
4301
|
private publicHttp;
|
|
4130
4302
|
private authHttp;
|
|
4131
4303
|
constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
|
|
4132
4304
|
private client;
|
|
4133
4305
|
private basePath;
|
|
4306
|
+
/**
|
|
4307
|
+
* Gets the shopper's cart.
|
|
4308
|
+
*
|
|
4309
|
+
* @param storeRef - the store's ref or handle
|
|
4310
|
+
* @param sessionId - the guest cart session id
|
|
4311
|
+
* @param isAuth - `true` for the signed-in customer's cart, `false` for the guest cart
|
|
4312
|
+
* @returns The cart, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4313
|
+
*/
|
|
4134
4314
|
getCart(storeRef: string, sessionId: string, isAuth: boolean): Promise<CartApiResponse | null>;
|
|
4315
|
+
/**
|
|
4316
|
+
* Adds a product variant to the cart.
|
|
4317
|
+
*
|
|
4318
|
+
* @param storeRef - the store's ref or handle
|
|
4319
|
+
* @param data - the variant and the quantity
|
|
4320
|
+
* @param sessionId - the guest cart session id
|
|
4321
|
+
* @param isAuth - `true` for the signed-in customer's cart, `false` for the guest cart
|
|
4322
|
+
* @returns The cart id and the added item; throws {@link ApiClientError} when the API answers with an error
|
|
4323
|
+
*/
|
|
4135
4324
|
addItem(storeRef: string, data: AddToCartRequest, sessionId: string, isAuth: boolean): Promise<{
|
|
4136
4325
|
cart_id: string;
|
|
4137
4326
|
item: CartApiItem;
|
|
4138
4327
|
}>;
|
|
4328
|
+
/**
|
|
4329
|
+
* Changes the quantity of a cart line.
|
|
4330
|
+
*
|
|
4331
|
+
* @param storeRef - the store's ref or handle
|
|
4332
|
+
* @param itemId - the cart line id
|
|
4333
|
+
* @param data - the new quantity
|
|
4334
|
+
* @param sessionId - the guest cart session id
|
|
4335
|
+
* @param isAuth - `true` for the signed-in customer's cart, `false` for the guest cart
|
|
4336
|
+
* @returns The cart id and the updated item (`null` when the line was removed); throws {@link ApiClientError} when the API answers with an error
|
|
4337
|
+
*/
|
|
4139
4338
|
updateItem(storeRef: string, itemId: string, data: UpdateCartItemRequest, sessionId: string, isAuth: boolean): Promise<{
|
|
4140
4339
|
cart_id: string;
|
|
4141
4340
|
item: CartApiItem | null;
|
|
4142
4341
|
}>;
|
|
4342
|
+
/**
|
|
4343
|
+
* Removes a line from the cart.
|
|
4344
|
+
*
|
|
4345
|
+
* @param storeRef - the store's ref or handle
|
|
4346
|
+
* @param itemId - the cart line id
|
|
4347
|
+
* @param sessionId - the guest cart session id
|
|
4348
|
+
* @param isAuth - `true` for the signed-in customer's cart, `false` for the guest cart
|
|
4349
|
+
* @returns The cart id and the removed line's id; throws {@link ApiClientError} when the API answers with an error
|
|
4350
|
+
*/
|
|
4143
4351
|
removeItem(storeRef: string, itemId: string, sessionId: string, isAuth: boolean): Promise<{
|
|
4144
4352
|
cartId: string;
|
|
4145
4353
|
itemId: string;
|
|
4146
4354
|
}>;
|
|
4355
|
+
/**
|
|
4356
|
+
* Empties the cart.
|
|
4357
|
+
*
|
|
4358
|
+
* @param storeRef - the store's ref or handle
|
|
4359
|
+
* @param sessionId - the guest cart session id
|
|
4360
|
+
* @param isAuth - `true` for the signed-in customer's cart, `false` for the guest cart
|
|
4361
|
+
* @returns The cart id; throws {@link ApiClientError} when the API answers with an error
|
|
4362
|
+
*/
|
|
4147
4363
|
clear(storeRef: string, sessionId: string, isAuth: boolean): Promise<{
|
|
4148
4364
|
cart_id: string;
|
|
4149
4365
|
}>;
|
|
@@ -4245,6 +4461,9 @@ interface GuestOrderLookupParams {
|
|
|
4245
4461
|
customer_phone?: string;
|
|
4246
4462
|
}
|
|
4247
4463
|
|
|
4464
|
+
/**
|
|
4465
|
+
* Placing orders, and reading them back as a guest or as the signed-in customer, reached through `sdk.orders`.
|
|
4466
|
+
*/
|
|
4248
4467
|
declare class OrdersApi {
|
|
4249
4468
|
private publicHttp;
|
|
4250
4469
|
private authHttp;
|
|
@@ -4255,7 +4474,22 @@ declare class OrdersApi {
|
|
|
4255
4474
|
* the same way. Returns null for "not found".
|
|
4256
4475
|
*/
|
|
4257
4476
|
lookupGuest(storeRef: string, params: GuestOrderLookupParams): Promise<OrderWithItems | null>;
|
|
4477
|
+
/**
|
|
4478
|
+
* Places an order.
|
|
4479
|
+
*
|
|
4480
|
+
* @param storeRef - the store's ref or handle
|
|
4481
|
+
* @param data - the order details
|
|
4482
|
+
* @param isAuth - `true` to place it as the signed-in customer, `false` as a guest
|
|
4483
|
+
* @returns The created order with its items; throws {@link ApiClientError} when the API answers with an error
|
|
4484
|
+
*/
|
|
4258
4485
|
create(storeRef: string, data: CreateOrderRequest, isAuth: boolean): Promise<OrderWithItems>;
|
|
4486
|
+
/**
|
|
4487
|
+
* Lists the signed-in customer's orders, newest first by default.
|
|
4488
|
+
*
|
|
4489
|
+
* @param storeRef - the store's ref or handle
|
|
4490
|
+
* @param params - search, status filter, sorting and paging (`page`, or `limit` and `offset`)
|
|
4491
|
+
* @returns A page of orders; throws {@link ApiClientError} when the API answers with an error
|
|
4492
|
+
*/
|
|
4259
4493
|
listCustomerOrders(storeRef: string, params?: Partial<CustomerOrderFilter> & {
|
|
4260
4494
|
page?: number;
|
|
4261
4495
|
}): Promise<PaginatedResponse<Order>>;
|
|
@@ -4299,20 +4533,74 @@ interface BlogTagQueryParams extends BaseQueryParams {
|
|
|
4299
4533
|
include_post_counts?: boolean;
|
|
4300
4534
|
}
|
|
4301
4535
|
|
|
4536
|
+
/**
|
|
4537
|
+
* Published blog posts, categories, tags and comments of a store, reached through `sdk.blog`.
|
|
4538
|
+
*/
|
|
4302
4539
|
declare class BlogApi {
|
|
4303
4540
|
private publicHttp;
|
|
4304
4541
|
private authHttp;
|
|
4305
4542
|
constructor(publicHttp: IHttpClient, authHttp: IHttpClient);
|
|
4543
|
+
/**
|
|
4544
|
+
* Lists published blog posts.
|
|
4545
|
+
*
|
|
4546
|
+
* @param storeRef - the store's ref or handle
|
|
4547
|
+
* @param query - filters, sorting and paging
|
|
4548
|
+
* @returns A page of posts; throws {@link ApiClientError} when the API answers with an error
|
|
4549
|
+
*/
|
|
4306
4550
|
getPosts(storeRef: string, query?: Partial<BlogPostQueryParams>): Promise<PaginatedResponse<BlogPost>>;
|
|
4551
|
+
/**
|
|
4552
|
+
* Gets one published blog post by its slug.
|
|
4553
|
+
*
|
|
4554
|
+
* @param storeRef - the store's ref or handle
|
|
4555
|
+
* @param slug - the post slug
|
|
4556
|
+
* @param options - `incrementView` counts a view; `include_seo_metadata` and `include_products` add those fields
|
|
4557
|
+
* @returns The post, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4558
|
+
*/
|
|
4307
4559
|
getPostBySlug(storeRef: string, slug: string, options?: {
|
|
4308
4560
|
incrementView?: boolean;
|
|
4309
4561
|
include_seo_metadata?: boolean;
|
|
4310
4562
|
include_products?: boolean;
|
|
4311
4563
|
}): Promise<BlogPost | null>;
|
|
4564
|
+
/**
|
|
4565
|
+
* Lists blog categories.
|
|
4566
|
+
*
|
|
4567
|
+
* @param storeRef - the store's ref or handle
|
|
4568
|
+
* @param query - filters and paging
|
|
4569
|
+
* @returns A page of categories; throws {@link ApiClientError} when the API answers with an error
|
|
4570
|
+
*/
|
|
4312
4571
|
getCategories(storeRef: string, query?: BlogCategoryQueryParams): Promise<PaginatedResponse<BlogCategory>>;
|
|
4572
|
+
/**
|
|
4573
|
+
* Lists blog tags.
|
|
4574
|
+
*
|
|
4575
|
+
* @param storeRef - the store's ref or handle
|
|
4576
|
+
* @param query - filters and paging
|
|
4577
|
+
* @returns A page of tags; throws {@link ApiClientError} when the API answers with an error
|
|
4578
|
+
*/
|
|
4313
4579
|
getTags(storeRef: string, query?: BlogTagQueryParams): Promise<PaginatedResponse<BlogTag>>;
|
|
4580
|
+
/**
|
|
4581
|
+
* Lists the approved comments of a post, as an anonymous visitor.
|
|
4582
|
+
*
|
|
4583
|
+
* @param storeRef - the store's ref or handle
|
|
4584
|
+
* @param postId - the post id
|
|
4585
|
+
* @returns The comments; throws {@link ApiClientError} when the API answers with an error
|
|
4586
|
+
*/
|
|
4314
4587
|
getPostComments(storeRef: string, postId: number): Promise<any[]>;
|
|
4588
|
+
/**
|
|
4589
|
+
* Lists the approved comments of a post, sending the signed-in customer's credentials.
|
|
4590
|
+
*
|
|
4591
|
+
* @param storeRef - the store's ref or handle
|
|
4592
|
+
* @param postId - the post id
|
|
4593
|
+
* @returns The comments; throws {@link ApiClientError} when the API answers with an error
|
|
4594
|
+
*/
|
|
4315
4595
|
getPostCommentsAuth(storeRef: string, postId: number): Promise<any[]>;
|
|
4596
|
+
/**
|
|
4597
|
+
* Submits a comment on a post, as the signed-in customer. It may wait for moderation.
|
|
4598
|
+
*
|
|
4599
|
+
* @param storeRef - the store's ref or handle
|
|
4600
|
+
* @param postId - the post id
|
|
4601
|
+
* @param data - the author name, the text, and optionally a website and the parent comment id
|
|
4602
|
+
* @returns The created comment; throws {@link ApiClientError} when the API answers with an error
|
|
4603
|
+
*/
|
|
4316
4604
|
submitComment(storeRef: string, postId: number, data: {
|
|
4317
4605
|
author_name: string;
|
|
4318
4606
|
content: string;
|
|
@@ -4368,14 +4656,31 @@ type StoreByDomainInfo = StoreConfigurationInfo & {
|
|
|
4368
4656
|
store_preview_token?: string | null;
|
|
4369
4657
|
};
|
|
4370
4658
|
|
|
4659
|
+
/**
|
|
4660
|
+
* Looking up a store and its public configuration, reached through `sdk.stores`.
|
|
4661
|
+
*/
|
|
4371
4662
|
declare class StoresApi {
|
|
4372
4663
|
private http;
|
|
4373
4664
|
constructor(http: IHttpClient);
|
|
4665
|
+
/**
|
|
4666
|
+
* Gets a store's public information, by default with its configuration, settings and embedded scripts.
|
|
4667
|
+
*
|
|
4668
|
+
* @param storeRef - the store's ref or handle
|
|
4669
|
+
* @param options - set `includeConfig`, `includeSettings` or `includeEmbeddedScripts` to `false` to leave that part out
|
|
4670
|
+
* @param requestOptions - extra request options, passed to the HTTP client only when given
|
|
4671
|
+
* @returns The store information, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4672
|
+
*/
|
|
4374
4673
|
getById(storeRef: string, options?: {
|
|
4375
4674
|
includeConfig?: boolean;
|
|
4376
4675
|
includeSettings?: boolean;
|
|
4377
4676
|
includeEmbeddedScripts?: boolean;
|
|
4378
4677
|
}, requestOptions?: RequestOptions): Promise<StoreConfigurationInfo | null>;
|
|
4678
|
+
/**
|
|
4679
|
+
* Gets a store by its subdomain.
|
|
4680
|
+
*
|
|
4681
|
+
* @param subdomain - the store's subdomain
|
|
4682
|
+
* @returns The store, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
4683
|
+
*/
|
|
4379
4684
|
getBySubdomain(subdomain: string): Promise<Store | null>;
|
|
4380
4685
|
/**
|
|
4381
4686
|
* The store `domain` serves. `options` (e.g. an `x-store-preview` header,
|
|
@@ -4384,6 +4689,9 @@ declare class StoresApi {
|
|
|
4384
4689
|
getByDomain(domain: string, options?: RequestOptions): Promise<StoreByDomainInfo | null>;
|
|
4385
4690
|
}
|
|
4386
4691
|
|
|
4692
|
+
/**
|
|
4693
|
+
* Theme previews opened from the dashboard, reached through `sdk.themes`.
|
|
4694
|
+
*/
|
|
4387
4695
|
declare class ThemesApi {
|
|
4388
4696
|
private http;
|
|
4389
4697
|
constructor(http: IHttpClient);
|
|
@@ -4407,6 +4715,9 @@ interface MetaobjectListResult {
|
|
|
4407
4715
|
next_cursor: string | null;
|
|
4408
4716
|
}
|
|
4409
4717
|
|
|
4718
|
+
/**
|
|
4719
|
+
* Custom structured content (metaobject entries) a store publishes, reached through `sdk.metaobjects`.
|
|
4720
|
+
*/
|
|
4410
4721
|
declare class MetaobjectsApi {
|
|
4411
4722
|
private publicHttp;
|
|
4412
4723
|
private authHttp;
|
|
@@ -4650,11 +4961,35 @@ type CategorySearchResponse = z.infer<typeof categorySearchResponseSchema>;
|
|
|
4650
4961
|
type BlogSearchParams = z.infer<typeof searchBlogParamsSchema>;
|
|
4651
4962
|
type BlogSearchResponse = z.infer<typeof blogSearchResponseSchema>;
|
|
4652
4963
|
|
|
4964
|
+
/**
|
|
4965
|
+
* Search over a store's products and blog posts, reached through `sdk.search`.
|
|
4966
|
+
*/
|
|
4653
4967
|
declare class SearchApi {
|
|
4654
4968
|
private http;
|
|
4655
4969
|
constructor(http: IHttpClient);
|
|
4970
|
+
/**
|
|
4971
|
+
* Searches products.
|
|
4972
|
+
*
|
|
4973
|
+
* @param storeRef - the store's ref or handle
|
|
4974
|
+
* @param params - the query, filters and paging
|
|
4975
|
+
* @returns The matching products; throws {@link ApiClientError} when the API answers with an error
|
|
4976
|
+
*/
|
|
4656
4977
|
searchCatalog(storeRef: string, params: ProductSearchParams): Promise<ProductSearchResponse>;
|
|
4978
|
+
/**
|
|
4979
|
+
* Suggests product matches while the shopper is typing.
|
|
4980
|
+
*
|
|
4981
|
+
* @param storeRef - the store's ref or handle
|
|
4982
|
+
* @param params - the partial query and the suggestion limit
|
|
4983
|
+
* @returns The suggestions; throws {@link ApiClientError} when the API answers with an error
|
|
4984
|
+
*/
|
|
4657
4985
|
autocompleteCatalog<T>(storeRef: string, params: AutocompleteParams): Promise<T>;
|
|
4986
|
+
/**
|
|
4987
|
+
* Searches published blog posts.
|
|
4988
|
+
*
|
|
4989
|
+
* @param storeRef - the store's ref or handle
|
|
4990
|
+
* @param params - the query and paging
|
|
4991
|
+
* @returns The matching posts; throws {@link ApiClientError} when the API answers with an error
|
|
4992
|
+
*/
|
|
4658
4993
|
searchBlog(storeRef: string, params: BlogSearchParams): Promise<BlogSearchResponse>;
|
|
4659
4994
|
}
|
|
4660
4995
|
|
|
@@ -4777,6 +5112,9 @@ interface ShippingQuoteChangedDetails {
|
|
|
4777
5112
|
options: ShippingOption[];
|
|
4778
5113
|
}
|
|
4779
5114
|
|
|
5115
|
+
/**
|
|
5116
|
+
* Shipping areas and shipping rates for a store, reached through `sdk.shipping`.
|
|
5117
|
+
*/
|
|
4780
5118
|
declare class ShippingApi {
|
|
4781
5119
|
private http;
|
|
4782
5120
|
constructor(http: IHttpClient);
|
|
@@ -4786,6 +5124,13 @@ declare class ShippingApi {
|
|
|
4786
5124
|
* Vietnam is 3,355 rows and about 900 KB. Prefer a filter.
|
|
4787
5125
|
*/
|
|
4788
5126
|
listLocationAreas(storeRef: string, query?: LocationAreaQuery): Promise<LocationAreasResponse>;
|
|
5127
|
+
/**
|
|
5128
|
+
* Works out the shipping options and prices for a cart and a destination.
|
|
5129
|
+
*
|
|
5130
|
+
* @param storeRef - the store's ref or handle
|
|
5131
|
+
* @param data - the destination and the cart contents
|
|
5132
|
+
* @returns The available shipping options; throws {@link ApiClientError} when the API answers with an error
|
|
5133
|
+
*/
|
|
4789
5134
|
calculate(storeRef: string, data: ShippingCalculationRequest): Promise<ShippingOption[]>;
|
|
4790
5135
|
}
|
|
4791
5136
|
|
|
@@ -4835,10 +5180,27 @@ interface PromotionSuggestionsResponse {
|
|
|
4835
5180
|
promotions: PromotionSuggestion[];
|
|
4836
5181
|
}
|
|
4837
5182
|
|
|
5183
|
+
/**
|
|
5184
|
+
* Promotion codes and offers of a store, reached through `sdk.promotions`.
|
|
5185
|
+
*/
|
|
4838
5186
|
declare class PromotionsApi {
|
|
4839
5187
|
private http;
|
|
4840
5188
|
constructor(http: IHttpClient);
|
|
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
|
+
*/
|
|
4841
5196
|
validate(storeRef: string, data: ValidatePromotionCodeRequest): Promise<ValidatePromotionCodeResponse>;
|
|
5197
|
+
/**
|
|
5198
|
+
* Lists promotions the shopper could use, optionally for a given cart subtotal.
|
|
5199
|
+
*
|
|
5200
|
+
* @param storeRef - the store's ref or handle
|
|
5201
|
+
* @param subtotal - the cart subtotal in the store's currency
|
|
5202
|
+
* @returns The suggested promotions; throws {@link ApiClientError} when the API answers with an error
|
|
5203
|
+
*/
|
|
4842
5204
|
getSuggestions(storeRef: string, subtotal?: number): Promise<PromotionSuggestionsResponse>;
|
|
4843
5205
|
}
|
|
4844
5206
|
|
|
@@ -4867,9 +5229,18 @@ interface PaymentMethod {
|
|
|
4867
5229
|
provider_code?: string | null;
|
|
4868
5230
|
}
|
|
4869
5231
|
|
|
5232
|
+
/**
|
|
5233
|
+
* The payment methods a store accepts, reached through `sdk.paymentMethods`.
|
|
5234
|
+
*/
|
|
4870
5235
|
declare class PaymentMethodsApi {
|
|
4871
5236
|
private http;
|
|
4872
5237
|
constructor(http: IHttpClient);
|
|
5238
|
+
/**
|
|
5239
|
+
* Lists the payment methods the store has turned on.
|
|
5240
|
+
*
|
|
5241
|
+
* @param storeRef - the store's ref or handle
|
|
5242
|
+
* @returns The enabled payment methods; throws {@link ApiClientError} when the API answers with an error
|
|
5243
|
+
*/
|
|
4873
5244
|
getEnabled(storeRef: string): Promise<PaymentMethod[]>;
|
|
4874
5245
|
}
|
|
4875
5246
|
|
|
@@ -4975,13 +5346,55 @@ interface BatchOrderReviewInvitationsResult {
|
|
|
4975
5346
|
[order_number: string]: OrderReviewInvitationSummary[];
|
|
4976
5347
|
}
|
|
4977
5348
|
|
|
5349
|
+
/**
|
|
5350
|
+
* Product reviews and the invitations that ask customers to write them, reached through `sdk.reviews`.
|
|
5351
|
+
*/
|
|
4978
5352
|
declare class ReviewsApi {
|
|
4979
5353
|
private http;
|
|
4980
5354
|
constructor(http: IHttpClient);
|
|
5355
|
+
/**
|
|
5356
|
+
* Lists the published reviews of a product.
|
|
5357
|
+
*
|
|
5358
|
+
* @param storeRef - the store's ref or handle
|
|
5359
|
+
* @param productId - the product id
|
|
5360
|
+
* @param query - filters and paging
|
|
5361
|
+
* @returns A page of reviews; throws {@link ApiClientError} when the API answers with an error
|
|
5362
|
+
*/
|
|
4981
5363
|
getProductReviews(storeRef: string, productId: string | number, query?: Omit<ProductReviewFilters, "product_id">): Promise<PaginatedReviewsResponse>;
|
|
5364
|
+
/**
|
|
5365
|
+
* Gets the public details behind a review invitation link.
|
|
5366
|
+
*
|
|
5367
|
+
* @param storeRef - the store's ref or handle
|
|
5368
|
+
* @param token - the token from the invitation link
|
|
5369
|
+
* @returns The invitation details; throws {@link ApiClientError} when the API answers with an error
|
|
5370
|
+
*/
|
|
4982
5371
|
getReviewInvitation(storeRef: string, token: string): Promise<ReviewInvitationPublicData>;
|
|
5372
|
+
/**
|
|
5373
|
+
* Lists the review invitations for one order.
|
|
5374
|
+
*
|
|
5375
|
+
* @param storeRef - the store's ref or handle
|
|
5376
|
+
* @param orderNumber - the order number
|
|
5377
|
+
* @param email - the email address on the order
|
|
5378
|
+
* @returns The invitation summaries; throws {@link ApiClientError} when the API answers with an error
|
|
5379
|
+
*/
|
|
4983
5380
|
getOrderReviewInvitations(storeRef: string, orderNumber: number | string, email: string): Promise<OrderReviewInvitationSummary[]>;
|
|
5381
|
+
/**
|
|
5382
|
+
* Lists the review invitations for several orders at once.
|
|
5383
|
+
*
|
|
5384
|
+
* @param storeRef - the store's ref or handle
|
|
5385
|
+
* @param orderNumbers - the order numbers
|
|
5386
|
+
* @param email - the email address on the orders
|
|
5387
|
+
* @returns The invitations grouped by order; throws {@link ApiClientError} when the API answers with an error
|
|
5388
|
+
*/
|
|
4984
5389
|
getBatchOrderReviewInvitations(storeRef: string, orderNumbers: (number | string)[], email: string): Promise<BatchOrderReviewInvitationsResult>;
|
|
5390
|
+
/**
|
|
5391
|
+
* Submits a review through an invitation link.
|
|
5392
|
+
*
|
|
5393
|
+
* @param storeRef - the store's ref or handle
|
|
5394
|
+
* @param token - the token from the invitation link
|
|
5395
|
+
* @param payload - the rating and review text
|
|
5396
|
+
* @returns The API's answer; throws {@link ApiClientError} when the API answers with an error
|
|
5397
|
+
*/
|
|
4985
5398
|
submitReviewInvitation(storeRef: string, token: string, payload: SubmitReviewInvitationPayload): Promise<any>;
|
|
4986
5399
|
}
|
|
4987
5400
|
|
|
@@ -5011,9 +5424,19 @@ interface UpsertCustomerForAuthPayload {
|
|
|
5011
5424
|
avatar_url?: string | null;
|
|
5012
5425
|
}
|
|
5013
5426
|
|
|
5427
|
+
/**
|
|
5428
|
+
* The signed-in customer's profile record, reached through `sdk.customers`.
|
|
5429
|
+
*/
|
|
5014
5430
|
declare class CustomersApi {
|
|
5015
5431
|
private http;
|
|
5016
5432
|
constructor(http: IHttpClient);
|
|
5433
|
+
/**
|
|
5434
|
+
* Creates the customer record for a newly signed-in user, or updates it when it exists.
|
|
5435
|
+
*
|
|
5436
|
+
* @param storeRef - the store's ref or handle
|
|
5437
|
+
* @param payload - the identity fields to store
|
|
5438
|
+
* @returns The customer, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5439
|
+
*/
|
|
5017
5440
|
upsertForAuth(storeRef: string, payload: UpsertCustomerForAuthPayload): Promise<ApiResponse<Customer>>;
|
|
5018
5441
|
/** The signed-in customer's metafields with customer access (spec §6.6). */
|
|
5019
5442
|
getMetafields(storeRef: string): Promise<StorefrontMetafields>;
|
|
@@ -5061,14 +5484,59 @@ interface CreateAddressDto {
|
|
|
5061
5484
|
interface UpdateAddressDto extends Partial<CreateAddressDto> {
|
|
5062
5485
|
}
|
|
5063
5486
|
|
|
5487
|
+
/**
|
|
5488
|
+
* Saved delivery addresses of the signed-in customer, reached through `sdk.addresses`.
|
|
5489
|
+
*/
|
|
5064
5490
|
declare class AddressesApi {
|
|
5065
5491
|
private http;
|
|
5066
5492
|
constructor(http: IHttpClient);
|
|
5493
|
+
/**
|
|
5494
|
+
* Lists the signed-in customer's saved addresses.
|
|
5495
|
+
*
|
|
5496
|
+
* @param storeRef - the store's ref or handle
|
|
5497
|
+
* @returns The addresses, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
5498
|
+
*/
|
|
5067
5499
|
list(storeRef: string): Promise<Address[] | null>;
|
|
5500
|
+
/**
|
|
5501
|
+
* Gets one of the signed-in customer's saved addresses.
|
|
5502
|
+
*
|
|
5503
|
+
* @param storeRef - the store's ref or handle
|
|
5504
|
+
* @param addressId - the address id
|
|
5505
|
+
* @returns The address, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
5506
|
+
*/
|
|
5068
5507
|
getById(storeRef: string, addressId: number): Promise<Address | null>;
|
|
5508
|
+
/**
|
|
5509
|
+
* Saves a new address for the signed-in customer.
|
|
5510
|
+
*
|
|
5511
|
+
* @param storeRef - the store's ref or handle
|
|
5512
|
+
* @param data - the address fields
|
|
5513
|
+
* @returns The created address, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
5514
|
+
*/
|
|
5069
5515
|
create(storeRef: string, data: CreateAddressDto): Promise<Address | null>;
|
|
5516
|
+
/**
|
|
5517
|
+
* Updates one of the signed-in customer's saved addresses.
|
|
5518
|
+
*
|
|
5519
|
+
* @param storeRef - the store's ref or handle
|
|
5520
|
+
* @param addressId - the address id
|
|
5521
|
+
* @param data - the fields to change
|
|
5522
|
+
* @returns The updated address, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
5523
|
+
*/
|
|
5070
5524
|
update(storeRef: string, addressId: number, data: UpdateAddressDto): Promise<Address | null>;
|
|
5525
|
+
/**
|
|
5526
|
+
* Deletes one of the signed-in customer's saved addresses.
|
|
5527
|
+
*
|
|
5528
|
+
* @param storeRef - the store's ref or handle
|
|
5529
|
+
* @param addressId - the address id
|
|
5530
|
+
* @returns `true` when the API accepted the deletion, `false` otherwise; it does not throw
|
|
5531
|
+
*/
|
|
5071
5532
|
delete(storeRef: string, addressId: number): Promise<boolean>;
|
|
5533
|
+
/**
|
|
5534
|
+
* Makes a saved address the customer's default.
|
|
5535
|
+
*
|
|
5536
|
+
* @param storeRef - the store's ref or handle
|
|
5537
|
+
* @param addressId - the address id
|
|
5538
|
+
* @returns The updated address, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
5539
|
+
*/
|
|
5072
5540
|
setDefault(storeRef: string, addressId: number): Promise<Address | null>;
|
|
5073
5541
|
}
|
|
5074
5542
|
|
|
@@ -5081,10 +5549,27 @@ interface WithSeoMetadata {
|
|
|
5081
5549
|
}
|
|
5082
5550
|
type ContentPage = ContentPage$1 & WithSeoMetadata & WithMetafields;
|
|
5083
5551
|
|
|
5552
|
+
/**
|
|
5553
|
+
* Static content pages of a store, such as About or Shipping policy, reached through `sdk.contentPages`.
|
|
5554
|
+
*/
|
|
5084
5555
|
declare class ContentPagesApi {
|
|
5085
5556
|
private http;
|
|
5086
5557
|
constructor(http: IHttpClient);
|
|
5558
|
+
/**
|
|
5559
|
+
* Lists the published content pages.
|
|
5560
|
+
*
|
|
5561
|
+
* @param storeRef - the store's ref or handle
|
|
5562
|
+
* @returns A page of content pages; throws {@link ApiClientError} when the API answers with an error
|
|
5563
|
+
*/
|
|
5087
5564
|
getPublished(storeRef: string): Promise<PaginatedResponse<ContentPage>>;
|
|
5565
|
+
/**
|
|
5566
|
+
* Gets one published content page by slug.
|
|
5567
|
+
*
|
|
5568
|
+
* @param storeRef - the store's ref or handle
|
|
5569
|
+
* @param slug - the page slug
|
|
5570
|
+
* @param query - `include_seo_metadata` adds the SEO fields
|
|
5571
|
+
* @returns The page; throws {@link ApiClientError} when the API answers with an error
|
|
5572
|
+
*/
|
|
5088
5573
|
getBySlug(storeRef: string, slug: string, query?: {
|
|
5089
5574
|
include_seo_metadata?: boolean;
|
|
5090
5575
|
}): Promise<ContentPage>;
|
|
@@ -5115,9 +5600,20 @@ type StoreMenu = {
|
|
|
5115
5600
|
menu_items?: StoreMenuItem[];
|
|
5116
5601
|
};
|
|
5117
5602
|
|
|
5603
|
+
/**
|
|
5604
|
+
* Navigation menus of a store, reached through `sdk.menus`.
|
|
5605
|
+
*/
|
|
5118
5606
|
declare class MenusApi {
|
|
5119
5607
|
private http;
|
|
5120
5608
|
constructor(http: IHttpClient);
|
|
5609
|
+
/**
|
|
5610
|
+
* Gets a navigation menu by its ref.
|
|
5611
|
+
*
|
|
5612
|
+
* @param storeRef - the store's ref or handle
|
|
5613
|
+
* @param ref - the menu ref
|
|
5614
|
+
* @param includeItems - `true` (the default) includes the menu items
|
|
5615
|
+
* @returns The menu, or `null` when it is not found; throws {@link ApiClientError} on any other API error
|
|
5616
|
+
*/
|
|
5121
5617
|
getByRef(storeRef: string, ref: string, includeItems?: boolean): Promise<StoreMenu | null>;
|
|
5122
5618
|
}
|
|
5123
5619
|
|
|
@@ -5133,6 +5629,9 @@ interface UrlRedirect {
|
|
|
5133
5629
|
updated_at: string;
|
|
5134
5630
|
}
|
|
5135
5631
|
|
|
5632
|
+
/**
|
|
5633
|
+
* URL redirects a store has set up, reached through `sdk.redirects`.
|
|
5634
|
+
*/
|
|
5136
5635
|
declare class RedirectsApi {
|
|
5137
5636
|
private http;
|
|
5138
5637
|
constructor(http: IHttpClient);
|
|
@@ -5271,7 +5770,19 @@ declare class AuthApi {
|
|
|
5271
5770
|
private auth;
|
|
5272
5771
|
/** Never returns tokens: a new email and an existing one respond identically. */
|
|
5273
5772
|
register(payload: RegisterPayload): Promise<ApiResponse<RegisterResult>>;
|
|
5773
|
+
/**
|
|
5774
|
+
* Signs a customer in with email and password.
|
|
5775
|
+
*
|
|
5776
|
+
* @param payload - the login credentials
|
|
5777
|
+
* @returns The auth result with the token pair, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5778
|
+
*/
|
|
5274
5779
|
login(payload: LoginPayload): Promise<ApiResponse<AuthResult>>;
|
|
5780
|
+
/**
|
|
5781
|
+
* Exchanges a refresh token for a new token pair. The old refresh token stops working.
|
|
5782
|
+
*
|
|
5783
|
+
* @param refresh_token - the customer's current refresh token
|
|
5784
|
+
* @returns The new token pair, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5785
|
+
*/
|
|
5275
5786
|
refresh(refresh_token: string): Promise<ApiResponse<AuthResult>>;
|
|
5276
5787
|
/**
|
|
5277
5788
|
* `binding` is the register response's `verification_binding`, when this
|
|
@@ -5279,22 +5790,100 @@ declare class AuthApi {
|
|
|
5279
5790
|
* set at registration is dropped.
|
|
5280
5791
|
*/
|
|
5281
5792
|
verifyEmail(token: string, binding?: string): Promise<ApiResponse<VerifiedResult>>;
|
|
5793
|
+
/**
|
|
5794
|
+
* Sends the email-verification message again.
|
|
5795
|
+
*
|
|
5796
|
+
* @param email - the address to verify
|
|
5797
|
+
* @returns The send result, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5798
|
+
*/
|
|
5282
5799
|
resendVerification(email: string): Promise<ApiResponse<SentResult>>;
|
|
5800
|
+
/**
|
|
5801
|
+
* Starts a password reset by emailing a reset link.
|
|
5802
|
+
*
|
|
5803
|
+
* @param email - the account's email address
|
|
5804
|
+
* @returns The send result, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5805
|
+
*/
|
|
5283
5806
|
forgotPassword(email: string): Promise<ApiResponse<SentResult>>;
|
|
5807
|
+
/**
|
|
5808
|
+
* Sets a new password using the token from the reset email.
|
|
5809
|
+
*
|
|
5810
|
+
* @param payload - the reset token and the new password
|
|
5811
|
+
* @returns The reset result, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5812
|
+
*/
|
|
5284
5813
|
resetPassword(payload: ResetPasswordPayload): Promise<ApiResponse<ResetResult>>;
|
|
5285
5814
|
/** `binding` is the change-email response's `confirmation_binding`. */
|
|
5286
5815
|
confirmEmailChange(token: string, binding?: string): Promise<ApiResponse<ChangedResult>>;
|
|
5816
|
+
/**
|
|
5817
|
+
* Emails a one-time sign-in code.
|
|
5818
|
+
*
|
|
5819
|
+
* @param email - the account's email address
|
|
5820
|
+
* @returns The send result, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5821
|
+
*/
|
|
5287
5822
|
requestOtp(email: string): Promise<ApiResponse<SentResult>>;
|
|
5823
|
+
/**
|
|
5824
|
+
* Signs a customer in with the one-time code from the email.
|
|
5825
|
+
*
|
|
5826
|
+
* @param payload - the email and the code
|
|
5827
|
+
* @returns The auth result with the token pair, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5828
|
+
*/
|
|
5288
5829
|
verifyOtp(payload: VerifyOtpPayload): Promise<ApiResponse<AuthResult>>;
|
|
5830
|
+
/**
|
|
5831
|
+
* Starts an anonymous (guest) session.
|
|
5832
|
+
*
|
|
5833
|
+
* @returns The auth result with the token pair, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5834
|
+
*/
|
|
5289
5835
|
anonymous(): Promise<ApiResponse<AuthResult>>;
|
|
5836
|
+
/**
|
|
5837
|
+
* Gets the URL that starts Google sign-in.
|
|
5838
|
+
*
|
|
5839
|
+
* @param redirect_to - where to send the customer after sign-in, `/` by default
|
|
5840
|
+
* @returns The Google sign-in URL, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5841
|
+
*/
|
|
5290
5842
|
getGoogleUrl(redirect_to?: string): Promise<ApiResponse<GoogleAuthUrl>>;
|
|
5843
|
+
/**
|
|
5844
|
+
* Completes Google sign-in by exchanging the authorization code.
|
|
5845
|
+
*
|
|
5846
|
+
* @param code - the authorization code Google returned
|
|
5847
|
+
* @returns The auth result with the token pair, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5848
|
+
*/
|
|
5291
5849
|
exchangeGoogleCode(code: string): Promise<ApiResponse<AuthResult>>;
|
|
5850
|
+
/**
|
|
5851
|
+
* Reads which sign-in methods this store has turned on.
|
|
5852
|
+
*
|
|
5853
|
+
* @returns The public auth configuration, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5854
|
+
*/
|
|
5292
5855
|
getAuthConfig(): Promise<ApiResponse<PublicAuthConfig>>;
|
|
5856
|
+
/**
|
|
5857
|
+
* Reads the signed-in customer's identity.
|
|
5858
|
+
*
|
|
5859
|
+
* @param access_token - the signed-in customer's access token
|
|
5860
|
+
* @returns The current identity, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5861
|
+
*/
|
|
5293
5862
|
me(access_token: string): Promise<ApiResponse<CurrentIdentity | null>>;
|
|
5294
5863
|
/** Revokes one session. The refresh token identifies which. */
|
|
5295
5864
|
logout(access_token: string, refresh_token: string): Promise<ApiResponse<unknown>>;
|
|
5865
|
+
/**
|
|
5866
|
+
* Signs the customer out of every session.
|
|
5867
|
+
*
|
|
5868
|
+
* @param access_token - the signed-in customer's access token
|
|
5869
|
+
* @returns The API's answer, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5870
|
+
*/
|
|
5296
5871
|
logoutAll(access_token: string): Promise<ApiResponse<unknown>>;
|
|
5872
|
+
/**
|
|
5873
|
+
* Changes the signed-in customer's password.
|
|
5874
|
+
*
|
|
5875
|
+
* @param access_token - the signed-in customer's access token
|
|
5876
|
+
* @param payload - the current and the new password
|
|
5877
|
+
* @returns The API's answer, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5878
|
+
*/
|
|
5297
5879
|
changePassword(access_token: string, payload: ChangePasswordPayload): Promise<ApiResponse<unknown>>;
|
|
5880
|
+
/**
|
|
5881
|
+
* Starts an email change; the new address must be confirmed from the message sent to it.
|
|
5882
|
+
*
|
|
5883
|
+
* @param access_token - the signed-in customer's access token
|
|
5884
|
+
* @param payload - the new email address and the current password
|
|
5885
|
+
* @returns The change-email result, as the raw {@link ApiResponse}; it does not throw, so check `success`
|
|
5886
|
+
*/
|
|
5298
5887
|
changeEmail(access_token: string, payload: ChangeEmailPayload): Promise<ApiResponse<ChangeEmailResult>>;
|
|
5299
5888
|
}
|
|
5300
5889
|
|
|
@@ -5314,8 +5903,21 @@ interface TokenStorage {
|
|
|
5314
5903
|
declare class MemoryTokenStorage implements TokenStorage {
|
|
5315
5904
|
private tokens;
|
|
5316
5905
|
constructor(initial?: AuthTokens | null);
|
|
5906
|
+
/**
|
|
5907
|
+
* Reads the stored token pair.
|
|
5908
|
+
*
|
|
5909
|
+
* @returns The stored tokens, or `null` when none are stored
|
|
5910
|
+
*/
|
|
5317
5911
|
get(): Promise<AuthTokens | null>;
|
|
5912
|
+
/**
|
|
5913
|
+
* Stores a token pair, replacing any earlier one.
|
|
5914
|
+
*
|
|
5915
|
+
* @param tokens - the access and refresh tokens
|
|
5916
|
+
*/
|
|
5318
5917
|
set(tokens: AuthTokens): Promise<void>;
|
|
5918
|
+
/**
|
|
5919
|
+
* Forgets the stored token pair.
|
|
5920
|
+
*/
|
|
5319
5921
|
clear(): Promise<void>;
|
|
5320
5922
|
}
|
|
5321
5923
|
|
|
@@ -5333,8 +5935,23 @@ interface Options {
|
|
|
5333
5935
|
*/
|
|
5334
5936
|
declare function createAuthAwareHttpClient(inner: IHttpClient, { storage, auth }: Options): IHttpClient;
|
|
5335
5937
|
|
|
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
|
+
/** What {@link createEcomwebSdk} needs: the two HTTP clients, and optional client info. */
|
|
5336
5951
|
interface EcomwebSdkOptions {
|
|
5952
|
+
/** Client for the public API routes, used for anonymous shoppers. */
|
|
5337
5953
|
publicHttp: IHttpClient;
|
|
5954
|
+
/** Client for the routes that need the signed-in customer's credentials. */
|
|
5338
5955
|
authHttp: IHttpClient;
|
|
5339
5956
|
/**
|
|
5340
5957
|
* Tokens put before this SDK's own in the `X-Ecomweb-Client` header
|
|
@@ -5342,6 +5959,19 @@ interface EcomwebSdkOptions {
|
|
|
5342
5959
|
*/
|
|
5343
5960
|
clientInfo?: string;
|
|
5344
5961
|
}
|
|
5962
|
+
/**
|
|
5963
|
+
* Creates the SDK client. Each property of the result is one API resource, and
|
|
5964
|
+
* each method on it makes one request to the store's API.
|
|
5965
|
+
*
|
|
5966
|
+
* @example
|
|
5967
|
+
* ```ts
|
|
5968
|
+
* const sdk = createEcomwebSdk({ publicHttp, authHttp });
|
|
5969
|
+
* const product = await sdk.products.getBySlug("my-store", "blue-shirt");
|
|
5970
|
+
* ```
|
|
5971
|
+
*
|
|
5972
|
+
* @param options - the HTTP clients, and optional client info for the `X-Ecomweb-Client` header
|
|
5973
|
+
* @returns An object with one API class per resource: `products`, `collections`, `categories`, `cart`, `orders`, `blog`, `stores`, `themes`, `metaobjects`, `search`, `shipping`, `promotions`, `paymentMethods`, `payments`, `reviews`, `customers`, `addresses`, `contentPages`, `menus` and `redirects`
|
|
5974
|
+
*/
|
|
5345
5975
|
declare function createEcomwebSdk(options: EcomwebSdkOptions): {
|
|
5346
5976
|
products: ProductsApi;
|
|
5347
5977
|
collections: CollectionsApi;
|
|
@@ -5364,6 +5994,7 @@ declare function createEcomwebSdk(options: EcomwebSdkOptions): {
|
|
|
5364
5994
|
menus: MenusApi;
|
|
5365
5995
|
redirects: RedirectsApi;
|
|
5366
5996
|
};
|
|
5997
|
+
/** The object {@link createEcomwebSdk} returns. */
|
|
5367
5998
|
type EcomwebSdk = ReturnType<typeof createEcomwebSdk>;
|
|
5368
5999
|
|
|
5369
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 };
|