@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.
@@ -62,6 +62,137 @@ 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
+ 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
+ ];
131
+ function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
132
+ const domainToMappings = {
133
+ "manage._base_domain_": [
134
+ {
135
+ srcPath: "/_api/portfolio-app-service",
136
+ destPath: "/api"
137
+ }
138
+ ],
139
+ "editor._base_domain_": [
140
+ {
141
+ srcPath: "/_api/portfolio-app-service",
142
+ destPath: "/api"
143
+ }
144
+ ],
145
+ "blocks._base_domain_": [
146
+ {
147
+ srcPath: "/_api/portfolio-app-service",
148
+ destPath: "/api"
149
+ }
150
+ ],
151
+ "create.editorx": [
152
+ {
153
+ srcPath: "/_api/portfolio-app-service",
154
+ destPath: "/api"
155
+ }
156
+ ],
157
+ _: [
158
+ {
159
+ srcPath: "/_api/portfolio-app-service",
160
+ destPath: "/api"
161
+ }
162
+ ],
163
+ "api._api_base_domain_": [
164
+ {
165
+ srcPath: "/_api/portfolio-app-service",
166
+ destPath: "/api"
167
+ }
168
+ ],
169
+ "www.wixapis.com": [
170
+ {
171
+ srcPath: "/portfolio/v1/settings",
172
+ destPath: "/api/v1/portfolio/settings"
173
+ },
174
+ {
175
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
176
+ destPath: "/api/v1/portfolio/settings"
177
+ },
178
+ {
179
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
180
+ destPath: "/api/v1/portfolio/project/items/media"
181
+ }
182
+ ],
183
+ "*.dev.wix-code.com": [
184
+ {
185
+ srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
186
+ destPath: "/api/v1/portfolio/settings"
187
+ },
188
+ {
189
+ srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
190
+ destPath: "/api/v1/portfolio/project/items/media"
191
+ }
192
+ ]
193
+ };
194
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
195
+ }
65
196
  function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
