@wix/pro-gallery 1.0.32 → 1.0.34

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 (45) 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/pro-gallery-v2-gallery.context.d.ts +12 -0
  11. package/build/cjs/src/pro-gallery-v2-gallery.context.js +115 -0
  12. package/build/cjs/src/pro-gallery-v2-gallery.context.js.map +1 -0
  13. package/build/cjs/src/pro-gallery-v2-gallery.http.js +464 -240
  14. package/build/cjs/src/pro-gallery-v2-gallery.http.js.map +1 -1
  15. package/build/cjs/src/pro-gallery-v2-gallery.meta.d.ts +1 -1
  16. package/build/cjs/src/pro-gallery-v2-gallery.meta.js +5 -1
  17. package/build/cjs/src/pro-gallery-v2-gallery.meta.js.map +1 -1
  18. package/build/cjs/src/pro-gallery-v2-gallery.public.d.ts +6 -5
  19. package/build/cjs/src/pro-gallery-v2-gallery.public.js +8 -1
  20. package/build/cjs/src/pro-gallery-v2-gallery.public.js.map +1 -1
  21. package/build/cjs/src/pro-gallery-v2-gallery.types.d.ts +69 -65
  22. package/build/cjs/src/pro-gallery-v2-gallery.types.js +8 -8
  23. package/build/cjs/src/pro-gallery-v2-gallery.types.js.map +1 -1
  24. package/build/cjs/src/pro-gallery-v2-gallery.universal.d.ts +99 -72
  25. package/build/cjs/src/pro-gallery-v2-gallery.universal.js +110 -68
  26. package/build/cjs/src/pro-gallery-v2-gallery.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/pro-gallery-v2-gallery.context.d.ts +12 -0
  31. package/build/es/src/pro-gallery-v2-gallery.context.js +102 -0
  32. package/build/es/src/pro-gallery-v2-gallery.context.js.map +1 -0
  33. package/build/es/src/pro-gallery-v2-gallery.http.js +464 -240
  34. package/build/es/src/pro-gallery-v2-gallery.http.js.map +1 -1
  35. package/build/es/src/pro-gallery-v2-gallery.meta.d.ts +1 -1
  36. package/build/es/src/pro-gallery-v2-gallery.public.d.ts +6 -5
  37. package/build/es/src/pro-gallery-v2-gallery.public.js +1 -0
  38. package/build/es/src/pro-gallery-v2-gallery.public.js.map +1 -1
  39. package/build/es/src/pro-gallery-v2-gallery.types.d.ts +69 -65
  40. package/build/es/src/pro-gallery-v2-gallery.types.js.map +1 -1
  41. package/build/es/src/pro-gallery-v2-gallery.universal.d.ts +99 -72
  42. package/build/es/src/pro-gallery-v2-gallery.universal.js +97 -59
  43. package/build/es/src/pro-gallery-v2-gallery.universal.js.map +1 -1
  44. package/context/package.json +6 -0
  45. package/package.json +12 -6
