@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.
Files changed (46) hide show
  1. package/build/cjs/context.d.ts +1 -0
  2. package/build/cjs/context.js +28 -0
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.js +5 -1
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/index.typings.js +5 -1
  7. package/build/cjs/index.typings.js.map +1 -1
  8. package/build/cjs/meta.js +5 -1
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/src/categories-v1-category.context.d.ts +20 -0
  11. package/build/cjs/src/categories-v1-category.context.js +203 -0
  12. package/build/cjs/src/categories-v1-category.context.js.map +1 -0
  13. package/build/cjs/src/categories-v1-category.http.js +664 -501
  14. package/build/cjs/src/categories-v1-category.http.js.map +1 -1
  15. package/build/cjs/src/categories-v1-category.meta.d.ts +1 -1
  16. package/build/cjs/src/categories-v1-category.meta.js +5 -1
  17. package/build/cjs/src/categories-v1-category.meta.js.map +1 -1
  18. package/build/cjs/src/categories-v1-category.public.d.ts +13 -12
  19. package/build/cjs/src/categories-v1-category.public.js +9 -1
  20. package/build/cjs/src/categories-v1-category.public.js.map +1 -1
  21. package/build/cjs/src/categories-v1-category.types.d.ts +168 -26
  22. package/build/cjs/src/categories-v1-category.types.js +69 -42
  23. package/build/cjs/src/categories-v1-category.types.js.map +1 -1
  24. package/build/cjs/src/categories-v1-category.universal.d.ts +327 -49
  25. package/build/cjs/src/categories-v1-category.universal.js +374 -155
  26. package/build/cjs/src/categories-v1-category.universal.js.map +1 -1
  27. package/build/es/context.d.ts +1 -0
  28. package/build/es/context.js +2 -0
  29. package/build/es/context.js.map +1 -0
  30. package/build/es/src/categories-v1-category.context.d.ts +20 -0
  31. package/build/es/src/categories-v1-category.context.js +182 -0
  32. package/build/es/src/categories-v1-category.context.js.map +1 -0
  33. package/build/es/src/categories-v1-category.http.js +664 -501
  34. package/build/es/src/categories-v1-category.http.js.map +1 -1
  35. package/build/es/src/categories-v1-category.meta.d.ts +1 -1
  36. package/build/es/src/categories-v1-category.public.d.ts +13 -12
  37. package/build/es/src/categories-v1-category.public.js +1 -0
  38. package/build/es/src/categories-v1-category.public.js.map +1 -1
  39. package/build/es/src/categories-v1-category.types.d.ts +168 -26
  40. package/build/es/src/categories-v1-category.types.js +29 -2
  41. package/build/es/src/categories-v1-category.types.js.map +1 -1
  42. package/build/es/src/categories-v1-category.universal.d.ts +327 -49
  43. package/build/es/src/categories-v1-category.universal.js +328 -113
  44. package/build/es/src/categories-v1-category.universal.js.map +1 -1
  45. package/context/package.json +6 -0
  46. package/package.json +12 -6
@@ -2,143 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  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 = exports.updateCategory = exports.getCategory = exports.createCategory = void 0;
4
4
  const metro_runtime_1 = require("@wix/metro-runtime");
5
- const ambassador_1 = require("@wix/metro-runtime/ambassador");
5
+ const float_1 = require("@wix/sdk-runtime/transformations/float");
6
+ const float_2 = require("@wix/sdk-runtime/transformations/float");
7
+ const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
8
+ const timestamp_2 = require("@wix/sdk-runtime/transformations/timestamp");
9
+ const field_mask_1 = require("@wix/sdk-runtime/transformations/field-mask");
10
+ const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
6
11
  const metro_runtime_2 = require("@wix/metro-runtime");
