@wix/auto_sdk_stores_customizations-v-3 1.0.92 → 1.0.93

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.
@@ -1,1179 +0,0 @@
1
- // src/stores-catalog-v3-customization-customizations-v-3.http.ts
2
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
- import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
5
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
7
- import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
8
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
9
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
10
- function resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl(opts) {
11
- const domainToMappings = {
12
- "manage._base_domain_": [
13
- {
14
- srcPath: "/customization",
15
- destPath: ""
16
- }
17
- ],
18
- "www.wixapis.com": [
19
- {
20
- srcPath: "/stores/v3/customizations",
21
- destPath: "/v3/customizations"
22
- },
23
- {
24
- srcPath: "/stores/v3/bulk/customizations",
25
- destPath: "/v3/bulk/customizations"
26
- }
27
- ],
28
- "editor._base_domain_": [
29
- {
30
- srcPath: "/_api/customization",
31
- destPath: ""
32
- }
33
- ],
34
- "blocks._base_domain_": [
35
- {
36
- srcPath: "/_api/customization",
37
- destPath: ""
38
- }
39
- ],
40
- "create.editorx": [
41
- {
42
- srcPath: "/_api/customization",
43
- destPath: ""
44
- }
45
- ],
46
- _: [
47
- {
48
- srcPath: "/_api/customization",
49
- destPath: ""
50
- }
51
- ],
52
- "*.dev.wix-code.com": [
53
- {
54
- srcPath: "/_api/customization",
55
- destPath: ""
56
- }
57
- ]
58
- };
59
- return resolveUrl(Object.assign(opts, { domainToMappings }));
60
- }
61
- var PACKAGE_NAME = "@wix/auto_sdk_stores_customizations-v-3";
62
- function createCustomization(payload) {
63
- function __createCustomization({ host }) {
64
- const serializedData = transformPaths(payload, [
65
- {
66
- transformFn: transformSDKTimestampToRESTTimestamp,
67
- paths: [
68
- { path: "customization.createdDate" },
69
- { path: "customization.updatedDate" },
70
- {
71
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
72
- },
73
- {
74
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
75
- }
76
- ]
77
- },
78
- {
79
- transformFn: transformSDKFloatToRESTFloat,
80
- paths: [
81
- { path: "customization.choicesSettings.choices.image.focalPoint.x" },
82
- { path: "customization.choicesSettings.choices.image.focalPoint.y" }
83
- ]
84
- }
85
- ]);
86
- const metadata = {
87
- entityFqdn: "wix.stores.catalog.v3.customization",
88
- method: "POST",
89
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.CreateCustomization",
90
- packageName: PACKAGE_NAME,
91
- migrationOptions: {
92
- optInTransformResponse: true
93
- },
94
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
95
- protoPath: "/v3/customizations",
96
- data: serializedData,
97
- host
98
- }),
99
- data: serializedData,
100
- transformResponse: (payload2) => transformPaths(payload2, [
101
- {
102
- transformFn: transformRESTTimestampToSDKTimestamp,
103
- paths: [
104
- { path: "customization.createdDate" },
105
- { path: "customization.updatedDate" },
106
- {
107
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
108
- },
109
- {
110
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
111
- }
112
- ]
113
- },
114
- {
115
- transformFn: transformRESTFloatToSDKFloat,
116
- paths: [
117
- {
118
- path: "customization.choicesSettings.choices.image.focalPoint.x"
119
- },
120
- {
121
- path: "customization.choicesSettings.choices.image.focalPoint.y"
122
- }
123
- ]
124
- }
125
- ])
126
- };
127
- return metadata;
128
- }
129
- return __createCustomization;
130
- }
131
- function getCustomization(payload) {
132
- function __getCustomization({ host }) {
133
- const metadata = {
134
- entityFqdn: "wix.stores.catalog.v3.customization",
135
- method: "GET",
136
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.GetCustomization",
137
- packageName: PACKAGE_NAME,
138
- migrationOptions: {
139
- optInTransformResponse: true
140
- },
141
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
142
- protoPath: "/v3/customizations/{customizationId}",
143
- data: payload,
144
- host
145
- }),
146
- params: toURLSearchParams(payload),
147
- transformResponse: (payload2) => transformPaths(payload2, [
148
- {
149
- transformFn: transformRESTTimestampToSDKTimestamp,
150
- paths: [
151
- { path: "customization.createdDate" },
152
- { path: "customization.updatedDate" },
153
- {
154
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
155
- },
156
- {
157
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
158
- }
159
- ]
160
- },
161
- {
162
- transformFn: transformRESTFloatToSDKFloat,
163
- paths: [
164
- {
165
- path: "customization.choicesSettings.choices.image.focalPoint.x"
166
- },
167
- {
168
- path: "customization.choicesSettings.choices.image.focalPoint.y"
169
- }
170
- ]
171
- }
172
- ])
173
- };
174
- return metadata;
175
- }
176
- return __getCustomization;
177
- }
178
- function updateCustomization(payload) {
179
- function __updateCustomization({ host }) {
180
- const serializedData = transformPaths(payload, [
181
- {
182
- transformFn: transformSDKFieldMaskToRESTFieldMask,
183
- paths: [{ path: "fieldMask" }]
184
- },
185
- {
186
- transformFn: transformSDKTimestampToRESTTimestamp,
187
- paths: [
188
- { path: "customization.createdDate" },
189
- { path: "customization.updatedDate" },
190
- {
191
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
192
- },
193
- {
194
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
195
- }
196
- ]
197
- },
198
- {
199
- transformFn: transformSDKFloatToRESTFloat,
200
- paths: [
201
- { path: "customization.choicesSettings.choices.image.focalPoint.x" },
202
- { path: "customization.choicesSettings.choices.image.focalPoint.y" }
203
- ]
204
- }
205
- ]);
206
- const metadata = {
207
- entityFqdn: "wix.stores.catalog.v3.customization",
208
- method: "PATCH",
209
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomization",
210
- packageName: PACKAGE_NAME,
211
- migrationOptions: {
212
- optInTransformResponse: true
213
- },
214
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
215
- protoPath: "/v3/customizations/{customization.id}",
216
- data: serializedData,
217
- host
218
- }),
219
- data: serializedData,
220
- transformResponse: (payload2) => transformPaths(payload2, [
221
- {
222
- transformFn: transformRESTTimestampToSDKTimestamp,
223
- paths: [
224
- { path: "customization.createdDate" },
225
- { path: "customization.updatedDate" },
226
- {
227
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
228
- },
229
- {
230
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
231
- }
232
- ]
233
- },
234
- {
235
- transformFn: transformRESTFloatToSDKFloat,
236
- paths: [
237
- {
238
- path: "customization.choicesSettings.choices.image.focalPoint.x"
239
- },
240
- {
241
- path: "customization.choicesSettings.choices.image.focalPoint.y"
242
- }
243
- ]
244
- }
245
- ])
246
- };
247
- return metadata;
248
- }
249
- return __updateCustomization;
250
- }
251
- function deleteCustomization(payload) {
252
- function __deleteCustomization({ host }) {
253
- const metadata = {
254
- entityFqdn: "wix.stores.catalog.v3.customization",
255
- method: "DELETE",
256
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.DeleteCustomization",
257
- packageName: PACKAGE_NAME,
258
- migrationOptions: {
259
- optInTransformResponse: true
260
- },
261
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
262
- protoPath: "/v3/customizations/{customizationId}",
263
- data: payload,
264
- host
265
- }),
266
- params: toURLSearchParams(payload)
267
- };
268
- return metadata;
269
- }
270
- return __deleteCustomization;
271
- }
272
- function queryCustomizations(payload) {
273
- function __queryCustomizations({ host }) {
274
- const metadata = {
275
- entityFqdn: "wix.stores.catalog.v3.customization",
276
- method: "GET",
277
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations",
278
- packageName: PACKAGE_NAME,
279
- migrationOptions: {
280
- optInTransformResponse: true
281
- },
282
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
283
- protoPath: "/v3/customizations/query",
284
- data: payload,
285
- host
286
- }),
287
- params: toURLSearchParams(payload, true),
288
- transformResponse: (payload2) => transformPaths(payload2, [
289
- {
290
- transformFn: transformRESTTimestampToSDKTimestamp,
291
- paths: [
292
- { path: "customizations.createdDate" },
293
- { path: "customizations.updatedDate" },
294
- {
295
- path: "customizations.choicesSettings.choices.image.urlExpirationDate"
296
- },
297
- {
298
- path: "customizations.choicesSettings.choices.displayImage.urlExpirationDate"
299
- }
300
- ]
301
- },
302
- {
303
- transformFn: transformRESTFloatToSDKFloat,
304
- paths: [
305
- {
306
- path: "customizations.choicesSettings.choices.image.focalPoint.x"
307
- },
308
- {
309
- path: "customizations.choicesSettings.choices.image.focalPoint.y"
310
- }
311
- ]
312
- }
313
- ]),
314
- fallback: [
315
- {
316
- method: "POST",
317
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
318
- protoPath: "/v3/customizations/query",
319
- data: payload,
320
- host
321
- }),
322
- data: payload
323
- }
324
- ]
325
- };
326
- return metadata;
327
- }
328
- return __queryCustomizations;
329
- }
330
- function countCustomizations(payload) {
331
- function __countCustomizations({ host }) {
332
- const metadata = {
333
- entityFqdn: "wix.stores.catalog.v3.customization",
334
- method: "POST",
335
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.CountCustomizations",
336
- packageName: PACKAGE_NAME,
337
- migrationOptions: {
338
- optInTransformResponse: true
339
- },
340
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
341
- protoPath: "/v3/customizations/count",
342
- data: payload,
343
- host
344
- }),
345
- data: payload
346
- };
347
- return metadata;
348
- }
349
- return __countCustomizations;
350
- }
351
- function bulkCreateCustomizations(payload) {
352
- function __bulkCreateCustomizations({ host }) {
353
- const serializedData = transformPaths(payload, [
354
- {
355
- transformFn: transformSDKTimestampToRESTTimestamp,
356
- paths: [
357
- { path: "customizations.createdDate" },
358
- { path: "customizations.updatedDate" },
359
- {
360
- path: "customizations.choicesSettings.choices.image.urlExpirationDate"
361
- },
362
- {
363
- path: "customizations.choicesSettings.choices.displayImage.urlExpirationDate"
364
- }
365
- ]
366
- },
367
- {
368
- transformFn: transformSDKFloatToRESTFloat,
369
- paths: [
370
- { path: "customizations.choicesSettings.choices.image.focalPoint.x" },
371
- { path: "customizations.choicesSettings.choices.image.focalPoint.y" }
372
- ]
373
- }
374
- ]);
375
- const metadata = {
376
- entityFqdn: "wix.stores.catalog.v3.customization",
377
- method: "POST",
378
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.BulkCreateCustomizations",
379
- packageName: PACKAGE_NAME,
380
- migrationOptions: {
381
- optInTransformResponse: true
382
- },
383
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
384
- protoPath: "/v3/bulk/customizations/create",
385
- data: serializedData,
386
- host
387
- }),
388
- data: serializedData,
389
- transformResponse: (payload2) => transformPaths(payload2, [
390
- {
391
- transformFn: transformRESTTimestampToSDKTimestamp,
392
- paths: [
393
- { path: "results.customization.createdDate" },
394
- { path: "results.customization.updatedDate" },
395
- {
396
- path: "results.customization.choicesSettings.choices.image.urlExpirationDate"
397
- },
398
- {
399
- path: "results.customization.choicesSettings.choices.displayImage.urlExpirationDate"
400
- }
401
- ]
402
- },
403
- {
404
- transformFn: transformRESTFloatToSDKFloat,
405
- paths: [
406
- {
407
- path: "results.customization.choicesSettings.choices.image.focalPoint.x"
408
- },
409
- {
410
- path: "results.customization.choicesSettings.choices.image.focalPoint.y"
411
- }
412
- ]
413
- }
414
- ])
415
- };
416
- return metadata;
417
- }
418
- return __bulkCreateCustomizations;
419
- }
420
- function addCustomizationChoices(payload) {
421
- function __addCustomizationChoices({ host }) {
422
- const serializedData = transformPaths(payload, [
423
- {
424
- transformFn: transformSDKTimestampToRESTTimestamp,
425
- paths: [
426
- { path: "choices.image.urlExpirationDate" },
427
- { path: "choices.displayImage.urlExpirationDate" }
428
- ]
429
- },
430
- {
431
- transformFn: transformSDKFloatToRESTFloat,
432
- paths: [
433
- { path: "choices.image.focalPoint.x" },
434
- { path: "choices.image.focalPoint.y" }
435
- ]
436
- }
437
- ]);
438
- const metadata = {
439
- entityFqdn: "wix.stores.catalog.v3.customization",
440
- method: "POST",
441
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.AddCustomizationChoices",
442
- packageName: PACKAGE_NAME,
443
- migrationOptions: {
444
- optInTransformResponse: true
445
- },
446
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
447
- protoPath: "/v3/customizations/{customizationId}/add-choices",
448
- data: serializedData,
449
- host
450
- }),
451
- data: serializedData,
452
- transformResponse: (payload2) => transformPaths(payload2, [
453
- {
454
- transformFn: transformRESTTimestampToSDKTimestamp,
455
- paths: [
456
- { path: "customization.createdDate" },
457
- { path: "customization.updatedDate" },
458
- {
459
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
460
- },
461
- {
462
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
463
- }
464
- ]
465
- },
466
- {
467
- transformFn: transformRESTFloatToSDKFloat,
468
- paths: [
469
- {
470
- path: "customization.choicesSettings.choices.image.focalPoint.x"
471
- },
472
- {
473
- path: "customization.choicesSettings.choices.image.focalPoint.y"
474
- }
475
- ]
476
- }
477
- ])
478
- };
479
- return metadata;
480
- }
481
- return __addCustomizationChoices;
482
- }
483
- function setCustomizationChoices(payload) {
484
- function __setCustomizationChoices({ host }) {
485
- const serializedData = transformPaths(payload, [
486
- {
487
- transformFn: transformSDKTimestampToRESTTimestamp,
488
- paths: [
489
- { path: "choices.image.urlExpirationDate" },
490
- { path: "choices.displayImage.urlExpirationDate" }
491
- ]
492
- },
493
- {
494
- transformFn: transformSDKFloatToRESTFloat,
495
- paths: [
496
- { path: "choices.image.focalPoint.x" },
497
- { path: "choices.image.focalPoint.y" }
498
- ]
499
- }
500
- ]);
501
- const metadata = {
502
- entityFqdn: "wix.stores.catalog.v3.customization",
503
- method: "POST",
504
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.SetCustomizationChoices",
505
- packageName: PACKAGE_NAME,
506
- migrationOptions: {
507
- optInTransformResponse: true
508
- },
509
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
510
- protoPath: "/v3/customizations/{customizationId}/set-choices",
511
- data: serializedData,
512
- host
513
- }),
514
- data: serializedData,
515
- transformResponse: (payload2) => transformPaths(payload2, [
516
- {
517
- transformFn: transformRESTTimestampToSDKTimestamp,
518
- paths: [
519
- { path: "customization.createdDate" },
520
- { path: "customization.updatedDate" },
521
- {
522
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
523
- },
524
- {
525
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
526
- }
527
- ]
528
- },
529
- {
530
- transformFn: transformRESTFloatToSDKFloat,
531
- paths: [
532
- {
533
- path: "customization.choicesSettings.choices.image.focalPoint.x"
534
- },
535
- {
536
- path: "customization.choicesSettings.choices.image.focalPoint.y"
537
- }
538
- ]
539
- }
540
- ])
541
- };
542
- return metadata;
543
- }
544
- return __setCustomizationChoices;
545
- }
546
- function removeCustomizationChoices(payload) {
547
- function __removeCustomizationChoices({ host }) {
548
- const metadata = {
549
- entityFqdn: "wix.stores.catalog.v3.customization",
550
- method: "POST",
551
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.RemoveCustomizationChoices",
552
- packageName: PACKAGE_NAME,
553
- migrationOptions: {
554
- optInTransformResponse: true
555
- },
556
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
557
- protoPath: "/v3/customizations/{customizationId}/remove-choices",
558
- data: payload,
559
- host
560
- }),
561
- data: payload,
562
- transformResponse: (payload2) => transformPaths(payload2, [
563
- {
564
- transformFn: transformRESTTimestampToSDKTimestamp,
565
- paths: [
566
- { path: "customization.createdDate" },
567
- { path: "customization.updatedDate" },
568
- {
569
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
570
- },
571
- {
572
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
573
- }
574
- ]
575
- },
576
- {
577
- transformFn: transformRESTFloatToSDKFloat,
578
- paths: [
579
- {
580
- path: "customization.choicesSettings.choices.image.focalPoint.x"
581
- },
582
- {
583
- path: "customization.choicesSettings.choices.image.focalPoint.y"
584
- }
585
- ]
586
- }
587
- ])
588
- };
589
- return metadata;
590
- }
591
- return __removeCustomizationChoices;
592
- }
593
- function updateCustomizationChoices(payload) {
594
- function __updateCustomizationChoices({ host }) {
595
- const serializedData = transformPaths(payload, [
596
- {
597
- transformFn: transformSDKFieldMaskToRESTFieldMask,
598
- paths: [{ path: "choices.fieldMask" }]
599
- },
600
- {
601
- transformFn: transformSDKTimestampToRESTTimestamp,
602
- paths: [
603
- { path: "choices.choice.image.urlExpirationDate" },
604
- { path: "choices.choice.displayImage.urlExpirationDate" }
605
- ]
606
- },
607
- {
608
- transformFn: transformSDKFloatToRESTFloat,
609
- paths: [
610
- { path: "choices.choice.image.focalPoint.x" },
611
- { path: "choices.choice.image.focalPoint.y" }
612
- ]
613
- }
614
- ]);
615
- const metadata = {
616
- entityFqdn: "wix.stores.catalog.v3.customization",
617
- method: "POST",
618
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices",
619
- packageName: PACKAGE_NAME,
620
- migrationOptions: {
621
- optInTransformResponse: true
622
- },
623
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
624
- protoPath: "/v3/customizations/{customizationId}/update-choices",
625
- data: serializedData,
626
- host
627
- }),
628
- data: serializedData,
629
- transformResponse: (payload2) => transformPaths(payload2, [
630
- {
631
- transformFn: transformRESTTimestampToSDKTimestamp,
632
- paths: [
633
- { path: "customization.createdDate" },
634
- { path: "customization.updatedDate" },
635
- {
636
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
637
- },
638
- {
639
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
640
- }
641
- ]
642
- },
643
- {
644
- transformFn: transformRESTFloatToSDKFloat,
645
- paths: [
646
- {
647
- path: "customization.choicesSettings.choices.image.focalPoint.x"
648
- },
649
- {
650
- path: "customization.choicesSettings.choices.image.focalPoint.y"
651
- }
652
- ]
653
- }
654
- ])
655
- };
656
- return metadata;
657
- }
658
- return __updateCustomizationChoices;
659
- }
660
- function reorderCustomizationChoices(payload) {
661
- function __reorderCustomizationChoices({ host }) {
662
- const metadata = {
663
- entityFqdn: "wix.stores.catalog.v3.customization",
664
- method: "POST",
665
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.ReorderCustomizationChoices",
666
- packageName: PACKAGE_NAME,
667
- migrationOptions: {
668
- optInTransformResponse: true
669
- },
670
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
671
- protoPath: "/v3/customizations/{customizationId}/reorder-choices",
672
- data: payload,
673
- host
674
- }),
675
- data: payload,
676
- transformResponse: (payload2) => transformPaths(payload2, [
677
- {
678
- transformFn: transformRESTTimestampToSDKTimestamp,
679
- paths: [
680
- { path: "customization.createdDate" },
681
- { path: "customization.updatedDate" },
682
- {
683
- path: "customization.choicesSettings.choices.image.urlExpirationDate"
684
- },
685
- {
686
- path: "customization.choicesSettings.choices.displayImage.urlExpirationDate"
687
- }
688
- ]
689
- },
690
- {
691
- transformFn: transformRESTFloatToSDKFloat,
692
- paths: [
693
- {
694
- path: "customization.choicesSettings.choices.image.focalPoint.x"
695
- },
696
- {
697
- path: "customization.choicesSettings.choices.image.focalPoint.y"
698
- }
699
- ]
700
- }
701
- ])
702
- };
703
- return metadata;
704
- }
705
- return __reorderCustomizationChoices;
706
- }
707
- function bulkAddCustomizationChoices(payload) {
708
- function __bulkAddCustomizationChoices({ host }) {
709
- const serializedData = transformPaths(payload, [
710
- {
711
- transformFn: transformSDKTimestampToRESTTimestamp,
712
- paths: [
713
- { path: "customizationsChoices.choices.image.urlExpirationDate" },
714
- {
715
- path: "customizationsChoices.choices.displayImage.urlExpirationDate"
716
- }
717
- ]
718
- },
719
- {
720
- transformFn: transformSDKFloatToRESTFloat,
721
- paths: [
722
- { path: "customizationsChoices.choices.image.focalPoint.x" },
723
- { path: "customizationsChoices.choices.image.focalPoint.y" }
724
- ]
725
- }
726
- ]);
727
- const metadata = {
728
- entityFqdn: "wix.stores.catalog.v3.customization",
729
- method: "POST",
730
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.BulkAddCustomizationChoices",
731
- packageName: PACKAGE_NAME,
732
- migrationOptions: {
733
- optInTransformResponse: true
734
- },
735
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
736
- protoPath: "/v3/bulk/customizations/add-choices",
737
- data: serializedData,
738
- host
739
- }),
740
- data: serializedData,
741
- transformResponse: (payload2) => transformPaths(payload2, [
742
- {
743
- transformFn: transformRESTTimestampToSDKTimestamp,
744
- paths: [
745
- { path: "results.customization.createdDate" },
746
- { path: "results.customization.updatedDate" },
747
- {
748
- path: "results.customization.choicesSettings.choices.image.urlExpirationDate"
749
- },
750
- {
751
- path: "results.customization.choicesSettings.choices.displayImage.urlExpirationDate"
752
- }
753
- ]
754
- },
755
- {
756
- transformFn: transformRESTFloatToSDKFloat,
757
- paths: [
758
- {
759
- path: "results.customization.choicesSettings.choices.image.focalPoint.x"
760
- },
761
- {
762
- path: "results.customization.choicesSettings.choices.image.focalPoint.y"
763
- }
764
- ]
765
- }
766
- ])
767
- };
768
- return metadata;
769
- }
770
- return __bulkAddCustomizationChoices;
771
- }
772
- function bulkUpdateCustomizations(payload) {
773
- function __bulkUpdateCustomizations({ host }) {
774
- const serializedData = transformPaths(payload, [
775
- {
776
- transformFn: transformSDKFieldMaskToRESTFieldMask,
777
- paths: [{ path: "customizations.fieldMask" }]
778
- },
779
- {
780
- transformFn: transformSDKTimestampToRESTTimestamp,
781
- paths: [
782
- { path: "customizations.customization.createdDate" },
783
- { path: "customizations.customization.updatedDate" },
784
- {
785
- path: "customizations.customization.choicesSettings.choices.image.urlExpirationDate"
786
- },
787
- {
788
- path: "customizations.customization.choicesSettings.choices.displayImage.urlExpirationDate"
789
- }
790
- ]
791
- },
792
- {
793
- transformFn: transformSDKFloatToRESTFloat,
794
- paths: [
795
- {
796
- path: "customizations.customization.choicesSettings.choices.image.focalPoint.x"
797
- },
798
- {
799
- path: "customizations.customization.choicesSettings.choices.image.focalPoint.y"
800
- }
801
- ]
802
- }
803
- ]);
804
- const metadata = {
805
- entityFqdn: "wix.stores.catalog.v3.customization",
806
- method: "POST",
807
- methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.BulkUpdateCustomizations",
808
- packageName: PACKAGE_NAME,
809
- migrationOptions: {
810
- optInTransformResponse: true
811
- },
812
- url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
813
- protoPath: "/v3/bulk/customizations/update",
814
- data: serializedData,
815
- host
816
- }),
817
- data: serializedData,
818
- transformResponse: (payload2) => transformPaths(payload2, [
819
- {
820
- transformFn: transformRESTTimestampToSDKTimestamp,
821
- paths: [
822
- { path: "results.customization.createdDate" },
823
- { path: "results.customization.updatedDate" },
824
- {
825
- path: "results.customization.choicesSettings.choices.image.urlExpirationDate"
826
- },
827
- {
828
- path: "results.customization.choicesSettings.choices.displayImage.urlExpirationDate"
829
- }
830
- ]
831
- },
832
- {
833
- transformFn: transformRESTFloatToSDKFloat,
834
- paths: [
835
- {
836
- path: "results.customization.choicesSettings.choices.image.focalPoint.x"
837
- },
838
- {
839
- path: "results.customization.choicesSettings.choices.image.focalPoint.y"
840
- }
841
- ]
842
- }
843
- ])
844
- };
845
- return metadata;
846
- }
847
- return __bulkUpdateCustomizations;
848
- }
849
-
850
- // src/stores-catalog-v3-customization-customizations-v-3.types.ts
851
- var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
852
- CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
853
- CustomizationType2["MODIFIER"] = "MODIFIER";
854
- return CustomizationType2;
855
- })(CustomizationType || {});
856
- var CustomizationRenderType = /* @__PURE__ */ ((CustomizationRenderType2) => {
857
- CustomizationRenderType2["FREE_TEXT"] = "FREE_TEXT";
858
- CustomizationRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
859
- CustomizationRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
860
- return CustomizationRenderType2;
861
- })(CustomizationRenderType || {});
862
- var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
863
- ChoiceType2["CHOICE_TEXT"] = "CHOICE_TEXT";
864
- ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
865
- ChoiceType2["MULTIPLE_COLORS"] = "MULTIPLE_COLORS";
866
- ChoiceType2["IMAGE"] = "IMAGE";
867
- return ChoiceType2;
868
- })(ChoiceType || {});
869
- var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
870
- ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
871
- ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
872
- ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
873
- ChoiceSortStrategy2["MANUAL"] = "MANUAL";
874
- return ChoiceSortStrategy2;
875
- })(ChoiceSortStrategy || {});
876
- var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
877
- RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
878
- RequestedFields2["CHOICE_DISPLAY_IMAGE"] = "CHOICE_DISPLAY_IMAGE";
879
- return RequestedFields2;
880
- })(RequestedFields || {});
881
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
882
- SortOrder2["ASC"] = "ASC";
883
- SortOrder2["DESC"] = "DESC";
884
- return SortOrder2;
885
- })(SortOrder || {});
886
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
887
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
888
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
889
- WebhookIdentityType2["MEMBER"] = "MEMBER";
890
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
891
- WebhookIdentityType2["APP"] = "APP";
892
- return WebhookIdentityType2;
893
- })(WebhookIdentityType || {});
894
-
895
- // src/stores-catalog-v3-customization-customizations-v-3.meta.ts
896
- function createCustomization2() {
897
- const payload = {};
898
- const getRequestOptions = createCustomization(payload);
899
- const getUrl = (context) => {
900
- const { url } = getRequestOptions(context);
901
- return url;
902
- };
903
- return {
904
- getUrl,
905
- httpMethod: "POST",
906
- path: "/v3/customizations",
907
- pathParams: {},
908
- __requestType: null,
909
- __originalRequestType: null,
910
- __responseType: null,
911
- __originalResponseType: null
912
- };
913
- }
914
- function getCustomization2() {
915
- const payload = { customizationId: ":customizationId" };
916
- const getRequestOptions = getCustomization(payload);
917
- const getUrl = (context) => {
918
- const { url } = getRequestOptions(context);
919
- return url;
920
- };
921
- return {
922
- getUrl,
923
- httpMethod: "GET",
924
- path: "/v3/customizations/{customizationId}",
925
- pathParams: { customizationId: "customizationId" },
926
- __requestType: null,
927
- __originalRequestType: null,
928
- __responseType: null,
929
- __originalResponseType: null
930
- };
931
- }
932
- function updateCustomization2() {
933
- const payload = { customization: { id: ":customizationId" } };
934
- const getRequestOptions = updateCustomization(payload);
935
- const getUrl = (context) => {
936
- const { url } = getRequestOptions(context);
937
- return url;
938
- };
939
- return {
940
- getUrl,
941
- httpMethod: "PATCH",
942
- path: "/v3/customizations/{customization.id}",
943
- pathParams: { customizationId: "customizationId" },
944
- __requestType: null,
945
- __originalRequestType: null,
946
- __responseType: null,
947
- __originalResponseType: null
948
- };
949
- }
950
- function deleteCustomization2() {
951
- const payload = { customizationId: ":customizationId" };
952
- const getRequestOptions = deleteCustomization(payload);
953
- const getUrl = (context) => {
954
- const { url } = getRequestOptions(context);
955
- return url;
956
- };
957
- return {
958
- getUrl,
959
- httpMethod: "DELETE",
960
- path: "/v3/customizations/{customizationId}",
961
- pathParams: { customizationId: "customizationId" },
962
- __requestType: null,
963
- __originalRequestType: null,
964
- __responseType: null,
965
- __originalResponseType: null
966
- };
967
- }
968
- function queryCustomizations2() {
969
- const payload = {};
970
- const getRequestOptions = queryCustomizations(payload);
971
- const getUrl = (context) => {
972
- const { url } = getRequestOptions(context);
973
- return url;
974
- };
975
- return {
976
- getUrl,
977
- httpMethod: "GET",
978
- path: "/v3/customizations/query",
979
- pathParams: {},
980
- __requestType: null,
981
- __originalRequestType: null,
982
- __responseType: null,
983
- __originalResponseType: null
984
- };
985
- }
986
- function countCustomizations2() {
987
- const payload = {};
988
- const getRequestOptions = countCustomizations(payload);
989
- const getUrl = (context) => {
990
- const { url } = getRequestOptions(context);
991
- return url;
992
- };
993
- return {
994
- getUrl,
995
- httpMethod: "POST",
996
- path: "/v3/customizations/count",
997
- pathParams: {},
998
- __requestType: null,
999
- __originalRequestType: null,
1000
- __responseType: null,
1001
- __originalResponseType: null
1002
- };
1003
- }
1004
- function bulkCreateCustomizations2() {
1005
- const payload = {};
1006
- const getRequestOptions = bulkCreateCustomizations(payload);
1007
- const getUrl = (context) => {
1008
- const { url } = getRequestOptions(context);
1009
- return url;
1010
- };
1011
- return {
1012
- getUrl,
1013
- httpMethod: "POST",
1014
- path: "/v3/bulk/customizations/create",
1015
- pathParams: {},
1016
- __requestType: null,
1017
- __originalRequestType: null,
1018
- __responseType: null,
1019
- __originalResponseType: null
1020
- };
1021
- }
1022
- function addCustomizationChoices2() {
1023
- const payload = { customizationId: ":customizationId" };
1024
- const getRequestOptions = addCustomizationChoices(payload);
1025
- const getUrl = (context) => {
1026
- const { url } = getRequestOptions(context);
1027
- return url;
1028
- };
1029
- return {
1030
- getUrl,
1031
- httpMethod: "POST",
1032
- path: "/v3/customizations/{customizationId}/add-choices",
1033
- pathParams: { customizationId: "customizationId" },
1034
- __requestType: null,
1035
- __originalRequestType: null,
1036
- __responseType: null,
1037
- __originalResponseType: null
1038
- };
1039
- }
1040
- function setCustomizationChoices2() {
1041
- const payload = { customizationId: ":customizationId" };
1042
- const getRequestOptions = setCustomizationChoices(payload);
1043
- const getUrl = (context) => {
1044
- const { url } = getRequestOptions(context);
1045
- return url;
1046
- };
1047
- return {
1048
- getUrl,
1049
- httpMethod: "POST",
1050
- path: "/v3/customizations/{customizationId}/set-choices",
1051
- pathParams: { customizationId: "customizationId" },
1052
- __requestType: null,
1053
- __originalRequestType: null,
1054
- __responseType: null,
1055
- __originalResponseType: null
1056
- };
1057
- }
1058
- function removeCustomizationChoices2() {
1059
- const payload = { customizationId: ":customizationId" };
1060
- const getRequestOptions = removeCustomizationChoices(
1061
- payload
1062
- );
1063
- const getUrl = (context) => {
1064
- const { url } = getRequestOptions(context);
1065
- return url;
1066
- };
1067
- return {
1068
- getUrl,
1069
- httpMethod: "POST",
1070
- path: "/v3/customizations/{customizationId}/remove-choices",
1071
- pathParams: { customizationId: "customizationId" },
1072
- __requestType: null,
1073
- __originalRequestType: null,
1074
- __responseType: null,
1075
- __originalResponseType: null
1076
- };
1077
- }
1078
- function updateCustomizationChoices2() {
1079
- const payload = { customizationId: ":customizationId" };
1080
- const getRequestOptions = updateCustomizationChoices(
1081
- payload
1082
- );
1083
- const getUrl = (context) => {
1084
- const { url } = getRequestOptions(context);
1085
- return url;
1086
- };
1087
- return {
1088
- getUrl,
1089
- httpMethod: "POST",
1090
- path: "/v3/customizations/{customizationId}/update-choices",
1091
- pathParams: { customizationId: "customizationId" },
1092
- __requestType: null,
1093
- __originalRequestType: null,
1094
- __responseType: null,
1095
- __originalResponseType: null
1096
- };
1097
- }
1098
- function reorderCustomizationChoices2() {
1099
- const payload = { customizationId: ":customizationId" };
1100
- const getRequestOptions = reorderCustomizationChoices(
1101
- payload
1102
- );
1103
- const getUrl = (context) => {
1104
- const { url } = getRequestOptions(context);
1105
- return url;
1106
- };
1107
- return {
1108
- getUrl,
1109
- httpMethod: "POST",
1110
- path: "/v3/customizations/{customizationId}/reorder-choices",
1111
- pathParams: { customizationId: "customizationId" },
1112
- __requestType: null,
1113
- __originalRequestType: null,
1114
- __responseType: null,
1115
- __originalResponseType: null
1116
- };
1117
- }
1118
- function bulkAddCustomizationChoices2() {
1119
- const payload = {};
1120
- const getRequestOptions = bulkAddCustomizationChoices(
1121
- payload
1122
- );
1123
- const getUrl = (context) => {
1124
- const { url } = getRequestOptions(context);
1125
- return url;
1126
- };
1127
- return {
1128
- getUrl,
1129
- httpMethod: "POST",
1130
- path: "/v3/bulk/customizations/add-choices",
1131
- pathParams: {},
1132
- __requestType: null,
1133
- __originalRequestType: null,
1134
- __responseType: null,
1135
- __originalResponseType: null
1136
- };
1137
- }
1138
- function bulkUpdateCustomizations2() {
1139
- const payload = {};
1140
- const getRequestOptions = bulkUpdateCustomizations(payload);
1141
- const getUrl = (context) => {
1142
- const { url } = getRequestOptions(context);
1143
- return url;
1144
- };
1145
- return {
1146
- getUrl,
1147
- httpMethod: "POST",
1148
- path: "/v3/bulk/customizations/update",
1149
- pathParams: {},
1150
- __requestType: null,
1151
- __originalRequestType: null,
1152
- __responseType: null,
1153
- __originalResponseType: null
1154
- };
1155
- }
1156
- export {
1157
- ChoiceSortStrategy as ChoiceSortStrategyOriginal,
1158
- ChoiceType as ChoiceTypeOriginal,
1159
- CustomizationRenderType as CustomizationRenderTypeOriginal,
1160
- CustomizationType as CustomizationTypeOriginal,
1161
- RequestedFields as RequestedFieldsOriginal,
1162
- SortOrder as SortOrderOriginal,
1163
- WebhookIdentityType as WebhookIdentityTypeOriginal,
1164
- addCustomizationChoices2 as addCustomizationChoices,
1165
- bulkAddCustomizationChoices2 as bulkAddCustomizationChoices,
1166
- bulkCreateCustomizations2 as bulkCreateCustomizations,
1167
- bulkUpdateCustomizations2 as bulkUpdateCustomizations,
1168
- countCustomizations2 as countCustomizations,
1169
- createCustomization2 as createCustomization,
1170
- deleteCustomization2 as deleteCustomization,
1171
- getCustomization2 as getCustomization,
1172
- queryCustomizations2 as queryCustomizations,
1173
- removeCustomizationChoices2 as removeCustomizationChoices,
1174
- reorderCustomizationChoices2 as reorderCustomizationChoices,
1175
- setCustomizationChoices2 as setCustomizationChoices,
1176
- updateCustomization2 as updateCustomization,
1177
- updateCustomizationChoices2 as updateCustomizationChoices
1178
- };
1179
- //# sourceMappingURL=meta.mjs.map