@wix/pro-gallery 1.0.31 → 1.0.33

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/index.js +5 -1
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +1 -0
  4. package/build/cjs/index.typings.js +28 -0
  5. package/build/cjs/index.typings.js.map +1 -0
  6. package/build/cjs/meta.d.ts +1 -0
  7. package/build/cjs/meta.js +28 -0
  8. package/build/cjs/meta.js.map +1 -0
  9. package/build/cjs/src/pro-gallery-v2-gallery.http.d.ts +11 -11
  10. package/build/cjs/src/pro-gallery-v2-gallery.http.js +464 -240
  11. package/build/cjs/src/pro-gallery-v2-gallery.http.js.map +1 -1
  12. package/build/cjs/src/pro-gallery-v2-gallery.meta.d.ts +41 -0
  13. package/build/cjs/src/pro-gallery-v2-gallery.meta.js +218 -0
  14. package/build/cjs/src/pro-gallery-v2-gallery.meta.js.map +1 -0
  15. package/build/cjs/src/pro-gallery-v2-gallery.public.d.ts +114 -12
  16. package/build/cjs/src/pro-gallery-v2-gallery.public.js +2 -1
  17. package/build/cjs/src/pro-gallery-v2-gallery.public.js.map +1 -1
  18. package/build/cjs/src/pro-gallery-v2-gallery.types.d.ts +987 -69
  19. package/build/cjs/src/pro-gallery-v2-gallery.types.js +26 -8
  20. package/build/cjs/src/pro-gallery-v2-gallery.types.js.map +1 -1
  21. package/build/cjs/src/pro-gallery-v2-gallery.universal.d.ts +299 -75
  22. package/build/cjs/src/pro-gallery-v2-gallery.universal.js +124 -44
  23. package/build/cjs/src/pro-gallery-v2-gallery.universal.js.map +1 -1
  24. package/build/es/index.typings.d.ts +1 -0
  25. package/build/es/index.typings.js +2 -0
  26. package/build/es/index.typings.js.map +1 -0
  27. package/build/es/meta.d.ts +1 -0
  28. package/build/es/meta.js +2 -0
  29. package/build/es/meta.js.map +1 -0
  30. package/build/es/src/pro-gallery-v2-gallery.http.d.ts +11 -11
  31. package/build/es/src/pro-gallery-v2-gallery.http.js +464 -240
  32. package/build/es/src/pro-gallery-v2-gallery.http.js.map +1 -1
  33. package/build/es/src/pro-gallery-v2-gallery.meta.d.ts +41 -0
  34. package/build/es/src/pro-gallery-v2-gallery.meta.js +182 -0
  35. package/build/es/src/pro-gallery-v2-gallery.meta.js.map +1 -0
  36. package/build/es/src/pro-gallery-v2-gallery.public.d.ts +114 -12
  37. package/build/es/src/pro-gallery-v2-gallery.public.js +1 -1
  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 +987 -69
  40. package/build/es/src/pro-gallery-v2-gallery.types.js +18 -0
  41. package/build/es/src/pro-gallery-v2-gallery.types.js.map +1 -1
  42. package/build/es/src/pro-gallery-v2-gallery.universal.d.ts +299 -75
  43. package/build/es/src/pro-gallery-v2-gallery.universal.js +112 -36
  44. package/build/es/src/pro-gallery-v2-gallery.universal.js.map +1 -1
  45. package/meta/package.json +6 -0
  46. package/package.json +11 -6
@@ -1,59 +1,11 @@
1
1
  import { toURLSearchParams } from '@wix/metro-runtime';