66
197
  const domainToMappings = {
67
198
  "manage._base_domain_": [
@@ -181,117 +312,17 @@ function resolveComWixpressPortfolioProjectitemsProjectItemsServiceUrl(opts) {
181
312
  };
182
313
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
183
314
  }
184
- function resolveComWixpressPortfolioPortfolioappMediaServiceUrl(opts) {
185
- const domainToMappings = {
186
- "manage._base_domain_": [
187
- {
188
- srcPath: "/_api/portfolio-app-service",
189
- destPath: "/api"
190
- }
191
- ],
192
- "editor._base_domain_": [
193
- {
194
- srcPath: "/_api/portfolio-app-service",
195
- destPath: "/api"
196
- }
197
- ],
198
- "blocks._base_domain_": [
199
- {
200
- srcPath: "/_api/portfolio-app-service",
201
- destPath: "/api"
202
- }
203
- ],
204
- "create.editorx": [
205
- {
206
- srcPath: "/_api/portfolio-app-service",
207
- destPath: "/api"
208
- }
209
- ],
210
- _: [
211
- {
212
- srcPath: "/_api/portfolio-app-service",
213
- destPath: "/api"
214
- }
215
- ],
216
- "api._api_base_domain_": [
217
- {
218
- srcPath: "/_api/portfolio-app-service",
219
- destPath: "/api"
220
- }
221
- ],
222
- "www.wixapis.com": [
223
- {
224
- srcPath: "/portfolio/v1/settings",
225
- destPath: "/api/v1/portfolio/settings"
226
- },
227
- {
228
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
229
- destPath: "/api/v1/portfolio/settings"
230
- },
231
- {
232
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
233
- destPath: "/api/v1/portfolio/project/items/media"
234
- }
235
- ],
236
- "*.dev.wix-code.com": [
237
- {
238
- srcPath: "/portfolio/portfolio-app/api/v1/portfolio/settings",
239
- destPath: "/api/v1/portfolio/settings"
240
- },
241
- {
242
- srcPath: "/portfolio/project-items/api/v1/portfolio/project/items/media",
243
- destPath: "/api/v1/portfolio/project/items/media"
244
- }
245
- ]
246
- };
247
- return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
248
- }
249
315
  var PACKAGE_NAME = "@wix/auto_sdk_portfolio_project-items";
250
- function generateTokenForProjectItems(payload) {
251
- function __generateTokenForProjectItems({ host }) {
252
- const metadata = {
253
- entityFqdn: "wix.portfolio.project_items.v1.project_item",
254
- method: "POST",
255
- methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
256
- packageName: PACKAGE_NAME,
257
- migrationOptions: {
258
- optInTransformResponse: true
259
- },
260
- url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
261
- protoPath: "/api/v1/portfolio/project/items/media",
262
- data: payload,
263
- host
264
- }),
265
- data: payload
266
- };
267
- return metadata;
268
- }
269
- return __generateTokenForProjectItems;
270
- }
271
316
  function createProjectItem(payload) {
272
317
  function __createProjectItem({ host }) {
273
318
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
274
319
  {
275
320
  transformFn: import_float.transformSDKFloatToRESTFloat,
276
- paths: [
277
- { path: "item.sortOrder" },
278
- { path: "item.image.focalPoint.x" },
279
- { path: "item.image.focalPoint.y" },
280
- { path: "item.image.unsharpMasking.amount" },
281
- { path: "item.image.unsharpMasking.radius" },
282
- { path: "item.image.unsharpMasking.threshold" }
283
- ]
321
+ paths: TRANSFORM_PATHS_0
284
322
  },
285
323
  {
286
324
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
287
- paths: [
288
- { path: "item.createdDate" },
289
- { path: "item.updatedDate" },
290
- { path: "item.image.imageInfo.urlExpirationDate" },
291
- { path: "item.video.videoInfo.urlExpirationDate" },
292
- { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
293
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
294
- ]
325
+ paths: TRANSFORM_PATHS_1
295
326
  }
296
327
  ]);
297
328
  const metadata = {
@@ -311,27 +342,11 @@ function createProjectItem(payload) {
311
342
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
312
343
  {
313
344
  transformFn: import_float2.transformRESTFloatToSDKFloat,
314
- paths: [
315
- { path: "item.sortOrder" },
316
- { path: "item.image.focalPoint.x" },
317
- { path: "item.image.focalPoint.y" },
318
- { path: "item.image.unsharpMasking.amount" },
319
- { path: "item.image.unsharpMasking.radius" },
320
- { path: "item.image.unsharpMasking.threshold" }
321
- ]
345
+ paths: TRANSFORM_PATHS_0
322
346
  },
323
347
  {
324
348
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
325
- paths: [
326
- { path: "item.createdDate" },
327
- { path: "item.updatedDate" },
328
- { path: "item.image.imageInfo.urlExpirationDate" },
329
- { path: "item.video.videoInfo.urlExpirationDate" },
330
- {
331
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
332
- },
333
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
334
- ]
349
+ paths: TRANSFORM_PATHS_1
335
350
  }
336
351
  ])
337
352
  };
@@ -344,27 +359,11 @@ function bulkCreateProjectItems(payload) {
344
359
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
345
360
  {
346
361
  transformFn: import_float.transformSDKFloatToRESTFloat,
347
- paths: [
348
- { path: "items.sortOrder" },
349
- { path: "items.image.focalPoint.x" },
350
- { path: "items.image.focalPoint.y" },
351
- { path: "items.image.unsharpMasking.amount" },
352
- { path: "items.image.unsharpMasking.radius" },
353
- { path: "items.image.unsharpMasking.threshold" }
354
- ]
362
+ paths: TRANSFORM_PATHS_2
355
363
  },
356
364
  {
357
365
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
358
- paths: [
359
- { path: "items.createdDate" },
360
- { path: "items.updatedDate" },
361
- { path: "items.image.imageInfo.urlExpirationDate" },
362
- { path: "items.video.videoInfo.urlExpirationDate" },
363
- {
364
- path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
365
- },
366
- { path: "items.video.videoInfo.posters.urlExpirationDate" }
367
- ]
366
+ paths: TRANSFORM_PATHS_3
368
367
  }
369
368
  ]);
