@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.
@@ -62,71 +62,72 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
62
62
  var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
63
63
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
64
64
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
65
- function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
66
- const domainToMappings = {
67
- "manage._base_domain_": [
68
- {
69
- srcPath: "/_api/portfolio-app-service",
70
- destPath: "/api"
71
- }
72
- ],
73
- "editor._base_domain_": [
74
- {
75
- srcPath: "/_api/portfolio-app-service",
76
- destPath: "/api"
77
- }
78
- ],
79
- "blocks._base_domain_": [
80
- {
81
- srcPath: "/_api/portfolio-app-service",
82
- destPath: "/api"
83
- }
84
- ],
85
- "create.editorx": [
86
- {
87
- srcPath: "/_api/portfolio-app-service",
88
- destPath: "/api"
89
- }
90
- ],
91
- _: [
92
- {
93
- srcPath: "/_api/portfolio-app-service",
94
- destPath: "/api"
95
- }
96
- ],
97
- "api._api_base_domain_": [
98
- {
99
- srcPath: "/_api/portfolio-app-service",
100
- destPath: "/api"
101
- }
102
- ],
103
- "www.wixapis.com": [
104
- {
105
- srcPath: "/portfolio/v1/settings",
106
- destPath: "/api/v1/portfolio/settings"
107
- },
108
- {
109
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
110
- destPath: "/api/v1/portfolio/settings"
111
- },
112
- {
113
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
114
- destPath: "/api/v1/portfolio/project/items/media"
115
- }
116
- ],
117
- "*.dev.wix-code.com": [
118
- {
119
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
120
- destPath: "/api/v1/portfolio/settings"
121
- },
122
- {
123
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
124
- destPath: "/api/v1/portfolio/project/items/media"
125
- }
126
- ]
127
- };
128
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
129
- }
65
+ var TRANSFORM_PATHS_0 = [
66
+ { path: "item.sortOrder" },
67
+ { path: "item.image.focalPoint.x" },
68
+ { path: "item.image.focalPoint.y" },
69
+ { path: "item.image.unsharpMasking.amount" },
70
+ { path: "item.image.unsharpMasking.radius" },
71
+ { path: "item.image.unsharpMasking.threshold" }
72
+ ];
73
+ var TRANSFORM_PATHS_1 = [
74
+ { path: "item.createdDate" },
75
+ { path: "item.updatedDate" },
76
+ { path: "item.image.imageInfo.urlExpirationDate" },
77
+ { path: "item.video.videoInfo.urlExpirationDate" },
78
+ { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
79
+ { path: "item.video.videoInfo.posters.urlExpirationDate" }
80
+ ];
81
+ var TRANSFORM_PATHS_2 = [
82
+ { path: "items.sortOrder" },
83
+ { path: "items.image.focalPoint.x" },
84
+ { path: "items.image.focalPoint.y" },
85
+ { path: "items.image.unsharpMasking.amount" },
86
+ { path: "items.image.unsharpMasking.radius" },
87
+ { path: "items.image.unsharpMasking.threshold" }
88
+ ];
89
+ var TRANSFORM_PATHS_3 = [
90
+ { path: "items.createdDate" },
91
+ { path: "items.updatedDate" },
92
+ { path: "items.image.imageInfo.urlExpirationDate" },
93
+ { path: "items.video.videoInfo.urlExpirationDate" },
94
+ { path: "items.video.videoInfo.resolutions.poster.urlExpirationDate" },
95
+ { path: "items.video.videoInfo.posters.urlExpirationDate" }
96
+ ];
97
+ var TRANSFORM_PATHS_4 = [
98
+ { path: "results.item.sortOrder" },
99
+ { path: "results.item.image.focalPoint.x" },
100
+ { path: "results.item.image.focalPoint.y" },
101
+ { path: "results.item.image.unsharpMasking.amount" },
102
+ { path: "results.item.image.unsharpMasking.radius" },
103
+ { path: "results.item.image.unsharpMasking.threshold" }
104
+ ];
105
+ var TRANSFORM_PATHS_5 = [
106
+ { path: "results.item.createdDate" },
107
+ { path: "results.item.updatedDate" },
108
+ { path: "results.item.image.imageInfo.urlExpirationDate" },
109
+ { path: "results.item.video.videoInfo.urlExpirationDate" },
110
+ { path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate" },
111
+ { path: "results.item.video.videoInfo.posters.urlExpirationDate" }
112
+ ];
113
+ var TRANSFORM_PATHS_6 = [{ path: "mask" }];
114
+ var TRANSFORM_PATHS_7 = [{ path: "items.fieldMask" }];
115
+ var TRANSFORM_PATHS_8 = [
116
+ { path: "items.item.sortOrder" },
117
+ { path: "items.item.image.focalPoint.x" },
118
+ { path: "items.item.image.focalPoint.y" },
119
+ { path: "items.item.image.unsharpMasking.amount" },
120
+ { path: "items.item.image.unsharpMasking.radius" },
121
+ { path: "items.item.image.unsharpMasking.threshold" }
122
+ ];
123
+ var TRANSFORM_PATHS_9 = [
124
+ { path: "items.item.createdDate" },
125
+ { path: "items.item.updatedDate" },
126
+ { path: "items.item.image.imageInfo.urlExpirationDate" },
127
+ { path: "items.item.video.videoInfo.urlExpirationDate" },
128
+ { path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate" },
129
+ { path: "items.item.video.videoInfo.posters.urlExpirationDate" }
130
+ ];
130
131
  function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
131
132
  const domainToMappings = {
132
133
  "manage._base_domain_": [
@@ -246,31 +247,103 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
246
247
  };
247
248
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
248
249
  }
250
+ function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
251
+ const domainToMappings = {
252
+ "manage._base_domain_": [
253
+ {
254
+ srcPath: "/_api/portfolio-app-service",
255
+ destPath: "/api"
256
+ }
257
+ ],
258
+ "editor._base_domain_": [
259
+ {
260
+ srcPath: "/_api/portfolio-app-service",
261
+ destPath: "/api"
262
+ }
263
+ ],
264
+ "blocks._base_domain_": [
265
+ {
266
+ srcPath: "/_api/portfolio-app-service",
267
+ destPath: "/api"
268
+ }
269
+ ],
270
+ "create.editorx": [
271
+ {
272
+ srcPath: "/_api/portfolio-app-service",
273
+ destPath: "/api"
274
+ }
275
+ ],
276
+ _: [
277
+ {
278
+ srcPath: "/_api/portfolio-app-service",
279
+ destPath: "/api"
280
+ }
281
+ ],
282
+ "api._api_base_domain_": [
283
+ {
284
+ srcPath: "/_api/portfolio-app-service",
285
+ destPath: "/api"
286
+ }
287
+ ],
288
+ "www.wixapis.com": [
289
+ {
290
+ srcPath: "/portfolio/v1/settings",
291
+ destPath: "/api/v1/portfolio/settings"
292
+ },
293
+ {
294
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
295
+ destPath: "/api/v1/portfolio/settings"
296
+ },
297
+ {
298
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
299
+ destPath: "/api/v1/portfolio/project/items/media"
300
+ }
301
+ ],
302
+ "*.dev.wix-code.com": [
303
+ {
304
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
305
+ destPath: "/api/v1/portfolio/settings"
306
+ },
307
+ {
308
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
309
+ destPath: "/api/v1/portfolio/project/items/media"
310
+ }
311
+ ]
312
+ };
313
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
314
+ }
249
315
  var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
316
+ function generateTokenForProjectItems(payload) {
317
+ function __generateTokenForProjectItems({ host }) {
318
+ const metadata = {
319
+ entityFqdn: "wix.portfolio.project_items.v1.project_item",
320
+ method: "POST",
321
+ methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
322
+ packageName: PACKAGE_NAME,
323
+ migrationOptions: {
324
+ optInTransformResponse: true
325
+ },
326
+ url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
327
+ protoPath: "/api/v1/portfolio/project/items/media",
328
+ data: payload,
329
+ host
330
+ }),
331
+ data: payload
332
+ };
333
+ return metadata;
334
+ }
335
+ return __generateTokenForProjectItems;
336
+ }
250
337
  function createProjectItem(payload) {
251
338
  function __createProjectItem({ host }) {
252
339
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
253
340
  {
254
341
  transformFn: import_float.transformSDKFloatToRESTFloat,
255
- paths: [
256
- { path: "item.sortOrder" },
257
- { path: "item.image.focalPoint.x" },
258
- { path: "item.image.focalPoint.y" },
259
- { path: "item.image.unsharpMasking.amount" },
260
- { path: "item.image.unsharpMasking.radius" },
261
- { path: "item.image.unsharpMasking.threshold" }
262
- ]
342
+ paths: TRANSFORM_PATHS_0
263
343
  },
264
344
  {
265
345
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
266
- paths: [
267
- { path: "item.createdDate" },
268
- { path: "item.updatedDate" },
269
- { path: "item.image.imageInfo.urlExpirationDate" },
270
- { path: "item.video.videoInfo.urlExpirationDate" },
271
- { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
272
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
273
- ]
346
+ paths: TRANSFORM_PATHS_1
274
347
  }
275
348
  ]);
276
349
  const metadata = {
@@ -290,27 +363,11 @@ function createProjectItem(payload) {
290
363
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
291
364
  {
292
365
  transformFn: import_float2.transformRESTFloatToSDKFloat,
293
- paths: [
294
- { path: "item.sortOrder" },
295
- { path: "item.image.focalPoint.x" },
296
- { path: "item.image.focalPoint.y" },
297
- { path: "item.image.unsharpMasking.amount" },
298
- { path: "item.image.unsharpMasking.radius" },
299
- { path: "item.image.unsharpMasking.threshold" }
300
- ]
366
+ paths: TRANSFORM_PATHS_0
301
367
  },
302
368
  {
303
369
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
304
- paths: [
305
- { path: "item.createdDate" },
306
- { path: "item.updatedDate" },
307
- { path: "item.image.imageInfo.urlExpirationDate" },
308
- { path: "item.video.videoInfo.urlExpirationDate" },
309
- {
310
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
311
- },
312
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
313
- ]
370
+ paths: TRANSFORM_PATHS_1
314
371
  }
315
372
  ])
316
373
  };