7
- const _aggregation = {
8
- range: '_rangeAggregation',
9
- nested: '_nestedAggregation',
10
- };
11
- const _aggregationData = { results: '_aggregationResults' };
12
- const _aggregationResults = {
13
- ranges: '_rangeResults',
14
- scalar: '_scalarResult',
15
- groupedByValue: '_groupByValueResults',
16
- nested: '_nestedResults',
17
- };
18
- const _appEmbedData = { image: '_media' };
19
- const _audioData = { audio: '_media', coverImage: '_media' };
20
- const _background = { image: '_media' };
21
- const _bulkAddItemsToCategoryRequest = {};
22
- const _bulkAddItemsToCategoryResponse = {};
23
- const _bulkAddItemToCategoriesRequest = {};
24
- const _bulkAddItemToCategoriesResponse = {};
25
- const _bulkCategoriesResult = { category: '_category' };
26
- const _bulkRemoveItemFromCategoriesRequest = {};
27
- const _bulkRemoveItemFromCategoriesResponse = {};
28
- const _bulkRemoveItemsFromCategoryRequest = {};
29
- const _bulkRemoveItemsFromCategoryResponse = {};
30
- const _bulkUpdateCategoriesRequest = { categories: '_maskedCategory' };
31
- const _bulkUpdateCategoriesResponse = { results: '_bulkCategoriesResult' };
32
- const _category = {
33
- createdDate: 'google.protobuf.Timestamp',
34
- updatedDate: 'google.protobuf.Timestamp',
35
- image: '_commonImage',
36
- richContentDescription: '_richContent',
37
- };
38
- const _commonImage = { urlExpirationDate: 'google.protobuf.Timestamp' };
39
- const _countCategoriesRequest = {};
40
- const _countCategoriesResponse = {};
41
- const _createCategoryRequest = { category: '_category' };
42
- const _createCategoryResponse = { category: '_category' };
43
- const _cursorSearch = { aggregations: '_aggregation' };
44
- const _deleteCategoryRequest = {};
45
- const _deleteCategoryResponse = {};
46
- const _design = { poll: '_pollDesign' };
47
- const _galleryData = { items: '_item', options: '_galleryOptions' };
48
- const _galleryOptions = { item: '_itemStyle' };
49
- const _getArrangedItemsRequest = {};
50
- const _getArrangedItemsResponse = {};
51
- const _getCategoryRequest = {};
52
- const _getCategoryResponse = { category: '_category' };
53
- const _groupByValueResults = { results: '_nestedValueAggregationResult' };
54
- const _image = { media: '_media' };
55
- const _imageData = { image: '_media' };
56
- const _item = { image: '_image', video: '_video' };
57
- const _itemStyle = { ratio: 'google.protobuf.DoubleValue' };
58
- const _listCategoriesForItemRequest = {};
59
- const _listCategoriesForItemResponse = {};
60
- const _listItemsInCategoryRequest = {};
61
- const _listItemsInCategoryResponse = {};
62
- const _mapData = { mapSettings: '_mapSettings' };
63
- const _mapSettings = {
64
- lat: 'google.protobuf.DoubleValue',
65
- lng: 'google.protobuf.DoubleValue',
66
- };
67
- const _maskedCategory = {
68
- fieldMask: 'google.protobuf.FieldMask',
69
- category: '_category',
70
- };
71
- const _media = { duration: 'google.protobuf.DoubleValue' };
72
- const _metadata = {
73
- createdTimestamp: 'google.protobuf.Timestamp',
74
- updatedTimestamp: 'google.protobuf.Timestamp',
75
- };
76
- const _moveCategoryRequest = {};
77
- const _moveCategoryResponse = {};
78
- const _moveItemInCategoryRequest = {};
79
- const _moveItemInCategoryResponse = {};
80
- const _nestedAggregation = { nestedAggregations: '_nestedAggregationItem' };
81
- const _nestedAggregationItem = { range: '_rangeAggregation' };
82
- const _nestedAggregationResults = {
83
- ranges: '_rangeResults',
84
- scalar: '_scalarResult',
85
- };
86
- const _nestedResults = { results: '_results' };
87
- const _nestedResultsScalarResult = { value: 'DOUBLE' };
88
- const _nestedResultValue = {
89
- range: '_rangeResult',
90
- scalar: '_nestedResultsScalarResult',
91
- };
92
- const _nestedValueAggregationResult = {
93
- nestedResults: '_nestedAggregationResults',
94
- };
95
- const _node = {
96
- galleryData: '_galleryData',
97
- imageData: '_imageData',
98
- mapData: '_mapData',
99
- pollData: '_pollData',
100
- appEmbedData: '_appEmbedData',
101
- videoData: '_videoData',
102
- audioData: '_audioData',
103
- nodes: '_node',
104
- };
105
- const _option = { image: '_media' };
106
- const _poll = { image: '_media', options: '_option' };
107
- const _pollData = { poll: '_poll', design: '_design' };
108
- const _pollDesign = { background: '_background' };
109
- const _rangeAggregation = { buckets: '_rangeBucket' };
110
- const _rangeAggregationResult = {
111
- from: 'google.protobuf.DoubleValue',
112
- to: 'google.protobuf.DoubleValue',
113
- };
114
- const _rangeBucket = {
115
- from: 'google.protobuf.DoubleValue',
116
- to: 'google.protobuf.DoubleValue',
117
- };
118
- const _rangeResult = {
119
- from: 'google.protobuf.DoubleValue',
120
- to: 'google.protobuf.DoubleValue',
121
- };
122
- const _rangeResults = { results: '_rangeAggregationResult' };
123
- const _results = { results: 'Map#_nestedResultValue' };
124
- const _richContent = { nodes: '_node', metadata: '_metadata' };
125
- const _scalarResult = { value: 'DOUBLE' };
126
- const _searchCategoriesRequest = { search: '_cursorSearch' };
127
- const _searchCategoriesResponse = {
128
- categories: '_category',
129
- aggregationData: '_aggregationData',
130
- };
131
- const _setArrangedItemsRequest = {};
132
- const _setArrangedItemsResponse = {};
133
- const _updateCategoryRequest = {
134
- fieldMask: 'google.protobuf.FieldMask',
135
- category: '_category',
136
- };
137
- const _updateCategoryResponse = { category: '_category' };
138
- const _updateCategoryVisibilityRequest = {};
139
- const _updateCategoryVisibilityResponse = { category: '_category' };
140
- const _video = { media: '_media', thumbnail: '_media' };
141
- const _videoData = { video: '_media', thumbnail: '_media' };
142
12
  function resolveComWixCategoriesApiV1CategoriesServiceUrl(opts) {
143
13
  const domainToMappings = {
144
14
  '*.dev.wix-code.com': [
@@ -168,60 +38,69 @@ function resolveComWixCategoriesApiV1CategoriesServiceUrl(opts) {
168
38
  }
169
39
  /** Creates a new Category. */
170
40
  function createCategory(payload) {
171
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createCategoryRequest, {
172
- _appEmbedData,
173
- _audioData,
174
- _background,
175
- _category,
176
- _commonImage,
177
- _design,
178
- _galleryData,
179
- _galleryOptions,
180
- _image,
181
- _imageData,
182
- _item,
183
- _itemStyle,
184
- _mapData,
185
- _mapSettings,
186
- _media,
187
- _metadata,
188
- _node,
189
- _option,
190
- _poll,
191
- _pollData,
192
- _pollDesign,
193
- _richContent,
194
- _video,
195
- _videoData,
196
- });
197
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_createCategoryResponse, {
198
- _appEmbedData,
199
- _audioData,
200
- _background,
201
- _category,
202
- _commonImage,
203
- _design,
204
- _galleryData,
205
- _galleryOptions,
206
- _image,
207
- _imageData,
208
- _item,
209
- _itemStyle,
210
- _mapData,
211
- _mapSettings,
212
- _media,
213
- _metadata,
214
- _node,
215
- _option,
216
- _poll,
217
- _pollData,
218
- _pollDesign,
219
- _richContent,
220
- _video,
221
- _videoData,
222
- });
223
41
  function __createCategory({ host }) {
224
- const serializedData = toReq(payload);
42
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
43
+ {
44
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
45
+ paths: [
46
+ { path: 'category.createdDate' },
47
+ { path: 'category.updatedDate' },
48
+ { path: 'category.image.urlExpirationDate' },
49
+ { path: 'category.richContentDescription.metadata.createdTimestamp' },
50
+ { path: 'category.richContentDescription.metadata.updatedTimestamp' },
51
+ ],
52
+ },
53
+ {
54
+ transformFn: float_1.transformSDKFloatToRESTFloat,
55
+ paths: [
56
+ {
57
+ path: 'category.richContentDescription.nodes.galleryData.items.image.media.duration',
58
+ },
59
+ {
60
+ path: 'category.richContentDescription.nodes.galleryData.items.video.media.duration',
61
+ },
62
+ {
63
+ path: 'category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
64
+ },
65
+ {
66
+ path: 'category.richContentDescription.nodes.galleryData.options.item.ratio',
67
+ },
68
+ {
69
+ path: 'category.richContentDescription.nodes.imageData.image.duration',
70
+ },
71
+ {
72
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lat',
73
+ },
74
+ {
75
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lng',
76
+ },
77
+ {
78
+ path: 'category.richContentDescription.nodes.pollData.poll.image.duration',
79
+ },
80
+ {
81
+ path: 'category.richContentDescription.nodes.pollData.poll.options.image.duration',
82
+ },
83
+ {
84
+ path: 'category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
85
+ },
86
+ {
87
+ path: 'category.richContentDescription.nodes.appEmbedData.image.duration',
88
+ },
89
+ {
90
+ path: 'category.richContentDescription.nodes.videoData.video.duration',
91
+ },
92
+ {
93
+ path: 'category.richContentDescription.nodes.videoData.thumbnail.duration',
94
+ },
95
+ {
96
+ path: 'category.richContentDescription.nodes.audioData.audio.duration',
97
+ },
98
+ {
99
+ path: 'category.richContentDescription.nodes.audioData.coverImage.duration',
100
+ },
101
+ ],
102
+ },
103
+ ]);
225
104
  const metadata = {
226
105
  entityFqdn: 'wix.categories.v1.category',
227
106
  method: 'POST',
@@ -232,60 +111,160 @@ function createCategory(payload) {
232
111
  host,
233
112
  }),
234
113
  data: serializedData,
235
- transformResponse: fromRes,
114
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
115
+ {
116
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
117
+ paths: [
118
+ { path: 'category.createdDate' },
119
+ { path: 'category.updatedDate' },
120
+ { path: 'category.image.urlExpirationDate' },
121
+ {
122
+ path: 'category.richContentDescription.metadata.createdTimestamp',
123
+ },
124
+ {
125
+ path: 'category.richContentDescription.metadata.updatedTimestamp',
126
+ },
127
+ ],
128
+ },
129
+ {
130
+ transformFn: float_2.transformRESTFloatToSDKFloat,
131
+ paths: [
132
+ {
133
+ path: 'category.richContentDescription.nodes.galleryData.items.image.media.duration',
134
+ },
135
+ {
136
+ path: 'category.richContentDescription.nodes.galleryData.items.video.media.duration',
137
+ },
138
+ {
139
+ path: 'category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
140
+ },
141
+ {
142
+ path: 'category.richContentDescription.nodes.galleryData.options.item.ratio',
143
+ },
144
+ {
145
+ path: 'category.richContentDescription.nodes.imageData.image.duration',
146
+ },
147
+ {
148
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lat',
149
+ },
150
+ {
151
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lng',
152
+ },
153
+ {
154
+ path: 'category.richContentDescription.nodes.pollData.poll.image.duration',
155
+ },
156
+ {
157
+ path: 'category.richContentDescription.nodes.pollData.poll.options.image.duration',
158
+ },
159
+ {
160
+ path: 'category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
161
+ },
162
+ {
163
+ path: 'category.richContentDescription.nodes.appEmbedData.image.duration',
164
+ },
165
+ {
166
+ path: 'category.richContentDescription.nodes.videoData.video.duration',
167
+ },
168
+ {
169
+ path: 'category.richContentDescription.nodes.videoData.thumbnail.duration',
170
+ },
171
+ {
172
+ path: 'category.richContentDescription.nodes.audioData.audio.duration',
173
+ },
174
+ {
175
+ path: 'category.richContentDescription.nodes.audioData.coverImage.duration',
176
+ },
177
+ ],
178
+ },
179
+ ]),
236
180
  };
