@wix/auto_sdk_media-collections_media-collections 1.0.21 → 1.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +120 -0
- package/build/cjs/index.js.map +1 -0
- package/build/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.mts → cjs/index.typings.d.ts} +126 -1
- package/build/cjs/index.typings.js +1003 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/{internal → cjs}/meta.d.ts +2 -1
- package/build/es/index.d.mts +120 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.ts → es/index.typings.d.mts} +126 -1
- package/build/es/index.typings.mjs +958 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/{internal → es}/meta.d.mts +2 -1
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +120 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.mts → cjs/index.typings.d.ts} +126 -1
- package/build/internal/cjs/index.typings.js +1003 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/{meta.d.ts → internal/cjs/meta.d.ts} +2 -1
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +120 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.ts → es/index.typings.d.mts} +126 -1
- package/build/internal/es/index.typings.mjs +958 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{meta.d.mts → internal/es/meta.d.mts} +2 -1
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/index.d.mts +0 -120
- package/build/index.d.ts +0 -120
- package/build/index.js.map +0 -1
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -120
- package/build/internal/index.d.ts +0 -120
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs.map +0 -1
- package/build/meta.js.map +0 -1
- package/build/meta.mjs.map +0 -1
- /package/build/{index.js → cjs/index.js} +0 -0
- /package/build/{internal → cjs}/meta.js +0 -0
- /package/build/{internal → cjs}/meta.js.map +0 -0
- /package/build/{index.mjs → es/index.mjs} +0 -0
- /package/build/{internal → es}/meta.mjs +0 -0
- /package/build/{internal → es}/meta.mjs.map +0 -0
- /package/build/internal/{index.js → cjs/index.js} +0 -0
- /package/build/{meta.js → internal/cjs/meta.js} +0 -0
- /package/build/internal/{index.mjs → es/index.mjs} +0 -0
- /package/build/{meta.mjs → internal/es/meta.mjs} +0 -0
|
@@ -0,0 +1,958 @@
|
|
|
1
|
+
// src/collections-v1-collection-media-collections.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import {
|
|
4
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
5
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
6
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
7
|
+
|
|
8
|
+
// src/collections-v1-collection-media-collections.http.ts
|
|
9
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
10
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
11
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
12
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
14
|
+
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
15
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
16
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
17
|
+
function resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(opts) {
|
|
18
|
+
const domainToMappings = {
|
|
19
|
+
_: [
|
|
20
|
+
{
|
|
21
|
+
srcPath: "/media-collections-service",
|
|
22
|
+
destPath: ""
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
srcPath: "/_api/media-collections-service",
|
|
26
|
+
destPath: ""
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"mediacollections.wixapps.net": [
|
|
30
|
+
{
|
|
31
|
+
srcPath: "/media-collections-service",
|
|
32
|
+
destPath: ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
srcPath: "/_api/media-collections-service",
|
|
36
|
+
destPath: ""
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"manage._base_domain_": [
|
|
40
|
+
{
|
|
41
|
+
srcPath: "/media-collections-service",
|
|
42
|
+
destPath: ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
srcPath: "/_api/media-collections-service",
|
|
46
|
+
destPath: ""
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"www._base_domain_": [
|
|
50
|
+
{
|
|
51
|
+
srcPath: "/media-collections-service",
|
|
52
|
+
destPath: ""
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
srcPath: "/_api/media-collections-service",
|
|
56
|
+
destPath: ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"*.dev.wix-code.com": [
|
|
60
|
+
{
|
|
61
|
+
srcPath: "/_api/media-collections-service",
|
|
62
|
+
destPath: ""
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"www.wixapis.com": [
|
|
66
|
+
{
|
|
67
|
+
srcPath: "/collections/v1/mediacollections",
|
|
68
|
+
destPath: "/v1/mediacollections"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
srcPath: "/collections/v1/mediacollections/items",
|
|
72
|
+
destPath: "/v1/mediacollections/items"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
77
|
+
}
|
|
78
|
+
var PACKAGE_NAME = "@wix/auto_sdk_media-collections_media-collections";
|
|
79
|
+
function get(payload) {
|
|
80
|
+
function __get({ host }) {
|
|
81
|
+
const metadata = {
|
|
82
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
83
|
+
method: "GET",
|
|
84
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.Get",
|
|
85
|
+
packageName: PACKAGE_NAME,
|
|
86
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
87
|
+
{
|
|
88
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}",
|
|
89
|
+
data: payload,
|
|
90
|
+
host
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
params: toURLSearchParams(payload),
|
|
94
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
95
|
+
{
|
|
96
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
97
|
+
paths: [
|
|
98
|
+
{ path: "mediaCollection.createdDate" },
|
|
99
|
+
{ path: "mediaCollection.items.addedDate" },
|
|
100
|
+
{ path: "mediaCollection.items.updatedDate" }
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
105
|
+
paths: [
|
|
106
|
+
{ path: "mediaCollection.items.sortOrder" },
|
|
107
|
+
{ path: "mediaCollection.items.photoMetadata.focalPoint.x" },
|
|
108
|
+
{ path: "mediaCollection.items.photoMetadata.focalPoint.y" },
|
|
109
|
+
{
|
|
110
|
+
path: "mediaCollection.items.videoMetadata.posters.focalPoint.x"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
path: "mediaCollection.items.videoMetadata.posters.focalPoint.y"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
path: "mediaCollection.items.photoMetadata.unsharpMasking.amount"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
path: "mediaCollection.items.photoMetadata.unsharpMasking.radius"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
path: "mediaCollection.items.photoMetadata.unsharpMasking.threshold"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
])
|
|
127
|
+
};
|
|
128
|
+
return metadata;
|
|
129
|
+
}
|
|
130
|
+
return __get;
|
|
131
|
+
}
|
|
132
|
+
function listCollectionsForItem(payload) {
|
|
133
|
+
function __listCollectionsForItem({ host }) {
|
|
134
|
+
const metadata = {
|
|
135
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
136
|
+
method: "GET",
|
|
137
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.ListCollectionsForItem",
|
|
138
|
+
packageName: PACKAGE_NAME,
|
|
139
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
140
|
+
{
|
|
141
|
+
protoPath: "/v1/mediacollections/items/{itemId}/collections",
|
|
142
|
+
data: payload,
|
|
143
|
+
host
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
params: toURLSearchParams(payload),
|
|
147
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
148
|
+
{
|
|
149
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
150
|
+
paths: [
|
|
151
|
+
{ path: "itemInCollections.firstItem.sortOrder" },
|
|
152
|
+
{
|
|
153
|
+
path: "itemInCollections.firstItem.photoMetadata.focalPoint.x"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
path: "itemInCollections.firstItem.photoMetadata.focalPoint.y"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
path: "itemInCollections.firstItem.videoMetadata.posters.focalPoint.x"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
path: "itemInCollections.firstItem.videoMetadata.posters.focalPoint.y"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
path: "itemInCollections.firstItem.photoMetadata.unsharpMasking.amount"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
path: "itemInCollections.firstItem.photoMetadata.unsharpMasking.radius"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
path: "itemInCollections.firstItem.photoMetadata.unsharpMasking.threshold"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
177
|
+
paths: [
|
|
178
|
+
{ path: "itemInCollections.firstItem.addedDate" },
|
|
179
|
+
{ path: "itemInCollections.firstItem.updatedDate" }
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
])
|
|
183
|
+
};
|
|
184
|
+
return metadata;
|
|
185
|
+
}
|
|
186
|
+
return __listCollectionsForItem;
|
|
187
|
+
}
|
|
188
|
+
function getCollectionItem(payload) {
|
|
189
|
+
function __getCollectionItem({ host }) {
|
|
190
|
+
const metadata = {
|
|
191
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
192
|
+
method: "GET",
|
|
193
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.GetCollectionItem",
|
|
194
|
+
packageName: PACKAGE_NAME,
|
|
195
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
196
|
+
{
|
|
197
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/items/{itemId}",
|
|
198
|
+
data: payload,
|
|
199
|
+
host
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
params: toURLSearchParams(payload),
|
|
203
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
204
|
+
{
|
|
205
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
206
|
+
paths: [
|
|
207
|
+
{ path: "item.sortOrder" },
|
|
208
|
+
{ path: "item.photoMetadata.focalPoint.x" },
|
|
209
|
+
{ path: "item.photoMetadata.focalPoint.y" },
|
|
210
|
+
{ path: "item.videoMetadata.posters.focalPoint.x" },
|
|
211
|
+
{ path: "item.videoMetadata.posters.focalPoint.y" },
|
|
212
|
+
{ path: "item.photoMetadata.unsharpMasking.amount" },
|
|
213
|
+
{ path: "item.photoMetadata.unsharpMasking.radius" },
|
|
214
|
+
{ path: "item.photoMetadata.unsharpMasking.threshold" }
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
219
|
+
paths: [{ path: "item.addedDate" }, { path: "item.updatedDate" }]
|
|
220
|
+
}
|
|
221
|
+
])
|
|
222
|
+
};
|
|
223
|
+
return metadata;
|
|
224
|
+
}
|
|
225
|
+
return __getCollectionItem;
|
|
226
|
+
}
|
|
227
|
+
function list(payload) {
|
|
228
|
+
function __list({ host }) {
|
|
229
|
+
const metadata = {
|
|
230
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
231
|
+
method: "GET",
|
|
232
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.List",
|
|
233
|
+
packageName: PACKAGE_NAME,
|
|
234
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
235
|
+
{ protoPath: "/v1/mediacollections", data: payload, host }
|
|
236
|
+
),
|
|
237
|
+
params: toURLSearchParams(payload),
|
|
238
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
239
|
+
{
|
|
240
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
241
|
+
paths: [
|
|
242
|
+
{ path: "collectionsStatus.mediaCollection.createdDate" },
|
|
243
|
+
{ path: "collectionsStatus.mediaCollection.items.addedDate" },
|
|
244
|
+
{ path: "collectionsStatus.mediaCollection.items.updatedDate" }
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
249
|
+
paths: [
|
|
250
|
+
{ path: "collectionsStatus.mediaCollection.items.sortOrder" },
|
|
251
|
+
{
|
|
252
|
+
path: "collectionsStatus.mediaCollection.items.photoMetadata.focalPoint.x"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
path: "collectionsStatus.mediaCollection.items.photoMetadata.focalPoint.y"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
path: "collectionsStatus.mediaCollection.items.videoMetadata.posters.focalPoint.x"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
path: "collectionsStatus.mediaCollection.items.videoMetadata.posters.focalPoint.y"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
path: "collectionsStatus.mediaCollection.items.photoMetadata.unsharpMasking.amount"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
path: "collectionsStatus.mediaCollection.items.photoMetadata.unsharpMasking.radius"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
path: "collectionsStatus.mediaCollection.items.photoMetadata.unsharpMasking.threshold"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
])
|
|
275
|
+
};
|
|
276
|
+
return metadata;
|
|
277
|
+
}
|
|
278
|
+
return __list;
|
|
279
|
+
}
|
|
280
|
+
function create(payload) {
|
|
281
|
+
function __create({ host }) {
|
|
282
|
+
const serializedData = transformPaths(payload, [
|
|
283
|
+
{
|
|
284
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
285
|
+
paths: [{ path: "items.orderIndex" }]
|
|
286
|
+
}
|
|
287
|
+
]);
|
|
288
|
+
const metadata = {
|
|
289
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
290
|
+
method: "POST",
|
|
291
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.Create",
|
|
292
|
+
packageName: PACKAGE_NAME,
|
|
293
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
294
|
+
{ protoPath: "/v1/mediacollections", data: serializedData, host }
|
|
295
|
+
),
|
|
296
|
+
data: serializedData
|
|
297
|
+
};
|
|
298
|
+
return metadata;
|
|
299
|
+
}
|
|
300
|
+
return __create;
|
|
301
|
+
}
|
|
302
|
+
function partiallyUpdate(payload) {
|
|
303
|
+
function __partiallyUpdate({ host }) {
|
|
304
|
+
const serializedData = transformPaths(payload, [
|
|
305
|
+
{
|
|
306
|
+
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
307
|
+
paths: [{ path: "fieldMask" }]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
311
|
+
paths: [
|
|
312
|
+
{ path: "mediaCollection.createdDate" },
|
|
313
|
+
{ path: "mediaCollection.items.addedDate" },
|
|
314
|
+
{ path: "mediaCollection.items.updatedDate" }
|
|
315
|
+
]
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
319
|
+
paths: [
|
|
320
|
+
{ path: "mediaCollection.items.sortOrder" },
|
|
321
|
+
{ path: "mediaCollection.items.photoMetadata.focalPoint.x" },
|
|
322
|
+
{ path: "mediaCollection.items.photoMetadata.focalPoint.y" },
|
|
323
|
+
{ path: "mediaCollection.items.videoMetadata.posters.focalPoint.x" },
|
|
324
|
+
{ path: "mediaCollection.items.videoMetadata.posters.focalPoint.y" },
|
|
325
|
+
{ path: "mediaCollection.items.photoMetadata.unsharpMasking.amount" },
|
|
326
|
+
{ path: "mediaCollection.items.photoMetadata.unsharpMasking.radius" },
|
|
327
|
+
{
|
|
328
|
+
path: "mediaCollection.items.photoMetadata.unsharpMasking.threshold"
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
]);
|
|
333
|
+
const metadata = {
|
|
334
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
335
|
+
method: "PUT",
|
|
336
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.PartiallyUpdate",
|
|
337
|
+
packageName: PACKAGE_NAME,
|
|
338
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
339
|
+
{
|
|
340
|
+
protoPath: "/v1/mediacollections/{mediaCollection.id}",
|
|
341
|
+
data: serializedData,
|
|
342
|
+
host
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
data: serializedData
|
|
346
|
+
};
|
|
347
|
+
return metadata;
|
|
348
|
+
}
|
|
349
|
+
return __partiallyUpdate;
|
|
350
|
+
}
|
|
351
|
+
function _delete(payload) {
|
|
352
|
+
function ___delete({ host }) {
|
|
353
|
+
const metadata = {
|
|
354
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
355
|
+
method: "DELETE",
|
|
356
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService._delete",
|
|
357
|
+
packageName: PACKAGE_NAME,
|
|
358
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
359
|
+
{
|
|
360
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}",
|
|
361
|
+
data: payload,
|
|
362
|
+
host
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
params: toURLSearchParams(payload)
|
|
366
|
+
};
|
|
367
|
+
return metadata;
|
|
368
|
+
}
|
|
369
|
+
return ___delete;
|
|
370
|
+
}
|
|
371
|
+
function listCollectionMembers(payload) {
|
|
372
|
+
function __listCollectionMembers({ host }) {
|
|
373
|
+
const metadata = {
|
|
374
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
375
|
+
method: "GET",
|
|
376
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.ListCollectionMembers",
|
|
377
|
+
packageName: PACKAGE_NAME,
|
|
378
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
379
|
+
{
|
|
380
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/members",
|
|
381
|
+
data: payload,
|
|
382
|
+
host
|
|
383
|
+
}
|
|
384
|
+
),
|
|
385
|
+
params: toURLSearchParams(payload)
|
|
386
|
+
};
|
|
387
|
+
return metadata;
|
|
388
|
+
}
|
|
389
|
+
return __listCollectionMembers;
|
|
390
|
+
}
|
|
391
|
+
function addItems(payload) {
|
|
392
|
+
function __addItems({ host }) {
|
|
393
|
+
const serializedData = transformPaths(payload, [
|
|
394
|
+
{
|
|
395
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
396
|
+
paths: [{ path: "items.orderIndex" }]
|
|
397
|
+
}
|
|
398
|
+
]);
|
|
399
|
+
const metadata = {
|
|
400
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
401
|
+
method: "POST",
|
|
402
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.AddItems",
|
|
403
|
+
packageName: PACKAGE_NAME,
|
|
404
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
405
|
+
{
|
|
406
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/items",
|
|
407
|
+
data: serializedData,
|
|
408
|
+
host
|
|
409
|
+
}
|
|
410
|
+
),
|
|
411
|
+
data: serializedData
|
|
412
|
+
};
|
|
413
|
+
return metadata;
|
|
414
|
+
}
|
|
415
|
+
return __addItems;
|
|
416
|
+
}
|
|
417
|
+
function removeItems(payload) {
|
|
418
|
+
function __removeItems({ host }) {
|
|
419
|
+
const metadata = {
|
|
420
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
421
|
+
method: "DELETE",
|
|
422
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.RemoveItems",
|
|
423
|
+
packageName: PACKAGE_NAME,
|
|
424
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
425
|
+
{
|
|
426
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/items",
|
|
427
|
+
data: payload,
|
|
428
|
+
host
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
params: toURLSearchParams(payload)
|
|
432
|
+
};
|
|
433
|
+
return metadata;
|
|
434
|
+
}
|
|
435
|
+
return __removeItems;
|
|
436
|
+
}
|
|
437
|
+
function joinToCollection(payload) {
|
|
438
|
+
function __joinToCollection({ host }) {
|
|
439
|
+
const metadata = {
|
|
440
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
441
|
+
method: "POST",
|
|
442
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.JoinToCollection",
|
|
443
|
+
packageName: PACKAGE_NAME,
|
|
444
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
445
|
+
{
|
|
446
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/members",
|
|
447
|
+
data: payload,
|
|
448
|
+
host
|
|
449
|
+
}
|
|
450
|
+
),
|
|
451
|
+
data: payload
|
|
452
|
+
};
|
|
453
|
+
return metadata;
|
|
454
|
+
}
|
|
455
|
+
return __joinToCollection;
|
|
456
|
+
}
|
|
457
|
+
function leaveCollection(payload) {
|
|
458
|
+
function __leaveCollection({ host }) {
|
|
459
|
+
const metadata = {
|
|
460
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
461
|
+
method: "DELETE",
|
|
462
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.LeaveCollection",
|
|
463
|
+
packageName: PACKAGE_NAME,
|
|
464
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
465
|
+
{
|
|
466
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/members",
|
|
467
|
+
data: payload,
|
|
468
|
+
host
|
|
469
|
+
}
|
|
470
|
+
),
|
|
471
|
+
params: toURLSearchParams(payload)
|
|
472
|
+
};
|
|
473
|
+
return metadata;
|
|
474
|
+
}
|
|
475
|
+
return __leaveCollection;
|
|
476
|
+
}
|
|
477
|
+
function listCollectionItems(payload) {
|
|
478
|
+
function __listCollectionItems({ host }) {
|
|
479
|
+
const metadata = {
|
|
480
|
+
entityFqdn: "wix.collections.v1.collection",
|
|
481
|
+
method: "GET",
|
|
482
|
+
methodFqn: "com.wixpress.exposure.mediacollections.MediaCollectionsService.ListCollectionItems",
|
|
483
|
+
packageName: PACKAGE_NAME,
|
|
484
|
+
url: resolveComWixpressExposureMediacollectionsMediaCollectionsServiceUrl(
|
|
485
|
+
{
|
|
486
|
+
protoPath: "/v1/mediacollections/{mediaCollectionId}/items",
|
|
487
|
+
data: payload,
|
|
488
|
+
host
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
params: toURLSearchParams(payload),
|
|
492
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
493
|
+
{
|
|
494
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
495
|
+
paths: [{ path: "collectionItems.orderIndex" }]
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
499
|
+
paths: [{ path: "collectionItems.addedDate" }]
|
|
500
|
+
}
|
|
501
|
+
])
|
|
502
|
+
};
|
|
503
|
+
return metadata;
|
|
504
|
+
}
|
|
505
|
+
return __listCollectionItems;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
// src/collections-v1-collection-media-collections.universal.ts
|
|
509
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
510
|
+
Type2["Undefined"] = "Undefined";
|
|
511
|
+
Type2["External"] = "External";
|
|
512
|
+
Type2["Internal"] = "Internal";
|
|
513
|
+
return Type2;
|
|
514
|
+
})(Type || {});
|
|
515
|
+
var LinkRel = /* @__PURE__ */ ((LinkRel2) => {
|
|
516
|
+
LinkRel2["unknown_link_rel"] = "unknown_link_rel";
|
|
517
|
+
LinkRel2["nofollow"] = "nofollow";
|
|
518
|
+
LinkRel2["noopener"] = "noopener";
|
|
519
|
+
LinkRel2["noreferrer"] = "noreferrer";
|
|
520
|
+
LinkRel2["sponsored"] = "sponsored";
|
|
521
|
+
return LinkRel2;
|
|
522
|
+
})(LinkRel || {});
|
|
523
|
+
var DataType = /* @__PURE__ */ ((DataType2) => {
|
|
524
|
+
DataType2["Undefined"] = "Undefined";
|
|
525
|
+
DataType2["Photo"] = "Photo";
|
|
526
|
+
DataType2["Video"] = "Video";
|
|
527
|
+
DataType2["Text"] = "Text";
|
|
528
|
+
return DataType2;
|
|
529
|
+
})(DataType || {});
|
|
530
|
+
var Source = /* @__PURE__ */ ((Source2) => {
|
|
531
|
+
Source2["Undefined"] = "Undefined";
|
|
532
|
+
Source2["Youtube"] = "Youtube";
|
|
533
|
+
Source2["Vimeo"] = "Vimeo";
|
|
534
|
+
Source2["Custom"] = "Custom";
|
|
535
|
+
return Source2;
|
|
536
|
+
})(Source || {});
|
|
537
|
+
var MediaOwner = /* @__PURE__ */ ((MediaOwner2) => {
|
|
538
|
+
MediaOwner2["Undefined"] = "Undefined";
|
|
539
|
+
MediaOwner2["Wix"] = "Wix";
|
|
540
|
+
MediaOwner2["DeviantArt"] = "DeviantArt";
|
|
541
|
+
MediaOwner2["Custom"] = "Custom";
|
|
542
|
+
return MediaOwner2;
|
|
543
|
+
})(MediaOwner || {});
|
|
544
|
+
var PrivacySettings = /* @__PURE__ */ ((PrivacySettings2) => {
|
|
545
|
+
PrivacySettings2["Undefined"] = "Undefined";
|
|
546
|
+
PrivacySettings2["Public"] = "Public";
|
|
547
|
+
PrivacySettings2["Secret"] = "Secret";
|
|
548
|
+
return PrivacySettings2;
|
|
549
|
+
})(PrivacySettings || {});
|
|
550
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
551
|
+
Status2["UNKNOWN"] = "UNKNOWN";
|
|
552
|
+
Status2["HANDLED"] = "HANDLED";
|
|
553
|
+
Status2["NOTHING_TO_HANDLE"] = "NOTHING_TO_HANDLE";
|
|
554
|
+
return Status2;
|
|
555
|
+
})(Status || {});
|
|
556
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
557
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
558
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
559
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
560
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
561
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
562
|
+
return WebhookIdentityType2;
|
|
563
|
+
})(WebhookIdentityType || {});
|
|
564
|
+
var MemberStatus = /* @__PURE__ */ ((MemberStatus2) => {
|
|
565
|
+
MemberStatus2["UNDEFINED"] = "UNDEFINED";
|
|
566
|
+
MemberStatus2["NOT_MEMBER"] = "NOT_MEMBER";
|
|
567
|
+
MemberStatus2["MEMBER"] = "MEMBER";
|
|
568
|
+
MemberStatus2["ADMIN"] = "ADMIN";
|
|
569
|
+
return MemberStatus2;
|
|
570
|
+
})(MemberStatus || {});
|
|
571
|
+
async function get2(mediaCollectionId, options) {
|
|
572
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
573
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
574
|
+
mediaCollectionId,
|
|
575
|
+
offset: options?.offset,
|
|
576
|
+
limit: options?.limit
|
|
577
|
+
});
|
|
578
|
+
const reqOpts = get(payload);
|
|
579
|
+
sideEffects?.onSiteCall?.();
|
|
580
|
+
try {
|
|
581
|
+
const result = await httpClient.request(reqOpts);
|
|
582
|
+
sideEffects?.onSuccess?.(result);
|
|
583
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.mediaCollection;
|
|
584
|
+
} catch (err) {
|
|
585
|
+
const transformedError = sdkTransformError(
|
|
586
|
+
err,
|
|
587
|
+
{
|
|
588
|
+
spreadPathsToArguments: {},
|
|
589
|
+
explicitPathsToArguments: {
|
|
590
|
+
mediaCollectionId: "$[0]",
|
|
591
|
+
offset: "$[1].offset",
|
|
592
|
+
limit: "$[1].limit"
|
|
593
|
+
},
|
|
594
|
+
singleArgumentUnchanged: false
|
|
595
|
+
},
|
|
596
|
+
["mediaCollectionId", "options"]
|
|
597
|
+
);
|
|
598
|
+
sideEffects?.onError?.(err);
|
|
599
|
+
throw transformedError;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
async function listCollectionsForItem2(itemId, options) {
|
|
603
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
604
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
605
|
+
itemId,
|
|
606
|
+
galleryId: options?.galleryId
|
|
607
|
+
});
|
|
608
|
+
const reqOpts = listCollectionsForItem(payload);
|
|
609
|
+
sideEffects?.onSiteCall?.();
|
|
610
|
+
try {
|
|
611
|
+
const result = await httpClient.request(reqOpts);
|
|
612
|
+
sideEffects?.onSuccess?.(result);
|
|
613
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
614
|
+
} catch (err) {
|
|
615
|
+
const transformedError = sdkTransformError(
|
|
616
|
+
err,
|
|
617
|
+
{
|
|
618
|
+
spreadPathsToArguments: {},
|
|
619
|
+
explicitPathsToArguments: {
|
|
620
|
+
itemId: "$[0]",
|
|
621
|
+
galleryId: "$[1].galleryId"
|
|
622
|
+
},
|
|
623
|
+
singleArgumentUnchanged: false
|
|
624
|
+
},
|
|
625
|
+
["itemId", "options"]
|
|
626
|
+
);
|
|
627
|
+
sideEffects?.onError?.(err);
|
|
628
|
+
throw transformedError;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
async function getCollectionItem2(identifiers) {
|
|
632
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
633
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
634
|
+
mediaCollectionId: identifiers?.mediaCollectionId,
|
|
635
|
+
itemId: identifiers?.itemId
|
|
636
|
+
});
|
|
637
|
+
const reqOpts = getCollectionItem(payload);
|
|
638
|
+
sideEffects?.onSiteCall?.();
|
|
639
|
+
try {
|
|
640
|
+
const result = await httpClient.request(reqOpts);
|
|
641
|
+
sideEffects?.onSuccess?.(result);
|
|
642
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
643
|
+
} catch (err) {
|
|
644
|
+
const transformedError = sdkTransformError(
|
|
645
|
+
err,
|
|
646
|
+
{
|
|
647
|
+
spreadPathsToArguments: {},
|
|
648
|
+
explicitPathsToArguments: {
|
|
649
|
+
mediaCollectionId: "$[0].mediaCollectionId",
|
|
650
|
+
itemId: "$[0].itemId"
|
|
651
|
+
},
|
|
652
|
+
singleArgumentUnchanged: false
|
|
653
|
+
},
|
|
654
|
+
["identifiers"]
|
|
655
|
+
);
|
|
656
|
+
sideEffects?.onError?.(err);
|
|
657
|
+
throw transformedError;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
async function list2(options) {
|
|
661
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
662
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
663
|
+
limit: options?.limit,
|
|
664
|
+
offset: options?.offset,
|
|
665
|
+
filterByRoles: options?.filterByRoles
|
|
666
|
+
});
|
|
667
|
+
const reqOpts = list(payload);
|
|
668
|
+
sideEffects?.onSiteCall?.();
|
|
669
|
+
try {
|
|
670
|
+
const result = await httpClient.request(reqOpts);
|
|
671
|
+
sideEffects?.onSuccess?.(result);
|
|
672
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
673
|
+
} catch (err) {
|
|
674
|
+
const transformedError = sdkTransformError(
|
|
675
|
+
err,
|
|
676
|
+
{
|
|
677
|
+
spreadPathsToArguments: {},
|
|
678
|
+
explicitPathsToArguments: {
|
|
679
|
+
limit: "$[0].limit",
|
|
680
|
+
offset: "$[0].offset",
|
|
681
|
+
filterByRoles: "$[0].filterByRoles"
|
|
682
|
+
},
|
|
683
|
+
singleArgumentUnchanged: false
|
|
684
|
+
},
|
|
685
|
+
["options"]
|
|
686
|
+
);
|
|
687
|
+
sideEffects?.onError?.(err);
|
|
688
|
+
throw transformedError;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
async function create2(name, options) {
|
|
692
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
693
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
694
|
+
name,
|
|
695
|
+
description: options?.description,
|
|
696
|
+
privacySettings: options?.privacySettings,
|
|
697
|
+
items: options?.items
|
|
698
|
+
});
|
|
699
|
+
const reqOpts = create(payload);
|
|
700
|
+
sideEffects?.onSiteCall?.();
|
|
701
|
+
try {
|
|
702
|
+
const result = await httpClient.request(reqOpts);
|
|
703
|
+
sideEffects?.onSuccess?.(result);
|
|
704
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
705
|
+
} catch (err) {
|
|
706
|
+
const transformedError = sdkTransformError(
|
|
707
|
+
err,
|
|
708
|
+
{
|
|
709
|
+
spreadPathsToArguments: {},
|
|
710
|
+
explicitPathsToArguments: {
|
|
711
|
+
name: "$[0]",
|
|
712
|
+
description: "$[1].description",
|
|
713
|
+
privacySettings: "$[1].privacySettings",
|
|
714
|
+
items: "$[1].items"
|
|
715
|
+
},
|
|
716
|
+
singleArgumentUnchanged: false
|
|
717
|
+
},
|
|
718
|
+
["name", "options"]
|
|
719
|
+
);
|
|
720
|
+
sideEffects?.onError?.(err);
|
|
721
|
+
throw transformedError;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
async function partiallyUpdate2(_id, mediaCollection, options) {
|
|
725
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
726
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
727
|
+
mediaCollection: { ...mediaCollection, id: _id },
|
|
728
|
+
fieldMask: options?.fieldMask
|
|
729
|
+
});
|
|
730
|
+
const reqOpts = partiallyUpdate(payload);
|
|
731
|
+
sideEffects?.onSiteCall?.();
|
|
732
|
+
try {
|
|
733
|
+
const result = await httpClient.request(reqOpts);
|
|
734
|
+
sideEffects?.onSuccess?.(result);
|
|
735
|
+
} catch (err) {
|
|
736
|
+
const transformedError = sdkTransformError(
|
|
737
|
+
err,
|
|
738
|
+
{
|
|
739
|
+
spreadPathsToArguments: { mediaCollection: "$[1]" },
|
|
740
|
+
explicitPathsToArguments: {
|
|
741
|
+
"mediaCollection.id": "$[0]",
|
|
742
|
+
fieldMask: "$[2].fieldMask"
|
|
743
|
+
},
|
|
744
|
+
singleArgumentUnchanged: false
|
|
745
|
+
},
|
|
746
|
+
["_id", "mediaCollection", "options"]
|
|
747
|
+
);
|
|
748
|
+
sideEffects?.onError?.(err);
|
|
749
|
+
throw transformedError;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
async function _delete2(mediaCollectionId) {
|
|
753
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
754
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
755
|
+
mediaCollectionId
|
|
756
|
+
});
|
|
757
|
+
const reqOpts = _delete(payload);
|
|
758
|
+
sideEffects?.onSiteCall?.();
|
|
759
|
+
try {
|
|
760
|
+
const result = await httpClient.request(reqOpts);
|
|
761
|
+
sideEffects?.onSuccess?.(result);
|
|
762
|
+
} catch (err) {
|
|
763
|
+
const transformedError = sdkTransformError(
|
|
764
|
+
err,
|
|
765
|
+
{
|
|
766
|
+
spreadPathsToArguments: {},
|
|
767
|
+
explicitPathsToArguments: { mediaCollectionId: "$[0]" },
|
|
768
|
+
singleArgumentUnchanged: false
|
|
769
|
+
},
|
|
770
|
+
["mediaCollectionId"]
|
|
771
|
+
);
|
|
772
|
+
sideEffects?.onError?.(err);
|
|
773
|
+
throw transformedError;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
async function listCollectionMembers2(mediaCollectionId, options) {
|
|
777
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
778
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
779
|
+
mediaCollectionId,
|
|
780
|
+
filterBy: options?.filterBy
|
|
781
|
+
});
|
|
782
|
+
const reqOpts = listCollectionMembers(payload);
|
|
783
|
+
sideEffects?.onSiteCall?.();
|
|
784
|
+
try {
|
|
785
|
+
const result = await httpClient.request(reqOpts);
|
|
786
|
+
sideEffects?.onSuccess?.(result);
|
|
787
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
788
|
+
} catch (err) {
|
|
789
|
+
const transformedError = sdkTransformError(
|
|
790
|
+
err,
|
|
791
|
+
{
|
|
792
|
+
spreadPathsToArguments: {},
|
|
793
|
+
explicitPathsToArguments: {
|
|
794
|
+
mediaCollectionId: "$[0]",
|
|
795
|
+
filterBy: "$[1].filterBy"
|
|
796
|
+
},
|
|
797
|
+
singleArgumentUnchanged: false
|
|
798
|
+
},
|
|
799
|
+
["mediaCollectionId", "options"]
|
|
800
|
+
);
|
|
801
|
+
sideEffects?.onError?.(err);
|
|
802
|
+
throw transformedError;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
async function addItems2(mediaCollectionId, options) {
|
|
806
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
807
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
808
|
+
mediaCollectionId,
|
|
809
|
+
items: options?.items
|
|
810
|
+
});
|
|
811
|
+
const reqOpts = addItems(payload);
|
|
812
|
+
sideEffects?.onSiteCall?.();
|
|
813
|
+
try {
|
|
814
|
+
const result = await httpClient.request(reqOpts);
|
|
815
|
+
sideEffects?.onSuccess?.(result);
|
|
816
|
+
} catch (err) {
|
|
817
|
+
const transformedError = sdkTransformError(
|
|
818
|
+
err,
|
|
819
|
+
{
|
|
820
|
+
spreadPathsToArguments: {},
|
|
821
|
+
explicitPathsToArguments: {
|
|
822
|
+
mediaCollectionId: "$[0]",
|
|
823
|
+
items: "$[1].items"
|
|
824
|
+
},
|
|
825
|
+
singleArgumentUnchanged: false
|
|
826
|
+
},
|
|
827
|
+
["mediaCollectionId", "options"]
|
|
828
|
+
);
|
|
829
|
+
sideEffects?.onError?.(err);
|
|
830
|
+
throw transformedError;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
async function removeItems2(mediaCollectionId, options) {
|
|
834
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
835
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
836
|
+
mediaCollectionId,
|
|
837
|
+
itemsIds: options?.itemsIds
|
|
838
|
+
});
|
|
839
|
+
const reqOpts = removeItems(payload);
|
|
840
|
+
sideEffects?.onSiteCall?.();
|
|
841
|
+
try {
|
|
842
|
+
const result = await httpClient.request(reqOpts);
|
|
843
|
+
sideEffects?.onSuccess?.(result);
|
|
844
|
+
} catch (err) {
|
|
845
|
+
const transformedError = sdkTransformError(
|
|
846
|
+
err,
|
|
847
|
+
{
|
|
848
|
+
spreadPathsToArguments: {},
|
|
849
|
+
explicitPathsToArguments: {
|
|
850
|
+
mediaCollectionId: "$[0]",
|
|
851
|
+
itemsIds: "$[1].itemsIds"
|
|
852
|
+
},
|
|
853
|
+
singleArgumentUnchanged: false
|
|
854
|
+
},
|
|
855
|
+
["mediaCollectionId", "options"]
|
|
856
|
+
);
|
|
857
|
+
sideEffects?.onError?.(err);
|
|
858
|
+
throw transformedError;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
async function joinToCollection2(mediaCollectionId) {
|
|
862
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
863
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
864
|
+
mediaCollectionId
|
|
865
|
+
});
|
|
866
|
+
const reqOpts = joinToCollection(payload);
|
|
867
|
+
sideEffects?.onSiteCall?.();
|
|
868
|
+
try {
|
|
869
|
+
const result = await httpClient.request(reqOpts);
|
|
870
|
+
sideEffects?.onSuccess?.(result);
|
|
871
|
+
} catch (err) {
|
|
872
|
+
const transformedError = sdkTransformError(
|
|
873
|
+
err,
|
|
874
|
+
{
|
|
875
|
+
spreadPathsToArguments: {},
|
|
876
|
+
explicitPathsToArguments: { mediaCollectionId: "$[0]" },
|
|
877
|
+
singleArgumentUnchanged: false
|
|
878
|
+
},
|
|
879
|
+
["mediaCollectionId"]
|
|
880
|
+
);
|
|
881
|
+
sideEffects?.onError?.(err);
|
|
882
|
+
throw transformedError;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
async function leaveCollection2(mediaCollectionId) {
|
|
886
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
887
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
888
|
+
mediaCollectionId
|
|
889
|
+
});
|
|
890
|
+
const reqOpts = leaveCollection(payload);
|
|
891
|
+
sideEffects?.onSiteCall?.();
|
|
892
|
+
try {
|
|
893
|
+
const result = await httpClient.request(reqOpts);
|
|
894
|
+
sideEffects?.onSuccess?.(result);
|
|
895
|
+
} catch (err) {
|
|
896
|
+
const transformedError = sdkTransformError(
|
|
897
|
+
err,
|
|
898
|
+
{
|
|
899
|
+
spreadPathsToArguments: {},
|
|
900
|
+
explicitPathsToArguments: { mediaCollectionId: "$[0]" },
|
|
901
|
+
singleArgumentUnchanged: false
|
|
902
|
+
},
|
|
903
|
+
["mediaCollectionId"]
|
|
904
|
+
);
|
|
905
|
+
sideEffects?.onError?.(err);
|
|
906
|
+
throw transformedError;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
async function listCollectionItems2(mediaCollectionId) {
|
|
910
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
911
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
912
|
+
mediaCollectionId
|
|
913
|
+
});
|
|
914
|
+
const reqOpts = listCollectionItems(payload);
|
|
915
|
+
sideEffects?.onSiteCall?.();
|
|
916
|
+
try {
|
|
917
|
+
const result = await httpClient.request(reqOpts);
|
|
918
|
+
sideEffects?.onSuccess?.(result);
|
|
919
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
920
|
+
} catch (err) {
|
|
921
|
+
const transformedError = sdkTransformError(
|
|
922
|
+
err,
|
|
923
|
+
{
|
|
924
|
+
spreadPathsToArguments: {},
|
|
925
|
+
explicitPathsToArguments: { mediaCollectionId: "$[0]" },
|
|
926
|
+
singleArgumentUnchanged: false
|
|
927
|
+
},
|
|
928
|
+
["mediaCollectionId"]
|
|
929
|
+
);
|
|
930
|
+
sideEffects?.onError?.(err);
|
|
931
|
+
throw transformedError;
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
export {
|
|
935
|
+
DataType,
|
|
936
|
+
LinkRel,
|
|
937
|
+
MediaOwner,
|
|
938
|
+
MemberStatus,
|
|
939
|
+
PrivacySettings,
|
|
940
|
+
Source,
|
|
941
|
+
Status,
|
|
942
|
+
Type,
|
|
943
|
+
WebhookIdentityType,
|
|
944
|
+
_delete2 as _delete,
|
|
945
|
+
addItems2 as addItems,
|
|
946
|
+
create2 as create,
|
|
947
|
+
get2 as get,
|
|
948
|
+
getCollectionItem2 as getCollectionItem,
|
|
949
|
+
joinToCollection2 as joinToCollection,
|
|
950
|
+
leaveCollection2 as leaveCollection,
|
|
951
|
+
list2 as list,
|
|
952
|
+
listCollectionItems2 as listCollectionItems,
|
|
953
|
+
listCollectionMembers2 as listCollectionMembers,
|
|
954
|
+
listCollectionsForItem2 as listCollectionsForItem,
|
|
955
|
+
partiallyUpdate2 as partiallyUpdate,
|
|
956
|
+
removeItems2 as removeItems
|
|
957
|
+
};
|
|
958
|
+
//# sourceMappingURL=index.typings.mjs.map
|