@wix/auto_sdk_seatings_seating-reservation 1.0.6 → 1.0.7
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.
- package/build/cjs/index.d.ts +13 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{seating-v1-seating-reservation-seating-reservation.universal-Cx37fyPc.d.ts → index.typings.d.ts} +95 -1
- package/build/cjs/index.typings.js +527 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +13 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/{seating-v1-seating-reservation-seating-reservation.universal-Cx37fyPc.d.mts → index.typings.d.mts} +95 -1
- package/build/es/index.typings.mjs +490 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +13 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{seating-v1-seating-reservation-seating-reservation.universal-Cx37fyPc.d.ts → index.typings.d.ts} +95 -1
- package/build/internal/cjs/index.typings.js +527 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +13 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{seating-v1-seating-reservation-seating-reservation.universal-Cx37fyPc.d.mts → index.typings.d.mts} +95 -1
- package/build/internal/es/index.typings.mjs +490 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +3 -3
|
@@ -0,0 +1,527 @@
|
|
|
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
|
+
Icon: () => Icon,
|
|
24
|
+
Numbering: () => Numbering,
|
|
25
|
+
PlaceTypeEnumType: () => PlaceTypeEnumType,
|
|
26
|
+
Position: () => Position,
|
|
27
|
+
ShapeTypeEnumType: () => ShapeTypeEnumType,
|
|
28
|
+
SortOrder: () => SortOrder,
|
|
29
|
+
Type: () => Type,
|
|
30
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
31
|
+
createSeatingReservation: () => createSeatingReservation2,
|
|
32
|
+
deleteSeatingReservation: () => deleteSeatingReservation2,
|
|
33
|
+
getReservation: () => getReservation2,
|
|
34
|
+
getSeatingCategorySummary: () => getSeatingCategorySummary2,
|
|
35
|
+
getSeatingReservationSummary: () => getSeatingReservationSummary2,
|
|
36
|
+
querySeatingReservation: () => querySeatingReservation2
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
39
|
+
|
|
40
|
+
// src/seating-v1-seating-reservation-seating-reservation.universal.ts
|
|
41
|
+
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
42
|
+
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
43
|
+
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
44
|
+
|
|
45
|
+
// src/seating-v1-seating-reservation-seating-reservation.http.ts
|
|
46
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
47
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
48
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
49
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
50
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
51
|
+
function resolveComWixpressSeatingSeatingReservationServiceUrl(opts) {
|
|
52
|
+
const domainToMappings = {
|
|
53
|
+
_api_base_domain_: [
|
|
54
|
+
{
|
|
55
|
+
srcPath: "/seating-reservations",
|
|
56
|
+
destPath: ""
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
_: [
|
|
60
|
+
{
|
|
61
|
+
srcPath: "/_api/seating-reservations",
|
|
62
|
+
destPath: ""
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"api._base_domain_": [
|
|
66
|
+
{
|
|
67
|
+
srcPath: "/seating-reservations",
|
|
68
|
+
destPath: ""
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"editor.wixapps.net": [
|
|
72
|
+
{
|
|
73
|
+
srcPath: "/_api/seating-reservations",
|
|
74
|
+
destPath: ""
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"manage._base_domain_": [
|
|
78
|
+
{
|
|
79
|
+
srcPath: "/_api/seating-reservations",
|
|
80
|
+
destPath: ""
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"editor._base_domain_": [
|
|
84
|
+
{
|
|
85
|
+
srcPath: "/_api/seating-reservations",
|
|
86
|
+
destPath: ""
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"blocks._base_domain_": [
|
|
90
|
+
{
|
|
91
|
+
srcPath: "/_api/seating-reservations",
|
|
92
|
+
destPath: ""
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"create.editorx": [
|
|
96
|
+
{
|
|
97
|
+
srcPath: "/_api/seating-reservations",
|
|
98
|
+
destPath: ""
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"*.dev.wix-code.com": [
|
|
102
|
+
{
|
|
103
|
+
srcPath: "/_api/seating-reservations",
|
|
104
|
+
destPath: ""
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"www._base_domain_": [
|
|
108
|
+
{
|
|
109
|
+
srcPath: "/_api/seating-reservations",
|
|
110
|
+
destPath: ""
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
};
|
|
114
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
115
|
+
}
|
|
116
|
+
var PACKAGE_NAME = "@wix/auto_sdk_seatings_seating-reservation";
|
|
117
|
+
function createSeatingReservation(payload) {
|
|
118
|
+
function __createSeatingReservation({ host }) {
|
|
119
|
+
const metadata = {
|
|
120
|
+
entityFqdn: "wix.seating.v1.seating_reservation",
|
|
121
|
+
method: "POST",
|
|
122
|
+
methodFqn: "com.wixpress.seating.SeatingReservationService.CreateSeatingReservation",
|
|
123
|
+
packageName: PACKAGE_NAME,
|
|
124
|
+
url: resolveComWixpressSeatingSeatingReservationServiceUrl({
|
|
125
|
+
protoPath: "/v1/reservations",
|
|
126
|
+
data: payload,
|
|
127
|
+
host
|
|
128
|
+
}),
|
|
129
|
+
data: payload
|
|
130
|
+
};
|
|
131
|
+
return metadata;
|
|
132
|
+
}
|
|
133
|
+
return __createSeatingReservation;
|
|
134
|
+
}
|
|
135
|
+
function getReservation(payload) {
|
|
136
|
+
function __getReservation({ host }) {
|
|
137
|
+
const metadata = {
|
|
138
|
+
entityFqdn: "wix.seating.v1.seating_reservation",
|
|
139
|
+
method: "GET",
|
|
140
|
+
methodFqn: "com.wixpress.seating.SeatingReservationService.GetReservation",
|
|
141
|
+
packageName: PACKAGE_NAME,
|
|
142
|
+
url: resolveComWixpressSeatingSeatingReservationServiceUrl({
|
|
143
|
+
protoPath: "/v1/reservations/{id}",
|
|
144
|
+
data: payload,
|
|
145
|
+
host
|
|
146
|
+
}),
|
|
147
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
148
|
+
};
|
|
149
|
+
return metadata;
|
|
150
|
+
}
|
|
151
|
+
return __getReservation;
|
|
152
|
+
}
|
|
153
|
+
function querySeatingReservation(payload) {
|
|
154
|
+
function __querySeatingReservation({ host }) {
|
|
155
|
+
const metadata = {
|
|
156
|
+
entityFqdn: "wix.seating.v1.seating_reservation",
|
|
157
|
+
method: "POST",
|
|
158
|
+
methodFqn: "com.wixpress.seating.SeatingReservationService.QuerySeatingReservation",
|
|
159
|
+
packageName: PACKAGE_NAME,
|
|
160
|
+
url: resolveComWixpressSeatingSeatingReservationServiceUrl({
|
|
161
|
+
protoPath: "/v1/reservations/query",
|
|
162
|
+
data: payload,
|
|
163
|
+
host
|
|
164
|
+
}),
|
|
165
|
+
data: payload
|
|
166
|
+
};
|
|
167
|
+
return metadata;
|
|
168
|
+
}
|
|
169
|
+
return __querySeatingReservation;
|
|
170
|
+
}
|
|
171
|
+
function deleteSeatingReservation(payload) {
|
|
172
|
+
function __deleteSeatingReservation({ host }) {
|
|
173
|
+
const metadata = {
|
|
174
|
+
entityFqdn: "wix.seating.v1.seating_reservation",
|
|
175
|
+
method: "DELETE",
|
|
176
|
+
methodFqn: "com.wixpress.seating.SeatingReservationService.DeleteSeatingReservation",
|
|
177
|
+
packageName: PACKAGE_NAME,
|
|
178
|
+
url: resolveComWixpressSeatingSeatingReservationServiceUrl({
|
|
179
|
+
protoPath: "/v1/reservations/{id}",
|
|
180
|
+
data: payload,
|
|
181
|
+
host
|
|
182
|
+
}),
|
|
183
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
184
|
+
};
|
|
185
|
+
return metadata;
|
|
186
|
+
}
|
|
187
|
+
return __deleteSeatingReservation;
|
|
188
|
+
}
|
|
189
|
+
function getSeatingCategorySummary(payload) {
|
|
190
|
+
function __getSeatingCategorySummary({ host }) {
|
|
191
|
+
const metadata = {
|
|
192
|
+
entityFqdn: "wix.seating.v1.seating_reservation",
|
|
193
|
+
method: "GET",
|
|
194
|
+
methodFqn: "com.wixpress.seating.SeatingReservationService.GetSeatingCategorySummary",
|
|
195
|
+
packageName: PACKAGE_NAME,
|
|
196
|
+
url: resolveComWixpressSeatingSeatingReservationServiceUrl({
|
|
197
|
+
protoPath: "/v1/reservations/seating-category-summary",
|
|
198
|
+
data: payload,
|
|
199
|
+
host
|
|
200
|
+
}),
|
|
201
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
202
|
+
};
|
|
203
|
+
return metadata;
|
|
204
|
+
}
|
|
205
|
+
return __getSeatingCategorySummary;
|
|
206
|
+
}
|
|
207
|
+
function getSeatingReservationSummary(payload) {
|
|
208
|
+
function __getSeatingReservationSummary({ host }) {
|
|
209
|
+
const metadata = {
|
|
210
|
+
entityFqdn: "wix.seating.v1.seating_reservation",
|
|
211
|
+
method: "GET",
|
|
212
|
+
methodFqn: "com.wixpress.seating.SeatingReservationService.GetSeatingReservationSummary",
|
|
213
|
+
packageName: PACKAGE_NAME,
|
|
214
|
+
url: resolveComWixpressSeatingSeatingReservationServiceUrl({
|
|
215
|
+
protoPath: "/v1/reservations/seating-reservation-summary/{externalId}",
|
|
216
|
+
data: payload,
|
|
217
|
+
host
|
|
218
|
+
}),
|
|
219
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
220
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
221
|
+
{
|
|
222
|
+
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
223
|
+
paths: [{ path: "plan.createdDate" }, { path: "plan.updatedDate" }]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
227
|
+
paths: [
|
|
228
|
+
{ path: "plan.sections.elements.uiProperties.x" },
|
|
229
|
+
{ path: "plan.sections.elements.uiProperties.y" },
|
|
230
|
+
{ path: "plan.sections.elements.uiProperties.width" },
|
|
231
|
+
{ path: "plan.sections.elements.uiProperties.height" },
|
|
232
|
+
{ path: "plan.sections.elements.uiProperties.rotationAngle" },
|
|
233
|
+
{
|
|
234
|
+
path: "plan.sections.elements.multiRowProperties.curveAngleTo"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
path: "plan.sections.elements.multiRowProperties.curveAngleFrom"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
path: "plan.sections.elements.multiRowProperties.rows.uiProperties.relativeX"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
path: "plan.sections.elements.multiRowProperties.rows.uiProperties.width"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleFrom"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
path: "plan.sections.elements.multiRowProperties.rows.uiProperties.curveAngleTo"
|
|
250
|
+
},
|
|
251
|
+
{ path: "plan.elementGroups.uiProperties.x" },
|
|
252
|
+
{ path: "plan.elementGroups.uiProperties.y" },
|
|
253
|
+
{ path: "plan.elementGroups.uiProperties.width" },
|
|
254
|
+
{ path: "plan.elementGroups.uiProperties.height" },
|
|
255
|
+
{ path: "plan.elementGroups.uiProperties.rotationAngle" }
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
])
|
|
259
|
+
};
|
|
260
|
+
return metadata;
|
|
261
|
+
}
|
|
262
|
+
return __getSeatingReservationSummary;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// src/seating-v1-seating-reservation-seating-reservation.universal.ts
|
|
266
|
+
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
267
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
268
|
+
SortOrder2["ASC"] = "ASC";
|
|
269
|
+
SortOrder2["DESC"] = "DESC";
|
|
270
|
+
return SortOrder2;
|
|
271
|
+
})(SortOrder || {});
|
|
272
|
+
var Type = /* @__PURE__ */ ((Type2) => {
|
|
273
|
+
Type2["AREA"] = "AREA";
|
|
274
|
+
Type2["ROW"] = "ROW";
|
|
275
|
+
Type2["MULTI_ROW"] = "MULTI_ROW";
|
|
276
|
+
Type2["TABLE"] = "TABLE";
|
|
277
|
+
Type2["ROUND_TABLE"] = "ROUND_TABLE";
|
|
278
|
+
Type2["SHAPE"] = "SHAPE";
|
|
279
|
+
return Type2;
|
|
280
|
+
})(Type || {});
|
|
281
|
+
var PlaceTypeEnumType = /* @__PURE__ */ ((PlaceTypeEnumType2) => {
|
|
282
|
+
PlaceTypeEnumType2["UNKNOWN_PROPERTY"] = "UNKNOWN_PROPERTY";
|
|
283
|
+
PlaceTypeEnumType2["STANDARD"] = "STANDARD";
|
|
284
|
+
PlaceTypeEnumType2["WHEELCHAIR"] = "WHEELCHAIR";
|
|
285
|
+
PlaceTypeEnumType2["ACCESSIBLE"] = "ACCESSIBLE";
|
|
286
|
+
PlaceTypeEnumType2["COMPANION"] = "COMPANION";
|
|
287
|
+
PlaceTypeEnumType2["OBSTRUCTED"] = "OBSTRUCTED";
|
|
288
|
+
PlaceTypeEnumType2["DISCOUNT"] = "DISCOUNT";
|
|
289
|
+
return PlaceTypeEnumType2;
|
|
290
|
+
})(PlaceTypeEnumType || {});
|
|
291
|
+
var ShapeTypeEnumType = /* @__PURE__ */ ((ShapeTypeEnumType2) => {
|
|
292
|
+
ShapeTypeEnumType2["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
293
|
+
ShapeTypeEnumType2["TEXT"] = "TEXT";
|
|
294
|
+
ShapeTypeEnumType2["RECTANGLE"] = "RECTANGLE";
|
|
295
|
+
ShapeTypeEnumType2["ELLIPSE"] = "ELLIPSE";
|
|
296
|
+
ShapeTypeEnumType2["LINE"] = "LINE";
|
|
297
|
+
ShapeTypeEnumType2["ICON"] = "ICON";
|
|
298
|
+
ShapeTypeEnumType2["IMAGE"] = "IMAGE";
|
|
299
|
+
return ShapeTypeEnumType2;
|
|
300
|
+
})(ShapeTypeEnumType || {});
|
|
301
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
302
|
+
Position2["UNKNOWN_POSITION"] = "UNKNOWN_POSITION";
|
|
303
|
+
Position2["LEFT"] = "LEFT";
|
|
304
|
+
Position2["RIGHT"] = "RIGHT";
|
|
305
|
+
Position2["BOTH"] = "BOTH";
|
|
306
|
+
Position2["NONE"] = "NONE";
|
|
307
|
+
return Position2;
|
|
308
|
+
})(Position || {});
|
|
309
|
+
var Icon = /* @__PURE__ */ ((Icon2) => {
|
|
310
|
+
Icon2["UNKNOWN_ICON"] = "UNKNOWN_ICON";
|
|
311
|
+
Icon2["ENTER"] = "ENTER";
|
|
312
|
+
Icon2["EXIT"] = "EXIT";
|
|
313
|
+
Icon2["DRINKS"] = "DRINKS";
|
|
314
|
+
Icon2["WC"] = "WC";
|
|
315
|
+
Icon2["WC_MEN"] = "WC_MEN";
|
|
316
|
+
Icon2["WC_WOMEN"] = "WC_WOMEN";
|
|
317
|
+
Icon2["FOOD"] = "FOOD";
|
|
318
|
+
Icon2["STAIRS"] = "STAIRS";
|
|
319
|
+
Icon2["ELEVATOR"] = "ELEVATOR";
|
|
320
|
+
Icon2["SMOKING"] = "SMOKING";
|
|
321
|
+
Icon2["CHECKROOM"] = "CHECKROOM";
|
|
322
|
+
Icon2["STAGE"] = "STAGE";
|
|
323
|
+
return Icon2;
|
|
324
|
+
})(Icon || {});
|
|
325
|
+
var Numbering = /* @__PURE__ */ ((Numbering2) => {
|
|
326
|
+
Numbering2["UNKNOWN_NUMBERING"] = "UNKNOWN_NUMBERING";
|
|
327
|
+
Numbering2["NUMERIC"] = "NUMERIC";
|
|
328
|
+
Numbering2["ODD_EVEN"] = "ODD_EVEN";
|
|
329
|
+
Numbering2["ALPHABETICAL"] = "ALPHABETICAL";
|
|
330
|
+
return Numbering2;
|
|
331
|
+
})(Numbering || {});
|
|
332
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
333
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
334
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
335
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
336
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
337
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
338
|
+
return WebhookIdentityType2;
|
|
339
|
+
})(WebhookIdentityType || {});
|
|
340
|
+
async function createSeatingReservation2(options) {
|
|
341
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
342
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
343
|
+
reservation: options?.reservation
|
|
344
|
+
});
|
|
345
|
+
const reqOpts = createSeatingReservation(payload);
|
|
346
|
+
sideEffects?.onSiteCall?.();
|
|
347
|
+
try {
|
|
348
|
+
const result = await httpClient.request(reqOpts);
|
|
349
|
+
sideEffects?.onSuccess?.(result);
|
|
350
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.reservation;
|
|
351
|
+
} catch (err) {
|
|
352
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
353
|
+
err,
|
|
354
|
+
{
|
|
355
|
+
spreadPathsToArguments: {},
|
|
356
|
+
explicitPathsToArguments: { reservation: "$[0].reservation" },
|
|
357
|
+
singleArgumentUnchanged: false
|
|
358
|
+
},
|
|
359
|
+
["options"]
|
|
360
|
+
);
|
|
361
|
+
sideEffects?.onError?.(err);
|
|
362
|
+
throw transformedError;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
async function getReservation2(_id) {
|
|
366
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
367
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
368
|
+
const reqOpts = getReservation(payload);
|
|
369
|
+
sideEffects?.onSiteCall?.();
|
|
370
|
+
try {
|
|
371
|
+
const result = await httpClient.request(reqOpts);
|
|
372
|
+
sideEffects?.onSuccess?.(result);
|
|
373
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.reservation;
|
|
374
|
+
} catch (err) {
|
|
375
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
376
|
+
err,
|
|
377
|
+
{
|
|
378
|
+
spreadPathsToArguments: {},
|
|
379
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
380
|
+
singleArgumentUnchanged: false
|
|
381
|
+
},
|
|
382
|
+
["_id"]
|
|
383
|
+
);
|
|
384
|
+
sideEffects?.onError?.(err);
|
|
385
|
+
throw transformedError;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function querySeatingReservation2() {
|
|
389
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
390
|
+
return (0, import_query_builder.queryBuilder)({
|
|
391
|
+
func: async (payload) => {
|
|
392
|
+
const reqOpts = querySeatingReservation(
|
|
393
|
+
payload
|
|
394
|
+
);
|
|
395
|
+
sideEffects?.onSiteCall?.();
|
|
396
|
+
try {
|
|
397
|
+
const result = await httpClient.request(reqOpts);
|
|
398
|
+
sideEffects?.onSuccess?.(result);
|
|
399
|
+
return result;
|
|
400
|
+
} catch (err) {
|
|
401
|
+
sideEffects?.onError?.(err);
|
|
402
|
+
throw err;
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
requestTransformer: (query) => {
|
|
406
|
+
const args = [query, {}];
|
|
407
|
+
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
408
|
+
...args?.[1],
|
|
409
|
+
query: args?.[0]
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
responseTransformer: ({
|
|
413
|
+
data
|
|
414
|
+
}) => {
|
|
415
|
+
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
416
|
+
(0, import_transform_paths2.transformPaths)(data, [])
|
|
417
|
+
);
|
|
418
|
+
return {
|
|
419
|
+
items: transformedData?.reservations,
|
|
420
|
+
pagingMetadata: transformedData?.metadata
|
|
421
|
+
};
|
|
422
|
+
},
|
|
423
|
+
errorTransformer: (err) => {
|
|
424
|
+
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
425
|
+
spreadPathsToArguments: {},
|
|
426
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
427
|
+
singleArgumentUnchanged: false
|
|
428
|
+
});
|
|
429
|
+
throw transformedError;
|
|
430
|
+
},
|
|
431
|
+
pagingMethod: "CURSOR",
|
|
432
|
+
transformationPaths: {}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
async function deleteSeatingReservation2(_id) {
|
|
436
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
437
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
438
|
+
const reqOpts = deleteSeatingReservation(payload);
|
|
439
|
+
sideEffects?.onSiteCall?.();
|
|
440
|
+
try {
|
|
441
|
+
const result = await httpClient.request(reqOpts);
|
|
442
|
+
sideEffects?.onSuccess?.(result);
|
|
443
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
444
|
+
} catch (err) {
|
|
445
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
446
|
+
err,
|
|
447
|
+
{
|
|
448
|
+
spreadPathsToArguments: {},
|
|
449
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
450
|
+
singleArgumentUnchanged: false
|
|
451
|
+
},
|
|
452
|
+
["_id"]
|
|
453
|
+
);
|
|
454
|
+
sideEffects?.onError?.(err);
|
|
455
|
+
throw transformedError;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
async function getSeatingCategorySummary2(options) {
|
|
459
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
460
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
461
|
+
externalId: options?.externalId
|
|
462
|
+
});
|
|
463
|
+
const reqOpts = getSeatingCategorySummary(payload);
|
|
464
|
+
sideEffects?.onSiteCall?.();
|
|
465
|
+
try {
|
|
466
|
+
const result = await httpClient.request(reqOpts);
|
|
467
|
+
sideEffects?.onSuccess?.(result);
|
|
468
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
469
|
+
} catch (err) {
|
|
470
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
471
|
+
err,
|
|
472
|
+
{
|
|
473
|
+
spreadPathsToArguments: {},
|
|
474
|
+
explicitPathsToArguments: { externalId: "$[0].externalId" },
|
|
475
|
+
singleArgumentUnchanged: false
|
|
476
|
+
},
|
|
477
|
+
["options"]
|
|
478
|
+
);
|
|
479
|
+
sideEffects?.onError?.(err);
|
|
480
|
+
throw transformedError;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
async function getSeatingReservationSummary2(externalId) {
|
|
484
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
485
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
486
|
+
externalId
|
|
487
|
+
});
|
|
488
|
+
const reqOpts = getSeatingReservationSummary(
|
|
489
|
+
payload
|
|
490
|
+
);
|
|
491
|
+
sideEffects?.onSiteCall?.();
|
|
492
|
+
try {
|
|
493
|
+
const result = await httpClient.request(reqOpts);
|
|
494
|
+
sideEffects?.onSuccess?.(result);
|
|
495
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
496
|
+
} catch (err) {
|
|
497
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
498
|
+
err,
|
|
499
|
+
{
|
|
500
|
+
spreadPathsToArguments: {},
|
|
501
|
+
explicitPathsToArguments: { externalId: "$[0]" },
|
|
502
|
+
singleArgumentUnchanged: false
|
|
503
|
+
},
|
|
504
|
+
["externalId"]
|
|
505
|
+
);
|
|
506
|
+
sideEffects?.onError?.(err);
|
|
507
|
+
throw transformedError;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
511
|
+
0 && (module.exports = {
|
|
512
|
+
Icon,
|
|
513
|
+
Numbering,
|
|
514
|
+
PlaceTypeEnumType,
|
|
515
|
+
Position,
|
|
516
|
+
ShapeTypeEnumType,
|
|
517
|
+
SortOrder,
|
|
518
|
+
Type,
|
|
519
|
+
WebhookIdentityType,
|
|
520
|
+
createSeatingReservation,
|
|
521
|
+
deleteSeatingReservation,
|
|
522
|
+
getReservation,
|
|
523
|
+
getSeatingCategorySummary,
|
|
524
|
+
getSeatingReservationSummary,
|
|
525
|
+
querySeatingReservation
|
|
526
|
+
});
|
|
527
|
+
//# sourceMappingURL=index.typings.js.map
|