237
181
  return metadata;
238
182
  }
239
- __createCategory.fromReq = fromReq;
240
183
  return __createCategory;
241
184
  }
242
185
  exports.createCategory = createCategory;
243
186
  /** Retrieves a category with the provided ID. */
244
187
  function getCategory(payload) {
245
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getCategoryRequest, {});
246
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getCategoryResponse, {
247
- _appEmbedData,
248
- _audioData,
249
- _background,
250
- _category,
251
- _commonImage,
252
- _design,
253
- _galleryData,
254
- _galleryOptions,
255
- _image,
256
- _imageData,
257
- _item,
258
- _itemStyle,
259
- _mapData,
260
- _mapSettings,
261
- _media,
262
- _metadata,
263
- _node,
264
- _option,
265
- _poll,
266
- _pollData,
267
- _pollDesign,
268
- _richContent,
269
- _video,
270
- _videoData,
271
- });
272
188
  function __getCategory({ host }) {
273
- const serializedData = toReq(payload);
274
189
  const metadata = {
275
190
  entityFqdn: 'wix.categories.v1.category',
276
191
  method: 'GET',
277
192
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.GetCategory',
278
193
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
279
194
  protoPath: '/v1/categories/{categoryId}',
280
- data: serializedData,
195
+ data: payload,
281
196
  host,
282
197
  }),
283
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
284
- transformResponse: fromRes,
198
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
199
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
200
+ {
201
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
202
+ paths: [
203
+ { path: 'category.createdDate' },
204
+ { path: 'category.updatedDate' },
205
+ { path: 'category.image.urlExpirationDate' },
206
+ {
207
+ path: 'category.richContentDescription.metadata.createdTimestamp',
208
+ },
209
+ {
210
+ path: 'category.richContentDescription.metadata.updatedTimestamp',
211
+ },
212
+ ],
213
+ },
214
+ {
215
+ transformFn: float_2.transformRESTFloatToSDKFloat,
216
+ paths: [
217
+ {
218
+ path: 'category.richContentDescription.nodes.galleryData.items.image.media.duration',
219
+ },
220
+ {
221
+ path: 'category.richContentDescription.nodes.galleryData.items.video.media.duration',
222
+ },
223
+ {
224
+ path: 'category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
225
+ },
226
+ {
227
+ path: 'category.richContentDescription.nodes.galleryData.options.item.ratio',
228
+ },
229
+ {
230
+ path: 'category.richContentDescription.nodes.imageData.image.duration',
231
+ },
232
+ {
233
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lat',
234
+ },
235
+ {
236
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lng',
237
+ },
238
+ {
239
+ path: 'category.richContentDescription.nodes.pollData.poll.image.duration',
240
+ },
241
+ {
242
+ path: 'category.richContentDescription.nodes.pollData.poll.options.image.duration',
243
+ },
244
+ {
245
+ path: 'category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
246
+ },
247
+ {
248
+ path: 'category.richContentDescription.nodes.appEmbedData.image.duration',
249
+ },
250
+ {
251
+ path: 'category.richContentDescription.nodes.videoData.video.duration',
252
+ },
253
+ {
254
+ path: 'category.richContentDescription.nodes.videoData.thumbnail.duration',
255
+ },
256
+ {
257
+ path: 'category.richContentDescription.nodes.audioData.audio.duration',
258
+ },
259
+ {
260
+ path: 'category.richContentDescription.nodes.audioData.coverImage.duration',
261
+ },
262
+ ],
263
+ },
264
+ ]),
285
265
  };
286
266
  return metadata;
287
267
  }
288
- __getCategory.fromReq = fromReq;
289
268
  return __getCategory;
290
269
  }
291
270
  exports.getCategory = getCategory;
@@ -295,60 +274,73 @@ exports.getCategory = getCategory;
295
274
  * Each time the category is updated, `revision` increments by 1.
296
275
  */