2
- import { serializer } from '@wix/metro-runtime/ambassador';
2
+ import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
3
+ import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
4
+ import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
6
+ import { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';
7
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
3
8
  import { resolveUrl } from '@wix/metro-runtime';
4
- const _commonImage = { urlExpirationDate: 'google.protobuf.Timestamp' };
5
- const _createGalleryItemRequest = { item: '_item' };
6
- const _createGalleryItemResponse = { item: '_item' };
7
- const _createGalleryRequest = { gallery: '_gallery' };
8
- const _createGalleryResponse = { gallery: '_gallery' };
9
- const _deleteGalleryItemRequest = {};
10
- const _deleteGalleryItemResponse = {};
11
- const _deleteGalleryRequest = {};
12
- const _deleteGalleryResponse = {};
13
- const _gallery = {
14
- sortOrder: 'google.protobuf.DoubleValue',
15
- createdDate: 'google.protobuf.Timestamp',
16
- items: '_item',
17
- };
18
- const _getGalleryItemRequest = {};
19
- const _getGalleryItemResponse = { item: '_item' };
20
- const _getGalleryRequest = {};
21
- const _getGalleryResponse = { gallery: '_gallery' };
22
- const _image = {
23
- imageInfo: '_commonImage',
24
- focalPoint: '_point',
25
- unsharpMasking: '_unsharpMasking',
26
- };
27
- const _item = {
28
- sortOrder: 'google.protobuf.DoubleValue',
29
- createdDate: 'google.protobuf.Timestamp',
30
- updatedDate: 'google.protobuf.Timestamp',
31
- image: '_image',
32
- video: '_video',
33
- secondaryMedia: '_secondaryMedia',
34
- };
35
- const _listGalleriesRequest = { fields: 'google.protobuf.FieldMask' };
36
- const _listGalleriesResponse = { galleries: '_gallery' };
37
- const _listGalleryItemsRequest = {};
38
- const _listGalleryItemsResponse = { items: '_item' };
39
- const _point = { x: 'DOUBLE', y: 'DOUBLE' };
40
- const _secondaryMedia = { image: '_image' };
41
- const _unsharpMasking = {
42
- amount: 'google.protobuf.FloatValue',
43
- radius: 'google.protobuf.FloatValue',
44
- threshold: 'google.protobuf.FloatValue',
45
- };
46
- const _updateGalleryItemRequest = { item: '_item' };
47
- const _updateGalleryItemResponse = { item: '_item' };
48
- const _updateGalleryRequest = { gallery: '_gallery' };
49
- const _updateGalleryResponse = { gallery: '_gallery' };
50
- const _video = { videoInfo: '_videoV2' };
51
- const _videoResolution = { poster: '_commonImage' };
52
- const _videoV2 = {
53
- urlExpirationDate: 'google.protobuf.Timestamp',
54
- resolutions: '_videoResolution',
55
- posters: '_commonImage',
56
- };
57
9
  function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
58
10
  const domainToMappings = {
59
11
  _: [
@@ -125,21 +77,13 @@ function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
125
77
  * 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.
126
78
  */
127
79
  export function listGalleries(payload) {
128
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_listGalleriesRequest, {});
129
- const { fromJSON: fromRes } = serializer(_listGalleriesResponse, {
130
- _commonImage,
131
- _gallery,
132
- _image,
133
- _item,
134
- _point,
135
- _secondaryMedia,
136
- _unsharpMasking,
137
- _video,
138
- _videoResolution,
139
- _videoV2,
140
- });
141
80
  function __listGalleries({ host }) {
142
- const serializedData = toReq(payload);
81
+ const serializedData = transformPaths(payload, [
82
+ {
83
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
84
+ paths: [{ path: 'fields' }],
85
+ },
86
+ ]);
143
87
  const metadata = {
144
88
  entityFqdn: 'wix.pro_gallery.v2.gallery',
145
89
  method: 'GET',
@@ -150,11 +94,53 @@ export function listGalleries(payload) {
150
94
  host,
151
95
  }),
152
96
  params: toURLSearchParams(serializedData),
153
- transformResponse: fromRes,
97
+ transformResponse: (payload) => transformPaths(payload, [
98
+ {
99
+ transformFn: transformRESTFloatToSDKFloat,
100
+ paths: [
101
+ { path: 'galleries.sortOrder' },
102
+ { path: 'galleries.items.sortOrder' },
103
+ { path: 'galleries.items.image.focalPoint.x' },
104
+ { path: 'galleries.items.image.focalPoint.y' },
105
+ { path: 'galleries.items.secondaryMedia.image.focalPoint.x' },
106
+ { path: 'galleries.items.secondaryMedia.image.focalPoint.y' },
107
+ { path: 'galleries.items.image.unsharpMasking.amount' },
108
+ { path: 'galleries.items.image.unsharpMasking.radius' },
109
+ { path: 'galleries.items.image.unsharpMasking.threshold' },
110
+ {
111
+ path: 'galleries.items.secondaryMedia.image.unsharpMasking.amount',
112
+ },
113
+ {
114
+ path: 'galleries.items.secondaryMedia.image.unsharpMasking.radius',
115
+ },
116
+ {
117
+ path: 'galleries.items.secondaryMedia.image.unsharpMasking.threshold',
118
+ },
119
+ ],
120
+ },
121
+ {
122
+ transformFn: transformRESTTimestampToSDKTimestamp,
123
+ paths: [
124
+ { path: 'galleries.createdDate' },
125
+ { path: 'galleries.items.createdDate' },
126
+ { path: 'galleries.items.updatedDate' },
127
+ { path: 'galleries.items.image.imageInfo.urlExpirationDate' },
128
+ { path: 'galleries.items.video.videoInfo.urlExpirationDate' },
129
+ {
130
+ path: 'galleries.items.video.videoInfo.resolutions.poster.urlExpirationDate',
131
+ },
132
+ {
133
+ path: 'galleries.items.video.videoInfo.posters.urlExpirationDate',
134
+ },
135
+ {
136
+ path: 'galleries.items.secondaryMedia.image.imageInfo.urlExpirationDate',
137
+ },
138
+ ],
139
+ },
140
+ ]),
154
141
  };
155
142
  return metadata;
156
143
  }
157
- __listGalleries.fromReq = fromReq;
158
144
  return __listGalleries;
159
145
  }
160
146
  /**
@@ -163,36 +149,64 @@ export function listGalleries(payload) {
163
149
  * The `getGallery()` function returns a Promise that resolves to a gallery whose ID matches the given ID.
164
150
  */
165
151
  export function getGallery(payload) {
166
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_getGalleryRequest, {});
167
- const { fromJSON: fromRes } = serializer(_getGalleryResponse, {
168
- _commonImage,
169
- _gallery,
170
- _image,
171
- _item,
172
- _point,
173
- _secondaryMedia,
174
- _unsharpMasking,
175
- _video,
176
- _videoResolution,
177
- _videoV2,
178
- });
179
152
  function __getGallery({ host }) {
180
- const serializedData = toReq(payload);
181
153
  const metadata = {
182
154
  entityFqdn: 'wix.pro_gallery.v2.gallery',
183
155
  method: 'GET',
184
156
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.GetGallery',
185
157
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
186
158
  protoPath: '/v2/galleries/{galleryId}',
187
- data: serializedData,
159
+ data: payload,
188
160
  host,
189
161
  }),
190
- params: toURLSearchParams(serializedData),
191
- transformResponse: fromRes,
162
+ params: toURLSearchParams(payload),
163
+ transformResponse: (payload) => transformPaths(payload, [
164
+ {
165
+ transformFn: transformRESTFloatToSDKFloat,
166
+ paths: [
167
+ { path: 'gallery.sortOrder' },
168
+ { path: 'gallery.items.sortOrder' },
169
+ { path: 'gallery.items.image.focalPoint.x' },
170
+ { path: 'gallery.items.image.focalPoint.y' },
171
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
172
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
173
+ { path: 'gallery.items.image.unsharpMasking.amount' },
174
+ { path: 'gallery.items.image.unsharpMasking.radius' },
175
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
176
+ {
177
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
178
+ },
179
+ {
180
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
181
+ },
182
+ {
183
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
184
+ },
185
+ ],
186
+ },
187
+ {
188
+ transformFn: transformRESTTimestampToSDKTimestamp,
189
+ paths: [
190
+ { path: 'gallery.createdDate' },
191
+ { path: 'gallery.items.createdDate' },
192
+ { path: 'gallery.items.updatedDate' },
193
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
194
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
195
+ {
196
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
197
+ },
198
+ {
199
+ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
200
+ },
201
+ {
202
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
203
+ },
204
+ ],
205
+ },
206
+ ]),
192
207
  };