@@ -2,61 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteGalleryItem = exports.updateGalleryItem = exports.createGalleryItem = exports.deleteGallery = exports.updateGallery = exports.createGallery = exports.getGalleryItem = exports.listGalleryItems = exports.getGallery = exports.listGalleries = 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 _commonImage = { urlExpirationDate: 'google.protobuf.Timestamp' };
8
- const _createGalleryItemRequest = { item: '_item' };
9
- const _createGalleryItemResponse = { item: '_item' };
10
- const _createGalleryRequest = { gallery: '_gallery' };
11
- const _createGalleryResponse = { gallery: '_gallery' };
12
- const _deleteGalleryItemRequest = {};
13
- const _deleteGalleryItemResponse = {};
14
- const _deleteGalleryRequest = {};
15
- const _deleteGalleryResponse = {};
16
- const _gallery = {
17
- sortOrder: 'google.protobuf.DoubleValue',
18
- createdDate: 'google.protobuf.Timestamp',
19
- items: '_item',
20
- };
21
- const _getGalleryItemRequest = {};
22
- const _getGalleryItemResponse = { item: '_item' };
23
- const _getGalleryRequest = {};
24
- const _getGalleryResponse = { gallery: '_gallery' };
25
- const _image = {
26
- imageInfo: '_commonImage',
27
- focalPoint: '_point',
28
- unsharpMasking: '_unsharpMasking',
29
- };
30
- const _item = {
31
- sortOrder: 'google.protobuf.DoubleValue',
32
- createdDate: 'google.protobuf.Timestamp',
33
- updatedDate: 'google.protobuf.Timestamp',
34
- image: '_image',
35
- video: '_video',
36
- secondaryMedia: '_secondaryMedia',
37
- };
38
- const _listGalleriesRequest = { fields: 'google.protobuf.FieldMask' };
39
- const _listGalleriesResponse = { galleries: '_gallery' };
40
- const _listGalleryItemsRequest = {};
41
- const _listGalleryItemsResponse = { items: '_item' };
42
- const _point = { x: 'DOUBLE', y: 'DOUBLE' };
43
- const _secondaryMedia = { image: '_image' };
44
- const _unsharpMasking = {
45
- amount: 'google.protobuf.FloatValue',
46
- radius: 'google.protobuf.FloatValue',
47
- threshold: 'google.protobuf.FloatValue',
48
- };
49
- const _updateGalleryItemRequest = { item: '_item' };
50
- const _updateGalleryItemResponse = { item: '_item' };
51
- const _updateGalleryRequest = { gallery: '_gallery' };
52
- const _updateGalleryResponse = { gallery: '_gallery' };
53
- const _video = { videoInfo: '_videoV2' };
54
- const _videoResolution = { poster: '_commonImage' };
55
- const _videoV2 = {
56
- urlExpirationDate: 'google.protobuf.Timestamp',
57
- resolutions: '_videoResolution',
58
- posters: '_commonImage',
59
- };
60
12
  function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
61
13
  const domainToMappings = {
62
14
  _: [
@@ -128,21 +80,13 @@ function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
128
80
  * The `listGalleries()` function returns a Promise that resolves to a list of up to 10 galleries at a given time. To list the next 10 galleries in your site's backend, use the `offset` parameter.
129
81
  */
130
82
  function listGalleries(payload) {
131
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listGalleriesRequest, {});
132
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listGalleriesResponse, {
133
- _commonImage,
134
- _gallery,
135
- _image,
136
- _item,
137
- _point,
138
- _secondaryMedia,
139
- _unsharpMasking,
140
- _video,
141
- _videoResolution,
142
- _videoV2,
143
- });
144
83
  function __listGalleries({ host }) {
145
- const serializedData = toReq(payload);
84
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
85
+ {
86
+ transformFn: field_mask_1.transformSDKFieldMaskToRESTFieldMask,
87
+ paths: [{ path: 'fields' }],
88
+ },
89
+ ]);
146
90
  const metadata = {
147
91
  entityFqdn: 'wix.pro_gallery.v2.gallery',
148
92
  method: 'GET',
@@ -153,11 +97,53 @@ function listGalleries(payload) {
153
97
  host,
154
98
  }),
155
99
  params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
156
- transformResponse: fromRes,
100
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
101
+ {
102
+ transformFn: float_2.transformRESTFloatToSDKFloat,
103
+ paths: [
104
+ { path: 'galleries.sortOrder' },
105
+ { path: 'galleries.items.sortOrder' },
106
+ { path: 'galleries.items.image.focalPoint.x' },
107
+ { path: 'galleries.items.image.focalPoint.y' },
108
+ { path: 'galleries.items.secondaryMedia.image.focalPoint.x' },
109
+ { path: 'galleries.items.secondaryMedia.image.focalPoint.y' },
110
+ { path: 'galleries.items.image.unsharpMasking.amount' },
111
+ { path: 'galleries.items.image.unsharpMasking.radius' },
112
+ { path: 'galleries.items.image.unsharpMasking.threshold' },
113
+ {
114
+ path: 'galleries.items.secondaryMedia.image.unsharpMasking.amount',
115
+ },
116
+ {
117
+ path: 'galleries.items.secondaryMedia.image.unsharpMasking.radius',
118
+ },
119
+ {
120
+ path: 'galleries.items.secondaryMedia.image.unsharpMasking.threshold',
121
+ },
122
+ ],
123
+ },
124
+ {
125
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
126
+ paths: [
127
+ { path: 'galleries.createdDate' },
128
+ { path: 'galleries.items.createdDate' },
129
+ { path: 'galleries.items.updatedDate' },
130
+ { path: 'galleries.items.image.imageInfo.urlExpirationDate' },
131
+ { path: 'galleries.items.video.videoInfo.urlExpirationDate' },
132
+ {
133
+ path: 'galleries.items.video.videoInfo.resolutions.poster.urlExpirationDate',
134
+ },
135
+ {
136
+ path: 'galleries.items.video.videoInfo.posters.urlExpirationDate',
137
+ },
138
+ {
139
+ path: 'galleries.items.secondaryMedia.image.imageInfo.urlExpirationDate',
140
+ },
141
+ ],
142
+ },
143
+ ]),
157
144
  };