@@ -323,27 +380,11 @@ function bulkCreateProjectItems(payload) {
323
380
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
324
381
  {
325
382
  transformFn: import_float.transformSDKFloatToRESTFloat,
326
- paths: [
327
- { path: "items.sortOrder" },
328
- { path: "items.image.focalPoint.x" },
329
- { path: "items.image.focalPoint.y" },
330
- { path: "items.image.unsharpMasking.amount" },
331
- { path: "items.image.unsharpMasking.radius" },
332
- { path: "items.image.unsharpMasking.threshold" }
333
- ]
383
+ paths: TRANSFORM_PATHS_2
334
384
  },
335
385
  {
336
386
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
337
- paths: [
338
- { path: "items.createdDate" },
339
- { path: "items.updatedDate" },
340
- { path: "items.image.imageInfo.urlExpirationDate" },
341
- { path: "items.video.videoInfo.urlExpirationDate" },
342
- {
343
- path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
344
- },
345
- { path: "items.video.videoInfo.posters.urlExpirationDate" }
346
- ]
387
+ paths: TRANSFORM_PATHS_3
347
388
  }
348
389
  ]);
349
390
  const metadata = {
@@ -363,29 +404,11 @@ function bulkCreateProjectItems(payload) {
363
404
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
364
405
  {
365
406
  transformFn: import_float2.transformRESTFloatToSDKFloat,
366
- paths: [
367
- { path: "results.item.sortOrder" },
368
- { path: "results.item.image.focalPoint.x" },
369
- { path: "results.item.image.focalPoint.y" },
370
- { path: "results.item.image.unsharpMasking.amount" },
371
- { path: "results.item.image.unsharpMasking.radius" },
372
- { path: "results.item.image.unsharpMasking.threshold" }
373
- ]
407
+ paths: TRANSFORM_PATHS_4
374
408
  },
375
409
  {
376
410
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
377
- paths: [
378
- { path: "results.item.createdDate" },
379
- { path: "results.item.updatedDate" },
380
- { path: "results.item.image.imageInfo.urlExpirationDate" },
381
- { path: "results.item.video.videoInfo.urlExpirationDate" },
382
- {
383
- path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
384
- },
385
- {
386
- path: "results.item.video.videoInfo.posters.urlExpirationDate"
387
- }
388
- ]
411
+ paths: TRANSFORM_PATHS_5
389
412
  }
390
413
  ])