193
208
  return metadata;
194
209
  }
195
- __getGallery.fromReq = fromReq;
196
210
  return __getGallery;
197
211
  }
198
212
  /**
@@ -201,35 +215,54 @@ export function getGallery(payload) {
201
215
  * 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.
202
216
  */
203
217
  export function listGalleryItems(payload) {
204
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_listGalleryItemsRequest, {});
205
- const { fromJSON: fromRes } = serializer(_listGalleryItemsResponse, {
206
- _commonImage,
207
- _image,
208
- _item,
209
- _point,
210
- _secondaryMedia,
211
- _unsharpMasking,
212
- _video,
213
- _videoResolution,
214
- _videoV2,
215
- });
216
218
  function __listGalleryItems({ host }) {
217
- const serializedData = toReq(payload);
218
219
  const metadata = {
219
220
  entityFqdn: 'wix.pro_gallery.v2.gallery',
220
221
  method: 'GET',
221
222
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.ListGalleryItems',
222
223
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
223
224
  protoPath: '/v2/galleries/{galleryId}/items',
224
- data: serializedData,
225
+ data: payload,
225
226
  host,
226
227
  }),
227
- params: toURLSearchParams(serializedData),
228
- transformResponse: fromRes,
228
+ params: toURLSearchParams(payload),
229
+ transformResponse: (payload) => transformPaths(payload, [
230
+ {
231
+ transformFn: transformRESTFloatToSDKFloat,
232
+ paths: [
233
+ { path: 'items.sortOrder' },
234
+ { path: 'items.image.focalPoint.x' },
235
+ { path: 'items.image.focalPoint.y' },
236
+ { path: 'items.secondaryMedia.image.focalPoint.x' },
237
+ { path: 'items.secondaryMedia.image.focalPoint.y' },
238
+ { path: 'items.image.unsharpMasking.amount' },
239
+ { path: 'items.image.unsharpMasking.radius' },
240
+ { path: 'items.image.unsharpMasking.threshold' },
241
+ { path: 'items.secondaryMedia.image.unsharpMasking.amount' },
242
+ { path: 'items.secondaryMedia.image.unsharpMasking.radius' },
243
+ { path: 'items.secondaryMedia.image.unsharpMasking.threshold' },
244
+ ],
245
+ },
246
+ {
247
+ transformFn: transformRESTTimestampToSDKTimestamp,
248
+ paths: [
249
+ { path: 'items.createdDate' },
250
+ { path: 'items.updatedDate' },
251
+ { path: 'items.image.imageInfo.urlExpirationDate' },
252
+ { path: 'items.video.videoInfo.urlExpirationDate' },
253
+ {
254
+ path: 'items.video.videoInfo.resolutions.poster.urlExpirationDate',
255
+ },
256
+ { path: 'items.video.videoInfo.posters.urlExpirationDate' },
257
+ {
258
+ path: 'items.secondaryMedia.image.imageInfo.urlExpirationDate',
259
+ },
260
+ ],
261
+ },
262
+ ]),
229
263
  };