370
369
  const metadata = {
@@ -384,29 +383,11 @@ function bulkCreateProjectItems(payload) {
384
383
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
385
384
  {
386
385
  transformFn: import_float2.transformRESTFloatToSDKFloat,
387
- paths: [
388
- { path: "results.item.sortOrder" },
389
- { path: "results.item.image.focalPoint.x" },
390
- { path: "results.item.image.focalPoint.y" },
391
- { path: "results.item.image.unsharpMasking.amount" },
392
- { path: "results.item.image.unsharpMasking.radius" },
393
- { path: "results.item.image.unsharpMasking.threshold" }
394
- ]
386
+ paths: TRANSFORM_PATHS_4
395
387
  },
396
388
  {
397
389
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
398
- paths: [
399
- { path: "results.item.createdDate" },
400
- { path: "results.item.updatedDate" },
401
- { path: "results.item.image.imageInfo.urlExpirationDate" },
402
- { path: "results.item.video.videoInfo.urlExpirationDate" },
403
- {
404
- path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
405
- },
406
- {
407
- path: "results.item.video.videoInfo.posters.urlExpirationDate"
408
- }
409
- ]
390
+ paths: TRANSFORM_PATHS_5
410
391
  }
411
392
  ])
412
393
  };
@@ -433,27 +414,11 @@ function getProjectItem(payload) {
433
414
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
434
415
  {
435
416
  transformFn: import_float2.transformRESTFloatToSDKFloat,
436
- paths: [
437
- { path: "item.sortOrder" },
438
- { path: "item.image.focalPoint.x" },
439
- { path: "item.image.focalPoint.y" },
440
- { path: "item.image.unsharpMasking.amount" },
441
- { path: "item.image.unsharpMasking.radius" },
442
- { path: "item.image.unsharpMasking.threshold" }
443
- ]
417
+ paths: TRANSFORM_PATHS_0
444
418
  },
445
419
  {
446
420
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
447
- paths: [
448
- { path: "item.createdDate" },
449
- { path: "item.updatedDate" },
450
- { path: "item.image.imageInfo.urlExpirationDate" },
451
- { path: "item.video.videoInfo.urlExpirationDate" },
452
- {
453
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
454
- },
455
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
456
- ]
421
+ paths: TRANSFORM_PATHS_1
457
422
  }
458
423
  ]),
459
424
  fallback: [
@@ -491,27 +456,11 @@ function listProjectItems(payload) {
491
456
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
492
457
  {
493
458
  transformFn: import_float2.transformRESTFloatToSDKFloat,
494
- paths: [
495
- { path: "items.sortOrder" },
496
- { path: "items.image.focalPoint.x" },
497
- { path: "items.image.focalPoint.y" },
498
- { path: "items.image.unsharpMasking.amount" },
499
- { path: "items.image.unsharpMasking.radius" },
500
- { path: "items.image.unsharpMasking.threshold" }
501
- ]
459
+ paths: TRANSFORM_PATHS_2
502
460
  },
503
461
  {
504
462
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
505
- paths: [
506
- { path: "items.createdDate" },
507
- { path: "items.updatedDate" },
508
- { path: "items.image.imageInfo.urlExpirationDate" },
509
- { path: "items.video.videoInfo.urlExpirationDate" },
510
- {
511
- path: "items.video.videoInfo.resolutions.poster.urlExpirationDate"
512
- },
513
- { path: "items.video.videoInfo.posters.urlExpirationDate" }
514
- ]
463
+ paths: TRANSFORM_PATHS_3
515
464
  }
516
465
  ])
517
466
  };
