@wix/auto_sdk_seatings_seating-plan 1.0.11 → 1.0.13

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.
@@ -0,0 +1,1028 @@
1
+ // src/seating-v1-seating-plan-seating-plan.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/seating-v1-seating-plan-seating-plan.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
13
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
15
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
16
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
17
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
18
+ function resolveComWixpressSeatingSeatingPlanThumbnailServiceUrl(opts) {
19
+ const domainToMappings = {
20
+ "manage._base_domain_": [
21
+ {
22
+ srcPath: "/_api/seating-plans",
23
+ destPath: ""
24
+ }
25
+ ],
26
+ "www._base_domain_": [
27
+ {
28
+ srcPath: "/_api/seating-plans",
29
+ destPath: ""
30
+ }
31
+ ],
32
+ "editor-flow.wixapps.net": [
33
+ {
34
+ srcPath: "/_api/seating-plans",
35
+ destPath: ""
36
+ }
37
+ ],
38
+ "editor._base_domain_": [
39
+ {
40
+ srcPath: "/_api/seating-plans",
41
+ destPath: ""
42
+ }
43
+ ],
44
+ "blocks._base_domain_": [
45
+ {
46
+ srcPath: "/_api/seating-plans",
47
+ destPath: ""
48
+ }
49
+ ],
50
+ "create.editorx": [
51
+ {
52
+ srcPath: "/_api/seating-plans",
53
+ destPath: ""
54
+ }
55
+ ],
56
+ "api._base_domain_": [
57
+ {
58
+ srcPath: "/seating-plans",
59
+ destPath: ""
60
+ }
61
+ ],
62
+ "editor.wixapps.net": [
63
+ {
64
+ srcPath: "/_api/seating-plans",
65
+ destPath: ""
66
+ }
67
+ ],
68
+ "api._api_base_domain_": [
69
+ {
70
+ srcPath: "/seating-plans",
71
+ destPath: ""
72
+ }
73
+ ],
74
+ _: [
75
+ {
76
+ srcPath: "/_api/seating-plans",
77
+ destPath: ""
78
+ }
79
+ ]
80
+ };
81
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
82
+ }
83
+ function resolveComWixpressSeatingSeatingPlanManagementUrl(opts) {
84
+ const domainToMappings = {
85
+ "manage._base_domain_": [
86
+ {
87
+ srcPath: "/_api/seating-plans",
88
+ destPath: ""
89
+ }
90
+ ],
91
+ "www._base_domain_": [
92
+ {
93
+ srcPath: "/_api/seating-plans",
94
+ destPath: ""
95
+ }
96
+ ],
97
+ "editor-flow.wixapps.net": [
98
+ {
99
+ srcPath: "/_api/seating-plans",
100
+ destPath: ""
101
+ }
102
+ ],
103
+ "editor._base_domain_": [
104
+ {
105
+ srcPath: "/_api/seating-plans",
106
+ destPath: ""
107
+ }
108
+ ],
109
+ "blocks._base_domain_": [
110
+ {
111
+ srcPath: "/_api/seating-plans",
112
+ destPath: ""
113
+ }
114
+ ],
115
+ "create.editorx": [
116
+ {
117
+ srcPath: "/_api/seating-plans",
118
+ destPath: ""
119
+ }
120
+ ],
121
+ "api._base_domain_": [
122
+ {
123
+ srcPath: "/seating-plans",
124
+ destPath: ""
125
+ }
126
+ ],
127
+ "editor.wixapps.net": [
128
+ {
129
+ srcPath: "/_api/seating-plans",
130
+ destPath: ""
131
+ }
132
+ ],
133
+ "api._api_base_domain_": [
134
+ {
135
+ srcPath: "/seating-plans",
136
+ destPath: ""
137
+ }
138
+ ],
139
+ _: [
140
+ {
141
+ srcPath: "/_api/seating-plans",
142
+ destPath: ""
143
+ }
144
+ ]
145
+ };
146
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
147
+ }
148
+ var PACKAGE_NAME = "@wix/auto_sdk_seatings_seating-plan";
149
+ function createSeatingPlan(payload) {
150
+ function __createSeatingPlan({ host }) {
151
+ const serializedData = transformPaths(payload, [
152
+ {
153
+ transformFn: transformSDKTimestampToRESTTimestamp,
154
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
155
+ },
156
+ {
157
+ transformFn: transformSDKFloatToRESTFloat,
158
+ paths: [
159
+ { path: "plan.sections.elements.uiProperties.x" },
160
+ { path: "plan.sections.elements.uiProperties.y" },
161
+ { path: "plan.sections.elements.uiProperties.width" },
162
+ { path: "plan.sections.elements.uiProperties.height" },
163
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
164
+ { path: "plan.sections.elements.multiRowProperties.curveAngleTo" },
165
+ { path: "plan.sections.elements.multiRowProperties.curveAngleFrom" },
166
+ {
167
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
168
+ },
169
+ {
170
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
171
+ },
172
+ {
173
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
174
+ },
175
+ {
176
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
177
+ },
178
+ { path: "plan.elementGroups.uiProperties.x" },
179
+ { path: "plan.elementGroups.uiProperties.y" },
180
+ { path: "plan.elementGroups.uiProperties.width" },
181
+ { path: "plan.elementGroups.uiProperties.height" },
182
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
183
+ ]
184
+ }
185
+ ]);
186
+ const metadata = {
187
+ entityFqdn: "wix.seating.v1.seating_plan",
188
+ method: "POST",
189
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.CreateSeatingPlan",
190
+ packageName: PACKAGE_NAME,
191
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
192
+ protoPath: "/v1/plans",
193
+ data: serializedData,
194
+ host
195
+ }),
196
+ data: serializedData,
197
+ transformResponse: (payload2) => transformPaths(payload2, [
198
+ {
199
+ transformFn: transformRESTTimestampToSDKTimestamp,
200
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
201
+ },
202
+ {
203
+ transformFn: transformRESTFloatToSDKFloat,
204
+ paths: [
205
+ { path: "plan.sections.elements.uiProperties.x" },
206
+ { path: "plan.sections.elements.uiProperties.y" },
207
+ { path: "plan.sections.elements.uiProperties.width" },
208
+ { path: "plan.sections.elements.uiProperties.height" },
209
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
210
+ {
211
+ path: "plan.sections.elements.multiRowProperties.curveAngleTo"
212
+ },
213
+ {
214
+ path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
215
+ },
216
+ {
217
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
218
+ },
219
+ {
220
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
221
+ },
222
+ {
223
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
224
+ },
225
+ {
226
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
227
+ },
228
+ { path: "plan.elementGroups.uiProperties.x" },
229
+ { path: "plan.elementGroups.uiProperties.y" },
230
+ { path: "plan.elementGroups.uiProperties.width" },
231
+ { path: "plan.elementGroups.uiProperties.height" },
232
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
233
+ ]
234
+ }
235
+ ])
236
+ };
237
+ return metadata;
238
+ }
239
+ return __createSeatingPlan;
240
+ }
241
+ function updateSeatingPlan(payload) {
242
+ function __updateSeatingPlan({ host }) {
243
+ const serializedData = transformPaths(payload, [
244
+ {
245
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
246
+ paths: [{ path: "fields" }]
247
+ },
248
+ {
249
+ transformFn: transformSDKTimestampToRESTTimestamp,
250
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
251
+ },
252
+ {
253
+ transformFn: transformSDKFloatToRESTFloat,
254
+ paths: [
255
+ { path: "plan.sections.elements.uiProperties.x" },
256
+ { path: "plan.sections.elements.uiProperties.y" },
257
+ { path: "plan.sections.elements.uiProperties.width" },
258
+ { path: "plan.sections.elements.uiProperties.height" },
259
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
260
+ { path: "plan.sections.elements.multiRowProperties.curveAngleTo" },
261
+ { path: "plan.sections.elements.multiRowProperties.curveAngleFrom" },
262
+ {
263
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
264
+ },
265
+ {
266
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
267
+ },
268
+ {
269
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
270
+ },
271
+ {
272
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
273
+ },
274
+ { path: "plan.elementGroups.uiProperties.x" },
275
+ { path: "plan.elementGroups.uiProperties.y" },
276
+ { path: "plan.elementGroups.uiProperties.width" },
277
+ { path: "plan.elementGroups.uiProperties.height" },
278
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
279
+ ]
280
+ }
281
+ ]);
282
+ const metadata = {
283
+ entityFqdn: "wix.seating.v1.seating_plan",
284
+ method: "PUT",
285
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.UpdateSeatingPlan",
286
+ packageName: PACKAGE_NAME,
287
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
288
+ protoPath: "/v1/plans",
289
+ data: serializedData,
290
+ host
291
+ }),
292
+ data: serializedData,
293
+ transformResponse: (payload2) => transformPaths(payload2, [
294
+ {
295
+ transformFn: transformRESTTimestampToSDKTimestamp,
296
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
297
+ },
298
+ {
299
+ transformFn: transformRESTFloatToSDKFloat,
300
+ paths: [
301
+ { path: "plan.sections.elements.uiProperties.x" },
302
+ { path: "plan.sections.elements.uiProperties.y" },
303
+ { path: "plan.sections.elements.uiProperties.width" },
304
+ { path: "plan.sections.elements.uiProperties.height" },
305
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
306
+ {
307
+ path: "plan.sections.elements.multiRowProperties.curveAngleTo"
308
+ },
309
+ {
310
+ path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
311
+ },
312
+ {
313
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
314
+ },
315
+ {
316
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
317
+ },
318
+ {
319
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
320
+ },
321
+ {
322
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
323
+ },
324
+ { path: "plan.elementGroups.uiProperties.x" },
325
+ { path: "plan.elementGroups.uiProperties.y" },
326
+ { path: "plan.elementGroups.uiProperties.width" },
327
+ { path: "plan.elementGroups.uiProperties.height" },
328
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
329
+ ]
330
+ }
331
+ ])
332
+ };
333
+ return metadata;
334
+ }
335
+ return __updateSeatingPlan;
336
+ }
337
+ function copySeatingPlan(payload) {
338
+ function __copySeatingPlan({ host }) {
339
+ const metadata = {
340
+ entityFqdn: "wix.seating.v1.seating_plan",
341
+ method: "POST",
342
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.CopySeatingPlan",
343
+ packageName: PACKAGE_NAME,
344
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
345
+ protoPath: "/v1/plans/copy",
346
+ data: payload,
347
+ host
348
+ }),
349
+ data: payload,
350
+ transformResponse: (payload2) => transformPaths(payload2, [
351
+ {
352
+ transformFn: transformRESTTimestampToSDKTimestamp,
353
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
354
+ },
355
+ {
356
+ transformFn: transformRESTFloatToSDKFloat,
357
+ paths: [
358
+ { path: "plan.sections.elements.uiProperties.x" },
359
+ { path: "plan.sections.elements.uiProperties.y" },
360
+ { path: "plan.sections.elements.uiProperties.width" },
361
+ { path: "plan.sections.elements.uiProperties.height" },
362
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
363
+ {
364
+ path: "plan.sections.elements.multiRowProperties.curveAngleTo"
365
+ },
366
+ {
367
+ path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
368
+ },
369
+ {
370
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
371
+ },
372
+ {
373
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
374
+ },
375
+ {
376
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
377
+ },
378
+ {
379
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
380
+ },
381
+ { path: "plan.elementGroups.uiProperties.x" },
382
+ { path: "plan.elementGroups.uiProperties.y" },
383
+ { path: "plan.elementGroups.uiProperties.width" },
384
+ { path: "plan.elementGroups.uiProperties.height" },
385
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
386
+ ]
387
+ }
388
+ ])
389
+ };
390
+ return metadata;
391
+ }
392
+ return __copySeatingPlan;
393
+ }
394
+ function querySeatingPlan(payload) {
395
+ function __querySeatingPlan({ host }) {
396
+ const metadata = {
397
+ entityFqdn: "wix.seating.v1.seating_plan",
398
+ method: "POST",
399
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.QuerySeatingPlan",
400
+ packageName: PACKAGE_NAME,
401
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
402
+ protoPath: "/v1/plans/query",
403
+ data: payload,
404
+ host
405
+ }),
406
+ data: payload,
407
+ transformResponse: (payload2) => transformPaths(payload2, [
408
+ {
409
+ transformFn: transformRESTTimestampToSDKTimestamp,
410
+ paths: [
411
+ { path: "plans.createdDate" },
412
+ { path: "plans.updatedDate" }
413
+ ]
414
+ },
415
+ {
416
+ transformFn: transformRESTFloatToSDKFloat,
417
+ paths: [
418
+ { path: "plans.sections.elements.uiProperties.x" },
419
+ { path: "plans.sections.elements.uiProperties.y" },
420
+ { path: "plans.sections.elements.uiProperties.width" },
421
+ { path: "plans.sections.elements.uiProperties.height" },
422
+ { path: "plans.sections.elements.uiProperties.rotationAngle" },
423
+ {
424
+ path: "plans.sections.elements.multiRowProperties.curveAngleTo"
425
+ },
426
+ {
427
+ path: "plans.sections.elements.multiRowProperties.curveAngleFrom"
428
+ },
429
+ {
430
+ path: "plans.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
431
+ },
432
+ {
433
+ path: "plans.sections.elements.multiRowProperties.rows.uiProperties.width"
434
+ },
435
+ {
436
+ path: "plans.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
437
+ },
438
+ {
439
+ path: "plans.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
440
+ },
441
+ { path: "plans.elementGroups.uiProperties.x" },
442
+ { path: "plans.elementGroups.uiProperties.y" },
443
+ { path: "plans.elementGroups.uiProperties.width" },
444
+ { path: "plans.elementGroups.uiProperties.height" },
445
+ { path: "plans.elementGroups.uiProperties.rotationAngle" }
446
+ ]
447
+ }
448
+ ])
449
+ };
450
+ return metadata;
451
+ }
452
+ return __querySeatingPlan;
453
+ }
454
+ function getSeatingPlan(payload) {
455
+ function __getSeatingPlan({ host }) {
456
+ const metadata = {
457
+ entityFqdn: "wix.seating.v1.seating_plan",
458
+ method: "GET",
459
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.GetSeatingPlan",
460
+ packageName: PACKAGE_NAME,
461
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
462
+ protoPath: "/v1/plans/{id}",
463
+ data: payload,
464
+ host
465
+ }),
466
+ params: toURLSearchParams(payload),
467
+ transformResponse: (payload2) => transformPaths(payload2, [
468
+ {
469
+ transformFn: transformRESTTimestampToSDKTimestamp,
470
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
471
+ },
472
+ {
473
+ transformFn: transformRESTFloatToSDKFloat,
474
+ paths: [
475
+ { path: "plan.sections.elements.uiProperties.x" },
476
+ { path: "plan.sections.elements.uiProperties.y" },
477
+ { path: "plan.sections.elements.uiProperties.width" },
478
+ { path: "plan.sections.elements.uiProperties.height" },
479
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
480
+ {
481
+ path: "plan.sections.elements.multiRowProperties.curveAngleTo"
482
+ },
483
+ {
484
+ path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
485
+ },
486
+ {
487
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
488
+ },
489
+ {
490
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
491
+ },
492
+ {
493
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
494
+ },
495
+ {
496
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
497
+ },
498
+ { path: "plan.elementGroups.uiProperties.x" },
499
+ { path: "plan.elementGroups.uiProperties.y" },
500
+ { path: "plan.elementGroups.uiProperties.width" },
501
+ { path: "plan.elementGroups.uiProperties.height" },
502
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
503
+ ]
504
+ }
505
+ ])
506
+ };
507
+ return metadata;
508
+ }
509
+ return __getSeatingPlan;
510
+ }
511
+ function findSeatingPlan(payload) {
512
+ function __findSeatingPlan({ host }) {
513
+ const metadata = {
514
+ entityFqdn: "wix.seating.v1.seating_plan",
515
+ method: "POST",
516
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.FindSeatingPlan",
517
+ packageName: PACKAGE_NAME,
518
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
519
+ protoPath: "/v1/plans/find",
520
+ data: payload,
521
+ host
522
+ }),
523
+ data: payload,
524
+ transformResponse: (payload2) => transformPaths(payload2, [
525
+ {
526
+ transformFn: transformRESTTimestampToSDKTimestamp,
527
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
528
+ },
529
+ {
530
+ transformFn: transformRESTFloatToSDKFloat,
531
+ paths: [
532
+ { path: "plan.sections.elements.uiProperties.x" },
533
+ { path: "plan.sections.elements.uiProperties.y" },
534
+ { path: "plan.sections.elements.uiProperties.width" },
535
+ { path: "plan.sections.elements.uiProperties.height" },
536
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
537
+ {
538
+ path: "plan.sections.elements.multiRowProperties.curveAngleTo"
539
+ },
540
+ {
541
+ path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
542
+ },
543
+ {
544
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
545
+ },
546
+ {
547
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
548
+ },
549
+ {
550
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
551
+ },
552
+ {
553
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
554
+ },
555
+ { path: "plan.elementGroups.uiProperties.x" },
556
+ { path: "plan.elementGroups.uiProperties.y" },
557
+ { path: "plan.elementGroups.uiProperties.width" },
558
+ { path: "plan.elementGroups.uiProperties.height" },
559
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
560
+ ]
561
+ }
562
+ ])
563
+ };
564
+ return metadata;
565
+ }
566
+ return __findSeatingPlan;
567
+ }
568
+ function deleteSeatingPlan(payload) {
569
+ function __deleteSeatingPlan({ host }) {
570
+ const metadata = {
571
+ entityFqdn: "wix.seating.v1.seating_plan",
572
+ method: "DELETE",
573
+ methodFqn: "com.wixpress.seating.SeatingPlanManagement.DeleteSeatingPlan",
574
+ packageName: PACKAGE_NAME,
575
+ url: resolveComWixpressSeatingSeatingPlanManagementUrl({
576
+ protoPath: "/v1/plans/{id}",
577
+ data: payload,
578
+ host
579
+ }),
580
+ params: toURLSearchParams(payload),
581
+ transformResponse: (payload2) => transformPaths(payload2, [
582
+ {
583
+ transformFn: transformRESTTimestampToSDKTimestamp,
584
+ paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
585
+ },
586
+ {
587
+ transformFn: transformRESTFloatToSDKFloat,
588
+ paths: [
589
+ { path: "plan.sections.elements.uiProperties.x" },
590
+ { path: "plan.sections.elements.uiProperties.y" },
591
+ { path: "plan.sections.elements.uiProperties.width" },
592
+ { path: "plan.sections.elements.uiProperties.height" },
593
+ { path: "plan.sections.elements.uiProperties.rotationAngle" },
594
+ {
595
+ path: "plan.sections.elements.multiRowProperties.curveAngleTo"
596
+ },
597
+ {
598
+ path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
599
+ },
600
+ {
601
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
602
+ },
603
+ {
604
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
605
+ },
606
+ {
607
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
608
+ },
609
+ {
610
+ path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
611
+ },
612
+ { path: "plan.elementGroups.uiProperties.x" },
613
+ { path: "plan.elementGroups.uiProperties.y" },
614
+ { path: "plan.elementGroups.uiProperties.width" },
615
+ { path: "plan.elementGroups.uiProperties.height" },
616
+ { path: "plan.elementGroups.uiProperties.rotationAngle" }
617
+ ]
618
+ }
619
+ ])
620
+ };
621
+ return metadata;
622
+ }
623
+ return __deleteSeatingPlan;
624
+ }
625
+ function updateSeatingPlanThumbnail(payload) {
626
+ function __updateSeatingPlanThumbnail({ host }) {
627
+ const metadata = {
628
+ entityFqdn: "wix.seating.v1.seating_plan",
629
+ method: "POST",
630
+ methodFqn: "com.wixpress.seating.SeatingPlanThumbnailService.UpdateSeatingPlanThumbnail",
631
+ packageName: PACKAGE_NAME,
632
+ url: resolveComWixpressSeatingSeatingPlanThumbnailServiceUrl({
633
+ protoPath: "/v1/plan-thumbnails",
634
+ data: payload,
635
+ host
636
+ }),
637
+ data: payload
638
+ };
639
+ return metadata;
640
+ }
641
+ return __updateSeatingPlanThumbnail;
642
+ }
643
+ function getSeatingPlanThumbnail(payload) {
644
+ function __getSeatingPlanThumbnail({ host }) {
645
+ const metadata = {
646
+ entityFqdn: "wix.seating.v1.seating_plan",
647
+ method: "GET",
648
+ methodFqn: "com.wixpress.seating.SeatingPlanThumbnailService.GetSeatingPlanThumbnail",
649
+ packageName: PACKAGE_NAME,
650
+ url: resolveComWixpressSeatingSeatingPlanThumbnailServiceUrl({
651
+ protoPath: "/v1/plan-thumbnails",
652
+ data: payload,
653
+ host
654
+ }),
655
+ params: toURLSearchParams(payload)
656
+ };
657
+ return metadata;
658
+ }
659
+ return __getSeatingPlanThumbnail;
660
+ }
661
+
662
+ // src/seating-v1-seating-plan-seating-plan.universal.ts
663
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
664
+ var Type = /* @__PURE__ */ ((Type2) => {
665
+ Type2["AREA"] = "AREA";
666
+ Type2["ROW"] = "ROW";
667
+ Type2["MULTI_ROW"] = "MULTI_ROW";
668
+ Type2["TABLE"] = "TABLE";
669
+ Type2["ROUND_TABLE"] = "ROUND_TABLE";
670
+ Type2["SHAPE"] = "SHAPE";
671
+ return Type2;
672
+ })(Type || {});
673
+ var PlaceTypeEnumType = /* @__PURE__ */ ((PlaceTypeEnumType2) => {
674
+ PlaceTypeEnumType2["UNKNOWN_PROPERTY"] = "UNKNOWN_PROPERTY";
675
+ PlaceTypeEnumType2["STANDARD"] = "STANDARD";
676
+ PlaceTypeEnumType2["WHEELCHAIR"] = "WHEELCHAIR";
677
+ PlaceTypeEnumType2["ACCESSIBLE"] = "ACCESSIBLE";
678
+ PlaceTypeEnumType2["COMPANION"] = "COMPANION";
679
+ PlaceTypeEnumType2["OBSTRUCTED"] = "OBSTRUCTED";
680
+ PlaceTypeEnumType2["DISCOUNT"] = "DISCOUNT";
681
+ return PlaceTypeEnumType2;
682
+ })(PlaceTypeEnumType || {});
683
+ var ShapeTypeEnumType = /* @__PURE__ */ ((ShapeTypeEnumType2) => {
684
+ ShapeTypeEnumType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
685
+ ShapeTypeEnumType2["TEXT"] = "TEXT";
686
+ ShapeTypeEnumType2["RECTANGLE"] = "RECTANGLE";
687
+ ShapeTypeEnumType2["ELLIPSE"] = "ELLIPSE";
688
+ ShapeTypeEnumType2["LINE"] = "LINE";
689
+ ShapeTypeEnumType2["ICON"] = "ICON";
690
+ ShapeTypeEnumType2["IMAGE"] = "IMAGE";
691
+ return ShapeTypeEnumType2;
692
+ })(ShapeTypeEnumType || {});
693
+ var Position = /* @__PURE__ */ ((Position2) => {
694
+ Position2["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
695
+ Position2["LEFT"] = "LEFT";
696
+ Position2["RIGHT"] = "RIGHT";
697
+ Position2["BOTH"] = "BOTH";
698
+ Position2["NONE"] = "NONE";
699
+ return Position2;
700
+ })(Position || {});
701
+ var Icon = /* @__PURE__ */ ((Icon2) => {
702
+ Icon2["UNKNOWN_ICON"] = "UNKNOWN_ICON";
703
+ Icon2["ENTER"] = "ENTER";
704
+ Icon2["EXIT"] = "EXIT";
705
+ Icon2["DRINKS"] = "DRINKS";
706
+ Icon2["WC"] = "WC";
707
+ Icon2["WC_MEN"] = "WC_MEN";
708
+ Icon2["WC_WOMEN"] = "WC_WOMEN";
709
+ Icon2["FOOD"] = "FOOD";
710
+ Icon2["STAIRS"] = "STAIRS";
711
+ Icon2["ELEVATOR"] = "ELEVATOR";
712
+ Icon2["SMOKING"] = "SMOKING";
713
+ Icon2["CHECKROOM"] = "CHECKROOM";
714
+ Icon2["STAGE"] = "STAGE";
715
+ return Icon2;
716
+ })(Icon || {});
717
+ var Numbering = /* @__PURE__ */ ((Numbering2) => {
718
+ Numbering2["UNKNOWN_NUMBERING"] = "UNKNOWN_NUMBERING";
719
+ Numbering2["NUMERIC"] = "NUMERIC";
720
+ Numbering2["ODD_EVEN"] = "ODD_EVEN";
721
+ Numbering2["ALPHABETICAL"] = "ALPHABETICAL";
722
+ return Numbering2;
723
+ })(Numbering || {});
724
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
725
+ SortOrder2["ASC"] = "ASC";
726
+ SortOrder2["DESC"] = "DESC";
727
+ return SortOrder2;
728
+ })(SortOrder || {});
729
+ var Fieldset = /* @__PURE__ */ ((Fieldset2) => {
730
+ Fieldset2["ELEMENTS"] = "ELEMENTS";
731
+ Fieldset2["CATEGORIES"] = "CATEGORIES";
732
+ Fieldset2["PLACES"] = "PLACES";
733
+ Fieldset2["CONFIG"] = "CONFIG";
734
+ Fieldset2["ELEMENT_GROUPS"] = "ELEMENT_GROUPS";
735
+ return Fieldset2;
736
+ })(Fieldset || {});
737
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
738
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
739
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
740
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
741
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
742
+ WebhookIdentityType2["APP"] = "APP";
743
+ return WebhookIdentityType2;
744
+ })(WebhookIdentityType || {});
745
+ async function createSeatingPlan2(plan) {
746
+ const { httpClient, sideEffects } = arguments[1];
747
+ const payload = renameKeysFromSDKRequestToRESTRequest({ plan });
748
+ const reqOpts = createSeatingPlan(payload);
749
+ sideEffects?.onSiteCall?.();
750
+ try {
751
+ const result = await httpClient.request(reqOpts);
752
+ sideEffects?.onSuccess?.(result);
753
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan;
754
+ } catch (err) {
755
+ const transformedError = sdkTransformError(
756
+ err,
757
+ {
758
+ spreadPathsToArguments: {},
759
+ explicitPathsToArguments: { plan: "$[0]" },
760
+ singleArgumentUnchanged: false
761
+ },
762
+ ["plan"]
763
+ );
764
+ sideEffects?.onError?.(err);
765
+ throw transformedError;
766
+ }
767
+ }
768
+ async function updateSeatingPlan2(options) {
769
+ const { httpClient, sideEffects } = arguments[1];
770
+ const payload = renameKeysFromSDKRequestToRESTRequest({
771
+ plan: options?.plan,
772
+ fields: options?.fields
773
+ });
774
+ const reqOpts = updateSeatingPlan(payload);
775
+ sideEffects?.onSiteCall?.();
776
+ try {
777
+ const result = await httpClient.request(reqOpts);
778
+ sideEffects?.onSuccess?.(result);
779
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan;
780
+ } catch (err) {
781
+ const transformedError = sdkTransformError(
782
+ err,
783
+ {
784
+ spreadPathsToArguments: {},
785
+ explicitPathsToArguments: { plan: "$[0].plan", fields: "$[0].fields" },
786
+ singleArgumentUnchanged: false
787
+ },
788
+ ["options"]
789
+ );
790
+ sideEffects?.onError?.(err);
791
+ throw transformedError;
792
+ }
793
+ }
794
+ async function copySeatingPlan2(_id, options) {
795
+ const { httpClient, sideEffects } = arguments[2];
796
+ const payload = renameKeysFromSDKRequestToRESTRequest({
797
+ id: _id,
798
+ title: options?.title,
799
+ externalId: options?.externalId
800
+ });
801
+ const reqOpts = copySeatingPlan(payload);
802
+ sideEffects?.onSiteCall?.();
803
+ try {
804
+ const result = await httpClient.request(reqOpts);
805
+ sideEffects?.onSuccess?.(result);
806
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
807
+ } catch (err) {
808
+ const transformedError = sdkTransformError(
809
+ err,
810
+ {
811
+ spreadPathsToArguments: {},
812
+ explicitPathsToArguments: {
813
+ id: "$[0]",
814
+ title: "$[1].title",
815
+ externalId: "$[1].externalId"
816
+ },
817
+ singleArgumentUnchanged: false
818
+ },
819
+ ["_id", "options"]
820
+ );
821
+ sideEffects?.onError?.(err);
822
+ throw transformedError;
823
+ }
824
+ }
825
+ function querySeatingPlan2(options) {
826
+ const { httpClient, sideEffects } = arguments[1];
827
+ return queryBuilder({
828
+ func: async (payload) => {
829
+ const reqOpts = querySeatingPlan({
830
+ ...payload,
831
+ ...options ?? {}
832
+ });
833
+ sideEffects?.onSiteCall?.();
834
+ try {
835
+ const result = await httpClient.request(reqOpts);
836
+ sideEffects?.onSuccess?.(result);
837
+ return result;
838
+ } catch (err) {
839
+ sideEffects?.onError?.(err);
840
+ throw err;
841
+ }
842
+ },
843
+ requestTransformer: (query) => {
844
+ const args = [query, options];
845
+ return renameKeysFromSDKRequestToRESTRequest({
846
+ ...args?.[1],
847
+ query: args?.[0]
848
+ });
849
+ },
850
+ responseTransformer: ({ data }) => {
851
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
852
+ transformPaths2(data, [])
853
+ );
854
+ return {
855
+ items: transformedData?.plans,
856
+ pagingMetadata: transformedData?.metadata
857
+ };
858
+ },
859
+ errorTransformer: (err) => {
860
+ const transformedError = sdkTransformError(err, {
861
+ spreadPathsToArguments: {},
862
+ explicitPathsToArguments: { query: "$[0]" },
863
+ singleArgumentUnchanged: false
864
+ });
865
+ throw transformedError;
866
+ },
867
+ pagingMethod: "CURSOR",
868
+ transformationPaths: {}
869
+ });
870
+ }
871
+ async function getSeatingPlan2(_id, options) {
872
+ const { httpClient, sideEffects } = arguments[2];
873
+ const payload = renameKeysFromSDKRequestToRESTRequest({
874
+ id: _id,
875
+ fieldset: options?.fieldset,
876
+ fieldsets: options?.fieldsets,
877
+ seatingPlanMask: options?.seatingPlanMask
878
+ });
879
+ const reqOpts = getSeatingPlan(payload);
880
+ sideEffects?.onSiteCall?.();
881
+ try {
882
+ const result = await httpClient.request(reqOpts);
883
+ sideEffects?.onSuccess?.(result);
884
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.plan;
885
+ } catch (err) {
886
+ const transformedError = sdkTransformError(
887
+ err,
888
+ {
889
+ spreadPathsToArguments: {},
890
+ explicitPathsToArguments: {
891
+ id: "$[0]",
892
+ fieldset: "$[1].fieldset",
893
+ fieldsets: "$[1].fieldsets",
894
+ seatingPlanMask: "$[1].seatingPlanMask"
895
+ },
896
+ singleArgumentUnchanged: false
897
+ },
898
+ ["_id", "options"]
899
+ );
900
+ sideEffects?.onError?.(err);
901
+ throw transformedError;
902
+ }
903
+ }
904
+ async function findSeatingPlan2(filter, options) {
905
+ const { httpClient, sideEffects } = arguments[2];
906
+ const payload = renameKeysFromSDKRequestToRESTRequest({
907
+ filter,
908
+ fieldset: options?.fieldset,
909
+ fieldsets: options?.fieldsets,
910
+ seatingPlanMask: options?.seatingPlanMask
911
+ });
912
+ const reqOpts = findSeatingPlan(payload);
913
+ sideEffects?.onSiteCall?.();
914
+ try {
915
+ const result = await httpClient.request(reqOpts);
916
+ sideEffects?.onSuccess?.(result);
917
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
918
+ } catch (err) {
919
+ const transformedError = sdkTransformError(
920
+ err,
921
+ {
922
+ spreadPathsToArguments: {},
923
+ explicitPathsToArguments: {
924
+ filter: "$[0]",
925
+ fieldset: "$[1].fieldset",
926
+ fieldsets: "$[1].fieldsets",
927
+ seatingPlanMask: "$[1].seatingPlanMask"
928
+ },
929
+ singleArgumentUnchanged: false
930
+ },
931
+ ["filter", "options"]
932
+ );
933
+ sideEffects?.onError?.(err);
934
+ throw transformedError;
935
+ }
936
+ }
937
+ async function deleteSeatingPlan2(_id) {
938
+ const { httpClient, sideEffects } = arguments[1];
939
+ const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
940
+ const reqOpts = deleteSeatingPlan(payload);
941
+ sideEffects?.onSiteCall?.();
942
+ try {
943
+ const result = await httpClient.request(reqOpts);
944
+ sideEffects?.onSuccess?.(result);
945
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
946
+ } catch (err) {
947
+ const transformedError = sdkTransformError(
948
+ err,
949
+ {
950
+ spreadPathsToArguments: {},
951
+ explicitPathsToArguments: { id: "$[0]" },
952
+ singleArgumentUnchanged: false
953
+ },
954
+ ["_id"]
955
+ );
956
+ sideEffects?.onError?.(err);
957
+ throw transformedError;
958
+ }
959
+ }
960
+ async function updateSeatingPlanThumbnail2(thumbnail) {
961
+ const { httpClient, sideEffects } = arguments[1];
962
+ const payload = renameKeysFromSDKRequestToRESTRequest({
963
+ thumbnail
964
+ });
965
+ const reqOpts = updateSeatingPlanThumbnail(payload);
966
+ sideEffects?.onSiteCall?.();
967
+ try {
968
+ const result = await httpClient.request(reqOpts);
969
+ sideEffects?.onSuccess?.(result);
970
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
971
+ } catch (err) {
972
+ const transformedError = sdkTransformError(
973
+ err,
974
+ {
975
+ spreadPathsToArguments: {},
976
+ explicitPathsToArguments: { thumbnail: "$[0]" },
977
+ singleArgumentUnchanged: false
978
+ },
979
+ ["thumbnail"]
980
+ );
981
+ sideEffects?.onError?.(err);
982
+ throw transformedError;
983
+ }
984
+ }
985
+ async function getSeatingPlanThumbnail2(_id) {
986
+ const { httpClient, sideEffects } = arguments[1];
987
+ const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
988
+ const reqOpts = getSeatingPlanThumbnail(payload);
989
+ sideEffects?.onSiteCall?.();
990
+ try {
991
+ const result = await httpClient.request(reqOpts);
992
+ sideEffects?.onSuccess?.(result);
993
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
994
+ } catch (err) {
995
+ const transformedError = sdkTransformError(
996
+ err,
997
+ {
998
+ spreadPathsToArguments: {},
999
+ explicitPathsToArguments: { id: "$[0]" },
1000
+ singleArgumentUnchanged: false
1001
+ },
1002
+ ["_id"]
1003
+ );
1004
+ sideEffects?.onError?.(err);
1005
+ throw transformedError;
1006
+ }
1007
+ }
1008
+ export {
1009
+ Fieldset,
1010
+ Icon,
1011
+ Numbering,
1012
+ PlaceTypeEnumType,
1013
+ Position,
1014
+ ShapeTypeEnumType,
1015
+ SortOrder,
1016
+ Type,
1017
+ WebhookIdentityType,
1018
+ copySeatingPlan2 as copySeatingPlan,
1019
+ createSeatingPlan2 as createSeatingPlan,
1020
+ deleteSeatingPlan2 as deleteSeatingPlan,
1021
+ findSeatingPlan2 as findSeatingPlan,
1022
+ getSeatingPlan2 as getSeatingPlan,
1023
+ getSeatingPlanThumbnail2 as getSeatingPlanThumbnail,
1024
+ querySeatingPlan2 as querySeatingPlan,
1025
+ updateSeatingPlan2 as updateSeatingPlan,
1026
+ updateSeatingPlanThumbnail2 as updateSeatingPlanThumbnail
1027
+ };
1028
+ //# sourceMappingURL=index.typings.mjs.map