158
145
  return metadata;
159
146
  }
160
- __listGalleries.fromReq = fromReq;
161
147
  return __listGalleries;
162
148
  }
163
149
  exports.listGalleries = listGalleries;
@@ -167,36 +153,64 @@ exports.listGalleries = listGalleries;
167
153
  * The `getGallery()` function returns a Promise that resolves to a gallery whose ID matches the given ID.
168
154
  */
169
155
  function getGallery(payload) {
170
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getGalleryRequest, {});
171
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getGalleryResponse, {
172
- _commonImage,
173
- _gallery,
174
- _image,
175
- _item,
176
- _point,
177
- _secondaryMedia,
178
- _unsharpMasking,
179
- _video,
180
- _videoResolution,
181
- _videoV2,
182
- });
183
156
  function __getGallery({ host }) {
184
- const serializedData = toReq(payload);
185
157
  const metadata = {
186
158
  entityFqdn: 'wix.pro_gallery.v2.gallery',
187
159
  method: 'GET',
188
160
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.GetGallery',
189
161
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
190
162
  protoPath: '/v2/galleries/{galleryId}',
191
- data: serializedData,
163
+ data: payload,
192
164
  host,
193
165
  }),
194
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
195
- transformResponse: fromRes,
166
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
167
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
168
+ {
169
+ transformFn: float_2.transformRESTFloatToSDKFloat,
170
+ paths: [
171
+ { path: 'gallery.sortOrder' },
172
+ { path: 'gallery.items.sortOrder' },
173
+ { path: 'gallery.items.image.focalPoint.x' },
174
+ { path: 'gallery.items.image.focalPoint.y' },
175
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
176
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
177
+ { path: 'gallery.items.image.unsharpMasking.amount' },
178
+ { path: 'gallery.items.image.unsharpMasking.radius' },
179
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
180
+ {
181
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
182
+ },
183
+ {
184
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
185
+ },
186
+ {
187
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
188
+ },
189
+ ],
190
+ },
191
+ {
192
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
193
+ paths: [
194
+ { path: 'gallery.createdDate' },
195
+ { path: 'gallery.items.createdDate' },
196
+ { path: 'gallery.items.updatedDate' },
197
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
198
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
199
+ {
200
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
201
+ },
202
+ {
203
+ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
204
+ },
205
+ {
206
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
207
+ },
208
+ ],
209
+ },
210
+ ]),
196
211
  };
197
212
  return metadata;
198
213
  }
199
- __getGallery.fromReq = fromReq;
200
214
  return __getGallery;
201
215
  }
202
216
  exports.getGallery = getGallery;
@@ -206,35 +220,54 @@ exports.getGallery = getGallery;
206
220
  * The `listGalleryItems()` function returns a Promise that resolves to a list of up to 100 gallery items. The gallery items are listed by `sortOrder` in descending order.
207
221
  */
