@wix/auto_sdk_portfolio_project-items 1.0.51 → 1.0.53
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 +10 -10
- package/build/cjs/index.js +282 -371
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +181 -181
- package/build/cjs/index.typings.js +232 -318
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +175 -175
- package/build/cjs/meta.js +199 -293
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -10
- package/build/es/index.mjs +282 -371
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +181 -181
- package/build/es/index.typings.mjs +232 -318
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +175 -175
- package/build/es/meta.mjs +199 -293
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -10
- package/build/internal/cjs/index.typings.d.ts +181 -181
- package/build/internal/cjs/meta.d.ts +217 -217
- package/build/internal/es/index.d.mts +10 -10
- package/build/internal/es/index.typings.d.mts +181 -181
- package/build/internal/es/meta.d.mts +217 -217
- package/package.json +2 -2
|
@@ -50,71 +50,72 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
50
50
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
51
51
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
52
52
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
}
|
|
53
|
+
var TRANSFORM_PATHS_0 = [
|
|
54
|
+
{ path: "item.sortOrder" },
|
|
55
|
+
{ path: "item.image.focalPoint.x" },
|
|
56
|
+
{ path: "item.image.focalPoint.y" },
|
|
57
|
+
{ path: "item.image.unsharpMasking.amount" },
|
|
58
|
+
{ path: "item.image.unsharpMasking.radius" },
|
|
59
|
+
{ path: "item.image.unsharpMasking.threshold" }
|
|
60
|
+
];
|
|
61
|
+
var TRANSFORM_PATHS_1 = [
|
|
62
|
+
{ path: "item.createdDate" },
|
|
63
|
+
{ path: "item.updatedDate" },
|
|
64
|
+
{ path: "item.image.imageInfo.urlExpirationDate" },
|
|
65
|
+
{ path: "item.video.videoInfo.urlExpirationDate" },
|
|
66
|
+
{ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
|
|
67
|
+
{ path: "item.video.videoInfo.posters.urlExpirationDate" }
|
|
68
|
+
];
|
|
69
|
+
var TRANSFORM_PATHS_2 = [
|
|
70
|
+
{ path: "items.sortOrder" },
|
|
71
|
+
{ path: "items.image.focalPoint.x" },
|
|
72
|
+
{ path: "items.image.focalPoint.y" },
|
|
73
|
+
{ path: "items.image.unsharpMasking.amount" },
|
|
74
|
+
{ path: "items.image.unsharpMasking.radius" },
|
|
75
|
+
{ path: "items.image.unsharpMasking.threshold" }
|
|
76
|
+
];
|
|
77
|
+
var TRANSFORM_PATHS_3 = [
|
|
78
|
+
{ path: "items.createdDate" },
|
|
79
|
+
{ path: "items.updatedDate" },
|
|
80
|
+
{ path: "items.image.imageInfo.urlExpirationDate" },
|
|
81
|
+
{ path: "items.video.videoInfo.urlExpirationDate" },
|
|
82
|
+
{ path: "items.video.videoInfo.resolutions.poster.urlExpirationDate" },
|
|
83
|
+
{ path: "items.video.videoInfo.posters.urlExpirationDate" }
|
|
84
|
+
];
|
|
85
|
+
var TRANSFORM_PATHS_4 = [
|
|
86
|
+
{ path: "results.item.sortOrder" },
|
|
87
|
+
{ path: "results.item.image.focalPoint.x" },
|
|
88
|
+
{ path: "results.item.image.focalPoint.y" },
|
|
89
|
+
{ path: "results.item.image.unsharpMasking.amount" },
|
|
90
|
+
{ path: "results.item.image.unsharpMasking.radius" },
|
|
91
|
+
{ path: "results.item.image.unsharpMasking.threshold" }
|
|
92
|
+
];
|
|
93
|
+
var TRANSFORM_PATHS_5 = [
|
|
94
|
+
{ path: "results.item.createdDate" },
|
|
95
|
+
{ path: "results.item.updatedDate" },
|
|
96
|
+
{ path: "results.item.image.imageInfo.urlExpirationDate" },
|
|
97
|
+
{ path: "results.item.video.videoInfo.urlExpirationDate" },
|
|
98
|
+
{ path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate" },
|
|
99
|
+
{ path: "results.item.video.videoInfo.posters.urlExpirationDate" }
|
|
100
|
+
];
|
|
101
|
+
var TRANSFORM_PATHS_6 = [{ path: "mask" }];
|
|
102
|
+
var TRANSFORM_PATHS_7 = [{ path: "items.fieldMask" }];
|
|
103
|
+
var TRANSFORM_PATHS_8 = [
|
|
104
|
+
{ path: "items.item.sortOrder" },
|
|
105
|
+
{ path: "items.item.image.focalPoint.x" },
|
|
106
|
+
{ path: "items.item.image.focalPoint.y" },
|
|
107
|
+
{ path: "items.item.image.unsharpMasking.amount" },
|
|
108
|
+
{ path: "items.item.image.unsharpMasking.radius" },
|
|
109
|
+
{ path: "items.item.image.unsharpMasking.threshold" }
|
|
110
|
+
];
|
|
111
|
+
var TRANSFORM_PATHS_9 = [
|
|
112
|
+
{ path: "items.item.createdDate" },
|
|
113
|
+
{ path: "items.item.updatedDate" },
|
|
114
|
+
{ path: "items.item.image.imageInfo.urlExpirationDate" },
|
|
115
|
+
{ path: "items.item.video.videoInfo.urlExpirationDate" },
|
|
116
|
+
{ path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate" },
|
|
117
|
+
{ path: "items.item.video.videoInfo.posters.urlExpirationDate" }
|
|
118
|
+
];
|
|
118
119
|
function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
|
|
119
120
|
const domainToMappings = {
|
|
120
121
|
"manage._base_domain_": [
|
|
@@ -234,31 +235,103 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
|
|
|
234
235
|
};
|
|
235
236
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
236
237
|
}
|
|
238
|
+
function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
|
|
239
|
+
const domainToMappings = {
|
|
240
|
+
"manage._base_domain_": [
|
|
241
|
+
{
|
|
242
|
+
srcPath: "/_api/portfolio-app-service",
|
|
243
|
+
destPath: "/api"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"editor._base_domain_": [
|
|
247
|
+
{
|
|
248
|
+
srcPath: "/_api/portfolio-app-service",
|
|
249
|
+
destPath: "/api"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"blocks._base_domain_": [
|
|
253
|
+
{
|
|
254
|
+
srcPath: "/_api/portfolio-app-service",
|
|
255
|
+
destPath: "/api"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"create.editorx": [
|
|
259
|
+
{
|
|
260
|
+
srcPath: "/_api/portfolio-app-service",
|
|
261
|
+
destPath: "/api"
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
_: [
|
|
265
|
+
{
|
|
266
|
+
srcPath: "/_api/portfolio-app-service",
|
|
267
|
+
destPath: "/api"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"api._api_base_domain_": [
|
|
271
|
+
{
|
|
272
|
+
srcPath: "/_api/portfolio-app-service",
|
|
273
|
+
destPath: "/api"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"www.wixapis.com": [
|
|
277
|
+
{
|
|
278
|
+
srcPath: "/portfolio/v1/settings",
|
|
279
|
+
destPath: "/api/v1/portfolio/settings"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
|
|
283
|
+
destPath: "/api/v1/portfolio/settings"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
|
|
287
|
+
destPath: "/api/v1/portfolio/project/items/media"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"*.dev.wix-code.com": [
|
|
291
|
+
{
|
|
292
|
+
srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
|
|
293
|
+
destPath: "/api/v1/portfolio/settings"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
|
|
297
|
+
destPath: "/api/v1/portfolio/project/items/media"
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
};
|
|
301
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
302
|
+
}
|
|
237
303
|
var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
|
|
304
|
+
function generateTokenForProjectItems(payload) {
|
|
305
|
+
function __generateTokenForProjectItems({ host }) {
|
|
306
|
+
const metadata = {
|
|
307
|
+
entityFqdn: "wix.portfolio.project_items.v1.project_item",
|
|
308
|
+
method: "POST",
|
|
309
|
+
methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
|
|
310
|
+
packageName: PACKAGE_NAME,
|
|
311
|
+
migrationOptions: {
|
|
312
|
+
optInTransformResponse: true
|
|
313
|
+
},
|
|
314
|
+
url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
|
|
315
|
+
protoPath: "/api/v1/portfolio/project/items/media",
|
|
316
|
+
data: payload,
|
|
317
|
+
host
|
|
318
|
+
}),
|
|
319
|
+
data: payload
|
|
320
|
+
};
|
|
321
|
+
return metadata;
|
|
322
|
+
}
|
|
323
|
+
return __generateTokenForProjectItems;
|
|
324
|
+
}
|
|
238
325
|
function createProjectItem(payload) {
|
|
239
326
|
function __createProjectItem({ host }) {
|
|
240
327
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
241
328
|
{
|
|
242
329
|
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
243
|
-
paths:
|
|
244
|
-
{ path: "item.sortOrder" },
|
|
245
|
-
{ path: "item.image.focalPoint.x" },
|
|
246
|
-
{ path: "item.image.focalPoint.y" },
|
|
247
|
-
{ path: "item.image.unsharpMasking.amount" },
|
|
248
|
-
{ path: "item.image.unsharpMasking.radius" },
|
|
249
|
-
{ path: "item.image.unsharpMasking.threshold" }
|
|
250
|
-
]
|
|
330
|
+
paths: TRANSFORM_PATHS_0
|
|
251
331
|
},
|
|
252
332
|
{
|
|
253
333
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
254
|
-
paths:
|
|
255
|
-
{ path: "item.createdDate" },
|
|
256
|
-
{ path: "item.updatedDate" },
|
|
257
|
-
{ path: "item.image.imageInfo.urlExpirationDate" },
|
|
258
|
-
{ path: "item.video.videoInfo.urlExpirationDate" },
|
|
259
|
-
{ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
|
|
260
|
-
{ path: "item.video.videoInfo.posters.urlExpirationDate" }
|
|
261
|
-
]
|
|
334
|
+
paths: TRANSFORM_PATHS_1
|
|
262
335
|
}
|
|
263
336
|
]);
|
|
264
337
|
const metadata = {
|
|
@@ -278,27 +351,11 @@ function createProjectItem(payload) {
|
|
|
278
351
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
279
352
|
{
|
|
280
353
|
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
281
|
-
paths:
|
|
282
|
-
{ path: "item.sortOrder" },
|
|
283
|
-
{ path: "item.image.focalPoint.x" },
|
|
284
|
-
{ path: "item.image.focalPoint.y" },
|
|
285
|
-
{ path: "item.image.unsharpMasking.amount" },
|
|
286
|
-
{ path: "item.image.unsharpMasking.radius" },
|
|
287
|
-
{ path: "item.image.unsharpMasking.threshold" }
|
|
288
|
-
]
|
|
354
|
+
paths: TRANSFORM_PATHS_0
|
|
289
355
|
},
|
|
290
356
|
{
|
|
291
357
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
292
|
-
paths:
|
|
293
|
-
{ path: "item.createdDate" },
|
|
294
|
-
{ path: "item.updatedDate" },
|
|
295
|
-
{ path: "item.image.imageInfo.urlExpirationDate" },
|
|
296
|
-
{ path: "item.video.videoInfo.urlExpirationDate" },
|
|
297
|
-
{
|
|
298
|
-
path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
299
|
-
},
|
|
300
|
-
{ path: "item.video.videoInfo.posters.urlExpirationDate" }
|
|
301
|
-
]
|
|
358
|
+
paths: TRANSFORM_PATHS_1
|
|
302
359
|
}
|
|
303
360
|
])
|
|
304
361
|
};
|
|
@@ -311,27 +368,11 @@ function bulkCreateProjectItems(payload) {
|
|
|
311
368
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
312
369
|
{
|
|
313
370
|
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
314
|
-
paths:
|
|
315
|
-
{ path: "items.sortOrder" },
|
|
316
|
-
{ path: "items.image.focalPoint.x" },
|
|
317
|
-
{ path: "items.image.focalPoint.y" },
|
|
318
|
-
{ path: "items.image.unsharpMasking.amount" },
|
|
319
|
-
{ path: "items.image.unsharpMasking.radius" },
|
|
320
|
-
{ path: "items.image.unsharpMasking.threshold" }
|
|
321
|
-
]
|
|
371
|
+
paths: TRANSFORM_PATHS_2
|
|
322
372
|
},
|
|
323
373
|
{
|
|
324
374
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
325
|
-
paths:
|
|
326
|
-
{ path: "items.createdDate" },
|
|
327
|
-
{ path: "items.updatedDate" },
|
|
328
|
-
{ path: "items.image.imageInfo.urlExpirationDate" },
|
|
329
|
-
{ path: "items.video.videoInfo.urlExpirationDate" },
|
|
330
|
-
{
|
|
331
|
-
path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
332
|
-
},
|
|
333
|
-
{ path: "items.video.videoInfo.posters.urlExpirationDate" }
|
|
334
|
-
]
|
|
375
|
+
paths: TRANSFORM_PATHS_3
|
|
335
376
|
}
|
|
336
377
|
]);
|
|
337
378
|
const metadata = {
|
|
@@ -351,29 +392,11 @@ function bulkCreateProjectItems(payload) {
|
|
|
351
392
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
352
393
|
{
|
|
353
394
|
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
354
|
-
paths:
|
|
355
|
-
{ path: "results.item.sortOrder" },
|
|
356
|
-
{ path: "results.item.image.focalPoint.x" },
|
|
357
|
-
{ path: "results.item.image.focalPoint.y" },
|
|
358
|
-
{ path: "results.item.image.unsharpMasking.amount" },
|
|
359
|
-
{ path: "results.item.image.unsharpMasking.radius" },
|
|
360
|
-
{ path: "results.item.image.unsharpMasking.threshold" }
|
|
361
|
-
]
|
|
395
|
+
paths: TRANSFORM_PATHS_4
|
|
362
396
|
},
|
|
363
397
|
{
|
|
364
398
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
365
|
-
paths:
|
|
366
|
-
{ path: "results.item.createdDate" },
|
|
367
|
-
{ path: "results.item.updatedDate" },
|
|
368
|
-
{ path: "results.item.image.imageInfo.urlExpirationDate" },
|
|
369
|
-
{ path: "results.item.video.videoInfo.urlExpirationDate" },
|
|
370
|
-
{
|
|
371
|
-
path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
path: "results.item.video.videoInfo.posters.urlExpirationDate"
|
|
375
|
-
}
|
|
376
|
-
]
|
|
399
|
+
paths: TRANSFORM_PATHS_5
|
|
377
400
|
}
|
|
378
401
|
])
|
|
379
402
|
};
|
|
@@ -400,27 +423,11 @@ function getProjectItem(payload) {
|
|
|
400
423
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
401
424
|
{
|
|
402
425
|
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
403
|
-
paths:
|
|
404
|
-
{ path: "item.sortOrder" },
|
|
405
|
-
{ path: "item.image.focalPoint.x" },
|
|
406
|
-
{ path: "item.image.focalPoint.y" },
|
|
407
|
-
{ path: "item.image.unsharpMasking.amount" },
|
|
408
|
-
{ path: "item.image.unsharpMasking.radius" },
|
|
409
|
-
{ path: "item.image.unsharpMasking.threshold" }
|
|
410
|
-
]
|
|
426
|
+
paths: TRANSFORM_PATHS_0
|
|
411
427
|
},
|
|
412
428
|
{
|
|
413
429
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
414
|
-
paths:
|
|
415
|
-
{ path: "item.createdDate" },
|
|
416
|
-
{ path: "item.updatedDate" },
|
|
417
|
-
{ path: "item.image.imageInfo.urlExpirationDate" },
|
|
418
|
-
{ path: "item.video.videoInfo.urlExpirationDate" },
|
|
419
|
-
{
|
|
420
|
-
path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
421
|
-
},
|
|
422
|
-
{ path: "item.video.videoInfo.posters.urlExpirationDate" }
|
|
423
|
-
]
|
|
430
|
+
paths: TRANSFORM_PATHS_1
|
|
424
431
|
}
|
|
425
432
|
]),
|
|
426
433
|
fallback: [
|
|
@@ -458,27 +465,11 @@ function listProjectItems(payload) {
|
|
|
458
465
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
459
466
|
{
|
|
460
467
|
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
461
|
-
paths:
|
|
462
|
-
{ path: "items.sortOrder" },
|
|
463
|
-
{ path: "items.image.focalPoint.x" },
|
|
464
|
-
{ path: "items.image.focalPoint.y" },
|
|
465
|
-
{ path: "items.image.unsharpMasking.amount" },
|
|
466
|
-
{ path: "items.image.unsharpMasking.radius" },
|
|
467
|
-
{ path: "items.image.unsharpMasking.threshold" }
|
|
468
|
-
]
|
|
468
|
+
paths: TRANSFORM_PATHS_2
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
472
|
-
paths:
|
|
473
|
-
{ path: "items.createdDate" },
|
|
474
|
-
{ path: "items.updatedDate" },
|
|
475
|
-
{ path: "items.image.imageInfo.urlExpirationDate" },
|
|
476
|
-
{ path: "items.video.videoInfo.urlExpirationDate" },
|
|
477
|
-
{
|
|
478
|
-
path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
479
|
-
},
|
|
480
|
-
{ path: "items.video.videoInfo.posters.urlExpirationDate" }
|
|
481
|
-
]
|
|
472
|
+
paths: TRANSFORM_PATHS_3
|
|
482
473
|
}
|
|
483
474
|
])
|
|
484
475
|
};
|
|
@@ -491,29 +482,15 @@ function updateProjectItem(payload) {
|
|
|
491
482
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
492
483
|
{
|
|
493
484
|
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
494
|
-
paths:
|
|
485
|
+
paths: TRANSFORM_PATHS_6
|
|
495
486
|
},
|
|
496
487
|
{
|
|
497
488
|
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
498
|
-
paths:
|
|
499
|
-
{ path: "item.sortOrder" },
|
|
500
|
-
{ path: "item.image.focalPoint.x" },
|
|
501
|
-
{ path: "item.image.focalPoint.y" },
|
|
502
|
-
{ path: "item.image.unsharpMasking.amount" },
|
|
503
|
-
{ path: "item.image.unsharpMasking.radius" },
|
|
504
|
-
{ path: "item.image.unsharpMasking.threshold" }
|
|
505
|
-
]
|
|
489
|
+
paths: TRANSFORM_PATHS_0
|
|
506
490
|
},
|
|
507
491
|
{
|
|
508
492
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
509
|
-
paths:
|
|
510
|
-
{ path: "item.createdDate" },
|
|
511
|
-
{ path: "item.updatedDate" },
|
|
512
|
-
{ path: "item.image.imageInfo.urlExpirationDate" },
|
|
513
|
-
{ path: "item.video.videoInfo.urlExpirationDate" },
|
|
514
|
-
{ path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
|
|
515
|
-
{ path: "item.video.videoInfo.posters.urlExpirationDate" }
|
|
516
|
-
]
|
|
493
|
+
paths: TRANSFORM_PATHS_1
|
|
517
494
|
}
|
|
518
495
|
]);
|
|
519
496
|
const metadata = {
|
|
@@ -533,27 +510,11 @@ function updateProjectItem(payload) {
|
|
|
533
510
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
534
511
|
{
|
|
535
512
|
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
536
|
-
paths:
|
|
537
|
-
{ path: "item.sortOrder" },
|
|
538
|
-
{ path: "item.image.focalPoint.x" },
|
|
539
|
-
{ path: "item.image.focalPoint.y" },
|
|
540
|
-
{ path: "item.image.unsharpMasking.amount" },
|
|
541
|
-
{ path: "item.image.unsharpMasking.radius" },
|
|
542
|
-
{ path: "item.image.unsharpMasking.threshold" }
|
|
543
|
-
]
|
|
513
|
+
paths: TRANSFORM_PATHS_0
|
|
544
514
|
},
|
|
545
515
|
{
|
|
546
516
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
547
|
-
paths:
|
|
548
|
-
{ path: "item.createdDate" },
|
|
549
|
-
{ path: "item.updatedDate" },
|
|
550
|
-
{ path: "item.image.imageInfo.urlExpirationDate" },
|
|
551
|
-
{ path: "item.video.videoInfo.urlExpirationDate" },
|
|
552
|
-
{
|
|
553
|
-
path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
554
|
-
},
|
|
555
|
-
{ path: "item.video.videoInfo.posters.urlExpirationDate" }
|
|
556
|
-
]
|
|
517
|
+
paths: TRANSFORM_PATHS_1
|
|
557
518
|
}
|
|
558
519
|
])
|
|
559
520
|
};
|
|
@@ -566,31 +527,15 @@ function bulkUpdateProjectItems(payload) {
|
|
|
566
527
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
567
528
|
{
|
|
568
529
|
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
569
|
-
paths:
|
|
530
|
+
paths: TRANSFORM_PATHS_7
|
|
570
531
|
},
|
|
571
532
|
{
|
|
572
533
|
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
573
|
-
paths:
|
|
574
|
-
{ path: "items.item.sortOrder" },
|
|
575
|
-
{ path: "items.item.image.focalPoint.x" },
|
|
576
|
-
{ path: "items.item.image.focalPoint.y" },
|
|
577
|
-
{ path: "items.item.image.unsharpMasking.amount" },
|
|
578
|
-
{ path: "items.item.image.unsharpMasking.radius" },
|
|
579
|
-
{ path: "items.item.image.unsharpMasking.threshold" }
|
|
580
|
-
]
|
|
534
|
+
paths: TRANSFORM_PATHS_8
|
|
581
535
|
},
|
|
582
536
|
{
|
|
583
537
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
584
|
-
paths:
|
|
585
|
-
{ path: "items.item.createdDate" },
|
|
586
|
-
{ path: "items.item.updatedDate" },
|
|
587
|
-
{ path: "items.item.image.imageInfo.urlExpirationDate" },
|
|
588
|
-
{ path: "items.item.video.videoInfo.urlExpirationDate" },
|
|
589
|
-
{
|
|
590
|
-
path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
591
|
-
},
|
|
592
|
-
{ path: "items.item.video.videoInfo.posters.urlExpirationDate" }
|
|
593
|
-
]
|
|
538
|
+
paths: TRANSFORM_PATHS_9
|
|
594
539
|
}
|
|
595
540
|
]);
|
|
596
541
|
const metadata = {
|
|
@@ -610,29 +555,11 @@ function bulkUpdateProjectItems(payload) {
|
|
|
610
555
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
611
556
|
{
|
|
612
557
|
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
613
|
-
paths:
|
|
614
|
-
{ path: "results.item.sortOrder" },
|
|
615
|
-
{ path: "results.item.image.focalPoint.x" },
|
|
616
|
-
{ path: "results.item.image.focalPoint.y" },
|
|
617
|
-
{ path: "results.item.image.unsharpMasking.amount" },
|
|
618
|
-
{ path: "results.item.image.unsharpMasking.radius" },
|
|
619
|
-
{ path: "results.item.image.unsharpMasking.threshold" }
|
|
620
|
-
]
|
|
558
|
+
paths: TRANSFORM_PATHS_4
|
|
621
559
|
},
|
|
622
560
|
{
|
|
623
561
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
624
|
-
paths:
|
|
625
|
-
{ path: "results.item.createdDate" },
|
|
626
|
-
{ path: "results.item.updatedDate" },
|
|
627
|
-
{ path: "results.item.image.imageInfo.urlExpirationDate" },
|
|
628
|
-
{ path: "results.item.video.videoInfo.urlExpirationDate" },
|
|
629
|
-
{
|
|
630
|
-
path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
path: "results.item.video.videoInfo.posters.urlExpirationDate"
|
|
634
|
-
}
|
|
635
|
-
]
|
|
562
|
+
paths: TRANSFORM_PATHS_5
|
|
636
563
|
}
|
|
637
564
|
])
|
|
638
565
|
};
|
|
@@ -703,27 +630,6 @@ function duplicateProjectItems(payload) {
|
|
|
703
630
|
}
|
|
704
631
|
return __duplicateProjectItems;
|
|
705
632
|
}
|
|
706
|
-
function generateTokenForProjectItems(payload) {
|
|
707
|
-
function __generateTokenForProjectItems({ host }) {
|
|
708
|
-
const metadata = {
|
|
709
|
-
entityFqdn: "wix.portfolio.project_items.v1.project_item",
|
|
710
|
-
method: "POST",
|
|
711
|
-
methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
|
|
712
|
-
packageName: PACKAGE_NAME,
|
|
713
|
-
migrationOptions: {
|
|
714
|
-
optInTransformResponse: true
|
|
715
|
-
},
|
|
716
|
-
url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
|
|
717
|
-
protoPath: "/api/v1/portfolio/project/items/media",
|
|
718
|
-
data: payload,
|
|
719
|
-
host
|
|
720
|
-
}),
|
|
721
|
-
data: payload
|
|
722
|
-
};
|
|
723
|
-
return metadata;
|
|
724
|
-
}
|
|
725
|
-
return __generateTokenForProjectItems;
|
|
726
|
-
}
|
|
727
633
|
|
|
728
634
|
// src/portfolio-project-items-v1-project-item-project-items.universal.ts
|
|
729
635
|
var import_image = require("@wix/sdk-runtime/transformations/image");
|
|
@@ -731,6 +637,14 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
|
|
|
731
637
|
var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
|
|
732
638
|
var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
|
|
733
639
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
640
|
+
var TRANSFORM_PATHS_02 = [{ path: "item.image.imageInfo" }];
|
|
641
|
+
var TRANSFORM_PATHS_12 = [{ path: "item.video.videoInfo" }];
|
|
642
|
+
var TRANSFORM_PATHS_22 = [{ path: "items.image.imageInfo" }];
|
|
643
|
+
var TRANSFORM_PATHS_32 = [{ path: "items.video.videoInfo" }];
|
|
644
|
+
var TRANSFORM_PATHS_42 = [{ path: "results.item.image.imageInfo" }];
|
|
645
|
+
var TRANSFORM_PATHS_52 = [{ path: "results.item.video.videoInfo" }];
|
|
646
|
+
var TRANSFORM_PATHS_62 = [{ path: "items.item.image.imageInfo" }];
|
|
647
|
+
var TRANSFORM_PATHS_72 = [{ path: "items.item.video.videoInfo" }];
|
|
734
648
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
735
649
|
Type2["UNDEFINED"] = "UNDEFINED";
|
|
736
650
|
Type2["IMAGE"] = "IMAGE";
|
|
@@ -743,11 +657,6 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
|
|
|
743
657
|
ImageType2["EXTERNAL"] = "EXTERNAL";
|
|
744
658
|
return ImageType2;
|
|
745
659
|
})(ImageType || {});
|
|
746
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
747
|
-
SortOrder2["ASC"] = "ASC";
|
|
748
|
-
SortOrder2["DESC"] = "DESC";
|
|
749
|
-
return SortOrder2;
|
|
750
|
-
})(SortOrder || {});
|
|
751
660
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
752
661
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
753
662
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -756,6 +665,36 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
756
665
|
WebhookIdentityType2["APP"] = "APP";
|
|
757
666
|
return WebhookIdentityType2;
|
|
758
667
|
})(WebhookIdentityType || {});
|
|
668
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
669
|
+
SortOrder2["ASC"] = "ASC";
|
|
670
|
+
SortOrder2["DESC"] = "DESC";
|
|
671
|
+
return SortOrder2;
|
|
672
|
+
})(SortOrder || {});
|
|
673
|
+
async function generateTokenForProjectItems2(mediaIds) {
|
|
674
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
675
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
|
|
676
|
+
const reqOpts = generateTokenForProjectItems(
|
|
677
|
+
payload
|
|
678
|
+
);
|
|
679
|
+
sideEffects?.onSiteCall?.();
|
|
680
|
+
try {
|
|
681
|
+
const result = await httpClient.request(reqOpts);
|
|
682
|
+
sideEffects?.onSuccess?.(result);
|
|
683
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
684
|
+
} catch (err) {
|
|
685
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
686
|
+
err,
|
|
687
|
+
{
|
|
688
|
+
spreadPathsToArguments: {},
|
|
689
|
+
explicitPathsToArguments: { mediaIds: "$[0]" },
|
|
690
|
+
singleArgumentUnchanged: false
|
|
691
|
+
},
|
|
692
|
+
["mediaIds"]
|
|
693
|
+
);
|
|
694
|
+
sideEffects?.onError?.(err);
|
|
695
|
+
throw transformedError;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
759
698
|
async function createProjectItem2(item) {
|
|
760
699
|
const { httpClient, sideEffects } = arguments[1];
|
|
761
700
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -763,11 +702,11 @@ async function createProjectItem2(item) {
|
|
|
763
702
|
[
|
|
764
703
|
{
|
|
765
704
|
transformFn: import_image.transformSDKImageToRESTImage,
|
|
766
|
-
paths:
|
|
705
|
+
paths: TRANSFORM_PATHS_02
|
|
767
706
|
},
|
|
768
707
|
{
|
|
769
708
|
transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
|
|
770
|
-
paths:
|
|
709
|
+
paths: TRANSFORM_PATHS_12
|
|
771
710
|
}
|
|
772
711
|
]
|
|
773
712
|
);
|
|
@@ -780,11 +719,11 @@ async function createProjectItem2(item) {
|
|
|
780
719
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
781
720
|
{
|
|
782
721
|
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
783
|
-
paths:
|
|
722
|
+
paths: TRANSFORM_PATHS_02
|
|
784
723
|
},
|
|
785
724
|
{
|
|
786
725
|
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
787
|
-
paths:
|
|
726
|
+
paths: TRANSFORM_PATHS_12
|
|
788
727
|
}
|
|
789
728
|
])
|
|
790
729
|
)?.item;
|
|
@@ -812,11 +751,11 @@ async function bulkCreateProjectItems2(options) {
|
|
|
812
751
|
[
|
|
813
752
|
{
|
|
814
753
|
transformFn: import_image.transformSDKImageToRESTImage,
|
|
815
|
-
paths:
|
|
754
|
+
paths: TRANSFORM_PATHS_22
|
|
816
755
|
},
|
|
817
756
|
{
|
|
818
757
|
transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
|
|
819
|
-
paths:
|
|
758
|
+
paths: TRANSFORM_PATHS_32
|
|
820
759
|
}
|
|
821
760
|
]
|
|
822
761
|
);
|
|
@@ -831,11 +770,11 @@ async function bulkCreateProjectItems2(options) {
|
|
|
831
770
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
832
771
|
{
|
|
833
772
|
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
834
|
-
paths:
|
|
773
|
+
paths: TRANSFORM_PATHS_42
|
|
835
774
|
},
|
|
836
775
|
{
|
|
837
776
|
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
838
|
-
paths:
|
|
777
|
+
paths: TRANSFORM_PATHS_52
|
|
839
778
|
}
|
|
840
779
|
])
|
|
841
780
|
);
|
|
@@ -868,11 +807,11 @@ async function getProjectItem2(itemId) {
|
|
|
868
807
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
869
808
|
{
|
|
870
809
|
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
871
|
-
paths:
|
|
810
|
+
paths: TRANSFORM_PATHS_02
|
|
872
811
|
},
|
|
873
812
|
{
|
|
874
813
|
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
875
|
-
paths:
|
|
814
|
+
paths: TRANSFORM_PATHS_12
|
|
876
815
|
}
|
|
877
816
|
])
|
|
878
817
|
)?.item;
|
|
@@ -905,11 +844,11 @@ async function listProjectItems2(projectId, options) {
|
|
|
905
844
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
906
845
|
{
|
|
907
846
|
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
908
|
-
paths:
|
|
847
|
+
paths: TRANSFORM_PATHS_22
|
|
909
848
|
},
|
|
910
849
|
{
|
|
911
850
|
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
912
|
-
paths:
|
|
851
|
+
paths: TRANSFORM_PATHS_32
|
|
913
852
|
}
|
|
914
853
|
])
|
|
915
854
|
);
|
|
@@ -934,11 +873,11 @@ async function updateProjectItem2(_id, item) {
|
|
|
934
873
|
[
|
|
935
874
|
{
|
|
936
875
|
transformFn: import_image.transformSDKImageToRESTImage,
|
|
937
|
-
paths:
|
|
876
|
+
paths: TRANSFORM_PATHS_02
|
|
938
877
|
},
|
|
939
878
|
{
|
|
940
879
|
transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
|
|
941
|
-
paths:
|
|
880
|
+
paths: TRANSFORM_PATHS_12
|
|
942
881
|
}
|
|
943
882
|
]
|
|
944
883
|
);
|
|
@@ -951,11 +890,11 @@ async function updateProjectItem2(_id, item) {
|
|
|
951
890
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
952
891
|
{
|
|
953
892
|
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
954
|
-
paths:
|
|
893
|
+
paths: TRANSFORM_PATHS_02
|
|
955
894
|
},
|
|
956
895
|
{
|
|
957
896
|
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
958
|
-
paths:
|
|
897
|
+
paths: TRANSFORM_PATHS_12
|
|
959
898
|
}
|
|
960
899
|
])
|
|
961
900
|
)?.item;
|
|
@@ -983,11 +922,11 @@ async function bulkUpdateProjectItems2(options) {
|
|
|
983
922
|
[
|
|
984
923
|
{
|
|
985
924
|
transformFn: import_image.transformSDKImageToRESTImage,
|
|
986
|
-
paths:
|
|
925
|
+
paths: TRANSFORM_PATHS_62
|
|
987
926
|
},
|
|
988
927
|
{
|
|
989
928
|
transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
|
|
990
|
-
paths:
|
|
929
|
+
paths: TRANSFORM_PATHS_72
|
|
991
930
|
}
|
|
992
931
|
]
|
|
993
932
|
);
|
|
@@ -1002,11 +941,11 @@ async function bulkUpdateProjectItems2(options) {
|
|
|
1002
941
|
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1003
942
|
{
|
|
1004
943
|
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1005
|
-
paths:
|
|
944
|
+
paths: TRANSFORM_PATHS_42
|
|
1006
945
|
},
|
|
1007
946
|
{
|
|
1008
947
|
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1009
|
-
paths:
|
|
948
|
+
paths: TRANSFORM_PATHS_52
|
|
1010
949
|
}
|
|
1011
950
|
])
|
|
1012
951
|
);
|
|
@@ -1108,31 +1047,6 @@ async function duplicateProjectItems2(originProjectId, options) {
|
|
|
1108
1047
|
throw transformedError;
|
|
1109
1048
|
}
|
|
1110
1049
|
}
|
|
1111
|
-
async function generateTokenForProjectItems2(mediaIds) {
|
|
1112
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1113
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
|
|
1114
|
-
const reqOpts = generateTokenForProjectItems(
|
|
1115
|
-
payload
|
|
1116
|
-
);
|
|
1117
|
-
sideEffects?.onSiteCall?.();
|
|
1118
|
-
try {
|
|
1119
|
-
const result = await httpClient.request(reqOpts);
|
|
1120
|
-
sideEffects?.onSuccess?.(result);
|
|
1121
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1122
|
-
} catch (err) {
|
|
1123
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
1124
|
-
err,
|
|
1125
|
-
{
|
|
1126
|
-
spreadPathsToArguments: {},
|
|
1127
|
-
explicitPathsToArguments: { mediaIds: "$[0]" },
|
|
1128
|
-
singleArgumentUnchanged: false
|
|
1129
|
-
},
|
|
1130
|
-
["mediaIds"]
|
|
1131
|
-
);
|
|
1132
|
-
sideEffects?.onError?.(err);
|
|
1133
|
-
throw transformedError;
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
1050
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1137
1051
|
0 && (module.exports = {
|
|
1138
1052
|
ImageType,
|