@@ -524,29 +473,15 @@ function updateProjectItem(payload) {
524
473
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
525
474
  {
526
475
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
527
- paths: [{ path: "mask" }]
476
+ paths: TRANSFORM_PATHS_6
528
477
  },
529
478
  {
530
479
  transformFn: import_float.transformSDKFloatToRESTFloat,
531
- paths: [
532
- { path: "item.sortOrder" },
533
- { path: "item.image.focalPoint.x" },
534
- { path: "item.image.focalPoint.y" },
535
- { path: "item.image.unsharpMasking.amount" },
536
- { path: "item.image.unsharpMasking.radius" },
537
- { path: "item.image.unsharpMasking.threshold" }
538
- ]
480
+ paths: TRANSFORM_PATHS_0
539
481
  },
540
482
  {
541
483
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
542
- paths: [
543
- { path: "item.createdDate" },
544
- { path: "item.updatedDate" },
545
- { path: "item.image.imageInfo.urlExpirationDate" },
546
- { path: "item.video.videoInfo.urlExpirationDate" },
547
- { path: "item.video.videoInfo.resolutions.poster.urlExpirationDate" },
548
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
549
- ]
484
+ paths: TRANSFORM_PATHS_1
550
485
  }
551
486
  ]);
552
487
  const metadata = {
@@ -566,27 +501,11 @@ function updateProjectItem(payload) {
566
501
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
567
502
  {
568
503
  transformFn: import_float2.transformRESTFloatToSDKFloat,
569
- paths: [
570
- { path: "item.sortOrder" },
571
- { path: "item.image.focalPoint.x" },
572
- { path: "item.image.focalPoint.y" },
573
- { path: "item.image.unsharpMasking.amount" },
574
- { path: "item.image.unsharpMasking.radius" },
575
- { path: "item.image.unsharpMasking.threshold" }
576
- ]
504
+ paths: TRANSFORM_PATHS_0
577
505
  },
578
506
  {
579
507
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
580
- paths: [
581
- { path: "item.createdDate" },
582
- { path: "item.updatedDate" },
583
- { path: "item.image.imageInfo.urlExpirationDate" },
584
- { path: "item.video.videoInfo.urlExpirationDate" },
585
- {
586
- path: "item.video.videoInfo.resolutions.poster.urlExpirationDate"
587
- },
588
- { path: "item.video.videoInfo.posters.urlExpirationDate" }
589
- ]
508
+ paths: TRANSFORM_PATHS_1
590
509
  }
591
510
  ])
592
511
  };
@@ -599,31 +518,15 @@ function bulkUpdateProjectItems(payload) {
599
518
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
600
519
  {
601
520
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
602
- paths: [{ path: "items.fieldMask" }]
521
+ paths: TRANSFORM_PATHS_7
603
522
  },
604
523
  {
605
524
  transformFn: import_float.transformSDKFloatToRESTFloat,
606
- paths: [
607
- { path: "items.item.sortOrder" },
608
- { path: "items.item.image.focalPoint.x" },
609
- { path: "items.item.image.focalPoint.y" },
610
- { path: "items.item.image.unsharpMasking.amount" },
611
- { path: "items.item.image.unsharpMasking.radius" },
612
- { path: "items.item.image.unsharpMasking.threshold" }
613
- ]
525
+ paths: TRANSFORM_PATHS_8
614
526
  },
615
527
  {
616
528
  transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
617
- paths: [
618
- { path: "items.item.createdDate" },
619
- { path: "items.item.updatedDate" },
620
- { path: "items.item.image.imageInfo.urlExpirationDate" },
621
- { path: "items.item.video.videoInfo.urlExpirationDate" },
622
- {
623
- path: "items.item.video.videoInfo.resolutions.poster.urlExpirationDate"
624
- },
625
- { path: "items.item.video.videoInfo.posters.urlExpirationDate" }
626
- ]
529
+ paths: TRANSFORM_PATHS_9
627
530
  }
628
531
  ]);
