@wix/categories 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 +24 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/src/categories-v1-category.http.d.ts +54 -0
- package/build/cjs/src/categories-v1-category.http.js +790 -0
- package/build/cjs/src/categories-v1-category.http.js.map +1 -0
- package/build/cjs/src/categories-v1-category.public.d.ts +24 -0
- package/build/cjs/src/categories-v1-category.public.js +141 -0
- package/build/cjs/src/categories-v1-category.public.js.map +1 -0
- package/build/cjs/src/categories-v1-category.types.d.ts +1969 -0
- package/build/cjs/src/categories-v1-category.types.js +316 -0
- package/build/cjs/src/categories-v1-category.types.js.map +1 -0
- package/build/cjs/src/categories-v1-category.universal.d.ts +2429 -0
- package/build/cjs/src/categories-v1-category.universal.js +1457 -0
- package/build/cjs/src/categories-v1-category.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/src/categories-v1-category.http.d.ts +54 -0
- package/build/es/src/categories-v1-category.http.js +770 -0
- package/build/es/src/categories-v1-category.http.js.map +1 -0
- package/build/es/src/categories-v1-category.public.d.ts +24 -0
- package/build/es/src/categories-v1-category.public.js +89 -0
- package/build/es/src/categories-v1-category.public.js.map +1 -0
- package/build/es/src/categories-v1-category.types.d.ts +1969 -0
- package/build/es/src/categories-v1-category.types.js +313 -0
- package/build/es/src/categories-v1-category.types.js.map +1 -0
- package/build/es/src/categories-v1-category.universal.d.ts +2429 -0
- package/build/es/src/categories-v1-category.universal.js +1418 -0
- package/build/es/src/categories-v1-category.universal.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/metro-runtime';
|
|
2
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
3
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
4
|
+
const _addItemsToCategoryRequest = {};
|
|
5
|
+
const _addItemsToCategoryResponse = {};
|
|
6
|
+
const _addItemToCategoriesRequest = {};
|
|
7
|
+
const _addItemToCategoriesResponse = {};
|
|
8
|
+
const _appEmbedData = { image: '_media' };
|
|
9
|
+
const _audioData = { audio: '_media', coverImage: '_media' };
|
|
10
|
+
const _background = { image: '_media' };
|
|
11
|
+
const _bulkCategoriesResult = { category: '_category' };
|
|
12
|
+
const _bulkUpdateCategoriesRequest = { categories: '_maskedCategory' };
|
|
13
|
+
const _bulkUpdateCategoriesResponse = { results: '_bulkCategoriesResult' };
|
|
14
|
+
const _category = {
|
|
15
|
+
createdDate: 'google.protobuf.Timestamp',
|
|
16
|
+
updatedDate: 'google.protobuf.Timestamp',
|
|
17
|
+
image: '_image',
|
|
18
|
+
richContentDescription: '_richContent',
|
|
19
|
+
};
|
|
20
|
+
const _createCategoryRequest = { category: '_category' };
|
|
21
|
+
const _createCategoryResponse = { category: '_category' };
|
|
22
|
+
const _deleteCategoryRequest = {};
|
|
23
|
+
const _deleteCategoryResponse = {};
|
|
24
|
+
const _design = { poll: '_pollDesign' };
|
|
25
|
+
const _galleryData = { items: '_item', options: '_galleryOptions' };
|
|
26
|
+
const _galleryOptions = { item: '_itemStyle' };
|
|
27
|
+
const _getArrangedItemsRequest = {};
|
|
28
|
+
const _getArrangedItemsResponse = {};
|
|
29
|
+
const _getCategoryRequest = {};
|
|
30
|
+
const _getCategoryResponse = { category: '_category' };
|
|
31
|
+
const _image = { urlExpirationDate: 'google.protobuf.Timestamp' };
|
|
32
|
+
const _imageData = { image: '_media' };
|
|
33
|
+
const _item = { image: '_itemImage', video: '_video' };
|
|
34
|
+
const _itemImage = { media: '_media' };
|
|
35
|
+
const _itemStyle = { ratio: 'google.protobuf.DoubleValue' };
|
|
36
|
+
const _listCategoriesForItemRequest = {};
|
|
37
|
+
const _listCategoriesForItemResponse = {};
|
|
38
|
+
const _listItemsInCategoryRequest = {};
|
|
39
|
+
const _listItemsInCategoryResponse = {};
|
|
40
|
+
const _mapData = { mapSettings: '_mapSettings' };
|
|
41
|
+
const _mapSettings = {
|
|
42
|
+
lat: 'google.protobuf.DoubleValue',
|
|
43
|
+
lng: 'google.protobuf.DoubleValue',
|
|
44
|
+
};
|
|
45
|
+
const _maskedCategory = {
|
|
46
|
+
fieldMask: 'google.protobuf.FieldMask',
|
|
47
|
+
category: '_category',
|
|
48
|
+
};
|
|
49
|
+
const _media = { duration: 'google.protobuf.DoubleValue' };
|
|
50
|
+
const _metadata = {
|
|
51
|
+
createdTimestamp: 'google.protobuf.Timestamp',
|
|
52
|
+
updatedTimestamp: 'google.protobuf.Timestamp',
|
|
53
|
+
};
|
|
54
|
+
const _moveItemInCategoryRequest = {};
|
|
55
|
+
const _moveItemInCategoryResponse = {};
|
|
56
|
+
const _node = {
|
|
57
|
+
galleryData: '_galleryData',
|
|
58
|
+
imageData: '_imageData',
|
|
59
|
+
mapData: '_mapData',
|
|
60
|
+
pollData: '_pollData',
|
|
61
|
+
appEmbedData: '_appEmbedData',
|
|
62
|
+
videoData: '_videoData',
|
|
63
|
+
audioData: '_audioData',
|
|
64
|
+
nodes: '_node',
|
|
65
|
+
};
|
|
66
|
+
const _option = { image: '_media' };
|
|
67
|
+
const _placeCategoryInParentCategoryRequest = {};
|
|
68
|
+
const _placeCategoryInParentCategoryResponse = {};
|
|
69
|
+
const _poll = { image: '_media', options: '_option' };
|
|
70
|
+
const _pollData = { poll: '_poll', design: '_design' };
|
|
71
|
+
const _pollDesign = { background: '_background' };
|
|
72
|
+
const _queryCategoriesRequest = {};
|
|
73
|
+
const _queryCategoriesResponse = { categories: '_category' };
|
|
74
|
+
const _removeItemFromCategoriesRequest = {};
|
|
75
|
+
const _removeItemFromCategoriesResponse = {};
|
|
76
|
+
const _removeItemsFromCategoryRequest = {};
|
|
77
|
+
const _removeItemsFromCategoryResponse = {};
|
|
78
|
+
const _richContent = { nodes: '_node', metadata: '_metadata' };
|
|
79
|
+
const _setArrangedItemsRequest = {};
|
|
80
|
+
const _setArrangedItemsResponse = {};
|
|
81
|
+
const _updateCategoryRequest = {
|
|
82
|
+
fieldMask: 'google.protobuf.FieldMask',
|
|
83
|
+
category: '_category',
|
|
84
|
+
};
|
|
85
|
+
const _updateCategoryResponse = { category: '_category' };
|
|
86
|
+
const _updateCategoryVisibilityRequest = {};
|
|
87
|
+
const _updateCategoryVisibilityResponse = { category: '_category' };
|
|
88
|
+
const _video = { media: '_media', thumbnail: '_media' };
|
|
89
|
+
const _videoData = { video: '_media', thumbnail: '_media' };
|
|
90
|
+
function resolveComWixCategoriesApiV1CategoriesServiceUrl(opts) {
|
|
91
|
+
const domainToMappings = {
|
|
92
|
+
'*.dev.wix-code.com': [
|
|
93
|
+
{
|
|
94
|
+
srcPath: '/_api/categories',
|
|
95
|
+
destPath: '',
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
'www.wixapis.com': [
|
|
99
|
+
{
|
|
100
|
+
srcPath: '/categories/v1/bulk/categories',
|
|
101
|
+
destPath: '/v1/bulk/categories',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
srcPath: '/categories/v1/categories',
|
|
105
|
+
destPath: '/v1/categories',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
'manage._base_domain_': [
|
|
109
|
+
{
|
|
110
|
+
srcPath: '/_api/categories',
|
|
111
|
+
destPath: '',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
};
|
|
115
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
116
|
+
}
|
|
117
|
+
/** Creates a new Category. */
|
|
118
|
+
export function createCategory(payload) {
|
|
119
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createCategoryRequest, {
|
|
120
|
+
_appEmbedData,
|
|
121
|
+
_audioData,
|
|
122
|
+
_background,
|
|
123
|
+
_category,
|
|
124
|
+
_design,
|
|
125
|
+
_galleryData,
|
|
126
|
+
_galleryOptions,
|
|
127
|
+
_image,
|
|
128
|
+
_imageData,
|
|
129
|
+
_item,
|
|
130
|
+
_itemImage,
|
|
131
|
+
_itemStyle,
|
|
132
|
+
_mapData,
|
|
133
|
+
_mapSettings,
|
|
134
|
+
_media,
|
|
135
|
+
_metadata,
|
|
136
|
+
_node,
|
|
137
|
+
_option,
|
|
138
|
+
_poll,
|
|
139
|
+
_pollData,
|
|
140
|
+
_pollDesign,
|
|
141
|
+
_richContent,
|
|
142
|
+
_video,
|
|
143
|
+
_videoData,
|
|
144
|
+
});
|
|
145
|
+
const { fromJSON: fromRes } = serializer(_createCategoryResponse, {
|
|
146
|
+
_appEmbedData,
|
|
147
|
+
_audioData,
|
|
148
|
+
_background,
|
|
149
|
+
_category,
|
|
150
|
+
_design,
|
|
151
|
+
_galleryData,
|
|
152
|
+
_galleryOptions,
|
|
153
|
+
_image,
|
|
154
|
+
_imageData,
|
|
155
|
+
_item,
|
|
156
|
+
_itemImage,
|
|
157
|
+
_itemStyle,
|
|
158
|
+
_mapData,
|
|
159
|
+
_mapSettings,
|
|
160
|
+
_media,
|
|
161
|
+
_metadata,
|
|
162
|
+
_node,
|
|
163
|
+
_option,
|
|
164
|
+
_poll,
|
|
165
|
+
_pollData,
|
|
166
|
+
_pollDesign,
|
|
167
|
+
_richContent,
|
|
168
|
+
_video,
|
|
169
|
+
_videoData,
|
|
170
|
+
});
|
|
171
|
+
function __createCategory({ host }) {
|
|
172
|
+
const serializedData = toReq(payload);
|
|
173
|
+
const metadata = {
|
|
174
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
175
|
+
method: 'POST',
|
|
176
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.CreateCategory',
|
|
177
|
+
isReadOnly: false,
|
|
178
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
179
|
+
protoPath: '/v1/categories',
|
|
180
|
+
data: serializedData,
|
|
181
|
+
host,
|
|
182
|
+
}),
|
|
183
|
+
data: serializedData,
|
|
184
|
+
transformResponse: fromRes,
|
|
185
|
+
};
|
|
186
|
+
return metadata;
|
|
187
|
+
}
|
|
188
|
+
__createCategory.fromReq = fromReq;
|
|
189
|
+
return __createCategory;
|
|
190
|
+
}
|
|
191
|
+
/** Retrieves a category with the provided ID. */
|
|
192
|
+
export function getCategory(payload) {
|
|
193
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getCategoryRequest, {});
|
|
194
|
+
const { fromJSON: fromRes } = serializer(_getCategoryResponse, {
|
|
195
|
+
_appEmbedData,
|
|
196
|
+
_audioData,
|
|
197
|
+
_background,
|
|
198
|
+
_category,
|
|
199
|
+
_design,
|
|
200
|
+
_galleryData,
|
|
201
|
+
_galleryOptions,
|
|
202
|
+
_image,
|
|
203
|
+
_imageData,
|
|
204
|
+
_item,
|
|
205
|
+
_itemImage,
|
|
206
|
+
_itemStyle,
|
|
207
|
+
_mapData,
|
|
208
|
+
_mapSettings,
|
|
209
|
+
_media,
|
|
210
|
+
_metadata,
|
|
211
|
+
_node,
|
|
212
|
+
_option,
|
|
213
|
+
_poll,
|
|
214
|
+
_pollData,
|
|
215
|
+
_pollDesign,
|
|
216
|
+
_richContent,
|
|
217
|
+
_video,
|
|
218
|
+
_videoData,
|
|
219
|
+
});
|
|
220
|
+
function __getCategory({ host }) {
|
|
221
|
+
const serializedData = toReq(payload);
|
|
222
|
+
const metadata = {
|
|
223
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
224
|
+
method: 'GET',
|
|
225
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.GetCategory',
|
|
226
|
+
isReadOnly: false,
|
|
227
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
228
|
+
protoPath: '/v1/categories/{categoryId}',
|
|
229
|
+
data: serializedData,
|
|
230
|
+
host,
|
|
231
|
+
}),
|
|
232
|
+
params: toURLSearchParams(serializedData),
|
|
233
|
+
transformResponse: fromRes,
|
|
234
|
+
};
|
|
235
|
+
return metadata;
|
|
236
|
+
}
|
|
237
|
+
__getCategory.fromReq = fromReq;
|
|
238
|
+
return __getCategory;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Update a Category, supports partial update.
|
|
242
|
+
* Pass the latest `revision` for a successful update.
|
|
243
|
+
* Each time the category is updated, `revision` increments by 1.
|
|
244
|
+
*/
|
|
245
|
+
export function updateCategory(payload) {
|
|
246
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateCategoryRequest, {
|
|
247
|
+
_appEmbedData,
|
|
248
|
+
_audioData,
|
|
249
|
+
_background,
|
|
250
|
+
_category,
|
|
251
|
+
_design,
|
|
252
|
+
_galleryData,
|
|
253
|
+
_galleryOptions,
|
|
254
|
+
_image,
|
|
255
|
+
_imageData,
|
|
256
|
+
_item,
|
|
257
|
+
_itemImage,
|
|
258
|
+
_itemStyle,
|
|
259
|
+
_mapData,
|
|
260
|
+
_mapSettings,
|
|
261
|
+
_media,
|
|
262
|
+
_metadata,
|
|
263
|
+
_node,
|
|
264
|
+
_option,
|
|
265
|
+
_poll,
|
|
266
|
+
_pollData,
|
|
267
|
+
_pollDesign,
|
|
268
|
+
_richContent,
|
|
269
|
+
_video,
|
|
270
|
+
_videoData,
|
|
271
|
+
});
|
|
272
|
+
const { fromJSON: fromRes } = serializer(_updateCategoryResponse, {
|
|
273
|
+
_appEmbedData,
|
|
274
|
+
_audioData,
|
|
275
|
+
_background,
|
|
276
|
+
_category,
|
|
277
|
+
_design,
|
|
278
|
+
_galleryData,
|
|
279
|
+
_galleryOptions,
|
|
280
|
+
_image,
|
|
281
|
+
_imageData,
|
|
282
|
+
_item,
|
|
283
|
+
_itemImage,
|
|
284
|
+
_itemStyle,
|
|
285
|
+
_mapData,
|
|
286
|
+
_mapSettings,
|
|
287
|
+
_media,
|
|
288
|
+
_metadata,
|
|
289
|
+
_node,
|
|
290
|
+
_option,
|
|
291
|
+
_poll,
|
|
292
|
+
_pollData,
|
|
293
|
+
_pollDesign,
|
|
294
|
+
_richContent,
|
|
295
|
+
_video,
|
|
296
|
+
_videoData,
|
|
297
|
+
});
|
|
298
|
+
function __updateCategory({ host }) {
|
|
299
|
+
const serializedData = toReq(payload);
|
|
300
|
+
const metadata = {
|
|
301
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
302
|
+
method: 'PATCH',
|
|
303
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.UpdateCategory',
|
|
304
|
+
isReadOnly: false,
|
|
305
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
306
|
+
protoPath: '/v1/categories/{category.id}',
|
|
307
|
+
data: serializedData,
|
|
308
|
+
host,
|
|
309
|
+
}),
|
|
310
|
+
data: serializedData,
|
|
311
|
+
transformResponse: fromRes,
|
|
312
|
+
};
|
|
313
|
+
return metadata;
|
|
314
|
+
}
|
|
315
|
+
__updateCategory.fromReq = fromReq;
|
|
316
|
+
return __updateCategory;
|
|
317
|
+
}
|
|
318
|
+
/** Deletes a Category. */
|
|
319
|
+
export function deleteCategory(payload) {
|
|
320
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteCategoryRequest, {});
|
|
321
|
+
const { fromJSON: fromRes } = serializer(_deleteCategoryResponse, {});
|
|
322
|
+
function __deleteCategory({ host }) {
|
|
323
|
+
const serializedData = toReq(payload);
|
|
324
|
+
const metadata = {
|
|
325
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
326
|
+
method: 'DELETE',
|
|
327
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.DeleteCategory',
|
|
328
|
+
isReadOnly: false,
|
|
329
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
330
|
+
protoPath: '/v1/categories/{categoryId}',
|
|
331
|
+
data: serializedData,
|
|
332
|
+
host,
|
|
333
|
+
}),
|
|
334
|
+
params: toURLSearchParams(serializedData),
|
|
335
|
+
transformResponse: fromRes,
|
|
336
|
+
};
|
|
337
|
+
return metadata;
|
|
338
|
+
}
|
|
339
|
+
__deleteCategory.fromReq = fromReq;
|
|
340
|
+
return __deleteCategory;
|
|
341
|
+
}
|
|
342
|
+
/** Query Categories using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) */
|
|
343
|
+
export function queryCategories(payload) {
|
|
344
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_queryCategoriesRequest, {});
|
|
345
|
+
const { fromJSON: fromRes } = serializer(_queryCategoriesResponse, {
|
|
346
|
+
_appEmbedData,
|
|
347
|
+
_audioData,
|
|
348
|
+
_background,
|
|
349
|
+
_category,
|
|
350
|
+
_design,
|
|
351
|
+
_galleryData,
|
|
352
|
+
_galleryOptions,
|
|
353
|
+
_image,
|
|
354
|
+
_imageData,
|
|
355
|
+
_item,
|
|
356
|
+
_itemImage,
|
|
357
|
+
_itemStyle,
|
|
358
|
+
_mapData,
|
|
359
|
+
_mapSettings,
|
|
360
|
+
_media,
|
|
361
|
+
_metadata,
|
|
362
|
+
_node,
|
|
363
|
+
_option,
|
|
364
|
+
_poll,
|
|
365
|
+
_pollData,
|
|
366
|
+
_pollDesign,
|
|
367
|
+
_richContent,
|
|
368
|
+
_video,
|
|
369
|
+
_videoData,
|
|
370
|
+
});
|
|
371
|
+
function __queryCategories({ host }) {
|
|
372
|
+
const serializedData = toReq(payload);
|
|
373
|
+
const metadata = {
|
|
374
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
375
|
+
method: 'POST',
|
|
376
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.QueryCategories',
|
|
377
|
+
isReadOnly: false,
|
|
378
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
379
|
+
protoPath: '/v1/categories/query',
|
|
380
|
+
data: serializedData,
|
|
381
|
+
host,
|
|
382
|
+
}),
|
|
383
|
+
data: serializedData,
|
|
384
|
+
transformResponse: fromRes,
|
|
385
|
+
};
|
|
386
|
+
return metadata;
|
|
387
|
+
}
|
|
388
|
+
__queryCategories.fromReq = fromReq;
|
|
389
|
+
return __queryCategories;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Places category in parent category.
|
|
393
|
+
* This operation updates `parentCategory` (`id` and `index`) for category with `categoryId` in tree with `treeId`.
|
|
394
|
+
* This endpoint can be used to move category to different parent in the same tree or to change it's position in current parent.
|
|
395
|
+
*/
|
|
396
|
+
export function placeCategoryInParentCategory(payload) {
|
|
397
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_placeCategoryInParentCategoryRequest, {});
|
|
398
|
+
const { fromJSON: fromRes } = serializer(_placeCategoryInParentCategoryResponse, {});
|
|
399
|
+
function __placeCategoryInParentCategory({ host }) {
|
|
400
|
+
const serializedData = toReq(payload);
|
|
401
|
+
const metadata = {
|
|
402
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
403
|
+
method: 'POST',
|
|
404
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.PlaceCategoryInParentCategory',
|
|
405
|
+
isReadOnly: false,
|
|
406
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
407
|
+
protoPath: '/v1/categories/{categoryId}/place-in-parent-category',
|
|
408
|
+
data: serializedData,
|
|
409
|
+
host,
|
|
410
|
+
}),
|
|
411
|
+
data: serializedData,
|
|
412
|
+
transformResponse: fromRes,
|
|
413
|
+
};
|
|
414
|
+
return metadata;
|
|
415
|
+
}
|
|
416
|
+
__placeCategoryInParentCategory.fromReq = fromReq;
|
|
417
|
+
return __placeCategoryInParentCategory;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Update multiple Categories, supports partial update.
|
|
421
|
+
* Pass the latest `revision` for a successful update.
|
|
422
|
+
* To update visibility, call the BulkUpdateCategoryVisibility endpoint.
|
|
423
|
+
*/
|
|
424
|
+
export function bulkUpdateCategories(payload) {
|
|
425
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_bulkUpdateCategoriesRequest, {
|
|
426
|
+
_appEmbedData,
|
|
427
|
+
_audioData,
|
|
428
|
+
_background,
|
|
429
|
+
_category,
|
|
430
|
+
_design,
|
|
431
|
+
_galleryData,
|
|
432
|
+
_galleryOptions,
|
|
433
|
+
_image,
|
|
434
|
+
_imageData,
|
|
435
|
+
_item,
|
|
436
|
+
_itemImage,
|
|
437
|
+
_itemStyle,
|
|
438
|
+
_mapData,
|
|
439
|
+
_mapSettings,
|
|
440
|
+
_maskedCategory,
|
|
441
|
+
_media,
|
|
442
|
+
_metadata,
|
|
443
|
+
_node,
|
|
444
|
+
_option,
|
|
445
|
+
_poll,
|
|
446
|
+
_pollData,
|
|
447
|
+
_pollDesign,
|
|
448
|
+
_richContent,
|
|
449
|
+
_video,
|
|
450
|
+
_videoData,
|
|
451
|
+
});
|
|
452
|
+
const { fromJSON: fromRes } = serializer(_bulkUpdateCategoriesResponse, {
|
|
453
|
+
_appEmbedData,
|
|
454
|
+
_audioData,
|
|
455
|
+
_background,
|
|
456
|
+
_bulkCategoriesResult,
|
|
457
|
+
_category,
|
|
458
|
+
_design,
|
|
459
|
+
_galleryData,
|
|
460
|
+
_galleryOptions,
|
|
461
|
+
_image,
|
|
462
|
+
_imageData,
|
|
463
|
+
_item,
|
|
464
|
+
_itemImage,
|
|
465
|
+
_itemStyle,
|
|
466
|
+
_mapData,
|
|
467
|
+
_mapSettings,
|
|
468
|
+
_media,
|
|
469
|
+
_metadata,
|
|
470
|
+
_node,
|
|
471
|
+
_option,
|
|
472
|
+
_poll,
|
|
473
|
+
_pollData,
|
|
474
|
+
_pollDesign,
|
|
475
|
+
_richContent,
|
|
476
|
+
_video,
|
|
477
|
+
_videoData,
|
|
478
|
+
});
|
|
479
|
+
function __bulkUpdateCategories({ host }) {
|
|
480
|
+
const serializedData = toReq(payload);
|
|
481
|
+
const metadata = {
|
|
482
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
483
|
+
method: 'POST',
|
|
484
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.BulkUpdateCategories',
|
|
485
|
+
isReadOnly: false,
|
|
486
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
487
|
+
protoPath: '/v1/bulk/categories/update',
|
|
488
|
+
data: serializedData,
|
|
489
|
+
host,
|
|
490
|
+
}),
|
|
491
|
+
data: serializedData,
|
|
492
|
+
transformResponse: fromRes,
|
|
493
|
+
};
|
|
494
|
+
return metadata;
|
|
495
|
+
}
|
|
496
|
+
__bulkUpdateCategories.fromReq = fromReq;
|
|
497
|
+
return __bulkUpdateCategories;
|
|
498
|
+
}
|
|
499
|
+
/** Update `visible` field. If visible is set to false, all subcategories will be set to `visible=false` */
|
|
500
|
+
export function updateCategoryVisibility(payload) {
|
|
501
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateCategoryVisibilityRequest, {});
|
|
502
|
+
const { fromJSON: fromRes } = serializer(_updateCategoryVisibilityResponse, {
|
|
503
|
+
_appEmbedData,
|
|
504
|
+
_audioData,
|
|
505
|
+
_background,
|
|
506
|
+
_category,
|
|
507
|
+
_design,
|
|
508
|
+
_galleryData,
|
|
509
|
+
_galleryOptions,
|
|
510
|
+
_image,
|
|
511
|
+
_imageData,
|
|
512
|
+
_item,
|
|
513
|
+
_itemImage,
|
|
514
|
+
_itemStyle,
|
|
515
|
+
_mapData,
|
|
516
|
+
_mapSettings,
|
|
517
|
+
_media,
|
|
518
|
+
_metadata,
|
|
519
|
+
_node,
|
|
520
|
+
_option,
|
|
521
|
+
_poll,
|
|
522
|
+
_pollData,
|
|
523
|
+
_pollDesign,
|
|
524
|
+
_richContent,
|
|
525
|
+
_video,
|
|
526
|
+
_videoData,
|
|
527
|
+
});
|
|
528
|
+
function __updateCategoryVisibility({ host }) {
|
|
529
|
+
const serializedData = toReq(payload);
|
|
530
|
+
const metadata = {
|
|
531
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
532
|
+
method: 'PATCH',
|
|
533
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.UpdateCategoryVisibility',
|
|
534
|
+
isReadOnly: false,
|
|
535
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
536
|
+
protoPath: '/v1/categories/visibility',
|
|
537
|
+
data: serializedData,
|
|
538
|
+
host,
|
|
539
|
+
}),
|
|
540
|
+
data: serializedData,
|
|
541
|
+
transformResponse: fromRes,
|
|
542
|
+
};
|
|
543
|
+
return metadata;
|
|
544
|
+
}
|
|
545
|
+
__updateCategoryVisibility.fromReq = fromReq;
|
|
546
|
+
return __updateCategoryVisibility;
|
|
547
|
+
}
|
|
548
|
+
/** Adds multiple items to single category, fires as many domain events as many items successfully added. */
|
|
549
|
+
export function addItemsToCategory(payload) {
|
|
550
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_addItemsToCategoryRequest, {});
|
|
551
|
+
const { fromJSON: fromRes } = serializer(_addItemsToCategoryResponse, {});
|
|
552
|
+
function __addItemsToCategory({ host }) {
|
|
553
|
+
const serializedData = toReq(payload);
|
|
554
|
+
const metadata = {
|
|
555
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
556
|
+
method: 'POST',
|
|
557
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.AddItemsToCategory',
|
|
558
|
+
isReadOnly: false,
|
|
559
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
560
|
+
protoPath: '/v1/categories/{categoryId}/add-items',
|
|
561
|
+
data: serializedData,
|
|
562
|
+
host,
|
|
563
|
+
}),
|
|
564
|
+
data: serializedData,
|
|
565
|
+
transformResponse: fromRes,
|
|
566
|
+
};
|
|
567
|
+
return metadata;
|
|
568
|
+
}
|
|
569
|
+
__addItemsToCategory.fromReq = fromReq;
|
|
570
|
+
return __addItemsToCategory;
|
|
571
|
+
}
|
|
572
|
+
/** Adds single item to multiple categories, fires as many domain events as many categories were successfully added. */
|
|
573
|
+
export function addItemToCategories(payload) {
|
|
574
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_addItemToCategoriesRequest, {});
|
|
575
|
+
const { fromJSON: fromRes } = serializer(_addItemToCategoriesResponse, {});
|
|
576
|
+
function __addItemToCategories({ host }) {
|
|
577
|
+
const serializedData = toReq(payload);
|
|
578
|
+
const metadata = {
|
|
579
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
580
|
+
method: 'POST',
|
|
581
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.AddItemToCategories',
|
|
582
|
+
isReadOnly: false,
|
|
583
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
584
|
+
protoPath: '/v1/categories/add-item-to-categories',
|
|
585
|
+
data: serializedData,
|
|
586
|
+
host,
|
|
587
|
+
}),
|
|
588
|
+
data: serializedData,
|
|
589
|
+
transformResponse: fromRes,
|
|
590
|
+
};
|
|
591
|
+
return metadata;
|
|
592
|
+
}
|
|
593
|
+
__addItemToCategories.fromReq = fromReq;
|
|
594
|
+
return __addItemToCategories;
|
|
595
|
+
}
|
|
596
|
+
/** Removed multiple items from single category, fires as many domain events as many items successfully removed. */
|
|
597
|
+
export function removeItemsFromCategory(payload) {
|
|
598
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_removeItemsFromCategoryRequest, {});
|
|
599
|
+
const { fromJSON: fromRes } = serializer(_removeItemsFromCategoryResponse, {});
|
|
600
|
+
function __removeItemsFromCategory({ host }) {
|
|
601
|
+
const serializedData = toReq(payload);
|
|
602
|
+
const metadata = {
|
|
603
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
604
|
+
method: 'POST',
|
|
605
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.RemoveItemsFromCategory',
|
|
606
|
+
isReadOnly: false,
|
|
607
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
608
|
+
protoPath: '/v1/categories/{categoryId}/remove-items',
|
|
609
|
+
data: serializedData,
|
|
610
|
+
host,
|
|
611
|
+
}),
|
|
612
|
+
data: serializedData,
|
|
613
|
+
transformResponse: fromRes,
|
|
614
|
+
};
|
|
615
|
+
return metadata;
|
|
616
|
+
}
|
|
617
|
+
__removeItemsFromCategory.fromReq = fromReq;
|
|
618
|
+
return __removeItemsFromCategory;
|
|
619
|
+
}
|
|
620
|
+
/** Removes single item from multiple categories, fires as many domain events as many categories were successfully removed. */
|
|
621
|
+
export function removeItemFromCategories(payload) {
|
|
622
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_removeItemFromCategoriesRequest, {});
|
|
623
|
+
const { fromJSON: fromRes } = serializer(_removeItemFromCategoriesResponse, {});
|
|
624
|
+
function __removeItemFromCategories({ host }) {
|
|
625
|
+
const serializedData = toReq(payload);
|
|
626
|
+
const metadata = {
|
|
627
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
628
|
+
method: 'POST',
|
|
629
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.RemoveItemFromCategories',
|
|
630
|
+
isReadOnly: false,
|
|
631
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
632
|
+
protoPath: '/v1/categories/remove-item-from-categories',
|
|
633
|
+
data: serializedData,
|
|
634
|
+
host,
|
|
635
|
+
}),
|
|
636
|
+
data: serializedData,
|
|
637
|
+
transformResponse: fromRes,
|
|
638
|
+
};
|
|
639
|
+
return metadata;
|
|
640
|
+
}
|
|
641
|
+
__removeItemFromCategories.fromReq = fromReq;
|
|
642
|
+
return __removeItemFromCategories;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Returns up to 100 items related to requested `category_id` sorted by time when item added to category, descending.
|
|
646
|
+
* When items added to category in bulk they considered as added at exactly same time so order will be random but always the same.
|
|
647
|
+
*/
|
|
648
|
+
export function listItemsInCategory(payload) {
|
|
649
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listItemsInCategoryRequest, {});
|
|
650
|
+
const { fromJSON: fromRes } = serializer(_listItemsInCategoryResponse, {});
|
|
651
|
+
function __listItemsInCategory({ host }) {
|
|
652
|
+
const serializedData = toReq(payload);
|
|
653
|
+
const metadata = {
|
|
654
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
655
|
+
method: 'GET',
|
|
656
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.ListItemsInCategory',
|
|
657
|
+
isReadOnly: false,
|
|
658
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
659
|
+
protoPath: '/v1/categories/{categoryId}/list-items',
|
|
660
|
+
data: serializedData,
|
|
661
|
+
host,
|
|
662
|
+
}),
|
|
663
|
+
params: toURLSearchParams(serializedData),
|
|
664
|
+
transformResponse: fromRes,
|
|
665
|
+
};
|
|
666
|
+
return metadata;
|
|
667
|
+
}
|
|
668
|
+
__listItemsInCategory.fromReq = fromReq;
|
|
669
|
+
return __listItemsInCategory;
|
|
670
|
+
}
|
|
671
|
+
/** Returns all category IDs that contain the item and their parent category IDs. */
|
|
672
|
+
export function listCategoriesForItem(payload) {
|
|
673
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listCategoriesForItemRequest, {});
|
|
674
|
+
const { fromJSON: fromRes } = serializer(_listCategoriesForItemResponse, {});
|
|
675
|
+
function __listCategoriesForItem({ host }) {
|
|
676
|
+
const serializedData = toReq(payload);
|
|
677
|
+
const metadata = {
|
|
678
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
679
|
+
method: 'GET',
|
|
680
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.ListCategoriesForItem',
|
|
681
|
+
isReadOnly: false,
|
|
682
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
683
|
+
protoPath: '/v1/categories/list-categories-for-item',
|
|
684
|
+
data: serializedData,
|
|
685
|
+
host,
|
|
686
|
+
}),
|
|
687
|
+
params: toURLSearchParams(serializedData),
|
|
688
|
+
transformResponse: fromRes,
|
|
689
|
+
};
|
|
690
|
+
return metadata;
|
|
691
|
+
}
|
|
692
|
+
__listCategoriesForItem.fromReq = fromReq;
|
|
693
|
+
return __listCategoriesForItem;
|
|
694
|
+
}
|
|
695
|
+
/** Changes position of `item` in category. Will be used when sort items by manual arrangement */
|
|
696
|
+
export function moveItemInCategory(payload) {
|
|
697
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_moveItemInCategoryRequest, {});
|
|
698
|
+
const { fromJSON: fromRes } = serializer(_moveItemInCategoryResponse, {});
|
|
699
|
+
function __moveItemInCategory({ host }) {
|
|
700
|
+
const serializedData = toReq(payload);
|
|
701
|
+
const metadata = {
|
|
702
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
703
|
+
method: 'POST',
|
|
704
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.MoveItemInCategory',
|
|
705
|
+
isReadOnly: false,
|
|
706
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
707
|
+
protoPath: '/v1/categories/{categoryId}/move-item',
|
|
708
|
+
data: serializedData,
|
|
709
|
+
host,
|
|
710
|
+
}),
|
|
711
|
+
data: serializedData,
|
|
712
|
+
transformResponse: fromRes,
|
|
713
|
+
};
|
|
714
|
+
return metadata;
|
|
715
|
+
}
|
|
716
|
+
__moveItemInCategory.fromReq = fromReq;
|
|
717
|
+
return __moveItemInCategory;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* Set arranged items in category. Will be used when sort items by manual arrangement.
|
|
721
|
+
* Calling this endpoint overrides existing list of arranged items in category.
|
|
722
|
+
*/
|
|
723
|
+
export function setArrangedItems(payload) {
|
|
724
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_setArrangedItemsRequest, {});
|
|
725
|
+
const { fromJSON: fromRes } = serializer(_setArrangedItemsResponse, {});
|
|
726
|
+
function __setArrangedItems({ host }) {
|
|
727
|
+
const serializedData = toReq(payload);
|
|
728
|
+
const metadata = {
|
|
729
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
730
|
+
method: 'POST',
|
|
731
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.SetArrangedItems',
|
|
732
|
+
isReadOnly: false,
|
|
733
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
734
|
+
protoPath: '/v1/categories/{categoryId}/set-arranged-items',
|
|
735
|
+
data: serializedData,
|
|
736
|
+
host,
|
|
737
|
+
}),
|
|
738
|
+
data: serializedData,
|
|
739
|
+
transformResponse: fromRes,
|
|
740
|
+
};
|
|
741
|
+
return metadata;
|
|
742
|
+
}
|
|
743
|
+
__setArrangedItems.fromReq = fromReq;
|
|
744
|
+
return __setArrangedItems;
|
|
745
|
+
}
|
|
746
|
+
/** Returns arranged items in category */
|
|
747
|
+
export function getArrangedItems(payload) {
|
|
748
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getArrangedItemsRequest, {});
|
|
749
|
+
const { fromJSON: fromRes } = serializer(_getArrangedItemsResponse, {});
|
|
750
|
+
function __getArrangedItems({ host }) {
|
|
751
|
+
const serializedData = toReq(payload);
|
|
752
|
+
const metadata = {
|
|
753
|
+
entityFqdn: 'wix.categories.v1.category',
|
|
754
|
+
method: 'GET',
|
|
755
|
+
methodFqn: 'com.wix.categories.api.v1.CategoriesService.GetArrangedItems',
|
|
756
|
+
isReadOnly: false,
|
|
757
|
+
url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
|
|
758
|
+
protoPath: '/v1/categories/{categoryId}/arranged-items',
|
|
759
|
+
data: serializedData,
|
|
760
|
+
host,
|
|
761
|
+
}),
|
|
762
|
+
params: toURLSearchParams(serializedData),
|
|
763
|
+
transformResponse: fromRes,
|
|
764
|
+
};
|
|
765
|
+
return metadata;
|
|
766
|
+
}
|
|
767
|
+
__getArrangedItems.fromReq = fromReq;
|
|
768
|
+
return __getArrangedItems;
|
|
769
|
+
}
|
|
770
|
+
//# sourceMappingURL=categories-v1-category.http.js.map
|