230
264
  return metadata;
231
265
  }
232
- __listGalleryItems.fromReq = fromReq;
233
266
  return __listGalleryItems;
234
267
  }
235
268
  /**
@@ -238,35 +271,52 @@ export function listGalleryItems(payload) {
238
271
  * The `getGalleryItem()` function returns a Promise that resolves to a media item in a specified gallery whose ID matches the given ID.
239
272
  */
240
273
  export function getGalleryItem(payload) {
241
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_getGalleryItemRequest, {});
242
- const { fromJSON: fromRes } = serializer(_getGalleryItemResponse, {
243
- _commonImage,
244
- _image,
245
- _item,
246
- _point,
247
- _secondaryMedia,
248
- _unsharpMasking,
249
- _video,
250
- _videoResolution,
251
- _videoV2,
252
- });
253
274
  function __getGalleryItem({ host }) {
254
- const serializedData = toReq(payload);
255
275
  const metadata = {
256
276
  entityFqdn: 'wix.pro_gallery.v2.gallery',
257
277
  method: 'GET',
258
278
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.GetGalleryItem',
259
279
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
260
280
  protoPath: '/v2/galleries/{galleryId}/items/{itemId}',
261
- data: serializedData,
281
+ data: payload,
262
282
  host,
263
283
  }),
264
- params: toURLSearchParams(serializedData),
265
- transformResponse: fromRes,
284
+ params: toURLSearchParams(payload),
285
+ transformResponse: (payload) => transformPaths(payload, [
286
+ {
287
+ transformFn: transformRESTFloatToSDKFloat,
288
+ paths: [
289
+ { path: 'item.sortOrder' },
290
+ { path: 'item.image.focalPoint.x' },
291
+ { path: 'item.image.focalPoint.y' },
292
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
293
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
294
+ { path: 'item.image.unsharpMasking.amount' },
295
+ { path: 'item.image.unsharpMasking.radius' },
296
+ { path: 'item.image.unsharpMasking.threshold' },
297
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
298
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
299
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
300
+ ],
301
+ },
302
+ {
303
+ transformFn: transformRESTTimestampToSDKTimestamp,
304
+ paths: [
305
+ { path: 'item.createdDate' },
306
+ { path: 'item.updatedDate' },
307
+ { path: 'item.image.imageInfo.urlExpirationDate' },
308
+ { path: 'item.video.videoInfo.urlExpirationDate' },
309
+ {
310
+ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
311
+ },
312
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
313
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
314
+ ],
315
+ },
316
+ ]),
266
317
  };
