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