208
222
  function listGalleryItems(payload) {
209
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listGalleryItemsRequest, {});
210
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listGalleryItemsResponse, {
211
- _commonImage,
212
- _image,
213
- _item,
214
- _point,
215
- _secondaryMedia,
216
- _unsharpMasking,
217
- _video,
218
- _videoResolution,
219
- _videoV2,
220
- });
221
223
  function __listGalleryItems({ host }) {
222
- const serializedData = toReq(payload);
223
224
  const metadata = {
224
225
  entityFqdn: 'wix.pro_gallery.v2.gallery',
225
226
  method: 'GET',
226
227
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.ListGalleryItems',
227
228
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
228
229
  protoPath: '/v2/galleries/{galleryId}/items',
229
- data: serializedData,
230
+ data: payload,
230
231
  host,
231
232
  }),
232
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
233
- transformResponse: fromRes,
233
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
234
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
235
+ {
236
+ transformFn: float_2.transformRESTFloatToSDKFloat,
237
+ paths: [
238
+ { path: 'items.sortOrder' },
239
+ { path: 'items.image.focalPoint.x' },
240
+ { path: 'items.image.focalPoint.y' },
241
+ { path: 'items.secondaryMedia.image.focalPoint.x' },
242
+ { path: 'items.secondaryMedia.image.focalPoint.y' },
243
+ { path: 'items.image.unsharpMasking.amount' },
244
+ { path: 'items.image.unsharpMasking.radius' },
245
+ { path: 'items.image.unsharpMasking.threshold' },
246
+ { path: 'items.secondaryMedia.image.unsharpMasking.amount' },
247
+ { path: 'items.secondaryMedia.image.unsharpMasking.radius' },
248
+ { path: 'items.secondaryMedia.image.unsharpMasking.threshold' },
249
+ ],
250
+ },
251
+ {
252
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
253
+ paths: [
254
+ { path: 'items.createdDate' },
255
+ { path: 'items.updatedDate' },
256
+ { path: 'items.image.imageInfo.urlExpirationDate' },
257
+ { path: 'items.video.videoInfo.urlExpirationDate' },
258
+ {
259
+ path: 'items.video.videoInfo.resolutions.poster.urlExpirationDate',
260
+ },
261
+ { path: 'items.video.videoInfo.posters.urlExpirationDate' },
262
+ {
263
+ path: 'items.secondaryMedia.image.imageInfo.urlExpirationDate',
264
+ },
265
+ ],
266
+ },
267
+ ]),
234
268
  };
235
269
  return metadata;
236
270
  }
237
- __listGalleryItems.fromReq = fromReq;
238
271
  return __listGalleryItems;
239
272
  }
240
273
  exports.listGalleryItems = listGalleryItems;
@@ -244,35 +277,52 @@ exports.listGalleryItems = listGalleryItems;
244
277
  * The `getGalleryItem()` function returns a Promise that resolves to a media item in a specified gallery whose ID matches the given ID.
245
278
  */
246
279
  function getGalleryItem(payload) {
247
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getGalleryItemRequest, {});
248
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getGalleryItemResponse, {
249
- _commonImage,
250
- _image,
251
- _item,
252
- _point,
253
- _secondaryMedia,
254
- _unsharpMasking,
255
- _video,
256
- _videoResolution,
257
- _videoV2,
258
- });
259
280
  function __getGalleryItem({ host }) {
260
- const serializedData = toReq(payload);
261
281
  const metadata = {
262
282
  entityFqdn: 'wix.pro_gallery.v2.gallery',
263
283
  method: 'GET',
264
284
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.GetGalleryItem',
265
285
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
266
286
  protoPath: '/v2/galleries/{galleryId}/items/{itemId}',
267
- data: serializedData,
287
+ data: payload,
268
288
  host,
269
289
  }),
270
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
271
- transformResponse: fromRes,
290
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
291
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
292
+ {
293
+ transformFn: float_2.transformRESTFloatToSDKFloat,
294
+ paths: [
295
+ { path: 'item.sortOrder' },
296
+ { path: 'item.image.focalPoint.x' },
297
+ { path: 'item.image.focalPoint.y' },
298
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
299
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
300
+ { path: 'item.image.unsharpMasking.amount' },
301
+ { path: 'item.image.unsharpMasking.radius' },
302
+ { path: 'item.image.unsharpMasking.threshold' },
303
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
304
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
305
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
306
+ ],
307
+ },
308
+ {
309
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
310
+ paths: [
311
+ { path: 'item.createdDate' },
312
+ { path: 'item.updatedDate' },
313
+ { path: 'item.image.imageInfo.urlExpirationDate' },
314
+ { path: 'item.video.videoInfo.urlExpirationDate' },
315
+ {
316
+ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
317
+ },
318
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
319
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
320
+ ],
321
+ },
322
+ ]),
272
323
  };