267
318
  return metadata;
268
319
  }
269
- __getGalleryItem.fromReq = fromReq;
270
320
  return __getGalleryItem;
271
321
  }
272
322
  /**
@@ -292,32 +342,45 @@ export function getGalleryItem(payload) {
292
342
  * </blockquote>
293
343
  */
294
344
  export function createGallery(payload) {
295
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_createGalleryRequest, {
296
- _commonImage,
297
- _gallery,
298
- _image,
299
- _item,
300
- _point,
301
- _secondaryMedia,
302
- _unsharpMasking,
303
- _video,
304
- _videoResolution,
305
- _videoV2,
306
- });
307
- const { fromJSON: fromRes } = serializer(_createGalleryResponse, {
308
- _commonImage,
309
- _gallery,
310
- _image,
311
- _item,
312
- _point,
313
- _secondaryMedia,
314
- _unsharpMasking,
315
- _video,
316
- _videoResolution,
317
- _videoV2,
318
- });
319
345
  function __createGallery({ host }) {
320
- const serializedData = toReq(payload);
346
+ const serializedData = transformPaths(payload, [
347
+ {
348
+ transformFn: transformSDKFloatToRESTFloat,
349
+ paths: [
350
+ { path: 'gallery.sortOrder' },
351
+ { path: 'gallery.items.sortOrder' },
352
+ { path: 'gallery.items.image.focalPoint.x' },
353
+ { path: 'gallery.items.image.focalPoint.y' },
354
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
355
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
356
+ { path: 'gallery.items.image.unsharpMasking.amount' },
357
+ { path: 'gallery.items.image.unsharpMasking.radius' },
358
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
359
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount' },
360
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius' },
361
+ {
362
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
363
+ },
364
+ ],
365
+ },
366
+ {
367
+ transformFn: transformSDKTimestampToRESTTimestamp,
368
+ paths: [
369
+ { path: 'gallery.createdDate' },
370
+ { path: 'gallery.items.createdDate' },
371
+ { path: 'gallery.items.updatedDate' },
372
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
373
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
374
+ {
375
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
376
+ },
377
+ { path: 'gallery.items.video.videoInfo.posters.urlExpirationDate' },
378
+ {
379
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
380
+ },
381
+ ],
382
+ },
383
+ ]);
321
384
  const metadata = {
322
385
  entityFqdn: 'wix.pro_gallery.v2.gallery',
323
386
  method: 'POST',
@@ -328,11 +391,53 @@ export function createGallery(payload) {
328
391
  host,
329
392
  }),
330
393
  data: serializedData,
331
- transformResponse: fromRes,
394
+ transformResponse: (payload) => transformPaths(payload, [
395
+ {
396
+ transformFn: transformRESTFloatToSDKFloat,
397
+ paths: [
398
+ { path: 'gallery.sortOrder' },
399
+ { path: 'gallery.items.sortOrder' },
400
+ { path: 'gallery.items.image.focalPoint.x' },
401
+ { path: 'gallery.items.image.focalPoint.y' },
402
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
403
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
404
+ { path: 'gallery.items.image.unsharpMasking.amount' },
405
+ { path: 'gallery.items.image.unsharpMasking.radius' },
406
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
407
+ {
408
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
409
+ },
410
+ {
411
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
412
+ },
413
+ {
414
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
415
+ },
416
+ ],
417
+ },
418
+ {
419
+ transformFn: transformRESTTimestampToSDKTimestamp,
420
+ paths: [
421
+ { path: 'gallery.createdDate' },
422
+ { path: 'gallery.items.createdDate' },
423
+ { path: 'gallery.items.updatedDate' },
424
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
425
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
426
+ {
427
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
428
+ },
429
+ {
430
+ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
431
+ },
432
+ {
433
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
434
+ },
435
+ ],
436
+ },
437
+ ]),
332
438
  };
333
439
  return metadata;
334
440
  }
335
- __createGallery.fromReq = fromReq;
336
441
  return __createGallery;
337
442
  }
338
443
  /**
@@ -354,32 +459,45 @@ export function createGallery(payload) {
354
459
  * </blockquote>
355
460
  */
