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