391
414
  };
@@ -412,27 +435,11 @@ function getProjectItem(payload) {
412
435
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
413
436
  {
414
437
  transformFn: import_float2.transformRESTFloatToSDKFloat,
415
- paths: [
416
- { path: "item.sortOrder" },
417
- { path: "item.image.focalPoint.x" },
418
- { path: "item.image.focalPoint.y" },
419
- { path: "item.image.unsharpMasking.amount" },
420
- { path: "item.image.unsharpMasking.radius" },
421
- { path: "item.image.unsharpMasking.threshold" }
422
- ]
438
+ paths: TRANSFORM_PATHS_0
423
439
  },
424
440
  {
425
441
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
426
- paths: [
427
- { path: "item.createdDate" },
428
- { path: "item.updatedDate" },
429
- { path: "item.image.imageInfo.urlExpirationDate" },
430
- { path: "item.video.videoInfo.urlExpirationDate" },
431
- {
432
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
433
- },
434
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
435
- ]
442
+ paths: TRANSFORM_PATHS_1
436
443
  }
437
444
  ]),
438
445
  fallback: [
@@ -470,27 +477,11 @@ function listProjectItems(payload) {
470
477
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
471
478
  {
472
479
  transformFn: import_float2.transformRESTFloatToSDKFloat,
473
- paths: [
474
- { path: "items.sortOrder" },
475
- { path: "items.image.focalPoint.x" },
476
- { path: "items.image.focalPoint.y" },
477
- { path: "items.image.unsharpMasking.amount" },
478
- { path: "items.image.unsharpMasking.radius" },
479
- { path: "items.image.unsharpMasking.threshold" }
480
- ]
480
+ paths: TRANSFORM_PATHS_2
481
481
  },
482
482
  {
483
483
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
484
- paths: [
485
- { path: "items.createdDate" },
486
- { path: "items.updatedDate" },
487
- { path: "items.image.imageInfo.urlExpirationDate" },
488
- { path: "items.video.videoInfo.urlExpirationDate" },
489
- {
490
- path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
491
- },
492
- { path: "items.video.videoInfo.posters.urlExpirationDate" }
493
- ]
484
+ paths: TRANSFORM_PATHS_3
494
485
  }
495
486
  ])
