@wix/auto_sdk_portfolio_project-items 1.0.50 → 1.0.52

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.
@@ -50,6 +50,137 @@ 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
+ 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
+ ];
119
+ function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
120
+ const domainToMappings = {
121
+ "manage._base_domain_": [
122
+ {
123
+ srcPath: "/_api/portfolio-app-service",
124
+ destPath: "/api"
125
+ }
126
+ ],
127
+ "editor._base_domain_": [
128
+ {
129
+ srcPath: "/_api/portfolio-app-service",
130
+ destPath: "/api"
131
+ }
132
+ ],
133
+ "blocks._base_domain_": [
134
+ {
135
+ srcPath: "/_api/portfolio-app-service",
136
+ destPath: "/api"
137
+ }
138
+ ],
139
+ "create.editorx": [
140
+ {
141
+ srcPath: "/_api/portfolio-app-service",
142
+ destPath: "/api"
143
+ }
144
+ ],
145
+ _: [
146
+ {
147
+ srcPath: "/_api/portfolio-app-service",
148
+ destPath: "/api"
149
+ }
150
+ ],
151
+ "api._api_base_domain_": [
152
+ {
153
+ srcPath: "/_api/portfolio-app-service",
154
+ destPath: "/api"
155
+ }
156
+ ],
157
+ "www.wixapis.com": [
158
+ {
159
+ srcPath: "/portfolio/v1/settings",
160
+ destPath: "/api/v1/portfolio/settings"
161
+ },
162
+ {
163
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
164
+ destPath: "/api/v1/portfolio/settings"
165
+ },
166
+ {
167
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
168
+ destPath: "/api/v1/portfolio/project/items/media"
169
+ }
170
+ ],
171
+ "*.dev.wix-code.com": [
172
+ {
173
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
174
+ destPath: "/api/v1/portfolio/settings"
175
+ },
176
+ {
177
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
178
+ destPath: "/api/v1/portfolio/project/items/media"
179
+ }
180
+ ]
181
+ };
182
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
183
+ }
53
184
  function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
54
185
  const domainToMappings = {
55
186
  "manage._base_domain_": [
@@ -169,117 +300,17 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
169
300
  };
170
301
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
171
302
  }
172
- function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
173
- const domainToMappings = {
174
- "manage._base_domain_": [
175
- {
176
- srcPath: "/_api/portfolio-app-service",
177
- destPath: "/api"
178
- }
179
- ],
180
- "editor._base_domain_": [
181
- {
182
- srcPath: "/_api/portfolio-app-service",
183
- destPath: "/api"
184
- }
185
- ],
186
- "blocks._base_domain_": [
187
- {
188
- srcPath: "/_api/portfolio-app-service",
189
- destPath: "/api"
190
- }
191
- ],
192
- "create.editorx": [
193
- {
194
- srcPath: "/_api/portfolio-app-service",
195
- destPath: "/api"
196
- }
197
- ],
198
- _: [
199
- {
200
- srcPath: "/_api/portfolio-app-service",
201
- destPath: "/api"
202
- }
203
- ],
204
- "api._api_base_domain_": [
205
- {
206
- srcPath: "/_api/portfolio-app-service",
207
- destPath: "/api"
208
- }
209
- ],
210
- "www.wixapis.com": [
211
- {
212
- srcPath: "/portfolio/v1/settings",
213
- destPath: "/api/v1/portfolio/settings"
214
- },
215
- {
216
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
217
- destPath: "/api/v1/portfolio/settings"
218
- },
219
- {
220
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
221
- destPath: "/api/v1/portfolio/project/items/media"
222
- }
223
- ],
224
- "*.dev.wix-code.com": [
225
- {
226
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
227
- destPath: "/api/v1/portfolio/settings"
228
- },
229
- {
230
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
231
- destPath: "/api/v1/portfolio/project/items/media"
232
- }
233
- ]
234
- };
235
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
236
- }
237
303
  var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
