@wix/categories 1.0.23 → 1.0.25

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.
Files changed (55) hide show
  1. package/build/cjs/context.d.ts +1 -0
  2. package/build/cjs/{index.typings.js → context.js} +7 -3
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +1 -1
  5. package/build/cjs/index.js +6 -2
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1 -1
  8. package/build/cjs/meta.js +6 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +1 -0
  11. package/build/es/context.js +2 -0
  12. package/build/es/context.js.map +1 -0
  13. package/build/es/index.d.ts +1 -1
  14. package/build/es/index.js +1 -1
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +1 -1
  17. package/build/es/meta.js +1 -1
  18. package/build/es/meta.js.map +1 -1
  19. package/context/package.json +6 -0
  20. package/package.json +15 -7
  21. package/build/cjs/index.typings.d.ts +0 -1
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/categories-v1-category.http.d.ts +0 -56
  24. package/build/cjs/src/categories-v1-category.http.js +0 -866
  25. package/build/cjs/src/categories-v1-category.http.js.map +0 -1
  26. package/build/cjs/src/categories-v1-category.meta.d.ts +0 -50
  27. package/build/cjs/src/categories-v1-category.meta.js +0 -366
  28. package/build/cjs/src/categories-v1-category.meta.js.map +0 -1
  29. package/build/cjs/src/categories-v1-category.public.d.ts +0 -1453
  30. package/build/cjs/src/categories-v1-category.public.js +0 -156
  31. package/build/cjs/src/categories-v1-category.public.js.map +0 -1
  32. package/build/cjs/src/categories-v1-category.types.d.ts +0 -5621
  33. package/build/cjs/src/categories-v1-category.types.js +0 -375
  34. package/build/cjs/src/categories-v1-category.types.js.map +0 -1
  35. package/build/cjs/src/categories-v1-category.universal.d.ts +0 -5903
  36. package/build/cjs/src/categories-v1-category.universal.js +0 -1575
  37. package/build/cjs/src/categories-v1-category.universal.js.map +0 -1
  38. package/build/es/index.typings.d.ts +0 -1
  39. package/build/es/index.typings.js +0 -2
  40. package/build/es/index.typings.js.map +0 -1
  41. package/build/es/src/categories-v1-category.http.d.ts +0 -56
  42. package/build/es/src/categories-v1-category.http.js +0 -845
  43. package/build/es/src/categories-v1-category.http.js.map +0 -1
  44. package/build/es/src/categories-v1-category.meta.d.ts +0 -50
  45. package/build/es/src/categories-v1-category.meta.js +0 -326
  46. package/build/es/src/categories-v1-category.meta.js.map +0 -1
  47. package/build/es/src/categories-v1-category.public.d.ts +0 -1453
  48. package/build/es/src/categories-v1-category.public.js +0 -94
  49. package/build/es/src/categories-v1-category.public.js.map +0 -1
  50. package/build/es/src/categories-v1-category.types.d.ts +0 -5621
  51. package/build/es/src/categories-v1-category.types.js +0 -372
  52. package/build/es/src/categories-v1-category.types.js.map +0 -1
  53. package/build/es/src/categories-v1-category.universal.d.ts +0 -5903
  54. package/build/es/src/categories-v1-category.universal.js +0 -1534
  55. package/build/es/src/categories-v1-category.universal.js.map +0 -1