629
532
  const metadata = {
@@ -643,29 +546,11 @@ function bulkUpdateProjectItems(payload) {
643
546
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
644
547
  {
645
548
  transformFn: import_float2.transformRESTFloatToSDKFloat,
646
- paths: [
647
- { path: "results.item.sortOrder" },
648
- { path: "results.item.image.focalPoint.x" },
649
- { path: "results.item.image.focalPoint.y" },
650
- { path: "results.item.image.unsharpMasking.amount" },
651
- { path: "results.item.image.unsharpMasking.radius" },
652
- { path: "results.item.image.unsharpMasking.threshold" }
653
- ]
549
+ paths: TRANSFORM_PATHS_4
654
550
  },
655
551
  {
656
552
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
657
- paths: [
658
- { path: "results.item.createdDate" },
659
- { path: "results.item.updatedDate" },
660
- { path: "results.item.image.imageInfo.urlExpirationDate" },
661
- { path: "results.item.video.videoInfo.urlExpirationDate" },
662
- {
663
- path: "results.item.video.videoInfo.resolutions.poster.urlExpirationDate"
664
- },
665
- {
666
- path: "results.item.video.videoInfo.posters.urlExpirationDate"
667
- }
668
- ]
553
+ paths: TRANSFORM_PATHS_5
669
554
  }
670
555
  ])
671
556
  };
@@ -736,6 +621,27 @@ function duplicateProjectItems(payload) {
736
621
  }
737
622
  return __duplicateProjectItems;
738
623
  }
624
+ function generateTokenForProjectItems(payload) {
625
+ function __generateTokenForProjectItems({ host }) {
626
+ const metadata = {
627
+ entityFqdn: "wix.portfolio.project_items.v1.project_item",
628
+ method: "POST",
629
+ methodFqn: "com.wixpress.portfolio.portfolioapp.MediaService.GenerateTokenForProjectItems",
630
+ packageName: PACKAGE_NAME,
631
+ migrationOptions: {
632
+ optInTransformResponse: true
633
+ },
634
+ url: resolveComWixpressPortfolioPortfolioappMediaServiceUrl({
635
+ protoPath: "/api/v1/portfolio/project/items/media",
636
+ data: payload,
637
+ host
638
+ }),
639
+ data: payload
640
+ };
641
+ return metadata;
642
+ }
643
+ return __generateTokenForProjectItems;
644
+ }
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,6 +669,11 @@ var ImageType = /* @__PURE__ */ ((ImageType2) => {
755
669
  ImageType2["EXTERNAL"] = "EXTERNAL";
756
670
  return ImageType2;
757
671
  })(ImageType || {});
672
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
673
+ SortOrder2["ASC"] = "ASC";
674
+ SortOrder2["DESC"] = "DESC";
675
+ return SortOrder2;
676
+ })(SortOrder || {});
758
677
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
759
678
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
760
679
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -763,36 +682,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
763
682
  WebhookIdentityType2["APP"] = "APP";
764
683
  return WebhookIdentityType2;
765
684
  })(WebhookIdentityType || {});
