@wix/auto_sdk_pro-gallery_pro-gallery 1.0.20 → 1.0.22

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 (42) hide show
  1. package/build/{index.d.ts → cjs/index.d.ts} +20 -15
  2. package/build/{internal → cjs}/index.js +1 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.mts → cjs/index.typings.d.ts} +327 -3
  5. package/build/cjs/index.typings.js +1467 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/{internal → cjs}/meta.d.ts +2 -1
  8. package/build/{index.d.mts → es/index.d.mts} +20 -15
  9. package/build/{index.mjs → es/index.mjs} +1 -0
  10. package/build/es/index.mjs.map +1 -0
  11. package/build/{internal/pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.ts → es/index.typings.d.mts} +327 -3
  12. package/build/es/index.typings.mjs +1422 -0
  13. package/build/es/index.typings.mjs.map +1 -0
  14. package/build/{internal → es}/meta.d.mts +2 -1
  15. package/build/internal/{index.d.ts → cjs/index.d.ts} +20 -15
  16. package/build/{index.js → internal/cjs/index.js} +1 -0
  17. package/build/internal/cjs/index.js.map +1 -0
  18. package/build/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.ts → internal/cjs/index.typings.d.ts} +327 -3
  19. package/build/internal/cjs/index.typings.js +1467 -0
  20. package/build/internal/cjs/index.typings.js.map +1 -0
  21. package/build/{meta.d.ts → internal/cjs/meta.d.ts} +2 -1
  22. package/build/internal/cjs/meta.js.map +1 -0
  23. package/build/internal/{index.d.mts → es/index.d.mts} +20 -15
  24. package/build/internal/{index.mjs → es/index.mjs} +1 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.mts → es/index.typings.d.mts} +327 -3
  27. package/build/internal/es/index.typings.mjs +1422 -0
  28. package/build/internal/{index.js.map → es/index.typings.mjs.map} +1 -1
  29. package/build/{meta.d.mts → internal/es/meta.d.mts} +2 -1
  30. package/build/internal/es/meta.mjs.map +1 -0
  31. package/package.json +12 -11
  32. package/build/index.js.map +0 -1
  33. package/build/index.mjs.map +0 -1
  34. package/build/internal/index.mjs.map +0 -1
  35. package/build/meta.js.map +0 -1
  36. package/build/meta.mjs.map +0 -1
  37. /package/build/{internal → cjs}/meta.js +0 -0
  38. /package/build/{internal → cjs}/meta.js.map +0 -0
  39. /package/build/{internal → es}/meta.mjs +0 -0
  40. /package/build/{internal → es}/meta.mjs.map +0 -0
  41. /package/build/{meta.js → internal/cjs/meta.js} +0 -0
  42. /package/build/{meta.mjs → internal/es/meta.mjs} +0 -0