273
324
  return metadata;
274
325
  }
275
- __getGalleryItem.fromReq = fromReq;
276
326
  return __getGalleryItem;
277
327
  }
278
328
  exports.getGalleryItem = getGalleryItem;
@@ -299,32 +349,45 @@ exports.getGalleryItem = getGalleryItem;
299
349
  * </blockquote>
300
350
  */
301
351
  function createGallery(payload) {
302
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createGalleryRequest, {
303
- _commonImage,
304
- _gallery,
305
- _image,
306
- _item,
307
- _point,
308
- _secondaryMedia,
309
- _unsharpMasking,
310
- _video,
311
- _videoResolution,
312
- _videoV2,
313
- });
314
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_createGalleryResponse, {
315
- _commonImage,
316
- _gallery,
317
- _image,
318
- _item,
319
- _point,
320
- _secondaryMedia,
321
- _unsharpMasking,
322
- _video,
323
- _videoResolution,
324
- _videoV2,
325
- });
326
352
  function __createGallery({ host }) {
327
- const serializedData = toReq(payload);
353
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
354
+ {
355
+ transformFn: float_1.transformSDKFloatToRESTFloat,
356
+ paths: [
357
+ { path: 'gallery.sortOrder' },
358
+ { path: 'gallery.items.sortOrder' },
359
+ { path: 'gallery.items.image.focalPoint.x' },
360
+ { path: 'gallery.items.image.focalPoint.y' },
361
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
362
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
363
+ { path: 'gallery.items.image.unsharpMasking.amount' },
364
+ { path: 'gallery.items.image.unsharpMasking.radius' },
365
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
366
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount' },
367
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius' },
368
+ {
369
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
370
+ },
371
+ ],
372
+ },
373
+ {
374
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
375
+ paths: [
376
+ { path: 'gallery.createdDate' },
377
+ { path: 'gallery.items.createdDate' },
378
+ { path: 'gallery.items.updatedDate' },
379
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
380
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
381
+ {
382
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
383
+ },
384
+ { path: 'gallery.items.video.videoInfo.posters.urlExpirationDate' },
385
+ {
386
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
387
+ },
388
+ ],
389
+ },
390
+ ]);
328
391
  const metadata = {
329
392
  entityFqdn: 'wix.pro_gallery.v2.gallery',
330
393
  method: 'POST',
@@ -335,11 +398,53 @@ function createGallery(payload) {
335
398
  host,
336
399
  }),
337
400
  data: serializedData,
338
- transformResponse: fromRes,
401
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
402
+ {
403
+ transformFn: float_2.transformRESTFloatToSDKFloat,
404
+ paths: [
405
+ { path: 'gallery.sortOrder' },
406
+ { path: 'gallery.items.sortOrder' },
407
+ { path: 'gallery.items.image.focalPoint.x' },
408
+ { path: 'gallery.items.image.focalPoint.y' },
409
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
410
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
411
+ { path: 'gallery.items.image.unsharpMasking.amount' },
412
+ { path: 'gallery.items.image.unsharpMasking.radius' },
413
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
414
+ {
415
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
416
+ },
417
+ {
418
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
419
+ },
420
+ {
421
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
422
+ },
423
+ ],
424
+ },
425
+ {
426
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
427
+ paths: [
428
+ { path: 'gallery.createdDate' },
429
+ { path: 'gallery.items.createdDate' },
430
+ { path: 'gallery.items.updatedDate' },
431
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
432
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
433
+ {
434
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
435
+ },
436
+ {
437
+ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
438
+ },
439
+ {
440
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
441
+ },
442
+ ],
443
+ },
444
+ ]),
339
445
  };
340
446
  return metadata;
341
447
  }
342
- __createGallery.fromReq = fromReq;
343
448
  return __createGallery;
344
449
  }
345
450
  exports.createGallery = createGallery;