766
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
767
- SortOrder2["ASC"] = "ASC";
768
- SortOrder2["DESC"] = "DESC";
769
- return SortOrder2;
770
- })(SortOrder || {});
771
- async function generateTokenForProjectItems2(mediaIds) {
772
- const { httpClient, sideEffects } = arguments[1];
773
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
774
- const reqOpts = generateTokenForProjectItems(
775
- payload
776
- );
777
- sideEffects?.onSiteCall?.();
778
- try {
779
- const result = await httpClient.request(reqOpts);
780
- sideEffects?.onSuccess?.(result);
781
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
782
- } catch (err) {
783
- const transformedError = (0, import_transform_error.transformError)(
784
- err,
785
- {
786
- spreadPathsToArguments: {},
787
- explicitPathsToArguments: { mediaIds: "$[0]" },
788
- singleArgumentUnchanged: false
789
- },
790
- ["mediaIds"]
791
- );
792
- sideEffects?.onError?.(err);
793
- throw transformedError;
794
- }
795
- }
796
685
  async function createProjectItem2(item) {
797
686
  const { httpClient, sideEffects } = arguments[1];
798
687
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -800,11 +689,11 @@ async function createProjectItem2(item) {
800
689
  [
801
690
  {
802
691
  transformFn: import_image.transformSDKImageToRESTImage,
803
- paths: [{ path: "item.image.imageInfo" }]
692
+ paths: TRANSFORM_PATHS_02
804
693
  },
805
694
  {
806
695
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
807
- paths: [{ path: "item.video.videoInfo" }]
696
+ paths: TRANSFORM_PATHS_12
808
697
  }
809
698
  ]
810
699
  );
@@ -817,11 +706,11 @@ async function createProjectItem2(item) {
817
706
  (0, import_transform_paths2.transformPaths)(result.data, [
818
707
  {
819
708
  transformFn: import_image2.transformRESTImageToSDKImage,
820
- paths: [{ path: "item.image.imageInfo" }]
709
+ paths: TRANSFORM_PATHS_02
821
710
  },
822
711
  {
823
712
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
824
- paths: [{ path: "item.video.videoInfo" }]
713
+ paths: TRANSFORM_PATHS_12
825
714
  }
826
715
  ])
827
716
  )?.item;
@@ -849,11 +738,11 @@ async function bulkCreateProjectItems2(options) {
849
738
  [
850
739
  {
851
740
  transformFn: import_image.transformSDKImageToRESTImage,
852
- paths: [{ path: "items.image.imageInfo" }]
741
+ paths: TRANSFORM_PATHS_22
853
742
  },
854
743
  {
855
744
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
856
- paths: [{ path: "items.video.videoInfo" }]
745
+ paths: TRANSFORM_PATHS_32
857
746
  }
858
747
  ]
859
748
  );
@@ -868,11 +757,11 @@ async function bulkCreateProjectItems2(options) {
868
757
  (0, import_transform_paths2.transformPaths)(result.data, [
869
758
  {
870
759
  transformFn: import_image2.transformRESTImageToSDKImage,
871
- paths: [{ path: "results.item.image.imageInfo" }]
760
+ paths: TRANSFORM_PATHS_42
872
761
  },
873
762
  {
874
763
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
875
- paths: [{ path: "results.item.video.videoInfo" }]
764
+ paths: TRANSFORM_PATHS_52
876
765
  }
877
766
  ])
878
767
  );
@@ -905,11 +794,11 @@ async function getProjectItem2(itemId) {
905
794
  (0, import_transform_paths2.transformPaths)(result.data, [
906
795
  {
907
796
  transformFn: import_image2.transformRESTImageToSDKImage,
908
- paths: [{ path: "item.image.imageInfo" }]
797
+ paths: TRANSFORM_PATHS_02
909
798
  },
910
799
  {
911
800
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
912
- paths: [{ path: "item.video.videoInfo" }]
801
+ paths: TRANSFORM_PATHS_12
913
802
  }
914
803
  ])
915
804
  )?.item;
@@ -942,11 +831,11 @@ async function listProjectItems2(projectId, options) {
942
831
  (0, import_transform_paths2.transformPaths)(result.data, [
943
832
  {
944
833
  transformFn: import_image2.transformRESTImageToSDKImage,
945
- paths: [{ path: "items.image.imageInfo" }]
834
+ paths: TRANSFORM_PATHS_22
946
835
  },
947
836
  {
948
837
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
949
- paths: [{ path: "items.video.videoInfo" }]
838
+ paths: TRANSFORM_PATHS_32
950
839
  }
951
840
  ])
952
841
  );
@@ -971,11 +860,11 @@ async function updateProjectItem2(_id, item) {
971
860
  [
972
861
  {
973
862
  transformFn: import_image.transformSDKImageToRESTImage,
974
- paths: [{ path: "item.image.imageInfo" }]
863
+ paths: TRANSFORM_PATHS_02
975
864
  },
976
865
  {
977
866
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
978
- paths: [{ path: "item.video.videoInfo" }]
867
+ paths: TRANSFORM_PATHS_12
979
868
  }
980
869
  ]
981
870
  );
@@ -988,11 +877,11 @@ async function updateProjectItem2(_id, item) {
988
877
  (0, import_transform_paths2.transformPaths)(result.data, [
989
878
  {
990
879
  transformFn: import_image2.transformRESTImageToSDKImage,
991
- paths: [{ path: "item.image.imageInfo" }]
880
+ paths: TRANSFORM_PATHS_02
992
881
  },
993
882
  {
994
883
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
995
- paths: [{ path: "item.video.videoInfo" }]
884
+ paths: TRANSFORM_PATHS_12
996
885
  }
997
886
  ])
998
887
  )?.item;
@@ -1020,11 +909,11 @@ async function bulkUpdateProjectItems2(options) {
1020
909
  [
1021
910
  {
1022
911
  transformFn: import_image.transformSDKImageToRESTImage,
1023
- paths: [{ path: "items.item.image.imageInfo" }]
912
+ paths: TRANSFORM_PATHS_62
1024
913
  },
1025
914
  {
1026
915
  transformFn: import_video_v2.transformSDKVideoV2ToRESTVideoV2,
1027
- paths: [{ path: "items.item.video.videoInfo" }]
916
+ paths: TRANSFORM_PATHS_72
1028
917
  }
1029
918
  ]
1030
919
  );
@@ -1039,11 +928,11 @@ async function bulkUpdateProjectItems2(options) {
1039
928
  (0, import_transform_paths2.transformPaths)(result.data, [
1040
929
  {
1041
930
  transformFn: import_image2.transformRESTImageToSDKImage,
1042
- paths: [{ path: "results.item.image.imageInfo" }]
931
+ paths: TRANSFORM_PATHS_42
1043
932
  },
1044
933
  {
1045
934
  transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
1046
- paths: [{ path: "results.item.video.videoInfo" }]
935
+ paths: TRANSFORM_PATHS_52
1047
936
  }
1048
937
  ])
1049
938
  );
@@ -1145,15 +1034,63 @@ async function duplicateProjectItems2(originProjectId, options) {
1145
1034
  throw transformedError;
1146
1035
  }
1147
1036
  }