496
487
  };
@@ -503,29 +494,15 @@ function updateProjectItem(payload) {
503
494
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
504
495
  {
505
496
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
506
- paths: [{ path: "mask" }]
497
+ paths: TRANSFORM_PATHS_6
507
498
  },
508
499
  {
509
500
  transformFn: import_float.transformSDKFloatToRESTFloat,
510
- paths: [
511
- { path: "item.sortOrder" },
512
- { path: "item.image.focalPoint.x" },
513
- { path: "item.image.focalPoint.y" },
514
- { path: "item.image.unsharpMasking.amount" },
515
- { path: "item.image.unsharpMasking.radius" },
516
- { path: "item.image.unsharpMasking.threshold" }
517
- ]
501
+ paths: TRANSFORM_PATHS_0
518
502
  },
519
503
  {
520
504
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
521
- paths: [
522
- { path: "item.createdDate" },
523
- { path: "item.updatedDate" },
524
- { path: "item.image.imageInfo.urlExpirationDate" },
525
- { path: "item.video.videoInfo.urlExpirationDate" },
526
- { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
527
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
528
- ]
505
+ paths: TRANSFORM_PATHS_1
529
506
  }
530
507
  ]);
531
508
  const metadata = {
@@ -545,27 +522,11 @@ function updateProjectItem(payload) {
545
522
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
546
523
  {
547
524
  transformFn: import_float2.transformRESTFloatToSDKFloat,
548
- paths: [
549
- { path: "item.sortOrder" },
550
- { path: "item.image.focalPoint.x" },
551
- { path: "item.image.focalPoint.y" },
552
- { path: "item.image.unsharpMasking.amount" },
553
- { path: "item.image.unsharpMasking.radius" },
554
- { path: "item.image.unsharpMasking.threshold" }
555
- ]
525
+ paths: TRANSFORM_PATHS_0
556
526
  },
557
527
  {
558
528
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
559
- paths: [
560
- { path: "item.createdDate" },
561
- { path: "item.updatedDate" },
562
- { path: "item.image.imageInfo.urlExpirationDate" },
563
- { path: "item.video.videoInfo.urlExpirationDate" },
564
- {
565
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
566
- },
567
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
568
- ]
529
+ paths: TRANSFORM_PATHS_1
569
530
  }
570
531
  ])
571
532
  };
@@ -578,31 +539,15 @@ function bulkUpdateProjectItems(payload) {
578
539
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
579
540
  {
580
541
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
581
- paths: [{ path: "items.fieldMask" }]
542
+ paths: TRANSFORM_PATHS_7
582
543
  },
583
544
  {
584
545
  transformFn: import_float.transformSDKFloatToRESTFloat,
585
- paths: [
586
- { path: "items.item.sortOrder" },
587
- { path: "items.item.image.focalPoint.x" },
588
- { path: "items.item.image.focalPoint.y" },
589
- { path: "items.item.image.unsharpMasking.amount" },
590
- { path: "items.item.image.unsharpMasking.radius" },
591
- { path: "items.item.image.unsharpMasking.threshold" }
592
- ]
546
+ paths: TRANSFORM_PATHS_8
593
547
  },
594
548
  {
595
549
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
596
- paths: [
597
- { path: "items.item.createdDate" },
598
- { path: "items.item.updatedDate" },
599
- { path: "items.item.image.imageInfo.urlExpirationDate" },
600
- { path: "items.item.video.videoInfo.urlExpirationDate" },
601
- {
602
- path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate"
603
- },
604
- { path: "items.item.video.videoInfo.posters.urlExpirationDate" }
605
- ]
550
+ paths: TRANSFORM_PATHS_9
606
551
  }
607
552
  ]);
608
553
  const metadata = {
@@ -622,29 +567,11 @@ function bulkUpdateProjectItems(payload) {
622
567
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
623
568
  {
624
569
  transformFn: import_float2.transformRESTFloatToSDKFloat,
625
- paths: [
626
- { path: "results.item.sortOrder" },
627
- { path: "results.item.image.focalPoint.x" },
628
- { path: "results.item.image.focalPoint.y" },
629
- { path: "results.item.image.unsharpMasking.amount" },
630
- { path: "results.item.image.unsharpMasking.radius" },
631
- { path: "results.item.image.unsharpMasking.threshold" }
632
- ]
570
+ paths: TRANSFORM_PATHS_4
633
571
  },
634
572
  {
635
573
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
636
- paths: [
637
- { path: "results.item.createdDate" },
638
- { path: "results.item.updatedDate" },
639
- { path: "results.item.image.imageInfo.urlExpirationDate" },
640
- { path: "results.item.video.videoInfo.urlExpirationDate" },
641
- {
642
- path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
643
- },
644
- {
645
- path: "results.item.video.videoInfo.posters.urlExpirationDate"
646
- }
647
- ]
574
+ paths: TRANSFORM_PATHS_5
648
575
  }
649
576
  ])