297
276
  function updateCategory(payload) {
298
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateCategoryRequest, {
299
- _appEmbedData,
300
- _audioData,
301
- _background,
302
- _category,
303
- _commonImage,
304
- _design,
305
- _galleryData,
306
- _galleryOptions,
307
- _image,
308
- _imageData,
309
- _item,
310
- _itemStyle,
311
- _mapData,
312
- _mapSettings,
313
- _media,
314
- _metadata,
315
- _node,
316
- _option,
317
- _poll,
318
- _pollData,
319
- _pollDesign,
320
- _richContent,
321
- _video,
322
- _videoData,
323
- });
324
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateCategoryResponse, {
325
- _appEmbedData,
326
- _audioData,
327
- _background,
328
- _category,
329
- _commonImage,
330
- _design,
331
- _galleryData,
332
- _galleryOptions,
333
- _image,
334
- _imageData,
335
- _item,
336
- _itemStyle,
337
- _mapData,
338
- _mapSettings,
339
- _media,
340
- _metadata,
341
- _node,
342
- _option,
343
- _poll,
344
- _pollData,
345
- _pollDesign,
346
- _richContent,
347
- _video,
348
- _videoData,
349
- });
350
277
  function __updateCategory({ host }) {
351
- const serializedData = toReq(payload);
278
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
279
+ {
280
+ transformFn: field_mask_1.transformSDKFieldMaskToRESTFieldMask,
281
+ paths: [{ path: 'fieldMask' }],
282
+ },
283
+ {
284
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
285
+ paths: [
286
+ { path: 'category.createdDate' },
287
+ { path: 'category.updatedDate' },
288
+ { path: 'category.image.urlExpirationDate' },
289
+ { path: 'category.richContentDescription.metadata.createdTimestamp' },
290
+ { path: 'category.richContentDescription.metadata.updatedTimestamp' },
291
+ ],
292
+ },
293
+ {
294
+ transformFn: float_1.transformSDKFloatToRESTFloat,
295
+ paths: [
296
+ {
297
+ path: 'category.richContentDescription.nodes.galleryData.items.image.media.duration',
298
+ },
299
+ {
300
+ path: 'category.richContentDescription.nodes.galleryData.items.video.media.duration',
301
+ },
302
+ {
303
+ path: 'category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
304
+ },
305
+ {
306
+ path: 'category.richContentDescription.nodes.galleryData.options.item.ratio',
307
+ },
308
+ {
309
+ path: 'category.richContentDescription.nodes.imageData.image.duration',
310
+ },
311
+ {
312
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lat',
313
+ },
314
+ {
315
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lng',
316
+ },
317
+ {
318
+ path: 'category.richContentDescription.nodes.pollData.poll.image.duration',
319
+ },
320
+ {
321
+ path: 'category.richContentDescription.nodes.pollData.poll.options.image.duration',
322
+ },
323
+ {
324
+ path: 'category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
325
+ },
326
+ {
327
+ path: 'category.richContentDescription.nodes.appEmbedData.image.duration',
328
+ },
329
+ {
330
+ path: 'category.richContentDescription.nodes.videoData.video.duration',
331
+ },
332
+ {
333
+ path: 'category.richContentDescription.nodes.videoData.thumbnail.duration',
334
+ },
335
+ {
336
+ path: 'category.richContentDescription.nodes.audioData.audio.duration',
337
+ },
338
+ {
339
+ path: 'category.richContentDescription.nodes.audioData.coverImage.duration',
340
+ },
341
+ ],
342
+ },
343
+ ]);
352
344
  const metadata = {
353
345
  entityFqdn: 'wix.categories.v1.category',
354
346
  method: 'PATCH',
@@ -359,89 +351,115 @@ function updateCategory(payload) {
359
351
  host,
360
352
  }),
361
353
  data: serializedData,
362
- transformResponse: fromRes,
354
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
355
+ {
356
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
357
+ paths: [
358
+ { path: 'category.createdDate' },
359
+ { path: 'category.updatedDate' },
360
+ { path: 'category.image.urlExpirationDate' },
361
+ {
362
+ path: 'category.richContentDescription.metadata.createdTimestamp',
363
+ },
364
+ {
365
+ path: 'category.richContentDescription.metadata.updatedTimestamp',
366
+ },
367
+ ],
368
+ },
369
+ {
370
+ transformFn: float_2.transformRESTFloatToSDKFloat,
371
+ paths: [
372
+ {
373
+ path: 'category.richContentDescription.nodes.galleryData.items.image.media.duration',
374
+ },
375
+ {
376
+ path: 'category.richContentDescription.nodes.galleryData.items.video.media.duration',
377
+ },
378
+ {
379
+ path: 'category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
380
+ },
381
+ {
382
+ path: 'category.richContentDescription.nodes.galleryData.options.item.ratio',
383
+ },
384
+ {
385
+ path: 'category.richContentDescription.nodes.imageData.image.duration',
386
+ },
387
+ {
388
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lat',
389
+ },
390
+ {
391
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lng',
392
+ },
393
+ {
394
+ path: 'category.richContentDescription.nodes.pollData.poll.image.duration',
395
+ },
396
+ {
397
+ path: 'category.richContentDescription.nodes.pollData.poll.options.image.duration',
398
+ },
399
+ {
400
+ path: 'category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
401
+ },
402
+ {
403
+ path: 'category.richContentDescription.nodes.appEmbedData.image.duration',
404
+ },
405
+ {
406
+ path: 'category.richContentDescription.nodes.videoData.video.duration',
407
+ },
408
+ {
409
+ path: 'category.richContentDescription.nodes.videoData.thumbnail.duration',
410
+ },
411
+ {
412
+ path: 'category.richContentDescription.nodes.audioData.audio.duration',
413
+ },
414
+ {
415
+ path: 'category.richContentDescription.nodes.audioData.coverImage.duration',
416
+ },
417
+ ],
418
+ },
419
+ ]),
363
420
  };
364
421
  return metadata;
365
422
  }
366
- __updateCategory.fromReq = fromReq;
367
423
  return __updateCategory;
368
424
  }
369
425
  exports.updateCategory = updateCategory;
370
426
  /** Deletes a Category. */
371
427
  function deleteCategory(payload) {
372
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteCategoryRequest, {});
373
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteCategoryResponse, {});
374
428
  function __deleteCategory({ host }) {
375
- const serializedData = toReq(payload);
376
429
  const metadata = {
377
430
  entityFqdn: 'wix.categories.v1.category',
378
431
  method: 'DELETE',
379
432
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.DeleteCategory',
380
433
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
381
434
  protoPath: '/v1/categories/{categoryId}',
382
- data: serializedData,
435
+ data: payload,
383
436
  host,
384
437
  }),
385
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
386
- transformResponse: fromRes,
438
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
387
439
  };
388
440
  return metadata;
389
441
  }
390
- __deleteCategory.fromReq = fromReq;
391
442
  return __deleteCategory;
392
443
  }
393
444
  exports.deleteCategory = deleteCategory;
394
445
  /** Search Categories using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) */