238
- function generateTokenForProjectItems(payload) {
239
- function __generateTokenForProjectItems({ host }) {
240
- const metadata = {
241
- entityFqdn: "wix.portfolio.project_items.v1.project_item",
242
- method: "POST",
243
- methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
244
- packageName: PACKAGE_NAME,
245
- migrationOptions: {
246
- optInTransformResponse: true
247
- },
248
- url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
249
- protoPath: "/api/v1/portfolio/project/items/media",
250
- data: payload,
251
- host
252
- }),
253
- data: payload
254
- };
255
- return metadata;
256
- }
257
- return __generateTokenForProjectItems;
258
- }
259
304
  function createProjectItem(payload) {
260
305
  function __createProjectItem({ host }) {
261
306
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
262
307
  {
263
308
  transformFn: import_float.transformSDKFloatToRESTFloat,
264
- paths: [
265
- { path: "item.sortOrder" },
266
- { path: "item.image.focalPoint.x" },
267
- { path: "item.image.focalPoint.y" },
268
- { path: "item.image.unsharpMasking.amount" },
269
- { path: "item.image.unsharpMasking.radius" },
270
- { path: "item.image.unsharpMasking.threshold" }
271
- ]
309
+ paths: TRANSFORM_PATHS_0
272
310
  },
273
311
  {
274
312
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
275
- paths: [
276
- { path: "item.createdDate" },
277
- { path: "item.updatedDate" },
278
- { path: "item.image.imageInfo.urlExpirationDate" },
279
- { path: "item.video.videoInfo.urlExpirationDate" },
280
- { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
281
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
282
- ]
313
+ paths: TRANSFORM_PATHS_1
283
314
  }
284
315
  ]);
285
316
  const metadata = {
@@ -299,27 +330,11 @@ function createProjectItem(payload) {
299
330
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
300
331
  {
301
332
  transformFn: import_float2.transformRESTFloatToSDKFloat,
302
- paths: [
303
- { path: "item.sortOrder" },
304
- { path: "item.image.focalPoint.x" },
305
- { path: "item.image.focalPoint.y" },
306
- { path: "item.image.unsharpMasking.amount" },
307
- { path: "item.image.unsharpMasking.radius" },
308
- { path: "item.image.unsharpMasking.threshold" }
309
- ]
333
+ paths: TRANSFORM_PATHS_0
310
334
  },
311
335
  {
312
336
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
313
- paths: [
314
- { path: "item.createdDate" },
315
- { path: "item.updatedDate" },
316
- { path: "item.image.imageInfo.urlExpirationDate" },
317
- { path: "item.video.videoInfo.urlExpirationDate" },
318
- {
319
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
320
- },
321
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
322
- ]
337
+ paths: TRANSFORM_PATHS_1
323
338
  }
324
339
  ])
325
340
  };
@@ -332,27 +347,11 @@ function bulkCreateProjectItems(payload) {
332
347
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
333
348
  {
334
349
  transformFn: import_float.transformSDKFloatToRESTFloat,
335
- paths: [
336
- { path: "items.sortOrder" },
337
- { path: "items.image.focalPoint.x" },
338
- { path: "items.image.focalPoint.y" },
339
- { path: "items.image.unsharpMasking.amount" },
340
- { path: "items.image.unsharpMasking.radius" },
341
- { path: "items.image.unsharpMasking.threshold" }
342
- ]
350
+ paths: TRANSFORM_PATHS_2
343
351
  },
344
352
  {
345
353
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
346
- paths: [
347
- { path: "items.createdDate" },
348
- { path: "items.updatedDate" },
349
- { path: "items.image.imageInfo.urlExpirationDate" },
350
- { path: "items.video.videoInfo.urlExpirationDate" },
351
- {
352
- path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
353
- },
354
- { path: "items.video.videoInfo.posters.urlExpirationDate" }
355
- ]
354
+ paths: TRANSFORM_PATHS_3
356
355
  }
357
356
  ]);
358
357
  const metadata = {
@@ -372,29 +371,11 @@ function bulkCreateProjectItems(payload) {
372
371
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
373
372
  {
374
373
  transformFn: import_float2.transformRESTFloatToSDKFloat,
375
- paths: [
376
- { path: "results.item.sortOrder" },
377
- { path: "results.item.image.focalPoint.x" },
378
- { path: "results.item.image.focalPoint.y" },
379
- { path: "results.item.image.unsharpMasking.amount" },
380
- { path: "results.item.image.unsharpMasking.radius" },
381
- { path: "results.item.image.unsharpMasking.threshold" }
382
- ]
374
+ paths: TRANSFORM_PATHS_4
383
375
  },
384
376
  {
385
377
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
386
- paths: [
387
- { path: "results.item.createdDate" },
388
- { path: "results.item.updatedDate" },
389
- { path: "results.item.image.imageInfo.urlExpirationDate" },
390
- { path: "results.item.video.videoInfo.urlExpirationDate" },
391
- {
392
- path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
393
- },
394
- {
395
- path: "results.item.video.videoInfo.posters.urlExpirationDate"
396
- }
397
- ]
378
+ paths: TRANSFORM_PATHS_5
398
379
  }
399
380
  ])
