@wix/auto_sdk_pro-gallery_pro-gallery 1.0.7 → 1.0.9

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 (134) hide show
  1. package/build/index.d.mts +213 -0
  2. package/build/index.d.ts +213 -0
  3. package/build/index.js +1834 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +1784 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/internal/index.d.mts +213 -0
  8. package/build/internal/index.d.ts +213 -0
  9. package/build/internal/index.js +1834 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +1784 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/build/internal/meta.d.mts +498 -0
  14. package/build/internal/meta.d.ts +498 -0
  15. package/build/internal/meta.js +1054 -0
  16. package/build/internal/meta.js.map +1 -0
  17. package/build/internal/meta.mjs +1016 -0
  18. package/build/internal/meta.mjs.map +1 -0
  19. package/build/{es/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → internal/pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.mts} +453 -511
  20. package/build/{cjs/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → internal/pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.ts} +453 -511
  21. package/build/meta.d.mts +498 -0
  22. package/build/meta.d.ts +498 -0
  23. package/build/meta.js +1054 -0
  24. package/build/meta.js.map +1 -0
  25. package/build/meta.mjs +1016 -0
  26. package/build/meta.mjs.map +1 -0
  27. package/build/{internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.mts} +453 -511
  28. package/build/{internal/es/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.ts} +453 -511
  29. package/package.json +13 -12
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
  40. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -69
  41. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
  42. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
  43. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -875
  44. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
  45. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
  46. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -256
  47. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
  48. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
  49. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -309
  50. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
  51. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -103
  52. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
  53. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1810
  54. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -850
  55. package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/package.json +0 -3
  66. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
  67. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -56
  68. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
  69. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
  70. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -860
  71. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
  72. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
  73. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -218
  74. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
  75. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
  76. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -284
  77. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
  78. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -100
  79. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
  80. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1810
  81. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -812
  82. package/build/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
  83. package/build/internal/cjs/index.d.ts +0 -1
  84. package/build/internal/cjs/index.js +0 -18
  85. package/build/internal/cjs/index.js.map +0 -1
  86. package/build/internal/cjs/index.typings.d.ts +0 -1
  87. package/build/internal/cjs/index.typings.js +0 -18
  88. package/build/internal/cjs/index.typings.js.map +0 -1
  89. package/build/internal/cjs/meta.d.ts +0 -1
  90. package/build/internal/cjs/meta.js +0 -18
  91. package/build/internal/cjs/meta.js.map +0 -1
  92. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
  93. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -69
  94. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
  95. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
  96. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -875
  97. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
  98. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
  99. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -256
  100. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
  101. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
  102. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -309
  103. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
  104. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -103
  105. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
  106. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1810
  107. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -850
  108. package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
  109. package/build/internal/es/index.d.ts +0 -1
  110. package/build/internal/es/index.js +0 -2
  111. package/build/internal/es/index.js.map +0 -1
  112. package/build/internal/es/index.typings.d.ts +0 -1
  113. package/build/internal/es/index.typings.js +0 -2
  114. package/build/internal/es/index.typings.js.map +0 -1
  115. package/build/internal/es/meta.d.ts +0 -1
  116. package/build/internal/es/meta.js +0 -2
  117. package/build/internal/es/meta.js.map +0 -1
  118. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
  119. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -56
  120. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
  121. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
  122. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -860
  123. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
  124. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
  125. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -218
  126. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
  127. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
  128. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -284
  129. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
  130. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -100
  131. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
  132. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1810
  133. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -812
  134. package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