395
446
  function searchCategories(payload) {
396
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_searchCategoriesRequest, {
397
- _aggregation,
398
- _cursorSearch,
399
- _nestedAggregation,
400
- _nestedAggregationItem,
401
- _rangeAggregation,
402
- _rangeBucket,
403
- });
404
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_searchCategoriesResponse, {
405
- _aggregationData,
406
- _aggregationResults,
407
- _appEmbedData,
408
- _audioData,
409
- _background,
410
- _category,
411
- _commonImage,
412
- _design,
413
- _galleryData,
414
- _galleryOptions,
415
- _groupByValueResults,
416
- _image,
417
- _imageData,
418
- _item,
419
- _itemStyle,
420
- _mapData,
421
- _mapSettings,
422
- _media,
423
- _metadata,
424
- _nestedAggregationResults,
425
- _nestedResultValue,
426
- _nestedResults,
427
- _nestedResultsScalarResult,
428
- _nestedValueAggregationResult,
429
- _node,
430
- _option,
431
- _poll,
432
- _pollData,
433
- _pollDesign,
434
- _rangeAggregationResult,
435
- _rangeResult,
436
- _rangeResults,
437
- _results,
438
- _richContent,
439
- _scalarResult,
440
- _video,
441
- _videoData,
442
- });
443
447
  function __searchCategories({ host }) {
444
- const serializedData = toReq(payload);
448
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
449
+ {
450
+ transformFn: float_1.transformSDKFloatToRESTFloat,
451
+ paths: [
452
+ { path: 'search.aggregations.range.buckets.from' },
453
+ { path: 'search.aggregations.range.buckets.to' },
454
+ {
455
+ path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',
456
+ },
457
+ {
458
+ path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',
459
+ },
460
+ ],
461
+ },
462
+ ]);
445
463
  const metadata = {
446
464
  entityFqdn: 'wix.categories.v1.category',
447
465
  method: 'POST',
@@ -452,35 +470,115 @@ function searchCategories(payload) {
452
470
  host,
453
471
  }),
454
472
  data: serializedData,
455
- transformResponse: fromRes,
473
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
474
+ {
475
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
476
+ paths: [
477
+ { path: 'categories.createdDate' },
478
+ { path: 'categories.updatedDate' },
479
+ { path: 'categories.image.urlExpirationDate' },
480
+ {
481
+ path: 'categories.richContentDescription.metadata.createdTimestamp',
482
+ },
483
+ {
484
+ path: 'categories.richContentDescription.metadata.updatedTimestamp',
485
+ },
486
+ ],
487
+ },
488
+ {
489
+ transformFn: float_2.transformRESTFloatToSDKFloat,
490
+ paths: [
491
+ {
492
+ path: 'categories.richContentDescription.nodes.galleryData.items.image.media.duration',
493
+ },
494
+ {
495
+ path: 'categories.richContentDescription.nodes.galleryData.items.video.media.duration',
496
+ },
497
+ {
498
+ path: 'categories.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
499
+ },
500
+ {
501
+ path: 'categories.richContentDescription.nodes.galleryData.options.item.ratio',
502
+ },
503
+ {
504
+ path: 'categories.richContentDescription.nodes.imageData.image.duration',
505
+ },
506
+ {
507
+ path: 'categories.richContentDescription.nodes.mapData.mapSettings.lat',
508
+ },
509
+ {
510
+ path: 'categories.richContentDescription.nodes.mapData.mapSettings.lng',
511
+ },
512
+ {
513
+ path: 'categories.richContentDescription.nodes.pollData.poll.image.duration',
514
+ },
515
+ {
516
+ path: 'categories.richContentDescription.nodes.pollData.poll.options.image.duration',
517
+ },
518
+ {
519
+ path: 'categories.richContentDescription.nodes.pollData.design.poll.background.image.duration',
520
+ },
521
+ {
522
+ path: 'categories.richContentDescription.nodes.appEmbedData.image.duration',
523
+ },
524
+ {
525
+ path: 'categories.richContentDescription.nodes.videoData.video.duration',
526
+ },
527
+ {
528
+ path: 'categories.richContentDescription.nodes.videoData.thumbnail.duration',
529
+ },
530
+ {
531
+ path: 'categories.richContentDescription.nodes.audioData.audio.duration',
532
+ },
533
+ {
534
+ path: 'categories.richContentDescription.nodes.audioData.coverImage.duration',
535
+ },
536
+ { path: 'aggregationData.results.ranges.results.from' },
537
+ { path: 'aggregationData.results.ranges.results.to' },
538
+ {
539
+ path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',
540
+ },
541
+ {
542
+ path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',
543
+ },
544
+ {
545
+ path: 'aggregationData.results.nested.results.results.range.from',
546
+ },
547
+ {
548
+ path: 'aggregationData.results.nested.results.results.range.to',
549
+ },
550
+ { path: 'aggregationData.results.scalar.value' },
551
+ {
552
+ path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',
553
+ },
554
+ {
555
+ path: 'aggregationData.results.nested.results.results.scalar.value',
556
+ },
557
+ ],
558
+ },
559
+ ]),
456
560
  };
457
561
  return metadata;
458
562
  }
459
- __searchCategories.fromReq = fromReq;
460
563
  return __searchCategories;
461
564
  }
462
565
  exports.searchCategories = searchCategories;
463
566
  /** Returns total count of categories satisfying filter and/or search */
464
567
  function countCategories(payload) {
465
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_countCategoriesRequest, {});
466
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_countCategoriesResponse, {});
467
568
  function __countCategories({ host }) {
468
- const serializedData = toReq(payload);
469
569
  const metadata = {
470
570
  entityFqdn: 'wix.categories.v1.category',
471
571
  method: 'POST',
472
572
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.CountCategories',
473
573
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
474
574
  protoPath: '/v1/categories/count',
475
- data: serializedData,
575
+ data: payload,
476
576
  host,
477
577
  }),
478
- data: serializedData,
479
- transformResponse: fromRes,
578
+ data: payload,
480
579
  };
481
580
  return metadata;
482
581
  }
483
- __countCategories.fromReq = fromReq;
484
582
  return __countCategories;
485
583
  }
486
584
  exports.countCategories = countCategories;
@@ -490,25 +588,20 @@ exports.countCategories = countCategories;
490
588
  * This endpoint can be used to move category to different parent in the same tree or to change it's position in current parent.
491
589
  */
492
590
  function moveCategory(payload) {
493
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_moveCategoryRequest, {});
494
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_moveCategoryResponse, {});
495
591
  function __moveCategory({ host }) {
496
- const serializedData = toReq(payload);
497
592
  const metadata = {
498
593
  entityFqdn: 'wix.categories.v1.category',
499
594
  method: 'POST',
500
595
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.MoveCategory',
501
596
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
502
597
  protoPath: '/v1/categories/{categoryId}/move',
503
- data: serializedData,
598
+ data: payload,
504
599
  host,
505
600
  }),
506
- data: serializedData,
507
- transformResponse: fromRes,
601
+ data: payload,
508
602
  };
509
603
  return metadata;
510
604
  }
511
- __moveCategory.fromReq = fromReq;
512
605
  return __moveCategory;
513
606
  }
514
607
  exports.moveCategory = moveCategory;
@@ -518,62 +611,77 @@ exports.moveCategory = moveCategory;
518
611
  * To update visibility, call the BulkUpdateCategoryVisibility endpoint.
