@wix/table-reservations 1.0.5 → 1.0.6
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 +1 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +2 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +2 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/table-reservations-v1-time-slot.http.d.ts +12 -0
- package/build/cjs/src/table-reservations-v1-time-slot.http.js +114 -0
- package/build/cjs/src/table-reservations-v1-time-slot.http.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-time-slot.meta.d.ts +13 -0
- package/build/cjs/src/table-reservations-v1-time-slot.meta.js +43 -0
- package/build/cjs/src/table-reservations-v1-time-slot.meta.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-time-slot.public.d.ts +8 -0
- package/build/cjs/src/table-reservations-v1-time-slot.public.js +17 -0
- package/build/cjs/src/table-reservations-v1-time-slot.public.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-time-slot.types.d.ts +119 -0
- package/build/cjs/src/table-reservations-v1-time-slot.types.js +32 -0
- package/build/cjs/src/table-reservations-v1-time-slot.types.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-time-slot.universal.d.ts +156 -0
- package/build/cjs/src/table-reservations-v1-time-slot.universal.js +159 -0
- package/build/cjs/src/table-reservations-v1-time-slot.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +1 -0
- package/build/es/index.typings.js.map +1 -1
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +1 -0
- package/build/es/meta.js.map +1 -1
- package/build/es/src/table-reservations-v1-time-slot.http.d.ts +12 -0
- package/build/es/src/table-reservations-v1-time-slot.http.js +110 -0
- package/build/es/src/table-reservations-v1-time-slot.http.js.map +1 -0
- package/build/es/src/table-reservations-v1-time-slot.meta.d.ts +13 -0
- package/build/es/src/table-reservations-v1-time-slot.meta.js +20 -0
- package/build/es/src/table-reservations-v1-time-slot.meta.js.map +1 -0
- package/build/es/src/table-reservations-v1-time-slot.public.d.ts +8 -0
- package/build/es/src/table-reservations-v1-time-slot.public.js +9 -0
- package/build/es/src/table-reservations-v1-time-slot.public.js.map +1 -0
- package/build/es/src/table-reservations-v1-time-slot.types.d.ts +119 -0
- package/build/es/src/table-reservations-v1-time-slot.types.js +29 -0
- package/build/es/src/table-reservations-v1-time-slot.types.js.map +1 -0
- package/build/es/src/table-reservations-v1-time-slot.universal.d.ts +156 -0
- package/build/es/src/table-reservations-v1-time-slot.universal.js +136 -0
- package/build/es/src/table-reservations-v1-time-slot.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,159 @@
|
|
|
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.getTimeSlots = exports.Type = exports.TableCombinationConflictType = exports.TableConflictType = exports.Status = exports.__debug = void 0;
|
|
32
|
+
const velo_1 = require("@wix/metro-runtime/velo");
|
|
33
|
+
const ambassadorWixTableReservationsV1TimeSlot = __importStar(require("./table-reservations-v1-time-slot.http"));
|
|
34
|
+
let __verbose = false;
|
|
35
|
+
function __log(...args) {
|
|
36
|
+
__verbose && console.log(...args);
|
|
37
|
+
}
|
|
38
|
+
function __inspect(obj) {
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
exports.__debug = {
|
|
42
|
+
verboseLogging: {
|
|
43
|
+
on: () => (__verbose = true),
|
|
44
|
+
off: () => (__verbose = false),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
const _toVeloEntity = '$';
|
|
48
|
+
const _fromVeloEntity = '$';
|
|
49
|
+
var Status;
|
|
50
|
+
(function (Status) {
|
|
51
|
+
Status["AVAILABLE"] = "AVAILABLE";
|
|
52
|
+
Status["UNAVAILABLE"] = "UNAVAILABLE";
|
|
53
|
+
Status["NON_WORKING_HOURS"] = "NON_WORKING_HOURS";
|
|
54
|
+
})(Status = exports.Status || (exports.Status = {}));
|
|
55
|
+
var TableConflictType;
|
|
56
|
+
(function (TableConflictType) {
|
|
57
|
+
TableConflictType["UNKNOWN"] = "UNKNOWN";
|
|
58
|
+
TableConflictType["TABLE_RESERVED"] = "TABLE_RESERVED";
|
|
59
|
+
TableConflictType["TABLE_TOO_BIG"] = "TABLE_TOO_BIG";
|
|
60
|
+
TableConflictType["TABLE_TOO_SMALL"] = "TABLE_TOO_SMALL";
|
|
61
|
+
TableConflictType["OFFLINE_ONLY"] = "OFFLINE_ONLY";
|
|
62
|
+
})(TableConflictType = exports.TableConflictType || (exports.TableConflictType = {}));
|
|
63
|
+
var TableCombinationConflictType;
|
|
64
|
+
(function (TableCombinationConflictType) {
|
|
65
|
+
TableCombinationConflictType["UNKNOWN"] = "UNKNOWN";
|
|
66
|
+
TableCombinationConflictType["RESERVED"] = "RESERVED";
|
|
67
|
+
TableCombinationConflictType["TOO_BIG"] = "TOO_BIG";
|
|
68
|
+
TableCombinationConflictType["TOO_SMALL"] = "TOO_SMALL";
|
|
69
|
+
TableCombinationConflictType["OFFLINE_ONLY"] = "OFFLINE_ONLY";
|
|
70
|
+
})(TableCombinationConflictType = exports.TableCombinationConflictType || (exports.TableCombinationConflictType = {}));
|
|
71
|
+
var Type;
|
|
72
|
+
(function (Type) {
|
|
73
|
+
Type["UNKNOWN"] = "UNKNOWN";
|
|
74
|
+
Type["PARTY_PACING"] = "PARTY_PACING";
|
|
75
|
+
Type["SEAT_PACING"] = "SEAT_PACING";
|
|
76
|
+
})(Type = exports.Type || (exports.Type = {}));
|
|
77
|
+
const _getTimeSlotsRequest = {};
|
|
78
|
+
const _getTimeSlotsResponse = {};
|
|
79
|
+
/**
|
|
80
|
+
* Returns a list of time slots at a given restaurant on a given `date`, and their availability for a given `partySize`.
|
|
81
|
+
*
|
|
82
|
+
* Without passing optional parameters, the list will contain a single time slot at the given `date`.
|
|
83
|
+
* Use `slotsBefore` and `slotsAfter` to get additional time slots before and after the given `date`.
|
|
84
|
+
*
|
|
85
|
+
* If you do not provide a `duration`, it will be calculated by the server based on the reservation location's configuration, and previous reservations made at that location.
|
|
86
|
+
* The reservation location's settings used to determine the duration are its `defaultTurnoverTime` and `turnoverTimeRules`. These specify how much time should be allotted for a reservation of a party of a given size.
|
|
87
|
+
* @param reservationLocationId - ID of the reservation location for which to retrieve time slots.
|
|
88
|
+
* @param date - Date and time for which to retrieve a time slot.
|
|
89
|
+
* @param partySize - Size of the party that needs to be seated during this time slot.
|
|
90
|
+
*
|
|
91
|
+
* Min: `1`
|
|
92
|
+
* @public
|
|
93
|
+
* @documentationMaturity preview
|
|
94
|
+
* @requiredField date
|
|
95
|
+
* @requiredField partySize
|
|
96
|
+
* @requiredField reservationLocationId
|
|
97
|
+
* @applicableIdentity MEMBER
|
|
98
|
+
* @applicableIdentity VISITOR
|
|
99
|
+
*/
|
|
100
|
+
function getTimeSlots(reservationLocationId, date, partySize, options) {
|
|
101
|
+
var _a, _b, _c;
|
|
102
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
103
|
+
const requestTransformation = {
|
|
104
|
+
reservationLocationId: '$[0]',
|
|
105
|
+
date: '$[1]',
|
|
106
|
+
partySize: '$[2]',
|
|
107
|
+
duration: '$[3].duration',
|
|
108
|
+
slotsBefore: '$[3].slotsBefore',
|
|
109
|
+
slotsAfter: '$[3].slotsAfter',
|
|
110
|
+
};
|
|
111
|
+
const responseTransformation = '$';
|
|
112
|
+
// @ts-ignore
|
|
113
|
+
const { httpClient, sideEffects } = arguments[4];
|
|
114
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
115
|
+
rootSchema: _getTimeSlotsRequest,
|
|
116
|
+
depSchemas: {},
|
|
117
|
+
fqdnTransformation: {
|
|
118
|
+
paths: [],
|
|
119
|
+
transformation: _fromVeloEntity,
|
|
120
|
+
},
|
|
121
|
+
customTransformation: requestTransformation,
|
|
122
|
+
});
|
|
123
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
124
|
+
rootSchema: _getTimeSlotsResponse,
|
|
125
|
+
depSchemas: {},
|
|
126
|
+
fqdnTransformation: {
|
|
127
|
+
paths: [...['Array#timeSlots']],
|
|
128
|
+
transformation: _toVeloEntity,
|
|
129
|
+
},
|
|
130
|
+
customTransformation: responseTransformation,
|
|
131
|
+
});
|
|
132
|
+
const payload = toAmbassadorRequest([
|
|
133
|
+
reservationLocationId,
|
|
134
|
+
date,
|
|
135
|
+
partySize,
|
|
136
|
+
options,
|
|
137
|
+
]);
|
|
138
|
+
const reqOpts = ambassadorWixTableReservationsV1TimeSlot.getTimeSlots(payload);
|
|
139
|
+
__log(`"GetTimeSlots" sending request with: ${__inspect(reqOpts)}`);
|
|
140
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
141
|
+
try {
|
|
142
|
+
const result = yield httpClient.request(reqOpts);
|
|
143
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
144
|
+
return fromJSON(result.data);
|
|
145
|
+
}
|
|
146
|
+
catch (err) {
|
|
147
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
148
|
+
'reservationLocationId',
|
|
149
|
+
'date',
|
|
150
|
+
'partySize',
|
|
151
|
+
'options',
|
|
152
|
+
]);
|
|
153
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
154
|
+
throw transformedError;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
exports.getTimeSlots = getTimeSlots;
|
|
159
|
+
//# sourceMappingURL=table-reservations-v1-time-slot.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-reservations-v1-time-slot.universal.js","sourceRoot":"","sources":["../../../src/table-reservations-v1-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OAAO,CAAC,CAAC;QAEjE,KAAK,CAAC,wCAAwC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAEpE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,+CAAvB,WAAW,CAAgB,CAAC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,uBAAuB;gBACvB,MAAM;gBACN,WAAW;gBACX,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AAvED,oCAuEC"}
|
package/build/es/index.d.ts
CHANGED
package/build/es/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * as reservations from './src/table-reservations-v1-reservation.public';
|
|
2
2
|
export * as reservationLocations from './src/table-reservations-v1-reservation-location.public';
|
|
3
|
+
export * as timeSlots from './src/table-reservations-v1-time-slot.public';
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,oBAAoB,MAAM,yDAAyD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAC/E,OAAO,KAAK,oBAAoB,MAAM,yDAAyD,CAAC;AAChG,OAAO,KAAK,SAAS,MAAM,8CAA8C,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * as reservations from './src/table-reservations-v1-reservation.universal';
|
|
2
2
|
export * as reservationLocations from './src/table-reservations-v1-reservation-location.universal';
|
|
3
|
+
export * as timeSlots from './src/table-reservations-v1-time-slot.universal';
|
|
3
4
|
//# sourceMappingURL=index.typings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,mDAAmD,CAAC;AAClF,OAAO,KAAK,oBAAoB,MAAM,4DAA4D,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,mDAAmD,CAAC;AAClF,OAAO,KAAK,oBAAoB,MAAM,4DAA4D,CAAC;AACnG,OAAO,KAAK,SAAS,MAAM,iDAAiD,CAAC"}
|
package/build/es/meta.d.ts
CHANGED
package/build/es/meta.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * as reservations from './src/table-reservations-v1-reservation.meta';
|
|
2
2
|
export * as reservationLocations from './src/table-reservations-v1-reservation-location.meta';
|
|
3
|
+
export * as timeSlots from './src/table-reservations-v1-time-slot.meta';
|
|
3
4
|
//# sourceMappingURL=meta.js.map
|
package/build/es/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,8CAA8C,CAAC;AAC7E,OAAO,KAAK,oBAAoB,MAAM,uDAAuD,CAAC"}
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,8CAA8C,CAAC;AAC7E,OAAO,KAAK,oBAAoB,MAAM,uDAAuD,CAAC;AAC9F,OAAO,KAAK,SAAS,MAAM,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { GetTimeSlotsRequest, GetTimeSlotsResponse, GetTimeSlotsResponseNonNullableFields } from './table-reservations-v1-time-slot.types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns a list of time slots at a given restaurant on a given `date`, and their availability for a given `partySize`.
|
|
5
|
+
*
|
|
6
|
+
* Without passing optional parameters, the list will contain a single time slot at the given `date`.
|
|
7
|
+
* Use `slotsBefore` and `slotsAfter` to get additional time slots before and after the given `date`.
|
|
8
|
+
*
|
|
9
|
+
* If you do not provide a `duration`, it will be calculated by the server based on the reservation location's configuration, and previous reservations made at that location.
|
|
10
|
+
* The reservation location's settings used to determine the duration are its `defaultTurnoverTime` and `turnoverTimeRules`. These specify how much time should be allotted for a reservation of a party of a given size.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTimeSlots(payload: GetTimeSlotsRequest): RequestOptionsFactory<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
2
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
3
|
+
const _getTimeSlotsRequest = { date: 'google.protobuf.Timestamp' };
|
|
4
|
+
const _getTimeSlotsResponse = { timeSlots: '_timeSlot' };
|
|
5
|
+
const _timeSlot = { startDate: 'google.protobuf.Timestamp' };
|
|
6
|
+
function resolveWixTableReservationsTimeSlotV1TimeSlotsServiceUrl(opts) {
|
|
7
|
+
const domainToMappings = {
|
|
8
|
+
_: [
|
|
9
|
+
{
|
|
10
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
11
|
+
destPath: '',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
'editor.wixapps.net': [
|
|
15
|
+
{
|
|
16
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
17
|
+
destPath: '',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
'manage._base_domain_': [
|
|
21
|
+
{
|
|
22
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
23
|
+
destPath: '',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
'www._base_domain_': [
|
|
27
|
+
{
|
|
28
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
29
|
+
destPath: '',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
'api._api_base_domain_': [
|
|
33
|
+
{
|
|
34
|
+
srcPath: '/table-reservations/reservations',
|
|
35
|
+
destPath: '',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
'*.dev.wix-code.com': [
|
|
39
|
+
{
|
|
40
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
41
|
+
destPath: '',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
'editor._base_domain_': [
|
|
45
|
+
{
|
|
46
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
47
|
+
destPath: '',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
'blocks._base_domain_': [
|
|
51
|
+
{
|
|
52
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
53
|
+
destPath: '',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
'create.editorx': [
|
|
57
|
+
{
|
|
58
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
59
|
+
destPath: '',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
'bo._base_domain_': [
|
|
63
|
+
{
|
|
64
|
+
srcPath: '/_api/table-reservations/reservations',
|
|
65
|
+
destPath: '',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'www.wixapis.com': [
|
|
69
|
+
{
|
|
70
|
+
srcPath: '/table-reservations/reservations',
|
|
71
|
+
destPath: '',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Returns a list of time slots at a given restaurant on a given `date`, and their availability for a given `partySize`.
|
|
79
|
+
*
|
|
80
|
+
* Without passing optional parameters, the list will contain a single time slot at the given `date`.
|
|
81
|
+
* Use `slotsBefore` and `slotsAfter` to get additional time slots before and after the given `date`.
|
|
82
|
+
*
|
|
83
|
+
* If you do not provide a `duration`, it will be calculated by the server based on the reservation location's configuration, and previous reservations made at that location.
|
|
84
|
+
* The reservation location's settings used to determine the duration are its `defaultTurnoverTime` and `turnoverTimeRules`. These specify how much time should be allotted for a reservation of a party of a given size.
|
|
85
|
+
*/
|
|
86
|
+
export function getTimeSlots(payload) {
|
|
87
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getTimeSlotsRequest, {});
|
|
88
|
+
const { fromJSON: fromRes } = serializer(_getTimeSlotsResponse, {
|
|
89
|
+
_timeSlot,
|
|
90
|
+
});
|
|
91
|
+
function __getTimeSlots({ host }) {
|
|
92
|
+
const serializedData = toReq(payload);
|
|
93
|
+
const metadata = {
|
|
94
|
+
entityFqdn: 'wix.table_reservations.v1.time_slot',
|
|
95
|
+
method: 'POST',
|
|
96
|
+
methodFqn: 'wix.table_reservations.time_slot.v1.TimeSlotsService.GetTimeSlots',
|
|
97
|
+
url: resolveWixTableReservationsTimeSlotV1TimeSlotsServiceUrl({
|
|
98
|
+
protoPath: '/v1/time-slots',
|
|
99
|
+
data: serializedData,
|
|
100
|
+
host,
|
|
101
|
+
}),
|
|
102
|
+
data: serializedData,
|
|
103
|
+
transformResponse: fromRes,
|
|
104
|
+
};
|
|
105
|
+
return metadata;
|
|
106
|
+
}
|
|
107
|
+
__getTimeSlots.fromReq = fromReq;
|
|
108
|
+
return __getTimeSlots;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=table-reservations-v1-time-slot.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-reservations-v1-time-slot.http.js","sourceRoot":"","sources":["../../../src/table-reservations-v1-time-slot.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD,MAAM,oBAAoB,GAAG,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC;AACnE,MAAM,qBAAqB,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AACzD,MAAM,SAAS,GAAG,EAAE,SAAS,EAAE,2BAA2B,EAAE,CAAC;AAE7D,SAAS,wDAAwD,CAC/D,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,CAAC,EAAE;YACD;gBACE,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,oBAAoB,EAAE;YACpB;gBACE,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,EAAE;aACb;SACF;QACD,oBAAoB,EAAE;YACpB;gBACE,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,uCAAuC;gBAChD,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,uCAA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
import * as ambassadorWixTableReservationsV1TimeSlotTypes from './table-reservations-v1-time-slot.types';
|
|
2
|
+
import * as ambassadorWixTableReservationsV1TimeSlotUniversalTypes from './table-reservations-v1-time-slot.universal';
|
|
3
|
+
export declare type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function getTimeSlots(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixTableReservationsV1TimeSlotUniversalTypes.GetTimeSlotsRequest, ambassadorWixTableReservationsV1TimeSlotTypes.GetTimeSlotsRequest, ambassadorWixTableReservationsV1TimeSlotUniversalTypes.GetTimeSlotsResponse & ambassadorWixTableReservationsV1TimeSlotUniversalTypes.GetTimeSlotsResponseNonNullableFields, ambassadorWixTableReservationsV1TimeSlotTypes.GetTimeSlotsResponse & ambassadorWixTableReservationsV1TimeSlotTypes.GetTimeSlotsResponseNonNullableFields>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as ambassadorWixTableReservationsV1TimeSlot from './table-reservations-v1-time-slot.http';
|
|
2
|
+
export function getTimeSlots() {
|
|
3
|
+
const payload = {};
|
|
4
|
+
const getRequestOptions = ambassadorWixTableReservationsV1TimeSlot.getTimeSlots(payload);
|
|
5
|
+
const getUrl = (context) => {
|
|
6
|
+
const { url } = getRequestOptions(context);
|
|
7
|
+
return url;
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
getUrl,
|
|
11
|
+
httpMethod: 'POST',
|
|
12
|
+
path: '/v1/time-slots',
|
|
13
|
+
pathParams: {},
|
|
14
|
+
__requestType: null,
|
|
15
|
+
__originalRequestType: null,
|
|
16
|
+
__responseType: null,
|
|
17
|
+
__originalResponseType: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=table-reservations-v1-time-slot.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-reservations-v1-time-slot.meta.js","sourceRoot":"","sources":["../../../src/table-reservations-v1-time-slot.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,wCAAwC,MAAM,wCAAwC,CAAC;AAsBnG,MAAM,UAAU,YAAY;IAU1B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,wCAAwC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAEjE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { GetTimeSlotsOptions } from './table-reservations-v1-time-slot.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function getTimeSlots(httpClient: HttpClient): (reservationLocationId: string, date: Date, partySize: number | null, options?: GetTimeSlotsOptions | undefined) => Promise<import("./table-reservations-v1-time-slot.universal").GetTimeSlotsResponse & import("./table-reservations-v1-time-slot.universal").GetTimeSlotsResponseNonNullableFields>;
|
|
7
|
+
export { Status, TableConflictType, TableCombinationConflictType, Type, } from './table-reservations-v1-time-slot.universal';
|
|
8
|
+
export { TimeSlot, TimeSlotTableCombination, GetTimeSlotsRequest, GetTimeSlotsResponse, CheckReservationDetailsRequest, CheckReservationDetailsResponse, Table, TableConflict, TableCombination, TableCombinationConflict, ReservationLocationConflict, GetTimeSlotsResponseNonNullableFields, GetTimeSlotsOptions, } from './table-reservations-v1-time-slot.universal';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getTimeSlots as universalGetTimeSlots, } from './table-reservations-v1-time-slot.universal';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/table-reservations' };
|
|
3
|
+
export function getTimeSlots(httpClient) {
|
|
4
|
+
return (reservationLocationId, date, partySize, options) => universalGetTimeSlots(reservationLocationId, date, partySize, options,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export { Status, TableConflictType, TableCombinationConflictType, Type, } from './table-reservations-v1-time-slot.universal';
|
|
9
|
+
//# sourceMappingURL=table-reservations-v1-time-slot.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-reservations-v1-time-slot.public.js","sourceRoot":"","sources":["../../../src/table-reservations-v1-time-slot.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,IAAI,qBAAqB,GAEtC,MAAM,6CAA6C,CAAC;AAErD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,yBAAyB,EAAE,CAAC;AAEtE,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,CACL,qBAA6B,EAC7B,IAAU,EACV,SAAwB,EACxB,OAA6B,EAC7B,EAAE,CACF,qBAAqB,CACnB,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,4BAA4B,EAC5B,IAAI,GACL,MAAM,6CAA6C,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export interface TimeSlot {
|
|
2
|
+
/** Start date and time of this time slot. */
|
|
3
|
+
startDate?: Date;
|
|
4
|
+
/** Duration in minutes of this time slot. */
|
|
5
|
+
duration?: number;
|
|
6
|
+
/** Availability status of this time slot. */
|
|
7
|
+
status?: Status;
|
|
8
|
+
/** Whether manual approval is required to make a reservation in this time slot. */
|
|
9
|
+
manualApproval?: boolean | null;
|
|
10
|
+
}
|
|
11
|
+
export declare enum Status {
|
|
12
|
+
AVAILABLE = "AVAILABLE",
|
|
13
|
+
UNAVAILABLE = "UNAVAILABLE",
|
|
14
|
+
NON_WORKING_HOURS = "NON_WORKING_HOURS"
|
|
15
|
+
}
|
|
16
|
+
/** Table combination. */
|
|
17
|
+
export interface TimeSlotTableCombination {
|
|
18
|
+
/** Table IDs of the tables in the combination. */
|
|
19
|
+
tableIds?: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface GetTimeSlotsRequest {
|
|
22
|
+
/** ID of the reservation location for which to retrieve time slots. */
|
|
23
|
+
reservationLocationId: string;
|
|
24
|
+
/** Date and time for which to retrieve a time slot. */
|
|
25
|
+
date: Date;
|
|
26
|
+
/**
|
|
27
|
+
* Duration in minutes of the time slot.
|
|
28
|
+
*
|
|
29
|
+
* Min: `5`
|
|
30
|
+
*/
|
|
31
|
+
duration?: number | null;
|
|
32
|
+
/**
|
|
33
|
+
* Size of the party that needs to be seated during this time slot.
|
|
34
|
+
*
|
|
35
|
+
* Min: `1`
|
|
36
|
+
*/
|
|
37
|
+
partySize: number | null;
|
|
38
|
+
/** The number of time slots to retrieve before the given `date`. */
|
|
39
|
+
slotsBefore?: number | null;
|
|
40
|
+
/** The number of time slots to retrieve after the given `date`. */
|
|
41
|
+
slotsAfter?: number | null;
|
|
42
|
+
}
|
|
43
|
+
export interface GetTimeSlotsResponse {
|
|
44
|
+
/** A list of time slots and their availabilities according to the given party size. */
|
|
45
|
+
timeSlots?: TimeSlot[];
|
|
46
|
+
}
|
|
47
|
+
export interface CheckReservationDetailsRequest {
|
|
48
|
+
/** Reservation location ID. */
|
|
49
|
+
reservationLocationId?: string;
|
|
50
|
+
/** Date. */
|
|
51
|
+
date?: Date;
|
|
52
|
+
/** Duration. */
|
|
53
|
+
duration?: number | null;
|
|
54
|
+
/** Party size. */
|
|
55
|
+
partySize?: number | null;
|
|
56
|
+
/** Reservation, that should be ignored during the check. */
|
|
57
|
+
excludeReservationId?: string | null;
|
|
58
|
+
/** Requested table combination. */
|
|
59
|
+
tableIds?: string[];
|
|
60
|
+
}
|
|
61
|
+
export interface CheckReservationDetailsResponse {
|
|
62
|
+
/** Tables states. */
|
|
63
|
+
tables?: Table[];
|
|
64
|
+
/** Table combinations states. */
|
|
65
|
+
tableCombinations?: TableCombination[];
|
|
66
|
+
/** Reservation location conflicts. */
|
|
67
|
+
reservationLocationConflicts?: ReservationLocationConflict[];
|
|
68
|
+
/** Requested table combination state. */
|
|
69
|
+
requestedTableCombination?: TableCombination;
|
|
70
|
+
}
|
|
71
|
+
export interface Table {
|
|
72
|
+
id?: string;
|
|
73
|
+
/** Table conflicts. */
|
|
74
|
+
tableConflicts?: TableConflict[];
|
|
75
|
+
}
|
|
76
|
+
export interface TableConflict {
|
|
77
|
+
/** Conflict type. */
|
|
78
|
+
type?: TableConflictType;
|
|
79
|
+
}
|
|
80
|
+
export declare enum TableConflictType {
|
|
81
|
+
UNKNOWN = "UNKNOWN",
|
|
82
|
+
TABLE_RESERVED = "TABLE_RESERVED",
|
|
83
|
+
TABLE_TOO_BIG = "TABLE_TOO_BIG",
|
|
84
|
+
TABLE_TOO_SMALL = "TABLE_TOO_SMALL",
|
|
85
|
+
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
86
|
+
}
|
|
87
|
+
export interface TableCombination {
|
|
88
|
+
tableIds?: string[];
|
|
89
|
+
tableCombinationConflicts?: TableCombinationConflict[];
|
|
90
|
+
}
|
|
91
|
+
export interface TableCombinationConflict {
|
|
92
|
+
/** Conflict type. */
|
|
93
|
+
type?: TableCombinationConflictType;
|
|
94
|
+
}
|
|
95
|
+
export declare enum TableCombinationConflictType {
|
|
96
|
+
UNKNOWN = "UNKNOWN",
|
|
97
|
+
RESERVED = "RESERVED",
|
|
98
|
+
TOO_BIG = "TOO_BIG",
|
|
99
|
+
TOO_SMALL = "TOO_SMALL",
|
|
100
|
+
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
101
|
+
}
|
|
102
|
+
export interface ReservationLocationConflict {
|
|
103
|
+
/** Reservation location conflict type. */
|
|
104
|
+
type?: Type;
|
|
105
|
+
}
|
|
106
|
+
export declare enum Type {
|
|
107
|
+
UNKNOWN = "UNKNOWN",
|
|
108
|
+
PARTY_PACING = "PARTY_PACING",
|
|
109
|
+
SEAT_PACING = "SEAT_PACING"
|
|
110
|
+
}
|
|
111
|
+
export interface GetTimeSlotsResponseNonNullableFields {
|
|
112
|
+
timeSlots: {
|
|
113
|
+
duration: number;
|
|
114
|
+
status: Status;
|
|
115
|
+
tableCombinations: {
|
|
116
|
+
tableIds: string[];
|
|
117
|
+
}[];
|
|
118
|
+
}[];
|
|
119
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export var Status;
|
|
2
|
+
(function (Status) {
|
|
3
|
+
Status["AVAILABLE"] = "AVAILABLE";
|
|
4
|
+
Status["UNAVAILABLE"] = "UNAVAILABLE";
|
|
5
|
+
Status["NON_WORKING_HOURS"] = "NON_WORKING_HOURS";
|
|
6
|
+
})(Status || (Status = {}));
|
|
7
|
+
export var TableConflictType;
|
|
8
|
+
(function (TableConflictType) {
|
|
9
|
+
TableConflictType["UNKNOWN"] = "UNKNOWN";
|
|
10
|
+
TableConflictType["TABLE_RESERVED"] = "TABLE_RESERVED";
|
|
11
|
+
TableConflictType["TABLE_TOO_BIG"] = "TABLE_TOO_BIG";
|
|
12
|
+
TableConflictType["TABLE_TOO_SMALL"] = "TABLE_TOO_SMALL";
|
|
13
|
+
TableConflictType["OFFLINE_ONLY"] = "OFFLINE_ONLY";
|
|
14
|
+
})(TableConflictType || (TableConflictType = {}));
|
|
15
|
+
export var TableCombinationConflictType;
|
|
16
|
+
(function (TableCombinationConflictType) {
|
|
17
|
+
TableCombinationConflictType["UNKNOWN"] = "UNKNOWN";
|
|
18
|
+
TableCombinationConflictType["RESERVED"] = "RESERVED";
|
|
19
|
+
TableCombinationConflictType["TOO_BIG"] = "TOO_BIG";
|
|
20
|
+
TableCombinationConflictType["TOO_SMALL"] = "TOO_SMALL";
|
|
21
|
+
TableCombinationConflictType["OFFLINE_ONLY"] = "OFFLINE_ONLY";
|
|
22
|
+
})(TableCombinationConflictType || (TableCombinationConflictType = {}));
|
|
23
|
+
export var Type;
|
|
24
|
+
(function (Type) {
|
|
25
|
+
Type["UNKNOWN"] = "UNKNOWN";
|
|
26
|
+
Type["PARTY_PACING"] = "PARTY_PACING";
|
|
27
|
+
Type["SEAT_PACING"] = "SEAT_PACING";
|
|
28
|
+
})(Type || (Type = {}));
|
|
29
|
+
//# sourceMappingURL=table-reservations-v1-time-slot.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-reservations-v1-time-slot.types.js","sourceRoot":"","sources":["../../../src/table-reservations-v1-time-slot.types.ts"],"names":[],"mappings":"AAWA,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,iCAAuB,CAAA;IACvB,qCAA2B,CAAA;IAC3B,iDAAuC,CAAA;AACzC,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB;AAyED,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,sDAAiC,CAAA;IACjC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,kDAA6B,CAAA;AAC/B,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAYD,MAAM,CAAN,IAAY,4BAMX;AAND,WAAY,4BAA4B;IACtC,mDAAmB,CAAA;IACnB,qDAAqB,CAAA;IACrB,mDAAmB,CAAA;IACnB,uDAAuB,CAAA;IACvB,6DAA6B,CAAA;AAC/B,CAAC,EANW,4BAA4B,KAA5B,4BAA4B,QAMvC;AAOD,MAAM,CAAN,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,qCAA6B,CAAA;IAC7B,mCAA2B,CAAA;AAC7B,CAAC,EAJW,IAAI,KAAJ,IAAI,QAIf"}
|