400
381
  };
@@ -421,27 +402,11 @@ function getProjectItem(payload) {
421
402
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
422
403
  {
423
404
  transformFn: import_float2.transformRESTFloatToSDKFloat,
424
- paths: [
425
- { path: "item.sortOrder" },
426
- { path: "item.image.focalPoint.x" },
427
- { path: "item.image.focalPoint.y" },
428
- { path: "item.image.unsharpMasking.amount" },
429
- { path: "item.image.unsharpMasking.radius" },
430
- { path: "item.image.unsharpMasking.threshold" }
431
- ]
405
+ paths: TRANSFORM_PATHS_0
432
406
  },
433
407
  {
434
408
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
435
- paths: [
436
- { path: "item.createdDate" },
437
- { path: "item.updatedDate" },
438
- { path: "item.image.imageInfo.urlExpirationDate" },
439
- { path: "item.video.videoInfo.urlExpirationDate" },
440
- {
441
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
442
- },
443
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
444
- ]
409
+ paths: TRANSFORM_PATHS_1
445
410
  }
446
411
  ]),
447
412
  fallback: [
@@ -479,27 +444,11 @@ function listProjectItems(payload) {
479
444
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
480
445
  {
481
446
  transformFn: import_float2.transformRESTFloatToSDKFloat,
482
- paths: [
483
- { path: "items.sortOrder" },
484
- { path: "items.image.focalPoint.x" },
485
- { path: "items.image.focalPoint.y" },
486
- { path: "items.image.unsharpMasking.amount" },
487
- { path: "items.image.unsharpMasking.radius" },
488
- { path: "items.image.unsharpMasking.threshold" }
489
- ]
447
+ paths: TRANSFORM_PATHS_2
490
448
  },
491
449
  {
492
450
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
493
- paths: [
494
- { path: "items.createdDate" },
495
- { path: "items.updatedDate" },
496
- { path: "items.image.imageInfo.urlExpirationDate" },
497
- { path: "items.video.videoInfo.urlExpirationDate" },
498
- {
499
- path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
500
- },
501
- { path: "items.video.videoInfo.posters.urlExpirationDate" }
502
- ]
451
+ paths: TRANSFORM_PATHS_3
503
452
  }
504
453
  ])
505
454
  };
@@ -512,29 +461,15 @@ function updateProjectItem(payload) {
512
461
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
513
462
  {
514
463
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
515
- paths: [{ path: "mask" }]
464
+ paths: TRANSFORM_PATHS_6
516
465
  },
517
466
  {
518
467
  transformFn: import_float.transformSDKFloatToRESTFloat,
519
- paths: [
520
- { path: "item.sortOrder" },
521
- { path: "item.image.focalPoint.x" },
522
- { path: "item.image.focalPoint.y" },
523
- { path: "item.image.unsharpMasking.amount" },
524
- { path: "item.image.unsharpMasking.radius" },
525
- { path: "item.image.unsharpMasking.threshold" }
526
- ]
468
+ paths: TRANSFORM_PATHS_0
527
469
  },
528
470
  {
529
471
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
530
- paths: [
531
- { path: "item.createdDate" },
532
- { path: "item.updatedDate" },
533
- { path: "item.image.imageInfo.urlExpirationDate" },
534
- { path: "item.video.videoInfo.urlExpirationDate" },
535
- { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
536
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
537
- ]
472
+ paths: TRANSFORM_PATHS_1
538
473
  }
539
474
  ]);