650
577
  };
@@ -715,27 +642,6 @@ function duplicateProjectItems(payload) {
715
642
  }
716
643
  return __duplicateProjectItems;
717
644
  }
718
- function generateTokenForProjectItems(payload) {
719
- function __generateTokenForProjectItems({ host }) {
720
- const metadata = {
721
- entityFqdn: "wix.portfolio.project_items.v1.project_item",
722
- method: "POST",
723
- methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
724
- packageName: PACKAGE_NAME,
725
- migrationOptions: {
726
- optInTransformResponse: true
727
- },
728
- url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
729
- protoPath: "/api/v1/portfolio/project/items/media",
730
- data: payload,
731
- host
732
- }),
733
- data: payload
734
- };
735
- return metadata;
736
- }
737
- return __generateTokenForProjectItems;
738
- }
739
645
 
740
646
  // src/portfolio-project-items-v1-project-item-project-items.universal.ts
741
647
  var import_image = require("@wix/sdk-runtime/transformations/image");
@@ -743,6 +649,14 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
743
649
  var import_video_v2 = require("@wix/sdk-runtime/transformations/video-v2");
744
650
  var import_video_v22 = require("@wix/sdk-runtime/transformations/video-v2");
745
651
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
652
+ var TRANSFORM_PATHS_02 = [{ path: "item.image.imageInfo" }];
653
+ var TRANSFORM_PATHS_12 = [{ path: "item.video.videoInfo" }];
654
+ var TRANSFORM_PATHS_22 = [{ path: "items.image.imageInfo" }];
655
+ var TRANSFORM_PATHS_32 = [{ path: "items.video.videoInfo" }];
656
+ var TRANSFORM_PATHS_42 = [{ path: "results.item.image.imageInfo" }];
657
+ var TRANSFORM_PATHS_52 = [{ path: "results.item.video.videoInfo" }];
658
+ var TRANSFORM_PATHS_62 = [{ path: "items.item.image.imageInfo" }];
659
+ var TRANSFORM_PATHS_72 = [{ path: "items.item.video.videoInfo" }];
746
660
  var Type = /* @__PURE__ */ ((Type2) => {
747
661
  Type2["UNDEFINED"] = "UNDEFINED";
748
662
  Type2["IMAGE"] = "IMAGE";
@@ -755,11 +669,6 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
755
669
  ImageType2["EXTERNAL"] = "EXTERNAL";
756
670
  return ImageType2;
757
671
  })(ImageType || {});
758
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
759
- SortOrder2["ASC"] = "ASC";
760
- SortOrder2["DESC"] = "DESC";
761
- return SortOrder2;
762
- })(SortOrder || {});
763
672
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
764
673
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
765
674
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -768,6 +677,36 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
768
677
  WebhookIdentityType2["APP"] = "APP";
769
678
  return WebhookIdentityType2;
770
679
  })(WebhookIdentityType || {});