package/build/index.js ADDED
@@ -0,0 +1,1834 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Enum: () => Enum,
24
+ ImageType: () => ImageType,
25
+ LinkRel: () => LinkRel,
26
+ LinkType: () => LinkType,
27
+ SearchIndexingNotificationState: () => SearchIndexingNotificationState,
28
+ State: () => State,
29
+ Type: () => Type,
30
+ VideoType: () => VideoType,
31
+ WebhookIdentityType: () => WebhookIdentityType,
32
+ bulkDeleteGalleryItems: () => bulkDeleteGalleryItems4,
33
+ createGallery: () => createGallery4,
34
+ createGalleryItem: () => createGalleryItem4,
35
+ deleteGallery: () => deleteGallery4,
36
+ deleteGalleryItem: () => deleteGalleryItem4,
37
+ deleteGalleryItems: () => deleteGalleryItems4,
38
+ getGallery: () => getGallery4,
39
+ getGalleryItem: () => getGalleryItem4,
40
+ listGalleries: () => listGalleries4,
41
+ listGalleryItems: () => listGalleryItems4,
42
+ onGalleryCreated: () => onGalleryCreated2,
43
+ onGalleryDeleted: () => onGalleryDeleted2,
44
+ onGalleryItemCreated: () => onGalleryItemCreated2,
45
+ onGalleryItemDeleted: () => onGalleryItemDeleted2,
46
+ onGalleryItemUpdated: () => onGalleryItemUpdated2,
47
+ onGalleryUpdated: () => onGalleryUpdated2,
48
+ updateGallery: () => updateGallery4,
49
+ updateGalleryItem: () => updateGalleryItem4
50
+ });
51
+ module.exports = __toCommonJS(index_exports);
52
+
53
+ // src/pro-gallery-v2-gallery-pro-gallery.public.ts
54
+ var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
55
+ var import_float3 = require("@wix/sdk-runtime/transformations/float");
56
+ var import_image3 = require("@wix/sdk-runtime/transformations/image");
57
+ var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
58
+ var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
59
+ var import_video_v23 = require("@wix/sdk-runtime/transformations/video-v2");
60
+ var import_sdk_types = require("@wix/sdk-types");
61
+
62
+ // src/pro-gallery-v2-gallery-pro-gallery.universal.ts
63
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
64
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
65
+
66
+ // src/pro-gallery-v2-gallery-pro-gallery.http.ts
67
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
68
+ var import_float = require("@wix/sdk-runtime/transformations/float");
69
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
70
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
71
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
72
+ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
73
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
74
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
75
+ function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
76
+ const domainToMappings = {
77
+ _: [
78
+ {
79
+ srcPath: "/_api/pro-gallery-server",
80
+ destPath: ""
81
+ }
82
+ ],
83
+ "manage._base_domain_": [
84
+ {
85
+ srcPath: "/_api/pro-gallery-server",
86
+ destPath: ""
87
+ }
88
+ ],
89
+ "www._base_domain_": [
90
+ {
91
+ srcPath: "/_api/pro-gallery-server",
92
+ destPath: ""
93
+ }
94
+ ],
95
+ "editor._base_domain_": [
96
+ {
97
+ srcPath: "/_api/pro-gallery-server",
98
+ destPath: ""
99
+ }
100
+ ],
101
+ "blocks._base_domain_": [
102
+ {
103
+ srcPath: "/_api/pro-gallery-server",
104
+ destPath: ""
105
+ }
106
+ ],
107
+ "create.editorx": [
108
+ {
109
+ srcPath: "/_api/pro-gallery-server",
110
+ destPath: ""
111
+ }
112
+ ],
113
+ "progallery.wixapps.net": [
114
+ {
115
+ srcPath: "/_api/pro-gallery-server",
116
+ destPath: ""
117
+ }
118
+ ],
119
+ "www.wixapis.com": [
120
+ {
121
+ srcPath: "/progallery",
122
+ destPath: ""
123
+ }
124
+ ],
125
+ "*.dev.wix-code.com": [
126
+ {
127
+ srcPath: "/_api/pro-gallery-server",
128
+ destPath: ""
129
+ }
130
+ ],
131
+ "api._api_base_domain_": [
132
+ {
133
+ srcPath: "/prime-server-proxy",
134
+ destPath: ""
135
+ }
136
+ ]
137
+ };
138
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
139
+ }
140
+ var PACKAGE_NAME = "@wix/auto_sdk_pro-gallery_pro-gallery";
141
+ function listGalleries(payload) {
142
+ function __listGalleries({ host }) {
143
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
144
+ {
145
+ transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
146
+ paths: [{ path: "fields" }]
147
+ }
148
+ ]);
149
+ const metadata = {
150
+ entityFqdn: "wix.pro_gallery.v2.gallery",
151
+ method: "GET",
152
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.ListGalleries",
153
+ packageName: PACKAGE_NAME,
154
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
155
+ protoPath: "/v2/galleries",
156
+ data: serializedData,
157
+ host
158
+ }),
159
+ params: (0, import_rest_modules.toURLSearchParams)(serializedData),
160
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
161
+ {
162
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
163
+ paths: [
164
+ { path: "galleries.sortOrder" },
165
+ { path: "galleries.items.sortOrder" },
166
+ { path: "galleries.items.image.focalPoint.x" },
167
+ { path: "galleries.items.image.focalPoint.y" },
168
+ { path: "galleries.items.secondaryMedia.image.focalPoint.x" },
169
+ { path: "galleries.items.secondaryMedia.image.focalPoint.y" },
170
+ { path: "galleries.items.image.unsharpMasking.amount" },
171
+ { path: "galleries.items.image.unsharpMasking.radius" },
172
+ { path: "galleries.items.image.unsharpMasking.threshold" },
173
+ {
174
+ path: "galleries.items.secondaryMedia.image.unsharpMasking.amount"
175
+ },
176
+ {
177
+ path: "galleries.items.secondaryMedia.image.unsharpMasking.radius"
178
+ },
179
+ {
180
+ path: "galleries.items.secondaryMedia.image.unsharpMasking.threshold"
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
186
+ paths: [
187
+ { path: "galleries.createdDate" },
188
+ { path: "galleries.items.createdDate" },
189
+ { path: "galleries.items.updatedDate" },
190
+ { path: "galleries.items.image.imageInfo.urlExpirationDate" },
191
+ { path: "galleries.items.video.videoInfo.urlExpirationDate" },
192
+ {
193
+ path: "galleries.items.video.videoInfo.resolutions.poster.urlExpirationDate"
194
+ },
195
+ {
196
+ path: "galleries.items.video.videoInfo.posters.urlExpirationDate"
197
+ },
198
+ {
199
+ path: "galleries.items.secondaryMedia.image.imageInfo.urlExpirationDate"
200
+ }
201
+ ]
202
+ }
203
+ ])
204
+ };
205
+ return metadata;
206
+ }
207
+ return __listGalleries;
208
+ }
209
+ function getGallery(payload) {
210
+ function __getGallery({ host }) {
211
+ const metadata = {
212
+ entityFqdn: "wix.pro_gallery.v2.gallery",
213
+ method: "GET",
214
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.GetGallery",
215
+ packageName: PACKAGE_NAME,
216
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
217
+ protoPath: "/v2/galleries/{galleryId}",
218
+ data: payload,
219
+ host
220
+ }),
221
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
222
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
223
+ {
224
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
225
+ paths: [
226
+ { path: "gallery.sortOrder" },
227
+ { path: "gallery.items.sortOrder" },
228
+ { path: "gallery.items.image.focalPoint.x" },
229
+ { path: "gallery.items.image.focalPoint.y" },
230
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
231
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
232
+ { path: "gallery.items.image.unsharpMasking.amount" },
233
+ { path: "gallery.items.image.unsharpMasking.radius" },
234
+ { path: "gallery.items.image.unsharpMasking.threshold" },
235
+ {
236
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
237
+ },
238
+ {
239
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
240
+ },
241
+ {
242
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
248
+ paths: [
249
+ { path: "gallery.createdDate" },
250
+ { path: "gallery.items.createdDate" },
251
+ { path: "gallery.items.updatedDate" },
252
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
253
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
254
+ {
255
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
256
+ },
257
+ {
258
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
259
+ },
260
+ {
261
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
262
+ }
263
+ ]
264
+ }
265
+ ])
266
+ };
267
+ return metadata;
268
+ }
269
+ return __getGallery;
270
+ }
271
+ function listGalleryItems(payload) {
272
+ function __listGalleryItems({ host }) {
273
+ const metadata = {
274
+ entityFqdn: "wix.pro_gallery.v2.gallery",
275
+ method: "GET",
276
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.ListGalleryItems",
277
+ packageName: PACKAGE_NAME,
278
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
279
+ protoPath: "/v2/galleries/{galleryId}/items",
280
+ data: payload,
281
+ host
282
+ }),
283
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
284
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
285
+ {
286
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
287
+ paths: [
288
+ { path: "items.sortOrder" },
289
+ { path: "items.image.focalPoint.x" },
290
+ { path: "items.image.focalPoint.y" },
291
+ { path: "items.secondaryMedia.image.focalPoint.x" },
292
+ { path: "items.secondaryMedia.image.focalPoint.y" },
293
+ { path: "items.image.unsharpMasking.amount" },
294
+ { path: "items.image.unsharpMasking.radius" },
295
+ { path: "items.image.unsharpMasking.threshold" },
296
+ { path: "items.secondaryMedia.image.unsharpMasking.amount" },
297
+ { path: "items.secondaryMedia.image.unsharpMasking.radius" },
298
+ { path: "items.secondaryMedia.image.unsharpMasking.threshold" }
299
+ ]
300
+ },
301
+ {
302
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
303
+ paths: [
304
+ { path: "items.createdDate" },
305
+ { path: "items.updatedDate" },
306
+ { path: "items.image.imageInfo.urlExpirationDate" },
307
+ { path: "items.video.videoInfo.urlExpirationDate" },
308
+ {
309
+ path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
310
+ },
311
+ { path: "items.video.videoInfo.posters.urlExpirationDate" },
312
+ {
313
+ path: "items.secondaryMedia.image.imageInfo.urlExpirationDate"
314
+ }
315
+ ]
316
+ }
317
+ ])
318
+ };
319
+ return metadata;
320
+ }
321
+ return __listGalleryItems;
322
+ }
323
+ function getGalleryItem(payload) {
324
+ function __getGalleryItem({ host }) {
325
+ const metadata = {
326
+ entityFqdn: "wix.pro_gallery.v2.gallery",
327
+ method: "GET",
328
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.GetGalleryItem",
329
+ packageName: PACKAGE_NAME,
330
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
331
+ protoPath: "/v2/galleries/{galleryId}/items/{itemId}",
332
+ data: payload,
333
+ host
334
+ }),
335
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
336
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
337
+ {
338
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
339
+ paths: [
340
+ { path: "item.sortOrder" },
341
+ { path: "item.image.focalPoint.x" },
342
+ { path: "item.image.focalPoint.y" },
343
+ { path: "item.secondaryMedia.image.focalPoint.x" },
344
+ { path: "item.secondaryMedia.image.focalPoint.y" },
345
+ { path: "item.image.unsharpMasking.amount" },
346
+ { path: "item.image.unsharpMasking.radius" },
347
+ { path: "item.image.unsharpMasking.threshold" },
348
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
349
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
350
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
351
+ ]
352
+ },
353
+ {
354
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
355
+ paths: [
356
+ { path: "item.createdDate" },
357
+ { path: "item.updatedDate" },
358
+ { path: "item.image.imageInfo.urlExpirationDate" },
359
+ { path: "item.video.videoInfo.urlExpirationDate" },
360
+ {
361
+ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
362
+ },
363
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
364
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
365
+ ]
366
+ }
367
+ ])
368
+ };
369
+ return metadata;
370
+ }
371
+ return __getGalleryItem;
372
+ }
373
+ function createGallery(payload) {
374
+ function __createGallery({ host }) {
375
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
376
+ {
377
+ transformFn: import_float.transformSDKFloatToRESTFloat,
378
+ paths: [
379
+ { path: "gallery.sortOrder" },
380
+ { path: "gallery.items.sortOrder" },
381
+ { path: "gallery.items.image.focalPoint.x" },
382
+ { path: "gallery.items.image.focalPoint.y" },
383
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
384
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
385
+ { path: "gallery.items.image.unsharpMasking.amount" },
386
+ { path: "gallery.items.image.unsharpMasking.radius" },
387
+ { path: "gallery.items.image.unsharpMasking.threshold" },
388
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.amount" },
389
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.radius" },
390
+ {
391
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
392
+ }
393
+ ]
394
+ },
395
+ {
396
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
397
+ paths: [
398
+ { path: "gallery.createdDate" },
399
+ { path: "gallery.items.createdDate" },
400
+ { path: "gallery.items.updatedDate" },
401
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
402
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
403
+ {
404
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
405
+ },
406
+ { path: "gallery.items.video.videoInfo.posters.urlExpirationDate" },
407
+ {
408
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
409
+ }
410
+ ]
411
+ }
412
+ ]);
413
+ const metadata = {
414
+ entityFqdn: "wix.pro_gallery.v2.gallery",
415
+ method: "POST",
416
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.CreateGallery",
417
+ packageName: PACKAGE_NAME,
418
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
419
+ protoPath: "/v2/galleries",
420
+ data: serializedData,
421
+ host
422
+ }),
423
+ data: serializedData,
424
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
425
+ {
426
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
427
+ paths: [
428
+ { path: "gallery.sortOrder" },
429
+ { path: "gallery.items.sortOrder" },
430
+ { path: "gallery.items.image.focalPoint.x" },
431
+ { path: "gallery.items.image.focalPoint.y" },
432
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
433
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
434
+ { path: "gallery.items.image.unsharpMasking.amount" },
435
+ { path: "gallery.items.image.unsharpMasking.radius" },
436
+ { path: "gallery.items.image.unsharpMasking.threshold" },
437
+ {
438
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
439
+ },
440
+ {
441
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
442
+ },
443
+ {
444
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
450
+ paths: [
451
+ { path: "gallery.createdDate" },
452
+ { path: "gallery.items.createdDate" },
453
+ { path: "gallery.items.updatedDate" },
454
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
455
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
456
+ {
457
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
458
+ },
459
+ {
460
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
461
+ },
462
+ {
463
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
464
+ }
465
+ ]
466
+ }
467
+ ])
468
+ };
469
+ return metadata;
470
+ }
471
+ return __createGallery;
472
+ }
473
+ function updateGallery(payload) {
474
+ function __updateGallery({ host }) {
475
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
476
+ {
477
+ transformFn: import_float.transformSDKFloatToRESTFloat,
478
+ paths: [
479
+ { path: "gallery.sortOrder" },
480
+ { path: "gallery.items.sortOrder" },
481
+ { path: "gallery.items.image.focalPoint.x" },
482
+ { path: "gallery.items.image.focalPoint.y" },
483
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
484
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
485
+ { path: "gallery.items.image.unsharpMasking.amount" },
486
+ { path: "gallery.items.image.unsharpMasking.radius" },
487
+ { path: "gallery.items.image.unsharpMasking.threshold" },
488
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.amount" },
489
+ { path: "gallery.items.secondaryMedia.image.unsharpMasking.radius" },
490
+ {
491
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
492
+ }
493
+ ]
494
+ },
495
+ {
496
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
497
+ paths: [
498
+ { path: "gallery.createdDate" },
499
+ { path: "gallery.items.createdDate" },
500
+ { path: "gallery.items.updatedDate" },
501
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
502
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
503
+ {
504
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
505
+ },
506
+ { path: "gallery.items.video.videoInfo.posters.urlExpirationDate" },
507
+ {
508
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
509
+ }
510
+ ]
511
+ }
512
+ ]);
513
+ const metadata = {
514
+ entityFqdn: "wix.pro_gallery.v2.gallery",
515
+ method: "PATCH",
516
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.UpdateGallery",
517
+ packageName: PACKAGE_NAME,
518
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
519
+ protoPath: "/v2/galleries/{gallery.id}",
520
+ data: serializedData,
521
+ host
522
+ }),
523
+ data: serializedData,
524
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
525
+ {
526
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
527
+ paths: [
528
+ { path: "gallery.sortOrder" },
529
+ { path: "gallery.items.sortOrder" },
530
+ { path: "gallery.items.image.focalPoint.x" },
531
+ { path: "gallery.items.image.focalPoint.y" },
532
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
533
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
534
+ { path: "gallery.items.image.unsharpMasking.amount" },
535
+ { path: "gallery.items.image.unsharpMasking.radius" },
536
+ { path: "gallery.items.image.unsharpMasking.threshold" },
537
+ {
538
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
539
+ },
540
+ {
541
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
542
+ },
543
+ {
544
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
545
+ }
546
+ ]
547
+ },
548
+ {
549
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
550
+ paths: [
551
+ { path: "gallery.createdDate" },
552
+ { path: "gallery.items.createdDate" },
553
+ { path: "gallery.items.updatedDate" },
554
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
555
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
556
+ {
557
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
558
+ },
559
+ {
560
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
561
+ },
562
+ {
563
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
564
+ }
565
+ ]
566
+ }
567
+ ])
568
+ };
569
+ return metadata;
570
+ }
571
+ return __updateGallery;
572
+ }
573
+ function deleteGallery(payload) {
574
+ function __deleteGallery({ host }) {
575
+ const metadata = {
576
+ entityFqdn: "wix.pro_gallery.v2.gallery",
577
+ method: "DELETE",
578
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.DeleteGallery",
579
+ packageName: PACKAGE_NAME,
580
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
581
+ protoPath: "/v2/galleries/{galleryId}",
582
+ data: payload,
583
+ host
584
+ }),
585
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
586
+ };
587
+ return metadata;
588
+ }
589
+ return __deleteGallery;
590
+ }
591
+ function deleteGalleryItems(payload) {
592
+ function __deleteGalleryItems({ host }) {
593
+ const metadata = {
594
+ entityFqdn: "wix.pro_gallery.v2.gallery",
595
+ method: "DELETE",
596
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItems",
597
+ packageName: PACKAGE_NAME,
598
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
599
+ protoPath: "/v2/galleries/{galleryId}/items",
600
+ data: payload,
601
+ host
602
+ }),
603
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
604
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
605
+ {
606
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
607
+ paths: [
608
+ { path: "gallery.sortOrder" },
609
+ { path: "gallery.items.sortOrder" },
610
+ { path: "gallery.items.image.focalPoint.x" },
611
+ { path: "gallery.items.image.focalPoint.y" },
612
+ { path: "gallery.items.secondaryMedia.image.focalPoint.x" },
613
+ { path: "gallery.items.secondaryMedia.image.focalPoint.y" },
614
+ { path: "gallery.items.image.unsharpMasking.amount" },
615
+ { path: "gallery.items.image.unsharpMasking.radius" },
616
+ { path: "gallery.items.image.unsharpMasking.threshold" },
617
+ {
618
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.amount"
619
+ },
620
+ {
621
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.radius"
622
+ },
623
+ {
624
+ path: "gallery.items.secondaryMedia.image.unsharpMasking.threshold"
625
+ }
626
+ ]
627
+ },
628
+ {
629
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
630
+ paths: [
631
+ { path: "gallery.createdDate" },
632
+ { path: "gallery.items.createdDate" },
633
+ { path: "gallery.items.updatedDate" },
634
+ { path: "gallery.items.image.imageInfo.urlExpirationDate" },
635
+ { path: "gallery.items.video.videoInfo.urlExpirationDate" },
636
+ {
637
+ path: "gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate"
638
+ },
639
+ {
640
+ path: "gallery.items.video.videoInfo.posters.urlExpirationDate"
641
+ },
642
+ {
643
+ path: "gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate"
644
+ }
645
+ ]
646
+ }
647
+ ])
648
+ };
649
+ return metadata;
650
+ }
651
+ return __deleteGalleryItems;
652
+ }
653
+ function bulkDeleteGalleryItems(payload) {
654
+ function __bulkDeleteGalleryItems({ host }) {
655
+ const metadata = {
656
+ entityFqdn: "wix.pro_gallery.v2.gallery",
657
+ method: "POST",
658
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.BulkDeleteGalleryItems",
659
+ packageName: PACKAGE_NAME,
660
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
661
+ protoPath: "/v2/galleries/{galleryId}/items/delete",
662
+ data: payload,
663
+ host
664
+ }),
665
+ data: payload
666
+ };
667
+ return metadata;
668
+ }
669
+ return __bulkDeleteGalleryItems;
670
+ }
671
+ function createGalleryItem(payload) {
672
+ function __createGalleryItem({ host }) {
673
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
674
+ {
675
+ transformFn: import_float.transformSDKFloatToRESTFloat,
676
+ paths: [
677
+ { path: "item.sortOrder" },
678
+ { path: "item.image.focalPoint.x" },
679
+ { path: "item.image.focalPoint.y" },
680
+ { path: "item.secondaryMedia.image.focalPoint.x" },
681
+ { path: "item.secondaryMedia.image.focalPoint.y" },
682
+ { path: "item.image.unsharpMasking.amount" },
683
+ { path: "item.image.unsharpMasking.radius" },
684
+ { path: "item.image.unsharpMasking.threshold" },
685
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
686
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
687
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
688
+ ]
689
+ },
690
+ {
691
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
692
+ paths: [
693
+ { path: "item.createdDate" },
694
+ { path: "item.updatedDate" },
695
+ { path: "item.image.imageInfo.urlExpirationDate" },
696
+ { path: "item.video.videoInfo.urlExpirationDate" },
697
+ { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
698
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
699
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
700
+ ]
701
+ }
702
+ ]);
703
+ const metadata = {
704
+ entityFqdn: "wix.pro_gallery.v2.gallery",
705
+ method: "POST",
706
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.CreateGalleryItem",
707
+ packageName: PACKAGE_NAME,
708
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
709
+ protoPath: "/v2/galleries/{galleryId}/items",
710
+ data: serializedData,
711
+ host
712
+ }),
713
+ data: serializedData,
714
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
715
+ {
716
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
717
+ paths: [
718
+ { path: "item.sortOrder" },
719
+ { path: "item.image.focalPoint.x" },
720
+ { path: "item.image.focalPoint.y" },
721
+ { path: "item.secondaryMedia.image.focalPoint.x" },
722
+ { path: "item.secondaryMedia.image.focalPoint.y" },
723
+ { path: "item.image.unsharpMasking.amount" },
724
+ { path: "item.image.unsharpMasking.radius" },
725
+ { path: "item.image.unsharpMasking.threshold" },
726
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
727
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
728
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
729
+ ]
730
+ },
731
+ {
732
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
733
+ paths: [
734
+ { path: "item.createdDate" },
735
+ { path: "item.updatedDate" },
736
+ { path: "item.image.imageInfo.urlExpirationDate" },
737
+ { path: "item.video.videoInfo.urlExpirationDate" },
738
+ {
739
+ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
740
+ },
741
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
742
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
743
+ ]
744
+ }
745
+ ])
746
+ };
747
+ return metadata;
748
+ }
749
+ return __createGalleryItem;
750
+ }
751
+ function updateGalleryItem(payload) {
752
+ function __updateGalleryItem({ host }) {
753
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
754
+ {
755
+ transformFn: import_float.transformSDKFloatToRESTFloat,
756
+ paths: [
757
+ { path: "item.sortOrder" },
758
+ { path: "item.image.focalPoint.x" },
759
+ { path: "item.image.focalPoint.y" },
760
+ { path: "item.secondaryMedia.image.focalPoint.x" },
761
+ { path: "item.secondaryMedia.image.focalPoint.y" },
762
+ { path: "item.image.unsharpMasking.amount" },
763
+ { path: "item.image.unsharpMasking.radius" },
764
+ { path: "item.image.unsharpMasking.threshold" },
765
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
766
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
767
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
768
+ ]
769
+ },
770
+ {
771
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
772
+ paths: [
773
+ { path: "item.createdDate" },
774
+ { path: "item.updatedDate" },
775
+ { path: "item.image.imageInfo.urlExpirationDate" },
776
+ { path: "item.video.videoInfo.urlExpirationDate" },
777
+ { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
778
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
779
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
780
+ ]
781
+ }
782
+ ]);
783
+ const metadata = {
784
+ entityFqdn: "wix.pro_gallery.v2.gallery",
785
+ method: "PATCH",
786
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.UpdateGalleryItem",
787
+ packageName: PACKAGE_NAME,
788
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
789
+ protoPath: "/v2/galleries/{galleryId}/items/{item.id}",
790
+ data: serializedData,
791
+ host
792
+ }),
793
+ data: serializedData,
794
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
795
+ {
796
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
797
+ paths: [
798
+ { path: "item.sortOrder" },
799
+ { path: "item.image.focalPoint.x" },
800
+ { path: "item.image.focalPoint.y" },
801
+ { path: "item.secondaryMedia.image.focalPoint.x" },
802
+ { path: "item.secondaryMedia.image.focalPoint.y" },
803
+ { path: "item.image.unsharpMasking.amount" },
804
+ { path: "item.image.unsharpMasking.radius" },
805
+ { path: "item.image.unsharpMasking.threshold" },
806
+ { path: "item.secondaryMedia.image.unsharpMasking.amount" },
807
+ { path: "item.secondaryMedia.image.unsharpMasking.radius" },
808
+ { path: "item.secondaryMedia.image.unsharpMasking.threshold" }
809
+ ]
810
+ },
811
+ {
812
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
813
+ paths: [
814
+ { path: "item.createdDate" },
815
+ { path: "item.updatedDate" },
816
+ { path: "item.image.imageInfo.urlExpirationDate" },
817
+ { path: "item.video.videoInfo.urlExpirationDate" },
818
+ {
819
+ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
820
+ },
821
+ { path: "item.video.videoInfo.posters.urlExpirationDate" },
822
+ { path: "item.secondaryMedia.image.imageInfo.urlExpirationDate" }
823
+ ]
824
+ }
825
+ ])
826
+ };
827
+ return metadata;
828
+ }
829
+ return __updateGalleryItem;
830
+ }
831
+ function deleteGalleryItem(payload) {
832
+ function __deleteGalleryItem({ host }) {
833
+ const metadata = {
834
+ entityFqdn: "wix.pro_gallery.v2.gallery",
835
+ method: "DELETE",
836
+ methodFqn: "com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItem",
837
+ packageName: PACKAGE_NAME,
838
+ url: resolveComWixpressExposureProgalleryProGalleryUrl({
839
+ protoPath: "/v2/galleries/{galleryId}/items/{itemId}",
840
+ data: payload,
841
+ host
842
+ }),
843
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
844
+ };
845
+ return metadata;
846
+ }
847
+ return __deleteGalleryItem;
848
+ }
849
+
850
+ // src/pro-gallery-v2-gallery-pro-gallery.universal.ts
851
+ var import_image = require("@wix/sdk-runtime/transformations/image");
852
+ var import_image2 = require("@wix/sdk-runtime/transformations/image");
853
+ var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
854
+ var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
855
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
856
+ var LinkType = /* @__PURE__ */ ((LinkType2) => {
857
+ LinkType2["UNDEFINED"] = "UNDEFINED";
858
+ LinkType2["EXTERNAL"] = "EXTERNAL";
859
+ LinkType2["INTERNAL"] = "INTERNAL";
860
+ return LinkType2;
861
+ })(LinkType || {});
862
+ var LinkRel = /* @__PURE__ */ ((LinkRel2) => {
863
+ LinkRel2["unknown_link_rel"] = "unknown_link_rel";
864
+ LinkRel2["nofollow"] = "nofollow";
865
+ LinkRel2["noopener"] = "noopener";
866
+ LinkRel2["noreferrer"] = "noreferrer";
867
+ LinkRel2["sponsored"] = "sponsored";
868
+ return LinkRel2;
869
+ })(LinkRel || {});
870
+ var Type = /* @__PURE__ */ ((Type2) => {
871
+ Type2["UNDEFINED"] = "UNDEFINED";
872
+ Type2["IMAGE"] = "IMAGE";
873
+ Type2["VIDEO"] = "VIDEO";
874
+ Type2["TEXT"] = "TEXT";
875
+ return Type2;
876
+ })(Type || {});
877
+ var ImageType = /* @__PURE__ */ ((ImageType2) => {
878
+ ImageType2["UNDEFINED"] = "UNDEFINED";
879
+ ImageType2["WIX_MEDIA"] = "WIX_MEDIA";
880
+ ImageType2["EXTERNAL"] = "EXTERNAL";
881
+ return ImageType2;
882
+ })(ImageType || {});
883
+ var VideoType = /* @__PURE__ */ ((VideoType2) => {
884
+ VideoType2["UNDEFINED"] = "UNDEFINED";
885
+ VideoType2["WIX_MEDIA"] = "WIX_MEDIA";
886
+ VideoType2["YOUTUBE"] = "YOUTUBE";
887
+ VideoType2["VIMEO"] = "VIMEO";
888
+ return VideoType2;
889
+ })(VideoType || {});
890
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
891
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
892
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
893
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
894
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
895
+ WebhookIdentityType2["APP"] = "APP";
896
+ return WebhookIdentityType2;
897
+ })(WebhookIdentityType || {});
898
+ var State = /* @__PURE__ */ ((State2) => {
899
+ State2["UNDEFINED"] = "UNDEFINED";
900
+ State2["SAVED"] = "SAVED";
901
+ State2["PUBLISHED"] = "PUBLISHED";
902
+ return State2;
903
+ })(State || {});
904
+ var Enum = /* @__PURE__ */ ((Enum2) => {
905
+ Enum2["UNKNOWN"] = "UNKNOWN";
906
+ Enum2["PROTECTED"] = "PROTECTED";
907
+ Enum2["PRIVATE"] = "PRIVATE";
908
+ Enum2["PUBLIC"] = "PUBLIC";
909
+ Enum2["UNCHANGED"] = "UNCHANGED";
910
+ Enum2["GROUP_PROTECTED"] = "GROUP_PROTECTED";
911
+ return Enum2;
912
+ })(Enum || {});
913
+ var SearchIndexingNotificationState = /* @__PURE__ */ ((SearchIndexingNotificationState2) => {
914
+ SearchIndexingNotificationState2["Unknown"] = "Unknown";
915
+ SearchIndexingNotificationState2["Off"] = "Off";
916
+ SearchIndexingNotificationState2["On"] = "On";
917
+ return SearchIndexingNotificationState2;
918
+ })(SearchIndexingNotificationState || {});
919
+ async function listGalleries2(options) {
920
+ const { httpClient, sideEffects } = arguments[1];
921
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
922
+ itemLimit: options?.itemLimit,
923
+ offset: options?.offset,
924
+ limit: options?.limit
925
+ });
926
+ const reqOpts = listGalleries(payload);
927
+ sideEffects?.onSiteCall?.();
928
+ try {
929
+ const result = await httpClient.request(reqOpts);
930
+ sideEffects?.onSuccess?.(result);
931
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
932
+ (0, import_transform_paths2.transformPaths)(result.data, [
933
+ {
934
+ transformFn: import_image2.transformRESTImageToSDKImage,
935
+ paths: [
936
+ { path: "galleries.items.image.imageInfo" },
937
+ { path: "galleries.items.secondaryMedia.image.imageInfo" }
938
+ ]
939
+ },
940
+ {
941
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
942
+ paths: [{ path: "galleries.items.video.videoInfo" }]
943
+ }
944
+ ])
945
+ );
946
+ } catch (err) {
947
+ const transformedError = (0, import_transform_error.transformError)(
948
+ err,
949
+ {
950
+ spreadPathsToArguments: {},
951
+ explicitPathsToArguments: {
952
+ itemLimit: "$[0].itemLimit",
953
+ offset: "$[0].offset",
954
+ limit: "$[0].limit"
955
+ },
956
+ singleArgumentUnchanged: false
957
+ },
958
+ ["options"]
959
+ );
960
+ sideEffects?.onError?.(err);
961
+ throw transformedError;
962
+ }
963
+ }
964
+ async function getGallery2(galleryId, options) {
965
+ const { httpClient, sideEffects } = arguments[2];
966
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
967
+ galleryId,
968
+ itemOffset: options?.itemOffset,
969
+ itemLimit: options?.itemLimit
970
+ });
971
+ const reqOpts = getGallery(payload);
972
+ sideEffects?.onSiteCall?.();
973
+ try {
974
+ const result = await httpClient.request(reqOpts);
975
+ sideEffects?.onSuccess?.(result);
976
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
977
+ (0, import_transform_paths2.transformPaths)(result.data, [
978
+ {
979
+ transformFn: import_image2.transformRESTImageToSDKImage,
980
+ paths: [
981
+ { path: "gallery.items.image.imageInfo" },
982
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
983
+ ]
984
+ },
985
+ {
986
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
987
+ paths: [{ path: "gallery.items.video.videoInfo" }]
988
+ }
989
+ ])
990
+ )?.gallery;
991
+ } catch (err) {
992
+ const transformedError = (0, import_transform_error.transformError)(
993
+ err,
994
+ {
995
+ spreadPathsToArguments: {},
996
+ explicitPathsToArguments: {
997
+ galleryId: "$[0]",
998
+ itemOffset: "$[1].itemOffset",
999
+ itemLimit: "$[1].itemLimit"
1000
+ },
1001
+ singleArgumentUnchanged: false
1002
+ },
1003
+ ["galleryId", "options"]
1004
+ );
1005
+ sideEffects?.onError?.(err);
1006
+ throw transformedError;
1007
+ }
1008
+ }
1009
+ async function listGalleryItems2(galleryId, options) {
1010
+ const { httpClient, sideEffects } = arguments[2];
1011
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1012
+ galleryId,
1013
+ itemOffset: options?.itemOffset,
1014
+ itemLimit: options?.itemLimit
1015
+ });
1016
+ const reqOpts = listGalleryItems(payload);
1017
+ sideEffects?.onSiteCall?.();
1018
+ try {
1019
+ const result = await httpClient.request(reqOpts);
1020
+ sideEffects?.onSuccess?.(result);
1021
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1022
+ (0, import_transform_paths2.transformPaths)(result.data, [
1023
+ {
1024
+ transformFn: import_image2.transformRESTImageToSDKImage,
1025
+ paths: [
1026
+ { path: "items.image.imageInfo" },
1027
+ { path: "items.secondaryMedia.image.imageInfo" }
1028
+ ]
1029
+ },
1030
+ {
1031
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1032
+ paths: [{ path: "items.video.videoInfo" }]
1033
+ }
1034
+ ])
1035
+ );
1036
+ } catch (err) {
1037
+ const transformedError = (0, import_transform_error.transformError)(
1038
+ err,
1039
+ {
1040
+ spreadPathsToArguments: {},
1041
+ explicitPathsToArguments: {
1042
+ galleryId: "$[0]",
1043
+ itemOffset: "$[1].itemOffset",
1044
+ itemLimit: "$[1].itemLimit"
1045
+ },
1046
+ singleArgumentUnchanged: false
1047
+ },
1048
+ ["galleryId", "options"]
1049
+ );
1050
+ sideEffects?.onError?.(err);
1051
+ throw transformedError;
1052
+ }
1053
+ }
1054
+ async function getGalleryItem2(identifiers) {
1055
+ const { httpClient, sideEffects } = arguments[1];
1056
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1057
+ galleryId: identifiers?.galleryId,
1058
+ itemId: identifiers?.itemId
1059
+ });
1060
+ const reqOpts = getGalleryItem(payload);
1061
+ sideEffects?.onSiteCall?.();
1062
+ try {
1063
+ const result = await httpClient.request(reqOpts);
1064
+ sideEffects?.onSuccess?.(result);
1065
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1066
+ (0, import_transform_paths2.transformPaths)(result.data, [
1067
+ {
1068
+ transformFn: import_image2.transformRESTImageToSDKImage,
1069
+ paths: [
1070
+ { path: "item.image.imageInfo" },
1071
+ { path: "item.secondaryMedia.image.imageInfo" }
1072
+ ]
1073
+ },
1074
+ {
1075
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1076
+ paths: [{ path: "item.video.videoInfo" }]
1077
+ }
1078
+ ])
1079
+ )?.item;
1080
+ } catch (err) {
1081
+ const transformedError = (0, import_transform_error.transformError)(
1082
+ err,
1083
+ {
1084
+ spreadPathsToArguments: {},
1085
+ explicitPathsToArguments: {
1086
+ galleryId: "$[0].galleryId",
1087
+ itemId: "$[0].itemId"
1088
+ },
1089
+ singleArgumentUnchanged: false
1090
+ },
1091
+ ["identifiers"]
1092
+ );
1093
+ sideEffects?.onError?.(err);
1094
+ throw transformedError;
1095
+ }
1096
+ }
1097
+ async function createGallery2(options) {
1098
+ const { httpClient, sideEffects } = arguments[1];
1099
+ const payload = (0, import_transform_paths2.transformPaths)(
1100
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1101
+ gallery: options?.gallery,
1102
+ cloneFromGalleryId: options?.cloneFromGalleryId
1103
+ }),
1104
+ [
1105
+ {
1106
+ transformFn: import_image.transformSDKImageToRESTImage,
1107
+ paths: [
1108
+ { path: "gallery.items.image.imageInfo" },
1109
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1110
+ ]
1111
+ },
1112
+ {
1113
+ transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1114
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1115
+ }
1116
+ ]
1117
+ );
1118
+ const reqOpts = createGallery(payload);
1119
+ sideEffects?.onSiteCall?.();
1120
+ try {
1121
+ const result = await httpClient.request(reqOpts);
1122
+ sideEffects?.onSuccess?.(result);
1123
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1124
+ (0, import_transform_paths2.transformPaths)(result.data, [
1125
+ {
1126
+ transformFn: import_image2.transformRESTImageToSDKImage,
1127
+ paths: [
1128
+ { path: "gallery.items.image.imageInfo" },
1129
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1130
+ ]
1131
+ },
1132
+ {
1133
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1134
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1135
+ }
1136
+ ])
1137
+ )?.gallery;
1138
+ } catch (err) {
1139
+ const transformedError = (0, import_transform_error.transformError)(
1140
+ err,
1141
+ {
1142
+ spreadPathsToArguments: {},
1143
+ explicitPathsToArguments: {
1144
+ gallery: "$[0].gallery",
1145
+ cloneFromGalleryId: "$[0].cloneFromGalleryId"
1146
+ },
1147
+ singleArgumentUnchanged: false
1148
+ },
1149
+ ["options"]
1150
+ );
1151
+ sideEffects?.onError?.(err);
1152
+ throw transformedError;
1153
+ }
1154
+ }
1155
+ async function updateGallery2(_id, gallery) {
1156
+ const { httpClient, sideEffects } = arguments[2];
1157
+ const payload = (0, import_transform_paths2.transformPaths)(
1158
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ gallery: { ...gallery, id: _id } }),
1159
+ [
1160
+ {
1161
+ transformFn: import_image.transformSDKImageToRESTImage,
1162
+ paths: [
1163
+ { path: "gallery.items.image.imageInfo" },
1164
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1165
+ ]
1166
+ },
1167
+ {
1168
+ transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1169
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1170
+ }
1171
+ ]
1172
+ );
1173
+ const reqOpts = updateGallery(payload);
1174
+ sideEffects?.onSiteCall?.();
1175
+ try {
1176
+ const result = await httpClient.request(reqOpts);
1177
+ sideEffects?.onSuccess?.(result);
1178
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1179
+ (0, import_transform_paths2.transformPaths)(result.data, [
1180
+ {
1181
+ transformFn: import_image2.transformRESTImageToSDKImage,
1182
+ paths: [
1183
+ { path: "gallery.items.image.imageInfo" },
1184
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1185
+ ]
1186
+ },
1187
+ {
1188
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1189
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1190
+ }
1191
+ ])
1192
+ )?.gallery;
1193
+ } catch (err) {
1194
+ const transformedError = (0, import_transform_error.transformError)(
1195
+ err,
1196
+ {
1197
+ spreadPathsToArguments: { gallery: "$[1]" },
1198
+ explicitPathsToArguments: { "gallery.id": "$[0]" },
1199
+ singleArgumentUnchanged: false
1200
+ },
1201
+ ["_id", "gallery"]
1202
+ );
1203
+ sideEffects?.onError?.(err);
1204
+ throw transformedError;
1205
+ }
1206
+ }
1207
+ async function deleteGallery2(galleryId) {
1208
+ const { httpClient, sideEffects } = arguments[1];
1209
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1210
+ galleryId
1211
+ });
1212
+ const reqOpts = deleteGallery(payload);
1213
+ sideEffects?.onSiteCall?.();
1214
+ try {
1215
+ const result = await httpClient.request(reqOpts);
1216
+ sideEffects?.onSuccess?.(result);
1217
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1218
+ } catch (err) {
1219
+ const transformedError = (0, import_transform_error.transformError)(
1220
+ err,
1221
+ {
1222
+ spreadPathsToArguments: {},
1223
+ explicitPathsToArguments: { galleryId: "$[0]" },
1224
+ singleArgumentUnchanged: false
1225
+ },
1226
+ ["galleryId"]
1227
+ );
1228
+ sideEffects?.onError?.(err);
1229
+ throw transformedError;
1230
+ }
1231
+ }
1232
+ async function deleteGalleryItems2(galleryId, options) {
1233
+ const { httpClient, sideEffects } = arguments[2];
1234
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1235
+ galleryId,
1236
+ itemsIds: options?.itemsIds
1237
+ });
1238
+ const reqOpts = deleteGalleryItems(payload);
1239
+ sideEffects?.onSiteCall?.();
1240
+ try {
1241
+ const result = await httpClient.request(reqOpts);
1242
+ sideEffects?.onSuccess?.(result);
1243
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1244
+ (0, import_transform_paths2.transformPaths)(result.data, [
1245
+ {
1246
+ transformFn: import_image2.transformRESTImageToSDKImage,
1247
+ paths: [
1248
+ { path: "gallery.items.image.imageInfo" },
1249
+ { path: "gallery.items.secondaryMedia.image.imageInfo" }
1250
+ ]
1251
+ },
1252
+ {
1253
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1254
+ paths: [{ path: "gallery.items.video.videoInfo" }]
1255
+ }
1256
+ ])
1257
+ );
1258
+ } catch (err) {
1259
+ const transformedError = (0, import_transform_error.transformError)(
1260
+ err,
1261
+ {
1262
+ spreadPathsToArguments: {},
1263
+ explicitPathsToArguments: {
1264
+ galleryId: "$[0]",
1265
+ itemsIds: "$[1].itemsIds"
1266
+ },
1267
+ singleArgumentUnchanged: false
1268
+ },
1269
+ ["galleryId", "options"]
1270
+ );
1271
+ sideEffects?.onError?.(err);
1272
+ throw transformedError;
1273
+ }
1274
+ }
1275
+ async function bulkDeleteGalleryItems2(galleryId, itemIds) {
1276
+ const { httpClient, sideEffects } = arguments[2];
1277
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1278
+ galleryId,
1279
+ itemIds
1280
+ });
1281
+ const reqOpts = bulkDeleteGalleryItems(payload);
1282
+ sideEffects?.onSiteCall?.();
1283
+ try {
1284
+ const result = await httpClient.request(reqOpts);
1285
+ sideEffects?.onSuccess?.(result);
1286
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1287
+ } catch (err) {
1288
+ const transformedError = (0, import_transform_error.transformError)(
1289
+ err,
1290
+ {
1291
+ spreadPathsToArguments: {},
1292
+ explicitPathsToArguments: { galleryId: "$[0]", itemIds: "$[1]" },
1293
+ singleArgumentUnchanged: false
1294
+ },
1295
+ ["galleryId", "itemIds"]
1296
+ );
1297
+ sideEffects?.onError?.(err);
1298
+ throw transformedError;
1299
+ }
1300
+ }
1301
+ async function createGalleryItem2(galleryId, item) {
1302
+ const { httpClient, sideEffects } = arguments[2];
1303
+ const payload = (0, import_transform_paths2.transformPaths)(
1304
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ galleryId, item }),
1305
+ [
1306
+ {
1307
+ transformFn: import_image.transformSDKImageToRESTImage,
1308
+ paths: [
1309
+ { path: "item.image.imageInfo" },
1310
+ { path: "item.secondaryMedia.image.imageInfo" }
1311
+ ]
1312
+ },
1313
+ {
1314
+ transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1315
+ paths: [{ path: "item.video.videoInfo" }]
1316
+ }
1317
+ ]
1318
+ );
1319
+ const reqOpts = createGalleryItem(payload);
1320
+ sideEffects?.onSiteCall?.();
1321
+ try {
1322
+ const result = await httpClient.request(reqOpts);
1323
+ sideEffects?.onSuccess?.(result);
1324
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1325
+ (0, import_transform_paths2.transformPaths)(result.data, [
1326
+ {
1327
+ transformFn: import_image2.transformRESTImageToSDKImage,
1328
+ paths: [
1329
+ { path: "item.image.imageInfo" },
1330
+ { path: "item.secondaryMedia.image.imageInfo" }
1331
+ ]
1332
+ },
1333
+ {
1334
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1335
+ paths: [{ path: "item.video.videoInfo" }]
1336
+ }
1337
+ ])
1338
+ )?.item;
1339
+ } catch (err) {
1340
+ const transformedError = (0, import_transform_error.transformError)(
1341
+ err,
1342
+ {
1343
+ spreadPathsToArguments: {},
1344
+ explicitPathsToArguments: { galleryId: "$[0]", item: "$[1]" },
1345
+ singleArgumentUnchanged: false
1346
+ },
1347
+ ["galleryId", "item"]
1348
+ );
1349
+ sideEffects?.onError?.(err);
1350
+ throw transformedError;
1351
+ }
1352
+ }
1353
+ async function updateGalleryItem2(identifiers, item) {
1354
+ const { httpClient, sideEffects } = arguments[2];
1355
+ const payload = (0, import_transform_paths2.transformPaths)(
1356
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1357
+ galleryId: identifiers?.galleryId,
1358
+ item: { ...item, id: identifiers?.itemId }
1359
+ }),
1360
+ [
1361
+ {
1362
+ transformFn: import_image.transformSDKImageToRESTImage,
1363
+ paths: [
1364
+ { path: "item.image.imageInfo" },
1365
+ { path: "item.secondaryMedia.image.imageInfo" }
1366
+ ]
1367
+ },
1368
+ {
1369
+ transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1370
+ paths: [{ path: "item.video.videoInfo" }]
1371
+ }
1372
+ ]
1373
+ );
1374
+ const reqOpts = updateGalleryItem(payload);
1375
+ sideEffects?.onSiteCall?.();
1376
+ try {
1377
+ const result = await httpClient.request(reqOpts);
1378
+ sideEffects?.onSuccess?.(result);
1379
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1380
+ (0, import_transform_paths2.transformPaths)(result.data, [
1381
+ {
1382
+ transformFn: import_image2.transformRESTImageToSDKImage,
1383
+ paths: [
1384
+ { path: "item.image.imageInfo" },
1385
+ { path: "item.secondaryMedia.image.imageInfo" }
1386
+ ]
1387
+ },
1388
+ {
1389
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1390
+ paths: [{ path: "item.video.videoInfo" }]
1391
+ }
1392
+ ])
1393
+ )?.item;
1394
+ } catch (err) {
1395
+ const transformedError = (0, import_transform_error.transformError)(
1396
+ err,
1397
+ {
1398
+ spreadPathsToArguments: { item: "$[1]" },
1399
+ explicitPathsToArguments: {
1400
+ galleryId: "$[0].galleryId",
1401
+ "item.id": "$[0].itemId"
1402
+ },
1403
+ singleArgumentUnchanged: false
1404
+ },
1405
+ ["identifiers", "item"]
1406
+ );
1407
+ sideEffects?.onError?.(err);
1408
+ throw transformedError;
1409
+ }
1410
+ }
1411
+ async function deleteGalleryItem2(identifiers) {
1412
+ const { httpClient, sideEffects } = arguments[1];
1413
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1414
+ galleryId: identifiers?.galleryId,
1415
+ itemId: identifiers?.itemId
1416
+ });
1417
+ const reqOpts = deleteGalleryItem(payload);
1418
+ sideEffects?.onSiteCall?.();
1419
+ try {
1420
+ const result = await httpClient.request(reqOpts);
1421
+ sideEffects?.onSuccess?.(result);
1422
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1423
+ } catch (err) {
1424
+ const transformedError = (0, import_transform_error.transformError)(
1425
+ err,
1426
+ {
1427
+ spreadPathsToArguments: {},
1428
+ explicitPathsToArguments: {
1429
+ galleryId: "$[0].galleryId",
1430
+ itemId: "$[0].itemId"
1431
+ },
1432
+ singleArgumentUnchanged: false
1433
+ },
1434
+ ["identifiers"]
1435
+ );
1436
+ sideEffects?.onError?.(err);
1437
+ throw transformedError;
1438
+ }
1439
+ }
1440
+
1441
+ // src/pro-gallery-v2-gallery-pro-gallery.public.ts
1442
+ function listGalleries3(httpClient) {
1443
+ return (options) => listGalleries2(
1444
+ options,
1445
+ // @ts-ignore
1446
+ { httpClient }
1447
+ );
1448
+ }
1449
+ function getGallery3(httpClient) {
1450
+ return (galleryId, options) => getGallery2(
1451
+ galleryId,
1452
+ options,
1453
+ // @ts-ignore
1454
+ { httpClient }
1455
+ );
1456
+ }
1457
+ function listGalleryItems3(httpClient) {
1458
+ return (galleryId, options) => listGalleryItems2(
1459
+ galleryId,
1460
+ options,
1461
+ // @ts-ignore
1462
+ { httpClient }
1463
+ );
1464
+ }
1465
+ function getGalleryItem3(httpClient) {
1466
+ return (identifiers) => getGalleryItem2(
1467
+ identifiers,
1468
+ // @ts-ignore
1469
+ { httpClient }
1470
+ );
1471
+ }
1472
+ function createGallery3(httpClient) {
1473
+ return (options) => createGallery2(
1474
+ options,
1475
+ // @ts-ignore
1476
+ { httpClient }
1477
+ );
1478
+ }
1479
+ function updateGallery3(httpClient) {
1480
+ return (_id, gallery) => updateGallery2(
1481
+ _id,
1482
+ gallery,
1483
+ // @ts-ignore
1484
+ { httpClient }
1485
+ );
1486
+ }
1487
+ function deleteGallery3(httpClient) {
1488
+ return (galleryId) => deleteGallery2(
1489
+ galleryId,
1490
+ // @ts-ignore
1491
+ { httpClient }
1492
+ );
1493
+ }
1494
+ function deleteGalleryItems3(httpClient) {
1495
+ return (galleryId, options) => deleteGalleryItems2(
1496
+ galleryId,
1497
+ options,
1498
+ // @ts-ignore
1499
+ { httpClient }
1500
+ );
1501
+ }
1502
+ function bulkDeleteGalleryItems3(httpClient) {
1503
+ return (galleryId, itemIds) => bulkDeleteGalleryItems2(
1504
+ galleryId,
1505
+ itemIds,
1506
+ // @ts-ignore
1507
+ { httpClient }
1508
+ );
1509
+ }
1510
+ function createGalleryItem3(httpClient) {
1511
+ return (galleryId, item) => createGalleryItem2(
1512
+ galleryId,
1513
+ item,
1514
+ // @ts-ignore
1515
+ { httpClient }
1516
+ );
1517
+ }
1518
+ function updateGalleryItem3(httpClient) {
1519
+ return (identifiers, item) => updateGalleryItem2(
1520
+ identifiers,
1521
+ item,
1522
+ // @ts-ignore
1523
+ { httpClient }
1524
+ );
1525
+ }
1526
+ function deleteGalleryItem3(httpClient) {
1527
+ return (identifiers) => deleteGalleryItem2(
1528
+ identifiers,
1529
+ // @ts-ignore
1530
+ { httpClient }
1531
+ );
1532
+ }
1533
+ var onGalleryCreated = (0, import_sdk_types.EventDefinition)(
1534
+ "wix.pro_gallery.gallery_v2_created",
1535
+ true,
1536
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1537
+ (0, import_transform_paths3.transformPaths)(event, [
1538
+ {
1539
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1540
+ paths: [
1541
+ { path: "entity.sortOrder" },
1542
+ { path: "entity.items.sortOrder" },
1543
+ { path: "entity.items.image.focalPoint.x" },
1544
+ { path: "entity.items.image.focalPoint.y" },
1545
+ { path: "entity.items.secondaryMedia.image.focalPoint.x" },
1546
+ { path: "entity.items.secondaryMedia.image.focalPoint.y" },
1547
+ { path: "entity.items.image.unsharpMasking.amount" },
1548
+ { path: "entity.items.image.unsharpMasking.radius" },
1549
+ { path: "entity.items.image.unsharpMasking.threshold" },
1550
+ { path: "entity.items.secondaryMedia.image.unsharpMasking.amount" },
1551
+ { path: "entity.items.secondaryMedia.image.unsharpMasking.radius" },
1552
+ {
1553
+ path: "entity.items.secondaryMedia.image.unsharpMasking.threshold"
1554
+ }
1555
+ ]
1556
+ },
1557
+ {
1558
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1559
+ paths: [
1560
+ { path: "entity.createdDate" },
1561
+ { path: "entity.items.createdDate" },
1562
+ { path: "entity.items.updatedDate" },
1563
+ { path: "metadata.eventTime" }
1564
+ ]
1565
+ },
1566
+ {
1567
+ transformFn: import_image3.transformRESTImageToSDKImage,
1568
+ paths: [
1569
+ { path: "entity.items.image.imageInfo" },
1570
+ { path: "entity.items.secondaryMedia.image.imageInfo" }
1571
+ ]
1572
+ },
1573
+ {
1574
+ transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1575
+ paths: [{ path: "entity.items.video.videoInfo" }]
1576
+ }
1577
+ ])
1578
+ )
1579
+ )();
1580
+ var onGalleryDeleted = (0, import_sdk_types.EventDefinition)(
1581
+ "wix.pro_gallery.gallery_v2_deleted",
1582
+ true,
1583
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1584
+ (0, import_transform_paths3.transformPaths)(event, [
1585
+ {
1586
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1587
+ paths: [
1588
+ { path: "undefined.sortOrder" },
1589
+ { path: "undefined.items.sortOrder" },
1590
+ { path: "undefined.items.image.focalPoint.x" },
1591
+ { path: "undefined.items.image.focalPoint.y" },
1592
+ { path: "undefined.items.secondaryMedia.image.focalPoint.x" },
1593
+ { path: "undefined.items.secondaryMedia.image.focalPoint.y" },
1594
+ { path: "undefined.items.image.unsharpMasking.amount" },
1595
+ { path: "undefined.items.image.unsharpMasking.radius" },
1596
+ { path: "undefined.items.image.unsharpMasking.threshold" },
1597
+ {
1598
+ path: "undefined.items.secondaryMedia.image.unsharpMasking.amount"
1599
+ },
1600
+ {
1601
+ path: "undefined.items.secondaryMedia.image.unsharpMasking.radius"
1602
+ },
1603
+ {
1604
+ path: "undefined.items.secondaryMedia.image.unsharpMasking.threshold"
1605
+ }
1606
+ ]
1607
+ },
1608
+ {
1609
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1610
+ paths: [
1611
+ { path: "undefined.createdDate" },
1612
+ { path: "undefined.items.createdDate" },
1613
+ { path: "undefined.items.updatedDate" },
1614
+ { path: "metadata.eventTime" }
1615
+ ]
1616
+ },
1617
+ {
1618
+ transformFn: import_image3.transformRESTImageToSDKImage,
1619
+ paths: [
1620
+ { path: "undefined.items.image.imageInfo" },
1621
+ { path: "undefined.items.secondaryMedia.image.imageInfo" }
1622
+ ]
1623
+ },
1624
+ {
1625
+ transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1626
+ paths: [{ path: "undefined.items.video.videoInfo" }]
1627
+ }
1628
+ ])
1629
+ )
1630
+ )();
1631
+ var onGalleryItemCreated = (0, import_sdk_types.EventDefinition)(
1632
+ "wix.pro_gallery.gallery_v2_gallery_item_created",
1633
+ true,
1634
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1635
+ (0, import_transform_paths3.transformPaths)(event, [
1636
+ {
1637
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1638
+ paths: [
1639
+ { path: "data.item.sortOrder" },
1640
+ { path: "data.item.image.focalPoint.x" },
1641
+ { path: "data.item.image.focalPoint.y" },
1642
+ { path: "data.item.secondaryMedia.image.focalPoint.x" },
1643
+ { path: "data.item.secondaryMedia.image.focalPoint.y" },
1644
+ { path: "data.item.image.unsharpMasking.amount" },
1645
+ { path: "data.item.image.unsharpMasking.radius" },
1646
+ { path: "data.item.image.unsharpMasking.threshold" },
1647
+ { path: "data.item.secondaryMedia.image.unsharpMasking.amount" },
1648
+ { path: "data.item.secondaryMedia.image.unsharpMasking.radius" },
1649
+ { path: "data.item.secondaryMedia.image.unsharpMasking.threshold" }
1650
+ ]
1651
+ },
1652
+ {
1653
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1654
+ paths: [
1655
+ { path: "data.item.createdDate" },
1656
+ { path: "data.item.updatedDate" },
1657
+ { path: "metadata.eventTime" }
1658
+ ]
1659
+ },
1660
+ {
1661
+ transformFn: import_image3.transformRESTImageToSDKImage,
1662
+ paths: [
1663
+ { path: "data.item.image.imageInfo" },
1664
+ { path: "data.item.secondaryMedia.image.imageInfo" }
1665
+ ]
1666
+ },
1667
+ {
1668
+ transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1669
+ paths: [{ path: "data.item.video.videoInfo" }]
1670
+ }
1671
+ ])
1672
+ )
1673
+ )();
1674
+ var onGalleryItemDeleted = (0, import_sdk_types.EventDefinition)(
1675
+ "wix.pro_gallery.gallery_v2_gallery_item_deleted",
1676
+ true,
1677
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1678
+ (0, import_transform_paths3.transformPaths)(event, [
1679
+ {
1680
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1681
+ paths: [{ path: "metadata.eventTime" }]
1682
+ }
1683
+ ])
1684
+ )
1685
+ )();
1686
+ var onGalleryItemUpdated = (0, import_sdk_types.EventDefinition)(
1687
+ "wix.pro_gallery.gallery_v2_gallery_item_updated",
1688
+ true,
1689
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1690
+ (0, import_transform_paths3.transformPaths)(event, [
1691
+ {
1692
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1693
+ paths: [
1694
+ { path: "data.updatedItem.sortOrder" },
1695
+ { path: "data.updatedItem.image.focalPoint.x" },
1696
+ { path: "data.updatedItem.image.focalPoint.y" },
1697
+ { path: "data.updatedItem.secondaryMedia.image.focalPoint.x" },
1698
+ { path: "data.updatedItem.secondaryMedia.image.focalPoint.y" },
1699
+ { path: "data.updatedItem.image.unsharpMasking.amount" },
1700
+ { path: "data.updatedItem.image.unsharpMasking.radius" },
1701
+ { path: "data.updatedItem.image.unsharpMasking.threshold" },
1702
+ {
1703
+ path: "data.updatedItem.secondaryMedia.image.unsharpMasking.amount"
1704
+ },
1705
+ {
1706
+ path: "data.updatedItem.secondaryMedia.image.unsharpMasking.radius"
1707
+ },
1708
+ {
1709
+ path: "data.updatedItem.secondaryMedia.image.unsharpMasking.threshold"
1710
+ }
1711
+ ]
1712
+ },
1713
+ {
1714
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1715
+ paths: [
1716
+ { path: "data.updatedItem.createdDate" },
1717
+ { path: "data.updatedItem.updatedDate" },
1718
+ { path: "metadata.eventTime" }
1719
+ ]
1720
+ },
1721
+ {
1722
+ transformFn: import_image3.transformRESTImageToSDKImage,
1723
+ paths: [
1724
+ { path: "data.updatedItem.image.imageInfo" },
1725
+ { path: "data.updatedItem.secondaryMedia.image.imageInfo" }
1726
+ ]
1727
+ },
1728
+ {
1729
+ transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1730
+ paths: [{ path: "data.updatedItem.video.videoInfo" }]
1731
+ }
1732
+ ])
1733
+ )
1734
+ )();
1735
+ var onGalleryUpdated = (0, import_sdk_types.EventDefinition)(
1736
+ "wix.pro_gallery.gallery_v2_updated",
1737
+ true,
1738
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
1739
+ (0, import_transform_paths3.transformPaths)(event, [
1740
+ {
1741
+ transformFn: import_float3.transformRESTFloatToSDKFloat,
1742
+ paths: [
1743
+ { path: "entity.sortOrder" },
1744
+ { path: "entity.items.sortOrder" },
1745
+ { path: "entity.items.image.focalPoint.x" },
1746
+ { path: "entity.items.image.focalPoint.y" },
1747
+ { path: "entity.items.secondaryMedia.image.focalPoint.x" },
1748
+ { path: "entity.items.secondaryMedia.image.focalPoint.y" },
1749
+ { path: "entity.items.image.unsharpMasking.amount" },
1750
+ { path: "entity.items.image.unsharpMasking.radius" },
1751
+ { path: "entity.items.image.unsharpMasking.threshold" },
1752
+ { path: "entity.items.secondaryMedia.image.unsharpMasking.amount" },
1753
+ { path: "entity.items.secondaryMedia.image.unsharpMasking.radius" },
1754
+ {
1755
+ path: "entity.items.secondaryMedia.image.unsharpMasking.threshold"
1756
+ }
1757
+ ]
1758
+ },
1759
+ {
1760
+ transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1761
+ paths: [
1762
+ { path: "entity.createdDate" },
1763
+ { path: "entity.items.createdDate" },
1764
+ { path: "entity.items.updatedDate" },
1765
+ { path: "metadata.eventTime" }
1766
+ ]
1767
+ },
1768
+ {
1769
+ transformFn: import_image3.transformRESTImageToSDKImage,
1770
+ paths: [
1771
+ { path: "entity.items.image.imageInfo" },
1772
+ { path: "entity.items.secondaryMedia.image.imageInfo" }
1773
+ ]
1774
+ },
1775
+ {
1776
+ transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1777
+ paths: [{ path: "entity.items.video.videoInfo" }]
1778
+ }
1779
+ ])
1780
+ )
1781
+ )();
1782
+
1783
+ // src/pro-gallery-v2-gallery-pro-gallery.context.ts
1784
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1785
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
1786
+ var listGalleries4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listGalleries3);
1787
+ var getGallery4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getGallery3);
1788
+ var listGalleryItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listGalleryItems3);
1789
+ var getGalleryItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getGalleryItem3);
1790
+ var createGallery4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createGallery3);
1791
+ var updateGallery4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateGallery3);
1792
+ var deleteGallery4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteGallery3);
1793
+ var deleteGalleryItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteGalleryItems3);
1794
+ var bulkDeleteGalleryItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteGalleryItems3);
1795
+ var createGalleryItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createGalleryItem3);
1796
+ var updateGalleryItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateGalleryItem3);
1797
+ var deleteGalleryItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteGalleryItem3);
1798
+ var onGalleryCreated2 = (0, import_event_definition_modules.createEventModule)(onGalleryCreated);
1799
+ var onGalleryDeleted2 = (0, import_event_definition_modules.createEventModule)(onGalleryDeleted);
1800
+ var onGalleryItemCreated2 = (0, import_event_definition_modules.createEventModule)(onGalleryItemCreated);
1801
+ var onGalleryItemDeleted2 = (0, import_event_definition_modules.createEventModule)(onGalleryItemDeleted);
1802
+ var onGalleryItemUpdated2 = (0, import_event_definition_modules.createEventModule)(onGalleryItemUpdated);
1803
+ var onGalleryUpdated2 = (0, import_event_definition_modules.createEventModule)(onGalleryUpdated);
1804
+ // Annotate the CommonJS export names for ESM import in node:
1805
+ 0 && (module.exports = {
1806
+ Enum,
1807
+ ImageType,
1808
+ LinkRel,
1809
+ LinkType,
1810
+ SearchIndexingNotificationState,
1811
+ State,
1812
+ Type,
1813
+ VideoType,
1814
+ WebhookIdentityType,
1815
+ bulkDeleteGalleryItems,
1816
+ createGallery,
1817
+ createGalleryItem,
1818
+ deleteGallery,
1819
+ deleteGalleryItem,
1820
+ deleteGalleryItems,
1821
+ getGallery,
1822
+ getGalleryItem,
1823
+ listGalleries,
1824
+ listGalleryItems,
1825
+ onGalleryCreated,
1826
+ onGalleryDeleted,
1827
+ onGalleryItemCreated,
1828
+ onGalleryItemDeleted,
1829
+ onGalleryItemUpdated,
1830
+ onGalleryUpdated,
1831
+ updateGallery,
1832
+ updateGalleryItem
1833
+ });
1834
+ //# sourceMappingURL=index.js.map