356
461
  export function updateGallery(payload) {
357
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateGalleryRequest, {
358
- _commonImage,
359
- _gallery,
360
- _image,
361
- _item,
362
- _point,
363
- _secondaryMedia,
364
- _unsharpMasking,
365
- _video,
366
- _videoResolution,
367
- _videoV2,
368
- });
369
- const { fromJSON: fromRes } = serializer(_updateGalleryResponse, {
370
- _commonImage,
371
- _gallery,
372
- _image,
373
- _item,
374
- _point,
375
- _secondaryMedia,
376
- _unsharpMasking,
377
- _video,
378
- _videoResolution,
379
- _videoV2,
380
- });
381
462
  function __updateGallery({ host }) {
382
- const serializedData = toReq(payload);
463
+ const serializedData = transformPaths(payload, [
464
+ {
465
+ transformFn: transformSDKFloatToRESTFloat,
466
+ paths: [
467
+ { path: 'gallery.sortOrder' },
468
+ { path: 'gallery.items.sortOrder' },
469
+ { path: 'gallery.items.image.focalPoint.x' },
470
+ { path: 'gallery.items.image.focalPoint.y' },
471
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
472
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
473
+ { path: 'gallery.items.image.unsharpMasking.amount' },
474
+ { path: 'gallery.items.image.unsharpMasking.radius' },
475
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
476
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount' },
477
+ { path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius' },
478
+ {
479
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
480
+ },
481
+ ],
482
+ },
483
+ {
484
+ transformFn: transformSDKTimestampToRESTTimestamp,
485
+ paths: [
486
+ { path: 'gallery.createdDate' },
487
+ { path: 'gallery.items.createdDate' },
488
+ { path: 'gallery.items.updatedDate' },
489
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
490
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
491
+ {
492
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
493
+ },
494
+ { path: 'gallery.items.video.videoInfo.posters.urlExpirationDate' },
495
+ {
496
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
497
+ },
498
+ ],
499
+ },
500
+ ]);
383
501
  const metadata = {
384
502
  entityFqdn: 'wix.pro_gallery.v2.gallery',
385
503
  method: 'PATCH',
@@ -390,11 +508,53 @@ export function updateGallery(payload) {
390
508
  host,
391
509
  }),
392
510
  data: serializedData,
393
- transformResponse: fromRes,
511
+ transformResponse: (payload) => transformPaths(payload, [
512
+ {
513
+ transformFn: transformRESTFloatToSDKFloat,
514
+ paths: [
515
+ { path: 'gallery.sortOrder' },
516
+ { path: 'gallery.items.sortOrder' },
517
+ { path: 'gallery.items.image.focalPoint.x' },
518
+ { path: 'gallery.items.image.focalPoint.y' },
519
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
520
+ { path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
521
+ { path: 'gallery.items.image.unsharpMasking.amount' },
522
+ { path: 'gallery.items.image.unsharpMasking.radius' },
523
+ { path: 'gallery.items.image.unsharpMasking.threshold' },
524
+ {
525
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
526
+ },
527
+ {
528
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
529
+ },
530
+ {
531
+ path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
532
+ },
533
+ ],
534
+ },
535
+ {
536
+ transformFn: transformRESTTimestampToSDKTimestamp,
537
+ paths: [
538
+ { path: 'gallery.createdDate' },
539
+ { path: 'gallery.items.createdDate' },
540
+ { path: 'gallery.items.updatedDate' },
541
+ { path: 'gallery.items.image.imageInfo.urlExpirationDate' },
542
+ { path: 'gallery.items.video.videoInfo.urlExpirationDate' },
543
+ {
544
+ path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
545
+ },
546
+ {
547
+ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
548
+ },
549
+ {
550
+ path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
551
+ },
552
+ ],
553
+ },
554
+ ]),
394
555
  };
395
556
  return metadata;
396
557
  }
397
- __updateGallery.fromReq = fromReq;
398
558
  return __updateGallery;
399
559
  }
400
560
  /**
@@ -409,25 +569,20 @@ export function updateGallery(payload) {
409
569
  * </blockquote>
410
570
  */
411
571
  export function deleteGallery(payload) {
412
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteGalleryRequest, {});
413
- const { fromJSON: fromRes } = serializer(_deleteGalleryResponse, {});
414
572
  function __deleteGallery({ host }) {
415
- const serializedData = toReq(payload);
416
573
  const metadata = {
417
574
  entityFqdn: 'wix.pro_gallery.v2.gallery',
418
575
  method: 'DELETE',
419
576
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGallery',
420
577
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
421
578
  protoPath: '/v2/galleries/{galleryId}',
422
- data: serializedData,
579
+ data: payload,
423
580
  host,
424
581
  }),
425
- params: toURLSearchParams(serializedData),
426
- transformResponse: fromRes,
582
+ params: toURLSearchParams(payload),
427
583
  };