519
612
  */
520
613
  function bulkUpdateCategories(payload) {
521
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkUpdateCategoriesRequest, {
522
- _appEmbedData,
523
- _audioData,
524
- _background,
525
- _category,
526
- _commonImage,
527
- _design,
528
- _galleryData,
529
- _galleryOptions,
530
- _image,
531
- _imageData,
532
- _item,
533
- _itemStyle,
534
- _mapData,
535
- _mapSettings,
536
- _maskedCategory,
537
- _media,
538
- _metadata,
539
- _node,
540
- _option,
541
- _poll,
542
- _pollData,
543
- _pollDesign,
544
- _richContent,
545
- _video,
546
- _videoData,
547
- });
548
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkUpdateCategoriesResponse, {
549
- _appEmbedData,
550
- _audioData,
551
- _background,
552
- _bulkCategoriesResult,
553
- _category,
554
- _commonImage,
555
- _design,
556
- _galleryData,
557
- _galleryOptions,
558
- _image,
559
- _imageData,
560
- _item,
561
- _itemStyle,
562
- _mapData,
563
- _mapSettings,
564
- _media,
565
- _metadata,
566
- _node,
567
- _option,
568
- _poll,
569
- _pollData,
570
- _pollDesign,
571
- _richContent,
572
- _video,
573
- _videoData,
574
- });
575
614
  function __bulkUpdateCategories({ host }) {
576
- const serializedData = toReq(payload);
615
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
616
+ {
617
+ transformFn: field_mask_1.transformSDKFieldMaskToRESTFieldMask,
618
+ paths: [{ path: 'categories.fieldMask' }],
619
+ },
620
+ {
621
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
622
+ paths: [
623
+ { path: 'categories.category.createdDate' },
624
+ { path: 'categories.category.updatedDate' },
625
+ { path: 'categories.category.image.urlExpirationDate' },
626
+ {
627
+ path: 'categories.category.richContentDescription.metadata.createdTimestamp',
628
+ },
629
+ {
630
+ path: 'categories.category.richContentDescription.metadata.updatedTimestamp',
631
+ },
632
+ ],
633
+ },
634
+ {
635
+ transformFn: float_1.transformSDKFloatToRESTFloat,
636
+ paths: [
637
+ {
638
+ path: 'categories.category.richContentDescription.nodes.galleryData.items.image.media.duration',
639
+ },
640
+ {
641
+ path: 'categories.category.richContentDescription.nodes.galleryData.items.video.media.duration',
642
+ },
643
+ {
644
+ path: 'categories.category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
645
+ },
646
+ {
647
+ path: 'categories.category.richContentDescription.nodes.galleryData.options.item.ratio',
648
+ },
649
+ {
650
+ path: 'categories.category.richContentDescription.nodes.imageData.image.duration',
651
+ },
652
+ {
653
+ path: 'categories.category.richContentDescription.nodes.mapData.mapSettings.lat',
654
+ },
655
+ {
656
+ path: 'categories.category.richContentDescription.nodes.mapData.mapSettings.lng',
657
+ },
658
+ {
659
+ path: 'categories.category.richContentDescription.nodes.pollData.poll.image.duration',
660
+ },
661
+ {
662
+ path: 'categories.category.richContentDescription.nodes.pollData.poll.options.image.duration',
663
+ },
664
+ {
665
+ path: 'categories.category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
666
+ },
667
+ {
668
+ path: 'categories.category.richContentDescription.nodes.appEmbedData.image.duration',
669
+ },
670
+ {
671
+ path: 'categories.category.richContentDescription.nodes.videoData.video.duration',
672
+ },
673
+ {
674
+ path: 'categories.category.richContentDescription.nodes.videoData.thumbnail.duration',
675
+ },
676
+ {
677
+ path: 'categories.category.richContentDescription.nodes.audioData.audio.duration',
678
+ },
679
+ {
680
+ path: 'categories.category.richContentDescription.nodes.audioData.coverImage.duration',
681
+ },
682
+ ],
683
+ },
684
+ ]);
577
685
  const metadata = {
578
686
  entityFqdn: 'wix.categories.v1.category',
579
687
  method: 'POST',
@@ -584,156 +692,236 @@ function bulkUpdateCategories(payload) {
584
692
  host,
585
693
  }),
586
694
  data: serializedData,
587
- transformResponse: fromRes,
695
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
696
+ {
697
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
698
+ paths: [
699
+ { path: 'results.category.createdDate' },
700
+ { path: 'results.category.updatedDate' },
701
+ { path: 'results.category.image.urlExpirationDate' },
702
+ {
703
+ path: 'results.category.richContentDescription.metadata.createdTimestamp',
704
+ },
705
+ {
706
+ path: 'results.category.richContentDescription.metadata.updatedTimestamp',
707
+ },
708
+ ],
709
+ },
710
+ {
711
+ transformFn: float_2.transformRESTFloatToSDKFloat,
712
+ paths: [
713
+ {
714
+ path: 'results.category.richContentDescription.nodes.galleryData.items.image.media.duration',
715
+ },
716
+ {
717
+ path: 'results.category.richContentDescription.nodes.galleryData.items.video.media.duration',
718
+ },
719
+ {
720
+ path: 'results.category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
721
+ },
722
+ {
723
+ path: 'results.category.richContentDescription.nodes.galleryData.options.item.ratio',
724
+ },
725
+ {
726
+ path: 'results.category.richContentDescription.nodes.imageData.image.duration',
727
+ },
728
+ {
729
+ path: 'results.category.richContentDescription.nodes.mapData.mapSettings.lat',
730
+ },
731
+ {
732
+ path: 'results.category.richContentDescription.nodes.mapData.mapSettings.lng',
733
+ },
734
+ {
735
+ path: 'results.category.richContentDescription.nodes.pollData.poll.image.duration',
736
+ },
737
+ {
738
+ path: 'results.category.richContentDescription.nodes.pollData.poll.options.image.duration',
739
+ },
740
+ {
741
+ path: 'results.category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
742
+ },
743
+ {
744
+ path: 'results.category.richContentDescription.nodes.appEmbedData.image.duration',
745
+ },
746
+ {
747
+ path: 'results.category.richContentDescription.nodes.videoData.video.duration',
748
+ },
749
+ {
750
+ path: 'results.category.richContentDescription.nodes.videoData.thumbnail.duration',
751
+ },
752
+ {
753
+ path: 'results.category.richContentDescription.nodes.audioData.audio.duration',
754
+ },
755
+ {
756
+ path: 'results.category.richContentDescription.nodes.audioData.coverImage.duration',
757
+ },
758
+ ],
759
+ },
760
+ ]),
588
761
  };
589
762
  return metadata;
590
763
  }
591
- __bulkUpdateCategories.fromReq = fromReq;
592
764
  return __bulkUpdateCategories;
593
765
  }
594
766
  exports.bulkUpdateCategories = bulkUpdateCategories;
