@wix/table-reservations 1.0.0

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.
Files changed (80) hide show
  1. package/build/cjs/index.d.ts +2 -0
  2. package/build/cjs/index.js +25 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +2 -0
  5. package/build/cjs/index.typings.js +25 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +2 -0
  8. package/build/cjs/meta.js +25 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/table-reservations-v1-reservation-location.http.d.ts +21 -0
  11. package/build/cjs/src/table-reservations-v1-reservation-location.http.js +219 -0
  12. package/build/cjs/src/table-reservations-v1-reservation-location.http.js.map +1 -0
  13. package/build/cjs/src/table-reservations-v1-reservation-location.meta.d.ts +20 -0
  14. package/build/cjs/src/table-reservations-v1-reservation-location.meta.js +102 -0
  15. package/build/cjs/src/table-reservations-v1-reservation-location.meta.js.map +1 -0
  16. package/build/cjs/src/table-reservations-v1-reservation-location.public.d.ts +11 -0
  17. package/build/cjs/src/table-reservations-v1-reservation-location.public.js +41 -0
  18. package/build/cjs/src/table-reservations-v1-reservation-location.public.js.map +1 -0
  19. package/build/cjs/src/table-reservations-v1-reservation-location.types.d.ts +1465 -0
  20. package/build/cjs/src/table-reservations-v1-reservation-location.types.js +142 -0
  21. package/build/cjs/src/table-reservations-v1-reservation-location.types.js.map +1 -0
  22. package/build/cjs/src/table-reservations-v1-reservation-location.universal.d.ts +1455 -0
  23. package/build/cjs/src/table-reservations-v1-reservation-location.universal.js +488 -0
  24. package/build/cjs/src/table-reservations-v1-reservation-location.universal.js.map +1 -0
  25. package/build/cjs/src/table-reservations-v1-reservation.http.d.ts +36 -0
  26. package/build/cjs/src/table-reservations-v1-reservation.http.js +346 -0
  27. package/build/cjs/src/table-reservations-v1-reservation.http.js.map +1 -0
  28. package/build/cjs/src/table-reservations-v1-reservation.meta.d.ts +28 -0
  29. package/build/cjs/src/table-reservations-v1-reservation.meta.js +176 -0
  30. package/build/cjs/src/table-reservations-v1-reservation.meta.js.map +1 -0
  31. package/build/cjs/src/table-reservations-v1-reservation.public.d.ts +15 -0
  32. package/build/cjs/src/table-reservations-v1-reservation.public.js +61 -0
  33. package/build/cjs/src/table-reservations-v1-reservation.public.js.map +1 -0
  34. package/build/cjs/src/table-reservations-v1-reservation.types.d.ts +477 -0
  35. package/build/cjs/src/table-reservations-v1-reservation.types.js +58 -0
  36. package/build/cjs/src/table-reservations-v1-reservation.types.js.map +1 -0
  37. package/build/cjs/src/table-reservations-v1-reservation.universal.d.ts +699 -0
  38. package/build/cjs/src/table-reservations-v1-reservation.universal.js +607 -0
  39. package/build/cjs/src/table-reservations-v1-reservation.universal.js.map +1 -0
  40. package/build/es/index.d.ts +2 -0
  41. package/build/es/index.js +3 -0
  42. package/build/es/index.js.map +1 -0
  43. package/build/es/index.typings.d.ts +2 -0
  44. package/build/es/index.typings.js +3 -0
  45. package/build/es/index.typings.js.map +1 -0
  46. package/build/es/meta.d.ts +2 -0
  47. package/build/es/meta.js +3 -0
  48. package/build/es/meta.js.map +1 -0
  49. package/build/es/src/table-reservations-v1-reservation-location.http.d.ts +21 -0
  50. package/build/es/src/table-reservations-v1-reservation-location.http.js +212 -0
  51. package/build/es/src/table-reservations-v1-reservation-location.http.js.map +1 -0
  52. package/build/es/src/table-reservations-v1-reservation-location.meta.d.ts +20 -0
  53. package/build/es/src/table-reservations-v1-reservation-location.meta.js +76 -0
  54. package/build/es/src/table-reservations-v1-reservation-location.meta.js.map +1 -0
  55. package/build/es/src/table-reservations-v1-reservation-location.public.d.ts +11 -0
  56. package/build/es/src/table-reservations-v1-reservation-location.public.js +24 -0
  57. package/build/es/src/table-reservations-v1-reservation-location.public.js.map +1 -0
  58. package/build/es/src/table-reservations-v1-reservation-location.types.d.ts +1465 -0
  59. package/build/es/src/table-reservations-v1-reservation-location.types.js +139 -0
  60. package/build/es/src/table-reservations-v1-reservation-location.types.js.map +1 -0
  61. package/build/es/src/table-reservations-v1-reservation-location.universal.d.ts +1455 -0
  62. package/build/es/src/table-reservations-v1-reservation-location.universal.js +462 -0
  63. package/build/es/src/table-reservations-v1-reservation-location.universal.js.map +1 -0
  64. package/build/es/src/table-reservations-v1-reservation.http.d.ts +36 -0
  65. package/build/es/src/table-reservations-v1-reservation.http.js +335 -0
  66. package/build/es/src/table-reservations-v1-reservation.http.js.map +1 -0
  67. package/build/es/src/table-reservations-v1-reservation.meta.d.ts +28 -0
  68. package/build/es/src/table-reservations-v1-reservation.meta.js +146 -0
  69. package/build/es/src/table-reservations-v1-reservation.meta.js.map +1 -0
  70. package/build/es/src/table-reservations-v1-reservation.public.d.ts +15 -0
  71. package/build/es/src/table-reservations-v1-reservation.public.js +44 -0
  72. package/build/es/src/table-reservations-v1-reservation.public.js.map +1 -0
  73. package/build/es/src/table-reservations-v1-reservation.types.d.ts +477 -0
  74. package/build/es/src/table-reservations-v1-reservation.types.js +55 -0
  75. package/build/es/src/table-reservations-v1-reservation.types.js.map +1 -0
  76. package/build/es/src/table-reservations-v1-reservation.universal.d.ts +699 -0
  77. package/build/es/src/table-reservations-v1-reservation.universal.js +577 -0
  78. package/build/es/src/table-reservations-v1-reservation.universal.js.map +1 -0
  79. package/meta/package.json +6 -0
  80. package/package.json +38 -0