680
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
681
+ SortOrder2["ASC"] = "ASC";
682
+ SortOrder2["DESC"] = "DESC";
683
+ return SortOrder2;
684
+ })(SortOrder || {});
685
+ async function generateTokenForProjectItems2(mediaIds) {
686
+ const { httpClient, sideEffects } = arguments[1];
687
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
688
+ const reqOpts = generateTokenForProjectItems(
689
+ payload
690
+ );
691
+ sideEffects?.onSiteCall?.();
692
+ try {
693
+ const result = await httpClient.request(reqOpts);
694
+ sideEffects?.onSuccess?.(result);
695
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
696
+ } catch (err) {
697
+ const transformedError = (0, import_transform_error.transformError)(
698
+ err,
699
+ {
700
+ spreadPathsToArguments: {},
701
+ explicitPathsToArguments: { mediaIds: "$[0]" },
702
+ singleArgumentUnchanged: false
703
+ },
704
+ ["mediaIds"]
705
+ );
706
+ sideEffects?.onError?.(err);
707
+ throw transformedError;
708
+ }
709
+ }
771
710
  async function createProjectItem2(item) {
772
711
  const { httpClient, sideEffects } = arguments[1];
773
712
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -775,11 +714,11 @@ async function createProjectItem2(item) {
775
714
  [
776
715
  {
777
716
  transformFn: import_image.transformSDKImageToRESTImage,
778
- paths: [{ path: "item.image.imageInfo" }]
717
+ paths: TRANSFORM_PATHS_02
779
718
  },
780
719
  {
781
720
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
782
- paths: [{ path: "item.video.videoInfo" }]
721
+ paths: TRANSFORM_PATHS_12
783
722
  }
784
723
  ]
785
724
  );
@@ -792,11 +731,11 @@ async function createProjectItem2(item) {
792
731
  (0, import_transform_paths2.transformPaths)(result.data, [
793
732
  {
794
733
  transformFn: import_image2.transformRESTImageToSDKImage,
795
- paths: [{ path: "item.image.imageInfo" }]
734
+ paths: TRANSFORM_PATHS_02
796
735
  },
797
736
  {
798
737
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
799
- paths: [{ path: "item.video.videoInfo" }]
738
+ paths: TRANSFORM_PATHS_12
800
739
  }
801
740
  ])
802
741
  )?.item;
@@ -824,11 +763,11 @@ async function bulkCreateProjectItems2(options) {
824
763
  [
825
764
  {
826
765
  transformFn: import_image.transformSDKImageToRESTImage,
827
- paths: [{ path: "items.image.imageInfo" }]
766
+ paths: TRANSFORM_PATHS_22
828
767
  },
829
768
  {
830
769
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
831
- paths: [{ path: "items.video.videoInfo" }]
770
+ paths: TRANSFORM_PATHS_32
832
771
  }
833
772
  ]
834
773
  );
@@ -843,11 +782,11 @@ async function bulkCreateProjectItems2(options) {
843
782
  (0, import_transform_paths2.transformPaths)(result.data, [
844
783
  {
845
784
  transformFn: import_image2.transformRESTImageToSDKImage,
846
- paths: [{ path: "results.item.image.imageInfo" }]
785
+ paths: TRANSFORM_PATHS_42
847
786
  },
848
787
  {
849
788
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
850
- paths: [{ path: "results.item.video.videoInfo" }]
789
+ paths: TRANSFORM_PATHS_52
851
790
  }
852
791
  ])
853
792
  );
@@ -880,11 +819,11 @@ async function getProjectItem2(itemId) {
880
819
  (0, import_transform_paths2.transformPaths)(result.data, [
881
820
  {
882
821
  transformFn: import_image2.transformRESTImageToSDKImage,
883
- paths: [{ path: "item.image.imageInfo" }]
822
+ paths: TRANSFORM_PATHS_02
884
823
  },
885
824
  {
886
825
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
887
- paths: [{ path: "item.video.videoInfo" }]
826
+ paths: TRANSFORM_PATHS_12
888
827
  }
889
828
  ])
890
829
  )?.item;
@@ -917,11 +856,11 @@ async function listProjectItems2(projectId, options) {
917
856
  (0, import_transform_paths2.transformPaths)(result.data, [
918
857
  {
919
858
  transformFn: import_image2.transformRESTImageToSDKImage,
920
- paths: [{ path: "items.image.imageInfo" }]
859
+ paths: TRANSFORM_PATHS_22
921
860
  },
922
861
  {
923
862
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
924
- paths: [{ path: "items.video.videoInfo" }]
863
+ paths: TRANSFORM_PATHS_32
925
864
  }
926
865
  ])
927
866
  );
@@ -946,11 +885,11 @@ async function updateProjectItem2(_id, item) {
946
885
  [
947
886
  {
948
887
  transformFn: import_image.transformSDKImageToRESTImage,
949
- paths: [{ path: "item.image.imageInfo" }]
888
+ paths: TRANSFORM_PATHS_02
950
889
  },
951
890
  {
952
891
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
953
- paths: [{ path: "item.video.videoInfo" }]
892
+ paths: TRANSFORM_PATHS_12
954
893
  }
955
894
  ]
956
895
  );
@@ -963,11 +902,11 @@ async function updateProjectItem2(_id, item) {
963
902
  (0, import_transform_paths2.transformPaths)(result.data, [
964
903
  {
965
904
  transformFn: import_image2.transformRESTImageToSDKImage,
966
- paths: [{ path: "item.image.imageInfo" }]
905
+ paths: TRANSFORM_PATHS_02
967
906
  },
968
907
  {
969
908
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
970
- paths: [{ path: "item.video.videoInfo" }]
909
+ paths: TRANSFORM_PATHS_12
971
910
  }
972
911
  ])
973
912
  )?.item;
@@ -995,11 +934,11 @@ async function bulkUpdateProjectItems2(options) {
995
934
  [
996
935
  {
997
936
  transformFn: import_image.transformSDKImageToRESTImage,
998
- paths: [{ path: "items.item.image.imageInfo" }]
937
+ paths: TRANSFORM_PATHS_62
999
938
  },
1000
939
  {
1001
940
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1002
- paths: [{ path: "items.item.video.videoInfo" }]
941
+ paths: TRANSFORM_PATHS_72
1003
942
  }
1004
943
  ]
1005
944
  );
@@ -1014,11 +953,11 @@ async function bulkUpdateProjectItems2(options) {
1014
953
  (0, import_transform_paths2.transformPaths)(result.data, [
1015
954
  {
1016
955
  transformFn: import_image2.transformRESTImageToSDKImage,
1017
- paths: [{ path: "results.item.image.imageInfo" }]
956
+ paths: TRANSFORM_PATHS_42
1018
957
  },
1019
958
  {
1020
959
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1021
- paths: [{ path: "results.item.video.videoInfo" }]
960
+ paths: TRANSFORM_PATHS_52
1022
961
  }
1023
962
  ])
1024
963
  );
@@ -1120,33 +1059,45 @@ async function duplicateProjectItems2(originProjectId, options) {
1120
1059
  throw transformedError;
1121
1060
  }
1122
1061
  }
