@wix/pro-gallery 1.0.33 → 1.0.35

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 (53) hide show
  1. package/build/cjs/context.d.ts +1 -0
  2. package/build/cjs/{index.typings.js → context.js} +2 -2
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +1 -1
  5. package/build/cjs/index.js +1 -1
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1 -1
  8. package/build/cjs/meta.js +1 -1
  9. package/build/es/context.d.ts +1 -0
  10. package/build/es/context.js +2 -0
  11. package/build/es/context.js.map +1 -0
  12. package/build/es/index.d.ts +1 -1
  13. package/build/es/index.js +1 -1
  14. package/build/es/index.js.map +1 -1
  15. package/build/es/meta.d.ts +1 -1
  16. package/build/es/meta.js +1 -1
  17. package/context/package.json +6 -0
  18. package/package.json +12 -8
  19. package/build/cjs/index.typings.d.ts +0 -1
  20. package/build/cjs/index.typings.js.map +0 -1
  21. package/build/cjs/src/pro-gallery-v2-gallery.http.d.ts +0 -130
  22. package/build/cjs/src/pro-gallery-v2-gallery.http.js +0 -823
  23. package/build/cjs/src/pro-gallery-v2-gallery.http.js.map +0 -1
  24. package/build/cjs/src/pro-gallery-v2-gallery.meta.d.ts +0 -41
  25. package/build/cjs/src/pro-gallery-v2-gallery.meta.js +0 -218
  26. package/build/cjs/src/pro-gallery-v2-gallery.meta.js.map +0 -1
  27. package/build/cjs/src/pro-gallery-v2-gallery.public.d.ts +0 -119
  28. package/build/cjs/src/pro-gallery-v2-gallery.public.js +0 -75
  29. package/build/cjs/src/pro-gallery-v2-gallery.public.js.map +0 -1
  30. package/build/cjs/src/pro-gallery-v2-gallery.types.d.ts +0 -1768
  31. package/build/cjs/src/pro-gallery-v2-gallery.types.js +0 -82
  32. package/build/cjs/src/pro-gallery-v2-gallery.types.js.map +0 -1
  33. package/build/cjs/src/pro-gallery-v2-gallery.universal.d.ts +0 -1389
  34. package/build/cjs/src/pro-gallery-v2-gallery.universal.js +0 -903
  35. package/build/cjs/src/pro-gallery-v2-gallery.universal.js.map +0 -1
  36. package/build/es/index.typings.d.ts +0 -1
  37. package/build/es/index.typings.js +0 -2
  38. package/build/es/index.typings.js.map +0 -1
  39. package/build/es/src/pro-gallery-v2-gallery.http.d.ts +0 -130
  40. package/build/es/src/pro-gallery-v2-gallery.http.js +0 -810
  41. package/build/es/src/pro-gallery-v2-gallery.http.js.map +0 -1
  42. package/build/es/src/pro-gallery-v2-gallery.meta.d.ts +0 -41
  43. package/build/es/src/pro-gallery-v2-gallery.meta.js +0 -182
  44. package/build/es/src/pro-gallery-v2-gallery.meta.js.map +0 -1
  45. package/build/es/src/pro-gallery-v2-gallery.public.d.ts +0 -119
  46. package/build/es/src/pro-gallery-v2-gallery.public.js +0 -54
  47. package/build/es/src/pro-gallery-v2-gallery.public.js.map +0 -1
  48. package/build/es/src/pro-gallery-v2-gallery.types.d.ts +0 -1768
  49. package/build/es/src/pro-gallery-v2-gallery.types.js +0 -79
  50. package/build/es/src/pro-gallery-v2-gallery.types.js.map +0 -1
  51. package/build/es/src/pro-gallery-v2-gallery.universal.d.ts +0 -1389
  52. package/build/es/src/pro-gallery-v2-gallery.universal.js +0 -867
  53. package/build/es/src/pro-gallery-v2-gallery.universal.js.map +0 -1
