@wix/categories 1.0.22 → 1.0.24
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/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/categories-v1-category.context.d.ts +20 -0
- package/build/cjs/src/categories-v1-category.context.js +203 -0
- package/build/cjs/src/categories-v1-category.context.js.map +1 -0
- package/build/cjs/src/categories-v1-category.http.js +664 -501
- package/build/cjs/src/categories-v1-category.http.js.map +1 -1
- package/build/cjs/src/categories-v1-category.meta.d.ts +1 -1
- package/build/cjs/src/categories-v1-category.meta.js +5 -1
- package/build/cjs/src/categories-v1-category.meta.js.map +1 -1
- package/build/cjs/src/categories-v1-category.public.d.ts +13 -12
- package/build/cjs/src/categories-v1-category.public.js +9 -1
- package/build/cjs/src/categories-v1-category.public.js.map +1 -1
- package/build/cjs/src/categories-v1-category.types.d.ts +168 -26
- package/build/cjs/src/categories-v1-category.types.js +69 -42
- package/build/cjs/src/categories-v1-category.types.js.map +1 -1
- package/build/cjs/src/categories-v1-category.universal.d.ts +327 -49
- package/build/cjs/src/categories-v1-category.universal.js +374 -155
- package/build/cjs/src/categories-v1-category.universal.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/src/categories-v1-category.context.d.ts +20 -0
- package/build/es/src/categories-v1-category.context.js +182 -0
- package/build/es/src/categories-v1-category.context.js.map +1 -0
- package/build/es/src/categories-v1-category.http.js +664 -501
- package/build/es/src/categories-v1-category.http.js.map +1 -1
- package/build/es/src/categories-v1-category.meta.d.ts +1 -1
- package/build/es/src/categories-v1-category.public.d.ts +13 -12
- package/build/es/src/categories-v1-category.public.js +1 -0
- package/build/es/src/categories-v1-category.public.js.map +1 -1
- package/build/es/src/categories-v1-category.types.d.ts +168 -26
- package/build/es/src/categories-v1-category.types.js +29 -2
- package/build/es/src/categories-v1-category.types.js.map +1 -1
- package/build/es/src/categories-v1-category.universal.d.ts +327 -49
- package/build/es/src/categories-v1-category.universal.js +328 -113
- package/build/es/src/categories-v1-category.universal.js.map +1 -1
- package/context/package.json +6 -0
- package/package.json +12 -6
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -28,24 +32,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
32
|
});
|
|
29
33
|
};
|
|
30
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.
|
|
32
|
-
exports.getArrangedItems = exports.setArrangedItems = exports.moveItemInCategory = exports.listCategoriesForItem = exports.listItemsInCategory = exports.bulkRemoveItemFromCategories = exports.bulkRemoveItemsFromCategory = exports.bulkAddItemToCategories = exports.bulkAddItemsToCategory = void 0;
|
|
35
|
+
exports.updateCategory = exports.getCategory = exports.createCategory = exports.onCategoryItemsArrangedInCategory = exports.onCategoryItemRemovedFromCategory = exports.onCategoryItemAddedToCategory = exports.onCategoryMoved = exports.onCategoryDeleted = exports.onCategoryUpdated = exports.onCategoryCreated = exports.Position = exports.MoveCategoryRequestPosition = exports.Mode = exports.AggregationType = exports.Interval = exports.NestedAggregationType = exports.ScalarType = exports.MissingValues = exports.SortDirection = exports.SortType = exports.SortOrder = exports.RequestedFields = exports.NullValue = exports.VerticalAlignment = exports.Direction = exports.InitialExpandedItems = exports.AppType = exports.FontType = exports.DecorationType = exports.BackgroundType = exports.PollLayoutDirection = exports.PollLayoutType = exports.VoteRole = exports.ViewRole = exports.MapType = exports.Source = exports.ThumbnailsAlignment = exports.Crop = exports.Orientation = exports.LayoutType = exports.ViewMode = exports.Alignment = exports.Width = exports.LineStyle = exports.TextAlignment = exports.Target = exports.Type = exports.PluginContainerDataAlignment = exports.WidthType = exports.NodeType = void 0;
|
|
36
|
+
exports.getArrangedItems = exports.setArrangedItems = exports.moveItemInCategory = exports.listCategoriesForItem = exports.listItemsInCategory = exports.bulkRemoveItemFromCategories = exports.bulkRemoveItemsFromCategory = exports.bulkAddItemToCategories = exports.bulkAddItemsToCategory = exports.updateCategoryVisibility = exports.bulkUpdateCategories = exports.moveCategory = exports.countCategories = exports.searchCategories = exports.deleteCategory = void 0;
|
|
33
37
|
const velo_1 = require("@wix/metro-runtime/velo");
|
|
38
|
+
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
39
|
+
const sdk_types_1 = require("@wix/sdk-types");
|
|
34
40
|
const ambassadorWixCategoriesV1Category = __importStar(require("./categories-v1-category.http"));
|
|
35
41
|
// @ts-ignore
|
|
36
|
-
let __verbose = false;
|
|
37
|
-
function __log(...args) {
|
|
38
|
-
__verbose && console.log(...args);
|
|
39
|
-
}
|
|
40
|
-
function __inspect(obj) {
|
|
41
|
-
return obj;
|
|
42
|
-
}
|
|
43
|
-
exports.__debug = {
|
|
44
|
-
verboseLogging: {
|
|
45
|
-
on: () => (__verbose = true),
|
|
46
|
-
off: () => (__verbose = false),
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
42
|
const _toVeloEntity = '$';
|
|
50
43
|
const _fromVeloEntity = '$';
|
|
51
44
|
var NodeType;
|
|
@@ -80,7 +73,7 @@ var NodeType;
|
|
|
80
73
|
NodeType["TABLE_ROW"] = "TABLE_ROW";
|
|
81
74
|
NodeType["EXTERNAL"] = "EXTERNAL";
|
|
82
75
|
NodeType["AUDIO"] = "AUDIO";
|
|
83
|
-
})(NodeType
|
|
76
|
+
})(NodeType || (exports.NodeType = NodeType = {}));
|
|
84
77
|
var WidthType;
|
|
85
78
|
(function (WidthType) {
|
|
86
79
|
/** Width matches the content width */
|
|
@@ -91,7 +84,7 @@ var WidthType;
|
|
|
91
84
|
WidthType["ORIGINAL"] = "ORIGINAL";
|
|
92
85
|
/** coast-to-coast display */
|
|
93
86
|
WidthType["FULL_WIDTH"] = "FULL_WIDTH";
|
|
94
|
-
})(WidthType
|
|
87
|
+
})(WidthType || (exports.WidthType = WidthType = {}));
|
|
95
88
|
var PluginContainerDataAlignment;
|
|
96
89
|
(function (PluginContainerDataAlignment) {
|
|
97
90
|
/** Center Alignment */
|
|
@@ -100,14 +93,14 @@ var PluginContainerDataAlignment;
|
|
|
100
93
|
PluginContainerDataAlignment["LEFT"] = "LEFT";
|
|
101
94
|
/** Right Alignment */
|
|
102
95
|
PluginContainerDataAlignment["RIGHT"] = "RIGHT";
|
|
103
|
-
})(PluginContainerDataAlignment
|
|
96
|
+
})(PluginContainerDataAlignment || (exports.PluginContainerDataAlignment = PluginContainerDataAlignment = {}));
|
|
104
97
|
var Type;
|
|
105
98
|
(function (Type) {
|
|
106
99
|
/** Regular link button */
|
|
107
100
|
Type["LINK"] = "LINK";
|
|
108
101
|
/** Triggers custom action that is defined in plugin configuration by the consumer */
|
|
109
102
|
Type["ACTION"] = "ACTION";
|
|
110
|
-
})(Type
|
|
103
|
+
})(Type || (exports.Type = Type = {}));
|
|
111
104
|
var Target;
|
|
112
105
|
(function (Target) {
|
|
113
106
|
/** Opens the linked document in the same frame as it was clicked (this is default) */
|
|
@@ -118,7 +111,7 @@ var Target;
|
|
|
118
111
|
Target["PARENT"] = "PARENT";
|
|
119
112
|
/** Opens the linked document in the full body of the window */
|
|
120
113
|
Target["TOP"] = "TOP";
|
|
121
|
-
})(Target
|
|
114
|
+
})(Target || (exports.Target = Target = {}));
|
|
122
115
|
var TextAlignment;
|
|
123
116
|
(function (TextAlignment) {
|
|
124
117
|
/** browser default, eqivalent to `initial` */
|
|
@@ -131,7 +124,7 @@ var TextAlignment;
|
|
|
131
124
|
TextAlignment["CENTER"] = "CENTER";
|
|
132
125
|
/** 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. */
|
|
133
126
|
TextAlignment["JUSTIFY"] = "JUSTIFY";
|
|
134
|
-
})(TextAlignment
|
|
127
|
+
})(TextAlignment || (exports.TextAlignment = TextAlignment = {}));
|
|
135
128
|
var LineStyle;
|
|
136
129
|
(function (LineStyle) {
|
|
137
130
|
/** Single Line */
|
|
@@ -142,7 +135,7 @@ var LineStyle;
|
|
|
142
135
|
LineStyle["DASHED"] = "DASHED";
|
|
143
136
|
/** Dotted Line */
|
|
144
137
|
LineStyle["DOTTED"] = "DOTTED";
|
|
145
|
-
})(LineStyle
|
|
138
|
+
})(LineStyle || (exports.LineStyle = LineStyle = {}));
|
|
146
139
|
var Width;
|
|
147
140
|
(function (Width) {
|
|
148
141
|
/** Large line */
|
|
@@ -151,7 +144,7 @@ var Width;
|
|
|
151
144
|
Width["MEDIUM"] = "MEDIUM";
|
|
152
145
|
/** Small line */
|
|
153
146
|
Width["SMALL"] = "SMALL";
|
|
154
|
-
})(Width
|
|
147
|
+
})(Width || (exports.Width = Width = {}));
|
|
155
148
|
var Alignment;
|
|
156
149
|
(function (Alignment) {
|
|
157
150
|
/** Center alignment */
|
|
@@ -160,7 +153,7 @@ var Alignment;
|
|
|
160
153
|
Alignment["LEFT"] = "LEFT";
|
|
161
154
|
/** Right alignment */
|
|
162
155
|
Alignment["RIGHT"] = "RIGHT";
|
|
163
|
-
})(Alignment
|
|
156
|
+
})(Alignment || (exports.Alignment = Alignment = {}));
|
|
164
157
|
var ViewMode;
|
|
165
158
|
(function (ViewMode) {
|
|
166
159
|
/** No PDF view */
|
|
@@ -169,7 +162,7 @@ var ViewMode;
|
|
|
169
162
|
ViewMode["FULL"] = "FULL";
|
|
170
163
|
/** Mini PDF view */
|
|
171
164
|
ViewMode["MINI"] = "MINI";
|
|
172
|
-
})(ViewMode
|
|
165
|
+
})(ViewMode || (exports.ViewMode = ViewMode = {}));
|
|
173
166
|
var LayoutType;
|
|
174
167
|
(function (LayoutType) {
|
|
175
168
|
/** Collage type */
|
|
@@ -192,21 +185,21 @@ var LayoutType;
|
|
|
192
185
|
LayoutType["MAGIC"] = "MAGIC";
|
|
193
186
|
/** Fullsize images type */
|
|
194
187
|
LayoutType["FULLSIZE"] = "FULLSIZE";
|
|
195
|
-
})(LayoutType
|
|
188
|
+
})(LayoutType || (exports.LayoutType = LayoutType = {}));
|
|
196
189
|
var Orientation;
|
|
197
190
|
(function (Orientation) {
|
|
198
191
|
/** Rows Orientation */
|
|
199
192
|
Orientation["ROWS"] = "ROWS";
|
|
200
193
|
/** Columns Orientation */
|
|
201
194
|
Orientation["COLUMNS"] = "COLUMNS";
|
|
202
|
-
})(Orientation
|
|
195
|
+
})(Orientation || (exports.Orientation = Orientation = {}));
|
|
203
196
|
var Crop;
|
|
204
197
|
(function (Crop) {
|
|
205
198
|
/** Crop to fill */
|
|
206
199
|
Crop["FILL"] = "FILL";
|
|
207
200
|
/** Crop to fit */
|
|
208
201
|
Crop["FIT"] = "FIT";
|
|
209
|
-
})(Crop
|
|
202
|
+
})(Crop || (exports.Crop = Crop = {}));
|
|
210
203
|
var ThumbnailsAlignment;
|
|
211
204
|
(function (ThumbnailsAlignment) {
|
|
212
205
|
/** Top alignment */
|
|
@@ -219,12 +212,12 @@ var ThumbnailsAlignment;
|
|
|
219
212
|
ThumbnailsAlignment["LEFT"] = "LEFT";
|
|
220
213
|
/** No thumbnail */
|
|
221
214
|
ThumbnailsAlignment["NONE"] = "NONE";
|
|
222
|
-
})(ThumbnailsAlignment
|
|
215
|
+
})(ThumbnailsAlignment || (exports.ThumbnailsAlignment = ThumbnailsAlignment = {}));
|
|
223
216
|
var Source;
|
|
224
217
|
(function (Source) {
|
|
225
218
|
Source["HTML"] = "HTML";
|
|
226
219
|
Source["ADSENSE"] = "ADSENSE";
|
|
227
|
-
})(Source
|
|
220
|
+
})(Source || (exports.Source = Source = {}));
|
|
228
221
|
var MapType;
|
|
229
222
|
(function (MapType) {
|
|
230
223
|
/** Roadmap map type */
|
|
@@ -235,7 +228,7 @@ var MapType;
|
|
|
235
228
|
MapType["HYBRID"] = "HYBRID";
|
|
236
229
|
/** Terrain map type */
|
|
237
230
|
MapType["TERRAIN"] = "TERRAIN";
|
|
238
|
-
})(MapType
|
|
231
|
+
})(MapType || (exports.MapType = MapType = {}));
|
|
239
232
|
var ViewRole;
|
|
240
233
|
(function (ViewRole) {
|
|
241
234
|
/** Only Poll creator can view the results */
|
|
@@ -244,28 +237,28 @@ var ViewRole;
|
|
|
244
237
|
ViewRole["VOTERS"] = "VOTERS";
|
|
245
238
|
/** Anyone can see the results, even if one didn't vote */
|
|
246
239
|
ViewRole["EVERYONE"] = "EVERYONE";
|
|
247
|
-
})(ViewRole
|
|
240
|
+
})(ViewRole || (exports.ViewRole = ViewRole = {}));
|
|
248
241
|
var VoteRole;
|
|
249
242
|
(function (VoteRole) {
|
|
250
243
|
/** Logged in member */
|
|
251
244
|
VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
|
|
252
245
|
/** Anyone */
|
|
253
246
|
VoteRole["ALL"] = "ALL";
|
|
254
|
-
})(VoteRole
|
|
247
|
+
})(VoteRole || (exports.VoteRole = VoteRole = {}));
|
|
255
248
|
var PollLayoutType;
|
|
256
249
|
(function (PollLayoutType) {
|
|
257
250
|
/** List */
|
|
258
251
|
PollLayoutType["LIST"] = "LIST";
|
|
259
252
|
/** Grid */
|
|
260
253
|
PollLayoutType["GRID"] = "GRID";
|
|
261
|
-
})(PollLayoutType
|
|
254
|
+
})(PollLayoutType || (exports.PollLayoutType = PollLayoutType = {}));
|
|
262
255
|
var PollLayoutDirection;
|
|
263
256
|
(function (PollLayoutDirection) {
|
|
264
257
|
/** Left-to-right */
|
|
265
258
|
PollLayoutDirection["LTR"] = "LTR";
|
|
266
259
|
/** Right-to-left */
|
|
267
260
|
PollLayoutDirection["RTL"] = "RTL";
|
|
268
|
-
})(PollLayoutDirection
|
|
261
|
+
})(PollLayoutDirection || (exports.PollLayoutDirection = PollLayoutDirection = {}));
|
|
269
262
|
var BackgroundType;
|
|
270
263
|
(function (BackgroundType) {
|
|
271
264
|
/** Color background type */
|
|
@@ -274,7 +267,7 @@ var BackgroundType;
|
|
|
274
267
|
BackgroundType["IMAGE"] = "IMAGE";
|
|
275
268
|
/** Gradiant background type */
|
|
276
269
|
BackgroundType["GRADIENT"] = "GRADIENT";
|
|
277
|
-
})(BackgroundType
|
|
270
|
+
})(BackgroundType || (exports.BackgroundType = BackgroundType = {}));
|
|
278
271
|
var DecorationType;
|
|
279
272
|
(function (DecorationType) {
|
|
280
273
|
DecorationType["BOLD"] = "BOLD";
|
|
@@ -287,18 +280,18 @@ var DecorationType;
|
|
|
287
280
|
DecorationType["COLOR"] = "COLOR";
|
|
288
281
|
DecorationType["FONT_SIZE"] = "FONT_SIZE";
|
|
289
282
|
DecorationType["EXTERNAL"] = "EXTERNAL";
|
|
290
|
-
})(DecorationType
|
|
283
|
+
})(DecorationType || (exports.DecorationType = DecorationType = {}));
|
|
291
284
|
var FontType;
|
|
292
285
|
(function (FontType) {
|
|
293
286
|
FontType["PX"] = "PX";
|
|
294
287
|
FontType["EM"] = "EM";
|
|
295
|
-
})(FontType
|
|
288
|
+
})(FontType || (exports.FontType = FontType = {}));
|
|
296
289
|
var AppType;
|
|
297
290
|
(function (AppType) {
|
|
298
291
|
AppType["PRODUCT"] = "PRODUCT";
|
|
299
292
|
AppType["EVENT"] = "EVENT";
|
|
300
293
|
AppType["BOOKING"] = "BOOKING";
|
|
301
|
-
})(AppType
|
|
294
|
+
})(AppType || (exports.AppType = AppType = {}));
|
|
302
295
|
var InitialExpandedItems;
|
|
303
296
|
(function (InitialExpandedItems) {
|
|
304
297
|
/** First item will be expended initally */
|
|
@@ -307,14 +300,14 @@ var InitialExpandedItems;
|
|
|
307
300
|
InitialExpandedItems["ALL"] = "ALL";
|
|
308
301
|
/** All items collapsed initally */
|
|
309
302
|
InitialExpandedItems["NONE"] = "NONE";
|
|
310
|
-
})(InitialExpandedItems
|
|
303
|
+
})(InitialExpandedItems || (exports.InitialExpandedItems = InitialExpandedItems = {}));
|
|
311
304
|
var Direction;
|
|
312
305
|
(function (Direction) {
|
|
313
306
|
/** Left-to-right */
|
|
314
307
|
Direction["LTR"] = "LTR";
|
|
315
308
|
/** Right-to-left */
|
|
316
309
|
Direction["RTL"] = "RTL";
|
|
317
|
-
})(Direction
|
|
310
|
+
})(Direction || (exports.Direction = Direction = {}));
|
|
318
311
|
var VerticalAlignment;
|
|
319
312
|
(function (VerticalAlignment) {
|
|
320
313
|
/** Top alignment */
|
|
@@ -323,7 +316,7 @@ var VerticalAlignment;
|
|
|
323
316
|
VerticalAlignment["MIDDLE"] = "MIDDLE";
|
|
324
317
|
/** Bottom alignment */
|
|
325
318
|
VerticalAlignment["BOTTOM"] = "BOTTOM";
|
|
326
|
-
})(VerticalAlignment
|
|
319
|
+
})(VerticalAlignment || (exports.VerticalAlignment = VerticalAlignment = {}));
|
|
327
320
|
/**
|
|
328
321
|
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
329
322
|
* `Value` type union.
|
|
@@ -334,83 +327,110 @@ var NullValue;
|
|
|
334
327
|
(function (NullValue) {
|
|
335
328
|
/** Null value. */
|
|
336
329
|
NullValue["NULL_VALUE"] = "NULL_VALUE";
|
|
337
|
-
})(NullValue
|
|
330
|
+
})(NullValue || (exports.NullValue = NullValue = {}));
|
|
338
331
|
var RequestedFields;
|
|
339
332
|
(function (RequestedFields) {
|
|
340
333
|
RequestedFields["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
341
334
|
RequestedFields["BREADCRUMBS"] = "BREADCRUMBS";
|
|
342
|
-
})(RequestedFields
|
|
335
|
+
})(RequestedFields || (exports.RequestedFields = RequestedFields = {}));
|
|
343
336
|
var SortOrder;
|
|
344
337
|
(function (SortOrder) {
|
|
345
338
|
SortOrder["ASC"] = "ASC";
|
|
346
339
|
SortOrder["DESC"] = "DESC";
|
|
347
|
-
})(SortOrder
|
|
340
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
348
341
|
var SortType;
|
|
349
342
|
(function (SortType) {
|
|
343
|
+
/** Should sort by number of matches */
|
|
350
344
|
SortType["COUNT"] = "COUNT";
|
|
345
|
+
/** Should sort by value of the field alphabetically */
|
|
351
346
|
SortType["VALUE"] = "VALUE";
|
|
352
|
-
})(SortType
|
|
347
|
+
})(SortType || (exports.SortType = SortType = {}));
|
|
353
348
|
var SortDirection;
|
|
354
349
|
(function (SortDirection) {
|
|
350
|
+
/** Should sort in descending order */
|
|
355
351
|
SortDirection["DESC"] = "DESC";
|
|
352
|
+
/** Should sort in ascending order */
|
|
356
353
|
SortDirection["ASC"] = "ASC";
|
|
357
|
-
})(SortDirection
|
|
354
|
+
})(SortDirection || (exports.SortDirection = SortDirection = {}));
|
|
358
355
|
var MissingValues;
|
|
359
356
|
(function (MissingValues) {
|
|
357
|
+
/** Should missing values be excluded from the aggregation results */
|
|
360
358
|
MissingValues["EXCLUDE"] = "EXCLUDE";
|
|
359
|
+
/** Should missing values be included in the aggregation results */
|
|
361
360
|
MissingValues["INCLUDE"] = "INCLUDE";
|
|
362
|
-
})(MissingValues
|
|
361
|
+
})(MissingValues || (exports.MissingValues = MissingValues = {}));
|
|
363
362
|
var ScalarType;
|
|
364
363
|
(function (ScalarType) {
|
|
365
364
|
ScalarType["UNKNOWN_SCALAR_TYPE"] = "UNKNOWN_SCALAR_TYPE";
|
|
365
|
+
/** Count of distinct values */
|
|
366
366
|
ScalarType["COUNT_DISTINCT"] = "COUNT_DISTINCT";
|
|
367
|
+
/** Minimum value */
|
|
367
368
|
ScalarType["MIN"] = "MIN";
|
|
369
|
+
/** Maximum value */
|
|
368
370
|
ScalarType["MAX"] = "MAX";
|
|
371
|
+
/** Sum of values */
|
|
369
372
|
ScalarType["SUM"] = "SUM";
|
|
373
|
+
/** Average of values */
|
|
370
374
|
ScalarType["AVG"] = "AVG";
|
|
371
|
-
})(ScalarType
|
|
375
|
+
})(ScalarType || (exports.ScalarType = ScalarType = {}));
|
|
372
376
|
var NestedAggregationType;
|
|
373
377
|
(function (NestedAggregationType) {
|
|
374
378
|
NestedAggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
|
|
379
|
+
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
375
380
|
NestedAggregationType["VALUE"] = "VALUE";
|
|
381
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket */
|
|
376
382
|
NestedAggregationType["RANGE"] = "RANGE";
|
|
383
|
+
/** A single-value metric aggregation - e.g. min, max, sum, avg */
|
|
377
384
|
NestedAggregationType["SCALAR"] = "SCALAR";
|
|
385
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
378
386
|
NestedAggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
|
|
379
|
-
})(NestedAggregationType
|
|
387
|
+
})(NestedAggregationType || (exports.NestedAggregationType = NestedAggregationType = {}));
|
|
380
388
|
var Interval;
|
|
381
389
|
(function (Interval) {
|
|
382
390
|
Interval["UNKNOWN_INTERVAL"] = "UNKNOWN_INTERVAL";
|
|
391
|
+
/** Yearly interval */
|
|
383
392
|
Interval["YEAR"] = "YEAR";
|
|
393
|
+
/** Monthly interval */
|
|
384
394
|
Interval["MONTH"] = "MONTH";
|
|
395
|
+
/** Weekly interval */
|
|
385
396
|
Interval["WEEK"] = "WEEK";
|
|
397
|
+
/** Daily interval */
|
|
386
398
|
Interval["DAY"] = "DAY";
|
|
399
|
+
/** Hourly interval */
|
|
387
400
|
Interval["HOUR"] = "HOUR";
|
|
401
|
+
/** Minute interval */
|
|
388
402
|
Interval["MINUTE"] = "MINUTE";
|
|
403
|
+
/** Second interval */
|
|
389
404
|
Interval["SECOND"] = "SECOND";
|
|
390
|
-
})(Interval
|
|
405
|
+
})(Interval || (exports.Interval = Interval = {}));
|
|
391
406
|
var AggregationType;
|
|
392
407
|
(function (AggregationType) {
|
|
393
408
|
AggregationType["UNKNOWN_AGGREGATION_TYPE"] = "UNKNOWN_AGGREGATION_TYPE";
|
|
409
|
+
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
394
410
|
AggregationType["VALUE"] = "VALUE";
|
|
411
|
+
/** An aggregation, where user can define set of ranges - each representing a bucket */
|
|
395
412
|
AggregationType["RANGE"] = "RANGE";
|
|
413
|
+
/** A single-value metric aggregation - e.g. min, max, sum, avg */
|
|
396
414
|
AggregationType["SCALAR"] = "SCALAR";
|
|
415
|
+
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
397
416
|
AggregationType["DATE_HISTOGRAM"] = "DATE_HISTOGRAM";
|
|
417
|
+
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
398
418
|
AggregationType["NESTED"] = "NESTED";
|
|
399
|
-
})(AggregationType
|
|
419
|
+
})(AggregationType || (exports.AggregationType = AggregationType = {}));
|
|
400
420
|
var Mode;
|
|
401
421
|
(function (Mode) {
|
|
402
|
-
/**
|
|
422
|
+
/** Any of the search terms must be present */
|
|
403
423
|
Mode["OR"] = "OR";
|
|
404
|
-
/**
|
|
424
|
+
/** All search terms must be present */
|
|
405
425
|
Mode["AND"] = "AND";
|
|
406
|
-
})(Mode
|
|
426
|
+
})(Mode || (exports.Mode = Mode = {}));
|
|
407
427
|
var MoveCategoryRequestPosition;
|
|
408
428
|
(function (MoveCategoryRequestPosition) {
|
|
409
429
|
MoveCategoryRequestPosition["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
|
|
410
430
|
MoveCategoryRequestPosition["FIRST"] = "FIRST";
|
|
411
431
|
MoveCategoryRequestPosition["LAST"] = "LAST";
|
|
412
432
|
MoveCategoryRequestPosition["BEFORE"] = "BEFORE";
|
|
413
|
-
})(MoveCategoryRequestPosition
|
|
433
|
+
})(MoveCategoryRequestPosition || (exports.MoveCategoryRequestPosition = MoveCategoryRequestPosition = {}));
|
|
414
434
|
var Position;
|
|
415
435
|
(function (Position) {
|
|
416
436
|
Position["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
|
|
@@ -418,7 +438,7 @@ var Position;
|
|
|
418
438
|
Position["LAST"] = "LAST";
|
|
419
439
|
Position["BEFORE"] = "BEFORE";
|
|
420
440
|
Position["NONE"] = "NONE";
|
|
421
|
-
})(Position
|
|
441
|
+
})(Position || (exports.Position = Position = {}));
|
|
422
442
|
const _bulkAddItemsToCategoryRequest = {};
|
|
423
443
|
const _bulkAddItemsToCategoryResponse = {};
|
|
424
444
|
const _bulkAddItemToCategoriesRequest = {};
|
|
@@ -463,6 +483,13 @@ const _updateCategoryRequest = { category: '_category' };
|
|
|
463
483
|
const _updateCategoryResponse = { category: '_category' };
|
|
464
484
|
const _updateCategoryVisibilityRequest = {};
|
|
465
485
|
const _updateCategoryVisibilityResponse = { category: '_category' };
|
|
486
|
+
exports.onCategoryCreated = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_created')();
|
|
487
|
+
exports.onCategoryUpdated = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_updated')();
|
|
488
|
+
exports.onCategoryDeleted = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_deleted')();
|
|
489
|
+
exports.onCategoryMoved = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_category_moved')();
|
|
490
|
+
exports.onCategoryItemAddedToCategory = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_item_added_to_category')();
|
|
491
|
+
exports.onCategoryItemRemovedFromCategory = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_item_removed_from_category')();
|
|
492
|
+
exports.onCategoryItemsArrangedInCategory = (0, sdk_types_1.EventDefinition)('wix.categories.v1.category_items_arranged_in_category')();
|
|
466
493
|
/**
|
|
467
494
|
* Creates a new Category.
|
|
468
495
|
* @param category - Category to be created.
|
|
@@ -473,6 +500,11 @@ const _updateCategoryVisibilityResponse = { category: '_category' };
|
|
|
473
500
|
* @requiredField category.parentCategory._id
|
|
474
501
|
* @requiredField options.treeReference
|
|
475
502
|
* @requiredField options.treeReference.appNamespace
|
|
503
|
+
* @permissionScope Manage Stores - all permissions
|
|
504
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
505
|
+
* @permissionScope Manage Products
|
|
506
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
507
|
+
* @applicableIdentity APP
|
|
476
508
|
* @returns The created Category.
|
|
477
509
|
*/
|
|
478
510
|
function createCategory(category, options) {
|
|
@@ -506,7 +538,6 @@ function createCategory(category, options) {
|
|
|
506
538
|
});
|
|
507
539
|
const payload = toAmbassadorRequest([category, options]);
|
|
508
540
|
const reqOpts = ambassadorWixCategoriesV1Category.createCategory(payload);
|
|
509
|
-
__log(`"CreateCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
510
541
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
511
542
|
try {
|
|
512
543
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -514,10 +545,15 @@ function createCategory(category, options) {
|
|
|
514
545
|
return fromJSON(result.data);
|
|
515
546
|
}
|
|
516
547
|
catch (err) {
|
|
517
|
-
const transformedError = (0,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
548
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
549
|
+
spreadPathsToArguments: {},
|
|
550
|
+
explicitPathsToArguments: {
|
|
551
|
+
category: '$[0]',
|
|
552
|
+
treeReference: '$[1].treeReference',
|
|
553
|
+
fields: '$[1].fields',
|
|
554
|
+
},
|
|
555
|
+
singleArgumentUnchanged: false,
|
|
556
|
+
}, ['category', 'options']);
|
|
521
557
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
522
558
|
throw transformedError;
|
|
523
559
|
}
|
|
@@ -533,6 +569,17 @@ exports.createCategory = createCategory;
|
|
|
533
569
|
* @requiredField categoryId
|
|
534
570
|
* @requiredField treeReference
|
|
535
571
|
* @requiredField treeReference.appNamespace
|
|
572
|
+
* @permissionScope Manage Stores - all permissions
|
|
573
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
574
|
+
* @permissionScope Manage Products
|
|
575
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
576
|
+
* @permissionScope Read Stores - all read permissions
|
|
577
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
578
|
+
* @permissionScope Read Products
|
|
579
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
580
|
+
* @permissionScope Manage Orders
|
|
581
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
582
|
+
* @applicableIdentity APP
|
|
536
583
|
* @applicableIdentity MEMBER
|
|
537
584
|
* @applicableIdentity VISITOR
|
|
538
585
|
* @returns The retrieved Category.
|
|
@@ -568,7 +615,6 @@ function getCategory(categoryId, treeReference, options) {
|
|
|
568
615
|
});
|
|
569
616
|
const payload = toAmbassadorRequest([categoryId, treeReference, options]);
|
|
570
617
|
const reqOpts = ambassadorWixCategoriesV1Category.getCategory(payload);
|
|
571
|
-
__log(`"GetCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
572
618
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
573
619
|
try {
|
|
574
620
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -576,11 +622,15 @@ function getCategory(categoryId, treeReference, options) {
|
|
|
576
622
|
return fromJSON(result.data);
|
|
577
623
|
}
|
|
578
624
|
catch (err) {
|
|
579
|
-
const transformedError = (0,
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
625
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
626
|
+
spreadPathsToArguments: {},
|
|
627
|
+
explicitPathsToArguments: {
|
|
628
|
+
categoryId: '$[0]',
|
|
629
|
+
treeReference: '$[1]',
|
|
630
|
+
fields: '$[2].fields',
|
|
631
|
+
},
|
|
632
|
+
singleArgumentUnchanged: false,
|
|
633
|
+
}, ['categoryId', 'treeReference', 'options']);
|
|
584
634
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
585
635
|
throw transformedError;
|
|
586
636
|
}
|
|
@@ -599,6 +649,11 @@ exports.getCategory = getCategory;
|
|
|
599
649
|
* @requiredField category.revision
|
|
600
650
|
* @requiredField options.treeReference
|
|
601
651
|
* @requiredField options.treeReference.appNamespace
|
|
652
|
+
* @permissionScope Manage Stores - all permissions
|
|
653
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
654
|
+
* @permissionScope Manage Products
|
|
655
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
656
|
+
* @applicableIdentity APP
|
|
602
657
|
* @returns The updated Category.
|
|
603
658
|
*/
|
|
604
659
|
function updateCategory(_id, category, options) {
|
|
@@ -632,7 +687,6 @@ function updateCategory(_id, category, options) {
|
|
|
632
687
|
});
|
|
633
688
|
const payload = toAmbassadorRequest([_id, category, options]);
|
|
634
689
|
const reqOpts = ambassadorWixCategoriesV1Category.updateCategory(payload);
|
|
635
|
-
__log(`"UpdateCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
636
690
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
637
691
|
try {
|
|
638
692
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -640,11 +694,15 @@ function updateCategory(_id, category, options) {
|
|
|
640
694
|
return fromJSON(result.data);
|
|
641
695
|
}
|
|
642
696
|
catch (err) {
|
|
643
|
-
const transformedError = (0,
|
|
644
|
-
'
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
697
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
698
|
+
spreadPathsToArguments: { category: '$[1]' },
|
|
699
|
+
explicitPathsToArguments: {
|
|
700
|
+
'category.id': '$[0]',
|
|
701
|
+
treeReference: '$[2].treeReference',
|
|
702
|
+
fields: '$[2].fields',
|
|
703
|
+
},
|
|
704
|
+
singleArgumentUnchanged: false,
|
|
705
|
+
}, ['_id', 'category', 'options']);
|
|
648
706
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
649
707
|
throw transformedError;
|
|
650
708
|
}
|
|
@@ -660,6 +718,11 @@ exports.updateCategory = updateCategory;
|
|
|
660
718
|
* @requiredField categoryId
|
|
661
719
|
* @requiredField treeReference
|
|
662
720
|
* @requiredField treeReference.appNamespace
|
|
721
|
+
* @permissionScope Manage Stores - all permissions
|
|
722
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
723
|
+
* @permissionScope Manage Products
|
|
724
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
725
|
+
* @applicableIdentity APP
|
|
663
726
|
*/
|
|
664
727
|
function deleteCategory(categoryId, treeReference) {
|
|
665
728
|
var _a, _b, _c;
|
|
@@ -688,18 +751,17 @@ function deleteCategory(categoryId, treeReference) {
|
|
|
688
751
|
});
|
|
689
752
|
const payload = toAmbassadorRequest([categoryId, treeReference]);
|
|
690
753
|
const reqOpts = ambassadorWixCategoriesV1Category.deleteCategory(payload);
|
|
691
|
-
__log(`"DeleteCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
692
754
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
693
755
|
try {
|
|
694
756
|
const result = yield httpClient.request(reqOpts);
|
|
695
757
|
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
696
|
-
return fromJSON(result.data);
|
|
697
758
|
}
|
|
698
759
|
catch (err) {
|
|
699
|
-
const transformedError = (0,
|
|
700
|
-
|
|
701
|
-
'treeReference',
|
|
702
|
-
|
|
760
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
761
|
+
spreadPathsToArguments: {},
|
|
762
|
+
explicitPathsToArguments: { categoryId: '$[0]', treeReference: '$[1]' },
|
|
763
|
+
singleArgumentUnchanged: false,
|
|
764
|
+
}, ['categoryId', 'treeReference']);
|
|
703
765
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
704
766
|
throw transformedError;
|
|
705
767
|
}
|
|
@@ -712,6 +774,17 @@ exports.deleteCategory = deleteCategory;
|
|
|
712
774
|
* @documentationMaturity preview
|
|
713
775
|
* @requiredField options.treeReference
|
|
714
776
|
* @requiredField options.treeReference.appNamespace
|
|
777
|
+
* @permissionScope Manage Stores - all permissions
|
|
778
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
779
|
+
* @permissionScope Manage Products
|
|
780
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
781
|
+
* @permissionScope Read Stores - all read permissions
|
|
782
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
783
|
+
* @permissionScope Read Products
|
|
784
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
785
|
+
* @permissionScope Manage Orders
|
|
786
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
787
|
+
* @applicableIdentity APP
|
|
715
788
|
* @applicableIdentity MEMBER
|
|
716
789
|
* @applicableIdentity VISITOR
|
|
717
790
|
*/
|
|
@@ -747,7 +820,6 @@ function searchCategories(options) {
|
|
|
747
820
|
});
|
|
748
821
|
const payload = toAmbassadorRequest([options]);
|
|
749
822
|
const reqOpts = ambassadorWixCategoriesV1Category.searchCategories(payload);
|
|
750
|
-
__log(`"SearchCategories" sending request with: ${__inspect(reqOpts)}`);
|
|
751
823
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
752
824
|
try {
|
|
753
825
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -755,9 +827,16 @@ function searchCategories(options) {
|
|
|
755
827
|
return fromJSON(result.data);
|
|
756
828
|
}
|
|
757
829
|
catch (err) {
|
|
758
|
-
const transformedError = (0,
|
|
759
|
-
|
|
760
|
-
|
|
830
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
831
|
+
spreadPathsToArguments: {},
|
|
832
|
+
explicitPathsToArguments: {
|
|
833
|
+
search: '$[0].search',
|
|
834
|
+
treeReference: '$[0].treeReference',
|
|
835
|
+
includeHidden: '$[0].includeHidden',
|
|
836
|
+
fields: '$[0].fields',
|
|
837
|
+
},
|
|
838
|
+
singleArgumentUnchanged: false,
|
|
839
|
+
}, ['options']);
|
|
761
840
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
762
841
|
throw transformedError;
|
|
763
842
|
}
|
|
@@ -770,6 +849,17 @@ exports.searchCategories = searchCategories;
|
|
|
770
849
|
* @documentationMaturity preview
|
|
771
850
|
* @requiredField options.treeReference
|
|
772
851
|
* @requiredField options.treeReference.appNamespace
|
|
852
|
+
* @permissionScope Manage Stores - all permissions
|
|
853
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
854
|
+
* @permissionScope Manage Products
|
|
855
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
856
|
+
* @permissionScope Read Stores - all read permissions
|
|
857
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
858
|
+
* @permissionScope Read Products
|
|
859
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
860
|
+
* @permissionScope Manage Orders
|
|
861
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
862
|
+
* @applicableIdentity APP
|
|
773
863
|
* @applicableIdentity MEMBER
|
|
774
864
|
* @applicableIdentity VISITOR
|
|
775
865
|
*/
|
|
@@ -805,7 +895,6 @@ function countCategories(options) {
|
|
|
805
895
|
});
|
|
806
896
|
const payload = toAmbassadorRequest([options]);
|
|
807
897
|
const reqOpts = ambassadorWixCategoriesV1Category.countCategories(payload);
|
|
808
|
-
__log(`"CountCategories" sending request with: ${__inspect(reqOpts)}`);
|
|
809
898
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
810
899
|
try {
|
|
811
900
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -813,9 +902,16 @@ function countCategories(options) {
|
|
|
813
902
|
return fromJSON(result.data);
|
|
814
903
|
}
|
|
815
904
|
catch (err) {
|
|
816
|
-
const transformedError = (0,
|
|
817
|
-
|
|
818
|
-
|
|
905
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
906
|
+
spreadPathsToArguments: {},
|
|
907
|
+
explicitPathsToArguments: {
|
|
908
|
+
filter: '$[0].filter',
|
|
909
|
+
search: '$[0].search',
|
|
910
|
+
treeReference: '$[0].treeReference',
|
|
911
|
+
includeHidden: '$[0].includeHidden',
|
|
912
|
+
},
|
|
913
|
+
singleArgumentUnchanged: false,
|
|
914
|
+
}, ['options']);
|
|
819
915
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
820
916
|
throw transformedError;
|
|
821
917
|
}
|
|
@@ -834,6 +930,11 @@ exports.countCategories = countCategories;
|
|
|
834
930
|
* @requiredField options.position
|
|
835
931
|
* @requiredField treeReference
|
|
836
932
|
* @requiredField treeReference.appNamespace
|
|
933
|
+
* @permissionScope Manage Stores - all permissions
|
|
934
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
935
|
+
* @permissionScope Manage Products
|
|
936
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
937
|
+
* @applicableIdentity APP
|
|
837
938
|
*/
|
|
838
939
|
function moveCategory(categoryId, treeReference, options) {
|
|
839
940
|
var _a, _b, _c;
|
|
@@ -868,7 +969,6 @@ function moveCategory(categoryId, treeReference, options) {
|
|
|
868
969
|
});
|
|
869
970
|
const payload = toAmbassadorRequest([categoryId, treeReference, options]);
|
|
870
971
|
const reqOpts = ambassadorWixCategoriesV1Category.moveCategory(payload);
|
|
871
|
-
__log(`"MoveCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
872
972
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
873
973
|
try {
|
|
874
974
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -876,11 +976,17 @@ function moveCategory(categoryId, treeReference, options) {
|
|
|
876
976
|
return fromJSON(result.data);
|
|
877
977
|
}
|
|
878
978
|
catch (err) {
|
|
879
|
-
const transformedError = (0,
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
979
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
980
|
+
spreadPathsToArguments: {},
|
|
981
|
+
explicitPathsToArguments: {
|
|
982
|
+
categoryId: '$[0]',
|
|
983
|
+
treeReference: '$[1]',
|
|
984
|
+
parentCategoryId: '$[2].parentCategoryId',
|
|
985
|
+
position: '$[2].position',
|
|
986
|
+
moveBeforeCategoryId: '$[2].moveBeforeCategoryId',
|
|
987
|
+
},
|
|
988
|
+
singleArgumentUnchanged: false,
|
|
989
|
+
}, ['categoryId', 'treeReference', 'options']);
|
|
884
990
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
885
991
|
throw transformedError;
|
|
886
992
|
}
|
|
@@ -900,6 +1006,11 @@ exports.moveCategory = moveCategory;
|
|
|
900
1006
|
* @requiredField categories.category.revision
|
|
901
1007
|
* @requiredField options.treeReference
|
|
902
1008
|
* @requiredField options.treeReference.appNamespace
|
|
1009
|
+
* @permissionScope Manage Stores - all permissions
|
|
1010
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1011
|
+
* @permissionScope Manage Products
|
|
1012
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1013
|
+
* @applicableIdentity APP
|
|
903
1014
|
*/
|
|
904
1015
|
function bulkUpdateCategories(categories, options) {
|
|
905
1016
|
var _a, _b, _c;
|
|
@@ -932,7 +1043,6 @@ function bulkUpdateCategories(categories, options) {
|
|
|
932
1043
|
});
|
|
933
1044
|
const payload = toAmbassadorRequest([categories, options]);
|
|
934
1045
|
const reqOpts = ambassadorWixCategoriesV1Category.bulkUpdateCategories(payload);
|
|
935
|
-
__log(`"BulkUpdateCategories" sending request with: ${__inspect(reqOpts)}`);
|
|
936
1046
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
937
1047
|
try {
|
|
938
1048
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -940,10 +1050,15 @@ function bulkUpdateCategories(categories, options) {
|
|
|
940
1050
|
return fromJSON(result.data);
|
|
941
1051
|
}
|
|
942
1052
|
catch (err) {
|
|
943
|
-
const transformedError = (0,
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1053
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1054
|
+
spreadPathsToArguments: {},
|
|
1055
|
+
explicitPathsToArguments: {
|
|
1056
|
+
categories: '$[0]',
|
|
1057
|
+
treeReference: '$[1].treeReference',
|
|
1058
|
+
returnEntity: '$[1].returnEntity',
|
|
1059
|
+
},
|
|
1060
|
+
singleArgumentUnchanged: false,
|
|
1061
|
+
}, ['categories', 'options']);
|
|
947
1062
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
948
1063
|
throw transformedError;
|
|
949
1064
|
}
|
|
@@ -960,6 +1075,11 @@ exports.bulkUpdateCategories = bulkUpdateCategories;
|
|
|
960
1075
|
* @requiredField options.treeReference
|
|
961
1076
|
* @requiredField options.treeReference.appNamespace
|
|
962
1077
|
* @requiredField options.visible
|
|
1078
|
+
* @permissionScope Manage Stores - all permissions
|
|
1079
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1080
|
+
* @permissionScope Manage Products
|
|
1081
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1082
|
+
* @applicableIdentity APP
|
|
963
1083
|
*/
|
|
964
1084
|
function updateCategoryVisibility(categoryId, options) {
|
|
965
1085
|
var _a, _b, _c;
|
|
@@ -994,7 +1114,6 @@ function updateCategoryVisibility(categoryId, options) {
|
|
|
994
1114
|
});
|
|
995
1115
|
const payload = toAmbassadorRequest([categoryId, options]);
|
|
996
1116
|
const reqOpts = ambassadorWixCategoriesV1Category.updateCategoryVisibility(payload);
|
|
997
|
-
__log(`"UpdateCategoryVisibility" sending request with: ${__inspect(reqOpts)}`);
|
|
998
1117
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
999
1118
|
try {
|
|
1000
1119
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1002,10 +1121,17 @@ function updateCategoryVisibility(categoryId, options) {
|
|
|
1002
1121
|
return fromJSON(result.data);
|
|
1003
1122
|
}
|
|
1004
1123
|
catch (err) {
|
|
1005
|
-
const transformedError = (0,
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1124
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1125
|
+
spreadPathsToArguments: {},
|
|
1126
|
+
explicitPathsToArguments: {
|
|
1127
|
+
categoryId: '$[0]',
|
|
1128
|
+
visible: '$[1].visible',
|
|
1129
|
+
treeReference: '$[1].treeReference',
|
|
1130
|
+
revision: '$[1].revision',
|
|
1131
|
+
fields: '$[1].fields',
|
|
1132
|
+
},
|
|
1133
|
+
singleArgumentUnchanged: false,
|
|
1134
|
+
}, ['categoryId', 'options']);
|
|
1009
1135
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1010
1136
|
throw transformedError;
|
|
1011
1137
|
}
|
|
@@ -1025,6 +1151,11 @@ exports.updateCategoryVisibility = updateCategoryVisibility;
|
|
|
1025
1151
|
* @requiredField options
|
|
1026
1152
|
* @requiredField options.treeReference
|
|
1027
1153
|
* @requiredField options.treeReference.appNamespace
|
|
1154
|
+
* @permissionScope Manage Stores - all permissions
|
|
1155
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1156
|
+
* @permissionScope Manage Products
|
|
1157
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1158
|
+
* @applicableIdentity APP
|
|
1028
1159
|
*/
|
|
1029
1160
|
function bulkAddItemsToCategory(categoryId, items, options) {
|
|
1030
1161
|
var _a, _b, _c;
|
|
@@ -1057,7 +1188,6 @@ function bulkAddItemsToCategory(categoryId, items, options) {
|
|
|
1057
1188
|
});
|
|
1058
1189
|
const payload = toAmbassadorRequest([categoryId, items, options]);
|
|
1059
1190
|
const reqOpts = ambassadorWixCategoriesV1Category.bulkAddItemsToCategory(payload);
|
|
1060
|
-
__log(`"BulkAddItemsToCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
1061
1191
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1062
1192
|
try {
|
|
1063
1193
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1065,11 +1195,15 @@ function bulkAddItemsToCategory(categoryId, items, options) {
|
|
|
1065
1195
|
return fromJSON(result.data);
|
|
1066
1196
|
}
|
|
1067
1197
|
catch (err) {
|
|
1068
|
-
const transformedError = (0,
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1198
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1199
|
+
spreadPathsToArguments: {},
|
|
1200
|
+
explicitPathsToArguments: {
|
|
1201
|
+
categoryId: '$[0]',
|
|
1202
|
+
items: '$[1]',
|
|
1203
|
+
treeReference: '$[2].treeReference',
|
|
1204
|
+
},
|
|
1205
|
+
singleArgumentUnchanged: false,
|
|
1206
|
+
}, ['categoryId', 'items', 'options']);
|
|
1073
1207
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1074
1208
|
throw transformedError;
|
|
1075
1209
|
}
|
|
@@ -1088,6 +1222,11 @@ exports.bulkAddItemsToCategory = bulkAddItemsToCategory;
|
|
|
1088
1222
|
* @requiredField options.categoryIds
|
|
1089
1223
|
* @requiredField options.treeReference
|
|
1090
1224
|
* @requiredField options.treeReference.appNamespace
|
|
1225
|
+
* @permissionScope Manage Stores - all permissions
|
|
1226
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1227
|
+
* @permissionScope Manage Products
|
|
1228
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1229
|
+
* @applicableIdentity APP
|
|
1091
1230
|
*/
|
|
1092
1231
|
function bulkAddItemToCategories(itemReference, options) {
|
|
1093
1232
|
var _a, _b, _c;
|
|
@@ -1120,7 +1259,6 @@ function bulkAddItemToCategories(itemReference, options) {
|
|
|
1120
1259
|
});
|
|
1121
1260
|
const payload = toAmbassadorRequest([itemReference, options]);
|
|
1122
1261
|
const reqOpts = ambassadorWixCategoriesV1Category.bulkAddItemToCategories(payload);
|
|
1123
|
-
__log(`"BulkAddItemToCategories" sending request with: ${__inspect(reqOpts)}`);
|
|
1124
1262
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1125
1263
|
try {
|
|
1126
1264
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1128,10 +1266,15 @@ function bulkAddItemToCategories(itemReference, options) {
|
|
|
1128
1266
|
return fromJSON(result.data);
|
|
1129
1267
|
}
|
|
1130
1268
|
catch (err) {
|
|
1131
|
-
const transformedError = (0,
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1269
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1270
|
+
spreadPathsToArguments: {},
|
|
1271
|
+
explicitPathsToArguments: {
|
|
1272
|
+
itemReference: '$[0]',
|
|
1273
|
+
categoryIds: '$[1].categoryIds',
|
|
1274
|
+
treeReference: '$[1].treeReference',
|
|
1275
|
+
},
|
|
1276
|
+
singleArgumentUnchanged: false,
|
|
1277
|
+
}, ['itemReference', 'options']);
|
|
1135
1278
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1136
1279
|
throw transformedError;
|
|
1137
1280
|
}
|
|
@@ -1151,6 +1294,11 @@ exports.bulkAddItemToCategories = bulkAddItemToCategories;
|
|
|
1151
1294
|
* @requiredField options
|
|
1152
1295
|
* @requiredField options.treeReference
|
|
1153
1296
|
* @requiredField options.treeReference.appNamespace
|
|
1297
|
+
* @permissionScope Manage Stores - all permissions
|
|
1298
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1299
|
+
* @permissionScope Manage Products
|
|
1300
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1301
|
+
* @applicableIdentity APP
|
|
1154
1302
|
*/
|
|
1155
1303
|
function bulkRemoveItemsFromCategory(categoryId, items, options) {
|
|
1156
1304
|
var _a, _b, _c;
|
|
@@ -1183,7 +1331,6 @@ function bulkRemoveItemsFromCategory(categoryId, items, options) {
|
|
|
1183
1331
|
});
|
|
1184
1332
|
const payload = toAmbassadorRequest([categoryId, items, options]);
|
|
1185
1333
|
const reqOpts = ambassadorWixCategoriesV1Category.bulkRemoveItemsFromCategory(payload);
|
|
1186
|
-
__log(`"BulkRemoveItemsFromCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
1187
1334
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1188
1335
|
try {
|
|
1189
1336
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1191,11 +1338,15 @@ function bulkRemoveItemsFromCategory(categoryId, items, options) {
|
|
|
1191
1338
|
return fromJSON(result.data);
|
|
1192
1339
|
}
|
|
1193
1340
|
catch (err) {
|
|
1194
|
-
const transformedError = (0,
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1341
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1342
|
+
spreadPathsToArguments: {},
|
|
1343
|
+
explicitPathsToArguments: {
|
|
1344
|
+
categoryId: '$[0]',
|
|
1345
|
+
items: '$[1]',
|
|
1346
|
+
treeReference: '$[2].treeReference',
|
|
1347
|
+
},
|
|
1348
|
+
singleArgumentUnchanged: false,
|
|
1349
|
+
}, ['categoryId', 'items', 'options']);
|
|
1199
1350
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1200
1351
|
throw transformedError;
|
|
1201
1352
|
}
|
|
@@ -1214,6 +1365,11 @@ exports.bulkRemoveItemsFromCategory = bulkRemoveItemsFromCategory;
|
|
|
1214
1365
|
* @requiredField options.categoryIds
|
|
1215
1366
|
* @requiredField options.treeReference
|
|
1216
1367
|
* @requiredField options.treeReference.appNamespace
|
|
1368
|
+
* @permissionScope Manage Stores - all permissions
|
|
1369
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1370
|
+
* @permissionScope Manage Products
|
|
1371
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1372
|
+
* @applicableIdentity APP
|
|
1217
1373
|
*/
|
|
1218
1374
|
function bulkRemoveItemFromCategories(itemReference, options) {
|
|
1219
1375
|
var _a, _b, _c;
|
|
@@ -1246,7 +1402,6 @@ function bulkRemoveItemFromCategories(itemReference, options) {
|
|
|
1246
1402
|
});
|
|
1247
1403
|
const payload = toAmbassadorRequest([itemReference, options]);
|
|
1248
1404
|
const reqOpts = ambassadorWixCategoriesV1Category.bulkRemoveItemFromCategories(payload);
|
|
1249
|
-
__log(`"BulkRemoveItemFromCategories" sending request with: ${__inspect(reqOpts)}`);
|
|
1250
1405
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1251
1406
|
try {
|
|
1252
1407
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1254,10 +1409,15 @@ function bulkRemoveItemFromCategories(itemReference, options) {
|
|
|
1254
1409
|
return fromJSON(result.data);
|
|
1255
1410
|
}
|
|
1256
1411
|
catch (err) {
|
|
1257
|
-
const transformedError = (0,
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1412
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1413
|
+
spreadPathsToArguments: {},
|
|
1414
|
+
explicitPathsToArguments: {
|
|
1415
|
+
itemReference: '$[0]',
|
|
1416
|
+
categoryIds: '$[1].categoryIds',
|
|
1417
|
+
treeReference: '$[1].treeReference',
|
|
1418
|
+
},
|
|
1419
|
+
singleArgumentUnchanged: false,
|
|
1420
|
+
}, ['itemReference', 'options']);
|
|
1261
1421
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1262
1422
|
throw transformedError;
|
|
1263
1423
|
}
|
|
@@ -1274,6 +1434,17 @@ exports.bulkRemoveItemFromCategories = bulkRemoveItemFromCategories;
|
|
|
1274
1434
|
* @requiredField categoryId
|
|
1275
1435
|
* @requiredField treeReference
|
|
1276
1436
|
* @requiredField treeReference.appNamespace
|
|
1437
|
+
* @permissionScope Manage Stores - all permissions
|
|
1438
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1439
|
+
* @permissionScope Manage Products
|
|
1440
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1441
|
+
* @permissionScope Read Stores - all read permissions
|
|
1442
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
1443
|
+
* @permissionScope Read Products
|
|
1444
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
1445
|
+
* @permissionScope Manage Orders
|
|
1446
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
1447
|
+
* @applicableIdentity APP
|
|
1277
1448
|
* @applicableIdentity MEMBER
|
|
1278
1449
|
* @applicableIdentity VISITOR
|
|
1279
1450
|
*/
|
|
@@ -1310,7 +1481,6 @@ function listItemsInCategory(categoryId, treeReference, options) {
|
|
|
1310
1481
|
});
|
|
1311
1482
|
const payload = toAmbassadorRequest([categoryId, treeReference, options]);
|
|
1312
1483
|
const reqOpts = ambassadorWixCategoriesV1Category.listItemsInCategory(payload);
|
|
1313
|
-
__log(`"ListItemsInCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
1314
1484
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1315
1485
|
try {
|
|
1316
1486
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1318,11 +1488,17 @@ function listItemsInCategory(categoryId, treeReference, options) {
|
|
|
1318
1488
|
return fromJSON(result.data);
|
|
1319
1489
|
}
|
|
1320
1490
|
catch (err) {
|
|
1321
|
-
const transformedError = (0,
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1491
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1492
|
+
spreadPathsToArguments: {},
|
|
1493
|
+
explicitPathsToArguments: {
|
|
1494
|
+
categoryId: '$[0]',
|
|
1495
|
+
treeReference: '$[1]',
|
|
1496
|
+
useCategoryArrangement: '$[2].useCategoryArrangement',
|
|
1497
|
+
includeItemsFromSubcategories: '$[2].includeItemsFromSubcategories',
|
|
1498
|
+
cursorPaging: '$[2].cursorPaging',
|
|
1499
|
+
},
|
|
1500
|
+
singleArgumentUnchanged: false,
|
|
1501
|
+
}, ['categoryId', 'treeReference', 'options']);
|
|
1326
1502
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1327
1503
|
throw transformedError;
|
|
1328
1504
|
}
|
|
@@ -1338,6 +1514,17 @@ exports.listItemsInCategory = listItemsInCategory;
|
|
|
1338
1514
|
* @requiredField options
|
|
1339
1515
|
* @requiredField options.treeReference
|
|
1340
1516
|
* @requiredField options.treeReference.appNamespace
|
|
1517
|
+
* @permissionScope Manage Stores - all permissions
|
|
1518
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1519
|
+
* @permissionScope Manage Products
|
|
1520
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1521
|
+
* @permissionScope Read Stores - all read permissions
|
|
1522
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
1523
|
+
* @permissionScope Read Products
|
|
1524
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
1525
|
+
* @permissionScope Manage Orders
|
|
1526
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
1527
|
+
* @applicableIdentity APP
|
|
1341
1528
|
* @applicableIdentity MEMBER
|
|
1342
1529
|
* @applicableIdentity VISITOR
|
|
1343
1530
|
*/
|
|
@@ -1371,7 +1558,6 @@ function listCategoriesForItem(itemReference, options) {
|
|
|
1371
1558
|
});
|
|
1372
1559
|
const payload = toAmbassadorRequest([itemReference, options]);
|
|
1373
1560
|
const reqOpts = ambassadorWixCategoriesV1Category.listCategoriesForItem(payload);
|
|
1374
|
-
__log(`"ListCategoriesForItem" sending request with: ${__inspect(reqOpts)}`);
|
|
1375
1561
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1376
1562
|
try {
|
|
1377
1563
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1379,10 +1565,14 @@ function listCategoriesForItem(itemReference, options) {
|
|
|
1379
1565
|
return fromJSON(result.data);
|
|
1380
1566
|
}
|
|
1381
1567
|
catch (err) {
|
|
1382
|
-
const transformedError = (0,
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1568
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1569
|
+
spreadPathsToArguments: {},
|
|
1570
|
+
explicitPathsToArguments: {
|
|
1571
|
+
itemReference: '$[0]',
|
|
1572
|
+
treeReference: '$[1].treeReference',
|
|
1573
|
+
},
|
|
1574
|
+
singleArgumentUnchanged: false,
|
|
1575
|
+
}, ['itemReference', 'options']);
|
|
1386
1576
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1387
1577
|
throw transformedError;
|
|
1388
1578
|
}
|
|
@@ -1401,6 +1591,11 @@ exports.listCategoriesForItem = listCategoriesForItem;
|
|
|
1401
1591
|
* @requiredField options.position
|
|
1402
1592
|
* @requiredField treeReference
|
|
1403
1593
|
* @requiredField treeReference.appNamespace
|
|
1594
|
+
* @permissionScope Manage Stores - all permissions
|
|
1595
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1596
|
+
* @permissionScope Manage Products
|
|
1597
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1598
|
+
* @applicableIdentity APP
|
|
1404
1599
|
*/
|
|
1405
1600
|
function moveItemInCategory(categoryId, treeReference, options) {
|
|
1406
1601
|
var _a, _b, _c;
|
|
@@ -1435,7 +1630,6 @@ function moveItemInCategory(categoryId, treeReference, options) {
|
|
|
1435
1630
|
});
|
|
1436
1631
|
const payload = toAmbassadorRequest([categoryId, treeReference, options]);
|
|
1437
1632
|
const reqOpts = ambassadorWixCategoriesV1Category.moveItemInCategory(payload);
|
|
1438
|
-
__log(`"MoveItemInCategory" sending request with: ${__inspect(reqOpts)}`);
|
|
1439
1633
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1440
1634
|
try {
|
|
1441
1635
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1443,11 +1637,17 @@ function moveItemInCategory(categoryId, treeReference, options) {
|
|
|
1443
1637
|
return fromJSON(result.data);
|
|
1444
1638
|
}
|
|
1445
1639
|
catch (err) {
|
|
1446
|
-
const transformedError = (0,
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1640
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1641
|
+
spreadPathsToArguments: {},
|
|
1642
|
+
explicitPathsToArguments: {
|
|
1643
|
+
categoryId: '$[0]',
|
|
1644
|
+
treeReference: '$[1]',
|
|
1645
|
+
item: '$[2].item',
|
|
1646
|
+
position: '$[2].position',
|
|
1647
|
+
beforeItem: '$[2].beforeItem',
|
|
1648
|
+
},
|
|
1649
|
+
singleArgumentUnchanged: false,
|
|
1650
|
+
}, ['categoryId', 'treeReference', 'options']);
|
|
1451
1651
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1452
1652
|
throw transformedError;
|
|
1453
1653
|
}
|
|
@@ -1464,6 +1664,11 @@ exports.moveItemInCategory = moveItemInCategory;
|
|
|
1464
1664
|
* @requiredField categoryId
|
|
1465
1665
|
* @requiredField treeReference
|
|
1466
1666
|
* @requiredField treeReference.appNamespace
|
|
1667
|
+
* @permissionScope Manage Stores - all permissions
|
|
1668
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1669
|
+
* @permissionScope Manage Products
|
|
1670
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1671
|
+
* @applicableIdentity APP
|
|
1467
1672
|
*/
|
|
1468
1673
|
function setArrangedItems(categoryId, treeReference, options) {
|
|
1469
1674
|
var _a, _b, _c;
|
|
@@ -1496,7 +1701,6 @@ function setArrangedItems(categoryId, treeReference, options) {
|
|
|
1496
1701
|
});
|
|
1497
1702
|
const payload = toAmbassadorRequest([categoryId, treeReference, options]);
|
|
1498
1703
|
const reqOpts = ambassadorWixCategoriesV1Category.setArrangedItems(payload);
|
|
1499
|
-
__log(`"SetArrangedItems" sending request with: ${__inspect(reqOpts)}`);
|
|
1500
1704
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1501
1705
|
try {
|
|
1502
1706
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1504,11 +1708,15 @@ function setArrangedItems(categoryId, treeReference, options) {
|
|
|
1504
1708
|
return fromJSON(result.data);
|
|
1505
1709
|
}
|
|
1506
1710
|
catch (err) {
|
|
1507
|
-
const transformedError = (0,
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1711
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1712
|
+
spreadPathsToArguments: {},
|
|
1713
|
+
explicitPathsToArguments: {
|
|
1714
|
+
categoryId: '$[0]',
|
|
1715
|
+
treeReference: '$[1]',
|
|
1716
|
+
items: '$[2].items',
|
|
1717
|
+
},
|
|
1718
|
+
singleArgumentUnchanged: false,
|
|
1719
|
+
}, ['categoryId', 'treeReference', 'options']);
|
|
1512
1720
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1513
1721
|
throw transformedError;
|
|
1514
1722
|
}
|
|
@@ -1524,6 +1732,17 @@ exports.setArrangedItems = setArrangedItems;
|
|
|
1524
1732
|
* @requiredField categoryId
|
|
1525
1733
|
* @requiredField treeReference
|
|
1526
1734
|
* @requiredField treeReference.appNamespace
|
|
1735
|
+
* @permissionScope Manage Stores - all permissions
|
|
1736
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1737
|
+
* @permissionScope Manage Products
|
|
1738
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1739
|
+
* @permissionScope Read Stores - all read permissions
|
|
1740
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
1741
|
+
* @permissionScope Read Products
|
|
1742
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
1743
|
+
* @permissionScope Manage Orders
|
|
1744
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
1745
|
+
* @applicableIdentity APP
|
|
1527
1746
|
* @applicableIdentity MEMBER
|
|
1528
1747
|
* @applicableIdentity VISITOR
|
|
1529
1748
|
*/
|
|
@@ -1554,7 +1773,6 @@ function getArrangedItems(categoryId, treeReference) {
|
|
|
1554
1773
|
});
|
|
1555
1774
|
const payload = toAmbassadorRequest([categoryId, treeReference]);
|
|
1556
1775
|
const reqOpts = ambassadorWixCategoriesV1Category.getArrangedItems(payload);
|
|
1557
|
-
__log(`"GetArrangedItems" sending request with: ${__inspect(reqOpts)}`);
|
|
1558
1776
|
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1559
1777
|
try {
|
|
1560
1778
|
const result = yield httpClient.request(reqOpts);
|
|
@@ -1562,10 +1780,11 @@ function getArrangedItems(categoryId, treeReference) {
|
|
|
1562
1780
|
return fromJSON(result.data);
|
|
1563
1781
|
}
|
|
1564
1782
|
catch (err) {
|
|
1565
|
-
const transformedError = (0,
|
|
1566
|
-
|
|
1567
|
-
'treeReference',
|
|
1568
|
-
|
|
1783
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
1784
|
+
spreadPathsToArguments: {},
|
|
1785
|
+
explicitPathsToArguments: { categoryId: '$[0]', treeReference: '$[1]' },
|
|
1786
|
+
singleArgumentUnchanged: false,
|
|
1787
|
+
}, ['categoryId', 'treeReference']);
|
|
1569
1788
|
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1570
1789
|
throw transformedError;
|
|
1571
1790
|
}
|