428
584
  return metadata;
429
585
  }
430
- __deleteGallery.fromReq = fromReq;
431
586
  return __deleteGallery;
432
587
  }
433
588
  /**
@@ -449,30 +604,37 @@ export function deleteGallery(payload) {
449
604
  * </blockquote>
450
605
  */
451
606
  export function createGalleryItem(payload) {
452
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_createGalleryItemRequest, {
453
- _commonImage,
454
- _image,
455
- _item,
456
- _point,
457
- _secondaryMedia,
458
- _unsharpMasking,
459
- _video,
460
- _videoResolution,
461
- _videoV2,
462
- });
463
- const { fromJSON: fromRes } = serializer(_createGalleryItemResponse, {
464
- _commonImage,
465
- _image,
466
- _item,
467
- _point,
468
- _secondaryMedia,
469
- _unsharpMasking,
470
- _video,
471
- _videoResolution,
472
- _videoV2,
473
- });
474
607
  function __createGalleryItem({ host }) {
475
- const serializedData = toReq(payload);
608
+ const serializedData = transformPaths(payload, [
609
+ {
610
+ transformFn: transformSDKFloatToRESTFloat,
611
+ paths: [
612
+ { path: 'item.sortOrder' },
613
+ { path: 'item.image.focalPoint.x' },
614
+ { path: 'item.image.focalPoint.y' },
615
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
616
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
617
+ { path: 'item.image.unsharpMasking.amount' },
618
+ { path: 'item.image.unsharpMasking.radius' },
619
+ { path: 'item.image.unsharpMasking.threshold' },
620
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
621
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
622
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
623
+ ],
624
+ },
625
+ {
626
+ transformFn: transformSDKTimestampToRESTTimestamp,
627
+ paths: [
628
+ { path: 'item.createdDate' },
629
+ { path: 'item.updatedDate' },
630
+ { path: 'item.image.imageInfo.urlExpirationDate' },
631
+ { path: 'item.video.videoInfo.urlExpirationDate' },
632
+ { path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate' },
633
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
634
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
635
+ ],
636
+ },
637
+ ]);
476
638
  const metadata = {
477
639
  entityFqdn: 'wix.pro_gallery.v2.gallery',
478
640
  method: 'POST',
@@ -483,11 +645,41 @@ export function createGalleryItem(payload) {
483
645
  host,
484
646
  }),
485
647
  data: serializedData,
486
- transformResponse: fromRes,
648
+ transformResponse: (payload) => transformPaths(payload, [
649
+ {
650
+ transformFn: transformRESTFloatToSDKFloat,
651
+ paths: [
652
+ { path: 'item.sortOrder' },
653
+ { path: 'item.image.focalPoint.x' },
654
+ { path: 'item.image.focalPoint.y' },
655
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
656
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
657
+ { path: 'item.image.unsharpMasking.amount' },
658
+ { path: 'item.image.unsharpMasking.radius' },
659
+ { path: 'item.image.unsharpMasking.threshold' },
660
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
661
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
662
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
663
+ ],
664
+ },
665
+ {
666
+ transformFn: transformRESTTimestampToSDKTimestamp,
667
+ paths: [
668
+ { path: 'item.createdDate' },
669
+ { path: 'item.updatedDate' },
670
+ { path: 'item.image.imageInfo.urlExpirationDate' },
671
+ { path: 'item.video.videoInfo.urlExpirationDate' },
672
+ {
673
+ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
674
+ },
675
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
676
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
677
+ ],
678
+ },
679
+ ]),
487
680
  };
488
681
  return metadata;
489
682
  }
490
- __createGalleryItem.fromReq = fromReq;
491
683
  return __createGalleryItem;
492
684
  }
493
685
  /**
@@ -509,30 +701,37 @@ export function createGalleryItem(payload) {
509
701
  * </blockquote>
510
702
  */