@@ -362,32 +467,45 @@ exports.createGallery = createGallery;
362
467
  * </blockquote>
363
468
  */
364
469
  function updateGallery(payload) {
365
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateGalleryRequest, {
366
- _commonImage,
367
- _gallery,
368
- _image,
369
- _item,
370
- _point,
371
- _secondaryMedia,
372
- _unsharpMasking,
373
- _video,
374
- _videoResolution,
375
- _videoV2,
376
- });
377
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateGalleryResponse, {
378
- _commonImage,
379
- _gallery,
380
- _image,
381
- _item,
382
- _point,
383
- _secondaryMedia,
384
- _unsharpMasking,
385
- _video,
386
- _videoResolution,
387
- _videoV2,
388
- });
389
470
  function __updateGallery({ host }) {
390
- const serializedData = toReq(payload);
471
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
472
+ {
473
+ transformFn: float_1.transformSDKFloatToRESTFloat,
474
+ paths: [
475
+ { path: 'gallery.sortOrder' },
476
+ { path: 'gallery.items.sortOrder' },
477
+ { path: 'gallery.items.image.focalPoint.x' },
478
+ { path: 'gallery.items.image.focalPoint.y' },
479
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
480
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
481
+ { path: 'gallery.items.image.unsharpMasking.amount' },
482
+ { path: 'gallery.items.image.unsharpMasking.radius' },
483
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
484
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount' },
485
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius' },
486
+ {
487
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
488
+ },
489
+ ],
490
+ },
491
+ {
492
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
493
+ paths: [
494
+ { path: 'gallery.createdDate' },
495
+ { path: 'gallery.items.createdDate' },
496
+ { path: 'gallery.items.updatedDate' },
497
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
498
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
499
+ {
500
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
501
+ },
502
+ { path: 'gallery.items.video.videoInfo.posters.urlExpirationDate' },
503
+ {
504
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
505
+ },
506
+ ],
507
+ },
508
+ ]);
391
509
  const metadata = {
392
510
  entityFqdn: 'wix.pro_gallery.v2.gallery',
393
511
  method: 'PATCH',
@@ -398,11 +516,53 @@ function updateGallery(payload) {
398
516
  host,
399
517
  }),
400
518
  data: serializedData,
401
- transformResponse: fromRes,
519
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
520
+ {
521
+ transformFn: float_2.transformRESTFloatToSDKFloat,
522
+ paths: [
523
+ { path: 'gallery.sortOrder' },
524
+ { path: 'gallery.items.sortOrder' },
525
+ { path: 'gallery.items.image.focalPoint.x' },
526
+ { path: 'gallery.items.image.focalPoint.y' },
527
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
528
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
529
+ { path: 'gallery.items.image.unsharpMasking.amount' },
530
+ { path: 'gallery.items.image.unsharpMasking.radius' },
531
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
532
+ {
533
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
534
+ },
535
+ {
536
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
537
+ },
538
+ {
539
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
540
+ },
541
+ ],
542
+ },
543
+ {
544
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
545
+ paths: [
546
+ { path: 'gallery.createdDate' },
547
+ { path: 'gallery.items.createdDate' },
548
+ { path: 'gallery.items.updatedDate' },
549
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
550
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
551
+ {
552
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
553
+ },
554
+ {
555
+ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
556
+ },
557
+ {
558
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
559
+ },
560
+ ],
561
+ },
562
+ ]),
402
563
  };
403
564
  return metadata;
404
565
  }
405
- __updateGallery.fromReq = fromReq;
406
566
  return __updateGallery;
407
567
  }
408
568
  exports.updateGallery = updateGallery;
@@ -418,25 +578,20 @@ exports.updateGallery = updateGallery;
418
578
  * </blockquote>
419
579
  */
420
580
  function deleteGallery(payload) {
421
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteGalleryRequest, {});
422
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteGalleryResponse, {});
423
581
  function __deleteGallery({ host }) {
424
- const serializedData = toReq(payload);
425
582
  const metadata = {
426
583
  entityFqdn: 'wix.pro_gallery.v2.gallery',
427
584
  method: 'DELETE',
428
585
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGallery',
429
586
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
430
587
  protoPath: '/v2/galleries/{galleryId}',
431
- data: serializedData,
588
+ data: payload,
432
589
  host,
433
590
  }),
