@wix/auto_sdk_pro-gallery_pro-gallery 1.0.8 → 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.
- package/build/index.d.mts +213 -0
- package/build/index.d.ts +213 -0
- package/build/index.js +1834 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1784 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +213 -0
- package/build/internal/index.d.ts +213 -0
- package/build/internal/index.js +1834 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1784 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +498 -0
- package/build/internal/meta.d.ts +498 -0
- package/build/internal/meta.js +1054 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +1016 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{es/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → internal/pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.mts} +438 -516
- package/build/{cjs/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → internal/pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.ts} +438 -516
- package/build/meta.d.mts +498 -0
- package/build/meta.d.ts +498 -0
- package/build/meta.js +1054 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +1016 -0
- package/build/meta.mjs.map +1 -0
- package/build/{internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.mts} +438 -516
- package/build/{internal/es/src/pro-gallery-v2-gallery-pro-gallery.types.d.ts → pro-gallery-v2-gallery-pro-gallery.universal-KXp1KG3k.d.ts} +438 -516
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -69
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -875
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -256
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -309
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -103
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1830
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -850
- package/build/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -56
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -860
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -218
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -284
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -100
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1830
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -812
- package/build/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -69
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -875
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -256
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -309
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -103
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1830
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -850
- package/build/internal/cjs/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.context.d.ts +0 -56
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.context.js +0 -56
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.context.js.map +0 -1
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.http.d.ts +0 -90
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.http.js +0 -860
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.http.js.map +0 -1
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.meta.d.ts +0 -47
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js +0 -218
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.meta.js.map +0 -1
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.public.d.ts +0 -167
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.public.js +0 -284
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.public.js.map +0 -1
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.types.js +0 -100
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.types.js.map +0 -1
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.universal.d.ts +0 -1830
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js +0 -812
- package/build/internal/es/src/pro-gallery-v2-gallery-pro-gallery.universal.js.map +0 -1
@@ -1,875 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.deleteGalleryItem = exports.updateGalleryItem = exports.createGalleryItem = exports.bulkDeleteGalleryItems = exports.deleteGalleryItems = exports.deleteGallery = exports.updateGallery = exports.createGallery = exports.getGalleryItem = exports.listGalleryItems = exports.getGallery = exports.listGalleries = void 0;
|
4
|
-
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
5
|
-
const float_1 = require("@wix/sdk-runtime/transformations/float");
|
6
|
-
const float_2 = require("@wix/sdk-runtime/transformations/float");
|
7
|
-
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
8
|
-
const timestamp_2 = require("@wix/sdk-runtime/transformations/timestamp");
|
9
|
-
const field_mask_1 = require("@wix/sdk-runtime/transformations/field-mask");
|
10
|
-
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
11
|
-
const rest_modules_2 = require("@wix/sdk-runtime/rest-modules");
|
12
|
-
function resolveComWixpressExposureProgalleryProGalleryUrl(opts) {
|
13
|
-
const domainToMappings = {
|
14
|
-
_: [
|
15
|
-
{
|
16
|
-
srcPath: '/_api/pro-gallery-server',
|
17
|
-
destPath: '',
|
18
|
-
},
|
19
|
-
],
|
20
|
-
'manage._base_domain_': [
|
21
|
-
{
|
22
|
-
srcPath: '/_api/pro-gallery-server',
|
23
|
-
destPath: '',
|
24
|
-
},
|
25
|
-
],
|
26
|
-
'www._base_domain_': [
|
27
|
-
{
|
28
|
-
srcPath: '/_api/pro-gallery-server',
|
29
|
-
destPath: '',
|
30
|
-
},
|
31
|
-
],
|
32
|
-
'editor._base_domain_': [
|
33
|
-
{
|
34
|
-
srcPath: '/_api/pro-gallery-server',
|
35
|
-
destPath: '',
|
36
|
-
},
|
37
|
-
],
|
38
|
-
'blocks._base_domain_': [
|
39
|
-
{
|
40
|
-
srcPath: '/_api/pro-gallery-server',
|
41
|
-
destPath: '',
|
42
|
-
},
|
43
|
-
],
|
44
|
-
'create.editorx': [
|
45
|
-
{
|
46
|
-
srcPath: '/_api/pro-gallery-server',
|
47
|
-
destPath: '',
|
48
|
-
},
|
49
|
-
],
|
50
|
-
'progallery.wixapps.net': [
|
51
|
-
{
|
52
|
-
srcPath: '/_api/pro-gallery-server',
|
53
|
-
destPath: '',
|
54
|
-
},
|
55
|
-
],
|
56
|
-
'www.wixapis.com': [
|
57
|
-
{
|
58
|
-
srcPath: '/progallery',
|
59
|
-
destPath: '',
|
60
|
-
},
|
61
|
-
],
|
62
|
-
'*.dev.wix-code.com': [
|
63
|
-
{
|
64
|
-
srcPath: '/_api/pro-gallery-server',
|
65
|
-
destPath: '',
|
66
|
-
},
|
67
|
-
],
|
68
|
-
'api._api_base_domain_': [
|
69
|
-
{
|
70
|
-
srcPath: '/prime-server-proxy',
|
71
|
-
destPath: '',
|
72
|
-
},
|
73
|
-
],
|
74
|
-
};
|
75
|
-
return (0, rest_modules_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
76
|
-
}
|
77
|
-
const PACKAGE_NAME = '@wix/auto_sdk_pro-gallery_pro-gallery';
|
78
|
-
/**
|
79
|
-
* Retrieves a list of galleries.
|
80
|
-
*
|
81
|
-
* This function retrieves 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.
|
82
|
-
*/
|
83
|
-
function listGalleries(payload) {
|
84
|
-
function __listGalleries({ host }) {
|
85
|
-
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
86
|
-
{
|
87
|
-
transformFn: field_mask_1.transformSDKFieldMaskToRESTFieldMask,
|
88
|
-
paths: [{ path: 'fields' }],
|
89
|
-
},
|
90
|
-
]);
|
91
|
-
const metadata = {
|
92
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
93
|
-
method: 'GET',
|
94
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.ListGalleries',
|
95
|
-
packageName: PACKAGE_NAME,
|
96
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
97
|
-
protoPath: '/v2/galleries',
|
98
|
-
data: serializedData,
|
99
|
-
host,
|
100
|
-
}),
|
101
|
-
params: (0, rest_modules_1.toURLSearchParams)(serializedData),
|
102
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
103
|
-
{
|
104
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
105
|
-
paths: [
|
106
|
-
{ path: 'galleries.sortOrder' },
|
107
|
-
{ path: 'galleries.items.sortOrder' },
|
108
|
-
{ path: 'galleries.items.image.focalPoint.x' },
|
109
|
-
{ path: 'galleries.items.image.focalPoint.y' },
|
110
|
-
{ path: 'galleries.items.secondaryMedia.image.focalPoint.x' },
|
111
|
-
{ path: 'galleries.items.secondaryMedia.image.focalPoint.y' },
|
112
|
-
{ path: 'galleries.items.image.unsharpMasking.amount' },
|
113
|
-
{ path: 'galleries.items.image.unsharpMasking.radius' },
|
114
|
-
{ path: 'galleries.items.image.unsharpMasking.threshold' },
|
115
|
-
{
|
116
|
-
path: 'galleries.items.secondaryMedia.image.unsharpMasking.amount',
|
117
|
-
},
|
118
|
-
{
|
119
|
-
path: 'galleries.items.secondaryMedia.image.unsharpMasking.radius',
|
120
|
-
},
|
121
|
-
{
|
122
|
-
path: 'galleries.items.secondaryMedia.image.unsharpMasking.threshold',
|
123
|
-
},
|
124
|
-
],
|
125
|
-
},
|
126
|
-
{
|
127
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
128
|
-
paths: [
|
129
|
-
{ path: 'galleries.createdDate' },
|
130
|
-
{ path: 'galleries.items.createdDate' },
|
131
|
-
{ path: 'galleries.items.updatedDate' },
|
132
|
-
{ path: 'galleries.items.image.imageInfo.urlExpirationDate' },
|
133
|
-
{ path: 'galleries.items.video.videoInfo.urlExpirationDate' },
|
134
|
-
{
|
135
|
-
path: 'galleries.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
136
|
-
},
|
137
|
-
{
|
138
|
-
path: 'galleries.items.video.videoInfo.posters.urlExpirationDate',
|
139
|
-
},
|
140
|
-
{
|
141
|
-
path: 'galleries.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
142
|
-
},
|
143
|
-
],
|
144
|
-
},
|
145
|
-
]),
|
146
|
-
};
|
147
|
-
return metadata;
|
148
|
-
}
|
149
|
-
return __listGalleries;
|
150
|
-
}
|
151
|
-
exports.listGalleries = listGalleries;
|
152
|
-
/** Retrieves a gallery by ID. */
|
153
|
-
function getGallery(payload) {
|
154
|
-
function __getGallery({ host }) {
|
155
|
-
const metadata = {
|
156
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
157
|
-
method: 'GET',
|
158
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.GetGallery',
|
159
|
-
packageName: PACKAGE_NAME,
|
160
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
161
|
-
protoPath: '/v2/galleries/{galleryId}',
|
162
|
-
data: payload,
|
163
|
-
host,
|
164
|
-
}),
|
165
|
-
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
166
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
167
|
-
{
|
168
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
169
|
-
paths: [
|
170
|
-
{ path: 'gallery.sortOrder' },
|
171
|
-
{ path: 'gallery.items.sortOrder' },
|
172
|
-
{ path: 'gallery.items.image.focalPoint.x' },
|
173
|
-
{ path: 'gallery.items.image.focalPoint.y' },
|
174
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
|
175
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
|
176
|
-
{ path: 'gallery.items.image.unsharpMasking.amount' },
|
177
|
-
{ path: 'gallery.items.image.unsharpMasking.radius' },
|
178
|
-
{ path: 'gallery.items.image.unsharpMasking.threshold' },
|
179
|
-
{
|
180
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
|
181
|
-
},
|
182
|
-
{
|
183
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
|
184
|
-
},
|
185
|
-
{
|
186
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
|
187
|
-
},
|
188
|
-
],
|
189
|
-
},
|
190
|
-
{
|
191
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
192
|
-
paths: [
|
193
|
-
{ path: 'gallery.createdDate' },
|
194
|
-
{ path: 'gallery.items.createdDate' },
|
195
|
-
{ path: 'gallery.items.updatedDate' },
|
196
|
-
{ path: 'gallery.items.image.imageInfo.urlExpirationDate' },
|
197
|
-
{ path: 'gallery.items.video.videoInfo.urlExpirationDate' },
|
198
|
-
{
|
199
|
-
path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
200
|
-
},
|
201
|
-
{
|
202
|
-
path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
|
203
|
-
},
|
204
|
-
{
|
205
|
-
path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
206
|
-
},
|
207
|
-
],
|
208
|
-
},
|
209
|
-
]),
|
210
|
-
};
|
211
|
-
return metadata;
|
212
|
-
}
|
213
|
-
return __getGallery;
|
214
|
-
}
|
215
|
-
exports.getGallery = getGallery;
|
216
|
-
/**
|
217
|
-
* Retrieves a list of media items in a specified gallery.
|
218
|
-
*
|
219
|
-
* This function retrieves a list of up to 100 gallery items. The gallery items are listed by `sortOrder` in descending order.
|
220
|
-
*/
|
221
|
-
function listGalleryItems(payload) {
|
222
|
-
function __listGalleryItems({ host }) {
|
223
|
-
const metadata = {
|
224
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
225
|
-
method: 'GET',
|
226
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.ListGalleryItems',
|
227
|
-
packageName: PACKAGE_NAME,
|
228
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
229
|
-
protoPath: '/v2/galleries/{galleryId}/items',
|
230
|
-
data: payload,
|
231
|
-
host,
|
232
|
-
}),
|
233
|
-
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
234
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
235
|
-
{
|
236
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
237
|
-
paths: [
|
238
|
-
{ path: 'items.sortOrder' },
|
239
|
-
{ path: 'items.image.focalPoint.x' },
|
240
|
-
{ path: 'items.image.focalPoint.y' },
|
241
|
-
{ path: 'items.secondaryMedia.image.focalPoint.x' },
|
242
|
-
{ path: 'items.secondaryMedia.image.focalPoint.y' },
|
243
|
-
{ path: 'items.image.unsharpMasking.amount' },
|
244
|
-
{ path: 'items.image.unsharpMasking.radius' },
|
245
|
-
{ path: 'items.image.unsharpMasking.threshold' },
|
246
|
-
{ path: 'items.secondaryMedia.image.unsharpMasking.amount' },
|
247
|
-
{ path: 'items.secondaryMedia.image.unsharpMasking.radius' },
|
248
|
-
{ path: 'items.secondaryMedia.image.unsharpMasking.threshold' },
|
249
|
-
],
|
250
|
-
},
|
251
|
-
{
|
252
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
253
|
-
paths: [
|
254
|
-
{ path: 'items.createdDate' },
|
255
|
-
{ path: 'items.updatedDate' },
|
256
|
-
{ path: 'items.image.imageInfo.urlExpirationDate' },
|
257
|
-
{ path: 'items.video.videoInfo.urlExpirationDate' },
|
258
|
-
{
|
259
|
-
path: 'items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
260
|
-
},
|
261
|
-
{ path: 'items.video.videoInfo.posters.urlExpirationDate' },
|
262
|
-
{
|
263
|
-
path: 'items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
264
|
-
},
|
265
|
-
],
|
266
|
-
},
|
267
|
-
]),
|
268
|
-
};
|
269
|
-
return metadata;
|
270
|
-
}
|
271
|
-
return __listGalleryItems;
|
272
|
-
}
|
273
|
-
exports.listGalleryItems = listGalleryItems;
|
274
|
-
/** Retrieves a gallery item by ID. */
|
275
|
-
function getGalleryItem(payload) {
|
276
|
-
function __getGalleryItem({ host }) {
|
277
|
-
const metadata = {
|
278
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
279
|
-
method: 'GET',
|
280
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.GetGalleryItem',
|
281
|
-
packageName: PACKAGE_NAME,
|
282
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
283
|
-
protoPath: '/v2/galleries/{galleryId}/items/{itemId}',
|
284
|
-
data: payload,
|
285
|
-
host,
|
286
|
-
}),
|
287
|
-
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
288
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
289
|
-
{
|
290
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
291
|
-
paths: [
|
292
|
-
{ path: 'item.sortOrder' },
|
293
|
-
{ path: 'item.image.focalPoint.x' },
|
294
|
-
{ path: 'item.image.focalPoint.y' },
|
295
|
-
{ path: 'item.secondaryMedia.image.focalPoint.x' },
|
296
|
-
{ path: 'item.secondaryMedia.image.focalPoint.y' },
|
297
|
-
{ path: 'item.image.unsharpMasking.amount' },
|
298
|
-
{ path: 'item.image.unsharpMasking.radius' },
|
299
|
-
{ path: 'item.image.unsharpMasking.threshold' },
|
300
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.amount' },
|
301
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.radius' },
|
302
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
|
303
|
-
],
|
304
|
-
},
|
305
|
-
{
|
306
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
307
|
-
paths: [
|
308
|
-
{ path: 'item.createdDate' },
|
309
|
-
{ path: 'item.updatedDate' },
|
310
|
-
{ path: 'item.image.imageInfo.urlExpirationDate' },
|
311
|
-
{ path: 'item.video.videoInfo.urlExpirationDate' },
|
312
|
-
{
|
313
|
-
path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
|
314
|
-
},
|
315
|
-
{ path: 'item.video.videoInfo.posters.urlExpirationDate' },
|
316
|
-
{ path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
|
317
|
-
],
|
318
|
-
},
|
319
|
-
]),
|
320
|
-
};
|
321
|
-
return metadata;
|
322
|
-
}
|
323
|
-
return __getGalleryItem;
|
324
|
-
}
|
325
|
-
exports.getGalleryItem = getGalleryItem;
|
326
|
-
/**
|
327
|
-
* Creates a new gallery.
|
328
|
-
*
|
329
|
-
* 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.
|
330
|
-
*
|
331
|
-
* 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).
|
332
|
-
*
|
333
|
-
* <blockquote class="important">
|
334
|
-
*
|
335
|
-
* __Important:__
|
336
|
-
* 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.
|
337
|
-
*
|
338
|
-
* </blockquote>
|
339
|
-
*/
|
340
|
-
function createGallery(payload) {
|
341
|
-
function __createGallery({ host }) {
|
342
|
-
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
343
|
-
{
|
344
|
-
transformFn: float_1.transformSDKFloatToRESTFloat,
|
345
|
-
paths: [
|
346
|
-
{ path: 'gallery.sortOrder' },
|
347
|
-
{ path: 'gallery.items.sortOrder' },
|
348
|
-
{ path: 'gallery.items.image.focalPoint.x' },
|
349
|
-
{ path: 'gallery.items.image.focalPoint.y' },
|
350
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
|
351
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
|
352
|
-
{ path: 'gallery.items.image.unsharpMasking.amount' },
|
353
|
-
{ path: 'gallery.items.image.unsharpMasking.radius' },
|
354
|
-
{ path: 'gallery.items.image.unsharpMasking.threshold' },
|
355
|
-
{ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount' },
|
356
|
-
{ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius' },
|
357
|
-
{
|
358
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
|
359
|
-
},
|
360
|
-
],
|
361
|
-
},
|
362
|
-
{
|
363
|
-
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
364
|
-
paths: [
|
365
|
-
{ path: 'gallery.createdDate' },
|
366
|
-
{ path: 'gallery.items.createdDate' },
|
367
|
-
{ path: 'gallery.items.updatedDate' },
|
368
|
-
{ path: 'gallery.items.image.imageInfo.urlExpirationDate' },
|
369
|
-
{ path: 'gallery.items.video.videoInfo.urlExpirationDate' },
|
370
|
-
{
|
371
|
-
path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
372
|
-
},
|
373
|
-
{ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate' },
|
374
|
-
{
|
375
|
-
path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
376
|
-
},
|
377
|
-
],
|
378
|
-
},
|
379
|
-
]);
|
380
|
-
const metadata = {
|
381
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
382
|
-
method: 'POST',
|
383
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.CreateGallery',
|
384
|
-
packageName: PACKAGE_NAME,
|
385
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
386
|
-
protoPath: '/v2/galleries',
|
387
|
-
data: serializedData,
|
388
|
-
host,
|
389
|
-
}),
|
390
|
-
data: serializedData,
|
391
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
392
|
-
{
|
393
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
394
|
-
paths: [
|
395
|
-
{ path: 'gallery.sortOrder' },
|
396
|
-
{ path: 'gallery.items.sortOrder' },
|
397
|
-
{ path: 'gallery.items.image.focalPoint.x' },
|
398
|
-
{ path: 'gallery.items.image.focalPoint.y' },
|
399
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
|
400
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
|
401
|
-
{ path: 'gallery.items.image.unsharpMasking.amount' },
|
402
|
-
{ path: 'gallery.items.image.unsharpMasking.radius' },
|
403
|
-
{ path: 'gallery.items.image.unsharpMasking.threshold' },
|
404
|
-
{
|
405
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
|
406
|
-
},
|
407
|
-
{
|
408
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
|
409
|
-
},
|
410
|
-
{
|
411
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
|
412
|
-
},
|
413
|
-
],
|
414
|
-
},
|
415
|
-
{
|
416
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
417
|
-
paths: [
|
418
|
-
{ path: 'gallery.createdDate' },
|
419
|
-
{ path: 'gallery.items.createdDate' },
|
420
|
-
{ path: 'gallery.items.updatedDate' },
|
421
|
-
{ path: 'gallery.items.image.imageInfo.urlExpirationDate' },
|
422
|
-
{ path: 'gallery.items.video.videoInfo.urlExpirationDate' },
|
423
|
-
{
|
424
|
-
path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
425
|
-
},
|
426
|
-
{
|
427
|
-
path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
|
428
|
-
},
|
429
|
-
{
|
430
|
-
path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
431
|
-
},
|
432
|
-
],
|
433
|
-
},
|
434
|
-
]),
|
435
|
-
};
|
436
|
-
return metadata;
|
437
|
-
}
|
438
|
-
return __createGallery;
|
439
|
-
}
|
440
|
-
exports.createGallery = createGallery;
|
441
|
-
/**
|
442
|
-
* Updates a gallery.
|
443
|
-
*
|
444
|
-
* Only the fields in the `gallery` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
|
445
|
-
*
|
446
|
-
* <blockquote class="important">
|
447
|
-
*
|
448
|
-
* __Important:__
|
449
|
-
* 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.
|
450
|
-
*
|
451
|
-
* </blockquote>
|
452
|
-
*/
|
453
|
-
function updateGallery(payload) {
|
454
|
-
function __updateGallery({ host }) {
|
455
|
-
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
456
|
-
{
|
457
|
-
transformFn: float_1.transformSDKFloatToRESTFloat,
|
458
|
-
paths: [
|
459
|
-
{ path: 'gallery.sortOrder' },
|
460
|
-
{ path: 'gallery.items.sortOrder' },
|
461
|
-
{ path: 'gallery.items.image.focalPoint.x' },
|
462
|
-
{ path: 'gallery.items.image.focalPoint.y' },
|
463
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
|
464
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
|
465
|
-
{ path: 'gallery.items.image.unsharpMasking.amount' },
|
466
|
-
{ path: 'gallery.items.image.unsharpMasking.radius' },
|
467
|
-
{ path: 'gallery.items.image.unsharpMasking.threshold' },
|
468
|
-
{ path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount' },
|
469
|
-
{ path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius' },
|
470
|
-
{
|
471
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
|
472
|
-
},
|
473
|
-
],
|
474
|
-
},
|
475
|
-
{
|
476
|
-
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
477
|
-
paths: [
|
478
|
-
{ path: 'gallery.createdDate' },
|
479
|
-
{ path: 'gallery.items.createdDate' },
|
480
|
-
{ path: 'gallery.items.updatedDate' },
|
481
|
-
{ path: 'gallery.items.image.imageInfo.urlExpirationDate' },
|
482
|
-
{ path: 'gallery.items.video.videoInfo.urlExpirationDate' },
|
483
|
-
{
|
484
|
-
path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
485
|
-
},
|
486
|
-
{ path: 'gallery.items.video.videoInfo.posters.urlExpirationDate' },
|
487
|
-
{
|
488
|
-
path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
489
|
-
},
|
490
|
-
],
|
491
|
-
},
|
492
|
-
]);
|
493
|
-
const metadata = {
|
494
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
495
|
-
method: 'PATCH',
|
496
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.UpdateGallery',
|
497
|
-
packageName: PACKAGE_NAME,
|
498
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
499
|
-
protoPath: '/v2/galleries/{gallery.id}',
|
500
|
-
data: serializedData,
|
501
|
-
host,
|
502
|
-
}),
|
503
|
-
data: serializedData,
|
504
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
505
|
-
{
|
506
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
507
|
-
paths: [
|
508
|
-
{ path: 'gallery.sortOrder' },
|
509
|
-
{ path: 'gallery.items.sortOrder' },
|
510
|
-
{ path: 'gallery.items.image.focalPoint.x' },
|
511
|
-
{ path: 'gallery.items.image.focalPoint.y' },
|
512
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
|
513
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
|
514
|
-
{ path: 'gallery.items.image.unsharpMasking.amount' },
|
515
|
-
{ path: 'gallery.items.image.unsharpMasking.radius' },
|
516
|
-
{ path: 'gallery.items.image.unsharpMasking.threshold' },
|
517
|
-
{
|
518
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
|
519
|
-
},
|
520
|
-
{
|
521
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
|
522
|
-
},
|
523
|
-
{
|
524
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
|
525
|
-
},
|
526
|
-
],
|
527
|
-
},
|
528
|
-
{
|
529
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
530
|
-
paths: [
|
531
|
-
{ path: 'gallery.createdDate' },
|
532
|
-
{ path: 'gallery.items.createdDate' },
|
533
|
-
{ path: 'gallery.items.updatedDate' },
|
534
|
-
{ path: 'gallery.items.image.imageInfo.urlExpirationDate' },
|
535
|
-
{ path: 'gallery.items.video.videoInfo.urlExpirationDate' },
|
536
|
-
{
|
537
|
-
path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
538
|
-
},
|
539
|
-
{
|
540
|
-
path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
|
541
|
-
},
|
542
|
-
{
|
543
|
-
path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
544
|
-
},
|
545
|
-
],
|
546
|
-
},
|
547
|
-
]),
|
548
|
-
};
|
549
|
-
return metadata;
|
550
|
-
}
|
551
|
-
return __updateGallery;
|
552
|
-
}
|
553
|
-
exports.updateGallery = updateGallery;
|
554
|
-
/**
|
555
|
-
* Deletes a gallery.
|
556
|
-
*
|
557
|
-
* When a gallery is deleted, the deleted gallery is no longer returned when calling the [`listGalleries()`](/pro-gallery/list-galleries) function.
|
558
|
-
*/
|
559
|
-
function deleteGallery(payload) {
|
560
|
-
function __deleteGallery({ host }) {
|
561
|
-
const metadata = {
|
562
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
563
|
-
method: 'DELETE',
|
564
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGallery',
|
565
|
-
packageName: PACKAGE_NAME,
|
566
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
567
|
-
protoPath: '/v2/galleries/{galleryId}',
|
568
|
-
data: payload,
|
569
|
-
host,
|
570
|
-
}),
|
571
|
-
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
572
|
-
};
|
573
|
-
return metadata;
|
574
|
-
}
|
575
|
-
return __deleteGallery;
|
576
|
-
}
|
577
|
-
exports.deleteGallery = deleteGallery;
|
578
|
-
/**
|
579
|
-
* Deletes multiple media items from a gallery.
|
580
|
-
* @deprecated It has been replaced with wix.pro_gallery.v2.gallery.BulkDeleteGalleryItems(), and will be removed on 2024-08-15.
|
581
|
-
*/
|
582
|
-
function deleteGalleryItems(payload) {
|
583
|
-
function __deleteGalleryItems({ host }) {
|
584
|
-
const metadata = {
|
585
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
586
|
-
method: 'DELETE',
|
587
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItems',
|
588
|
-
packageName: PACKAGE_NAME,
|
589
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
590
|
-
protoPath: '/v2/galleries/{galleryId}/items',
|
591
|
-
data: payload,
|
592
|
-
host,
|
593
|
-
}),
|
594
|
-
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
595
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
596
|
-
{
|
597
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
598
|
-
paths: [
|
599
|
-
{ path: 'gallery.sortOrder' },
|
600
|
-
{ path: 'gallery.items.sortOrder' },
|
601
|
-
{ path: 'gallery.items.image.focalPoint.x' },
|
602
|
-
{ path: 'gallery.items.image.focalPoint.y' },
|
603
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.x' },
|
604
|
-
{ path: 'gallery.items.secondaryMedia.image.focalPoint.y' },
|
605
|
-
{ path: 'gallery.items.image.unsharpMasking.amount' },
|
606
|
-
{ path: 'gallery.items.image.unsharpMasking.radius' },
|
607
|
-
{ path: 'gallery.items.image.unsharpMasking.threshold' },
|
608
|
-
{
|
609
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.amount',
|
610
|
-
},
|
611
|
-
{
|
612
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.radius',
|
613
|
-
},
|
614
|
-
{
|
615
|
-
path: 'gallery.items.secondaryMedia.image.unsharpMasking.threshold',
|
616
|
-
},
|
617
|
-
],
|
618
|
-
},
|
619
|
-
{
|
620
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
621
|
-
paths: [
|
622
|
-
{ path: 'gallery.createdDate' },
|
623
|
-
{ path: 'gallery.items.createdDate' },
|
624
|
-
{ path: 'gallery.items.updatedDate' },
|
625
|
-
{ path: 'gallery.items.image.imageInfo.urlExpirationDate' },
|
626
|
-
{ path: 'gallery.items.video.videoInfo.urlExpirationDate' },
|
627
|
-
{
|
628
|
-
path: 'gallery.items.video.videoInfo.resolutions.poster.urlExpirationDate',
|
629
|
-
},
|
630
|
-
{
|
631
|
-
path: 'gallery.items.video.videoInfo.posters.urlExpirationDate',
|
632
|
-
},
|
633
|
-
{
|
634
|
-
path: 'gallery.items.secondaryMedia.image.imageInfo.urlExpirationDate',
|
635
|
-
},
|
636
|
-
],
|
637
|
-
},
|
638
|
-
]),
|
639
|
-
};
|
640
|
-
return metadata;
|
641
|
-
}
|
642
|
-
return __deleteGalleryItems;
|
643
|
-
}
|
644
|
-
exports.deleteGalleryItems = deleteGalleryItems;
|
645
|
-
/** Deletes multiple media items from a gallery. */
|
646
|
-
function bulkDeleteGalleryItems(payload) {
|
647
|
-
function __bulkDeleteGalleryItems({ host }) {
|
648
|
-
const metadata = {
|
649
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
650
|
-
method: 'POST',
|
651
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.BulkDeleteGalleryItems',
|
652
|
-
packageName: PACKAGE_NAME,
|
653
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
654
|
-
protoPath: '/v2/galleries/{galleryId}/items/delete',
|
655
|
-
data: payload,
|
656
|
-
host,
|
657
|
-
}),
|
658
|
-
data: payload,
|
659
|
-
};
|
660
|
-
return metadata;
|
661
|
-
}
|
662
|
-
return __bulkDeleteGalleryItems;
|
663
|
-
}
|
664
|
-
exports.bulkDeleteGalleryItems = bulkDeleteGalleryItems;
|
665
|
-
/**
|
666
|
-
* Creates a media item in a specified gallery.
|
667
|
-
*
|
668
|
-
* The `createGalleryItem()` function returns a Promise that resolves to a newly-created gallery item after it has successfully been created.
|
669
|
-
*
|
670
|
-
* <blockquote class="important">
|
671
|
-
*
|
672
|
-
* __Important:__
|
673
|
-
* 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.
|
674
|
-
*
|
675
|
-
* </blockquote>
|
676
|
-
*/
|
677
|
-
function createGalleryItem(payload) {
|
678
|
-
function __createGalleryItem({ host }) {
|
679
|
-
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
680
|
-
{
|
681
|
-
transformFn: float_1.transformSDKFloatToRESTFloat,
|
682
|
-
paths: [
|
683
|
-
{ path: 'item.sortOrder' },
|
684
|
-
{ path: 'item.image.focalPoint.x' },
|
685
|
-
{ path: 'item.image.focalPoint.y' },
|
686
|
-
{ path: 'item.secondaryMedia.image.focalPoint.x' },
|
687
|
-
{ path: 'item.secondaryMedia.image.focalPoint.y' },
|
688
|
-
{ path: 'item.image.unsharpMasking.amount' },
|
689
|
-
{ path: 'item.image.unsharpMasking.radius' },
|
690
|
-
{ path: 'item.image.unsharpMasking.threshold' },
|
691
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.amount' },
|
692
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.radius' },
|
693
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
|
694
|
-
],
|
695
|
-
},
|
696
|
-
{
|
697
|
-
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
698
|
-
paths: [
|
699
|
-
{ path: 'item.createdDate' },
|
700
|
-
{ path: 'item.updatedDate' },
|
701
|
-
{ path: 'item.image.imageInfo.urlExpirationDate' },
|
702
|
-
{ path: 'item.video.videoInfo.urlExpirationDate' },
|
703
|
-
{ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate' },
|
704
|
-
{ path: 'item.video.videoInfo.posters.urlExpirationDate' },
|
705
|
-
{ path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
|
706
|
-
],
|
707
|
-
},
|
708
|
-
]);
|
709
|
-
const metadata = {
|
710
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
711
|
-
method: 'POST',
|
712
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.CreateGalleryItem',
|
713
|
-
packageName: PACKAGE_NAME,
|
714
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
715
|
-
protoPath: '/v2/galleries/{galleryId}/items',
|
716
|
-
data: serializedData,
|
717
|
-
host,
|
718
|
-
}),
|
719
|
-
data: serializedData,
|
720
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
721
|
-
{
|
722
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
723
|
-
paths: [
|
724
|
-
{ path: 'item.sortOrder' },
|
725
|
-
{ path: 'item.image.focalPoint.x' },
|
726
|
-
{ path: 'item.image.focalPoint.y' },
|
727
|
-
{ path: 'item.secondaryMedia.image.focalPoint.x' },
|
728
|
-
{ path: 'item.secondaryMedia.image.focalPoint.y' },
|
729
|
-
{ path: 'item.image.unsharpMasking.amount' },
|
730
|
-
{ path: 'item.image.unsharpMasking.radius' },
|
731
|
-
{ path: 'item.image.unsharpMasking.threshold' },
|
732
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.amount' },
|
733
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.radius' },
|
734
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
|
735
|
-
],
|
736
|
-
},
|
737
|
-
{
|
738
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
739
|
-
paths: [
|
740
|
-
{ path: 'item.createdDate' },
|
741
|
-
{ path: 'item.updatedDate' },
|
742
|
-
{ path: 'item.image.imageInfo.urlExpirationDate' },
|
743
|
-
{ path: 'item.video.videoInfo.urlExpirationDate' },
|
744
|
-
{
|
745
|
-
path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
|
746
|
-
},
|
747
|
-
{ path: 'item.video.videoInfo.posters.urlExpirationDate' },
|
748
|
-
{ path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
|
749
|
-
],
|
750
|
-
},
|
751
|
-
]),
|
752
|
-
};
|
753
|
-
return metadata;
|
754
|
-
}
|
755
|
-
return __createGalleryItem;
|
756
|
-
}
|
757
|
-
exports.createGalleryItem = createGalleryItem;
|
758
|
-
/**
|
759
|
-
* Updates a media item in a specified gallery.
|
760
|
-
*
|
761
|
-
* Only the fields in the `item` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
|
762
|
-
*
|
763
|
-
* <blockquote class="important">
|
764
|
-
*
|
765
|
-
* __Important:__
|
766
|
-
* 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.
|
767
|
-
*
|
768
|
-
* </blockquote>
|
769
|
-
*/
|
770
|
-
function updateGalleryItem(payload) {
|
771
|
-
function __updateGalleryItem({ host }) {
|
772
|
-
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
773
|
-
{
|
774
|
-
transformFn: float_1.transformSDKFloatToRESTFloat,
|
775
|
-
paths: [
|
776
|
-
{ path: 'item.sortOrder' },
|
777
|
-
{ path: 'item.image.focalPoint.x' },
|
778
|
-
{ path: 'item.image.focalPoint.y' },
|
779
|
-
{ path: 'item.secondaryMedia.image.focalPoint.x' },
|
780
|
-
{ path: 'item.secondaryMedia.image.focalPoint.y' },
|
781
|
-
{ path: 'item.image.unsharpMasking.amount' },
|
782
|
-
{ path: 'item.image.unsharpMasking.radius' },
|
783
|
-
{ path: 'item.image.unsharpMasking.threshold' },
|
784
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.amount' },
|
785
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.radius' },
|
786
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
|
787
|
-
],
|
788
|
-
},
|
789
|
-
{
|
790
|
-
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
791
|
-
paths: [
|
792
|
-
{ path: 'item.createdDate' },
|
793
|
-
{ path: 'item.updatedDate' },
|
794
|
-
{ path: 'item.image.imageInfo.urlExpirationDate' },
|
795
|
-
{ path: 'item.video.videoInfo.urlExpirationDate' },
|
796
|
-
{ path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate' },
|
797
|
-
{ path: 'item.video.videoInfo.posters.urlExpirationDate' },
|
798
|
-
{ path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
|
799
|
-
],
|
800
|
-
},
|
801
|
-
]);
|
802
|
-
const metadata = {
|
803
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
804
|
-
method: 'PATCH',
|
805
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.UpdateGalleryItem',
|
806
|
-
packageName: PACKAGE_NAME,
|
807
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
808
|
-
protoPath: '/v2/galleries/{galleryId}/items/{item.id}',
|
809
|
-
data: serializedData,
|
810
|
-
host,
|
811
|
-
}),
|
812
|
-
data: serializedData,
|
813
|
-
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
814
|
-
{
|
815
|
-
transformFn: float_2.transformRESTFloatToSDKFloat,
|
816
|
-
paths: [
|
817
|
-
{ path: 'item.sortOrder' },
|
818
|
-
{ path: 'item.image.focalPoint.x' },
|
819
|
-
{ path: 'item.image.focalPoint.y' },
|
820
|
-
{ path: 'item.secondaryMedia.image.focalPoint.x' },
|
821
|
-
{ path: 'item.secondaryMedia.image.focalPoint.y' },
|
822
|
-
{ path: 'item.image.unsharpMasking.amount' },
|
823
|
-
{ path: 'item.image.unsharpMasking.radius' },
|
824
|
-
{ path: 'item.image.unsharpMasking.threshold' },
|
825
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.amount' },
|
826
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.radius' },
|
827
|
-
{ path: 'item.secondaryMedia.image.unsharpMasking.threshold' },
|
828
|
-
],
|
829
|
-
},
|
830
|
-
{
|
831
|
-
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
832
|
-
paths: [
|
833
|
-
{ path: 'item.createdDate' },
|
834
|
-
{ path: 'item.updatedDate' },
|
835
|
-
{ path: 'item.image.imageInfo.urlExpirationDate' },
|
836
|
-
{ path: 'item.video.videoInfo.urlExpirationDate' },
|
837
|
-
{
|
838
|
-
path: 'item.video.videoInfo.resolutions.poster.urlExpirationDate',
|
839
|
-
},
|
840
|
-
{ path: 'item.video.videoInfo.posters.urlExpirationDate' },
|
841
|
-
{ path: 'item.secondaryMedia.image.imageInfo.urlExpirationDate' },
|
842
|
-
],
|
843
|
-
},
|
844
|
-
]),
|
845
|
-
};
|
846
|
-
return metadata;
|
847
|
-
}
|
848
|
-
return __updateGalleryItem;
|
849
|
-
}
|
850
|
-
exports.updateGalleryItem = updateGalleryItem;
|
851
|
-
/**
|
852
|
-
* Deletes a media item from a gallery.
|
853
|
-
*
|
854
|
-
* When a gallery item is deleted, the deleted gallery item is no longer returned when calling the [`listGalleryItems()`](/pro-gallery/list-gallery-items) function.
|
855
|
-
*/
|
856
|
-
function deleteGalleryItem(payload) {
|
857
|
-
function __deleteGalleryItem({ host }) {
|
858
|
-
const metadata = {
|
859
|
-
entityFqdn: 'wix.pro_gallery.v2.gallery',
|
860
|
-
method: 'DELETE',
|
861
|
-
methodFqn: 'com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItem',
|
862
|
-
packageName: PACKAGE_NAME,
|
863
|
-
url: resolveComWixpressExposureProgalleryProGalleryUrl({
|
864
|
-
protoPath: '/v2/galleries/{galleryId}/items/{itemId}',
|
865
|
-
data: payload,
|
866
|
-
host,
|
867
|
-
}),
|
868
|
-
params: (0, rest_modules_1.toURLSearchParams)(payload),
|
869
|
-
};
|
870
|
-
return metadata;
|
871
|
-
}
|
872
|
-
return __deleteGalleryItem;
|
873
|
-
}
|
874
|
-
exports.deleteGalleryItem = deleteGalleryItem;
|
875
|
-
//# sourceMappingURL=pro-gallery-v2-gallery-pro-gallery.http.js.map
|