@wix/auto_sdk_stores_collections 1.0.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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +7 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.context.js +12 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.context.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +10 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.http.js +142 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.http.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +19 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js +85 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +30 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.public.js +27 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.public.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.types.d.ts +271 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.types.js +23 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.types.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.universal.d.ts +338 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js +158 -0
- package/build/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/stores-catalog-v1-collection-collections.context.d.ts +7 -0
- package/build/es/src/stores-catalog-v1-collection-collections.context.js +7 -0
- package/build/es/src/stores-catalog-v1-collection-collections.context.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection-collections.http.d.ts +10 -0
- package/build/es/src/stores-catalog-v1-collection-collections.http.js +136 -0
- package/build/es/src/stores-catalog-v1-collection-collections.http.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection-collections.meta.d.ts +19 -0
- package/build/es/src/stores-catalog-v1-collection-collections.meta.js +56 -0
- package/build/es/src/stores-catalog-v1-collection-collections.meta.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection-collections.public.d.ts +30 -0
- package/build/es/src/stores-catalog-v1-collection-collections.public.js +19 -0
- package/build/es/src/stores-catalog-v1-collection-collections.public.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection-collections.types.d.ts +271 -0
- package/build/es/src/stores-catalog-v1-collection-collections.types.js +20 -0
- package/build/es/src/stores-catalog-v1-collection-collections.types.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection-collections.universal.d.ts +338 -0
- package/build/es/src/stores-catalog-v1-collection-collections.universal.js +129 -0
- package/build/es/src/stores-catalog-v1-collection-collections.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.d.ts +7 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js +12 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.context.js.map +1 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.d.ts +10 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js +142 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.http.js.map +1 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.d.ts +19 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js +85 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.meta.js.map +1 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.d.ts +30 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js +27 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.public.js.map +1 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.d.ts +271 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js +23 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.types.js.map +1 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.d.ts +338 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js +158 -0
- package/build/internal/cjs/src/stores-catalog-v1-collection-collections.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.context.d.ts +7 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js +7 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.context.js.map +1 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.http.d.ts +10 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js +136 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.http.js.map +1 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.d.ts +19 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js +56 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.meta.js.map +1 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.public.d.ts +30 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js +19 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.public.js.map +1 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.types.d.ts +271 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js +20 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.types.js.map +1 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.d.ts +338 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js +129 -0
- package/build/internal/es/src/stores-catalog-v1-collection-collections.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
export interface Collection {
|
|
2
|
+
/**
|
|
3
|
+
* Collection ID (generated automatically by the catalog).
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
id?: string | null;
|
|
7
|
+
/** Collection name. */
|
|
8
|
+
name?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Media items (images, videos etc) associated with this collection. Read only.
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
media?: Media;
|
|
14
|
+
/**
|
|
15
|
+
* Number of products in the collection. Read only.
|
|
16
|
+
* @readonly
|
|
17
|
+
*/
|
|
18
|
+
numberOfProducts?: number;
|
|
19
|
+
/** Collection description. */
|
|
20
|
+
description?: string | null;
|
|
21
|
+
/** Collection slug. */
|
|
22
|
+
slug?: string | null;
|
|
23
|
+
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
24
|
+
visible?: boolean | null;
|
|
25
|
+
}
|
|
26
|
+
export interface Media {
|
|
27
|
+
/** Primary media (image, video etc) associated with this product. */
|
|
28
|
+
mainMedia?: MediaItem;
|
|
29
|
+
/** Media (images, videos etc) associated with this product. */
|
|
30
|
+
items?: MediaItem[];
|
|
31
|
+
}
|
|
32
|
+
export interface MediaItem extends MediaItemItemOneOf {
|
|
33
|
+
/** Image data (URL, size). */
|
|
34
|
+
image?: MediaItemUrlAndSize;
|
|
35
|
+
/** Video data (URL, size). */
|
|
36
|
+
video?: MediaItemVideo;
|
|
37
|
+
/** Media item thumbnail details. */
|
|
38
|
+
thumbnail?: MediaItemUrlAndSize;
|
|
39
|
+
/** Media item type (image, video, etc.). */
|
|
40
|
+
mediaType?: MediaItemType;
|
|
41
|
+
/** Media item title. */
|
|
42
|
+
title?: string;
|
|
43
|
+
/** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
|
|
44
|
+
id?: string;
|
|
45
|
+
}
|
|
46
|
+
/** @oneof */
|
|
47
|
+
export interface MediaItemItemOneOf {
|
|
48
|
+
/** Image data (URL, size). */
|
|
49
|
+
image?: MediaItemUrlAndSize;
|
|
50
|
+
/** Video data (URL, size). */
|
|
51
|
+
video?: MediaItemVideo;
|
|
52
|
+
}
|
|
53
|
+
export interface MediaItemUrlAndSize {
|
|
54
|
+
/** Media item URL. */
|
|
55
|
+
url?: string;
|
|
56
|
+
/** Media item width. */
|
|
57
|
+
width?: number;
|
|
58
|
+
/** Media item height. */
|
|
59
|
+
height?: number;
|
|
60
|
+
/** Media format (mp4, png, etc.). */
|
|
61
|
+
format?: string | null;
|
|
62
|
+
/** Alt text. This text will be shown in case the image is not available. */
|
|
63
|
+
altText?: string | null;
|
|
64
|
+
}
|
|
65
|
+
export declare enum MediaItemType {
|
|
66
|
+
unspecified_media_item_type = "unspecified_media_item_type",
|
|
67
|
+
/** Image media type. */
|
|
68
|
+
image = "image",
|
|
69
|
+
/** Video media type. */
|
|
70
|
+
video = "video",
|
|
71
|
+
/** Audio media type. */
|
|
72
|
+
audio = "audio",
|
|
73
|
+
/** Document media type. */
|
|
74
|
+
document = "document",
|
|
75
|
+
/** Zip media type. */
|
|
76
|
+
zip = "zip"
|
|
77
|
+
}
|
|
78
|
+
export interface MediaItemVideo {
|
|
79
|
+
/** Data (URL, size) about each resolution for which this video is available. */
|
|
80
|
+
files?: MediaItemUrlAndSize[];
|
|
81
|
+
/** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */
|
|
82
|
+
stillFrameMediaId?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
86
|
+
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
87
|
+
* This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
|
|
88
|
+
*/
|
|
89
|
+
export interface SeoSchema {
|
|
90
|
+
/** SEO tag information. */
|
|
91
|
+
tags?: Tag[];
|
|
92
|
+
/** SEO general settings. */
|
|
93
|
+
settings?: Settings;
|
|
94
|
+
}
|
|
95
|
+
export interface Keyword {
|
|
96
|
+
/** Keyword value. */
|
|
97
|
+
term?: string;
|
|
98
|
+
/** Whether the keyword is the main focus keyword. */
|
|
99
|
+
isMain?: boolean;
|
|
100
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
101
|
+
origin?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface Tag {
|
|
104
|
+
/**
|
|
105
|
+
* SEO tag type.
|
|
106
|
+
*
|
|
107
|
+
*
|
|
108
|
+
* Supported values: `title`, `meta`, `script`, `link`.
|
|
109
|
+
*/
|
|
110
|
+
type?: string;
|
|
111
|
+
/**
|
|
112
|
+
* A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
|
|
113
|
+
* For example: `{"name": "description", "content": "the description itself"}`.
|
|
114
|
+
*/
|
|
115
|
+
props?: Record<string, any> | null;
|
|
116
|
+
/** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */
|
|
117
|
+
meta?: Record<string, any> | null;
|
|
118
|
+
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
119
|
+
children?: string;
|
|
120
|
+
/** Whether the tag is a custom tag. */
|
|
121
|
+
custom?: boolean;
|
|
122
|
+
/** Whether the tag is disabled. */
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface Settings {
|
|
126
|
+
/**
|
|
127
|
+
* Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
* Default: `false` (Auto Redirect is enabled.)
|
|
131
|
+
*/
|
|
132
|
+
preventAutoRedirect?: boolean;
|
|
133
|
+
/** User-selected keyword terms for a specific page. */
|
|
134
|
+
keywords?: Keyword[];
|
|
135
|
+
}
|
|
136
|
+
export interface QueryCollectionsRequest {
|
|
137
|
+
query?: PlatformQuery;
|
|
138
|
+
}
|
|
139
|
+
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
140
|
+
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
141
|
+
paging?: PlatformPaging;
|
|
142
|
+
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
143
|
+
cursorPaging?: CursorPaging;
|
|
144
|
+
/** Filter object. */
|
|
145
|
+
filter?: Record<string, any> | null;
|
|
146
|
+
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
147
|
+
sort?: Sorting[];
|
|
148
|
+
}
|
|
149
|
+
/** @oneof */
|
|
150
|
+
export interface PlatformQueryPagingMethodOneOf {
|
|
151
|
+
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
152
|
+
paging?: PlatformPaging;
|
|
153
|
+
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
154
|
+
cursorPaging?: CursorPaging;
|
|
155
|
+
}
|
|
156
|
+
export interface Sorting {
|
|
157
|
+
/** Name of the field to sort by. */
|
|
158
|
+
fieldName?: string;
|
|
159
|
+
/** Sort order. */
|
|
160
|
+
order?: SortOrder;
|
|
161
|
+
}
|
|
162
|
+
export declare enum SortOrder {
|
|
163
|
+
ASC = "ASC",
|
|
164
|
+
DESC = "DESC"
|
|
165
|
+
}
|
|
166
|
+
export interface PlatformPaging {
|
|
167
|
+
/** Number of items to load. */
|
|
168
|
+
limit?: number | null;
|
|
169
|
+
/** Number of items to skip in the current sort order. */
|
|
170
|
+
offset?: number | null;
|
|
171
|
+
}
|
|
172
|
+
export interface CursorPaging {
|
|
173
|
+
/** Maximum number of items to return in the results. */
|
|
174
|
+
limit?: number | null;
|
|
175
|
+
/**
|
|
176
|
+
* Pointer to the next or previous page in the list of results.
|
|
177
|
+
*
|
|
178
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
179
|
+
* Not relevant for the first request.
|
|
180
|
+
*/
|
|
181
|
+
cursor?: string | null;
|
|
182
|
+
}
|
|
183
|
+
export interface QueryCollectionsResponse {
|
|
184
|
+
collections?: Collection[];
|
|
185
|
+
metadata?: PlatformPagingMetadata;
|
|
186
|
+
}
|
|
187
|
+
export interface PlatformPagingMetadata {
|
|
188
|
+
/** The number of items returned in this response. */
|
|
189
|
+
count?: number | null;
|
|
190
|
+
/** The offset which was requested. Returned if offset paging was used. */
|
|
191
|
+
offset?: number | null;
|
|
192
|
+
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
193
|
+
total?: number | null;
|
|
194
|
+
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
195
|
+
cursors?: Cursors;
|
|
196
|
+
}
|
|
197
|
+
export interface Cursors {
|
|
198
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
199
|
+
next?: string | null;
|
|
200
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
201
|
+
prev?: string | null;
|
|
202
|
+
}
|
|
203
|
+
export interface GetCollectionRequest {
|
|
204
|
+
/** Requested collection ID. */
|
|
205
|
+
id: string;
|
|
206
|
+
}
|
|
207
|
+
export interface GetCollectionResponse {
|
|
208
|
+
collection?: Collection;
|
|
209
|
+
}
|
|
210
|
+
export interface GetCollectionBySlugRequest {
|
|
211
|
+
/** Slug of the collection to retrieve. */
|
|
212
|
+
slug: string;
|
|
213
|
+
}
|
|
214
|
+
export interface GetCollectionBySlugResponse {
|
|
215
|
+
/** The requested collection. */
|
|
216
|
+
collection?: Collection;
|
|
217
|
+
}
|
|
218
|
+
interface MediaItemUrlAndSizeNonNullableFields {
|
|
219
|
+
url: string;
|
|
220
|
+
width: number;
|
|
221
|
+
height: number;
|
|
222
|
+
}
|
|
223
|
+
interface MediaItemVideoNonNullableFields {
|
|
224
|
+
files: MediaItemUrlAndSizeNonNullableFields[];
|
|
225
|
+
stillFrameMediaId: string;
|
|
226
|
+
}
|
|
227
|
+
interface MediaItemNonNullableFields {
|
|
228
|
+
image?: MediaItemUrlAndSizeNonNullableFields;
|
|
229
|
+
video?: MediaItemVideoNonNullableFields;
|
|
230
|
+
thumbnail?: MediaItemUrlAndSizeNonNullableFields;
|
|
231
|
+
mediaType: MediaItemType;
|
|
232
|
+
title: string;
|
|
233
|
+
id: string;
|
|
234
|
+
}
|
|
235
|
+
interface MediaNonNullableFields {
|
|
236
|
+
mainMedia?: MediaItemNonNullableFields;
|
|
237
|
+
items: MediaItemNonNullableFields[];
|
|
238
|
+
}
|
|
239
|
+
interface TagNonNullableFields {
|
|
240
|
+
type: string;
|
|
241
|
+
children: string;
|
|
242
|
+
custom: boolean;
|
|
243
|
+
disabled: boolean;
|
|
244
|
+
}
|
|
245
|
+
interface KeywordNonNullableFields {
|
|
246
|
+
term: string;
|
|
247
|
+
isMain: boolean;
|
|
248
|
+
}
|
|
249
|
+
interface SettingsNonNullableFields {
|
|
250
|
+
preventAutoRedirect: boolean;
|
|
251
|
+
keywords: KeywordNonNullableFields[];
|
|
252
|
+
}
|
|
253
|
+
interface SeoSchemaNonNullableFields {
|
|
254
|
+
tags: TagNonNullableFields[];
|
|
255
|
+
settings?: SettingsNonNullableFields;
|
|
256
|
+
}
|
|
257
|
+
interface CollectionNonNullableFields {
|
|
258
|
+
media?: MediaNonNullableFields;
|
|
259
|
+
numberOfProducts: number;
|
|
260
|
+
seoSchema?: SeoSchemaNonNullableFields;
|
|
261
|
+
}
|
|
262
|
+
export interface QueryCollectionsResponseNonNullableFields {
|
|
263
|
+
collections: CollectionNonNullableFields[];
|
|
264
|
+
}
|
|
265
|
+
export interface GetCollectionResponseNonNullableFields {
|
|
266
|
+
collection?: CollectionNonNullableFields;
|
|
267
|
+
}
|
|
268
|
+
export interface GetCollectionBySlugResponseNonNullableFields {
|
|
269
|
+
collection?: CollectionNonNullableFields;
|
|
270
|
+
}
|
|
271
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var MediaItemType;
|
|
2
|
+
(function (MediaItemType) {
|
|
3
|
+
MediaItemType["unspecified_media_item_type"] = "unspecified_media_item_type";
|
|
4
|
+
/** Image media type. */
|
|
5
|
+
MediaItemType["image"] = "image";
|
|
6
|
+
/** Video media type. */
|
|
7
|
+
MediaItemType["video"] = "video";
|
|
8
|
+
/** Audio media type. */
|
|
9
|
+
MediaItemType["audio"] = "audio";
|
|
10
|
+
/** Document media type. */
|
|
11
|
+
MediaItemType["document"] = "document";
|
|
12
|
+
/** Zip media type. */
|
|
13
|
+
MediaItemType["zip"] = "zip";
|
|
14
|
+
})(MediaItemType || (MediaItemType = {}));
|
|
15
|
+
export var SortOrder;
|
|
16
|
+
(function (SortOrder) {
|
|
17
|
+
SortOrder["ASC"] = "ASC";
|
|
18
|
+
SortOrder["DESC"] = "DESC";
|
|
19
|
+
})(SortOrder || (SortOrder = {}));
|
|
20
|
+
//# sourceMappingURL=stores-catalog-v1-collection-collections.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-catalog-v1-collection-collections.types.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-collection-collections.types.ts"],"names":[],"mappings":"AAqEA,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,4EAA2D,CAAA;IAC3D,wBAAwB;IACxB,gCAAe,CAAA;IACf,wBAAwB;IACxB,gCAAe,CAAA;IACf,wBAAwB;IACxB,gCAAe,CAAA;IACf,2BAA2B;IAC3B,sCAAqB,CAAA;IACrB,sBAAsB;IACtB,4BAAW,CAAA;AACb,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB;AA+FD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
export interface Collection {
|
|
2
|
+
/**
|
|
3
|
+
* Collection ID (generated automatically by the catalog).
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
_id?: string | null;
|
|
7
|
+
/** Collection name. */
|
|
8
|
+
name?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Media items (images, videos etc) associated with this collection. Read only.
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
media?: Media;
|
|
14
|
+
/**
|
|
15
|
+
* Number of products in the collection. Read only.
|
|
16
|
+
* @readonly
|
|
17
|
+
*/
|
|
18
|
+
numberOfProducts?: number;
|
|
19
|
+
/** Collection description. */
|
|
20
|
+
description?: string | null;
|
|
21
|
+
/** Collection slug. */
|
|
22
|
+
slug?: string | null;
|
|
23
|
+
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
24
|
+
visible?: boolean | null;
|
|
25
|
+
}
|
|
26
|
+
export interface Media {
|
|
27
|
+
/** Primary media (image, video etc) associated with this product. */
|
|
28
|
+
mainMedia?: MediaItem;
|
|
29
|
+
/** Media (images, videos etc) associated with this product. */
|
|
30
|
+
items?: MediaItem[];
|
|
31
|
+
}
|
|
32
|
+
export interface MediaItem extends MediaItemItemOneOf {
|
|
33
|
+
/** Image data (URL, size). */
|
|
34
|
+
image?: MediaItemUrlAndSize;
|
|
35
|
+
/** Video data (URL, size). */
|
|
36
|
+
video?: MediaItemVideo;
|
|
37
|
+
/** Media item thumbnail details. */
|
|
38
|
+
thumbnail?: MediaItemUrlAndSize;
|
|
39
|
+
/** Media item type (image, video, etc.). */
|
|
40
|
+
mediaType?: MediaItemType;
|
|
41
|
+
/** Media item title. */
|
|
42
|
+
title?: string;
|
|
43
|
+
/** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
|
|
44
|
+
_id?: string;
|
|
45
|
+
}
|
|
46
|
+
/** @oneof */
|
|
47
|
+
export interface MediaItemItemOneOf {
|
|
48
|
+
/** Image data (URL, size). */
|
|
49
|
+
image?: MediaItemUrlAndSize;
|
|
50
|
+
/** Video data (URL, size). */
|
|
51
|
+
video?: MediaItemVideo;
|
|
52
|
+
}
|
|
53
|
+
export interface MediaItemUrlAndSize {
|
|
54
|
+
/** Media item URL. */
|
|
55
|
+
url?: string;
|
|
56
|
+
/** Media item width. */
|
|
57
|
+
width?: number;
|
|
58
|
+
/** Media item height. */
|
|
59
|
+
height?: number;
|
|
60
|
+
/** Media format (mp4, png, etc.). */
|
|
61
|
+
format?: string | null;
|
|
62
|
+
/** Alt text. This text will be shown in case the image is not available. */
|
|
63
|
+
altText?: string | null;
|
|
64
|
+
}
|
|
65
|
+
export declare enum MediaItemType {
|
|
66
|
+
unspecified_media_item_type = "unspecified_media_item_type",
|
|
67
|
+
/** Image media type. */
|
|
68
|
+
image = "image",
|
|
69
|
+
/** Video media type. */
|
|
70
|
+
video = "video",
|
|
71
|
+
/** Audio media type. */
|
|
72
|
+
audio = "audio",
|
|
73
|
+
/** Document media type. */
|
|
74
|
+
document = "document",
|
|
75
|
+
/** Zip media type. */
|
|
76
|
+
zip = "zip"
|
|
77
|
+
}
|
|
78
|
+
export interface MediaItemVideo {
|
|
79
|
+
/** Data (URL, size) about each resolution for which this video is available. */
|
|
80
|
+
files?: MediaItemUrlAndSize[];
|
|
81
|
+
/** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */
|
|
82
|
+
stillFrameMediaId?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
86
|
+
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
87
|
+
* This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
|
|
88
|
+
*/
|
|
89
|
+
export interface SeoSchema {
|
|
90
|
+
/** SEO tag information. */
|
|
91
|
+
tags?: Tag[];
|
|
92
|
+
/** SEO general settings. */
|
|
93
|
+
settings?: Settings;
|
|
94
|
+
}
|
|
95
|
+
export interface Keyword {
|
|
96
|
+
/** Keyword value. */
|
|
97
|
+
term?: string;
|
|
98
|
+
/** Whether the keyword is the main focus keyword. */
|
|
99
|
+
isMain?: boolean;
|
|
100
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
101
|
+
origin?: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface Tag {
|
|
104
|
+
/**
|
|
105
|
+
* SEO tag type.
|
|
106
|
+
*
|
|
107
|
+
*
|
|
108
|
+
* Supported values: `title`, `meta`, `script`, `link`.
|
|
109
|
+
*/
|
|
110
|
+
type?: string;
|
|
111
|
+
/**
|
|
112
|
+
* A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
|
|
113
|
+
* For example: `{"name": "description", "content": "the description itself"}`.
|
|
114
|
+
*/
|
|
115
|
+
props?: Record<string, any> | null;
|
|
116
|
+
/** SEO tag meta data. For example, `{"height": 300, "width": 240}`. */
|
|
117
|
+
meta?: Record<string, any> | null;
|
|
118
|
+
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
119
|
+
children?: string;
|
|
120
|
+
/** Whether the tag is a custom tag. */
|
|
121
|
+
custom?: boolean;
|
|
122
|
+
/** Whether the tag is disabled. */
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface Settings {
|
|
126
|
+
/**
|
|
127
|
+
* Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
* Default: `false` (Auto Redirect is enabled.)
|
|
131
|
+
*/
|
|
132
|
+
preventAutoRedirect?: boolean;
|
|
133
|
+
/** User-selected keyword terms for a specific page. */
|
|
134
|
+
keywords?: Keyword[];
|
|
135
|
+
}
|
|
136
|
+
export interface QueryCollectionsRequest {
|
|
137
|
+
query?: PlatformQuery;
|
|
138
|
+
}
|
|
139
|
+
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
140
|
+
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
141
|
+
paging?: PlatformPaging;
|
|
142
|
+
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
143
|
+
cursorPaging?: CursorPaging;
|
|
144
|
+
/** Filter object. */
|
|
145
|
+
filter?: Record<string, any> | null;
|
|
146
|
+
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
147
|
+
sort?: Sorting[];
|
|
148
|
+
}
|
|
149
|
+
/** @oneof */
|
|
150
|
+
export interface PlatformQueryPagingMethodOneOf {
|
|
151
|
+
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
152
|
+
paging?: PlatformPaging;
|
|
153
|
+
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
154
|
+
cursorPaging?: CursorPaging;
|
|
155
|
+
}
|
|
156
|
+
export interface Sorting {
|
|
157
|
+
/** Name of the field to sort by. */
|
|
158
|
+
fieldName?: string;
|
|
159
|
+
/** Sort order. */
|
|
160
|
+
order?: SortOrder;
|
|
161
|
+
}
|
|
162
|
+
export declare enum SortOrder {
|
|
163
|
+
ASC = "ASC",
|
|
164
|
+
DESC = "DESC"
|
|
165
|
+
}
|
|
166
|
+
export interface PlatformPaging {
|
|
167
|
+
/** Number of items to load. */
|
|
168
|
+
limit?: number | null;
|
|
169
|
+
/** Number of items to skip in the current sort order. */
|
|
170
|
+
offset?: number | null;
|
|
171
|
+
}
|
|
172
|
+
export interface CursorPaging {
|
|
173
|
+
/** Maximum number of items to return in the results. */
|
|
174
|
+
limit?: number | null;
|
|
175
|
+
/**
|
|
176
|
+
* Pointer to the next or previous page in the list of results.
|
|
177
|
+
*
|
|
178
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
179
|
+
* Not relevant for the first request.
|
|
180
|
+
*/
|
|
181
|
+
cursor?: string | null;
|
|
182
|
+
}
|
|
183
|
+
export interface QueryCollectionsResponse {
|
|
184
|
+
collections?: Collection[];
|
|
185
|
+
metadata?: PlatformPagingMetadata;
|
|
186
|
+
}
|
|
187
|
+
export interface PlatformPagingMetadata {
|
|
188
|
+
/** The number of items returned in this response. */
|
|
189
|
+
count?: number | null;
|
|
190
|
+
/** The offset which was requested. Returned if offset paging was used. */
|
|
191
|
+
offset?: number | null;
|
|
192
|
+
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
193
|
+
total?: number | null;
|
|
194
|
+
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
195
|
+
cursors?: Cursors;
|
|
196
|
+
}
|
|
197
|
+
export interface Cursors {
|
|
198
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
199
|
+
next?: string | null;
|
|
200
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
201
|
+
prev?: string | null;
|
|
202
|
+
}
|
|
203
|
+
export interface GetCollectionRequest {
|
|
204
|
+
/** Requested collection ID. */
|
|
205
|
+
_id: string;
|
|
206
|
+
}
|
|
207
|
+
export interface GetCollectionResponse {
|
|
208
|
+
collection?: Collection;
|
|
209
|
+
}
|
|
210
|
+
export interface GetCollectionBySlugRequest {
|
|
211
|
+
/** Slug of the collection to retrieve. */
|
|
212
|
+
slug: string;
|
|
213
|
+
}
|
|
214
|
+
export interface GetCollectionBySlugResponse {
|
|
215
|
+
/** The requested collection. */
|
|
216
|
+
collection?: Collection;
|
|
217
|
+
}
|
|
218
|
+
interface MediaItemUrlAndSizeNonNullableFields {
|
|
219
|
+
url: string;
|
|
220
|
+
width: number;
|
|
221
|
+
height: number;
|
|
222
|
+
}
|
|
223
|
+
interface MediaItemVideoNonNullableFields {
|
|
224
|
+
files: MediaItemUrlAndSizeNonNullableFields[];
|
|
225
|
+
stillFrameMediaId: string;
|
|
226
|
+
}
|
|
227
|
+
interface MediaItemNonNullableFields {
|
|
228
|
+
image?: MediaItemUrlAndSizeNonNullableFields;
|
|
229
|
+
video?: MediaItemVideoNonNullableFields;
|
|
230
|
+
thumbnail?: MediaItemUrlAndSizeNonNullableFields;
|
|
231
|
+
mediaType: MediaItemType;
|
|
232
|
+
title: string;
|
|
233
|
+
_id: string;
|
|
234
|
+
}
|
|
235
|
+
interface MediaNonNullableFields {
|
|
236
|
+
mainMedia?: MediaItemNonNullableFields;
|
|
237
|
+
items: MediaItemNonNullableFields[];
|
|
238
|
+
}
|
|
239
|
+
interface TagNonNullableFields {
|
|
240
|
+
type: string;
|
|
241
|
+
children: string;
|
|
242
|
+
custom: boolean;
|
|
243
|
+
disabled: boolean;
|
|
244
|
+
}
|
|
245
|
+
interface KeywordNonNullableFields {
|
|
246
|
+
term: string;
|
|
247
|
+
isMain: boolean;
|
|
248
|
+
}
|
|
249
|
+
interface SettingsNonNullableFields {
|
|
250
|
+
preventAutoRedirect: boolean;
|
|
251
|
+
keywords: KeywordNonNullableFields[];
|
|
252
|
+
}
|
|
253
|
+
interface SeoSchemaNonNullableFields {
|
|
254
|
+
tags: TagNonNullableFields[];
|
|
255
|
+
settings?: SettingsNonNullableFields;
|
|
256
|
+
}
|
|
257
|
+
export interface CollectionNonNullableFields {
|
|
258
|
+
media?: MediaNonNullableFields;
|
|
259
|
+
numberOfProducts: number;
|
|
260
|
+
seoSchema?: SeoSchemaNonNullableFields;
|
|
261
|
+
}
|
|
262
|
+
export interface QueryCollectionsResponseNonNullableFields {
|
|
263
|
+
collections: CollectionNonNullableFields[];
|
|
264
|
+
}
|
|
265
|
+
export interface GetCollectionResponseNonNullableFields {
|
|
266
|
+
collection?: CollectionNonNullableFields;
|
|
267
|
+
}
|
|
268
|
+
export interface GetCollectionBySlugResponseNonNullableFields {
|
|
269
|
+
collection?: CollectionNonNullableFields;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
|
|
273
|
+
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
274
|
+
* @public
|
|
275
|
+
* @fqn wix.catalog.api.v2.CollectionReadApi.QueryCollections
|
|
276
|
+
*/
|
|
277
|
+
export declare function queryCollections(): CollectionsQueryBuilder;
|
|
278
|
+
interface QueryOffsetResult {
|
|
279
|
+
currentPage: number | undefined;
|
|
280
|
+
totalPages: number | undefined;
|
|
281
|
+
totalCount: number | undefined;
|
|
282
|
+
hasNext: () => boolean;
|
|
283
|
+
hasPrev: () => boolean;
|
|
284
|
+
length: number;
|
|
285
|
+
pageSize: number;
|
|
286
|
+
}
|
|
287
|
+
export interface CollectionsQueryResult extends QueryOffsetResult {
|
|
288
|
+
items: Collection[];
|
|
289
|
+
query: CollectionsQueryBuilder;
|
|
290
|
+
next: () => Promise<CollectionsQueryResult>;
|
|
291
|
+
prev: () => Promise<CollectionsQueryResult>;
|
|
292
|
+
}
|
|
293
|
+
export interface CollectionsQueryBuilder {
|
|
294
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
295
|
+
* @param value - Value to compare against.
|
|
296
|
+
*/
|
|
297
|
+
eq: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
298
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
299
|
+
* @param value - Value to compare against.
|
|
300
|
+
*/
|
|
301
|
+
ne: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
302
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
303
|
+
* @param string - String to compare against. Case-insensitive.
|
|
304
|
+
*/
|
|
305
|
+
startsWith: (propertyName: '_id' | 'name', value: string) => CollectionsQueryBuilder;
|
|
306
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
307
|
+
* @param values - List of values to compare against.
|
|
308
|
+
*/
|
|
309
|
+
hasSome: (propertyName: '_id' | 'name', value: any[]) => CollectionsQueryBuilder;
|
|
310
|
+
in: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
311
|
+
exists: (propertyName: '_id' | 'name', value: boolean) => CollectionsQueryBuilder;
|
|
312
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
313
|
+
ascending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder;
|
|
314
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
315
|
+
descending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder;
|
|
316
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
317
|
+
limit: (limit: number) => CollectionsQueryBuilder;
|
|
318
|
+
/** @param skip - Number of items to skip in the query results before returning the results. */
|
|
319
|
+
skip: (skip: number) => CollectionsQueryBuilder;
|
|
320
|
+
find: () => Promise<CollectionsQueryResult>;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Retrieves a collection with the provided ID.
|
|
324
|
+
* @param _id - Requested collection ID.
|
|
325
|
+
* @public
|
|
326
|
+
* @requiredField _id
|
|
327
|
+
* @fqn wix.catalog.api.v2.CollectionReadApi.GetCollection
|
|
328
|
+
*/
|
|
329
|
+
export declare function getCollection(_id: string): Promise<Collection & CollectionNonNullableFields>;
|
|
330
|
+
/**
|
|
331
|
+
* Retrieves a collection with the provided slug.
|
|
332
|
+
* @param slug - Slug of the collection to retrieve.
|
|
333
|
+
* @public
|
|
334
|
+
* @requiredField slug
|
|
335
|
+
* @fqn wix.catalog.api.v2.CollectionReadApi.GetCollectionBySlug
|
|
336
|
+
*/
|
|
337
|
+
export declare function getCollectionBySlug(slug: string): Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
|
|
338
|
+
export {};
|