540
475
  const metadata = {
@@ -554,27 +489,11 @@ function updateProjectItem(payload) {
554
489
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
555
490
  {
556
491
  transformFn: import_float2.transformRESTFloatToSDKFloat,
557
- paths: [
558
- { path: "item.sortOrder" },
559
- { path: "item.image.focalPoint.x" },
560
- { path: "item.image.focalPoint.y" },
561
- { path: "item.image.unsharpMasking.amount" },
562
- { path: "item.image.unsharpMasking.radius" },
563
- { path: "item.image.unsharpMasking.threshold" }
564
- ]
492
+ paths: TRANSFORM_PATHS_0
565
493
  },
566
494
  {
567
495
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
568
- paths: [
569
- { path: "item.createdDate" },
570
- { path: "item.updatedDate" },
571
- { path: "item.image.imageInfo.urlExpirationDate" },
572
- { path: "item.video.videoInfo.urlExpirationDate" },
573
- {
574
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
575
- },
576
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
577
- ]
496
+ paths: TRANSFORM_PATHS_1
578
497
  }
579
498
  ])
580
499
  };
@@ -587,31 +506,15 @@ function bulkUpdateProjectItems(payload) {
587
506
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
588
507
  {
589
508
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
590
- paths: [{ path: "items.fieldMask" }]
509
+ paths: TRANSFORM_PATHS_7
591
510
  },
592
511
  {
593
512
  transformFn: import_float.transformSDKFloatToRESTFloat,
594
- paths: [
595
- { path: "items.item.sortOrder" },
596
- { path: "items.item.image.focalPoint.x" },
597
- { path: "items.item.image.focalPoint.y" },
598
- { path: "items.item.image.unsharpMasking.amount" },
599
- { path: "items.item.image.unsharpMasking.radius" },
600
- { path: "items.item.image.unsharpMasking.threshold" }
601
- ]
513
+ paths: TRANSFORM_PATHS_8
602
514
  },
603
515
  {
604
516
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
605
- paths: [
606
- { path: "items.item.createdDate" },
607
- { path: "items.item.updatedDate" },
608
- { path: "items.item.image.imageInfo.urlExpirationDate" },
609
- { path: "items.item.video.videoInfo.urlExpirationDate" },
610
- {
611
- path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate"
612
- },
613
- { path: "items.item.video.videoInfo.posters.urlExpirationDate" }
614
- ]
517
+ paths: TRANSFORM_PATHS_9
615
518
  }
616
519
  ]);
617
520
  const metadata = {
@@ -631,29 +534,11 @@ function bulkUpdateProjectItems(payload) {
631
534
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
632
535
  {
633
536
  transformFn: import_float2.transformRESTFloatToSDKFloat,
634
- paths: [
635
- { path: "results.item.sortOrder" },
636
- { path: "results.item.image.focalPoint.x" },
637
- { path: "results.item.image.focalPoint.y" },
638
- { path: "results.item.image.unsharpMasking.amount" },
639
- { path: "results.item.image.unsharpMasking.radius" },
640
- { path: "results.item.image.unsharpMasking.threshold" }
641
- ]
537
+ paths: TRANSFORM_PATHS_4
642
538
  },
643
539
  {
644
540
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
645
- paths: [
646
- { path: "results.item.createdDate" },
647
- { path: "results.item.updatedDate" },
648
- { path: "results.item.image.imageInfo.urlExpirationDate" },
649
- { path: "results.item.video.videoInfo.urlExpirationDate" },
650
- {
651
- path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
652
- },
653
- {
654
- path: "results.item.video.videoInfo.posters.urlExpirationDate"
655
- }
656
- ]
541
+ paths: TRANSFORM_PATHS_5
657
542
  }
658
543
  ])
659
544
  };
@@ -724,6 +609,27 @@ function duplicateProjectItems(payload) {
724
609
  }
725
610
  return __duplicateProjectItems;
726
611
  }
612
+ function generateTokenForProjectItems(payload) {
613
+ function __generateTokenForProjectItems({ host }) {
614
+ const metadata = {
615
+ entityFqdn: "wix.portfolio.project_items.v1.project_item",
616
+ method: "POST",
617
+ methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
618
+ packageName: PACKAGE_NAME,
619
+ migrationOptions: {
620
+ optInTransformResponse: true
621
+ },
622
+ url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
623
+ protoPath: "/api/v1/portfolio/project/items/media",
624
+ data: payload,
625
+ host
626
+ }),
627
+ data: payload
628
+ };
629
+ return metadata;
630
+ }
631
+ return __generateTokenForProjectItems;
632
+ }
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,6 +657,11 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
743
657
  ImageType2["EXTERNAL"] = "EXTERNAL";
744
658
  return ImageType2;
745
659
  })(ImageType || {});