434
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
435
- transformResponse: fromRes,
591
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
436
592
  };
437
593
  return metadata;
438
594
  }
439
- __deleteGallery.fromReq = fromReq;
440
595
  return __deleteGallery;
441
596
  }
442
597
  exports.deleteGallery = deleteGallery;
@@ -459,30 +614,37 @@ exports.deleteGallery = deleteGallery;
459
614
  * </blockquote>
460
615
  */
461
616
  function createGalleryItem(payload) {
462
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createGalleryItemRequest, {
463
- _commonImage,
464
- _image,
465
- _item,
466
- _point,
467
- _secondaryMedia,
468
- _unsharpMasking,
469
- _video,
470
- _videoResolution,
471
- _videoV2,
472
- });
473
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_createGalleryItemResponse, {
474
- _commonImage,
475
- _image,
476
- _item,
477
- _point,
478
- _secondaryMedia,
479
- _unsharpMasking,
480
- _video,
481
- _videoResolution,
482
- _videoV2,
483
- });
484
617
  function __createGalleryItem({ host }) {
485
- const serializedData = toReq(payload);
618
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
619
+ {
620
+ transformFn: float_1.transformSDKFloatToRESTFloat,
621
+ paths: [
622
+ { path: 'item.sortOrder' },
623
+ { path: 'item.image.focalPoint.x' },
624
+ { path: 'item.image.focalPoint.y' },
625
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
626
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
627
+ { path: 'item.image.unsharpMasking.amount' },
628
+ { path: 'item.image.unsharpMasking.radius' },
629
+ { path: 'item.image.unsharpMasking.threshold' },
630
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
631
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
632
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
633
+ ],
634
+ },
635
+ {
636
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
637
+ paths: [
638
+ { path: 'item.createdDate' },
639
+ { path: 'item.updatedDate' },
640
+ { path: 'item.image.imageInfo.urlExpirationDate' },
641
+ { path: 'item.video.videoInfo.urlExpirationDate' },
642
+ { path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate' },
643
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
644
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
645
+ ],
646
+ },
647
+ ]);
486
648
  const metadata = {
487
649
  entityFqdn: 'wix.pro_gallery.v2.gallery',
488
650
  method: 'POST',
@@ -493,11 +655,41 @@ function createGalleryItem(payload) {
493
655
  host,
494
656
  }),
495
657
  data: serializedData,
496
- transformResponse: fromRes,
658
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
659
+ {
660
+ transformFn: float_2.transformRESTFloatToSDKFloat,
661
+ paths: [
662
+ { path: 'item.sortOrder' },
663
+ { path: 'item.image.focalPoint.x' },
664
+ { path: 'item.image.focalPoint.y' },
665
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
666
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
667
+ { path: 'item.image.unsharpMasking.amount' },
668
+ { path: 'item.image.unsharpMasking.radius' },
669
+ { path: 'item.image.unsharpMasking.threshold' },
670
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
671
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
672
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
673
+ ],
674
+ },
675
+ {
676
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
677
+ paths: [
678
+ { path: 'item.createdDate' },
679
+ { path: 'item.updatedDate' },
680
+ { path: 'item.image.imageInfo.urlExpirationDate' },
681
+ { path: 'item.video.videoInfo.urlExpirationDate' },
682
+ {
683
+ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
684
+ },
685
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
686
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
687
+ ],
688
+ },
689
+ ]),
497
690
  };
498
691
  return metadata;
499
692
  }
500
- __createGalleryItem.fromReq = fromReq;
501
693
  return __createGalleryItem;
502
694
  }
503
695
  exports.createGalleryItem = createGalleryItem;
@@ -520,30 +712,37 @@ exports.createGalleryItem = createGalleryItem;
520
712
  * </blockquote>
521
713
  */
