lynkow 1.34.0 → 1.40.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/dist/index.d.mts +41 -28
- package/dist/index.d.ts +41 -28
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -29,6 +29,8 @@ type Cache = ReturnType<typeof createCache>;
|
|
|
29
29
|
interface InternalConfig {
|
|
30
30
|
siteId: string;
|
|
31
31
|
baseUrl: string;
|
|
32
|
+
/** Optional publishable key sent as the `X-Lynkow-Pk` header on every storefront API request. */
|
|
33
|
+
publishableKey?: string;
|
|
32
34
|
locale?: string;
|
|
33
35
|
fetchOptions: RequestInit;
|
|
34
36
|
/** Optional cache manager for caching responses */
|
|
@@ -1800,11 +1802,22 @@ interface LynkowConfig {
|
|
|
1800
1802
|
* UUID of the Lynkow site to connect to.
|
|
1801
1803
|
* Found in the admin dashboard under Site Settings.
|
|
1802
1804
|
* Must be a valid UUID v4 format (lowercase hex with dashes).
|
|
1803
|
-
*
|
|
1805
|
+
* Interpolated into the path of every request (`/storefront/:siteId/...`)
|
|
1806
|
+
* to identify the tenant. It is not sent as a header.
|
|
1804
1807
|
*
|
|
1805
1808
|
* @example '550e8400-e29b-41d4-a716-446655440000'
|
|
1806
1809
|
*/
|
|
1807
1810
|
siteId: string;
|
|
1811
|
+
/**
|
|
1812
|
+
* Optional publishable key that identifies this client to the Lynkow
|
|
1813
|
+
* storefront API. Copied from the admin dashboard under Site Settings.
|
|
1814
|
+
* It has the form `lkw_pk_` followed by 24 characters.
|
|
1815
|
+
* When set, it is sent as the `X-Lynkow-Pk` header on every storefront API request the client makes.
|
|
1816
|
+
* Optional on CMS content routes; required on future commerce routes.
|
|
1817
|
+
*
|
|
1818
|
+
* @example 'lkw_pk_9f8g7h6j5k4w3m2n1p0qrstv'
|
|
1819
|
+
*/
|
|
1820
|
+
publishableKey?: string;
|
|
1808
1821
|
/**
|
|
1809
1822
|
* Base URL of the Lynkow API.
|
|
1810
1823
|
* Must not include a trailing slash.
|
|
@@ -2382,13 +2395,13 @@ interface Category {
|
|
|
2382
2395
|
* - `'standard'`: articles use the TipTap rich text editor (stored in `Content.body`)
|
|
2383
2396
|
* - `'structured'`: articles use custom fields defined by the category's schema (stored in `Content.customData`)
|
|
2384
2397
|
*
|
|
2385
|
-
* Only present in detail responses (`GET /
|
|
2398
|
+
* Only present in detail responses (`GET /storefront/categories/:id`), not in lightweight
|
|
2386
2399
|
* list projections (e.g. when categories are embedded in content responses).
|
|
2387
2400
|
*/
|
|
2388
2401
|
contentMode?: 'standard' | 'structured';
|
|
2389
2402
|
/**
|
|
2390
2403
|
* Parent category in the hierarchy. Present when the API eagerly loads
|
|
2391
|
-
* the parent relation (e.g. `GET /
|
|
2404
|
+
* the parent relation (e.g. `GET /storefront/contents/slug/:slug` returns
|
|
2392
2405
|
* each category's parent so consumers can build a breadcrumb in a single
|
|
2393
2406
|
* request). `null` for root-level categories. `undefined` when the
|
|
2394
2407
|
* endpoint did not include parent data.
|
|
@@ -2401,7 +2414,7 @@ interface Category {
|
|
|
2401
2414
|
}
|
|
2402
2415
|
/**
|
|
2403
2416
|
* Category with URL path, description, image, and content count.
|
|
2404
|
-
* Returned by list endpoints (`GET /
|
|
2417
|
+
* Returned by list endpoints (`GET /storefront/categories`).
|
|
2405
2418
|
*
|
|
2406
2419
|
* Extends {@link Category} with display-oriented fields useful for rendering
|
|
2407
2420
|
* category listing pages, navigation menus, and sidebar widgets.
|
|
@@ -2478,7 +2491,7 @@ interface CategoryWithCount extends Category {
|
|
|
2478
2491
|
}
|
|
2479
2492
|
/**
|
|
2480
2493
|
* Full category detail with parent relationship.
|
|
2481
|
-
* Returned by single-category endpoints (`GET /
|
|
2494
|
+
* Returned by single-category endpoints (`GET /storefront/categories/:id`).
|
|
2482
2495
|
*
|
|
2483
2496
|
* Extends {@link CategoryWithCount} with the parent category reference,
|
|
2484
2497
|
* enabling you to reconstruct the category hierarchy.
|
|
@@ -2505,7 +2518,7 @@ interface CategoryDetail extends CategoryWithCount {
|
|
|
2505
2518
|
jsonLdExclusions?: string[];
|
|
2506
2519
|
}
|
|
2507
2520
|
/**
|
|
2508
|
-
* Recursive category tree node, returned by the tree endpoint (`GET /
|
|
2521
|
+
* Recursive category tree node, returned by the tree endpoint (`GET /storefront/categories/tree`).
|
|
2509
2522
|
*
|
|
2510
2523
|
* Each node contains its full {@link CategoryWithCount} data plus a `children` array
|
|
2511
2524
|
* of nested sub-categories. The tree is pre-sorted by the API.
|
|
@@ -2838,15 +2851,15 @@ interface TipTapNode {
|
|
|
2838
2851
|
type ContentBody = string;
|
|
2839
2852
|
/**
|
|
2840
2853
|
* Lightweight content representation returned in paginated list endpoints
|
|
2841
|
-
* (`GET /
|
|
2854
|
+
* (`GET /storefront/contents`).
|
|
2842
2855
|
*
|
|
2843
2856
|
* Omits the full body, SEO fields, and relations to minimize payload size.
|
|
2844
|
-
* Use `Content` (from `GET /
|
|
2857
|
+
* Use `Content` (from `GET /storefront/contents/:idOrSlug`) for the complete data.
|
|
2845
2858
|
*/
|
|
2846
2859
|
interface ContentSummary {
|
|
2847
2860
|
/**
|
|
2848
2861
|
* Unique numeric content ID. Auto-incremented.
|
|
2849
|
-
* Use this for API calls like `GET /
|
|
2862
|
+
* Use this for API calls like `GET /storefront/contents/:id`.
|
|
2850
2863
|
*/
|
|
2851
2864
|
id: number;
|
|
2852
2865
|
/**
|
|
@@ -2857,7 +2870,7 @@ interface ContentSummary {
|
|
|
2857
2870
|
/**
|
|
2858
2871
|
* URL-friendly slug, unique within the site for this locale.
|
|
2859
2872
|
* Lowercase, hyphenated (e.g. `'my-article-title'`). Max 500 characters.
|
|
2860
|
-
* Can be used instead of `id` in API calls: `GET /
|
|
2873
|
+
* Can be used instead of `id` in API calls: `GET /storefront/contents/:slug`.
|
|
2861
2874
|
*/
|
|
2862
2875
|
slug: string;
|
|
2863
2876
|
/**
|
|
@@ -2917,7 +2930,7 @@ interface ContentSummary {
|
|
|
2917
2930
|
}
|
|
2918
2931
|
/**
|
|
2919
2932
|
* Full content item with body, SEO metadata, structured data, and relations.
|
|
2920
|
-
* Returned by single-content endpoints (`GET /
|
|
2933
|
+
* Returned by single-content endpoints (`GET /storefront/contents/:idOrSlug`).
|
|
2921
2934
|
*
|
|
2922
2935
|
* Extends {@link ContentSummary} with all the fields omitted from list responses.
|
|
2923
2936
|
*/
|
|
@@ -3187,19 +3200,19 @@ interface Alternate {
|
|
|
3187
3200
|
* Lightweight page representation returned in list endpoints.
|
|
3188
3201
|
* Contains basic identification and routing information.
|
|
3189
3202
|
*
|
|
3190
|
-
* Use {@link Page} (from `GET /
|
|
3203
|
+
* Use {@link Page} (from `GET /storefront/pages/:idOrSlug`) for the full page
|
|
3191
3204
|
* including resolved data, SEO settings, and alternates.
|
|
3192
3205
|
*/
|
|
3193
3206
|
interface PageSummary {
|
|
3194
3207
|
/**
|
|
3195
3208
|
* Unique numeric page ID. Auto-incremented.
|
|
3196
|
-
* Use this for API calls like `GET /
|
|
3209
|
+
* Use this for API calls like `GET /storefront/pages/:id`.
|
|
3197
3210
|
*/
|
|
3198
3211
|
id: number;
|
|
3199
3212
|
/**
|
|
3200
3213
|
* URL-friendly slug, unique within the site for this locale.
|
|
3201
3214
|
* Lowercase, hyphenated (e.g. `'about-us'`). Max 255 characters.
|
|
3202
|
-
* Can be used instead of `id` in API calls: `GET /
|
|
3215
|
+
* Can be used instead of `id` in API calls: `GET /storefront/pages/:slug`.
|
|
3203
3216
|
*/
|
|
3204
3217
|
slug: string;
|
|
3205
3218
|
/**
|
|
@@ -3228,7 +3241,7 @@ interface PageSummary {
|
|
|
3228
3241
|
}
|
|
3229
3242
|
/**
|
|
3230
3243
|
* Full page with resolved data sources, SEO settings, and locale alternates.
|
|
3231
|
-
* Returned by single-page endpoints (`GET /
|
|
3244
|
+
* Returned by single-page endpoints (`GET /storefront/pages/:idOrSlug`).
|
|
3232
3245
|
*
|
|
3233
3246
|
* Pages are layout-driven containers whose content comes from **DataSources** —
|
|
3234
3247
|
* configurable queries that fetch content, categories, forms, or other data.
|
|
@@ -3287,7 +3300,7 @@ interface Page extends PageSummary {
|
|
|
3287
3300
|
*
|
|
3288
3301
|
* `undefined` on responses from older API versions that do not populate
|
|
3289
3302
|
* the cascade; in that case, fall back to the dedicated
|
|
3290
|
-
* `/
|
|
3303
|
+
* `/storefront/:siteId/pages/:slug/json-ld` endpoint which always returns
|
|
3291
3304
|
* the array directly under `data`.
|
|
3292
3305
|
*/
|
|
3293
3306
|
structuredData?: {
|
|
@@ -3704,7 +3717,7 @@ interface FormSchema {
|
|
|
3704
3717
|
}
|
|
3705
3718
|
/**
|
|
3706
3719
|
* A public form available for submission.
|
|
3707
|
-
* Returned by `GET /
|
|
3720
|
+
* Returned by `GET /storefront/{siteId}/forms/{slug}` and unwrapped from the
|
|
3708
3721
|
* `{ data }` envelope by `forms.getBySlug()`.
|
|
3709
3722
|
*
|
|
3710
3723
|
* Use `schema.fields` to dynamically render the form fields, `schema.settings`
|
|
@@ -3726,8 +3739,8 @@ interface Form {
|
|
|
3726
3739
|
/**
|
|
3727
3740
|
* URL-friendly slug, unique within the site.
|
|
3728
3741
|
* Lowercase, hyphenated (e.g. `'contact-us'`). Max 255 characters.
|
|
3729
|
-
* Used to fetch the form: `GET /
|
|
3730
|
-
* Also used as the submission endpoint: `POST /
|
|
3742
|
+
* Used to fetch the form: `GET /storefront/{siteId}/forms/{slug}`.
|
|
3743
|
+
* Also used as the submission endpoint: `POST /storefront/{siteId}/forms/{slug}/submissions`.
|
|
3731
3744
|
*/
|
|
3732
3745
|
slug: string;
|
|
3733
3746
|
/**
|
|
@@ -3847,7 +3860,7 @@ interface ReviewResponse {
|
|
|
3847
3860
|
interface Review {
|
|
3848
3861
|
/**
|
|
3849
3862
|
* Unique numeric review ID. Auto-incremented.
|
|
3850
|
-
* Use this for API calls like `GET /
|
|
3863
|
+
* Use this for API calls like `GET /storefront/reviews/:id`.
|
|
3851
3864
|
*/
|
|
3852
3865
|
id: number;
|
|
3853
3866
|
/**
|
|
@@ -3914,7 +3927,7 @@ interface Review {
|
|
|
3914
3927
|
}
|
|
3915
3928
|
/**
|
|
3916
3929
|
* Public review settings for a site.
|
|
3917
|
-
* Returned by `GET /
|
|
3930
|
+
* Returned by `GET /storefront/reviews/settings`.
|
|
3918
3931
|
*
|
|
3919
3932
|
* Use these settings to:
|
|
3920
3933
|
* - Check if reviews are enabled before rendering a review form
|
|
@@ -3983,7 +3996,7 @@ interface ReviewSettings {
|
|
|
3983
3996
|
};
|
|
3984
3997
|
}
|
|
3985
3998
|
/**
|
|
3986
|
-
* Data payload for submitting a new review via `POST /
|
|
3999
|
+
* Data payload for submitting a new review via `POST /storefront/reviews`.
|
|
3987
4000
|
*
|
|
3988
4001
|
* Required fields: `authorName`, `rating`, `content`.
|
|
3989
4002
|
* Optional fields depend on `ReviewSettings.fields` configuration.
|
|
@@ -4796,7 +4809,7 @@ interface CategoryDetailResponse {
|
|
|
4796
4809
|
* Response from `tags.list()`.
|
|
4797
4810
|
* Paginated since SDK 1.32.2 (the wire was already returning `meta`; the SDK
|
|
4798
4811
|
* type now exposes it). Server-side default is 20 items per page on
|
|
4799
|
-
* `/v1/tags` and `/
|
|
4812
|
+
* `/v1/tags` and `/storefront/.../tags`, with `maxLimit=100` (ADR-0022 D3).
|
|
4800
4813
|
*/
|
|
4801
4814
|
interface TagsListResponse {
|
|
4802
4815
|
/**
|
|
@@ -5087,9 +5100,9 @@ interface BaseRequestOptions {
|
|
|
5087
5100
|
* Pagination options for list endpoints.
|
|
5088
5101
|
*
|
|
5089
5102
|
* All values are 1-based integers. The server default is 20 items per page
|
|
5090
|
-
* on public-tier endpoints (`/
|
|
5103
|
+
* on public-tier endpoints (`/storefront`, `/v1`) and 50 on admin-tier
|
|
5091
5104
|
* endpoints (`/api`, `/admin`), per ADR-0022 D3. Documented exceptions:
|
|
5092
|
-
* SSG endpoints like `/
|
|
5105
|
+
* SSG endpoints like `/storefront/.../categories/:slug` default to 500.
|
|
5093
5106
|
*/
|
|
5094
5107
|
interface PaginationOptions {
|
|
5095
5108
|
/**
|
|
@@ -5100,9 +5113,9 @@ interface PaginationOptions {
|
|
|
5100
5113
|
page?: number;
|
|
5101
5114
|
/**
|
|
5102
5115
|
* Maximum number of items per page.
|
|
5103
|
-
* Server default is 20 on public-tier endpoints (`/
|
|
5116
|
+
* Server default is 20 on public-tier endpoints (`/storefront`, `/v1`).
|
|
5104
5117
|
* Maximum allowed value is 100 (except documented SSG exceptions like
|
|
5105
|
-
* `/
|
|
5118
|
+
* `/storefront/.../categories/:slug` which permit up to 500).
|
|
5106
5119
|
* Values above the per-endpoint maximum are silently capped by the API.
|
|
5107
5120
|
*/
|
|
5108
5121
|
limit?: number;
|
|
@@ -5195,7 +5208,7 @@ interface CategoryOptions extends PaginationOptions {
|
|
|
5195
5208
|
*
|
|
5196
5209
|
* Pagination + locale. The public `/v1/tags` endpoint does not expose
|
|
5197
5210
|
* search or sort on its public surface. `limit` defaults to 20 server-side
|
|
5198
|
-
* on the public-tier mounts (`/
|
|
5211
|
+
* on the public-tier mounts (`/storefront/.../tags`, `/v1/tags`) per
|
|
5199
5212
|
* ADR-0022 D3, with `maxLimit=100`.
|
|
5200
5213
|
*/
|
|
5201
5214
|
interface TagsListFilters extends PaginationOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ type Cache = ReturnType<typeof createCache>;
|
|
|
29
29
|
interface InternalConfig {
|
|
30
30
|
siteId: string;
|
|
31
31
|
baseUrl: string;
|
|
32
|
+
/** Optional publishable key sent as the `X-Lynkow-Pk` header on every storefront API request. */
|
|
33
|
+
publishableKey?: string;
|
|
32
34
|
locale?: string;
|
|
33
35
|
fetchOptions: RequestInit;
|
|
34
36
|
/** Optional cache manager for caching responses */
|
|
@@ -1800,11 +1802,22 @@ interface LynkowConfig {
|
|
|
1800
1802
|
* UUID of the Lynkow site to connect to.
|
|
1801
1803
|
* Found in the admin dashboard under Site Settings.
|
|
1802
1804
|
* Must be a valid UUID v4 format (lowercase hex with dashes).
|
|
1803
|
-
*
|
|
1805
|
+
* Interpolated into the path of every request (`/storefront/:siteId/...`)
|
|
1806
|
+
* to identify the tenant. It is not sent as a header.
|
|
1804
1807
|
*
|
|
1805
1808
|
* @example '550e8400-e29b-41d4-a716-446655440000'
|
|
1806
1809
|
*/
|
|
1807
1810
|
siteId: string;
|
|
1811
|
+
/**
|
|
1812
|
+
* Optional publishable key that identifies this client to the Lynkow
|
|
1813
|
+
* storefront API. Copied from the admin dashboard under Site Settings.
|
|
1814
|
+
* It has the form `lkw_pk_` followed by 24 characters.
|
|
1815
|
+
* When set, it is sent as the `X-Lynkow-Pk` header on every storefront API request the client makes.
|
|
1816
|
+
* Optional on CMS content routes; required on future commerce routes.
|
|
1817
|
+
*
|
|
1818
|
+
* @example 'lkw_pk_9f8g7h6j5k4w3m2n1p0qrstv'
|
|
1819
|
+
*/
|
|
1820
|
+
publishableKey?: string;
|
|
1808
1821
|
/**
|
|
1809
1822
|
* Base URL of the Lynkow API.
|
|
1810
1823
|
* Must not include a trailing slash.
|
|
@@ -2382,13 +2395,13 @@ interface Category {
|
|
|
2382
2395
|
* - `'standard'`: articles use the TipTap rich text editor (stored in `Content.body`)
|
|
2383
2396
|
* - `'structured'`: articles use custom fields defined by the category's schema (stored in `Content.customData`)
|
|
2384
2397
|
*
|
|
2385
|
-
* Only present in detail responses (`GET /
|
|
2398
|
+
* Only present in detail responses (`GET /storefront/categories/:id`), not in lightweight
|
|
2386
2399
|
* list projections (e.g. when categories are embedded in content responses).
|
|
2387
2400
|
*/
|
|
2388
2401
|
contentMode?: 'standard' | 'structured';
|
|
2389
2402
|
/**
|
|
2390
2403
|
* Parent category in the hierarchy. Present when the API eagerly loads
|
|
2391
|
-
* the parent relation (e.g. `GET /
|
|
2404
|
+
* the parent relation (e.g. `GET /storefront/contents/slug/:slug` returns
|
|
2392
2405
|
* each category's parent so consumers can build a breadcrumb in a single
|
|
2393
2406
|
* request). `null` for root-level categories. `undefined` when the
|
|
2394
2407
|
* endpoint did not include parent data.
|
|
@@ -2401,7 +2414,7 @@ interface Category {
|
|
|
2401
2414
|
}
|
|
2402
2415
|
/**
|
|
2403
2416
|
* Category with URL path, description, image, and content count.
|
|
2404
|
-
* Returned by list endpoints (`GET /
|
|
2417
|
+
* Returned by list endpoints (`GET /storefront/categories`).
|
|
2405
2418
|
*
|
|
2406
2419
|
* Extends {@link Category} with display-oriented fields useful for rendering
|
|
2407
2420
|
* category listing pages, navigation menus, and sidebar widgets.
|
|
@@ -2478,7 +2491,7 @@ interface CategoryWithCount extends Category {
|
|
|
2478
2491
|
}
|
|
2479
2492
|
/**
|
|
2480
2493
|
* Full category detail with parent relationship.
|
|
2481
|
-
* Returned by single-category endpoints (`GET /
|
|
2494
|
+
* Returned by single-category endpoints (`GET /storefront/categories/:id`).
|
|
2482
2495
|
*
|
|
2483
2496
|
* Extends {@link CategoryWithCount} with the parent category reference,
|
|
2484
2497
|
* enabling you to reconstruct the category hierarchy.
|
|
@@ -2505,7 +2518,7 @@ interface CategoryDetail extends CategoryWithCount {
|
|
|
2505
2518
|
jsonLdExclusions?: string[];
|
|
2506
2519
|
}
|
|
2507
2520
|
/**
|
|
2508
|
-
* Recursive category tree node, returned by the tree endpoint (`GET /
|
|
2521
|
+
* Recursive category tree node, returned by the tree endpoint (`GET /storefront/categories/tree`).
|
|
2509
2522
|
*
|
|
2510
2523
|
* Each node contains its full {@link CategoryWithCount} data plus a `children` array
|
|
2511
2524
|
* of nested sub-categories. The tree is pre-sorted by the API.
|
|
@@ -2838,15 +2851,15 @@ interface TipTapNode {
|
|
|
2838
2851
|
type ContentBody = string;
|
|
2839
2852
|
/**
|
|
2840
2853
|
* Lightweight content representation returned in paginated list endpoints
|
|
2841
|
-
* (`GET /
|
|
2854
|
+
* (`GET /storefront/contents`).
|
|
2842
2855
|
*
|
|
2843
2856
|
* Omits the full body, SEO fields, and relations to minimize payload size.
|
|
2844
|
-
* Use `Content` (from `GET /
|
|
2857
|
+
* Use `Content` (from `GET /storefront/contents/:idOrSlug`) for the complete data.
|
|
2845
2858
|
*/
|
|
2846
2859
|
interface ContentSummary {
|
|
2847
2860
|
/**
|
|
2848
2861
|
* Unique numeric content ID. Auto-incremented.
|
|
2849
|
-
* Use this for API calls like `GET /
|
|
2862
|
+
* Use this for API calls like `GET /storefront/contents/:id`.
|
|
2850
2863
|
*/
|
|
2851
2864
|
id: number;
|
|
2852
2865
|
/**
|
|
@@ -2857,7 +2870,7 @@ interface ContentSummary {
|
|
|
2857
2870
|
/**
|
|
2858
2871
|
* URL-friendly slug, unique within the site for this locale.
|
|
2859
2872
|
* Lowercase, hyphenated (e.g. `'my-article-title'`). Max 500 characters.
|
|
2860
|
-
* Can be used instead of `id` in API calls: `GET /
|
|
2873
|
+
* Can be used instead of `id` in API calls: `GET /storefront/contents/:slug`.
|
|
2861
2874
|
*/
|
|
2862
2875
|
slug: string;
|
|
2863
2876
|
/**
|
|
@@ -2917,7 +2930,7 @@ interface ContentSummary {
|
|
|
2917
2930
|
}
|
|
2918
2931
|
/**
|
|
2919
2932
|
* Full content item with body, SEO metadata, structured data, and relations.
|
|
2920
|
-
* Returned by single-content endpoints (`GET /
|
|
2933
|
+
* Returned by single-content endpoints (`GET /storefront/contents/:idOrSlug`).
|
|
2921
2934
|
*
|
|
2922
2935
|
* Extends {@link ContentSummary} with all the fields omitted from list responses.
|
|
2923
2936
|
*/
|
|
@@ -3187,19 +3200,19 @@ interface Alternate {
|
|
|
3187
3200
|
* Lightweight page representation returned in list endpoints.
|
|
3188
3201
|
* Contains basic identification and routing information.
|
|
3189
3202
|
*
|
|
3190
|
-
* Use {@link Page} (from `GET /
|
|
3203
|
+
* Use {@link Page} (from `GET /storefront/pages/:idOrSlug`) for the full page
|
|
3191
3204
|
* including resolved data, SEO settings, and alternates.
|
|
3192
3205
|
*/
|
|
3193
3206
|
interface PageSummary {
|
|
3194
3207
|
/**
|
|
3195
3208
|
* Unique numeric page ID. Auto-incremented.
|
|
3196
|
-
* Use this for API calls like `GET /
|
|
3209
|
+
* Use this for API calls like `GET /storefront/pages/:id`.
|
|
3197
3210
|
*/
|
|
3198
3211
|
id: number;
|
|
3199
3212
|
/**
|
|
3200
3213
|
* URL-friendly slug, unique within the site for this locale.
|
|
3201
3214
|
* Lowercase, hyphenated (e.g. `'about-us'`). Max 255 characters.
|
|
3202
|
-
* Can be used instead of `id` in API calls: `GET /
|
|
3215
|
+
* Can be used instead of `id` in API calls: `GET /storefront/pages/:slug`.
|
|
3203
3216
|
*/
|
|
3204
3217
|
slug: string;
|
|
3205
3218
|
/**
|
|
@@ -3228,7 +3241,7 @@ interface PageSummary {
|
|
|
3228
3241
|
}
|
|
3229
3242
|
/**
|
|
3230
3243
|
* Full page with resolved data sources, SEO settings, and locale alternates.
|
|
3231
|
-
* Returned by single-page endpoints (`GET /
|
|
3244
|
+
* Returned by single-page endpoints (`GET /storefront/pages/:idOrSlug`).
|
|
3232
3245
|
*
|
|
3233
3246
|
* Pages are layout-driven containers whose content comes from **DataSources** —
|
|
3234
3247
|
* configurable queries that fetch content, categories, forms, or other data.
|
|
@@ -3287,7 +3300,7 @@ interface Page extends PageSummary {
|
|
|
3287
3300
|
*
|
|
3288
3301
|
* `undefined` on responses from older API versions that do not populate
|
|
3289
3302
|
* the cascade; in that case, fall back to the dedicated
|
|
3290
|
-
* `/
|
|
3303
|
+
* `/storefront/:siteId/pages/:slug/json-ld` endpoint which always returns
|
|
3291
3304
|
* the array directly under `data`.
|
|
3292
3305
|
*/
|
|
3293
3306
|
structuredData?: {
|
|
@@ -3704,7 +3717,7 @@ interface FormSchema {
|
|
|
3704
3717
|
}
|
|
3705
3718
|
/**
|
|
3706
3719
|
* A public form available for submission.
|
|
3707
|
-
* Returned by `GET /
|
|
3720
|
+
* Returned by `GET /storefront/{siteId}/forms/{slug}` and unwrapped from the
|
|
3708
3721
|
* `{ data }` envelope by `forms.getBySlug()`.
|
|
3709
3722
|
*
|
|
3710
3723
|
* Use `schema.fields` to dynamically render the form fields, `schema.settings`
|
|
@@ -3726,8 +3739,8 @@ interface Form {
|
|
|
3726
3739
|
/**
|
|
3727
3740
|
* URL-friendly slug, unique within the site.
|
|
3728
3741
|
* Lowercase, hyphenated (e.g. `'contact-us'`). Max 255 characters.
|
|
3729
|
-
* Used to fetch the form: `GET /
|
|
3730
|
-
* Also used as the submission endpoint: `POST /
|
|
3742
|
+
* Used to fetch the form: `GET /storefront/{siteId}/forms/{slug}`.
|
|
3743
|
+
* Also used as the submission endpoint: `POST /storefront/{siteId}/forms/{slug}/submissions`.
|
|
3731
3744
|
*/
|
|
3732
3745
|
slug: string;
|
|
3733
3746
|
/**
|
|
@@ -3847,7 +3860,7 @@ interface ReviewResponse {
|
|
|
3847
3860
|
interface Review {
|
|
3848
3861
|
/**
|
|
3849
3862
|
* Unique numeric review ID. Auto-incremented.
|
|
3850
|
-
* Use this for API calls like `GET /
|
|
3863
|
+
* Use this for API calls like `GET /storefront/reviews/:id`.
|
|
3851
3864
|
*/
|
|
3852
3865
|
id: number;
|
|
3853
3866
|
/**
|
|
@@ -3914,7 +3927,7 @@ interface Review {
|
|
|
3914
3927
|
}
|
|
3915
3928
|
/**
|
|
3916
3929
|
* Public review settings for a site.
|
|
3917
|
-
* Returned by `GET /
|
|
3930
|
+
* Returned by `GET /storefront/reviews/settings`.
|
|
3918
3931
|
*
|
|
3919
3932
|
* Use these settings to:
|
|
3920
3933
|
* - Check if reviews are enabled before rendering a review form
|
|
@@ -3983,7 +3996,7 @@ interface ReviewSettings {
|
|
|
3983
3996
|
};
|
|
3984
3997
|
}
|
|
3985
3998
|
/**
|
|
3986
|
-
* Data payload for submitting a new review via `POST /
|
|
3999
|
+
* Data payload for submitting a new review via `POST /storefront/reviews`.
|
|
3987
4000
|
*
|
|
3988
4001
|
* Required fields: `authorName`, `rating`, `content`.
|
|
3989
4002
|
* Optional fields depend on `ReviewSettings.fields` configuration.
|
|
@@ -4796,7 +4809,7 @@ interface CategoryDetailResponse {
|
|
|
4796
4809
|
* Response from `tags.list()`.
|
|
4797
4810
|
* Paginated since SDK 1.32.2 (the wire was already returning `meta`; the SDK
|
|
4798
4811
|
* type now exposes it). Server-side default is 20 items per page on
|
|
4799
|
-
* `/v1/tags` and `/
|
|
4812
|
+
* `/v1/tags` and `/storefront/.../tags`, with `maxLimit=100` (ADR-0022 D3).
|
|
4800
4813
|
*/
|
|
4801
4814
|
interface TagsListResponse {
|
|
4802
4815
|
/**
|
|
@@ -5087,9 +5100,9 @@ interface BaseRequestOptions {
|
|
|
5087
5100
|
* Pagination options for list endpoints.
|
|
5088
5101
|
*
|
|
5089
5102
|
* All values are 1-based integers. The server default is 20 items per page
|
|
5090
|
-
* on public-tier endpoints (`/
|
|
5103
|
+
* on public-tier endpoints (`/storefront`, `/v1`) and 50 on admin-tier
|
|
5091
5104
|
* endpoints (`/api`, `/admin`), per ADR-0022 D3. Documented exceptions:
|
|
5092
|
-
* SSG endpoints like `/
|
|
5105
|
+
* SSG endpoints like `/storefront/.../categories/:slug` default to 500.
|
|
5093
5106
|
*/
|
|
5094
5107
|
interface PaginationOptions {
|
|
5095
5108
|
/**
|
|
@@ -5100,9 +5113,9 @@ interface PaginationOptions {
|
|
|
5100
5113
|
page?: number;
|
|
5101
5114
|
/**
|
|
5102
5115
|
* Maximum number of items per page.
|
|
5103
|
-
* Server default is 20 on public-tier endpoints (`/
|
|
5116
|
+
* Server default is 20 on public-tier endpoints (`/storefront`, `/v1`).
|
|
5104
5117
|
* Maximum allowed value is 100 (except documented SSG exceptions like
|
|
5105
|
-
* `/
|
|
5118
|
+
* `/storefront/.../categories/:slug` which permit up to 500).
|
|
5106
5119
|
* Values above the per-endpoint maximum are silently capped by the API.
|
|
5107
5120
|
*/
|
|
5108
5121
|
limit?: number;
|
|
@@ -5195,7 +5208,7 @@ interface CategoryOptions extends PaginationOptions {
|
|
|
5195
5208
|
*
|
|
5196
5209
|
* Pagination + locale. The public `/v1/tags` endpoint does not expose
|
|
5197
5210
|
* search or sort on its public surface. `limit` defaults to 20 server-side
|
|
5198
|
-
* on the public-tier mounts (`/
|
|
5211
|
+
* on the public-tier mounts (`/storefront/.../tags`, `/v1/tags`) per
|
|
5199
5212
|
* ADR-0022 D3, with `maxLimit=100`.
|
|
5200
5213
|
*/
|
|
5201
5214
|
interface TagsListFilters extends PaginationOptions {
|