1123
- async function generateTokenForProjectItems2(mediaIds) {
1124
- const { httpClient, sideEffects } = arguments[1];
1125
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
1126
- const reqOpts = generateTokenForProjectItems(
1127
- payload
1128
- );
1129
- sideEffects?.onSiteCall?.();
1130
- try {
1131
- const result = await httpClient.request(reqOpts);
1132
- sideEffects?.onSuccess?.(result);
1133
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1134
- } catch (err) {
1135
- const transformedError = (0, import_transform_error.transformError)(
1136
- err,
1137
- {
1138
- spreadPathsToArguments: {},
1139
- explicitPathsToArguments: { mediaIds: "$[0]" },
1140
- singleArgumentUnchanged: false
1141
- },
1142
- ["mediaIds"]
1143
- );
1144
- sideEffects?.onError?.(err);
1145
- throw transformedError;
1146
- }
1147
- }
1148
1062
 
1149
1063
  // src/portfolio-project-items-v1-project-item-project-items.public.ts
1064
+ var TRANSFORM_PATHS_03 = [
1065
+ { path: "entity.sortOrder" },
1066
+ { path: "entity.image.focalPoint.x" },
1067
+ { path: "entity.image.focalPoint.y" },
1068
+ { path: "entity.image.unsharpMasking.amount" },
1069
+ { path: "entity.image.unsharpMasking.radius" },
1070
+ { path: "entity.image.unsharpMasking.threshold" }
1071
+ ];
1072
+ var TRANSFORM_PATHS_13 = [
1073
+ { path: "entity.createdDate" },
1074
+ { path: "entity.updatedDate" },
1075
+ { path: "metadata.eventTime" }
1076
+ ];
1077
+ var TRANSFORM_PATHS_23 = [{ path: "entity.image.imageInfo" }];
1078
+ var TRANSFORM_PATHS_33 = [{ path: "entity.video.videoInfo" }];
1079
+ var TRANSFORM_PATHS_43 = [
1080
+ { path: "undefined.sortOrder" },
1081
+ { path: "undefined.image.focalPoint.x" },
1082
+ { path: "undefined.image.focalPoint.y" },
1083
+ { path: "undefined.image.unsharpMasking.amount" },
1084
+ { path: "undefined.image.unsharpMasking.radius" },
1085
+ { path: "undefined.image.unsharpMasking.threshold" }
1086
+ ];
1087
+ var TRANSFORM_PATHS_53 = [
1088
+ { path: "undefined.createdDate" },
1089
+ { path: "undefined.updatedDate" },
1090
+ { path: "metadata.eventTime" }
1091
+ ];
1092
+ var TRANSFORM_PATHS_63 = [{ path: "undefined.image.imageInfo" }];
1093
+ var TRANSFORM_PATHS_73 = [{ path: "undefined.video.videoInfo" }];
1094
+ function generateTokenForProjectItems3(httpClient) {
1095
+ return (mediaIds) => generateTokenForProjectItems2(
1096
+ mediaIds,
1097
+ // @ts-ignore
1098
+ { httpClient }
1099
+ );
1100
+ }
1150
1101
  function createProjectItem3(httpClient) {
1151
1102
  return (item) => createProjectItem2(
1152
1103
  item,
@@ -1213,13 +1164,6 @@ function duplicateProjectItems3(httpClient) {
1213
1164
  { httpClient }
1214
1165
  );
1215
1166
  }
1216
- function generateTokenForProjectItems3(httpClient) {
1217
- return (mediaIds) => generateTokenForProjectItems2(
1218
- mediaIds,
1219
- // @ts-ignore
1220
- { httpClient }
1221
- );
1222
- }
1223
1167
  var onProjectItemCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
1224
1168
  "wix.portfolio.project_items.v1.project_item_created",
1225
1169
  true,
@@ -1227,30 +1171,19 @@ var onProjectItemCreated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)
1227
1171
  (0, import_transform_paths3.transformPaths)(event, [
1228
1172
  {
1229
1173
  transformFn: import_float3.transformRESTFloatToSDKFloat,
1230
- paths: [
1231
- { path: "entity.sortOrder" },
1232
- { path: "entity.image.focalPoint.x" },
1233
- { path: "entity.image.focalPoint.y" },
1234
- { path: "entity.image.unsharpMasking.amount" },
1235
- { path: "entity.image.unsharpMasking.radius" },
1236
- { path: "entity.image.unsharpMasking.threshold" }
1237
- ]
1174
+ paths: TRANSFORM_PATHS_03
1238
1175
  },
1239
1176
  {
1240
1177
  transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1241
- paths: [
1242
- { path: "entity.createdDate" },
1243
- { path: "entity.updatedDate" },
1244
- { path: "metadata.eventTime" }
1245
- ]
1178
+ paths: TRANSFORM_PATHS_13
1246
1179
  },
1247
1180
  {
1248
1181
  transformFn: import_image3.transformRESTImageToSDKImage,
1249
- paths: [{ path: "entity.image.imageInfo" }]
1182
+ paths: TRANSFORM_PATHS_23
1250
1183
  },
1251
1184
  {
1252
1185
  transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1253
- paths: [{ path: "entity.video.videoInfo" }]
1186
+ paths: TRANSFORM_PATHS_33
1254
1187
  }
1255
1188
  ])
