@wix/auto_sdk_media-collections_media-collections 1.0.20 → 1.0.22

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