595
767
  /** Update `visible` field. If visible is set to false, all subcategories will be set to `visible=false` */
596
768
  function updateCategoryVisibility(payload) {
597
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateCategoryVisibilityRequest, {});
598
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateCategoryVisibilityResponse, {
599
- _appEmbedData,
600
- _audioData,
601
- _background,
602
- _category,
603
- _commonImage,
604
- _design,
605
- _galleryData,
606
- _galleryOptions,
607
- _image,
608
- _imageData,
609
- _item,
610
- _itemStyle,
611
- _mapData,
612
- _mapSettings,
613
- _media,
614
- _metadata,
615
- _node,
616
- _option,
617
- _poll,
618
- _pollData,
619
- _pollDesign,
620
- _richContent,
621
- _video,
622
- _videoData,
623
- });
624
769
  function __updateCategoryVisibility({ host }) {
625
- const serializedData = toReq(payload);
626
770
  const metadata = {
627
771
  entityFqdn: 'wix.categories.v1.category',
628
772
  method: 'PATCH',
629
773
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.UpdateCategoryVisibility',
630
774
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
631
775
  protoPath: '/v1/categories/visibility',
632
- data: serializedData,
776
+ data: payload,
633
777
  host,
634
778
  }),
635
- data: serializedData,
636
- transformResponse: fromRes,
779
+ data: payload,
780
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
781
+ {
782
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
783
+ paths: [
784
+ { path: 'category.createdDate' },
785
+ { path: 'category.updatedDate' },
786
+ { path: 'category.image.urlExpirationDate' },
787
+ {
788
+ path: 'category.richContentDescription.metadata.createdTimestamp',
789
+ },
790
+ {
791
+ path: 'category.richContentDescription.metadata.updatedTimestamp',
792
+ },
793
+ ],
794
+ },
795
+ {
796
+ transformFn: float_2.transformRESTFloatToSDKFloat,
797
+ paths: [
798
+ {
799
+ path: 'category.richContentDescription.nodes.galleryData.items.image.media.duration',
800
+ },
801
+ {
802
+ path: 'category.richContentDescription.nodes.galleryData.items.video.media.duration',
803
+ },
804
+ {
805
+ path: 'category.richContentDescription.nodes.galleryData.items.video.thumbnail.duration',
806
+ },
807
+ {
808
+ path: 'category.richContentDescription.nodes.galleryData.options.item.ratio',
809
+ },
810
+ {
811
+ path: 'category.richContentDescription.nodes.imageData.image.duration',
812
+ },
813
+ {
814
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lat',
815
+ },
816
+ {
817
+ path: 'category.richContentDescription.nodes.mapData.mapSettings.lng',
818
+ },
819
+ {
820
+ path: 'category.richContentDescription.nodes.pollData.poll.image.duration',
821
+ },
822
+ {
823
+ path: 'category.richContentDescription.nodes.pollData.poll.options.image.duration',
824
+ },
825
+ {
826
+ path: 'category.richContentDescription.nodes.pollData.design.poll.background.image.duration',
827
+ },
828
+ {
829
+ path: 'category.richContentDescription.nodes.appEmbedData.image.duration',
830
+ },
831
+ {
832
+ path: 'category.richContentDescription.nodes.videoData.video.duration',
833
+ },
834
+ {
835
+ path: 'category.richContentDescription.nodes.videoData.thumbnail.duration',
836
+ },
837
+ {
838
+ path: 'category.richContentDescription.nodes.audioData.audio.duration',
839
+ },
840
+ {
841
+ path: 'category.richContentDescription.nodes.audioData.coverImage.duration',
842
+ },
843
+ ],
844
+ },
845
+ ]),
637
846
  };
638
847
  return metadata;
639
848
  }
640
- __updateCategoryVisibility.fromReq = fromReq;
641
849
  return __updateCategoryVisibility;
642
850
  }
643
851
  exports.updateCategoryVisibility = updateCategoryVisibility;
644
852
  /** Adds multiple items to single category, fires as many domain events as many items successfully added. */
645
853
  function bulkAddItemsToCategory(payload) {
646
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkAddItemsToCategoryRequest, {});
647
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkAddItemsToCategoryResponse, {});
648
854
  function __bulkAddItemsToCategory({ host }) {
649
- const serializedData = toReq(payload);
650
855
  const metadata = {
651
856
  entityFqdn: 'wix.categories.v1.category',
652
857
  method: 'POST',
653
858
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.BulkAddItemsToCategory',
654
859
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
655
860
  protoPath: '/v1/bulk/categories/{categoryId}/add-items',
656
- data: serializedData,
861
+ data: payload,
657
862
  host,
658
863
  }),
659
- data: serializedData,
660
- transformResponse: fromRes,
864
+ data: payload,
661
865
  };
662
866
  return metadata;
663
867
  }
664
- __bulkAddItemsToCategory.fromReq = fromReq;
665
868
  return __bulkAddItemsToCategory;
666
869
  }
667
870
  exports.bulkAddItemsToCategory = bulkAddItemsToCategory;
668
871
  /** Adds single item to multiple categories, fires as many domain events as many categories were successfully added. */
669
872
  function bulkAddItemToCategories(payload) {
670
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkAddItemToCategoriesRequest, {});
671
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkAddItemToCategoriesResponse, {});
672
873
  function __bulkAddItemToCategories({ host }) {
673
- const serializedData = toReq(payload);
674
874
  const metadata = {
675
875
  entityFqdn: 'wix.categories.v1.category',
676
876
  method: 'POST',
677
877
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.BulkAddItemToCategories',
678
878
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
679
879
  protoPath: '/v1/bulk/categories/add-item-to-categories',
680
- data: serializedData,
880
+ data: payload,
681
881
  host,
682
882
  }),
683
- data: serializedData,
684
- transformResponse: fromRes,
883
+ data: payload,
685
884
  };
686
885
  return metadata;
687
886
  }
688
- __bulkAddItemToCategories.fromReq = fromReq;
689
887
  return __bulkAddItemToCategories;
690
888
  }
691
889
  exports.bulkAddItemToCategories = bulkAddItemToCategories;
692
890
  /** Removed multiple items from single category, fires as many domain events as many items successfully removed. */
693
891
  function bulkRemoveItemsFromCategory(payload) {
694
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkRemoveItemsFromCategoryRequest, {});
695
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkRemoveItemsFromCategoryResponse, {});
696
892
  function __bulkRemoveItemsFromCategory({ host }) {
697
- const serializedData = toReq(payload);
698
893
  const metadata = {
699
894
  entityFqdn: 'wix.categories.v1.category',
700
895
  method: 'POST',
701
896
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.BulkRemoveItemsFromCategory',
702
897
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
703
898
  protoPath: '/v1/bulk/categories/{categoryId}/remove-items',
704
- data: serializedData,
899
+ data: payload,
705
900
  host,
706
901
  }),
707
- data: serializedData,
708
- transformResponse: fromRes,
902
+ data: payload,
709
903
  };
