@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,488 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ exports.listReservationLocations = exports.queryReservationLocations = exports.updateReservationLocation = exports.getReservationLocation = exports.DeleteStatus = exports.Namespace = exports.SiteCreatedContext = exports.State = exports.Mode = exports.SortOrder = exports.Set = exports.FieldType = exports.Unit = exports.DayOfWeek = exports.__debug = void 0;
32
+ const velo_1 = require("@wix/metro-runtime/velo");
33
+ const ambassadorWixTableReservationsV1ReservationLocation = __importStar(require("./table-reservations-v1-reservation-location.http"));
34
+ // @ts-ignore
35
+ const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
36
+ let __verbose = false;
37
+ function __log(...args) {
38
+ __verbose && console.log(...args);
39
+ }
40
+ function __inspect(obj) {
41
+ return obj;
42
+ }
43
+ exports.__debug = {
44
+ verboseLogging: {
45
+ on: () => (__verbose = true),
46
+ off: () => (__verbose = false),
47
+ },
48
+ };
49
+ const _toVeloEntity = '$';
50
+ const _fromVeloEntity = '$';
51
+ /** Enumerates the days of the week. */
52
+ var DayOfWeek;
53
+ (function (DayOfWeek) {
54
+ DayOfWeek["MONDAY"] = "MONDAY";
55
+ DayOfWeek["TUESDAY"] = "TUESDAY";
56
+ DayOfWeek["WEDNESDAY"] = "WEDNESDAY";
57
+ DayOfWeek["THURSDAY"] = "THURSDAY";
58
+ DayOfWeek["FRIDAY"] = "FRIDAY";
59
+ DayOfWeek["SATURDAY"] = "SATURDAY";
60
+ DayOfWeek["SUNDAY"] = "SUNDAY";
61
+ })(DayOfWeek = exports.DayOfWeek || (exports.DayOfWeek = {}));
62
+ var Unit;
63
+ (function (Unit) {
64
+ Unit["UNKNOWN"] = "UNKNOWN";
65
+ Unit["MINUTES"] = "MINUTES";
66
+ Unit["HOURS"] = "HOURS";
67
+ Unit["DAYS"] = "DAYS";
68
+ })(Unit = exports.Unit || (exports.Unit = {}));
69
+ /** Type of the field. */
70
+ var FieldType;
71
+ (function (FieldType) {
72
+ FieldType["UNKNOWN"] = "UNKNOWN";
73
+ FieldType["TABLE"] = "TABLE";
74
+ FieldType["START_DATE"] = "START_DATE";
75
+ FieldType["END_DATE"] = "END_DATE";
76
+ FieldType["CREATED_DATE"] = "CREATED_DATE";
77
+ FieldType["UPDATED_DATE"] = "UPDATED_DATE";
78
+ FieldType["PARTY_SIZE"] = "PARTY_SIZE";
79
+ FieldType["FIRST_NAME"] = "FIRST_NAME";
80
+ FieldType["LAST_NAME"] = "LAST_NAME";
81
+ FieldType["EMAIL"] = "EMAIL";
82
+ FieldType["PHONE"] = "PHONE";
83
+ FieldType["ADDITIONAL_INFO"] = "ADDITIONAL_INFO";
84
+ FieldType["TEAM_MESSAGE"] = "TEAM_MESSAGE";
85
+ FieldType["CUSTOM_FIELD"] = "CUSTOM_FIELD";
86
+ FieldType["STATUS"] = "STATUS";
87
+ })(FieldType = exports.FieldType || (exports.FieldType = {}));
88
+ var Set;
89
+ (function (Set) {
90
+ Set["PUBLIC"] = "PUBLIC";
91
+ Set["FULL"] = "FULL";
92
+ })(Set = exports.Set || (exports.Set = {}));
93
+ var SortOrder;
94
+ (function (SortOrder) {
95
+ SortOrder["ASC"] = "ASC";
96
+ SortOrder["DESC"] = "DESC";
97
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
98
+ var Mode;
99
+ (function (Mode) {
100
+ /** DRY RUN. */
101
+ Mode["UNDEFINED"] = "UNDEFINED";
102
+ Mode["DRY_RUN"] = "DRY_RUN";
103
+ Mode["MIGRATE"] = "MIGRATE";
104
+ Mode["FORCE_MIGRATE"] = "FORCE_MIGRATE";
105
+ })(Mode = exports.Mode || (exports.Mode = {}));
106
+ var State;
107
+ (function (State) {
108
+ State["UNKNOWN"] = "UNKNOWN";
109
+ State["ENABLED"] = "ENABLED";
110
+ State["DISABLED"] = "DISABLED";
111
+ State["PENDING"] = "PENDING";
112
+ State["DEMO"] = "DEMO";
113
+ })(State = exports.State || (exports.State = {}));
114
+ var SiteCreatedContext;
115
+ (function (SiteCreatedContext) {
116
+ /** A valid option, we don't expose all reasons why site might be created. */
117
+ SiteCreatedContext["OTHER"] = "OTHER";
118
+ /** A meta site was created from template. */
119
+ SiteCreatedContext["FROM_TEMPLATE"] = "FROM_TEMPLATE";
120
+ /** A meta site was created by copying of the transfferred meta site. */
121
+ SiteCreatedContext["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
122
+ /** A copy of existing meta site. */
123
+ SiteCreatedContext["DUPLICATE"] = "DUPLICATE";
124
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
125
+ SiteCreatedContext["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
126
+ /** deprecated A meta site was created for Flash editor. */
127
+ SiteCreatedContext["FLASH"] = "FLASH";
128
+ })(SiteCreatedContext = exports.SiteCreatedContext || (exports.SiteCreatedContext = {}));
129
+ var Namespace;
130
+ (function (Namespace) {
131
+ Namespace["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
132
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
133
+ Namespace["WIX"] = "WIX";
134
+ /** 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. */
135
+ Namespace["SHOUT_OUT"] = "SHOUT_OUT";
136
+ /** 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. */
137
+ Namespace["ALBUMS"] = "ALBUMS";
138
+ /** 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. */
139
+ Namespace["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
140
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
141
+ Namespace["HOTELS"] = "HOTELS";
142
+ /** 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. */
143
+ Namespace["CLUBS"] = "CLUBS";
144
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
145
+ Namespace["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
146
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
147
+ Namespace["DEV_SITE"] = "DEV_SITE";
148
+ /** 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. */
149
+ Namespace["LOGOS"] = "LOGOS";
150
+ /** 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. */
151
+ Namespace["VIDEO_MAKER"] = "VIDEO_MAKER";
152
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
153
+ Namespace["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
154
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
155
+ Namespace["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
156
+ /**
157
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
158
+ *
159
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
160
+ */
161
+ Namespace["HTML_DRAFT"] = "HTML_DRAFT";
162
+ /**
163
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
164
+ * Will be accessible from Site List and will not have a website app.
165
+ * Once the user attaches a site, the site will become a regular wixsite.
166
+ */
167
+ Namespace["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
168
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
169
+ Namespace["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
170
+ /** It is to be used in the Business First efforts. */
171
+ Namespace["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
172
+ /** Bookings business flow with no site. */
173
+ Namespace["ANYWHERE"] = "ANYWHERE";
174
+ /** Namespace for Headless Backoffice with no editor */
175
+ Namespace["HEADLESS"] = "HEADLESS";
176
+ /**
177
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
178
+ * The site will be used for account level CSM feature for enterprise
179
+ */
180
+ Namespace["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
181
+ })(Namespace = exports.Namespace || (exports.Namespace = {}));
182
+ var DeleteStatus;
183
+ (function (DeleteStatus) {
184
+ DeleteStatus["UNKNOWN"] = "UNKNOWN";
185
+ DeleteStatus["TRASH"] = "TRASH";
186
+ DeleteStatus["DELETED"] = "DELETED";
187
+ DeleteStatus["PENDING_PURGE"] = "PENDING_PURGE";
188
+ })(DeleteStatus = exports.DeleteStatus || (exports.DeleteStatus = {}));
189
+ const _configuration = { reservationForm: '_reservationForm' };
190
+ const _getReservationLocationRequest = {};
191
+ const _getReservationLocationResponse = {
192
+ reservationLocation: '_reservationLocation',
193
+ };
194
+ const _listReservationLocationsRequest = {};
195
+ const _listReservationLocationsResponse = {
196
+ reservationLocations: '_reservationLocation',
197
+ };
198
+ const _location = { address: 'wix.common.Address' };
199
+ const _privacyPolicy = { url: 'wix.common.PageUrlV2' };
200
+ const _queryReservationLocationsRequest = {};
201
+ const _queryReservationLocationsResponse = {
202
+ reservationLocations: '_reservationLocation',
203
+ };
204
+ const _reservationForm = {
205
+ termsAndConditions: '_termsAndConditions',
206
+ privacyPolicy: '_privacyPolicy',
207
+ };
208
+ const _reservationLocation = {
209
+ location: '_location',
210
+ configuration: '_configuration',
211
+ };
212
+ const _termsAndConditions = { url: 'wix.common.PageUrlV2' };
213
+ const _updateReservationLocationRequest = {
214
+ reservationLocation: '_reservationLocation',
215
+ };
216
+ const _updateReservationLocationResponse = {
217
+ reservationLocation: '_reservationLocation',
218
+ };
219
+ /**
220
+ * Retrieves a reservation location by ID.
221
+ * @param reservationLocationId - ID of the ReservationLocation to retrieve.
222
+ * @public
223
+ * @documentationMaturity preview
224
+ * @requiredField reservationLocationId
225
+ * @applicableIdentity MEMBER
226
+ * @applicableIdentity VISITOR
227
+ */
228
+ function getReservationLocation(reservationLocationId, options) {
229
+ var _a, _b, _c;
230
+ return __awaiter(this, arguments, void 0, function* () {
231
+ const requestTransformation = {
232
+ reservationLocationId: '$[0]',
233
+ fieldsets: '$[1].fieldsets',
234
+ };
235
+ const responseTransformation = '$';
236
+ // @ts-ignore
237
+ const { httpClient, sideEffects } = arguments[2];
238
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
239
+ rootSchema: _getReservationLocationRequest,
240
+ depSchemas: {},
241
+ fqdnTransformation: {
242
+ paths: [],
243
+ transformation: _fromVeloEntity,
244
+ },
245
+ customTransformation: requestTransformation,
246
+ });
247
+ const { fromJSON } = (0, velo_1.serializer)({
248
+ rootSchema: _getReservationLocationResponse,
249
+ depSchemas: {
250
+ _configuration,
251
+ _location,
252
+ _privacyPolicy,
253
+ _reservationForm,
254
+ _reservationLocation,
255
+ _termsAndConditions,
256
+ },
257
+ fqdnTransformation: {
258
+ paths: [...['reservationLocation']],
259
+ transformation: _toVeloEntity,
260
+ },
261
+ customTransformation: responseTransformation,
262
+ });
263
+ const payload = toAmbassadorRequest([reservationLocationId, options]);
264
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.getReservationLocation(payload);
265
+ __log(`"GetReservationLocation" sending request with: ${__inspect(reqOpts)}`);
266
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
267
+ try {
268
+ const result = yield httpClient.request(reqOpts);
269
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
270
+ return fromJSON(result.data);
271
+ }
272
+ catch (err) {
273
+ const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
274
+ 'reservationLocationId',
275
+ 'options',
276
+ ]);
277
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
278
+ throw transformedError;
279
+ }
280
+ });
281
+ }
282
+ exports.getReservationLocation = getReservationLocation;
283
+ /**
284
+ * Updates a reservation location. Supports partial updates.
285
+ *
286
+ * 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.
287
+ *
288
+ * 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.
289
+ * @param _id - Reservation location ID.
290
+ * @public
291
+ * @documentationMaturity preview
292
+ * @requiredField _id
293
+ * @requiredField reservationLocation
294
+ * @requiredField reservationLocation.revision
295
+ */
296
+ function updateReservationLocation(_id, reservationLocation) {
297
+ var _a, _b, _c;
298
+ return __awaiter(this, arguments, void 0, function* () {
299
+ const requestTransformation = {
300
+ reservationLocation: { '*': '$[1]', id: '$[0]' },
301
+ };
302
+ const responseTransformation = '$';
303
+ // @ts-ignore
304
+ const { httpClient, sideEffects } = arguments[2];
305
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
306
+ rootSchema: _updateReservationLocationRequest,
307
+ depSchemas: {
308
+ _configuration,
309
+ _location,
310
+ _privacyPolicy,
311
+ _reservationForm,
312
+ _reservationLocation,
313
+ _termsAndConditions,
314
+ },
315
+ fqdnTransformation: {
316
+ paths: [...['reservationLocation']],
317
+ transformation: _fromVeloEntity,
318
+ },
319
+ customTransformation: requestTransformation,
320
+ });
321
+ const { fromJSON } = (0, velo_1.serializer)({
322
+ rootSchema: _updateReservationLocationResponse,
323
+ depSchemas: {
324
+ _configuration,
325
+ _location,
326
+ _privacyPolicy,
327
+ _reservationForm,
328
+ _reservationLocation,
329
+ _termsAndConditions,
330
+ },
331
+ fqdnTransformation: {
332
+ paths: [...['reservationLocation']],
333
+ transformation: _toVeloEntity,
334
+ },
335
+ customTransformation: responseTransformation,
336
+ });
337
+ const payload = toAmbassadorRequest([_id, reservationLocation]);
338
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.updateReservationLocation(payload);
339
+ __log(`"UpdateReservationLocation" sending request with: ${__inspect(reqOpts)}`);
340
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
341
+ try {
342
+ const result = yield httpClient.request(reqOpts);
343
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
344
+ return fromJSON(result.data);
345
+ }
346
+ catch (err) {
347
+ const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
348
+ '_id',
349
+ 'reservationLocation',
350
+ ]);
351
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
352
+ throw transformedError;
353
+ }
354
+ });
355
+ }
356
+ exports.updateReservationLocation = updateReservationLocation;
357
+ /**
358
+ * Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request.
359
+ *
360
+ * 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.
361
+ * To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
362
+ * @public
363
+ * @documentationMaturity preview
364
+ * @applicableIdentity MEMBER
365
+ * @applicableIdentity VISITOR
366
+ */
367
+ function queryReservationLocations(options) {
368
+ const requestTransformation = { '*': '$[1]', query: '$[0]' };
369
+ const responseTransformation = {
370
+ items: '$.reservationLocations',
371
+ pagingMetadata: '$.pagingMetadata',
372
+ };
373
+ // @ts-ignore
374
+ const { httpClient, sideEffects } = arguments[1];
375
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
376
+ rootSchema: _queryReservationLocationsRequest,
377
+ depSchemas: {},
378
+ fqdnTransformation: {
379
+ paths: [],
380
+ transformation: _fromVeloEntity,
381
+ },
382
+ customTransformation: requestTransformation,
383
+ });
384
+ const { fromJSON } = (0, velo_1.serializer)({
385
+ rootSchema: _queryReservationLocationsResponse,
386
+ depSchemas: {
387
+ _configuration,
388
+ _location,
389
+ _privacyPolicy,
390
+ _reservationForm,
391
+ _reservationLocation,
392
+ _termsAndConditions,
393
+ },
394
+ fqdnTransformation: {
395
+ paths: [...['Array#reservationLocations']],
396
+ transformation: _toVeloEntity,
397
+ },
398
+ customTransformation: responseTransformation,
399
+ });
400
+ return (0, motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder)({
401
+ func: (payload) => __awaiter(this, void 0, void 0, function* () {
402
+ var _a, _b, _c;
403
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.queryReservationLocations(Object.assign(Object.assign({}, payload), (options !== null && options !== void 0 ? options : {})));
404
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
405
+ try {
406
+ const result = yield httpClient.request(reqOpts);
407
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
408
+ return result;
409
+ }
410
+ catch (err) {
411
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
412
+ throw err;
413
+ }
414
+ }),
415
+ requestTransformer: (...args) => toAmbassadorRequest(args),
416
+ responseTransformer: ({ data }) => fromJSON(data),
417
+ errorTransformer: (err) => {
418
+ const transformedError = (0, velo_1.transformError)(err, requestTransformation);
419
+ throw transformedError;
420
+ },
421
+ pagingMethod: 'CURSOR',
422
+ transformationPaths: (0, velo_1.resolveQueryFieldsTransformationPaths)(_toVeloEntity),
423
+ })({ cursorWithEmptyFilterAndSort: true });
424
+ }
425
+ exports.queryReservationLocations = queryReservationLocations;
426
+ /**
427
+ * Retrieves a list of up to 100 reservation locations.
428
+ * @public
429
+ * @documentationMaturity preview
430
+ * @applicableIdentity MEMBER
431
+ * @applicableIdentity VISITOR
432
+ */
433
+ function listReservationLocations(options) {
434
+ var _a, _b, _c;
435
+ return __awaiter(this, arguments, void 0, function* () {
436
+ const requestTransformation = {
437
+ paging: '$[0].paging',
438
+ sort: '$[0].sort',
439
+ fieldsets: '$[0].fieldsets',
440
+ };
441
+ const responseTransformation = '$';
442
+ // @ts-ignore
443
+ const { httpClient, sideEffects } = arguments[1];
444
+ const { toAmbassadorRequest } = (0, velo_1.serializer)({
445
+ rootSchema: _listReservationLocationsRequest,
446
+ depSchemas: {},
447
+ fqdnTransformation: {
448
+ paths: [],
449
+ transformation: _fromVeloEntity,
450
+ },
451
+ customTransformation: requestTransformation,
452
+ });
453
+ const { fromJSON } = (0, velo_1.serializer)({
454
+ rootSchema: _listReservationLocationsResponse,
455
+ depSchemas: {
456
+ _configuration,
457
+ _location,
458
+ _privacyPolicy,
459
+ _reservationForm,
460
+ _reservationLocation,
461
+ _termsAndConditions,
462
+ },
463
+ fqdnTransformation: {
464
+ paths: [...['Array#reservationLocations']],
465
+ transformation: _toVeloEntity,
466
+ },
467
+ customTransformation: responseTransformation,
468
+ });
469
+ const payload = toAmbassadorRequest([options]);
470
+ const reqOpts = ambassadorWixTableReservationsV1ReservationLocation.listReservationLocations(payload);
471
+ __log(`"ListReservationLocations" sending request with: ${__inspect(reqOpts)}`);
472
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
473
+ try {
474
+ const result = yield httpClient.request(reqOpts);
475
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
476
+ return fromJSON(result.data);
477
+ }
478
+ catch (err) {
479
+ const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
480
+ 'options',
481
+ ]);
482
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
483
+ throw transformedError;
484
+ }
485
+ });
486
+ }
487
+ exports.listReservationLocations = listReservationLocations;
488
+ //# 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,kDAIiC;AAEjC,uIAAyH;AACzH,aAAa;AACb,4FAA6E;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;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAA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eldReservationRequest, 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>;