@@ -0,0 +1,462 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { serializer, transformError, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
11
+ import * as ambassadorWixTableReservationsV1ReservationLocation from './table-reservations-v1-reservation-location.http';
12
+ // @ts-ignore
13
+ import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
14
+ let __verbose = false;
15
+ function __log(...args) {
16
+ __verbose && console.log(...args);
17
+ }
18
+ function __inspect(obj) {
19
+ return obj;
20
+ }
21
+ export const __debug = {
22
+ verboseLogging: {
23
+ on: () => (__verbose = true),
24
+ off: () => (__verbose = false),
25
+ },
26
+ };
27
+ const _toVeloEntity = '$';
28
+ const _fromVeloEntity = '$';
29
+ /** Enumerates the days of the week. */
30
+ export var DayOfWeek;
31
+ (function (DayOfWeek) {
32
+ DayOfWeek["MONDAY"] = "MONDAY";
33
+ DayOfWeek["TUESDAY"] = "TUESDAY";
34
+ DayOfWeek["WEDNESDAY"] = "WEDNESDAY";
35
+ DayOfWeek["THURSDAY"] = "THURSDAY";
36
+ DayOfWeek["FRIDAY"] = "FRIDAY";
37
+ DayOfWeek["SATURDAY"] = "SATURDAY";
38
+ DayOfWeek["SUNDAY"] = "SUNDAY";
39
+ })(DayOfWeek || (DayOfWeek = {}));
40
+ export var Unit;
41
+ (function (Unit) {
42
+ Unit["UNKNOWN"] = "UNKNOWN";
43
+ Unit["MINUTES"] = "MINUTES";
44
+ Unit["HOURS"] = "HOURS";
45
+ Unit["DAYS"] = "DAYS";
46
+ })(Unit || (Unit = {}));
47
+ /** Type of the field. */
48
+ export var FieldType;
49
+ (function (FieldType) {
50
+ FieldType["UNKNOWN"] = "UNKNOWN";
51
+ FieldType["TABLE"] = "TABLE";
52
+ FieldType["START_DATE"] = "START_DATE";
53
+ FieldType["END_DATE"] = "END_DATE";
54
+ FieldType["CREATED_DATE"] = "CREATED_DATE";
55
+ FieldType["UPDATED_DATE"] = "UPDATED_DATE";
56
+ FieldType["PARTY_SIZE"] = "PARTY_SIZE";
57
+ FieldType["FIRST_NAME"] = "FIRST_NAME";
58
+ FieldType["LAST_NAME"] = "LAST_NAME";
59
+ FieldType["EMAIL"] = "EMAIL";
60
+ FieldType["PHONE"] = "PHONE";
61
+ FieldType["ADDITIONAL_INFO"] = "ADDITIONAL_INFO";
62
+ FieldType["TEAM_MESSAGE"] = "TEAM_MESSAGE";
63
+ FieldType["CUSTOM_FIELD"] = "CUSTOM_FIELD";
64
+ FieldType["STATUS"] = "STATUS";
65
+ })(FieldType || (FieldType = {}));
66
+ export var Set;
67
+ (function (Set) {
68
+ Set["PUBLIC"] = "PUBLIC";
69
+ Set["FULL"] = "FULL";
70
+ })(Set || (Set = {}));
71
+ export var SortOrder;
72
+ (function (SortOrder) {
73
+ SortOrder["ASC"] = "ASC";
74
+ SortOrder["DESC"] = "DESC";
75
+ })(SortOrder || (SortOrder = {}));
76
+ export var Mode;
77
+ (function (Mode) {
78
+ /** DRY RUN. */
79
+ Mode["UNDEFINED"] = "UNDEFINED";
80
+ Mode["DRY_RUN"] = "DRY_RUN";
81
+ Mode["MIGRATE"] = "MIGRATE";
82
+ Mode["FORCE_MIGRATE"] = "FORCE_MIGRATE";
83
+ })(Mode || (Mode = {}));
84
+ export var State;
85
+ (function (State) {
86
+ State["UNKNOWN"] = "UNKNOWN";
87
+ State["ENABLED"] = "ENABLED";
88
+ State["DISABLED"] = "DISABLED";
89
+ State["PENDING"] = "PENDING";
90
+ State["DEMO"] = "DEMO";
91
+ })(State || (State = {}));
92
+ export var SiteCreatedContext;
93
+ (function (SiteCreatedContext) {
94
+ /** A valid option, we don't expose all reasons why site might be created. */
95
+ SiteCreatedContext["OTHER"] = "OTHER";
96
+ /** A meta site was created from template. */
97
+ SiteCreatedContext["FROM_TEMPLATE"] = "FROM_TEMPLATE";
98
+ /** A meta site was created by copying of the transfferred meta site. */
99
+ SiteCreatedContext["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
100
+ /** A copy of existing meta site. */
101
+ SiteCreatedContext["DUPLICATE"] = "DUPLICATE";
102
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
103
+ SiteCreatedContext["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
104
+ /** deprecated A meta site was created for Flash editor. */
105
+ SiteCreatedContext["FLASH"] = "FLASH";
106
+ })(SiteCreatedContext || (SiteCreatedContext = {}));
107
+ export var Namespace;
108
+ (function (Namespace) {
109
+ Namespace["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
110
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
111
+ Namespace["WIX"] = "WIX";
112
+ /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
113
+ Namespace["SHOUT_OUT"] = "SHOUT_OUT";
114
+ /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
115
+ Namespace["ALBUMS"] = "ALBUMS";
116
+ /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
117
+ Namespace["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
118
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
119
+ Namespace["HOTELS"] = "HOTELS";
120
+ /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
121
+ Namespace["CLUBS"] = "CLUBS";
122
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
123
+ Namespace["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
124
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
125
+ Namespace["DEV_SITE"] = "DEV_SITE";
126
+ /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
127
+ Namespace["LOGOS"] = "LOGOS";
128
+ /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
129
+ Namespace["VIDEO_MAKER"] = "VIDEO_MAKER";
130
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
131
+ Namespace["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
132
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
133
+ Namespace["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
134
+ /**
135
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
136
+ *
137
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
138
+ */
139
+ Namespace["HTML_DRAFT"] = "HTML_DRAFT";
140
+ /**
141
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
142
+ * Will be accessible from Site List and will not have a website app.
143
+ * Once the user attaches a site, the site will become a regular wixsite.
144
+ */
145
+ Namespace["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
146
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
147
+ Namespace["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
148
+ /** It is to be used in the Business First efforts. */
149
+ Namespace["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
150
+ /** Bookings business flow with no site. */
151
+ Namespace["ANYWHERE"] = "ANYWHERE";
152
+ /** Namespace for Headless Backoffice with no editor */
153
+ Namespace["HEADLESS"] = "HEADLESS";
154
+ /**
155
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
156
+ * The site will be used for account level CSM feature for enterprise
157
+ */
158
+ Namespace["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
159
+ })(Namespace || (Namespace = {}));
160
+ export var DeleteStatus;
161
+ (function (DeleteStatus) {
162
+ DeleteStatus["UNKNOWN"] = "UNKNOWN";
163
+ DeleteStatus["TRASH"] = "TRASH";
164
+ DeleteStatus["DELETED"] = "DELETED";
165
+ DeleteStatus["PENDING_PURGE"] = "PENDING_PURGE";
166
+ })(DeleteStatus || (DeleteStatus = {}));
167
+ const _configuration = { reservationForm: '_reservationForm' };
168
+ const _getReservationLocationRequest = {};
169
+ const _getReservationLocationResponse = {
170
+ reservationLocation: '_reservationLocation',
171
+ };
172
+ const _listReservationLocationsRequest = {};
173
+ const _listReservationLocationsResponse = {
174
+ reservationLocations: '_reservationLocation',
175
+ };
176
+ const _location = { address: 'wix.common.Address' };
177
+ const _privacyPolicy = { url: 'wix.common.PageUrlV2' };
178
+ const _queryReservationLocationsRequest = {};
179
+ const _queryReservationLocationsResponse = {
180
+ reservationLocations: '_reservationLocation',
181
+ };
182
+ const _reservationForm = {
183
+ termsAndConditions: '_termsAndConditions',
184
+ privacyPolicy: '_privacyPolicy',
185
+ };
186
+ const _reservationLocation = {
187
+ location: '_location',
188
+ configuration: '_configuration',
189
+ };
190
+ const _termsAndConditions = { url: 'wix.common.PageUrlV2' };
191
+ const _updateReservationLocationRequest = {
192
+ reservationLocation: '_reservationLocation',
193
+ };
194
+ const _updateReservationLocationResponse = {
195
+ reservationLocation: '_reservationLocation',
196
+ };
197
+ /**
198
+ * Retrieves a reservation location by ID.
199
+ * @param reservationLocationId - ID of the ReservationLocation to retrieve.
200
+ * @public
201
+ * @documentationMaturity preview
202
+ * @requiredField reservationLocationId
203
+ * @applicableIdentity MEMBER
204
+ * @applicableIdentity VISITOR
205
+ */
206
+ export function getReservationLocation(reservationLocationId, options) {
207
+ var _a, _b, _c;
208
+ return __awaiter(this, arguments, void 0, function* () {
209
+ const requestTransformation = {
210
+ reservationLocationId: '$[0]',
211
+ fieldsets: '$[1].fieldsets',
212
+ };
213
+ const responseTransformation = '$';
214
+ // @ts-ignore
215
+ const { httpClient, sideEffects } = arguments[2];
216
+ const { toAmbassadorRequest } = serializer({
217
+ rootSchema: _getReservationLocationRequest,
218
+ depSchemas: {},
219
+ fqdnTransformation: {
220
+ paths: [],
221
+ transformation: _fromVeloEntity,
222
+ },
223
+ customTransformation: requestTransformation,
224
+ });
225
+ const { fromJSON } = serializer({
226
+ rootSchema: _getReservationLocationResponse,
227
+ depSchemas: {
228
+ _configuration,
229
+ _location,
230
+ _privacyPolicy,
231
+ _reservationForm,
232
+ _reservationLocation,
233
+ _termsAndConditions,
234
+ },
235
+ fqdnTransformation: {
236
+ paths: [...['reservationLocation']],
237
+ transformation: _toVeloEntity,
238
+ },
239
+ customTransformation: responseTransformation,
240
+ });
241
+ const payload = toAmbassadorRequest([reservationLocationId, options]);
242
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.getReservationLocation(payload);
243
+ __log(`"GetReservationLocation" sending request with: ${__inspect(reqOpts)}`);
244
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
245
+ try {
246
+ const result = yield httpClient.request(reqOpts);
247
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
248
+ return fromJSON(result.data);
249
+ }
250
+ catch (err) {
251
+ const transformedError = transformError(err, requestTransformation, [
252
+ 'reservationLocationId',
253
+ 'options',
254
+ ]);
255
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
256
+ throw transformedError;
257
+ }
258
+ });
259
+ }
260
+ /**
261
+ * Updates a reservation location. Supports partial updates.
262
+ *
263
+ * Each time the reservation location is updated, revision increments by 1. The existing revision must be included when updating the reservation location. This ensures you're working with the latest reservation location information, and it prevents unintended overwrites.
264
+ *
265
+ * You cannot use this endpoint to change a reservation location's `location` object. Attempting to do so will cause the server to return an application error.
266
+ * @param _id - Reservation location ID.
267
+ * @public
268
+ * @documentationMaturity preview
269
+ * @requiredField _id
270
+ * @requiredField reservationLocation
271
+ * @requiredField reservationLocation.revision
272
+ */
273
+ export function updateReservationLocation(_id, reservationLocation) {
274
+ var _a, _b, _c;
275
+ return __awaiter(this, arguments, void 0, function* () {
276
+ const requestTransformation = {
277
+ reservationLocation: { '*': '$[1]', id: '$[0]' },
278
+ };
279
+ const responseTransformation = '$';
280
+ // @ts-ignore
281
+ const { httpClient, sideEffects } = arguments[2];
282
+ const { toAmbassadorRequest } = serializer({
283
+ rootSchema: _updateReservationLocationRequest,
284
+ depSchemas: {
285
+ _configuration,
286
+ _location,
287
+ _privacyPolicy,
288
+ _reservationForm,
289
+ _reservationLocation,
290
+ _termsAndConditions,
291
+ },
292
+ fqdnTransformation: {
293
+ paths: [...['reservationLocation']],
294
+ transformation: _fromVeloEntity,
295
+ },
296
+ customTransformation: requestTransformation,
297
+ });
298
+ const { fromJSON } = serializer({
299
+ rootSchema: _updateReservationLocationResponse,
300
+ depSchemas: {
301
+ _configuration,
302
+ _location,
303
+ _privacyPolicy,
304
+ _reservationForm,
305
+ _reservationLocation,
306
+ _termsAndConditions,
307
+ },
308
+ fqdnTransformation: {
309
+ paths: [...['reservationLocation']],
310
+ transformation: _toVeloEntity,
311
+ },
312
+ customTransformation: responseTransformation,
313
+ });
314
+ const payload = toAmbassadorRequest([_id, reservationLocation]);
315
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.updateReservationLocation(payload);
316
+ __log(`"UpdateReservationLocation" sending request with: ${__inspect(reqOpts)}`);
317
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
318
+ try {
319
+ const result = yield httpClient.request(reqOpts);
320
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
321
+ return fromJSON(result.data);
322
+ }
323
+ catch (err) {
324
+ const transformedError = transformError(err, requestTransformation, [
325
+ '_id',
326
+ 'reservationLocation',
327
+ ]);
328
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
329
+ throw transformedError;
330
+ }
331
+ });
332
+ }
333
+ /**
334
+ * Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request.
335
+ *
336
+ * For a detailed list of supported operations, see the [Supported filters and sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservation-locations/supported-filters-and-sorting) article.
337
+ * To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
338
+ * @public
339
+ * @documentationMaturity preview
340
+ * @applicableIdentity MEMBER
341
+ * @applicableIdentity VISITOR
342
+ */
343
+ export function queryReservationLocations(options) {
344
+ const requestTransformation = { '*': '$[1]', query: '$[0]' };
345
+ const responseTransformation = {
346
+ items: '$.reservationLocations',
347
+ pagingMetadata: '$.pagingMetadata',
348
+ };
349
+ // @ts-ignore
350
+ const { httpClient, sideEffects } = arguments[1];
351
+ const { toAmbassadorRequest } = serializer({
352
+ rootSchema: _queryReservationLocationsRequest,
353
+ depSchemas: {},
354
+ fqdnTransformation: {
355
+ paths: [],
356
+ transformation: _fromVeloEntity,
357
+ },
358
+ customTransformation: requestTransformation,
359
+ });
360
+ const { fromJSON } = serializer({
361
+ rootSchema: _queryReservationLocationsResponse,
362
+ depSchemas: {
363
+ _configuration,
364
+ _location,
365
+ _privacyPolicy,
366
+ _reservationForm,
367
+ _reservationLocation,
368
+ _termsAndConditions,
369
+ },
370
+ fqdnTransformation: {
371
+ paths: [...['Array#reservationLocations']],
372
+ transformation: _toVeloEntity,
373
+ },
374
+ customTransformation: responseTransformation,
375
+ });
376
+ return wrapWithQueryBuilder({
377
+ func: (payload) => __awaiter(this, void 0, void 0, function* () {
378
+ var _a, _b, _c;
379
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.queryReservationLocations(Object.assign(Object.assign({}, payload), (options !== null && options !== void 0 ? options : {})));
380
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
381
+ try {
382
+ const result = yield httpClient.request(reqOpts);
383
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
384
+ return result;
385
+ }
386
+ catch (err) {
387
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
388
+ throw err;
389
+ }
390
+ }),
391
+ requestTransformer: (...args) => toAmbassadorRequest(args),
392
+ responseTransformer: ({ data }) => fromJSON(data),
393
+ errorTransformer: (err) => {
394
+ const transformedError = transformError(err, requestTransformation);
395
+ throw transformedError;
396
+ },
397
+ pagingMethod: 'CURSOR',
398
+ transformationPaths: resolveQueryFieldsTransformationPaths(_toVeloEntity),
399
+ })({ cursorWithEmptyFilterAndSort: true });
400
+ }
401
+ /**
402
+ * Retrieves a list of up to 100 reservation locations.
403
+ * @public
404
+ * @documentationMaturity preview
405
+ * @applicableIdentity MEMBER
406
+ * @applicableIdentity VISITOR
407
+ */
408
+ export function listReservationLocations(options) {
409
+ var _a, _b, _c;
410
+ return __awaiter(this, arguments, void 0, function* () {
411
+ const requestTransformation = {
412
+ paging: '$[0].paging',
413
+ sort: '$[0].sort',
414
+ fieldsets: '$[0].fieldsets',
415
+ };
416
+ const responseTransformation = '$';
417
+ // @ts-ignore
418
+ const { httpClient, sideEffects } = arguments[1];
419
+ const { toAmbassadorRequest } = serializer({
420
+ rootSchema: _listReservationLocationsRequest,
421
+ depSchemas: {},
422
+ fqdnTransformation: {
423
+ paths: [],
424
+ transformation: _fromVeloEntity,
425
+ },
426
+ customTransformation: requestTransformation,
427
+ });
428
+ const { fromJSON } = serializer({
429
+ rootSchema: _listReservationLocationsResponse,
430
+ depSchemas: {
431
+ _configuration,
432
+ _location,
433
+ _privacyPolicy,
434
+ _reservationForm,
435
+ _reservationLocation,
436
+ _termsAndConditions,
437
+ },
438
+ fqdnTransformation: {
439
+ paths: [...['Array#reservationLocations']],
440
+ transformation: _toVeloEntity,
441
+ },
442
+ customTransformation: responseTransformation,
443
+ });
444
+ const payload = toAmbassadorRequest([options]);
445
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.listReservationLocations(payload);
446
+ __log(`"ListReservationLocations" sending request with: ${__inspect(reqOpts)}`);
447
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
448
+ try {
449
+ const result = yield httpClient.request(reqOpts);
450
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
451
+ return fromJSON(result.data);
452
+ }
453
+ catch (err) {
454
+ const transformedError = transformError(err, requestTransformation, [
455
+ 'options',
456
+ ]);
457
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
458
+ throw transformedError;
459
+ }
460
+ });
461
+ }
462
+ //# sourceMappingURL=table-reservations-v1-reservation-location.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-reservations-v1-reservation-location.universal.js","sourceRoot":"","sources":["../../../src/table-reservations-v1-reservation-location.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,mDAAmD,MAAM,mDAAmD,CAAC;AACzH,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,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sdk-types';
2
+ import { CancelReservationRequest, CancelReservationResponse, CreateHeldReservationRequest, CreateHeldReservationResponse, CreateReservationRequest, CreateReservationResponse, GetReservationRequest, GetReservationResponse, ListReservationsRequest, ListReservationsResponse, QueryReservationsRequest, QueryReservationsResponse, ReserveReservationRequest, ReserveReservationResponse, UpdateReservationRequest, UpdateReservationResponse, CreateReservationResponseNonNullableFields, GetReservationResponseNonNullableFields, UpdateReservationResponseNonNullableFields, CreateHeldReservationResponseNonNullableFields, ReserveReservationResponseNonNullableFields, CancelReservationResponseNonNullableFields, ListReservationsResponseNonNullableFields, QueryReservationsResponseNonNullableFields } from './table-reservations-v1-reservation.types';
3
+ /**
4
+ * Creates a new reservation.
5
+ * `Create Reservation` creates a reservation with the status of your choice. Generally, a reservation should be created with either the `RESERVED` status or the `REQUESTED` status if manual approval is required for confirmation.
6
+ * `Create Reservation` gives you the option to override the restaurant’s rules regarding online availability (using `ignoreReservationLocationConflicts`) and table management (using `ignoreTableCombinationConflicts`.)
7
+ */
8
+ export declare function createReservation(payload: CreateReservationRequest): RequestOptionsFactory<CreateReservationResponse & CreateReservationResponseNonNullableFields>;
9
+ /** Retrieves a reservation. */
10
+ export declare function getReservation(payload: GetReservationRequest): RequestOptionsFactory<GetReservationResponse & GetReservationResponseNonNullableFields>;
11
+ /** Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites. */
12
+ export declare function updateReservation(payload: UpdateReservationRequest): RequestOptionsFactory<UpdateReservationResponse & UpdateReservationResponseNonNullableFields>;
13
+ /**
14
+ * Creates a new reservation with the `HELD` status.
15
+ *
16
+ * Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.
17
+ *
18
+ * You cannot call [`Update Reservation`](#update-reservation) to change a reservation’s status from `HELD`. Trying to do so will return an error.
19
+ */
20
+ export declare function createHeldReservation(payload: CreateHeldReservationRequest): RequestOptionsFactory<CreateHeldReservationResponse & CreateHeldReservationResponseNonNullableFields>;
21
+ /**
22
+ * Reserves or requests a `HELD` reservation.
23
+ *
24
+ * `Reserve Reservation` changes a reservation's `HELD` status to `RESERVED`, or to `REQUESTED` if the reservation's reservation location requires manual approval.
25
+ */
26
+ export declare function reserveReservation(payload: ReserveReservationRequest): RequestOptionsFactory<ReserveReservationResponse & ReserveReservationResponseNonNullableFields>;
27
+ /**
28
+ * Cancels a reservation.
29
+ *
30
+ * Sets the reservation status to `CANCELED`.
31
+ */
32
+ export declare function cancelReservation(payload: CancelReservationRequest): RequestOptionsFactory<CancelReservationResponse & CancelReservationResponseNonNullableFields>;
33
+ /** Retrieves a list of up to 100 reservations. */
34
+ export declare function listReservations(payload: ListReservationsRequest): RequestOptionsFactory<ListReservationsResponse & ListReservationsResponseNonNullableFields>;
35
+ /** Retrieves a list of up to 100 reservations, given the provided filters, sorting, and paging. */
36
+ export declare function queryReservations(payload: QueryReservationsRequest): RequestOptionsFactory<QueryReservationsResponse & QueryReservationsResponseNonNullableFields>;