660
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
661
+ SortOrder2["ASC"] = "ASC";
662
+ SortOrder2["DESC"] = "DESC";
663
+ return SortOrder2;
664
+ })(SortOrder || {});
746
665
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
747
666
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
748
667
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -751,36 +670,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
751
670
  WebhookIdentityType2["APP"] = "APP";
752
671
  return WebhookIdentityType2;
753
672
  })(WebhookIdentityType || {});
754
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
755
- SortOrder2["ASC"] = "ASC";
756
- SortOrder2["DESC"] = "DESC";
757
- return SortOrder2;
758
- })(SortOrder || {});
759
- async function generateTokenForProjectItems2(mediaIds) {
760
- const { httpClient, sideEffects } = arguments[1];
761
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
762
- const reqOpts = generateTokenForProjectItems(
763
- payload
764
- );
765
- sideEffects?.onSiteCall?.();
766
- try {
767
- const result = await httpClient.request(reqOpts);
768
- sideEffects?.onSuccess?.(result);
769
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
770
- } catch (err) {
771
- const transformedError = (0, import_transform_error.transformError)(
772
- err,
773
- {
774
- spreadPathsToArguments: {},
775
- explicitPathsToArguments: { mediaIds: "$[0]" },
776
- singleArgumentUnchanged: false
777
- },
778
- ["mediaIds"]
779
- );
780
- sideEffects?.onError?.(err);
781
- throw transformedError;
782
- }
783
- }
784
673
  async function createProjectItem2(item) {
785
674
  const { httpClient, sideEffects } = arguments[1];
786
675
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -788,11 +677,11 @@ async function createProjectItem2(item) {
788
677
  [
789
678
  {
790
679
  transformFn: import_image.transformSDKImageToRESTImage,
791
- paths: [{ path: "item.image.imageInfo" }]
680
+ paths: TRANSFORM_PATHS_02
792
681
  },
793
682
  {
794
683
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
795
- paths: [{ path: "item.video.videoInfo" }]
684
+ paths: TRANSFORM_PATHS_12
796
685
  }
797
686
  ]
798
687
  );
@@ -805,11 +694,11 @@ async function createProjectItem2(item) {
805
694
  (0, import_transform_paths2.transformPaths)(result.data, [
806
695
  {
807
696
  transformFn: import_image2.transformRESTImageToSDKImage,
808
- paths: [{ path: "item.image.imageInfo" }]
697
+ paths: TRANSFORM_PATHS_02
809
698
  },
810
699
  {
811
700
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
812
- paths: [{ path: "item.video.videoInfo" }]
701
+ paths: TRANSFORM_PATHS_12
813
702
  }
814
703
  ])
815
704
  )?.item;
@@ -837,11 +726,11 @@ async function bulkCreateProjectItems2(options) {
837
726
  [
838
727
  {
839
728
  transformFn: import_image.transformSDKImageToRESTImage,
840
- paths: [{ path: "items.image.imageInfo" }]
729
+ paths: TRANSFORM_PATHS_22
841
730
  },
842
731
  {
843
732
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
844
- paths: [{ path: "items.video.videoInfo" }]
733
+ paths: TRANSFORM_PATHS_32
845
734
  }
846
735
  ]
847
736
  );
@@ -856,11 +745,11 @@ async function bulkCreateProjectItems2(options) {
856
745
  (0, import_transform_paths2.transformPaths)(result.data, [
857
746
  {
858
747
  transformFn: import_image2.transformRESTImageToSDKImage,
859
- paths: [{ path: "results.item.image.imageInfo" }]
748
+ paths: TRANSFORM_PATHS_42
860
749
  },
861
750
  {
862
751
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
863
- paths: [{ path: "results.item.video.videoInfo" }]
752
+ paths: TRANSFORM_PATHS_52
864
753
  }
865
754
  ])
866
755
  );
@@ -893,11 +782,11 @@ async function getProjectItem2(itemId) {
893
782
  (0, import_transform_paths2.transformPaths)(result.data, [
894
783
  {
895
784
  transformFn: import_image2.transformRESTImageToSDKImage,
896
- paths: [{ path: "item.image.imageInfo" }]
785
+ paths: TRANSFORM_PATHS_02
897
786
  },
898
787
  {
899
788
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
900
- paths: [{ path: "item.video.videoInfo" }]
789
+ paths: TRANSFORM_PATHS_12
901
790
  }
902
791
  ])
903
792
  )?.item;
@@ -930,11 +819,11 @@ async function listProjectItems2(projectId, options) {
930
819
  (0, import_transform_paths2.transformPaths)(result.data, [
931
820
  {
932
821
  transformFn: import_image2.transformRESTImageToSDKImage,
933
- paths: [{ path: "items.image.imageInfo" }]
822
+ paths: TRANSFORM_PATHS_22
934
823
  },
935
824
  {
936
825
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
937
- paths: [{ path: "items.video.videoInfo" }]
826
+ paths: TRANSFORM_PATHS_32
938
827
  }
939
828
  ])
940
829
  );
@@ -959,11 +848,11 @@ async function updateProjectItem2(_id, item) {
959
848
  [
960
849
  {
961
850
  transformFn: import_image.transformSDKImageToRESTImage,
962
- paths: [{ path: "item.image.imageInfo" }]
851
+ paths: TRANSFORM_PATHS_02
963
852
  },
964
853
  {
965
854
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
966
- paths: [{ path: "item.video.videoInfo" }]
855
+ paths: TRANSFORM_PATHS_12
967
856
  }
968
857
  ]
969
858
  );
@@ -976,11 +865,11 @@ async function updateProjectItem2(_id, item) {
976
865
  (0, import_transform_paths2.transformPaths)(result.data, [
977
866
  {
978
867
  transformFn: import_image2.transformRESTImageToSDKImage,
979
- paths: [{ path: "item.image.imageInfo" }]
868
+ paths: TRANSFORM_PATHS_02
980
869
  },
981
870
  {
982
871
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
983
- paths: [{ path: "item.video.videoInfo" }]
872
+ paths: TRANSFORM_PATHS_12
984
873
  }
985
874
  ])
986
875
  )?.item;
@@ -1008,11 +897,11 @@ async function bulkUpdateProjectItems2(options) {
1008
897
  [
1009
898
  {
1010
899
  transformFn: import_image.transformSDKImageToRESTImage,
1011
- paths: [{ path: "items.item.image.imageInfo" }]
900
+ paths: TRANSFORM_PATHS_62
1012
901
  },
1013
902
  {
1014
903
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1015
- paths: [{ path: "items.item.video.videoInfo" }]
904
+ paths: TRANSFORM_PATHS_72
1016
905
  }
1017
906
  ]
1018
907
  );
@@ -1027,11 +916,11 @@ async function bulkUpdateProjectItems2(options) {
1027
916
  (0, import_transform_paths2.transformPaths)(result.data, [
1028
917
  {
1029
918
  transformFn: import_image2.transformRESTImageToSDKImage,
1030
- paths: [{ path: "results.item.image.imageInfo" }]
919
+ paths: TRANSFORM_PATHS_42
1031
920
  },
1032
921
  {
1033
922
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1034
- paths: [{ path: "results.item.video.videoInfo" }]
923
+ paths: TRANSFORM_PATHS_52
1035
924
  }
1036
925
  ])
1037
926
  );
@@ -1133,6 +1022,31 @@ async function duplicateProjectItems2(originProjectId, options) {
1133
1022
  throw transformedError;
1134
1023
  }
1135
1024
  }
1025
+ async function generateTokenForProjectItems2(mediaIds) {
1026
+ const { httpClient, sideEffects } = arguments[1];
1027
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
1028
+ const reqOpts = generateTokenForProjectItems(
1029
+ payload
1030
+ );
1031
+ sideEffects?.onSiteCall?.();
1032
+ try {
1033
+ const result = await httpClient.request(reqOpts);
1034
+ sideEffects?.onSuccess?.(result);
1035
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1036
+ } catch (err) {
1037
+ const transformedError = (0, import_transform_error.transformError)(
1038
+ err,
1039
+ {
1040
+ spreadPathsToArguments: {},
1041
+ explicitPathsToArguments: { mediaIds: "$[0]" },
1042
+ singleArgumentUnchanged: false
1043
+ },
1044
+ ["mediaIds"]
1045
+ );
1046
+ sideEffects?.onError?.(err);
1047
+ throw transformedError;
1048
+ }
1049
+ }
1136
1050
  // Annotate the CommonJS export names for ESM import in node:
1137
1051
  0 && (module.exports = {
1138
1052
  ImageType,