710
904
  return metadata;
711
905
  }
712
- __bulkRemoveItemsFromCategory.fromReq = fromReq;
713
906
  return __bulkRemoveItemsFromCategory;
714
907
  }
715
908
  exports.bulkRemoveItemsFromCategory = bulkRemoveItemsFromCategory;
716
909
  /** Removes single item from multiple categories, fires as many domain events as many categories were successfully removed. */
717
910
  function bulkRemoveItemFromCategories(payload) {
718
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_bulkRemoveItemFromCategoriesRequest, {});
719
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_bulkRemoveItemFromCategoriesResponse, {});
720
911
  function __bulkRemoveItemFromCategories({ host }) {
721
- const serializedData = toReq(payload);
722
912
  const metadata = {
723
913
  entityFqdn: 'wix.categories.v1.category',
724
914
  method: 'POST',
725
915
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.BulkRemoveItemFromCategories',
726
916
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
727
917
  protoPath: '/v1/bulk/categories/remove-item-from-categories',
728
- data: serializedData,
918
+ data: payload,
729
919
  host,
730
920
  }),
731
- data: serializedData,
732
- transformResponse: fromRes,
921
+ data: payload,
733
922
  };
734
923
  return metadata;
735
924
  }
736
- __bulkRemoveItemFromCategories.fromReq = fromReq;
737
925
  return __bulkRemoveItemFromCategories;
738
926
  }
739
927
  exports.bulkRemoveItemFromCategories = bulkRemoveItemFromCategories;
@@ -742,73 +930,58 @@ exports.bulkRemoveItemFromCategories = bulkRemoveItemFromCategories;
742
930
  * When items added to category in bulk they considered as added at exactly same time so order will be random but always the same.
743
931
  */
744
932
  function listItemsInCategory(payload) {
745
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listItemsInCategoryRequest, {});
746
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listItemsInCategoryResponse, {});
747
933
  function __listItemsInCategory({ host }) {
748
- const serializedData = toReq(payload);
749
934
  const metadata = {
750
935
  entityFqdn: 'wix.categories.v1.category',
751
936
  method: 'GET',
752
937
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.ListItemsInCategory',
753
938
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
754
939
  protoPath: '/v1/categories/{categoryId}/list-items',
755
- data: serializedData,
940
+ data: payload,
756
941
  host,
757
942
  }),
758
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
759
- transformResponse: fromRes,
943
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
760
944
  };
761
945
  return metadata;
762
946
  }
763
- __listItemsInCategory.fromReq = fromReq;
764
947
  return __listItemsInCategory;
765
948
  }
766
949
  exports.listItemsInCategory = listItemsInCategory;
767
950
  /** Returns all category IDs that contain the item and their parent category IDs. */
768
951
  function listCategoriesForItem(payload) {
769
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listCategoriesForItemRequest, {});
770
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listCategoriesForItemResponse, {});
771
952
  function __listCategoriesForItem({ host }) {
772
- const serializedData = toReq(payload);
773
953
  const metadata = {
774
954
  entityFqdn: 'wix.categories.v1.category',
775
955
  method: 'GET',
776
956
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.ListCategoriesForItem',
777
957
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
778
958
  protoPath: '/v1/categories/list-categories-for-item',
779
- data: serializedData,
959
+ data: payload,
780
960
  host,
781
961
  }),
782
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
783
- transformResponse: fromRes,
962
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
784
963
  };
785
964
  return metadata;
786
965
  }
787
- __listCategoriesForItem.fromReq = fromReq;
788
966
  return __listCategoriesForItem;
789
967
  }
790
968
  exports.listCategoriesForItem = listCategoriesForItem;
791
969
  /** Changes position of `item` in category. Will be used when sort items by manual arrangement */
792
970
  function moveItemInCategory(payload) {
793
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_moveItemInCategoryRequest, {});
794
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_moveItemInCategoryResponse, {});
795
971
  function __moveItemInCategory({ host }) {
796
- const serializedData = toReq(payload);
797
972
  const metadata = {
798
973
  entityFqdn: 'wix.categories.v1.category',
799
974
  method: 'POST',
800
975
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.MoveItemInCategory',
801
976
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
802
977
  protoPath: '/v1/categories/{categoryId}/move-item',
803
- data: serializedData,
978
+ data: payload,
804
979
  host,
805
980
  }),
806
- data: serializedData,
807
- transformResponse: fromRes,
981
+ data: payload,
808
982
  };
809
983
  return metadata;
810
984
  }
811
- __moveItemInCategory.fromReq = fromReq;
812
985
  return __moveItemInCategory;
813
986
  }
814
987
  exports.moveItemInCategory = moveItemInCategory;
@@ -817,49 +990,39 @@ exports.moveItemInCategory = moveItemInCategory;
817
990
  * Calling this endpoint overrides existing list of arranged items in category.
818
991
  */
819
992
  function setArrangedItems(payload) {
820
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_setArrangedItemsRequest, {});
821
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_setArrangedItemsResponse, {});
822
993
  function __setArrangedItems({ host }) {
823
- const serializedData = toReq(payload);
824
994
  const metadata = {
825
995
  entityFqdn: 'wix.categories.v1.category',
826
996
  method: 'POST',
827
997
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.SetArrangedItems',
828
998
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
829
999
  protoPath: '/v1/categories/{categoryId}/set-arranged-items',
830
- data: serializedData,
1000
+ data: payload,
831
1001
  host,
832
1002
  }),
833
- data: serializedData,
834
- transformResponse: fromRes,
1003
+ data: payload,
835
1004
  };
836
1005
  return metadata;
837
1006
  }
838
- __setArrangedItems.fromReq = fromReq;
839
1007
  return __setArrangedItems;
840
1008
  }
841
1009
  exports.setArrangedItems = setArrangedItems;
842
1010
  /** Returns arranged items in category */
843
1011
  function getArrangedItems(payload) {
844
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getArrangedItemsRequest, {});
845
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getArrangedItemsResponse, {});
846
1012
  function __getArrangedItems({ host }) {
847
- const serializedData = toReq(payload);
848
1013
  const metadata = {
849
1014
  entityFqdn: 'wix.categories.v1.category',
850
1015
  method: 'GET',
851
1016
  methodFqn: 'com.wix.categories.api.v1.CategoriesService.GetArrangedItems',
852
1017
  url: resolveComWixCategoriesApiV1CategoriesServiceUrl({
853
1018
  protoPath: '/v1/categories/{categoryId}/arranged-items',
854
- data: serializedData,
1019
+ data: payload,
855
1020
  host,
856
1021
  }),
857
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
858
- transformResponse: fromRes,
1022
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
859
1023
  };
860
1024
  return metadata;
861
1025
  }
862
- __getArrangedItems.fromReq = fromReq;
863
1026
  return __getArrangedItems;
864
1027
  }
865
1028
  exports.getArrangedItems = getArrangedItems;