522
714
  function updateGalleryItem(payload) {
523
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateGalleryItemRequest, {
524
- _commonImage,
525
- _image,
526
- _item,
527
- _point,
528
- _secondaryMedia,
529
- _unsharpMasking,
530
- _video,
531
- _videoResolution,
532
- _videoV2,
533
- });
534
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateGalleryItemResponse, {
535
- _commonImage,
536
- _image,
537
- _item,
538
- _point,
539
- _secondaryMedia,
540
- _unsharpMasking,
541
- _video,
542
- _videoResolution,
543
- _videoV2,
544
- });
545
715
  function __updateGalleryItem({ host }) {
546
- const serializedData = toReq(payload);
716
+ const serializedData = (0, transform_paths_1.transformPaths)(payload, [
717
+ {
718
+ transformFn: float_1.transformSDKFloatToRESTFloat,
719
+ paths: [
720
+ { path: 'item.sortOrder' },
721
+ { path: 'item.image.focalPoint.x' },
722
+ { path: 'item.image.focalPoint.y' },
723
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
724
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
725
+ { path: 'item.image.unsharpMasking.amount' },
726
+ { path: 'item.image.unsharpMasking.radius' },
727
+ { path: 'item.image.unsharpMasking.threshold' },
728
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
729
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
730
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
731
+ ],
732
+ },
733
+ {
734
+ transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
735
+ paths: [
736
+ { path: 'item.createdDate' },
737
+ { path: 'item.updatedDate' },
738
+ { path: 'item.image.imageInfo.urlExpirationDate' },
739
+ { path: 'item.video.videoInfo.urlExpirationDate' },
740
+ { path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate' },
741
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
742
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
743
+ ],
744
+ },
745
+ ]);
547
746
  const metadata = {
548
747
  entityFqdn: 'wix.pro_gallery.v2.gallery',
549
748
  method: 'PATCH',
@@ -554,11 +753,41 @@ function updateGalleryItem(payload) {
554
753
  host,
555
754
  }),
556
755
  data: serializedData,
557
- transformResponse: fromRes,
756
+ transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
757
+ {
758
+ transformFn: float_2.transformRESTFloatToSDKFloat,
759
+ paths: [
760
+ { path: 'item.sortOrder' },
761
+ { path: 'item.image.focalPoint.x' },
762
+ { path: 'item.image.focalPoint.y' },
763
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
764
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
765
+ { path: 'item.image.unsharpMasking.amount' },
766
+ { path: 'item.image.unsharpMasking.radius' },
767
+ { path: 'item.image.unsharpMasking.threshold' },
768
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
769
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
770
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
771
+ ],
772
+ },
773
+ {
774
+ transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
775
+ paths: [
776
+ { path: 'item.createdDate' },
777
+ { path: 'item.updatedDate' },
778
+ { path: 'item.image.imageInfo.urlExpirationDate' },
779
+ { path: 'item.video.videoInfo.urlExpirationDate' },
780
+ {
781
+ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
782
+ },
783
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
784
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
785
+ ],
786
+ },
787
+ ]),
558
788
  };
559
789
  return metadata;
560
790
  }
561
- __updateGalleryItem.fromReq = fromReq;
562
791
  return __updateGalleryItem;
563
792
  }
564
793
  exports.updateGalleryItem = updateGalleryItem;
@@ -574,25 +803,20 @@ exports.updateGalleryItem = updateGalleryItem;
574
803
  * </blockquote>
575
804
  */
576
805
  function deleteGalleryItem(payload) {
577
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteGalleryItemRequest, {});
578
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteGalleryItemResponse, {});
579
806
  function __deleteGalleryItem({ host }) {
580
- const serializedData = toReq(payload);
581
807
  const metadata = {
582
808
  entityFqdn: 'wix.pro_gallery.v2.gallery',
583
809
  method: 'DELETE',
584
810
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItem',
585
811
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
586
812
  protoPath: '/v2/galleries/{galleryId}/items/{itemId}',
587
- data: serializedData,
813
+ data: payload,
588
814
  host,
589
815
  }),
590
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
591
- transformResponse: fromRes,
816
+ params: (0, metro_runtime_1.toURLSearchParams)(payload),
592
817
  };
593
818
  return metadata;
594
819
  }
595
- __deleteGalleryItem.fromReq = fromReq;
596
820
  return __deleteGalleryItem;
597
821
  }
598
822
  exports.deleteGalleryItem = deleteGalleryItem;