@@ -1,1534 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- import { serializer, transformError } from '@wix/metro-runtime/velo';
11
- import * as ambassadorWixCategoriesV1Category from './categories-v1-category.http';
12
- // @ts-ignore
13
- let __verbose = false;
14
- function __log(...args) {
15
- __verbose && console.log(...args);
16
- }
17
- function __inspect(obj) {
18
- return obj;
19
- }
20
- export const __debug = {
21
- verboseLogging: {
22
- on: () => (__verbose = true),
23
- off: () => (__verbose = false),
24
- },
25
- };
26
- const _toVeloEntity = '$';
27
- const _fromVeloEntity = '$';
28
- export var NodeType;
29
- (function (NodeType) {
30
- NodeType["PARAGRAPH"] = "PARAGRAPH";
31
- NodeType["TEXT"] = "TEXT";
32
- NodeType["HEADING"] = "HEADING";
33
- NodeType["BULLETED_LIST"] = "BULLETED_LIST";
34
- NodeType["ORDERED_LIST"] = "ORDERED_LIST";
35
- NodeType["LIST_ITEM"] = "LIST_ITEM";
36
- NodeType["BLOCKQUOTE"] = "BLOCKQUOTE";
37
- NodeType["CODE_BLOCK"] = "CODE_BLOCK";
38
- NodeType["VIDEO"] = "VIDEO";
39
- NodeType["DIVIDER"] = "DIVIDER";
40
- NodeType["FILE"] = "FILE";
41
- NodeType["GALLERY"] = "GALLERY";
42
- NodeType["GIF"] = "GIF";
43
- NodeType["HTML"] = "HTML";
44
- NodeType["IMAGE"] = "IMAGE";
45
- NodeType["LINK_PREVIEW"] = "LINK_PREVIEW";
46
- NodeType["MAP"] = "MAP";
47
- NodeType["POLL"] = "POLL";
48
- NodeType["APP_EMBED"] = "APP_EMBED";
49
- NodeType["BUTTON"] = "BUTTON";
50
- NodeType["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
51
- NodeType["TABLE"] = "TABLE";
52
- NodeType["EMBED"] = "EMBED";
53
- NodeType["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
54
- NodeType["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
55
- NodeType["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
56
- NodeType["TABLE_CELL"] = "TABLE_CELL";
57
- NodeType["TABLE_ROW"] = "TABLE_ROW";
58
- NodeType["EXTERNAL"] = "EXTERNAL";
59
- NodeType["AUDIO"] = "AUDIO";
60
- })(NodeType || (NodeType = {}));
61
- export var WidthType;
62
- (function (WidthType) {
63
- /** Width matches the content width */
64
- WidthType["CONTENT"] = "CONTENT";
65
- /** Small Width */
66
- WidthType["SMALL"] = "SMALL";
67
- /** Width will match the original asset width */
68
- WidthType["ORIGINAL"] = "ORIGINAL";
69
- /** coast-to-coast display */
70
- WidthType["FULL_WIDTH"] = "FULL_WIDTH";
71
- })(WidthType || (WidthType = {}));
72
- export var PluginContainerDataAlignment;
73
- (function (PluginContainerDataAlignment) {
74
- /** Center Alignment */
75
- PluginContainerDataAlignment["CENTER"] = "CENTER";
76
- /** Left Alignment */
77
- PluginContainerDataAlignment["LEFT"] = "LEFT";
78
- /** Right Alignment */
79
- PluginContainerDataAlignment["RIGHT"] = "RIGHT";
80
- })(PluginContainerDataAlignment || (PluginContainerDataAlignment = {}));
81
- export var Type;
82
- (function (Type) {
83
- /** Regular link button */
84
- Type["LINK"] = "LINK";
85
- /** Triggers custom action that is defined in plugin configuration by the consumer */
86
- Type["ACTION"] = "ACTION";
87
- })(Type || (Type = {}));
88
- export var Target;
89
- (function (Target) {
90
- /** Opens the linked document in the same frame as it was clicked (this is default) */
91
- Target["SELF"] = "SELF";
92
- /** Opens the linked document in a new window or tab */
93
- Target["BLANK"] = "BLANK";
94
- /** Opens the linked document in the parent frame */
95
- Target["PARENT"] = "PARENT";
96
- /** Opens the linked document in the full body of the window */
97
- Target["TOP"] = "TOP";
98
- })(Target || (Target = {}));
99
- export var TextAlignment;
100
- (function (TextAlignment) {
101
- /** browser default, eqivalent to `initial` */
102
- TextAlignment["AUTO"] = "AUTO";
103
- /** Left align */
104
- TextAlignment["LEFT"] = "LEFT";
105
- /** Right align */
106
- TextAlignment["RIGHT"] = "RIGHT";
107
- /** Center align */
108
- TextAlignment["CENTER"] = "CENTER";
109
- /** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line. */
110
- TextAlignment["JUSTIFY"] = "JUSTIFY";
111
- })(TextAlignment || (TextAlignment = {}));
112
- export var LineStyle;
113
- (function (LineStyle) {
114
- /** Single Line */
115
- LineStyle["SINGLE"] = "SINGLE";
116
- /** Double Line */
117
- LineStyle["DOUBLE"] = "DOUBLE";
118
- /** Dashed Line */
119
- LineStyle["DASHED"] = "DASHED";
120
- /** Dotted Line */
121
- LineStyle["DOTTED"] = "DOTTED";
122
- })(LineStyle || (LineStyle = {}));
123
- export var Width;
124
- (function (Width) {
125
- /** Large line */
126
- Width["LARGE"] = "LARGE";
127
- /** Medium line */
128
- Width["MEDIUM"] = "MEDIUM";
129
- /** Small line */
130
- Width["SMALL"] = "SMALL";
131
- })(Width || (Width = {}));
132
- export var Alignment;
133
- (function (Alignment) {
134
- /** Center alignment */
135
- Alignment["CENTER"] = "CENTER";
136
- /** Left alignment */
137
- Alignment["LEFT"] = "LEFT";
138
- /** Right alignment */
139
- Alignment["RIGHT"] = "RIGHT";
140
- })(Alignment || (Alignment = {}));
141
- export var ViewMode;
142
- (function (ViewMode) {
143
- /** No PDF view */
144
- ViewMode["NONE"] = "NONE";
145
- /** Full PDF view */
146
- ViewMode["FULL"] = "FULL";
147
- /** Mini PDF view */
148
- ViewMode["MINI"] = "MINI";
149
- })(ViewMode || (ViewMode = {}));
150
- export var LayoutType;
151
- (function (LayoutType) {
152
- /** Collage type */
153
- LayoutType["COLLAGE"] = "COLLAGE";
154
- /** Masonry type */
155
- LayoutType["MASONRY"] = "MASONRY";
156
- /** Grid type */
157
- LayoutType["GRID"] = "GRID";
158
- /** Thumbnail type */
159
- LayoutType["THUMBNAIL"] = "THUMBNAIL";
160
- /** Slider type */
161
- LayoutType["SLIDER"] = "SLIDER";
162
- /** Slideshow type */
163
- LayoutType["SLIDESHOW"] = "SLIDESHOW";
164
- /** Panorama type */
165
- LayoutType["PANORAMA"] = "PANORAMA";
166
- /** Column type */
167
- LayoutType["COLUMN"] = "COLUMN";
168
- /** Magic type */
169
- LayoutType["MAGIC"] = "MAGIC";
170
- /** Fullsize images type */
171
- LayoutType["FULLSIZE"] = "FULLSIZE";
172
- })(LayoutType || (LayoutType = {}));
173
- export var Orientation;
174
- (function (Orientation) {
175
- /** Rows Orientation */
176
- Orientation["ROWS"] = "ROWS";
177
- /** Columns Orientation */
178
- Orientation["COLUMNS"] = "COLUMNS";
179
- })(Orientation || (Orientation = {}));
180
- export var Crop;
181
- (function (Crop) {
182
- /** Crop to fill */
183
- Crop["FILL"] = "FILL";
184
- /** Crop to fit */
185
- Crop["FIT"] = "FIT";
186
- })(Crop || (Crop = {}));
187
- export var ThumbnailsAlignment;
188
- (function (ThumbnailsAlignment) {
189
- /** Top alignment */
190
- ThumbnailsAlignment["TOP"] = "TOP";
191
- /** Right alignment */
192
- ThumbnailsAlignment["RIGHT"] = "RIGHT";
193
- /** Bottom alignment */
194
- ThumbnailsAlignment["BOTTOM"] = "BOTTOM";
195
- /** Left alignment */
196
- ThumbnailsAlignment["LEFT"] = "LEFT";
197
- /** No thumbnail */
198
- ThumbnailsAlignment["NONE"] = "NONE";
199
- })(ThumbnailsAlignment || (ThumbnailsAlignment = {}));
200
- export var Source;
201
- (function (Source) {
202
- Source["HTML"] = "HTML";
203
- Source["ADSENSE"] = "ADSENSE";
204
- })(Source || (Source = {}));
205
- export var MapType;
206
- (function (MapType) {
207
- /** Roadmap map type */
208
- MapType["ROADMAP"] = "ROADMAP";
209
- /** Satellite map type */
210
- MapType["SATELITE"] = "SATELITE";
211
- /** Hybrid map type */
212
- MapType["HYBRID"] = "HYBRID";
213
- /** Terrain map type */
214
- MapType["TERRAIN"] = "TERRAIN";
215
- })(MapType || (MapType = {}));
216
- export var ViewRole;
217
- (function (ViewRole) {
218
- /** Only Poll creator can view the results */
219
- ViewRole["CREATOR"] = "CREATOR";
220
- /** Anyone who voted can see the results */
221
- ViewRole["VOTERS"] = "VOTERS";
222
- /** Anyone can see the results, even if one didn't vote */
223
- ViewRole["EVERYONE"] = "EVERYONE";
224
- })(ViewRole || (ViewRole = {}));
225
- export var VoteRole;
226
- (function (VoteRole) {
227
- /** Logged in member */
228
- VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
229
- /** Anyone */
230
- VoteRole["ALL"] = "ALL";
231
- })(VoteRole || (VoteRole = {}));
232
- export var PollLayoutType;
233
- (function (PollLayoutType) {
234
- /** List */
235
- PollLayoutType["LIST"] = "LIST";
236
- /** Grid */
237
- PollLayoutType["GRID"] = "GRID";
238
- })(PollLayoutType || (PollLayoutType = {}));
239
- export var PollLayoutDirection;
240
- (function (PollLayoutDirection) {
241
- /** Left-to-right */
242
- PollLayoutDirection["LTR"] = "LTR";
243
- /** Right-to-left */
244
- PollLayoutDirection["RTL"] = "RTL";
245
- })(PollLayoutDirection || (PollLayoutDirection = {}));
246
- export var BackgroundType;
247
- (function (BackgroundType) {
248
- /** Color background type */
249
- BackgroundType["COLOR"] = "COLOR";
250
- /** Image background type */
251
- BackgroundType["IMAGE"] = "IMAGE";
252
- /** Gradiant background type */
253
- BackgroundType["GRADIENT"] = "GRADIENT";
254
- })(BackgroundType || (BackgroundType = {}));
255
- export var DecorationType;
256
- (function (DecorationType) {
257
- DecorationType["BOLD"] = "BOLD";
258
- DecorationType["ITALIC"] = "ITALIC";
259
- DecorationType["UNDERLINE"] = "UNDERLINE";
260
- DecorationType["SPOILER"] = "SPOILER";
261
- DecorationType["ANCHOR"] = "ANCHOR";
262
- DecorationType["MENTION"] = "MENTION";
263
- DecorationType["LINK"] = "LINK";
264
- DecorationType["COLOR"] = "COLOR";
265
- DecorationType["FONT_SIZE"] = "FONT_SIZE";
266
- DecorationType["EXTERNAL"] = "EXTERNAL";
267
- })(DecorationType || (DecorationType = {}));
268
- export var FontType;
269
- (function (FontType) {
270
- FontType["PX"] = "PX";
271
- FontType["EM"] = "EM";
272
- })(FontType || (FontType = {}));
273
- export var AppType;
274
- (function (AppType) {
275
- AppType["PRODUCT"] = "PRODUCT";
276
- AppType["EVENT"] = "EVENT";
277
- AppType["BOOKING"] = "BOOKING";
278
- })(AppType || (AppType = {}));
279
- export var InitialExpandedItems;
280
- (function (InitialExpandedItems) {
281
- /** First item will be expended initally */
282
- InitialExpandedItems["FIRST"] = "FIRST";
283
- /** All items will expended initally */
284
- InitialExpandedItems["ALL"] = "ALL";
285
- /** All items collapsed initally */
286
- InitialExpandedItems["NONE"] = "NONE";
287
- })(InitialExpandedItems || (InitialExpandedItems = {}));
288
- export var Direction;
289
- (function (Direction) {
290
- /** Left-to-right */
291
- Direction["LTR"] = "LTR";
292
- /** Right-to-left */
293
- Direction["RTL"] = "RTL";
294
- })(Direction || (Direction = {}));
295
- export var VerticalAlignment;
296
- (function (VerticalAlignment) {
297
- /** Top alignment */
298
- VerticalAlignment["TOP"] = "TOP";
299
- /** Middle alignment */
300
- VerticalAlignment["MIDDLE"] = "MIDDLE";
301
- /** Bottom alignment */
302
- VerticalAlignment["BOTTOM"] = "BOTTOM";
303
- })(VerticalAlignment || (VerticalAlignment = {}));
304
- /**
305
- * `NullValue` is a singleton enumeration to represent the null value for the
306
- * `Value` type union.
307
- *
308
- * The JSON representation for `NullValue` is JSON `null`.
309
- */
310
- export var NullValue;
311
- (function (NullValue) {
312
- /** Null value. */
313
- NullValue["NULL_VALUE"] = "NULL_VALUE";
314
- })(NullValue || (NullValue = {}));
315
- export var RequestedFields;
316
- (function (RequestedFields) {
317
- RequestedFields["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
318
- RequestedFields["BREADCRUMBS"] = "BREADCRUMBS";
319
- })(RequestedFields || (RequestedFields = {}));
320
- export var SortOrder;
321
- (function (SortOrder) {
322
- SortOrder["ASC"] = "ASC";
323
- SortOrder["DESC"] = "DESC";
324
- })(SortOrder || (SortOrder = {}));
325
- export var SortType;
326
- (function (SortType) {
327
- SortType["COUNT"] = "COUNT";
328
- SortType["VALUE"] = "VALUE";
329
- })(SortType || (SortType = {}));
330
- export var SortDirection;
331
- (function (SortDirection) {
332
- SortDirection["DESC"] = "DESC";
333
- SortDirection["ASC"] = "ASC";
334
- })(SortDirection || (SortDirection = {}));
335
- export var MissingValues;
336
- (function (MissingValues) {
337
- MissingValues["EXCLUDE"] = "EXCLUDE";
338
- MissingValues["INCLUDE"] = "INCLUDE";
339
- })(MissingValues || (MissingValues = {}));
340
- export var ScalarType;
341
- (function (ScalarType) {
342
- ScalarType["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
343
- ScalarType["COUNT_DISTINCT"] = "COUNT_DISTINCT";
344
- ScalarType["MIN"] = "MIN";
345
- ScalarType["MAX"] = "MAX";
346
- ScalarType["SUM"] = "SUM";
347
- ScalarType["AVG"] = "AVG";
348
- })(ScalarType || (ScalarType = {}));
349
- export var NestedAggregationType;
350
- (function (NestedAggregationType) {
351
- NestedAggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
352
- NestedAggregationType["VALUE"] = "VALUE";
353
- NestedAggregationType["RANGE"] = "RANGE";
354
- NestedAggregationType["SCALAR"] = "SCALAR";
355
- NestedAggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
356
- })(NestedAggregationType || (NestedAggregationType = {}));
357
- export var Interval;
358
- (function (Interval) {
359
- Interval["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
360
- Interval["YEAR"] = "YEAR";
361
- Interval["MONTH"] = "MONTH";
362
- Interval["WEEK"] = "WEEK";
363
- Interval["DAY"] = "DAY";
364
- Interval["HOUR"] = "HOUR";
365
- Interval["MINUTE"] = "MINUTE";
366
- Interval["SECOND"] = "SECOND";
367
- })(Interval || (Interval = {}));
368
- export var AggregationType;
369
- (function (AggregationType) {
370
- AggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
371
- AggregationType["VALUE"] = "VALUE";
372
- AggregationType["RANGE"] = "RANGE";
373
- AggregationType["SCALAR"] = "SCALAR";
374
- AggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
375
- AggregationType["NESTED"] = "NESTED";
376
- })(AggregationType || (AggregationType = {}));
377
- export var Mode;
378
- (function (Mode) {
379
- /** any */
380
- Mode["OR"] = "OR";
381
- /** all */
382
- Mode["AND"] = "AND";
383
- })(Mode || (Mode = {}));
384
- export var MoveCategoryRequestPosition;
385
- (function (MoveCategoryRequestPosition) {
386
- MoveCategoryRequestPosition["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
387
- MoveCategoryRequestPosition["FIRST"] = "FIRST";
388
- MoveCategoryRequestPosition["LAST"] = "LAST";
389
- MoveCategoryRequestPosition["BEFORE"] = "BEFORE";
390
- })(MoveCategoryRequestPosition || (MoveCategoryRequestPosition = {}));
391
- export var Position;
392
- (function (Position) {
393
- Position["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
394
- Position["FIRST"] = "FIRST";
395
- Position["LAST"] = "LAST";
396
- Position["BEFORE"] = "BEFORE";
397
- Position["NONE"] = "NONE";
398
- })(Position || (Position = {}));
399
- const _bulkAddItemsToCategoryRequest = {};
400
- const _bulkAddItemsToCategoryResponse = {};
401
- const _bulkAddItemToCategoriesRequest = {};
402
- const _bulkAddItemToCategoriesResponse = {};
403
- const _bulkCategoriesResult = { category: '_category' };
404
- const _bulkRemoveItemFromCategoriesRequest = {};
405
- const _bulkRemoveItemFromCategoriesResponse = {};
406
- const _bulkRemoveItemsFromCategoryRequest = {};
407
- const _bulkRemoveItemsFromCategoryResponse = {};
408
- const _bulkUpdateCategoriesRequest = { categories: '_maskedCategory' };
409
- const _bulkUpdateCategoriesResponse = { results: '_bulkCategoriesResult' };
410
- const _category = {
411
- image: 'wix.common.Image',
412
- richContentDescription: '_richContent',
413
- };
414
- const _countCategoriesRequest = {};
415
- const _countCategoriesResponse = {};
416
- const _createCategoryRequest = { category: '_category' };
417
- const _createCategoryResponse = { category: '_category' };
418
- const _deleteCategoryRequest = {};
419
- const _deleteCategoryResponse = {};
420
- const _getArrangedItemsRequest = {};
421
- const _getArrangedItemsResponse = {};
422
- const _getCategoryRequest = {};
423
- const _getCategoryResponse = { category: '_category' };
424
- const _listCategoriesForItemRequest = {};
425
- const _listCategoriesForItemResponse = {};
426
- const _listItemsInCategoryRequest = {};
427
- const _listItemsInCategoryResponse = {};
428
- const _maskedCategory = { category: '_category' };
429
- const _moveCategoryRequest = {};
430
- const _moveCategoryResponse = {};
431
- const _moveItemInCategoryRequest = {};
432
- const _moveItemInCategoryResponse = {};
433
- const _node = { nodes: '_node' };
434
- const _richContent = { nodes: '_node' };
435
- const _searchCategoriesRequest = {};
436
- const _searchCategoriesResponse = { categories: '_category' };
437
- const _setArrangedItemsRequest = {};
438
- const _setArrangedItemsResponse = {};
439
- const _updateCategoryRequest = { category: '_category' };
440
- const _updateCategoryResponse = { category: '_category' };
441
- const _updateCategoryVisibilityRequest = {};
442
- const _updateCategoryVisibilityResponse = { category: '_category' };
443
- /**
444
- * Creates a new Category.
445
- * @param category - Category to be created.
446
- * @public
447
- * @documentationMaturity preview
448
- * @requiredField category
449
- * @requiredField category.name
450
- * @requiredField category.parentCategory._id
451
- * @requiredField options.treeReference
452
- * @requiredField options.treeReference.appNamespace
453
- * @returns The created Category.
454
- */
455
- export function createCategory(category, options) {
456
- var _a, _b, _c;
457
- return __awaiter(this, arguments, void 0, function* () {
458
- const requestTransformation = {
459
- category: '$[0]',
460
- treeReference: '$[1].treeReference',
461
- fields: '$[1].fields',
462
- };
463
- const responseTransformation = '$.category';
464
- // @ts-ignore
465
- const { httpClient, sideEffects } = arguments[2];
466
- const { toAmbassadorRequest } = serializer({
467
- rootSchema: _createCategoryRequest,
468
- depSchemas: { _category, _node, _richContent },
469
- fqdnTransformation: {
470
- paths: [...['category']],
471
- transformation: _fromVeloEntity,
472
- },
473
- customTransformation: requestTransformation,
474
- });
475
- const { fromJSON } = serializer({
476
- rootSchema: _createCategoryResponse,
477
- depSchemas: { _category, _node, _richContent },
478
- fqdnTransformation: {
479
- paths: [...['category']],
480
- transformation: _toVeloEntity,
481
- },
482
- customTransformation: responseTransformation,
483
- });
484
- const payload = toAmbassadorRequest([category, options]);
485
- const reqOpts = ambassadorWixCategoriesV1Category.createCategory(payload);
486
- __log(`"CreateCategory" sending request with: ${__inspect(reqOpts)}`);
487
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
488
- try {
489
- const result = yield httpClient.request(reqOpts);
490
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
491
- return fromJSON(result.data);
492
- }
493
- catch (err) {
494
- const transformedError = transformError(err, requestTransformation, [
495
- 'category',
496
- 'options',
497
- ]);
498
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
499
- throw transformedError;
500
- }
501
- });
502
- }
503
- /**
504
- * Retrieves a category with the provided ID.
505
- * @param categoryId - Id of the Category to retrieve.
506
- * @param treeReference - A reference to the tree that contains this category.
507
- * @public
508
- * @documentationMaturity preview
509
- * @requiredField categoryId
510
- * @requiredField treeReference
511
- * @requiredField treeReference.appNamespace
512
- * @applicableIdentity MEMBER
513
- * @applicableIdentity VISITOR
514
- * @returns The retrieved Category.
515
- */
516
- export function getCategory(categoryId, treeReference, options) {
517
- var _a, _b, _c;
518
- return __awaiter(this, arguments, void 0, function* () {
519
- const requestTransformation = {
520
- categoryId: '$[0]',
521
- treeReference: '$[1]',
522
- fields: '$[2].fields',
523
- };
524
- const responseTransformation = '$.category';
525
- // @ts-ignore
526
- const { httpClient, sideEffects } = arguments[3];
527
- const { toAmbassadorRequest } = serializer({
528
- rootSchema: _getCategoryRequest,
529
- depSchemas: {},
530
- fqdnTransformation: {
531
- paths: [],
532
- transformation: _fromVeloEntity,
533
- },
534
- customTransformation: requestTransformation,
535
- });
536
- const { fromJSON } = serializer({
537
- rootSchema: _getCategoryResponse,
538
- depSchemas: { _category, _node, _richContent },
539
- fqdnTransformation: {
540
- paths: [...['category']],
541
- transformation: _toVeloEntity,
542
- },
543
- customTransformation: responseTransformation,
544
- });
545
- const payload = toAmbassadorRequest([categoryId, treeReference, options]);
546
- const reqOpts = ambassadorWixCategoriesV1Category.getCategory(payload);
547
- __log(`"GetCategory" sending request with: ${__inspect(reqOpts)}`);
548
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
549
- try {
550
- const result = yield httpClient.request(reqOpts);
551
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
552
- return fromJSON(result.data);
553
- }
554
- catch (err) {
555
- const transformedError = transformError(err, requestTransformation, [
556
- 'categoryId',
557
- 'treeReference',
558
- 'options',
559
- ]);
560
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
561
- throw transformedError;
562
- }
563
- });
564
- }
565
- /**
566
- * Update a Category, supports partial update.
567
- * Pass the latest `revision` for a successful update.
568
- * Each time the category is updated, `revision` increments by 1.
569
- * @param _id - Category ID.
570
- * @public
571
- * @documentationMaturity preview
572
- * @requiredField _id
573
- * @requiredField category
574
- * @requiredField category.revision
575
- * @requiredField options.treeReference
576
- * @requiredField options.treeReference.appNamespace
577
- * @returns The updated Category.
578
- */
579
- export function updateCategory(_id, category, options) {
580
- var _a, _b, _c;
581
- return __awaiter(this, arguments, void 0, function* () {
582
- const requestTransformation = {
583
- category: { '*': '$[1]', id: '$[0]' },
584
- treeReference: '$[2].treeReference',
585
- fields: '$[2].fields',
586
- };
587
- const responseTransformation = '$.category';
588
- // @ts-ignore
589
- const { httpClient, sideEffects } = arguments[3];
590
- const { toAmbassadorRequest } = serializer({
591
- rootSchema: _updateCategoryRequest,
592
- depSchemas: { _category, _node, _richContent },
593
- fqdnTransformation: {
594
- paths: [...['category']],
595
- transformation: _fromVeloEntity,
596
- },
597
- customTransformation: requestTransformation,
598
- });
599
- const { fromJSON } = serializer({
600
- rootSchema: _updateCategoryResponse,
601
- depSchemas: { _category, _node, _richContent },
602
- fqdnTransformation: {
603
- paths: [...['category']],
604
- transformation: _toVeloEntity,
605
- },
606
- customTransformation: responseTransformation,
607
- });
608
- const payload = toAmbassadorRequest([_id, category, options]);
609
- const reqOpts = ambassadorWixCategoriesV1Category.updateCategory(payload);
610
- __log(`"UpdateCategory" sending request with: ${__inspect(reqOpts)}`);
611
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
612
- try {
613
- const result = yield httpClient.request(reqOpts);
614
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
615
- return fromJSON(result.data);
616
- }
617
- catch (err) {
618
- const transformedError = transformError(err, requestTransformation, [
619
- '_id',
620
- 'category',
621
- 'options',
622
- ]);
623
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
624
- throw transformedError;
625
- }
626
- });
627
- }
628
- /**
629
- * Deletes a Category.
630
- * @param categoryId - Id of the Category to delete.
631
- * @param treeReference - A reference to the tree that contains this category.
632
- * @public
633
- * @documentationMaturity preview
634
- * @requiredField categoryId
635
- * @requiredField treeReference
636
- * @requiredField treeReference.appNamespace
637
- */
638
- export function deleteCategory(categoryId, treeReference) {
639
- var _a, _b, _c;
640
- return __awaiter(this, arguments, void 0, function* () {
641
- const requestTransformation = { categoryId: '$[0]', treeReference: '$[1]' };
642
- const responseTransformation = '$';
643
- // @ts-ignore
644
- const { httpClient, sideEffects } = arguments[2];
645
- const { toAmbassadorRequest } = serializer({
646
- rootSchema: _deleteCategoryRequest,
647
- depSchemas: {},
648
- fqdnTransformation: {
649
- paths: [],
650
- transformation: _fromVeloEntity,
651
- },
652
- customTransformation: requestTransformation,
653
- });
654
- const { fromJSON } = serializer({
655
- rootSchema: _deleteCategoryResponse,
656
- depSchemas: {},
657
- fqdnTransformation: {
658
- paths: [],
659
- transformation: _toVeloEntity,
660
- },
661
- customTransformation: responseTransformation,
662
- });
663
- const payload = toAmbassadorRequest([categoryId, treeReference]);
664
- const reqOpts = ambassadorWixCategoriesV1Category.deleteCategory(payload);
665
- __log(`"DeleteCategory" sending request with: ${__inspect(reqOpts)}`);
666
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
667
- try {
668
- const result = yield httpClient.request(reqOpts);
669
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
670
- return fromJSON(result.data);
671
- }
672
- catch (err) {
673
- const transformedError = transformError(err, requestTransformation, [
674
- 'categoryId',
675
- 'treeReference',
676
- ]);
677
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
678
- throw transformedError;
679
- }
680
- });
681
- }
682
- /**
683
- * Search Categories using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
684
- * @public
685
- * @documentationMaturity preview
686
- * @requiredField options.treeReference
687
- * @requiredField options.treeReference.appNamespace
688
- * @applicableIdentity MEMBER
689
- * @applicableIdentity VISITOR
690
- */
691
- export function searchCategories(options) {
692
- var _a, _b, _c;
693
- return __awaiter(this, arguments, void 0, function* () {
694
- const requestTransformation = {
695
- search: '$[0].search',
696
- treeReference: '$[0].treeReference',
697
- includeHidden: '$[0].includeHidden',
698
- fields: '$[0].fields',
699
- };
700
- const responseTransformation = '$';
701
- // @ts-ignore
702
- const { httpClient, sideEffects } = arguments[1];
703
- const { toAmbassadorRequest } = serializer({
704
- rootSchema: _searchCategoriesRequest,
705
- depSchemas: {},
706
- fqdnTransformation: {
707
- paths: [],
708
- transformation: _fromVeloEntity,
709
- },
710
- customTransformation: requestTransformation,
711
- });
712
- const { fromJSON } = serializer({
713
- rootSchema: _searchCategoriesResponse,
714
- depSchemas: { _category, _node, _richContent },
715
- fqdnTransformation: {
716
- paths: [...['Array#categories']],
717
- transformation: _toVeloEntity,
718
- },
719
- customTransformation: responseTransformation,
720
- });
721
- const payload = toAmbassadorRequest([options]);
722
- const reqOpts = ambassadorWixCategoriesV1Category.searchCategories(payload);
723
- __log(`"SearchCategories" sending request with: ${__inspect(reqOpts)}`);
724
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
725
- try {
726
- const result = yield httpClient.request(reqOpts);
727
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
728
- return fromJSON(result.data);
729
- }
730
- catch (err) {
731
- const transformedError = transformError(err, requestTransformation, [
732
- 'options',
733
- ]);
734
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
735
- throw transformedError;
736
- }
737
- });
738
- }
739
- /**
740
- * Returns total count of categories satisfying filter and/or search
741
- * @public
742
- * @documentationMaturity preview
743
- * @requiredField options.treeReference
744
- * @requiredField options.treeReference.appNamespace
745
- * @applicableIdentity MEMBER
746
- * @applicableIdentity VISITOR
747
- */
748
- export function countCategories(options) {
749
- var _a, _b, _c;
750
- return __awaiter(this, arguments, void 0, function* () {
751
- const requestTransformation = {
752
- filter: '$[0].filter',
753
- search: '$[0].search',
754
- treeReference: '$[0].treeReference',
755
- includeHidden: '$[0].includeHidden',
756
- };
757
- const responseTransformation = '$';
758
- // @ts-ignore
759
- const { httpClient, sideEffects } = arguments[1];
760
- const { toAmbassadorRequest } = serializer({
761
- rootSchema: _countCategoriesRequest,
762
- depSchemas: {},
763
- fqdnTransformation: {
764
- paths: [],
765
- transformation: _fromVeloEntity,
766
- },
767
- customTransformation: requestTransformation,
768
- });
769
- const { fromJSON } = serializer({
770
- rootSchema: _countCategoriesResponse,
771
- depSchemas: {},
772
- fqdnTransformation: {
773
- paths: [],
774
- transformation: _toVeloEntity,
775
- },
776
- customTransformation: responseTransformation,
777
- });
778
- const payload = toAmbassadorRequest([options]);
779
- const reqOpts = ambassadorWixCategoriesV1Category.countCategories(payload);
780
- __log(`"CountCategories" sending request with: ${__inspect(reqOpts)}`);
781
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
782
- try {
783
- const result = yield httpClient.request(reqOpts);
784
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
785
- return fromJSON(result.data);
786
- }
787
- catch (err) {
788
- const transformedError = transformError(err, requestTransformation, [
789
- 'options',
790
- ]);
791
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
792
- throw transformedError;
793
- }
794
- });
795
- }
796
- /**
797
- * Moves a category.
798
- * This operation updates `parentCategory` (`id` and `index`) for category with `categoryId`.
799
- * This endpoint can be used to move category to different parent in the same tree or to change it's position in current parent.
800
- * @param categoryId - ID of category to place.
801
- * @param treeReference - A reference to the tree that contains this category.
802
- * @public
803
- * @documentationMaturity preview
804
- * @requiredField categoryId
805
- * @requiredField options.position
806
- * @requiredField treeReference
807
- * @requiredField treeReference.appNamespace
808
- */
809
- export function moveCategory(categoryId, treeReference, options) {
810
- var _a, _b, _c;
811
- return __awaiter(this, arguments, void 0, function* () {
812
- const requestTransformation = {
813
- categoryId: '$[0]',
814
- treeReference: '$[1]',
815
- parentCategoryId: '$[2].parentCategoryId',
816
- position: '$[2].position',
817
- moveBeforeCategoryId: '$[2].moveBeforeCategoryId',
818
- };
819
- const responseTransformation = '$';
820
- // @ts-ignore
821
- const { httpClient, sideEffects } = arguments[3];
822
- const { toAmbassadorRequest } = serializer({
823
- rootSchema: _moveCategoryRequest,
824
- depSchemas: {},
825
- fqdnTransformation: {
826
- paths: [],
827
- transformation: _fromVeloEntity,
828
- },
829
- customTransformation: requestTransformation,
830
- });
831
- const { fromJSON } = serializer({
832
- rootSchema: _moveCategoryResponse,
833
- depSchemas: {},
834
- fqdnTransformation: {
835
- paths: [],
836
- transformation: _toVeloEntity,
837
- },
838
- customTransformation: responseTransformation,
839
- });
840
- const payload = toAmbassadorRequest([categoryId, treeReference, options]);
841
- const reqOpts = ambassadorWixCategoriesV1Category.moveCategory(payload);
842
- __log(`"MoveCategory" sending request with: ${__inspect(reqOpts)}`);
843
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
844
- try {
845
- const result = yield httpClient.request(reqOpts);
846
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
847
- return fromJSON(result.data);
848
- }
849
- catch (err) {
850
- const transformedError = transformError(err, requestTransformation, [
851
- 'categoryId',
852
- 'treeReference',
853
- 'options',
854
- ]);
855
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
856
- throw transformedError;
857
- }
858
- });
859
- }
860
- /**
861
- * Update multiple Categories, supports partial update.
862
- * Pass the latest `revision` for a successful update.
863
- * To update visibility, call the BulkUpdateCategoryVisibility endpoint.
864
- * @param categories - List of categories to be updated.
865
- * @public
866
- * @documentationMaturity preview
867
- * @requiredField categories
868
- * @requiredField categories.category
869
- * @requiredField categories.category._id
870
- * @requiredField categories.category.revision
871
- * @requiredField options.treeReference
872
- * @requiredField options.treeReference.appNamespace
873
- */
874
- export function bulkUpdateCategories(categories, options) {
875
- var _a, _b, _c;
876
- return __awaiter(this, arguments, void 0, function* () {
877
- const requestTransformation = {
878
- categories: '$[0]',
879
- treeReference: '$[1].treeReference',
880
- returnEntity: '$[1].returnEntity',
881
- };
882
- const responseTransformation = '$';
883
- // @ts-ignore
884
- const { httpClient, sideEffects } = arguments[2];
885
- const { toAmbassadorRequest } = serializer({
886
- rootSchema: _bulkUpdateCategoriesRequest,
887
- depSchemas: { _category, _maskedCategory, _node, _richContent },
888
- fqdnTransformation: {
889
- paths: [...['Array#categories.category']],
890
- transformation: _fromVeloEntity,
891
- },
892
- customTransformation: requestTransformation,
893
- });
894
- const { fromJSON } = serializer({
895
- rootSchema: _bulkUpdateCategoriesResponse,
896
- depSchemas: { _bulkCategoriesResult, _category, _node, _richContent },
897
- fqdnTransformation: {
898
- paths: [...['Array#results.category']],
899
- transformation: _toVeloEntity,
900
- },
901
- customTransformation: responseTransformation,
902
- });
903
- const payload = toAmbassadorRequest([categories, options]);
904
- const reqOpts = ambassadorWixCategoriesV1Category.bulkUpdateCategories(payload);
905
- __log(`"BulkUpdateCategories" sending request with: ${__inspect(reqOpts)}`);
906
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
907
- try {
908
- const result = yield httpClient.request(reqOpts);
909
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
910
- return fromJSON(result.data);
911
- }
912
- catch (err) {
913
- const transformedError = transformError(err, requestTransformation, [
914
- 'categories',
915
- 'options',
916
- ]);
917
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
918
- throw transformedError;
919
- }
920
- });
921
- }
922
- /**
923
- * Update `visible` field. If visible is set to false, all subcategories will be set to `visible=false`
924
- * @param categoryId - ID of category to be updated
925
- * @public
926
- * @documentationMaturity preview
927
- * @requiredField categoryId
928
- * @requiredField options.revision
929
- * @requiredField options.treeReference
930
- * @requiredField options.treeReference.appNamespace
931
- * @requiredField options.visible
932
- */
933
- export function updateCategoryVisibility(categoryId, options) {
934
- var _a, _b, _c;
935
- return __awaiter(this, arguments, void 0, function* () {
936
- const requestTransformation = {
937
- categoryId: '$[0]',
938
- visible: '$[1].visible',
939
- treeReference: '$[1].treeReference',
940
- revision: '$[1].revision',
941
- fields: '$[1].fields',
942
- };
943
- const responseTransformation = '$';
944
- // @ts-ignore
945
- const { httpClient, sideEffects } = arguments[2];
946
- const { toAmbassadorRequest } = serializer({
947
- rootSchema: _updateCategoryVisibilityRequest,
948
- depSchemas: {},
949
- fqdnTransformation: {
950
- paths: [],
951
- transformation: _fromVeloEntity,
952
- },
953
- customTransformation: requestTransformation,
954
- });
955
- const { fromJSON } = serializer({
956
- rootSchema: _updateCategoryVisibilityResponse,
957
- depSchemas: { _category, _node, _richContent },
958
- fqdnTransformation: {
959
- paths: [...['category']],
960
- transformation: _toVeloEntity,
961
- },
962
- customTransformation: responseTransformation,
963
- });
964
- const payload = toAmbassadorRequest([categoryId, options]);
965
- const reqOpts = ambassadorWixCategoriesV1Category.updateCategoryVisibility(payload);
966
- __log(`"UpdateCategoryVisibility" sending request with: ${__inspect(reqOpts)}`);
967
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
968
- try {
969
- const result = yield httpClient.request(reqOpts);
970
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
971
- return fromJSON(result.data);
972
- }
973
- catch (err) {
974
- const transformedError = transformError(err, requestTransformation, [
975
- 'categoryId',
976
- 'options',
977
- ]);
978
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
979
- throw transformedError;
980
- }
981
- });
982
- }
983
- /**
984
- * Adds multiple items to single category, fires as many domain events as many items successfully added.
985
- * @param categoryId - Category id.
986
- * @param items - List of catalog items with reference info.
987
- * @public
988
- * @documentationMaturity preview
989
- * @requiredField categoryId
990
- * @requiredField items
991
- * @requiredField items.appId
992
- * @requiredField items.catalogItemId
993
- * @requiredField options
994
- * @requiredField options.treeReference
995
- * @requiredField options.treeReference.appNamespace
996
- */
997
- export function bulkAddItemsToCategory(categoryId, items, options) {
998
- var _a, _b, _c;
999
- return __awaiter(this, arguments, void 0, function* () {
1000
- const requestTransformation = {
1001
- categoryId: '$[0]',
1002
- items: '$[1]',
1003
- treeReference: '$[2].treeReference',
1004
- };
1005
- const responseTransformation = '$';
1006
- // @ts-ignore
1007
- const { httpClient, sideEffects } = arguments[3];
1008
- const { toAmbassadorRequest } = serializer({
1009
- rootSchema: _bulkAddItemsToCategoryRequest,
1010
- depSchemas: {},
1011
- fqdnTransformation: {
1012
- paths: [],
1013
- transformation: _fromVeloEntity,
1014
- },
1015
- customTransformation: requestTransformation,
1016
- });
1017
- const { fromJSON } = serializer({
1018
- rootSchema: _bulkAddItemsToCategoryResponse,
1019
- depSchemas: {},
1020
- fqdnTransformation: {
1021
- paths: [],
1022
- transformation: _toVeloEntity,
1023
- },
1024
- customTransformation: responseTransformation,
1025
- });
1026
- const payload = toAmbassadorRequest([categoryId, items, options]);
1027
- const reqOpts = ambassadorWixCategoriesV1Category.bulkAddItemsToCategory(payload);
1028
- __log(`"BulkAddItemsToCategory" sending request with: ${__inspect(reqOpts)}`);
1029
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1030
- try {
1031
- const result = yield httpClient.request(reqOpts);
1032
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1033
- return fromJSON(result.data);
1034
- }
1035
- catch (err) {
1036
- const transformedError = transformError(err, requestTransformation, [
1037
- 'categoryId',
1038
- 'items',
1039
- 'options',
1040
- ]);
1041
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1042
- throw transformedError;
1043
- }
1044
- });
1045
- }
1046
- /**
1047
- * Adds single item to multiple categories, fires as many domain events as many categories were successfully added.
1048
- * @param itemReference - Catalog item reference info
1049
- * @public
1050
- * @documentationMaturity preview
1051
- * @requiredField itemReference
1052
- * @requiredField itemReference.appId
1053
- * @requiredField itemReference.catalogItemId
1054
- * @requiredField options
1055
- * @requiredField options.categoryIds
1056
- * @requiredField options.treeReference
1057
- * @requiredField options.treeReference.appNamespace
1058
- */
1059
- export function bulkAddItemToCategories(itemReference, options) {
1060
- var _a, _b, _c;
1061
- return __awaiter(this, arguments, void 0, function* () {
1062
- const requestTransformation = {
1063
- itemReference: '$[0]',
1064
- categoryIds: '$[1].categoryIds',
1065
- treeReference: '$[1].treeReference',
1066
- };
1067
- const responseTransformation = '$';
1068
- // @ts-ignore
1069
- const { httpClient, sideEffects } = arguments[2];
1070
- const { toAmbassadorRequest } = serializer({
1071
- rootSchema: _bulkAddItemToCategoriesRequest,
1072
- depSchemas: {},
1073
- fqdnTransformation: {
1074
- paths: [],
1075
- transformation: _fromVeloEntity,
1076
- },
1077
- customTransformation: requestTransformation,
1078
- });
1079
- const { fromJSON } = serializer({
1080
- rootSchema: _bulkAddItemToCategoriesResponse,
1081
- depSchemas: {},
1082
- fqdnTransformation: {
1083
- paths: [],
1084
- transformation: _toVeloEntity,
1085
- },
1086
- customTransformation: responseTransformation,
1087
- });
1088
- const payload = toAmbassadorRequest([itemReference, options]);
1089
- const reqOpts = ambassadorWixCategoriesV1Category.bulkAddItemToCategories(payload);
1090
- __log(`"BulkAddItemToCategories" sending request with: ${__inspect(reqOpts)}`);
1091
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1092
- try {
1093
- const result = yield httpClient.request(reqOpts);
1094
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1095
- return fromJSON(result.data);
1096
- }
1097
- catch (err) {
1098
- const transformedError = transformError(err, requestTransformation, [
1099
- 'itemReference',
1100
- 'options',
1101
- ]);
1102
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1103
- throw transformedError;
1104
- }
1105
- });
1106
- }
1107
- /**
1108
- * Removed multiple items from single category, fires as many domain events as many items successfully removed.
1109
- * @param categoryId - Category id
1110
- * @param items - List of catalog items with reference info.
1111
- * @public
1112
- * @documentationMaturity preview
1113
- * @requiredField categoryId
1114
- * @requiredField items
1115
- * @requiredField items.appId
1116
- * @requiredField items.catalogItemId
1117
- * @requiredField options
1118
- * @requiredField options.treeReference
1119
- * @requiredField options.treeReference.appNamespace
1120
- */
1121
- export function bulkRemoveItemsFromCategory(categoryId, items, options) {
1122
- var _a, _b, _c;
1123
- return __awaiter(this, arguments, void 0, function* () {
1124
- const requestTransformation = {
1125
- categoryId: '$[0]',
1126
- items: '$[1]',
1127
- treeReference: '$[2].treeReference',
1128
- };
1129
- const responseTransformation = '$';
1130
- // @ts-ignore
1131
- const { httpClient, sideEffects } = arguments[3];
1132
- const { toAmbassadorRequest } = serializer({
1133
- rootSchema: _bulkRemoveItemsFromCategoryRequest,
1134
- depSchemas: {},
1135
- fqdnTransformation: {
1136
- paths: [],
1137
- transformation: _fromVeloEntity,
1138
- },
1139
- customTransformation: requestTransformation,
1140
- });
1141
- const { fromJSON } = serializer({
1142
- rootSchema: _bulkRemoveItemsFromCategoryResponse,
1143
- depSchemas: {},
1144
- fqdnTransformation: {
1145
- paths: [],
1146
- transformation: _toVeloEntity,
1147
- },
1148
- customTransformation: responseTransformation,
1149
- });
1150
- const payload = toAmbassadorRequest([categoryId, items, options]);
1151
- const reqOpts = ambassadorWixCategoriesV1Category.bulkRemoveItemsFromCategory(payload);
1152
- __log(`"BulkRemoveItemsFromCategory" sending request with: ${__inspect(reqOpts)}`);
1153
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1154
- try {
1155
- const result = yield httpClient.request(reqOpts);
1156
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1157
- return fromJSON(result.data);
1158
- }
1159
- catch (err) {
1160
- const transformedError = transformError(err, requestTransformation, [
1161
- 'categoryId',
1162
- 'items',
1163
- 'options',
1164
- ]);
1165
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1166
- throw transformedError;
1167
- }
1168
- });
1169
- }
1170
- /**
1171
- * Removes single item from multiple categories, fires as many domain events as many categories were successfully removed.
1172
- * @param itemReference - Catalog item reference info
1173
- * @public
1174
- * @documentationMaturity preview
1175
- * @requiredField itemReference
1176
- * @requiredField itemReference.appId
1177
- * @requiredField itemReference.catalogItemId
1178
- * @requiredField options
1179
- * @requiredField options.categoryIds
1180
- * @requiredField options.treeReference
1181
- * @requiredField options.treeReference.appNamespace
1182
- */
1183
- export function bulkRemoveItemFromCategories(itemReference, options) {
1184
- var _a, _b, _c;
1185
- return __awaiter(this, arguments, void 0, function* () {
1186
- const requestTransformation = {
1187
- itemReference: '$[0]',
1188
- categoryIds: '$[1].categoryIds',
1189
- treeReference: '$[1].treeReference',
1190
- };
1191
- const responseTransformation = '$';
1192
- // @ts-ignore
1193
- const { httpClient, sideEffects } = arguments[2];
1194
- const { toAmbassadorRequest } = serializer({
1195
- rootSchema: _bulkRemoveItemFromCategoriesRequest,
1196
- depSchemas: {},
1197
- fqdnTransformation: {
1198
- paths: [],
1199
- transformation: _fromVeloEntity,
1200
- },
1201
- customTransformation: requestTransformation,
1202
- });
1203
- const { fromJSON } = serializer({
1204
- rootSchema: _bulkRemoveItemFromCategoriesResponse,
1205
- depSchemas: {},
1206
- fqdnTransformation: {
1207
- paths: [],
1208
- transformation: _toVeloEntity,
1209
- },
1210
- customTransformation: responseTransformation,
1211
- });
1212
- const payload = toAmbassadorRequest([itemReference, options]);
1213
- const reqOpts = ambassadorWixCategoriesV1Category.bulkRemoveItemFromCategories(payload);
1214
- __log(`"BulkRemoveItemFromCategories" sending request with: ${__inspect(reqOpts)}`);
1215
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1216
- try {
1217
- const result = yield httpClient.request(reqOpts);
1218
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1219
- return fromJSON(result.data);
1220
- }
1221
- catch (err) {
1222
- const transformedError = transformError(err, requestTransformation, [
1223
- 'itemReference',
1224
- 'options',
1225
- ]);
1226
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1227
- throw transformedError;
1228
- }
1229
- });
1230
- }
1231
- /**
1232
- * Returns up to 100 items related to requested `category_id` sorted by time when item added to category, descending.
1233
- * When items added to category in bulk they considered as added at exactly same time so order will be random but always the same.
1234
- * @param categoryId - ID of category containing items.
1235
- * @param treeReference - A reference to the tree that contains this category.
1236
- * @public
1237
- * @documentationMaturity preview
1238
- * @requiredField categoryId
1239
- * @requiredField treeReference
1240
- * @requiredField treeReference.appNamespace
1241
- * @applicableIdentity MEMBER
1242
- * @applicableIdentity VISITOR
1243
- */
1244
- export function listItemsInCategory(categoryId, treeReference, options) {
1245
- var _a, _b, _c;
1246
- return __awaiter(this, arguments, void 0, function* () {
1247
- const requestTransformation = {
1248
- categoryId: '$[0]',
1249
- treeReference: '$[1]',
1250
- useCategoryArrangement: '$[2].useCategoryArrangement',
1251
- includeItemsFromSubcategories: '$[2].includeItemsFromSubcategories',
1252
- cursorPaging: '$[2].cursorPaging',
1253
- };
1254
- const responseTransformation = '$';
1255
- // @ts-ignore
1256
- const { httpClient, sideEffects } = arguments[3];
1257
- const { toAmbassadorRequest } = serializer({
1258
- rootSchema: _listItemsInCategoryRequest,
1259
- depSchemas: {},
1260
- fqdnTransformation: {
1261
- paths: [],
1262
- transformation: _fromVeloEntity,
1263
- },
1264
- customTransformation: requestTransformation,
1265
- });
1266
- const { fromJSON } = serializer({
1267
- rootSchema: _listItemsInCategoryResponse,
1268
- depSchemas: {},
1269
- fqdnTransformation: {
1270
- paths: [],
1271
- transformation: _toVeloEntity,
1272
- },
1273
- customTransformation: responseTransformation,
1274
- });
1275
- const payload = toAmbassadorRequest([categoryId, treeReference, options]);
1276
- const reqOpts = ambassadorWixCategoriesV1Category.listItemsInCategory(payload);
1277
- __log(`"ListItemsInCategory" sending request with: ${__inspect(reqOpts)}`);
1278
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1279
- try {
1280
- const result = yield httpClient.request(reqOpts);
1281
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1282
- return fromJSON(result.data);
1283
- }
1284
- catch (err) {
1285
- const transformedError = transformError(err, requestTransformation, [
1286
- 'categoryId',
1287
- 'treeReference',
1288
- 'options',
1289
- ]);
1290
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1291
- throw transformedError;
1292
- }
1293
- });
1294
- }
1295
- /**
1296
- * Returns all category IDs that contain the item and their parent category IDs.
1297
- * @param itemReference - Catalog item reference info.
1298
- * @public
1299
- * @documentationMaturity preview
1300
- * @requiredField itemReference
1301
- * @requiredField options
1302
- * @requiredField options.treeReference
1303
- * @requiredField options.treeReference.appNamespace
1304
- * @applicableIdentity MEMBER
1305
- * @applicableIdentity VISITOR
1306
- */
1307
- export function listCategoriesForItem(itemReference, options) {
1308
- var _a, _b, _c;
1309
- return __awaiter(this, arguments, void 0, function* () {
1310
- const requestTransformation = {
1311
- itemReference: '$[0]',
1312
- treeReference: '$[1].treeReference',
1313
- };
1314
- const responseTransformation = '$';
1315
- // @ts-ignore
1316
- const { httpClient, sideEffects } = arguments[2];
1317
- const { toAmbassadorRequest } = serializer({
1318
- rootSchema: _listCategoriesForItemRequest,
1319
- depSchemas: {},
1320
- fqdnTransformation: {
1321
- paths: [],
1322
- transformation: _fromVeloEntity,
1323
- },
1324
- customTransformation: requestTransformation,
1325
- });
1326
- const { fromJSON } = serializer({
1327
- rootSchema: _listCategoriesForItemResponse,
1328
- depSchemas: {},
1329
- fqdnTransformation: {
1330
- paths: [],
1331
- transformation: _toVeloEntity,
1332
- },
1333
- customTransformation: responseTransformation,
1334
- });
1335
- const payload = toAmbassadorRequest([itemReference, options]);
1336
- const reqOpts = ambassadorWixCategoriesV1Category.listCategoriesForItem(payload);
1337
- __log(`"ListCategoriesForItem" sending request with: ${__inspect(reqOpts)}`);
1338
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1339
- try {
1340
- const result = yield httpClient.request(reqOpts);
1341
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1342
- return fromJSON(result.data);
1343
- }
1344
- catch (err) {
1345
- const transformedError = transformError(err, requestTransformation, [
1346
- 'itemReference',
1347
- 'options',
1348
- ]);
1349
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1350
- throw transformedError;
1351
- }
1352
- });
1353
- }
1354
- /**
1355
- * Changes position of `item` in category. Will be used when sort items by manual arrangement
1356
- * @param categoryId - ID of category.
1357
- * Item must be direct child of this category, otherwise error returned
1358
- * @param treeReference - A reference to the tree that contains this category.
1359
- * @public
1360
- * @documentationMaturity preview
1361
- * @requiredField categoryId
1362
- * @requiredField options.item
1363
- * @requiredField options.position
1364
- * @requiredField treeReference
1365
- * @requiredField treeReference.appNamespace
1366
- */
1367
- export function moveItemInCategory(categoryId, treeReference, options) {
1368
- var _a, _b, _c;
1369
- return __awaiter(this, arguments, void 0, function* () {
1370
- const requestTransformation = {
1371
- categoryId: '$[0]',
1372
- treeReference: '$[1]',
1373
- item: '$[2].item',
1374
- position: '$[2].position',
1375
- beforeItem: '$[2].beforeItem',
1376
- };
1377
- const responseTransformation = '$';
1378
- // @ts-ignore
1379
- const { httpClient, sideEffects } = arguments[3];
1380
- const { toAmbassadorRequest } = serializer({
1381
- rootSchema: _moveItemInCategoryRequest,
1382
- depSchemas: {},
1383
- fqdnTransformation: {
1384
- paths: [],
1385
- transformation: _fromVeloEntity,
1386
- },
1387
- customTransformation: requestTransformation,
1388
- });
1389
- const { fromJSON } = serializer({
1390
- rootSchema: _moveItemInCategoryResponse,
1391
- depSchemas: {},
1392
- fqdnTransformation: {
1393
- paths: [],
1394
- transformation: _toVeloEntity,
1395
- },
1396
- customTransformation: responseTransformation,
1397
- });
1398
- const payload = toAmbassadorRequest([categoryId, treeReference, options]);
1399
- const reqOpts = ambassadorWixCategoriesV1Category.moveItemInCategory(payload);
1400
- __log(`"MoveItemInCategory" sending request with: ${__inspect(reqOpts)}`);
1401
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1402
- try {
1403
- const result = yield httpClient.request(reqOpts);
1404
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1405
- return fromJSON(result.data);
1406
- }
1407
- catch (err) {
1408
- const transformedError = transformError(err, requestTransformation, [
1409
- 'categoryId',
1410
- 'treeReference',
1411
- 'options',
1412
- ]);
1413
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1414
- throw transformedError;
1415
- }
1416
- });
1417
- }
1418
- /**
1419
- * Set arranged items in category. Will be used when sort items by manual arrangement.
1420
- * Calling this endpoint overrides existing list of arranged items in category.
1421
- * @param categoryId - ID of category.
1422
- * @param treeReference - A reference to the tree that contains this category.
1423
- * @public
1424
- * @documentationMaturity preview
1425
- * @requiredField categoryId
1426
- * @requiredField treeReference
1427
- * @requiredField treeReference.appNamespace
1428
- */
1429
- export function setArrangedItems(categoryId, treeReference, options) {
1430
- var _a, _b, _c;
1431
- return __awaiter(this, arguments, void 0, function* () {
1432
- const requestTransformation = {
1433
- categoryId: '$[0]',
1434
- treeReference: '$[1]',
1435
- items: '$[2].items',
1436
- };
1437
- const responseTransformation = '$';
1438
- // @ts-ignore
1439
- const { httpClient, sideEffects } = arguments[3];
1440
- const { toAmbassadorRequest } = serializer({
1441
- rootSchema: _setArrangedItemsRequest,
1442
- depSchemas: {},
1443
- fqdnTransformation: {
1444
- paths: [],
1445
- transformation: _fromVeloEntity,
1446
- },
1447
- customTransformation: requestTransformation,
1448
- });
1449
- const { fromJSON } = serializer({
1450
- rootSchema: _setArrangedItemsResponse,
1451
- depSchemas: {},
1452
- fqdnTransformation: {
1453
- paths: [],
1454
- transformation: _toVeloEntity,
1455
- },
1456
- customTransformation: responseTransformation,
1457
- });
1458
- const payload = toAmbassadorRequest([categoryId, treeReference, options]);
1459
- const reqOpts = ambassadorWixCategoriesV1Category.setArrangedItems(payload);
1460
- __log(`"SetArrangedItems" sending request with: ${__inspect(reqOpts)}`);
1461
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1462
- try {
1463
- const result = yield httpClient.request(reqOpts);
1464
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1465
- return fromJSON(result.data);
1466
- }
1467
- catch (err) {
1468
- const transformedError = transformError(err, requestTransformation, [
1469
- 'categoryId',
1470
- 'treeReference',
1471
- 'options',
1472
- ]);
1473
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1474
- throw transformedError;
1475
- }
1476
- });
1477
- }
1478
- /**
1479
- * Returns arranged items in category
1480
- * @param categoryId - ID of category.
1481
- * @param treeReference - A reference to the tree that contains this category.
1482
- * @public
1483
- * @documentationMaturity preview
1484
- * @requiredField categoryId
1485
- * @requiredField treeReference
1486
- * @requiredField treeReference.appNamespace
1487
- * @applicableIdentity MEMBER
1488
- * @applicableIdentity VISITOR
1489
- */
1490
- export function getArrangedItems(categoryId, treeReference) {
1491
- var _a, _b, _c;
1492
- return __awaiter(this, arguments, void 0, function* () {
1493
- const requestTransformation = { categoryId: '$[0]', treeReference: '$[1]' };
1494
- const responseTransformation = '$';
1495
- // @ts-ignore
1496
- const { httpClient, sideEffects } = arguments[2];
1497
- const { toAmbassadorRequest } = serializer({
1498
- rootSchema: _getArrangedItemsRequest,
1499
- depSchemas: {},
1500
- fqdnTransformation: {
1501
- paths: [],
1502
- transformation: _fromVeloEntity,
1503
- },
1504
- customTransformation: requestTransformation,
1505
- });
1506
- const { fromJSON } = serializer({
1507
- rootSchema: _getArrangedItemsResponse,
1508
- depSchemas: {},
1509
- fqdnTransformation: {
1510
- paths: [],
1511
- transformation: _toVeloEntity,
1512
- },
1513
- customTransformation: responseTransformation,
1514
- });
1515
- const payload = toAmbassadorRequest([categoryId, treeReference]);
1516
- const reqOpts = ambassadorWixCategoriesV1Category.getArrangedItems(payload);
1517
- __log(`"GetArrangedItems" sending request with: ${__inspect(reqOpts)}`);
1518
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
1519
- try {
1520
- const result = yield httpClient.request(reqOpts);
1521
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
1522
- return fromJSON(result.data);
1523
- }
1524
- catch (err) {
1525
- const transformedError = transformError(err, requestTransformation, [
1526
- 'categoryId',
1527
- 'treeReference',
1528
- ]);
1529
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
1530
- throw transformedError;
1531
- }
1532
- });
1533
- }
1534
- //# sourceMappingURL=categories-v1-category.universal.js.map