@@ -0,0 +1,1422 @@
1
+ // src/pro-gallery-v2-gallery-pro-gallery.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import {
4
+ renameKeysFromSDKRequestToRESTRequest,
5
+ renameKeysFromRESTResponseToSDKResponse
6
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
7
+
8
+ // src/pro-gallery-v2-gallery-pro-gallery.http.ts
9
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
10
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
11
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
15
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
16
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
17
+ function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
18
+ const domainToMappings = {
19
+ _: [
20
+ {
21
+ srcPath: "/_api/pro-gallery-server",
22
+ destPath: ""
23
+ }
24
+ ],
25
+ "manage._base_domain_": [
26
+ {
27
+ srcPath: "/_api/pro-gallery-server",
28
+ destPath: ""
29
+ }
30
+ ],
31
+ "www._base_domain_": [
32
+ {
33
+ srcPath: "/_api/pro-gallery-server",
34
+ destPath: ""
35
+ }
36
+ ],
37
+ "editor._base_domain_": [
38
+ {
39
+ srcPath: "/_api/pro-gallery-server",
40
+ destPath: ""
41
+ }
42
+ ],
43
+ "blocks._base_domain_": [
44
+ {
45
+ srcPath: "/_api/pro-gallery-server",
46
+ destPath: ""
47
+ }
48
+ ],
49
+ "create.editorx": [
50
+ {
51
+ srcPath: "/_api/pro-gallery-server",
52
+ destPath: ""
53
+ }
54
+ ],
55
+ "progallery.wixapps.net": [
56
+ {
57
+ srcPath: "/_api/pro-gallery-server",
58
+ destPath: ""
59
+ }
60
+ ],
61
+ "www.wixapis.com": [
62
+ {
63
+ srcPath: "/progallery",
64
+ destPath: ""
65
+ },
66
+ {
67
+ srcPath: "/pro-gallery/v2/galleries",
68
+ destPath: "/v2/galleries"
69
+ }
70
+ ],
71
+ "*.dev.wix-code.com": [
72
+ {
73
+ srcPath: "/_api/pro-gallery-server",
74
+ destPath: ""
75
+ }
76
+ ],
77
+ "api._api_base_domain_": [
78
+ {
79
+ srcPath: "/prime-server-proxy",
80
+ destPath: ""
81
+ }
82
+ ]
83
+ };
84
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
85
+ }
86
+ var PACKAGE_NAME = "@wix/auto_sdk_pro-gallery_pro-gallery";
87
+ function listGalleries(payload) {
88
+ function __listGalleries({ host }) {
89
+ const serializedData = transformPaths(payload, [
90
+ {
91
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
92
+ paths: [{ path: "fields" }]
93
+ }
94
+ ]);
95
+ const metadata = {
96
+ entityFqdn: "wix.pro_gallery.v2.gallery",
97
+ method: "GET",
98
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.ListGalleries",
99
+ packageName: PACKAGE_NAME,
100
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
101
+ protoPath: "/v2/galleries",
102
+ data: serializedData,
103
+ host
104
+ }),
105
+ params: toURLSearchParams(serializedData),
106
+ transformResponse: (payload2) => transformPaths(payload2, [
107
+ {
108
+ transformFn: transformRESTFloatToSDKFloat,
109
+ paths: [
110
+ { path: "galleries.sortOrder" },
111
+ { path: "galleries.items.sortOrder" },
112
+ { path: "galleries.items.image.focalPoint.x" },
113
+ { path: "galleries.items.image.focalPoint.y" },
114
+ { path: "galleries.items.secondaryMedia.image.focalPoint.x" },
115
+ { path: "galleries.items.secondaryMedia.image.focalPoint.y" },
116
+ { path: "galleries.items.image.unsharpMasking.amount" },
117
+ { path: "galleries.items.image.unsharpMasking.radius" },
118
+ { path: "galleries.items.image.unsharpMasking.threshold" },
119
+ {
120
+ path: "galleries.items.secondaryMedia.image.unsharpMasking.amount"
121
+ },
122
+ {
123
+ path: "galleries.items.secondaryMedia.image.unsharpMasking.radius"
124
+ },
125
+ {
126
+ path: "galleries.items.secondaryMedia.image.unsharpMasking.threshold"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ transformFn: transformRESTTimestampToSDKTimestamp,
132
+ paths: [
133
+ { path: "galleries.createdDate" },
134
+ { path: "galleries.items.createdDate" },
135
+ { path: "galleries.items.updatedDate" },
136
+ { path: "galleries.items.image.imageInfo.urlExpirationDate" },
137
+ { path: "galleries.items.video.videoInfo.urlExpirationDate" },
138
+ {
139
+ path: "galleries.items.video.videoInfo.resolutions.poster.urlExpirationDate"
140
+ },
141
+ {
142
+ path: "galleries.items.video.videoInfo.posters.urlExpirationDate"
143
+ },
144
+ {
145
+ path: "galleries.items.secondaryMedia.image.imageInfo.urlExpirationDate"
146
+ }
147
+ ]
148
+ }
149
+ ])
150
+ };
151
+ return metadata;
152
+ }
153
+ return __listGalleries;
154
+ }
155
+ function getGallery(payload) {
156
+ function __getGallery({ host }) {
157
+ const metadata = {
158
+ entityFqdn: "wix.pro_gallery.v2.gallery",
159
+ method: "GET",
160
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.GetGallery",
161
+ packageName: PACKAGE_NAME,
162
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
163
+ protoPath: "/v2/galleries/{galleryId}",
164
+ data: payload,
165
+ host
166
+ }),
167
+ params: toURLSearchParams(payload),
168
+ transformResponse: (payload2) => transformPaths(payload2, [
169
+ {
170
+ transformFn: transformRESTFloatToSDKFloat,
171
+ paths: [
172
+ { path: "gallery.sortOrder" },
173
+ { path: "gallery.items.sortOrder" },
174
+ { path: "gallery.items.image.focalPoint.x" },
175
+ { path: "gallery.items.image.focalPoint.y" },
176
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
177
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
178
+ { path: "gallery.items.image.unsharpMasking.amount" },
179
+ { path: "gallery.items.image.unsharpMasking.radius" },
180
+ { path: "gallery.items.image.unsharpMasking.threshold" },
181
+ {
182
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
183
+ },
184
+ {
185
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
186
+ },
187
+ {
188
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ transformFn: transformRESTTimestampToSDKTimestamp,
194
+ paths: [
195
+ { path: "gallery.createdDate" },
196
+ { path: "gallery.items.createdDate" },
197
+ { path: "gallery.items.updatedDate" },
198
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
199
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
200
+ {
201
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
202
+ },
203
+ {
204
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
205
+ },
206
+ {
207
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
208
+ }
209
+ ]
210
+ }
211
+ ])
212
+ };
213
+ return metadata;
214
+ }
215
+ return __getGallery;
216
+ }
217
+ function listGalleryItems(payload) {
218
+ function __listGalleryItems({ host }) {
219
+ const metadata = {
220
+ entityFqdn: "wix.pro_gallery.v2.gallery",
221
+ method: "GET",
222
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.ListGalleryItems",
223
+ packageName: PACKAGE_NAME,
224
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
225
+ protoPath: "/v2/galleries/{galleryId}/items",
226
+ data: payload,
227
+ host
228
+ }),
229
+ params: toURLSearchParams(payload),
230
+ transformResponse: (payload2) => transformPaths(payload2, [
231
+ {
232
+ transformFn: transformRESTFloatToSDKFloat,
233
+ paths: [
234
+ { path: "items.sortOrder" },
235
+ { path: "items.image.focalPoint.x" },
236
+ { path: "items.image.focalPoint.y" },
237
+ { path: "items.secondaryMedia.image.focalPoint.x" },
238
+ { path: "items.secondaryMedia.image.focalPoint.y" },
239
+ { path: "items.image.unsharpMasking.amount" },
240
+ { path: "items.image.unsharpMasking.radius" },
241
+ { path: "items.image.unsharpMasking.threshold" },
242
+ { path: "items.secondaryMedia.image.unsharpMasking.amount" },
243
+ { path: "items.secondaryMedia.image.unsharpMasking.radius" },
244
+ { path: "items.secondaryMedia.image.unsharpMasking.threshold" }
245
+ ]
246
+ },
247
+ {
248
+ transformFn: transformRESTTimestampToSDKTimestamp,
249
+ paths: [
250
+ { path: "items.createdDate" },
251
+ { path: "items.updatedDate" },
252
+ { path: "items.image.imageInfo.urlExpirationDate" },
253
+ { path: "items.video.videoInfo.urlExpirationDate" },
254
+ {
255
+ path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
256
+ },
257
+ { path: "items.video.videoInfo.posters.urlExpirationDate" },
258
+ {
259
+ path: "items.secondaryMedia.image.imageInfo.urlExpirationDate"
260
+ }
261
+ ]
262
+ }
263
+ ])
264
+ };
265
+ return metadata;
266
+ }
267
+ return __listGalleryItems;
268
+ }
269
+ function getGalleryItem(payload) {
270
+ function __getGalleryItem({ host }) {
271
+ const metadata = {
272
+ entityFqdn: "wix.pro_gallery.v2.gallery",
273
+ method: "GET",
274
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.GetGalleryItem",
275
+ packageName: PACKAGE_NAME,
276
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
277
+ protoPath: "/v2/galleries/{galleryId}/items/{itemId}",
278
+ data: payload,
279
+ host
280
+ }),
281
+ params: toURLSearchParams(payload),
282
+ transformResponse: (payload2) => transformPaths(payload2, [
283
+ {
284
+ transformFn: transformRESTFloatToSDKFloat,
285
+ paths: [
286
+ { path: "item.sortOrder" },
287
+ { path: "item.image.focalPoint.x" },
288
+ { path: "item.image.focalPoint.y" },
289
+ { path: "item.secondaryMedia.image.focalPoint.x" },
290
+ { path: "item.secondaryMedia.image.focalPoint.y" },
291
+ { path: "item.image.unsharpMasking.amount" },
292
+ { path: "item.image.unsharpMasking.radius" },
293
+ { path: "item.image.unsharpMasking.threshold" },
294
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
295
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
296
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
297
+ ]
298
+ },
299
+ {
300
+ transformFn: transformRESTTimestampToSDKTimestamp,
301
+ paths: [
302
+ { path: "item.createdDate" },
303
+ { path: "item.updatedDate" },
304
+ { path: "item.image.imageInfo.urlExpirationDate" },
305
+ { path: "item.video.videoInfo.urlExpirationDate" },
306
+ {
307
+ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
308
+ },
309
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
310
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
311
+ ]
312
+ }
313
+ ])
314
+ };
315
+ return metadata;
316
+ }
317
+ return __getGalleryItem;
318
+ }
319
+ function createGallery(payload) {
320
+ function __createGallery({ host }) {
321
+ const serializedData = transformPaths(payload, [
322
+ {
323
+ transformFn: transformSDKFloatToRESTFloat,
324
+ paths: [
325
+ { path: "gallery.sortOrder" },
326
+ { path: "gallery.items.sortOrder" },
327
+ { path: "gallery.items.image.focalPoint.x" },
328
+ { path: "gallery.items.image.focalPoint.y" },
329
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
330
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
331
+ { path: "gallery.items.image.unsharpMasking.amount" },
332
+ { path: "gallery.items.image.unsharpMasking.radius" },
333
+ { path: "gallery.items.image.unsharpMasking.threshold" },
334
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.amount" },
335
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.radius" },
336
+ {
337
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ transformFn: transformSDKTimestampToRESTTimestamp,
343
+ paths: [
344
+ { path: "gallery.createdDate" },
345
+ { path: "gallery.items.createdDate" },
346
+ { path: "gallery.items.updatedDate" },
347
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
348
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
349
+ {
350
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
351
+ },
352
+ { path: "gallery.items.video.videoInfo.posters.urlExpirationDate" },
353
+ {
354
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
355
+ }
356
+ ]
357
+ }
358
+ ]);
359
+ const metadata = {
360
+ entityFqdn: "wix.pro_gallery.v2.gallery",
361
+ method: "POST",
362
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.CreateGallery",
363
+ packageName: PACKAGE_NAME,
364
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
365
+ protoPath: "/v2/galleries",
366
+ data: serializedData,
367
+ host
368
+ }),
369
+ data: serializedData,
370
+ transformResponse: (payload2) => transformPaths(payload2, [
371
+ {
372
+ transformFn: transformRESTFloatToSDKFloat,
373
+ paths: [
374
+ { path: "gallery.sortOrder" },
375
+ { path: "gallery.items.sortOrder" },
376
+ { path: "gallery.items.image.focalPoint.x" },
377
+ { path: "gallery.items.image.focalPoint.y" },
378
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
379
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
380
+ { path: "gallery.items.image.unsharpMasking.amount" },
381
+ { path: "gallery.items.image.unsharpMasking.radius" },
382
+ { path: "gallery.items.image.unsharpMasking.threshold" },
383
+ {
384
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
385
+ },
386
+ {
387
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
388
+ },
389
+ {
390
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ transformFn: transformRESTTimestampToSDKTimestamp,
396
+ paths: [
397
+ { path: "gallery.createdDate" },
398
+ { path: "gallery.items.createdDate" },
399
+ { path: "gallery.items.updatedDate" },
400
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
401
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
402
+ {
403
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
404
+ },
405
+ {
406
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
407
+ },
408
+ {
409
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
410
+ }
411
+ ]
412
+ }
413
+ ])
414
+ };
415
+ return metadata;
416
+ }
417
+ return __createGallery;
418
+ }
419
+ function updateGallery(payload) {
420
+ function __updateGallery({ host }) {
421
+ const serializedData = transformPaths(payload, [
422
+ {
423
+ transformFn: transformSDKFloatToRESTFloat,
424
+ paths: [
425
+ { path: "gallery.sortOrder" },
426
+ { path: "gallery.items.sortOrder" },
427
+ { path: "gallery.items.image.focalPoint.x" },
428
+ { path: "gallery.items.image.focalPoint.y" },
429
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
430
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
431
+ { path: "gallery.items.image.unsharpMasking.amount" },
432
+ { path: "gallery.items.image.unsharpMasking.radius" },
433
+ { path: "gallery.items.image.unsharpMasking.threshold" },
434
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.amount" },
435
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.radius" },
436
+ {
437
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ transformFn: transformSDKTimestampToRESTTimestamp,
443
+ paths: [
444
+ { path: "gallery.createdDate" },
445
+ { path: "gallery.items.createdDate" },
446
+ { path: "gallery.items.updatedDate" },
447
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
448
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
449
+ {
450
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
451
+ },
452
+ { path: "gallery.items.video.videoInfo.posters.urlExpirationDate" },
453
+ {
454
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
455
+ }
456
+ ]
457
+ }
458
+ ]);
459
+ const metadata = {
460
+ entityFqdn: "wix.pro_gallery.v2.gallery",
461
+ method: "PATCH",
462
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.UpdateGallery",
463
+ packageName: PACKAGE_NAME,
464
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
465
+ protoPath: "/v2/galleries/{gallery.id}",
466
+ data: serializedData,
467
+ host
468
+ }),
469
+ data: serializedData,
470
+ transformResponse: (payload2) => transformPaths(payload2, [
471
+ {
472
+ transformFn: transformRESTFloatToSDKFloat,
473
+ paths: [
474
+ { path: "gallery.sortOrder" },
475
+ { path: "gallery.items.sortOrder" },
476
+ { path: "gallery.items.image.focalPoint.x" },
477
+ { path: "gallery.items.image.focalPoint.y" },
478
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
479
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
480
+ { path: "gallery.items.image.unsharpMasking.amount" },
481
+ { path: "gallery.items.image.unsharpMasking.radius" },
482
+ { path: "gallery.items.image.unsharpMasking.threshold" },
483
+ {
484
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
485
+ },
486
+ {
487
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
488
+ },
489
+ {
490
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
491
+ }
492
+ ]
493
+ },
494
+ {
495
+ transformFn: transformRESTTimestampToSDKTimestamp,
496
+ paths: [
497
+ { path: "gallery.createdDate" },
498
+ { path: "gallery.items.createdDate" },
499
+ { path: "gallery.items.updatedDate" },
500
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
501
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
502
+ {
503
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
504
+ },
505
+ {
506
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
507
+ },
508
+ {
509
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
510
+ }
511
+ ]
512
+ }
513
+ ])
514
+ };
515
+ return metadata;
516
+ }
517
+ return __updateGallery;
518
+ }
519
+ function deleteGallery(payload) {
520
+ function __deleteGallery({ host }) {
521
+ const metadata = {
522
+ entityFqdn: "wix.pro_gallery.v2.gallery",
523
+ method: "DELETE",
524
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.DeleteGallery",
525
+ packageName: PACKAGE_NAME,
526
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
527
+ protoPath: "/v2/galleries/{galleryId}",
528
+ data: payload,
529
+ host
530
+ }),
531
+ params: toURLSearchParams(payload)
532
+ };
533
+ return metadata;
534
+ }
535
+ return __deleteGallery;
536
+ }
537
+ function deleteGalleryItems(payload) {
538
+ function __deleteGalleryItems({ host }) {
539
+ const metadata = {
540
+ entityFqdn: "wix.pro_gallery.v2.gallery",
541
+ method: "DELETE",
542
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItems",
543
+ packageName: PACKAGE_NAME,
544
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
545
+ protoPath: "/v2/galleries/{galleryId}/items",
546
+ data: payload,
547
+ host
548
+ }),
549
+ params: toURLSearchParams(payload),
550
+ transformResponse: (payload2) => transformPaths(payload2, [
551
+ {
552
+ transformFn: transformRESTFloatToSDKFloat,
553
+ paths: [
554
+ { path: "gallery.sortOrder" },
555
+ { path: "gallery.items.sortOrder" },
556
+ { path: "gallery.items.image.focalPoint.x" },
557
+ { path: "gallery.items.image.focalPoint.y" },
558
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
559
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
560
+ { path: "gallery.items.image.unsharpMasking.amount" },
561
+ { path: "gallery.items.image.unsharpMasking.radius" },
562
+ { path: "gallery.items.image.unsharpMasking.threshold" },
563
+ {
564
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
565
+ },
566
+ {
567
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
568
+ },
569
+ {
570
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ transformFn: transformRESTTimestampToSDKTimestamp,
576
+ paths: [
577
+ { path: "gallery.createdDate" },
578
+ { path: "gallery.items.createdDate" },
579
+ { path: "gallery.items.updatedDate" },
580
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
581
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
582
+ {
583
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
584
+ },
585
+ {
586
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
587
+ },
588
+ {
589
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
590
+ }
591
+ ]
592
+ }
593
+ ])
594
+ };
595
+ return metadata;
596
+ }
597
+ return __deleteGalleryItems;
598
+ }
599
+ function bulkDeleteGalleryItems(payload) {
600
+ function __bulkDeleteGalleryItems({ host }) {
601
+ const metadata = {
602
+ entityFqdn: "wix.pro_gallery.v2.gallery",
603
+ method: "POST",
604
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.BulkDeleteGalleryItems",
605
+ packageName: PACKAGE_NAME,
606
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
607
+ protoPath: "/v2/galleries/{galleryId}/items/delete",
608
+ data: payload,
609
+ host
610
+ }),
611
+ data: payload
612
+ };
613
+ return metadata;
614
+ }
615
+ return __bulkDeleteGalleryItems;
616
+ }
617
+ function createGalleryItem(payload) {
618
+ function __createGalleryItem({ host }) {
619
+ const serializedData = transformPaths(payload, [
620
+ {
621
+ transformFn: transformSDKFloatToRESTFloat,
622
+ paths: [
623
+ { path: "item.sortOrder" },
624
+ { path: "item.image.focalPoint.x" },
625
+ { path: "item.image.focalPoint.y" },
626
+ { path: "item.secondaryMedia.image.focalPoint.x" },
627
+ { path: "item.secondaryMedia.image.focalPoint.y" },
628
+ { path: "item.image.unsharpMasking.amount" },
629
+ { path: "item.image.unsharpMasking.radius" },
630
+ { path: "item.image.unsharpMasking.threshold" },
631
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
632
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
633
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
634
+ ]
635
+ },
636
+ {
637
+ transformFn: transformSDKTimestampToRESTTimestamp,
638
+ paths: [
639
+ { path: "item.createdDate" },
640
+ { path: "item.updatedDate" },
641
+ { path: "item.image.imageInfo.urlExpirationDate" },
642
+ { path: "item.video.videoInfo.urlExpirationDate" },
643
+ { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
644
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
645
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
646
+ ]
647
+ }
648
+ ]);
649
+ const metadata = {
650
+ entityFqdn: "wix.pro_gallery.v2.gallery",
651
+ method: "POST",
652
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.CreateGalleryItem",
653
+ packageName: PACKAGE_NAME,
654
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
655
+ protoPath: "/v2/galleries/{galleryId}/items",
656
+ data: serializedData,
657
+ host
658
+ }),
659
+ data: serializedData,
660
+ transformResponse: (payload2) => transformPaths(payload2, [
661
+ {
662
+ transformFn: transformRESTFloatToSDKFloat,
663
+ paths: [
664
+ { path: "item.sortOrder" },
665
+ { path: "item.image.focalPoint.x" },
666
+ { path: "item.image.focalPoint.y" },
667
+ { path: "item.secondaryMedia.image.focalPoint.x" },
668
+ { path: "item.secondaryMedia.image.focalPoint.y" },
669
+ { path: "item.image.unsharpMasking.amount" },
670
+ { path: "item.image.unsharpMasking.radius" },
671
+ { path: "item.image.unsharpMasking.threshold" },
672
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
673
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
674
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
675
+ ]
676
+ },
677
+ {
678
+ transformFn: transformRESTTimestampToSDKTimestamp,
679
+ paths: [
680
+ { path: "item.createdDate" },
681
+ { path: "item.updatedDate" },
682
+ { path: "item.image.imageInfo.urlExpirationDate" },
683
+ { path: "item.video.videoInfo.urlExpirationDate" },
684
+ {
685
+ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
686
+ },
687
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
688
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
689
+ ]
690
+ }
691
+ ])
692
+ };
693
+ return metadata;
694
+ }
695
+ return __createGalleryItem;
696
+ }
697
+ function updateGalleryItem(payload) {
698
+ function __updateGalleryItem({ host }) {
699
+ const serializedData = transformPaths(payload, [
700
+ {
701
+ transformFn: transformSDKFloatToRESTFloat,
702
+ paths: [
703
+ { path: "item.sortOrder" },
704
+ { path: "item.image.focalPoint.x" },
705
+ { path: "item.image.focalPoint.y" },
706
+ { path: "item.secondaryMedia.image.focalPoint.x" },
707
+ { path: "item.secondaryMedia.image.focalPoint.y" },
708
+ { path: "item.image.unsharpMasking.amount" },
709
+ { path: "item.image.unsharpMasking.radius" },
710
+ { path: "item.image.unsharpMasking.threshold" },
711
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
712
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
713
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
714
+ ]
715
+ },
716
+ {
717
+ transformFn: transformSDKTimestampToRESTTimestamp,
718
+ paths: [
719
+ { path: "item.createdDate" },
720
+ { path: "item.updatedDate" },
721
+ { path: "item.image.imageInfo.urlExpirationDate" },
722
+ { path: "item.video.videoInfo.urlExpirationDate" },
723
+ { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
724
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
725
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
726
+ ]
727
+ }
728
+ ]);
729
+ const metadata = {
730
+ entityFqdn: "wix.pro_gallery.v2.gallery",
731
+ method: "PATCH",
732
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.UpdateGalleryItem",
733
+ packageName: PACKAGE_NAME,
734
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
735
+ protoPath: "/v2/galleries/{galleryId}/items/{item.id}",
736
+ data: serializedData,
737
+ host
738
+ }),
739
+ data: serializedData,
740
+ transformResponse: (payload2) => transformPaths(payload2, [
741
+ {
742
+ transformFn: transformRESTFloatToSDKFloat,
743
+ paths: [
744
+ { path: "item.sortOrder" },
745
+ { path: "item.image.focalPoint.x" },
746
+ { path: "item.image.focalPoint.y" },
747
+ { path: "item.secondaryMedia.image.focalPoint.x" },
748
+ { path: "item.secondaryMedia.image.focalPoint.y" },
749
+ { path: "item.image.unsharpMasking.amount" },
750
+ { path: "item.image.unsharpMasking.radius" },
751
+ { path: "item.image.unsharpMasking.threshold" },
752
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
753
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
754
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
755
+ ]
756
+ },
757
+ {
758
+ transformFn: transformRESTTimestampToSDKTimestamp,
759
+ paths: [
760
+ { path: "item.createdDate" },
761
+ { path: "item.updatedDate" },
762
+ { path: "item.image.imageInfo.urlExpirationDate" },
763
+ { path: "item.video.videoInfo.urlExpirationDate" },
764
+ {
765
+ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
766
+ },
767
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
768
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
769
+ ]
770
+ }
771
+ ])
772
+ };
773
+ return metadata;
774
+ }
775
+ return __updateGalleryItem;
776
+ }
777
+ function deleteGalleryItem(payload) {
778
+ function __deleteGalleryItem({ host }) {
779
+ const metadata = {
780
+ entityFqdn: "wix.pro_gallery.v2.gallery",
781
+ method: "DELETE",
782
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItem",
783
+ packageName: PACKAGE_NAME,
784
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
785
+ protoPath: "/v2/galleries/{galleryId}/items/{itemId}",
786
+ data: payload,
787
+ host
788
+ }),
789
+ params: toURLSearchParams(payload)
790
+ };
791
+ return metadata;
792
+ }
793
+ return __deleteGalleryItem;
794
+ }
795
+
796
+ // src/pro-gallery-v2-gallery-pro-gallery.universal.ts
797
+ import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
798
+ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
799
+ import { transformSDKVideoV2ToRESTVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
800
+ import { transformRESTVideoV2ToSDKVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
801
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
802
+ var LinkType = /* @__PURE__ */ ((LinkType2) => {
803
+ LinkType2["UNDEFINED"] = "UNDEFINED";
804
+ LinkType2["EXTERNAL"] = "EXTERNAL";
805
+ LinkType2["INTERNAL"] = "INTERNAL";
806
+ return LinkType2;
807
+ })(LinkType || {});
808
+ var LinkRel = /* @__PURE__ */ ((LinkRel2) => {
809
+ LinkRel2["unknown_link_rel"] = "unknown_link_rel";
810
+ LinkRel2["nofollow"] = "nofollow";
811
+ LinkRel2["noopener"] = "noopener";
812
+ LinkRel2["noreferrer"] = "noreferrer";
813
+ LinkRel2["sponsored"] = "sponsored";
814
+ return LinkRel2;
815
+ })(LinkRel || {});
816
+ var Type = /* @__PURE__ */ ((Type2) => {
817
+ Type2["UNDEFINED"] = "UNDEFINED";
818
+ Type2["IMAGE"] = "IMAGE";
819
+ Type2["VIDEO"] = "VIDEO";
820
+ Type2["TEXT"] = "TEXT";
821
+ return Type2;
822
+ })(Type || {});
823
+ var ImageType = /* @__PURE__ */ ((ImageType2) => {
824
+ ImageType2["UNDEFINED"] = "UNDEFINED";
825
+ ImageType2["WIX_MEDIA"] = "WIX_MEDIA";
826
+ ImageType2["EXTERNAL"] = "EXTERNAL";
827
+ return ImageType2;
828
+ })(ImageType || {});
829
+ var VideoType = /* @__PURE__ */ ((VideoType2) => {
830
+ VideoType2["UNDEFINED"] = "UNDEFINED";
831
+ VideoType2["WIX_MEDIA"] = "WIX_MEDIA";
832
+ VideoType2["YOUTUBE"] = "YOUTUBE";
833
+ VideoType2["VIMEO"] = "VIMEO";
834
+ return VideoType2;
835
+ })(VideoType || {});
836
+ var RCLabel = /* @__PURE__ */ ((RCLabel2) => {
837
+ RCLabel2["UNKNOWN"] = "UNKNOWN";
838
+ RCLabel2["RELEASE_MANAGER"] = "RELEASE_MANAGER";
839
+ RCLabel2["BLOCKS"] = "BLOCKS";
840
+ RCLabel2["WIX_CLI"] = "WIX_CLI";
841
+ RCLabel2["MOBILE_APP_BUILDER"] = "MOBILE_APP_BUILDER";
842
+ RCLabel2["SEO"] = "SEO";
843
+ RCLabel2["FEEDBACK"] = "FEEDBACK";
844
+ RCLabel2["ACCESSIBILITY"] = "ACCESSIBILITY";
845
+ RCLabel2["ENTERPRISE_APPROVALS"] = "ENTERPRISE_APPROVALS";
846
+ return RCLabel2;
847
+ })(RCLabel || {});
848
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
849
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
850
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
851
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
852
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
853
+ WebhookIdentityType2["APP"] = "APP";
854
+ return WebhookIdentityType2;
855
+ })(WebhookIdentityType || {});
856
+ var State = /* @__PURE__ */ ((State2) => {
857
+ State2["UNDEFINED"] = "UNDEFINED";
858
+ State2["SAVED"] = "SAVED";
859
+ State2["PUBLISHED"] = "PUBLISHED";
860
+ return State2;
861
+ })(State || {});
862
+ var Enum = /* @__PURE__ */ ((Enum2) => {
863
+ Enum2["UNKNOWN"] = "UNKNOWN";
864
+ Enum2["PROTECTED"] = "PROTECTED";
865
+ Enum2["PRIVATE"] = "PRIVATE";
866
+ Enum2["PUBLIC"] = "PUBLIC";
867
+ Enum2["UNCHANGED"] = "UNCHANGED";
868
+ Enum2["GROUP_PROTECTED"] = "GROUP_PROTECTED";
869
+ return Enum2;
870
+ })(Enum || {});
871
+ var SearchIndexingNotificationState = /* @__PURE__ */ ((SearchIndexingNotificationState2) => {
872
+ SearchIndexingNotificationState2["Unknown"] = "Unknown";
873
+ SearchIndexingNotificationState2["Off"] = "Off";
874
+ SearchIndexingNotificationState2["On"] = "On";
875
+ return SearchIndexingNotificationState2;
876
+ })(SearchIndexingNotificationState || {});
877
+ async function listGalleries2(options) {
878
+ const { httpClient, sideEffects } = arguments[1];
879
+ const payload = renameKeysFromSDKRequestToRESTRequest({
880
+ itemLimit: options?.itemLimit,
881
+ offset: options?.offset,
882
+ limit: options?.limit
883
+ });
884
+ const reqOpts = listGalleries(payload);
885
+ sideEffects?.onSiteCall?.();
886
+ try {
887
+ const result = await httpClient.request(reqOpts);
888
+ sideEffects?.onSuccess?.(result);
889
+ return renameKeysFromRESTResponseToSDKResponse(
890
+ transformPaths2(result.data, [
891
+ {
892
+ transformFn: transformRESTImageToSDKImage,
893
+ paths: [
894
+ { path: "galleries.items.image.imageInfo" },
895
+ { path: "galleries.items.secondaryMedia.image.imageInfo" }
896
+ ]
897
+ },
898
+ {
899
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
900
+ paths: [{ path: "galleries.items.video.videoInfo" }]
901
+ }
902
+ ])
903
+ );
904
+ } catch (err) {
905
+ const transformedError = sdkTransformError(
906
+ err,
907
+ {
908
+ spreadPathsToArguments: {},
909
+ explicitPathsToArguments: {
910
+ itemLimit: "$[0].itemLimit",
911
+ offset: "$[0].offset",
912
+ limit: "$[0].limit"
913
+ },
914
+ singleArgumentUnchanged: false
915
+ },
916
+ ["options"]
917
+ );
918
+ sideEffects?.onError?.(err);
919
+ throw transformedError;
920
+ }
921
+ }
922
+ async function getGallery2(galleryId, options) {
923
+ const { httpClient, sideEffects } = arguments[2];
924
+ const payload = renameKeysFromSDKRequestToRESTRequest({
925
+ galleryId,
926
+ itemOffset: options?.itemOffset,
927
+ itemLimit: options?.itemLimit
928
+ });
929
+ const reqOpts = getGallery(payload);
930
+ sideEffects?.onSiteCall?.();
931
+ try {
932
+ const result = await httpClient.request(reqOpts);
933
+ sideEffects?.onSuccess?.(result);
934
+ return renameKeysFromRESTResponseToSDKResponse(
935
+ transformPaths2(result.data, [
936
+ {
937
+ transformFn: transformRESTImageToSDKImage,
938
+ paths: [
939
+ { path: "gallery.items.image.imageInfo" },
940
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
941
+ ]
942
+ },
943
+ {
944
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
945
+ paths: [{ path: "gallery.items.video.videoInfo" }]
946
+ }
947
+ ])
948
+ )?.gallery;
949
+ } catch (err) {
950
+ const transformedError = sdkTransformError(
951
+ err,
952
+ {
953
+ spreadPathsToArguments: {},
954
+ explicitPathsToArguments: {
955
+ galleryId: "$[0]",
956
+ itemOffset: "$[1].itemOffset",
957
+ itemLimit: "$[1].itemLimit"
958
+ },
959
+ singleArgumentUnchanged: false
960
+ },
961
+ ["galleryId", "options"]
962
+ );
963
+ sideEffects?.onError?.(err);
964
+ throw transformedError;
965
+ }
966
+ }
967
+ async function listGalleryItems2(galleryId, options) {
968
+ const { httpClient, sideEffects } = arguments[2];
969
+ const payload = renameKeysFromSDKRequestToRESTRequest({
970
+ galleryId,
971
+ itemOffset: options?.itemOffset,
972
+ itemLimit: options?.itemLimit
973
+ });
974
+ const reqOpts = listGalleryItems(payload);
975
+ sideEffects?.onSiteCall?.();
976
+ try {
977
+ const result = await httpClient.request(reqOpts);
978
+ sideEffects?.onSuccess?.(result);
979
+ return renameKeysFromRESTResponseToSDKResponse(
980
+ transformPaths2(result.data, [
981
+ {
982
+ transformFn: transformRESTImageToSDKImage,
983
+ paths: [
984
+ { path: "items.image.imageInfo" },
985
+ { path: "items.secondaryMedia.image.imageInfo" }
986
+ ]
987
+ },
988
+ {
989
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
990
+ paths: [{ path: "items.video.videoInfo" }]
991
+ }
992
+ ])
993
+ );
994
+ } catch (err) {
995
+ const transformedError = sdkTransformError(
996
+ err,
997
+ {
998
+ spreadPathsToArguments: {},
999
+ explicitPathsToArguments: {
1000
+ galleryId: "$[0]",
1001
+ itemOffset: "$[1].itemOffset",
1002
+ itemLimit: "$[1].itemLimit"
1003
+ },
1004
+ singleArgumentUnchanged: false
1005
+ },
1006
+ ["galleryId", "options"]
1007
+ );
1008
+ sideEffects?.onError?.(err);
1009
+ throw transformedError;
1010
+ }
1011
+ }
1012
+ async function getGalleryItem2(identifiers) {
1013
+ const { httpClient, sideEffects } = arguments[1];
1014
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1015
+ galleryId: identifiers?.galleryId,
1016
+ itemId: identifiers?.itemId
1017
+ });
1018
+ const reqOpts = getGalleryItem(payload);
1019
+ sideEffects?.onSiteCall?.();
1020
+ try {
1021
+ const result = await httpClient.request(reqOpts);
1022
+ sideEffects?.onSuccess?.(result);
1023
+ return renameKeysFromRESTResponseToSDKResponse(
1024
+ transformPaths2(result.data, [
1025
+ {
1026
+ transformFn: transformRESTImageToSDKImage,
1027
+ paths: [
1028
+ { path: "item.image.imageInfo" },
1029
+ { path: "item.secondaryMedia.image.imageInfo" }
1030
+ ]
1031
+ },
1032
+ {
1033
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
1034
+ paths: [{ path: "item.video.videoInfo" }]
1035
+ }
1036
+ ])
1037
+ )?.item;
1038
+ } catch (err) {
1039
+ const transformedError = sdkTransformError(
1040
+ err,
1041
+ {
1042
+ spreadPathsToArguments: {},
1043
+ explicitPathsToArguments: {
1044
+ galleryId: "$[0].galleryId",
1045
+ itemId: "$[0].itemId"
1046
+ },
1047
+ singleArgumentUnchanged: false
1048
+ },
1049
+ ["identifiers"]
1050
+ );
1051
+ sideEffects?.onError?.(err);
1052
+ throw transformedError;
1053
+ }
1054
+ }
1055
+ async function createGallery2(options) {
1056
+ const { httpClient, sideEffects } = arguments[1];
1057
+ const payload = transformPaths2(
1058
+ renameKeysFromSDKRequestToRESTRequest({
1059
+ gallery: options?.gallery,
1060
+ cloneFromGalleryId: options?.cloneFromGalleryId
1061
+ }),
1062
+ [
1063
+ {
1064
+ transformFn: transformSDKImageToRESTImage,
1065
+ paths: [
1066
+ { path: "gallery.items.image.imageInfo" },
1067
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1068
+ ]
1069
+ },
1070
+ {
1071
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
1072
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1073
+ }
1074
+ ]
1075
+ );
1076
+ const reqOpts = createGallery(payload);
1077
+ sideEffects?.onSiteCall?.();
1078
+ try {
1079
+ const result = await httpClient.request(reqOpts);
1080
+ sideEffects?.onSuccess?.(result);
1081
+ return renameKeysFromRESTResponseToSDKResponse(
1082
+ transformPaths2(result.data, [
1083
+ {
1084
+ transformFn: transformRESTImageToSDKImage,
1085
+ paths: [
1086
+ { path: "gallery.items.image.imageInfo" },
1087
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1088
+ ]
1089
+ },
1090
+ {
1091
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
1092
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1093
+ }
1094
+ ])
1095
+ )?.gallery;
1096
+ } catch (err) {
1097
+ const transformedError = sdkTransformError(
1098
+ err,
1099
+ {
1100
+ spreadPathsToArguments: {},
1101
+ explicitPathsToArguments: {
1102
+ gallery: "$[0].gallery",
1103
+ cloneFromGalleryId: "$[0].cloneFromGalleryId"
1104
+ },
1105
+ singleArgumentUnchanged: false
1106
+ },
1107
+ ["options"]
1108
+ );
1109
+ sideEffects?.onError?.(err);
1110
+ throw transformedError;
1111
+ }
1112
+ }
1113
+ async function updateGallery2(_id, gallery) {
1114
+ const { httpClient, sideEffects } = arguments[2];
1115
+ const payload = transformPaths2(
1116
+ renameKeysFromSDKRequestToRESTRequest({ gallery: { ...gallery, id: _id } }),
1117
+ [
1118
+ {
1119
+ transformFn: transformSDKImageToRESTImage,
1120
+ paths: [
1121
+ { path: "gallery.items.image.imageInfo" },
1122
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1123
+ ]
1124
+ },
1125
+ {
1126
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
1127
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1128
+ }
1129
+ ]
1130
+ );
1131
+ const reqOpts = updateGallery(payload);
1132
+ sideEffects?.onSiteCall?.();
1133
+ try {
1134
+ const result = await httpClient.request(reqOpts);
1135
+ sideEffects?.onSuccess?.(result);
1136
+ return renameKeysFromRESTResponseToSDKResponse(
1137
+ transformPaths2(result.data, [
1138
+ {
1139
+ transformFn: transformRESTImageToSDKImage,
1140
+ paths: [
1141
+ { path: "gallery.items.image.imageInfo" },
1142
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1143
+ ]
1144
+ },
1145
+ {
1146
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
1147
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1148
+ }
1149
+ ])
1150
+ )?.gallery;
1151
+ } catch (err) {
1152
+ const transformedError = sdkTransformError(
1153
+ err,
1154
+ {
1155
+ spreadPathsToArguments: { gallery: "$[1]" },
1156
+ explicitPathsToArguments: { "gallery.id": "$[0]" },
1157
+ singleArgumentUnchanged: false
1158
+ },
1159
+ ["_id", "gallery"]
1160
+ );
1161
+ sideEffects?.onError?.(err);
1162
+ throw transformedError;
1163
+ }
1164
+ }
1165
+ async function deleteGallery2(galleryId) {
1166
+ const { httpClient, sideEffects } = arguments[1];
1167
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1168
+ galleryId
1169
+ });
1170
+ const reqOpts = deleteGallery(payload);
1171
+ sideEffects?.onSiteCall?.();
1172
+ try {
1173
+ const result = await httpClient.request(reqOpts);
1174
+ sideEffects?.onSuccess?.(result);
1175
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1176
+ } catch (err) {
1177
+ const transformedError = sdkTransformError(
1178
+ err,
1179
+ {
1180
+ spreadPathsToArguments: {},
1181
+ explicitPathsToArguments: { galleryId: "$[0]" },
1182
+ singleArgumentUnchanged: false
1183
+ },
1184
+ ["galleryId"]
1185
+ );
1186
+ sideEffects?.onError?.(err);
1187
+ throw transformedError;
1188
+ }
1189
+ }
1190
+ async function deleteGalleryItems2(galleryId, options) {
1191
+ const { httpClient, sideEffects } = arguments[2];
1192
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1193
+ galleryId,
1194
+ itemsIds: options?.itemsIds
1195
+ });
1196
+ const reqOpts = deleteGalleryItems(payload);
1197
+ sideEffects?.onSiteCall?.();
1198
+ try {
1199
+ const result = await httpClient.request(reqOpts);
1200
+ sideEffects?.onSuccess?.(result);
1201
+ return renameKeysFromRESTResponseToSDKResponse(
1202
+ transformPaths2(result.data, [
1203
+ {
1204
+ transformFn: transformRESTImageToSDKImage,
1205
+ paths: [
1206
+ { path: "gallery.items.image.imageInfo" },
1207
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1208
+ ]
1209
+ },
1210
+ {
1211
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
1212
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1213
+ }
1214
+ ])
1215
+ );
1216
+ } catch (err) {
1217
+ const transformedError = sdkTransformError(
1218
+ err,
1219
+ {
1220
+ spreadPathsToArguments: {},
1221
+ explicitPathsToArguments: {
1222
+ galleryId: "$[0]",
1223
+ itemsIds: "$[1].itemsIds"
1224
+ },
1225
+ singleArgumentUnchanged: false
1226
+ },
1227
+ ["galleryId", "options"]
1228
+ );
1229
+ sideEffects?.onError?.(err);
1230
+ throw transformedError;
1231
+ }
1232
+ }
1233
+ async function bulkDeleteGalleryItems2(galleryId, itemIds) {
1234
+ const { httpClient, sideEffects } = arguments[2];
1235
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1236
+ galleryId,
1237
+ itemIds
1238
+ });
1239
+ const reqOpts = bulkDeleteGalleryItems(payload);
1240
+ sideEffects?.onSiteCall?.();
1241
+ try {
1242
+ const result = await httpClient.request(reqOpts);
1243
+ sideEffects?.onSuccess?.(result);
1244
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1245
+ } catch (err) {
1246
+ const transformedError = sdkTransformError(
1247
+ err,
1248
+ {
1249
+ spreadPathsToArguments: {},
1250
+ explicitPathsToArguments: { galleryId: "$[0]", itemIds: "$[1]" },
1251
+ singleArgumentUnchanged: false
1252
+ },
1253
+ ["galleryId", "itemIds"]
1254
+ );
1255
+ sideEffects?.onError?.(err);
1256
+ throw transformedError;
1257
+ }
1258
+ }
1259
+ async function createGalleryItem2(galleryId, item) {
1260
+ const { httpClient, sideEffects } = arguments[2];
1261
+ const payload = transformPaths2(
1262
+ renameKeysFromSDKRequestToRESTRequest({ galleryId, item }),
1263
+ [
1264
+ {
1265
+ transformFn: transformSDKImageToRESTImage,
1266
+ paths: [
1267
+ { path: "item.image.imageInfo" },
1268
+ { path: "item.secondaryMedia.image.imageInfo" }
1269
+ ]
1270
+ },
1271
+ {
1272
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
1273
+ paths: [{ path: "item.video.videoInfo" }]
1274
+ }
1275
+ ]
1276
+ );
1277
+ const reqOpts = createGalleryItem(payload);
1278
+ sideEffects?.onSiteCall?.();
1279
+ try {
1280
+ const result = await httpClient.request(reqOpts);
1281
+ sideEffects?.onSuccess?.(result);
1282
+ return renameKeysFromRESTResponseToSDKResponse(
1283
+ transformPaths2(result.data, [
1284
+ {
1285
+ transformFn: transformRESTImageToSDKImage,
1286
+ paths: [
1287
+ { path: "item.image.imageInfo" },
1288
+ { path: "item.secondaryMedia.image.imageInfo" }
1289
+ ]
1290
+ },
1291
+ {
1292
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
1293
+ paths: [{ path: "item.video.videoInfo" }]
1294
+ }
1295
+ ])
1296
+ )?.item;
1297
+ } catch (err) {
1298
+ const transformedError = sdkTransformError(
1299
+ err,
1300
+ {
1301
+ spreadPathsToArguments: {},
1302
+ explicitPathsToArguments: { galleryId: "$[0]", item: "$[1]" },
1303
+ singleArgumentUnchanged: false
1304
+ },
1305
+ ["galleryId", "item"]
1306
+ );
1307
+ sideEffects?.onError?.(err);
1308
+ throw transformedError;
1309
+ }
1310
+ }
1311
+ async function updateGalleryItem2(identifiers, item) {
1312
+ const { httpClient, sideEffects } = arguments[2];
1313
+ const payload = transformPaths2(
1314
+ renameKeysFromSDKRequestToRESTRequest({
1315
+ galleryId: identifiers?.galleryId,
1316
+ item: { ...item, id: identifiers?.itemId }
1317
+ }),
1318
+ [
1319
+ {
1320
+ transformFn: transformSDKImageToRESTImage,
1321
+ paths: [
1322
+ { path: "item.image.imageInfo" },
1323
+ { path: "item.secondaryMedia.image.imageInfo" }
1324
+ ]
1325
+ },
1326
+ {
1327
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
1328
+ paths: [{ path: "item.video.videoInfo" }]
1329
+ }
1330
+ ]
1331
+ );
1332
+ const reqOpts = updateGalleryItem(payload);
1333
+ sideEffects?.onSiteCall?.();
1334
+ try {
1335
+ const result = await httpClient.request(reqOpts);
1336
+ sideEffects?.onSuccess?.(result);
1337
+ return renameKeysFromRESTResponseToSDKResponse(
1338
+ transformPaths2(result.data, [
1339
+ {
1340
+ transformFn: transformRESTImageToSDKImage,
1341
+ paths: [
1342
+ { path: "item.image.imageInfo" },
1343
+ { path: "item.secondaryMedia.image.imageInfo" }
1344
+ ]
1345
+ },
1346
+ {
1347
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
1348
+ paths: [{ path: "item.video.videoInfo" }]
1349
+ }
1350
+ ])
1351
+ )?.item;
1352
+ } catch (err) {
1353
+ const transformedError = sdkTransformError(
1354
+ err,
1355
+ {
1356
+ spreadPathsToArguments: { item: "$[1]" },
1357
+ explicitPathsToArguments: {
1358
+ galleryId: "$[0].galleryId",
1359
+ "item.id": "$[0].itemId"
1360
+ },
1361
+ singleArgumentUnchanged: false
1362
+ },
1363
+ ["identifiers", "item"]
1364
+ );
1365
+ sideEffects?.onError?.(err);
1366
+ throw transformedError;
1367
+ }
1368
+ }
1369
+ async function deleteGalleryItem2(identifiers) {
1370
+ const { httpClient, sideEffects } = arguments[1];
1371
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1372
+ galleryId: identifiers?.galleryId,
1373
+ itemId: identifiers?.itemId
1374
+ });
1375
+ const reqOpts = deleteGalleryItem(payload);
1376
+ sideEffects?.onSiteCall?.();
1377
+ try {
1378
+ const result = await httpClient.request(reqOpts);
1379
+ sideEffects?.onSuccess?.(result);
1380
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1381
+ } catch (err) {
1382
+ const transformedError = sdkTransformError(
1383
+ err,
1384
+ {
1385
+ spreadPathsToArguments: {},
1386
+ explicitPathsToArguments: {
1387
+ galleryId: "$[0].galleryId",
1388
+ itemId: "$[0].itemId"
1389
+ },
1390
+ singleArgumentUnchanged: false
1391
+ },
1392
+ ["identifiers"]
1393
+ );
1394
+ sideEffects?.onError?.(err);
1395
+ throw transformedError;
1396
+ }
1397
+ }
1398
+ export {
1399
+ Enum,
1400
+ ImageType,
1401
+ LinkRel,
1402
+ LinkType,
1403
+ RCLabel,
1404
+ SearchIndexingNotificationState,
1405
+ State,
1406
+ Type,
1407
+ VideoType,
1408
+ WebhookIdentityType,
1409
+ bulkDeleteGalleryItems2 as bulkDeleteGalleryItems,
1410
+ createGallery2 as createGallery,
1411
+ createGalleryItem2 as createGalleryItem,
1412
+ deleteGallery2 as deleteGallery,
1413
+ deleteGalleryItem2 as deleteGalleryItem,
1414
+ deleteGalleryItems2 as deleteGalleryItems,
1415
+ getGallery2 as getGallery,
1416
+ getGalleryItem2 as getGalleryItem,
1417
+ listGalleries2 as listGalleries,
1418
+ listGalleryItems2 as listGalleryItems,
1419
+ updateGallery2 as updateGallery,
1420
+ updateGalleryItem2 as updateGalleryItem
1421
+ };
1422
+ //# sourceMappingURL=index.typings.mjs.map