@@ -1,903 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.deleteGalleryItem = exports.updateGalleryItem = exports.createGalleryItem = exports.deleteGallery = exports.updateGallery = exports.createGallery = exports.getGalleryItem = exports.listGalleryItems = exports.getGallery = exports.listGalleries = exports.State = exports.SearchIndexingNotificationState = exports.Enum = exports.VideoType = exports.ImageType = exports.Type = exports.LinkRel = exports.LinkType = exports.__debug = void 0;
36
- const velo_1 = require("@wix/metro-runtime/velo");
37
- const transform_error_1 = require("@wix/sdk-runtime/transform-error");
38
- const ambassadorWixProGalleryV2Gallery = __importStar(require("./pro-gallery-v2-gallery.http"));
39
- let __verbose = false;
40
- function __log(...args) {
41
- __verbose && console.log(...args);
42
- }
43
- function __inspect(obj) {
44
- return obj;
45
- }
46
- exports.__debug = {
47
- verboseLogging: {
48
- on: () => (__verbose = true),
49
- off: () => (__verbose = false),
50
- },
51
- };
52
- const _toVeloEntity = '$';
53
- const _fromVeloEntity = '$';
54
- var LinkType;
55
- (function (LinkType) {
56
- LinkType["UNDEFINED"] = "UNDEFINED";
57
- /** external link */
58
- LinkType["EXTERNAL"] = "EXTERNAL";
59
- /** for internal usage using wixLinkData */
60
- LinkType["INTERNAL"] = "INTERNAL";
61
- })(LinkType || (exports.LinkType = LinkType = {}));
62
- /**
63
- * The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document.
64
- * Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
65
- * Following are the accepted 'rel' types by Wix applications.
66
- */
67
- var LinkRel;
68
- (function (LinkRel) {
69
- /** default (not implemented) */
70
- LinkRel["unknown_link_rel"] = "unknown_link_rel";
71
- /** Indicates that the current document's original author or publisher does not endorse the referenced document. */
72
- LinkRel["nofollow"] = "nofollow";
73
- /** Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it. */
74
- LinkRel["noopener"] = "noopener";
75
- /** No Referer header will be included. Additionally, has the same effect as noopener. */
76
- LinkRel["noreferrer"] = "noreferrer";
77
- /** Indicates a link that resulted from advertisements or paid placements. */
78
- LinkRel["sponsored"] = "sponsored";
79
- })(LinkRel || (exports.LinkRel = LinkRel = {}));
80
- var Type;
81
- (function (Type) {
82
- Type["UNDEFINED"] = "UNDEFINED";
83
- Type["IMAGE"] = "IMAGE";
84
- Type["VIDEO"] = "VIDEO";
85
- Type["TEXT"] = "TEXT";
86
- })(Type || (exports.Type = Type = {}));
87
- var ImageType;
88
- (function (ImageType) {
89
- ImageType["UNDEFINED"] = "UNDEFINED";
90
- ImageType["WIX_MEDIA"] = "WIX_MEDIA";
91
- ImageType["EXTERNAL"] = "EXTERNAL";
92
- })(ImageType || (exports.ImageType = ImageType = {}));
93
- var VideoType;
94
- (function (VideoType) {
95
- VideoType["UNDEFINED"] = "UNDEFINED";
96
- VideoType["WIX_MEDIA"] = "WIX_MEDIA";
97
- VideoType["YOUTUBE"] = "YOUTUBE";
98
- VideoType["VIMEO"] = "VIMEO";
99
- })(VideoType || (exports.VideoType = VideoType = {}));
100
- var Enum;
101
- (function (Enum) {
102
- /** Default value. Means that permission not set */
103
- Enum["UNKNOWN"] = "UNKNOWN";
104
- /** Protected exposure. Exposed to members and owners */
105
- Enum["PROTECTED"] = "PROTECTED";
106
- /** Private exposure. Exposed to owners */
107
- Enum["PRIVATE"] = "PRIVATE";
108
- /** Public exposure. Visible to everyone */
109
- Enum["PUBLIC"] = "PUBLIC";
110
- /** Used for partial updates, to state that exposure is not changing */
111
- Enum["UNCHANGED"] = "UNCHANGED";
112
- /** Protected to members of permitted groups and owners */
113
- Enum["GROUP_PROTECTED"] = "GROUP_PROTECTED";
114
- })(Enum || (exports.Enum = Enum = {}));
115
- var SearchIndexingNotificationState;
116
- (function (SearchIndexingNotificationState) {
117
- /** default state */
118
- SearchIndexingNotificationState["Unknown"] = "Unknown";
119
- /** metasite does not require site search indexing */
120
- SearchIndexingNotificationState["Off"] = "Off";
121
- /** metasite requires site search indexing */
122
- SearchIndexingNotificationState["On"] = "On";
123
- })(SearchIndexingNotificationState || (exports.SearchIndexingNotificationState = SearchIndexingNotificationState = {}));
124
- var State;
125
- (function (State) {
126
- State["UNDEFINED"] = "UNDEFINED";
127
- /** The gallery in the Editor segment */
128
- State["SAVED"] = "SAVED";
129
- /** The gallery in the LiveSite segment */
130
- State["PUBLISHED"] = "PUBLISHED";
131
- })(State || (exports.State = State = {}));
132
- const _createGalleryItemRequest = { item: '_item' };
133
- const _createGalleryItemResponse = { item: '_item' };
134
- const _createGalleryRequest = { gallery: '_gallery' };
135
- const _createGalleryResponse = { gallery: '_gallery' };
136
- const _deleteGalleryItemRequest = {};
137
- const _deleteGalleryItemResponse = {};
138
- const _deleteGalleryRequest = {};
139
- const _deleteGalleryResponse = {};
140
- const _gallery = { items: '_item' };
141
- const _getGalleryItemRequest = {};
142
- const _getGalleryItemResponse = { item: '_item' };
143
- const _getGalleryRequest = {};
144
- const _getGalleryResponse = { gallery: '_gallery' };
145
- const _image = { imageInfo: 'wix.common.Image' };
146
- const _item = {
147
- image: '_image',
148
- video: '_video',
149
- secondaryMedia: '_secondaryMedia',
150
- };
151
- const _listGalleriesRequest = {};
152
- const _listGalleriesResponse = { galleries: '_gallery' };
153
- const _listGalleryItemsRequest = {};
154
- const _listGalleryItemsResponse = { items: '_item' };
155
- const _secondaryMedia = { image: '_image' };
156
- const _updateGalleryItemRequest = { item: '_item' };
157
- const _updateGalleryItemResponse = { item: '_item' };
158
- const _updateGalleryRequest = { gallery: '_gallery' };
159
- const _updateGalleryResponse = { gallery: '_gallery' };
160
- const _video = { videoInfo: 'wix.common.VideoV2' };
161
- /**
162
- * Retrieves a list of galleries.
163
- *
164
- * The `listGalleries()` function returns a Promise that resolves to a list of up to 10 galleries at a given time. To list the next 10 galleries in your site's backend, use the `offset` parameter.
165
- * @public
166
- * @documentationMaturity preview
167
- * @param options - Options to use when getting the list of galleries.
168
- * @permissionScope Manage Galleries
169
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
170
- * @permissionScope Read Galleries
171
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
172
- * @applicableIdentity APP
173
- * @applicableIdentity MEMBER
174
- * @applicableIdentity VISITOR
175
- */
176
- function listGalleries(options) {
177
- var _a, _b, _c;
178
- return __awaiter(this, arguments, void 0, function* () {
179
- const requestTransformation = {
180
- itemLimit: '$[0].itemLimit',
181
- offset: '$[0].offset',
182
- limit: '$[0].limit',
183
- };
184
- const responseTransformation = '$';
185
- // @ts-ignore
186
- const { httpClient, sideEffects } = arguments[1];
187
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
188
- rootSchema: _listGalleriesRequest,
189
- depSchemas: {},
190
- fqdnTransformation: {
191
- paths: [],
192
- transformation: _fromVeloEntity,
193
- },
194
- customTransformation: requestTransformation,
195
- });
196
- const { fromJSON } = (0, velo_1.serializer)({
197
- rootSchema: _listGalleriesResponse,
198
- depSchemas: { _gallery, _image, _item, _secondaryMedia, _video },
199
- fqdnTransformation: {
200
- paths: [...['Array#galleries']],
201
- transformation: _toVeloEntity,
202
- },
203
- customTransformation: responseTransformation,
204
- });
205
- const payload = toAmbassadorRequest([options]);
206
- const reqOpts = ambassadorWixProGalleryV2Gallery.listGalleries(payload);
207
- __log(`"ListGalleries" sending request with: ${__inspect(reqOpts)}`);
208
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
209
- try {
210
- const result = yield httpClient.request(reqOpts);
211
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
212
- return fromJSON(result.data);
213
- }
214
- catch (err) {
215
- const transformedError = (0, transform_error_1.transformError)(err, {
216
- spreadPathsToArguments: {},
217
- explicitPathsToArguments: {
218
- itemLimit: '$[0].itemLimit',
219
- offset: '$[0].offset',
220
- limit: '$[0].limit',
221
- },
222
- singleArgumentUnchanged: false,
223
- }, ['options']);
224
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
225
- throw transformedError;
226
- }
227
- });
228
- }
229
- exports.listGalleries = listGalleries;
230
- /**
231
- * Gets a gallery by ID.
232
- *
233
- * The `getGallery()` function returns a Promise that resolves to a gallery whose ID matches the given ID.
234
- * @param galleryId - Gallery ID.
235
- * @public
236
- * @documentationMaturity preview
237
- * @requiredField galleryId
238
- * @param options - Options to use when getting the gallery.
239
- * @permissionScope Manage Galleries
240
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
241
- * @permissionScope Read Galleries
242
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
243
- * @applicableIdentity APP
244
- * @applicableIdentity MEMBER
245
- * @applicableIdentity VISITOR
246
- * @returns Returned gallery.
247
- */
248
- function getGallery(galleryId, options) {
249
- var _a, _b, _c;
250
- return __awaiter(this, arguments, void 0, function* () {
251
- const requestTransformation = {
252
- galleryId: '$[0]',
253
- itemOffset: '$[1].itemOffset',
254
- itemLimit: '$[1].itemLimit',
255
- };
256
- const responseTransformation = '$.gallery';
257
- // @ts-ignore
258
- const { httpClient, sideEffects } = arguments[2];
259
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
260
- rootSchema: _getGalleryRequest,
261
- depSchemas: {},
262
- fqdnTransformation: {
263
- paths: [],
264
- transformation: _fromVeloEntity,
265
- },
266
- customTransformation: requestTransformation,
267
- });
268
- const { fromJSON } = (0, velo_1.serializer)({
269
- rootSchema: _getGalleryResponse,
270
- depSchemas: { _gallery, _image, _item, _secondaryMedia, _video },
271
- fqdnTransformation: {
272
- paths: [...['gallery']],
273
- transformation: _toVeloEntity,
274
- },
275
- customTransformation: responseTransformation,
276
- });
277
- const payload = toAmbassadorRequest([galleryId, options]);
278
- const reqOpts = ambassadorWixProGalleryV2Gallery.getGallery(payload);
279
- __log(`"GetGallery" sending request with: ${__inspect(reqOpts)}`);
280
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
281
- try {
282
- const result = yield httpClient.request(reqOpts);
283
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
284
- return fromJSON(result.data);
285
- }
286
- catch (err) {
287
- const transformedError = (0, transform_error_1.transformError)(err, {
288
- spreadPathsToArguments: {},
289
- explicitPathsToArguments: {
290
- galleryId: '$[0]',
291
- itemOffset: '$[1].itemOffset',
292
- itemLimit: '$[1].itemLimit',
293
- },
294
- singleArgumentUnchanged: false,
295
- }, ['galleryId', 'options']);
296
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
297
- throw transformedError;
298
- }
299
- });
300
- }
301
- exports.getGallery = getGallery;
302
- /**
303
- * Retrieves a list of media items in a specified gallery.
304
- *
305
- * The `listGalleryItems()` function returns a Promise that resolves to a list of up to 100 gallery items. The gallery items are listed by `sortOrder` in descending order.
306
- * @param galleryId - Gallery ID.
307
- * @public
308
- * @documentationMaturity preview
309
- * @requiredField galleryId
310
- * @param options - Options to use when getting the list of gallery items.
311
- * @permissionScope Manage Galleries
312
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
313
- * @permissionScope Read Galleries
314
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
315
- * @applicableIdentity APP
316
- * @applicableIdentity MEMBER
317
- * @applicableIdentity VISITOR
318
- */
319
- function listGalleryItems(galleryId, options) {
320
- var _a, _b, _c;
321
- return __awaiter(this, arguments, void 0, function* () {
322
- const requestTransformation = {
323
- galleryId: '$[0]',
324
- itemOffset: '$[1].itemOffset',
325
- itemLimit: '$[1].itemLimit',
326
- };
327
- const responseTransformation = '$';
328
- // @ts-ignore
329
- const { httpClient, sideEffects } = arguments[2];
330
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
331
- rootSchema: _listGalleryItemsRequest,
332
- depSchemas: {},
333
- fqdnTransformation: {
334
- paths: [],
335
- transformation: _fromVeloEntity,
336
- },
337
- customTransformation: requestTransformation,
338
- });
339
- const { fromJSON } = (0, velo_1.serializer)({
340
- rootSchema: _listGalleryItemsResponse,
341
- depSchemas: { _image, _item, _secondaryMedia, _video },
342
- fqdnTransformation: {
343
- paths: [],
344
- transformation: _toVeloEntity,
345
- },
346
- customTransformation: responseTransformation,
347
- });
348
- const payload = toAmbassadorRequest([galleryId, options]);
349
- const reqOpts = ambassadorWixProGalleryV2Gallery.listGalleryItems(payload);
350
- __log(`"ListGalleryItems" sending request with: ${__inspect(reqOpts)}`);
351
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
352
- try {
353
- const result = yield httpClient.request(reqOpts);
354
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
355
- return fromJSON(result.data);
356
- }
357
- catch (err) {
358
- const transformedError = (0, transform_error_1.transformError)(err, {
359
- spreadPathsToArguments: {},
360
- explicitPathsToArguments: {
361
- galleryId: '$[0]',
362
- itemOffset: '$[1].itemOffset',
363
- itemLimit: '$[1].itemLimit',
364
- },
365
- singleArgumentUnchanged: false,
366
- }, ['galleryId', 'options']);
367
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
368
- throw transformedError;
369
- }
370
- });
371
- }
372
- exports.listGalleryItems = listGalleryItems;
373
- /**
374
- * Gets a gallery item by ID.
375
- *
376
- * The `getGalleryItem()` function returns a Promise that resolves to a media item in a specified gallery whose ID matches the given ID.
377
- * @public
378
- * @documentationMaturity preview
379
- * @requiredField identifiers
380
- * @requiredField identifiers.galleryId
381
- * @requiredField identifiers.itemId
382
- * @param identifiers - Gallery ID and Item ID.
383
- * @permissionScope Manage Galleries
384
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
385
- * @permissionScope Read Galleries
386
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
387
- * @applicableIdentity APP
388
- * @applicableIdentity MEMBER
389
- * @applicableIdentity VISITOR
390
- * @returns Returned media item.
391
- */
392
- function getGalleryItem(identifiers) {
393
- var _a, _b, _c;
394
- return __awaiter(this, arguments, void 0, function* () {
395
- const requestTransformation = {
396
- galleryId: '$[0].galleryId',
397
- itemId: '$[0].itemId',
398
- };
399
- const responseTransformation = '$.item';
400
- // @ts-ignore
401
- const { httpClient, sideEffects } = arguments[1];
402
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
403
- rootSchema: _getGalleryItemRequest,
404
- depSchemas: {},
405
- fqdnTransformation: {
406
- paths: [],
407
- transformation: _fromVeloEntity,
408
- },
409
- customTransformation: requestTransformation,
410
- });
411
- const { fromJSON } = (0, velo_1.serializer)({
412
- rootSchema: _getGalleryItemResponse,
413
- depSchemas: { _image, _item, _secondaryMedia, _video },
414
- fqdnTransformation: {
415
- paths: [],
416
- transformation: _toVeloEntity,
417
- },
418
- customTransformation: responseTransformation,
419
- });
420
- const payload = toAmbassadorRequest([identifiers]);
421
- const reqOpts = ambassadorWixProGalleryV2Gallery.getGalleryItem(payload);
422
- __log(`"GetGalleryItem" sending request with: ${__inspect(reqOpts)}`);
423
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
424
- try {
425
- const result = yield httpClient.request(reqOpts);
426
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
427
- return fromJSON(result.data);
428
- }
429
- catch (err) {
430
- const transformedError = (0, transform_error_1.transformError)(err, {
431
- spreadPathsToArguments: {},
432
- explicitPathsToArguments: {
433
- galleryId: '$[0].galleryId',
434
- itemId: '$[0].itemId',
435
- },
436
- singleArgumentUnchanged: false,
437
- }, ['identifiers']);
438
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
439
- throw transformedError;
440
- }
441
- });
442
- }
443
- exports.getGalleryItem = getGalleryItem;
444
- /**
445
- * Creates a gallery.
446
- *
447
- * The `createGallery()` function returns a Promise that resolves to a newly-created gallery after it has successfully been created.
448
- *
449
- * You can create your own gallery by providing the gallery information, or clone an existing gallery using the ID of that existing gallery. When a gallery is cloned, the newly-created gallery includes the same properties as the existing gallery except for the gallery and item IDs, sort order, and created and updated dates.
450
- *
451
- * The newly-created gallery is only available on your backend, and doesn't appear on your live site. To display your backend gallery on your live site, you need to connect it to a gallery component on your live site. To do this, import the `createGallery()` function to your page code, and write code to convert the backend gallery object to the frontend gallery component object. Once converted, the newly created backend gallery is visible on your live site. For reference, check out the code example, "Create a gallery and display it on your live site". To learn more, see [Displaying a Pro Gallery on Your Site Using the Pro Gallery Backend API](https://support.wix.com/en/article/velo-tutorial-displaying-a-pro-gallery-on-your-site-using-the-pro-gallery-backend-api).
452
- *
453
- * <blockquote class="important">
454
- *
455
- * __Important:__
456
- * When creating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
457
- *
458
- * </blockquote>
459
- *
460
- * #### Override permissions
461
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
462
- * <blockquote class='warning'>
463
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
464
- * </blockquote>
465
- * @public
466
- * @documentationMaturity preview
467
- * @requiredField options.gallery.items.image.imageInfo
468
- * @requiredField options.gallery.items.text.html
469
- * @requiredField options.gallery.items.video.videoInfo
470
- * @param options - Options to use when creating the gallery.
471
- * @permissionScope Manage Galleries
472
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
473
- * @applicableIdentity APP
474
- * @returns Created gallery.
475
- */
476
- function createGallery(options) {
477
- var _a, _b, _c;
478
- return __awaiter(this, arguments, void 0, function* () {
479
- const requestTransformation = {
480
- gallery: '$[0].gallery',
481
- cloneFromGalleryId: '$[0].cloneFromGalleryId',
482
- };
483
- const responseTransformation = '$.gallery';
484
- // @ts-ignore
485
- const { httpClient, sideEffects } = arguments[1];
486
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
487
- rootSchema: _createGalleryRequest,
488
- depSchemas: { _gallery, _image, _item, _secondaryMedia, _video },
489
- fqdnTransformation: {
490
- paths: [...['gallery']],
491
- transformation: _fromVeloEntity,
492
- },
493
- customTransformation: requestTransformation,
494
- });
495
- const { fromJSON } = (0, velo_1.serializer)({
496
- rootSchema: _createGalleryResponse,
497
- depSchemas: { _gallery, _image, _item, _secondaryMedia, _video },
498
- fqdnTransformation: {
499
- paths: [...['gallery']],
500
- transformation: _toVeloEntity,
501
- },
502
- customTransformation: responseTransformation,
503
- });
504
- const payload = toAmbassadorRequest([options]);
505
- const reqOpts = ambassadorWixProGalleryV2Gallery.createGallery(payload);
506
- __log(`"CreateGallery" sending request with: ${__inspect(reqOpts)}`);
507
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
508
- try {
509
- const result = yield httpClient.request(reqOpts);
510
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
511
- return fromJSON(result.data);
512
- }
513
- catch (err) {
514
- const transformedError = (0, transform_error_1.transformError)(err, {
515
- spreadPathsToArguments: {},
516
- explicitPathsToArguments: {
517
- gallery: '$[0].gallery',
518
- cloneFromGalleryId: '$[0].cloneFromGalleryId',
519
- },
520
- singleArgumentUnchanged: false,
521
- }, ['options']);
522
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
523
- throw transformedError;
524
- }
525
- });
526
- }
527
- exports.createGallery = createGallery;
528
- /**
529
- * Updates a gallery.
530
- *
531
- * The `updateGallery()` function returns a Promise that resolves to an updated gallery. Only the fields in the `gallery` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
532
- *
533
- * <blockquote class="important">
534
- *
535
- * __Important:__
536
- * When updating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
537
- *
538
- * </blockquote>
539
- *
540
- * #### Override permissions
541
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
542
- * <blockquote class='warning'>
543
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
544
- * </blockquote>
545
- * @public
546
- * @documentationMaturity preview
547
- * @requiredField _id
548
- * @requiredField gallery
549
- * @requiredField gallery.items.image.imageInfo
550
- * @requiredField gallery.items.text.html
551
- * @requiredField gallery.items.video.videoInfo
552
- * @param _id - ID of the gallery to update.
553
- * @param gallery - The information for the gallery being updated.
554
- * @permissionScope Manage Galleries
555
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
556
- * @applicableIdentity APP
557
- * @returns Updated gallery.
558
- */
559
- function updateGallery(_id, gallery) {
560
- var _a, _b, _c;
561
- return __awaiter(this, arguments, void 0, function* () {
562
- const requestTransformation = { gallery: { '*': '$[1]', id: '$[0]' } };
563
- const responseTransformation = '$.gallery';
564
- // @ts-ignore
565
- const { httpClient, sideEffects } = arguments[2];
566
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
567
- rootSchema: _updateGalleryRequest,
568
- depSchemas: { _gallery, _image, _item, _secondaryMedia, _video },
569
- fqdnTransformation: {
570
- paths: [...['gallery']],
571
- transformation: _fromVeloEntity,
572
- },
573
- customTransformation: requestTransformation,
574
- });
575
- const { fromJSON } = (0, velo_1.serializer)({
576
- rootSchema: _updateGalleryResponse,
577
- depSchemas: { _gallery, _image, _item, _secondaryMedia, _video },
578
- fqdnTransformation: {
579
- paths: [...['gallery']],
580
- transformation: _toVeloEntity,
581
- },
582
- customTransformation: responseTransformation,
583
- });
584
- const payload = toAmbassadorRequest([_id, gallery]);
585
- const reqOpts = ambassadorWixProGalleryV2Gallery.updateGallery(payload);
586
- __log(`"UpdateGallery" sending request with: ${__inspect(reqOpts)}`);
587
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
588
- try {
589
- const result = yield httpClient.request(reqOpts);
590
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
591
- return fromJSON(result.data);
592
- }
593
- catch (err) {
594
- const transformedError = (0, transform_error_1.transformError)(err, {
595
- spreadPathsToArguments: { gallery: '$[1]' },
596
- explicitPathsToArguments: { 'gallery.id': '$[0]' },
597
- singleArgumentUnchanged: false,
598
- }, ['_id', 'gallery']);
599
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
600
- throw transformedError;
601
- }
602
- });
603
- }
604
- exports.updateGallery = updateGallery;
605
- /**
606
- * Deletes a gallery.
607
- *
608
- * The `deleteGallery()` function returns a Promise that resolves to the ID of the deleted gallery. When a gallery is deleted, the deleted gallery is no longer returned when calling the [`listGalleries()`](#listgalleries) function.
609
- *
610
- * #### Override permissions
611
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
612
- * <blockquote class='warning'>
613
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
614
- * </blockquote>
615
- * @param galleryId - ID of the gallery to delete.
616
- * @public
617
- * @documentationMaturity preview
618
- * @requiredField galleryId
619
- * @permissionScope Manage Galleries
620
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
621
- * @applicableIdentity APP
622
- */
623
- function deleteGallery(galleryId) {
624
- var _a, _b, _c;
625
- return __awaiter(this, arguments, void 0, function* () {
626
- const requestTransformation = { galleryId: '$[0]' };
627
- const responseTransformation = '$';
628
- // @ts-ignore
629
- const { httpClient, sideEffects } = arguments[1];
630
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
631
- rootSchema: _deleteGalleryRequest,
632
- depSchemas: {},
633
- fqdnTransformation: {
634
- paths: [],
635
- transformation: _fromVeloEntity,
636
- },
637
- customTransformation: requestTransformation,
638
- });
639
- const { fromJSON } = (0, velo_1.serializer)({
640
- rootSchema: _deleteGalleryResponse,
641
- depSchemas: {},
642
- fqdnTransformation: {
643
- paths: [],
644
- transformation: _toVeloEntity,
645
- },
646
- customTransformation: responseTransformation,
647
- });
648
- const payload = toAmbassadorRequest([galleryId]);
649
- const reqOpts = ambassadorWixProGalleryV2Gallery.deleteGallery(payload);
650
- __log(`"DeleteGallery" sending request with: ${__inspect(reqOpts)}`);
651
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
652
- try {
653
- const result = yield httpClient.request(reqOpts);
654
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
655
- return fromJSON(result.data);
656
- }
657
- catch (err) {
658
- const transformedError = (0, transform_error_1.transformError)(err, {
659
- spreadPathsToArguments: {},
660
- explicitPathsToArguments: { galleryId: '$[0]' },
661
- singleArgumentUnchanged: false,
662
- }, ['galleryId']);
663
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
664
- throw transformedError;
665
- }
666
- });
667
- }
668
- exports.deleteGallery = deleteGallery;
669
- /**
670
- * Creates a media item in a specified gallery.
671
- *
672
- * The `createGalleryItem()` function returns a Promise that resolves to a newly-created gallery item after it has successfully been created.
673
- *
674
- * <blockquote class="important">
675
- *
676
- * __Important:__
677
- * When creating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
678
- *
679
- * </blockquote>
680
- *
681
- * #### Override permissions
682
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
683
- * <blockquote class='warning'>
684
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
685
- * </blockquote>
686
- * @param galleryId - Gallery ID.
687
- * @param item - Media item to create.
688
- * @public
689
- * @documentationMaturity preview
690
- * @requiredField galleryId
691
- * @requiredField item
692
- * @requiredField item.image.imageInfo
693
- * @requiredField item.text.html
694
- * @requiredField item.video.videoInfo
695
- * @permissionScope Manage Galleries
696
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
697
- * @applicableIdentity APP
698
- * @returns Created media item.
699
- */
700
- function createGalleryItem(galleryId, item) {
701
- var _a, _b, _c;
702
- return __awaiter(this, arguments, void 0, function* () {
703
- const requestTransformation = { galleryId: '$[0]', item: '$[1]' };
704
- const responseTransformation = '$.item';
705
- // @ts-ignore
706
- const { httpClient, sideEffects } = arguments[2];
707
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
708
- rootSchema: _createGalleryItemRequest,
709
- depSchemas: { _image, _item, _secondaryMedia, _video },
710
- fqdnTransformation: {
711
- paths: [],
712
- transformation: _fromVeloEntity,
713
- },
714
- customTransformation: requestTransformation,
715
- });
716
- const { fromJSON } = (0, velo_1.serializer)({
717
- rootSchema: _createGalleryItemResponse,
718
- depSchemas: { _image, _item, _secondaryMedia, _video },
719
- fqdnTransformation: {
720
- paths: [],
721
- transformation: _toVeloEntity,
722
- },
723
- customTransformation: responseTransformation,
724
- });
725
- const payload = toAmbassadorRequest([galleryId, item]);
726
- const reqOpts = ambassadorWixProGalleryV2Gallery.createGalleryItem(payload);
727
- __log(`"CreateGalleryItem" sending request with: ${__inspect(reqOpts)}`);
728
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
729
- try {
730
- const result = yield httpClient.request(reqOpts);
731
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
732
- return fromJSON(result.data);
733
- }
734
- catch (err) {
735
- const transformedError = (0, transform_error_1.transformError)(err, {
736
- spreadPathsToArguments: {},
737
- explicitPathsToArguments: { galleryId: '$[0]', item: '$[1]' },
738
- singleArgumentUnchanged: false,
739
- }, ['galleryId', 'item']);
740
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
741
- throw transformedError;
742
- }
743
- });
744
- }
745
- exports.createGalleryItem = createGalleryItem;
746
- /**
747
- * Updates a media item in a specified gallery.
748
- *
749
- * The `updateGalleryItem()` function returns a Promise that resolves to an updated gallery item. Only the fields in the `item` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
750
- *
751
- * <blockquote class="important">
752
- *
753
- * __Important:__
754
- * When updating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
755
- *
756
- * </blockquote>
757
- *
758
- * #### Override permissions
759
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
760
- * <blockquote class='warning'>
761
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
762
- * </blockquote>
763
- * @public
764
- * @documentationMaturity preview
765
- * @requiredField identifiers
766
- * @requiredField identifiers.galleryId
767
- * @requiredField identifiers.itemId
768
- * @requiredField item
769
- * @requiredField item.image.imageInfo
770
- * @requiredField item.text.html
771
- * @requiredField item.video.videoInfo
772
- * @param item - The information for the gallery item being updated.
773
- * @param identifiers - Gallery ID and Item ID.
774
- * @permissionScope Manage Galleries
775
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
776
- * @applicableIdentity APP
777
- * @returns Updated media item.
778
- */
779
- function updateGalleryItem(identifiers, item) {
780
- var _a, _b, _c;
781
- return __awaiter(this, arguments, void 0, function* () {
782
- const requestTransformation = {
783
- galleryId: '$[0].galleryId',
784
- item: { '*': '$[1]', id: '$[0].itemId' },
785
- };
786
- const responseTransformation = '$.item';
787
- // @ts-ignore
788
- const { httpClient, sideEffects } = arguments[2];
789
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
790
- rootSchema: _updateGalleryItemRequest,
791
- depSchemas: { _image, _item, _secondaryMedia, _video },
792
- fqdnTransformation: {
793
- paths: [],
794
- transformation: _fromVeloEntity,
795
- },
796
- customTransformation: requestTransformation,
797
- });
798
- const { fromJSON } = (0, velo_1.serializer)({
799
- rootSchema: _updateGalleryItemResponse,
800
- depSchemas: { _image, _item, _secondaryMedia, _video },
801
- fqdnTransformation: {
802
- paths: [],
803
- transformation: _toVeloEntity,
804
- },
805
- customTransformation: responseTransformation,
806
- });
807
- const payload = toAmbassadorRequest([identifiers, item]);
808
- const reqOpts = ambassadorWixProGalleryV2Gallery.updateGalleryItem(payload);
809
- __log(`"UpdateGalleryItem" sending request with: ${__inspect(reqOpts)}`);
810
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
811
- try {
812
- const result = yield httpClient.request(reqOpts);
813
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
814
- return fromJSON(result.data);
815
- }
816
- catch (err) {
817
- const transformedError = (0, transform_error_1.transformError)(err, {
818
- spreadPathsToArguments: { item: '$[1]' },
819
- explicitPathsToArguments: {
820
- galleryId: '$[0].galleryId',
821
- 'item.id': '$[0].itemId',
822
- },
823
- singleArgumentUnchanged: false,
824
- }, ['identifiers', 'item']);
825
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
826
- throw transformedError;
827
- }
828
- });
829
- }
830
- exports.updateGalleryItem = updateGalleryItem;
831
- /**
832
- * Deletes a media item from a gallery.
833
- *
834
- * The `deleteGalleryItem()` function returns a Promise that resolves to the ID of the deleted gallery item. When a gallery item is deleted, the deleted gallery item is no longer returned when calling the [`listGalleryItems()`](#listgalleryitems) function.
835
- *
836
- * #### Override permissions
837
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
838
- * <blockquote class='warning'>
839
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
840
- * </blockquote>
841
- * @public
842
- * @documentationMaturity preview
843
- * @requiredField identifiers
844
- * @requiredField identifiers.galleryId
845
- * @requiredField identifiers.itemId
846
- * @param identifiers - Gallery ID and Item ID.
847
- * @permissionScope Manage Galleries
848
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
849
- * @applicableIdentity APP
850
- */
851
- function deleteGalleryItem(identifiers) {
852
- var _a, _b, _c;
853
- return __awaiter(this, arguments, void 0, function* () {
854
- const requestTransformation = {
855
- galleryId: '$[0].galleryId',
856
- itemId: '$[0].itemId',
857
- };
858
- const responseTransformation = '$';
859
- // @ts-ignore
860
- const { httpClient, sideEffects } = arguments[1];
861
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
862
- rootSchema: _deleteGalleryItemRequest,
863
- depSchemas: {},
864
- fqdnTransformation: {
865
- paths: [],
866
- transformation: _fromVeloEntity,
867
- },
868
- customTransformation: requestTransformation,
869
- });
870
- const { fromJSON } = (0, velo_1.serializer)({
871
- rootSchema: _deleteGalleryItemResponse,
872
- depSchemas: {},
873
- fqdnTransformation: {
874
- paths: [],
875
- transformation: _toVeloEntity,
876
- },
877
- customTransformation: responseTransformation,
878
- });
879
- const payload = toAmbassadorRequest([identifiers]);
880
- const reqOpts = ambassadorWixProGalleryV2Gallery.deleteGalleryItem(payload);
881
- __log(`"DeleteGalleryItem" sending request with: ${__inspect(reqOpts)}`);
882
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
883
- try {
884
- const result = yield httpClient.request(reqOpts);
885
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
886
- return fromJSON(result.data);
887
- }
888
- catch (err) {
889
- const transformedError = (0, transform_error_1.transformError)(err, {
890
- spreadPathsToArguments: {},
891
- explicitPathsToArguments: {
892
- galleryId: '$[0].galleryId',
893
- itemId: '$[0].itemId',
894
- },
895
- singleArgumentUnchanged: false,
896
- }, ['identifiers']);
897
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
898
- throw transformedError;
899
- }
900
- });
901
- }
902
- exports.deleteGalleryItem = deleteGalleryItem;
903
- //# sourceMappingURL=pro-gallery-v2-gallery.universal.js.map