511
703
  export function updateGalleryItem(payload) {
512
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_updateGalleryItemRequest, {
513
- _commonImage,
514
- _image,
515
- _item,
516
- _point,
517
- _secondaryMedia,
518
- _unsharpMasking,
519
- _video,
520
- _videoResolution,
521
- _videoV2,
522
- });
523
- const { fromJSON: fromRes } = serializer(_updateGalleryItemResponse, {
524
- _commonImage,
525
- _image,
526
- _item,
527
- _point,
528
- _secondaryMedia,
529
- _unsharpMasking,
530
- _video,
531
- _videoResolution,
532
- _videoV2,
533
- });
534
704
  function __updateGalleryItem({ host }) {
535
- const serializedData = toReq(payload);
705
+ const serializedData = transformPaths(payload, [
706
+ {
707
+ transformFn: transformSDKFloatToRESTFloat,
708
+ paths: [
709
+ { path: 'item.sortOrder' },
710
+ { path: 'item.image.focalPoint.x' },
711
+ { path: 'item.image.focalPoint.y' },
712
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
713
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
714
+ { path: 'item.image.unsharpMasking.amount' },
715
+ { path: 'item.image.unsharpMasking.radius' },
716
+ { path: 'item.image.unsharpMasking.threshold' },
717
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
718
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
719
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
720
+ ],
721
+ },
722
+ {
723
+ transformFn: transformSDKTimestampToRESTTimestamp,
724
+ paths: [
725
+ { path: 'item.createdDate' },
726
+ { path: 'item.updatedDate' },
727
+ { path: 'item.image.imageInfo.urlExpirationDate' },
728
+ { path: 'item.video.videoInfo.urlExpirationDate' },
729
+ { path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate' },
730
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
731
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
732
+ ],
733
+ },
734
+ ]);
536
735
  const metadata = {
537
736
  entityFqdn: 'wix.pro_gallery.v2.gallery',
538
737
  method: 'PATCH',
@@ -543,11 +742,41 @@ export function updateGalleryItem(payload) {
543
742
  host,
544
743
  }),
545
744
  data: serializedData,
546
- transformResponse: fromRes,
745
+ transformResponse: (payload) => transformPaths(payload, [
746
+ {
747
+ transformFn: transformRESTFloatToSDKFloat,
748
+ paths: [
749
+ { path: 'item.sortOrder' },
750
+ { path: 'item.image.focalPoint.x' },
751
+ { path: 'item.image.focalPoint.y' },
752
+ { path: 'item.secondaryMedia.image.focalPoint.x' },
753
+ { path: 'item.secondaryMedia.image.focalPoint.y' },
754
+ { path: 'item.image.unsharpMasking.amount' },
755
+ { path: 'item.image.unsharpMasking.radius' },
756
+ { path: 'item.image.unsharpMasking.threshold' },
757
+ { path: 'item.secondaryMedia.image.unsharpMasking.amount' },
758
+ { path: 'item.secondaryMedia.image.unsharpMasking.radius' },
759
+ { path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
760
+ ],
761
+ },
762
+ {
763
+ transformFn: transformRESTTimestampToSDKTimestamp,
764
+ paths: [
765
+ { path: 'item.createdDate' },
766
+ { path: 'item.updatedDate' },
767
+ { path: 'item.image.imageInfo.urlExpirationDate' },
768
+ { path: 'item.video.videoInfo.urlExpirationDate' },
769
+ {
770
+ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
771
+ },
772
+ { path: 'item.video.videoInfo.posters.urlExpirationDate' },
773
+ { path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
774
+ ],
775
+ },
776
+ ]),
547
777
  };
548
778
  return metadata;
549
779
  }
550
- __updateGalleryItem.fromReq = fromReq;
551
780
  return __updateGalleryItem;
552
781
  }
553
782
  /**
@@ -562,25 +791,20 @@ export function updateGalleryItem(payload) {
562
791
  * </blockquote>
563
792
  */
564
793
  export function deleteGalleryItem(payload) {
565
- const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteGalleryItemRequest, {});
566
- const { fromJSON: fromRes } = serializer(_deleteGalleryItemResponse, {});
567
794
  function __deleteGalleryItem({ host }) {
568
- const serializedData = toReq(payload);
569
795
  const metadata = {
570
796
  entityFqdn: 'wix.pro_gallery.v2.gallery',
571
797
  method: 'DELETE',
572
798
  methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItem',
573
799
  url: resolveComWixpressExposureProgalleryProGalleryUrl({
574
800
  protoPath: '/v2/galleries/{galleryId}/items/{itemId}',
575
- data: serializedData,
801
+ data: payload,
576
802
  host,
577
803
  }),
578
- params: toURLSearchParams(serializedData),
579
- transformResponse: fromRes,
804
+ params: toURLSearchParams(payload),
580
805
  };
581
806
  return metadata;
582
807
  }
583
- __deleteGalleryItem.fromReq = fromReq;
584
808
  return __deleteGalleryItem;
585
809
  }
586
810
  //# sourceMappingURL=pro-gallery-v2-gallery.http.js.map