1148
-
1149
- // src/portfolio-project-items-v1-project-item-project-items.public.ts
1150
- function generateTokenForProjectItems3(httpClient) {
1151
- return (mediaIds) => generateTokenForProjectItems2(
1152
- mediaIds,
1153
- // @ts-ignore
1154
- { httpClient }
1037
+ async function generateTokenForProjectItems2(mediaIds) {
1038
+ const { httpClient, sideEffects } = arguments[1];
1039
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ mediaIds });
1040
+ const reqOpts = generateTokenForProjectItems(
1041
+ payload
1155
1042
  );
1043
+ sideEffects?.onSiteCall?.();
1044
+ try {
1045
+ const result = await httpClient.request(reqOpts);
1046
+ sideEffects?.onSuccess?.(result);
1047
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1048
+ } catch (err) {
1049
+ const transformedError = (0, import_transform_error.transformError)(
1050
+ err,
1051
+ {
1052
+ spreadPathsToArguments: {},
1053
+ explicitPathsToArguments: { mediaIds: "$[0]" },
1054
+ singleArgumentUnchanged: false
1055
+ },
1056
+ ["mediaIds"]
1057
+ );
1058
+ sideEffects?.onError?.(err);
1059
+ throw transformedError;
1060
+ }
1156
1061
  }
1062
+
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" }];
1157
1094
  function createProjectItem3(httpClient) {
1158
1095
  return (item) => createProjectItem2(
1159
1096
  item,
@@ -1220,6 +1157,13 @@ function duplicateProjectItems3(httpClient) {
1220
1157
  { httpClient }
1221
1158
  );
1222
1159
  }
1160
+ function generateTokenForProjectItems3(httpClient) {
1161
+ return (mediaIds) => generateTokenForProjectItems2(
1162
+ mediaIds,
1163
+ // @ts-ignore
1164
+ { httpClient }
1165
+ );
1166
+ }
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,7 +1240,6 @@ 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");
1332
- var generateTokenForProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(generateTokenForProjectItems3);
1333
1243
  var createProjectItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createProjectItem3);
1334
1244
  var bulkCreateProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateProjectItems3);
1335
1245
  var getProjectItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getProjectItem3);
@@ -1339,6 +1249,7 @@ var bulkUpdateProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRES
1339
1249
  var deleteProjectItem4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteProjectItem3);
1340
1250
  var bulkDeleteProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteProjectItems3);
1341
1251
  var duplicateProjectItems4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateProjectItems3);
1252
+ 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
  );