1256
1189
  )
@@ -1262,30 +1195,19 @@ var onProjectItemDeleted = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)
1262
1195
  (0, import_transform_paths3.transformPaths)(event, [
1263
1196
  {
1264
1197
  transformFn: import_float3.transformRESTFloatToSDKFloat,
1265
- paths: [
1266
- { path: "undefined.sortOrder" },
1267
- { path: "undefined.image.focalPoint.x" },
1268
- { path: "undefined.image.focalPoint.y" },
1269
- { path: "undefined.image.unsharpMasking.amount" },
1270
- { path: "undefined.image.unsharpMasking.radius" },
1271
- { path: "undefined.image.unsharpMasking.threshold" }
1272
- ]
1198
+ paths: TRANSFORM_PATHS_43
1273
1199
  },
1274
1200
  {
1275
1201
  transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1276
- paths: [
1277
- { path: "undefined.createdDate" },
1278
- { path: "undefined.updatedDate" },
1279
- { path: "metadata.eventTime" }
1280
- ]
1202
+ paths: TRANSFORM_PATHS_53
1281
1203
  },
1282
1204
  {
1283
1205
  transformFn: import_image3.transformRESTImageToSDKImage,
1284
- paths: [{ path: "undefined.image.imageInfo" }]
1206
+ paths: TRANSFORM_PATHS_63
1285
1207
  },
1286
1208
  {
1287
1209
  transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1288
- paths: [{ path: "undefined.video.videoInfo" }]
1210
+ paths: TRANSFORM_PATHS_73
1289
1211
  }
1290
1212
  ])
1291
1213
  )
@@ -1297,30 +1219,19 @@ var onProjectItemUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)
1297
1219
  (0, import_transform_paths3.transformPaths)(event, [
1298
1220
  {
1299
1221
  transformFn: import_float3.transformRESTFloatToSDKFloat,
1300
- paths: [
1301
- { path: "entity.sortOrder" },
1302
- { path: "entity.image.focalPoint.x" },
1303
- { path: "entity.image.focalPoint.y" },
1304
- { path: "entity.image.unsharpMasking.amount" },
1305
- { path: "entity.image.unsharpMasking.radius" },
1306
- { path: "entity.image.unsharpMasking.threshold" }
1307
- ]
1222
+ paths: TRANSFORM_PATHS_03
1308
1223
  },
1309
1224
  {
1310
1225
  transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
1311
- paths: [
1312
- { path: "entity.createdDate" },
1313
- { path: "entity.updatedDate" },
1314
- { path: "metadata.eventTime" }
1315
- ]
1226
+ paths: TRANSFORM_PATHS_13
1316
1227
  },
1317
1228
  {
1318
1229
  transformFn: import_image3.transformRESTImageToSDKImage,
1319
- paths: [{ path: "entity.image.imageInfo" }]
1230
+ paths: TRANSFORM_PATHS_23
1320
1231
  },
1321
1232
  {
1322
1233
  transformFn: import_video_v23.transformRESTVideoV2ToSDKVideoV2,
1323
- paths: [{ path: "entity.video.videoInfo" }]
1234
+ paths: TRANSFORM_PATHS_33
1324
1235
  }
1325
1236
  ])
1326
1237
  )
@@ -1329,6 +1240,7 @@ var onProjectItemUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)
1329
1240
  // src/portfolio-project-items-v1-project-item-project-items.context.ts
1330
1241
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
1331
1242
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
1243
+ var generateTokenForProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generateTokenForProjectItems3);
1332
1244
  var createProjectItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createProjectItem3);
1333
1245
  var bulkCreateProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateProjectItems3);
1334
1246
  var getProjectItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getProjectItem3);
@@ -1338,7 +1250,6 @@ var bulkUpdateProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRES
1338
1250
  var deleteProjectItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteProjectItem3);
1339
1251
  var bulkDeleteProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteProjectItems3);
1340
1252
  var duplicateProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateProjectItems3);
1341
- var generateTokenForProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generateTokenForProjectItems3);
1342
1253
  var onProjectItemCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
1343
1254
  onProjectItemCreated
1344
1255
  );