@wix/table-reservations 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +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-reservation-location.http.d.ts +1 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.http.js +1 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.d.ts +1 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.js +1 -1
- package/build/cjs/src/table-reservations-v1-reservation.http.d.ts +5 -3
- package/build/cjs/src/table-reservations-v1-reservation.http.js +5 -3
- package/build/cjs/src/table-reservations-v1-reservation.http.js.map +1 -1
- package/build/cjs/src/table-reservations-v1-reservation.types.d.ts +2 -2
- package/build/cjs/src/table-reservations-v1-reservation.universal.d.ts +9 -7
- package/build/cjs/src/table-reservations-v1-reservation.universal.js +5 -3
- package/build/cjs/src/table-reservations-v1-reservation.universal.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-reservation-location.http.d.ts +1 -1
- package/build/es/src/table-reservations-v1-reservation-location.http.js +1 -1
- package/build/es/src/table-reservations-v1-reservation-location.universal.d.ts +1 -1
- package/build/es/src/table-reservations-v1-reservation-location.universal.js +1 -1
- package/build/es/src/table-reservations-v1-reservation.http.d.ts +5 -3
- package/build/es/src/table-reservations-v1-reservation.http.js +5 -3
- package/build/es/src/table-reservations-v1-reservation.http.js.map +1 -1
- package/build/es/src/table-reservations-v1-reservation.types.d.ts +2 -2
- package/build/es/src/table-reservations-v1-reservation.universal.d.ts +9 -7
- package/build/es/src/table-reservations-v1-reservation.universal.js +5 -3
- package/build/es/src/table-reservations-v1-reservation.universal.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,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,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Type = exports.TableCombinationConflictType = exports.TableConflictType = exports.Status = void 0;
|
|
4
|
+
var Status;
|
|
5
|
+
(function (Status) {
|
|
6
|
+
Status["AVAILABLE"] = "AVAILABLE";
|
|
7
|
+
Status["UNAVAILABLE"] = "UNAVAILABLE";
|
|
8
|
+
Status["NON_WORKING_HOURS"] = "NON_WORKING_HOURS";
|
|
9
|
+
})(Status = exports.Status || (exports.Status = {}));
|
|
10
|
+
var TableConflictType;
|
|
11
|
+
(function (TableConflictType) {
|
|
12
|
+
TableConflictType["UNKNOWN"] = "UNKNOWN";
|
|
13
|
+
TableConflictType["TABLE_RESERVED"] = "TABLE_RESERVED";
|
|
14
|
+
TableConflictType["TABLE_TOO_BIG"] = "TABLE_TOO_BIG";
|
|
15
|
+
TableConflictType["TABLE_TOO_SMALL"] = "TABLE_TOO_SMALL";
|
|
16
|
+
TableConflictType["OFFLINE_ONLY"] = "OFFLINE_ONLY";
|
|
17
|
+
})(TableConflictType = exports.TableConflictType || (exports.TableConflictType = {}));
|
|
18
|
+
var TableCombinationConflictType;
|
|
19
|
+
(function (TableCombinationConflictType) {
|
|
20
|
+
TableCombinationConflictType["UNKNOWN"] = "UNKNOWN";
|
|
21
|
+
TableCombinationConflictType["RESERVED"] = "RESERVED";
|
|
22
|
+
TableCombinationConflictType["TOO_BIG"] = "TOO_BIG";
|
|
23
|
+
TableCombinationConflictType["TOO_SMALL"] = "TOO_SMALL";
|
|
24
|
+
TableCombinationConflictType["OFFLINE_ONLY"] = "OFFLINE_ONLY";
|
|
25
|
+
})(TableCombinationConflictType = exports.TableCombinationConflictType || (exports.TableCombinationConflictType = {}));
|
|
26
|
+
var Type;
|
|
27
|
+
(function (Type) {
|
|
28
|
+
Type["UNKNOWN"] = "UNKNOWN";
|
|
29
|
+
Type["PARTY_PACING"] = "PARTY_PACING";
|
|
30
|
+
Type["SEAT_PACING"] = "SEAT_PACING";
|
|
31
|
+
})(Type = exports.Type || (exports.Type = {}));
|
|
32
|
+
//# 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,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,iCAAuB,CAAA;IACvB,qCAA2B,CAAA;IAC3B,iDAAuC,CAAA;AACzC,CAAC,EAJW,MAAM,GAAN,cAAM,KAAN,cAAM,QAIjB;AAyED,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,GAAjB,yBAAiB,KAAjB,yBAAiB,QAM5B;AAYD,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,GAA5B,oCAA4B,KAA5B,oCAA4B,QAMvC;AAOD,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,qCAA6B,CAAA;IAC7B,mCAA2B,CAAA;AAC7B,CAAC,EAJW,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAIf"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export interface TimeSlot {
|
|
8
|
+
/** Start date and time of this time slot. */
|
|
9
|
+
startDate?: Date;
|
|
10
|
+
/** Duration in minutes of this time slot. */
|
|
11
|
+
duration?: number;
|
|
12
|
+
/** Availability status of this time slot. */
|
|
13
|
+
status?: Status;
|
|
14
|
+
/** Whether manual approval is required to make a reservation in this time slot. */
|
|
15
|
+
manualApproval?: boolean | null;
|
|
16
|
+
}
|
|
17
|
+
export declare enum Status {
|
|
18
|
+
AVAILABLE = "AVAILABLE",
|
|
19
|
+
UNAVAILABLE = "UNAVAILABLE",
|
|
20
|
+
NON_WORKING_HOURS = "NON_WORKING_HOURS"
|
|
21
|
+
}
|
|
22
|
+
/** Table combination. */
|
|
23
|
+
export interface TimeSlotTableCombination {
|
|
24
|
+
/** Table IDs of the tables in the combination. */
|
|
25
|
+
tableIds?: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface GetTimeSlotsRequest {
|
|
28
|
+
/** ID of the reservation location for which to retrieve time slots. */
|
|
29
|
+
reservationLocationId: string;
|
|
30
|
+
/** Date and time for which to retrieve a time slot. */
|
|
31
|
+
date: Date;
|
|
32
|
+
/**
|
|
33
|
+
* Duration in minutes of the time slot.
|
|
34
|
+
*
|
|
35
|
+
* Min: `5`
|
|
36
|
+
*/
|
|
37
|
+
duration?: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* Size of the party that needs to be seated during this time slot.
|
|
40
|
+
*
|
|
41
|
+
* Min: `1`
|
|
42
|
+
*/
|
|
43
|
+
partySize: number | null;
|
|
44
|
+
/** The number of time slots to retrieve before the given `date`. */
|
|
45
|
+
slotsBefore?: number | null;
|
|
46
|
+
/** The number of time slots to retrieve after the given `date`. */
|
|
47
|
+
slotsAfter?: number | null;
|
|
48
|
+
}
|
|
49
|
+
export interface GetTimeSlotsResponse {
|
|
50
|
+
/** A list of time slots and their availabilities according to the given party size. */
|
|
51
|
+
timeSlots?: TimeSlot[];
|
|
52
|
+
}
|
|
53
|
+
export interface CheckReservationDetailsRequest {
|
|
54
|
+
/** Reservation location ID. */
|
|
55
|
+
reservationLocationId?: string;
|
|
56
|
+
/** Date. */
|
|
57
|
+
date?: Date;
|
|
58
|
+
/** Duration. */
|
|
59
|
+
duration?: number | null;
|
|
60
|
+
/** Party size. */
|
|
61
|
+
partySize?: number | null;
|
|
62
|
+
/** Reservation, that should be ignored during the check. */
|
|
63
|
+
excludeReservationId?: string | null;
|
|
64
|
+
/** Requested table combination. */
|
|
65
|
+
tableIds?: string[];
|
|
66
|
+
}
|
|
67
|
+
export interface CheckReservationDetailsResponse {
|
|
68
|
+
/** Tables states. */
|
|
69
|
+
tables?: Table[];
|
|
70
|
+
/** Table combinations states. */
|
|
71
|
+
tableCombinations?: TableCombination[];
|
|
72
|
+
/** Reservation location conflicts. */
|
|
73
|
+
reservationLocationConflicts?: ReservationLocationConflict[];
|
|
74
|
+
/** Requested table combination state. */
|
|
75
|
+
requestedTableCombination?: TableCombination;
|
|
76
|
+
}
|
|
77
|
+
export interface Table {
|
|
78
|
+
_id?: string;
|
|
79
|
+
/** Table conflicts. */
|
|
80
|
+
tableConflicts?: TableConflict[];
|
|
81
|
+
}
|
|
82
|
+
export interface TableConflict {
|
|
83
|
+
/** Conflict type. */
|
|
84
|
+
type?: TableConflictType;
|
|
85
|
+
}
|
|
86
|
+
export declare enum TableConflictType {
|
|
87
|
+
UNKNOWN = "UNKNOWN",
|
|
88
|
+
TABLE_RESERVED = "TABLE_RESERVED",
|
|
89
|
+
TABLE_TOO_BIG = "TABLE_TOO_BIG",
|
|
90
|
+
TABLE_TOO_SMALL = "TABLE_TOO_SMALL",
|
|
91
|
+
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
92
|
+
}
|
|
93
|
+
export interface TableCombination {
|
|
94
|
+
tableIds?: string[];
|
|
95
|
+
tableCombinationConflicts?: TableCombinationConflict[];
|
|
96
|
+
}
|
|
97
|
+
export interface TableCombinationConflict {
|
|
98
|
+
/** Conflict type. */
|
|
99
|
+
type?: TableCombinationConflictType;
|
|
100
|
+
}
|
|
101
|
+
export declare enum TableCombinationConflictType {
|
|
102
|
+
UNKNOWN = "UNKNOWN",
|
|
103
|
+
RESERVED = "RESERVED",
|
|
104
|
+
TOO_BIG = "TOO_BIG",
|
|
105
|
+
TOO_SMALL = "TOO_SMALL",
|
|
106
|
+
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
107
|
+
}
|
|
108
|
+
export interface ReservationLocationConflict {
|
|
109
|
+
/** Reservation location conflict type. */
|
|
110
|
+
type?: Type;
|
|
111
|
+
}
|
|
112
|
+
export declare enum Type {
|
|
113
|
+
UNKNOWN = "UNKNOWN",
|
|
114
|
+
PARTY_PACING = "PARTY_PACING",
|
|
115
|
+
SEAT_PACING = "SEAT_PACING"
|
|
116
|
+
}
|
|
117
|
+
export interface GetTimeSlotsResponseNonNullableFields {
|
|
118
|
+
timeSlots: {
|
|
119
|
+
duration: number;
|
|
120
|
+
status: Status;
|
|
121
|
+
}[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns a list of time slots at a given restaurant on a given `date`, and their availability for a given `partySize`.
|
|
125
|
+
*
|
|
126
|
+
* Without passing optional parameters, the list will contain a single time slot at the given `date`.
|
|
127
|
+
* Use `slotsBefore` and `slotsAfter` to get additional time slots before and after the given `date`.
|
|
128
|
+
*
|
|
129
|
+
* If you do not provide a `duration`, it will be calculated by the server based on the reservation location's configuration.
|
|
130
|
+
* 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.
|
|
131
|
+
* @param reservationLocationId - ID of the reservation location for which to retrieve time slots.
|
|
132
|
+
* @param date - Date and time for which to retrieve a time slot.
|
|
133
|
+
* @param partySize - Size of the party that needs to be seated during this time slot.
|
|
134
|
+
*
|
|
135
|
+
* Min: `1`
|
|
136
|
+
* @public
|
|
137
|
+
* @documentationMaturity preview
|
|
138
|
+
* @requiredField date
|
|
139
|
+
* @requiredField partySize
|
|
140
|
+
* @requiredField reservationLocationId
|
|
141
|
+
* @applicableIdentity MEMBER
|
|
142
|
+
* @applicableIdentity VISITOR
|
|
143
|
+
*/
|
|
144
|
+
export declare function getTimeSlots(reservationLocationId: string, date: Date, partySize: number | null, options?: GetTimeSlotsOptions): Promise<GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields>;
|
|
145
|
+
export interface GetTimeSlotsOptions {
|
|
146
|
+
/**
|
|
147
|
+
* Duration in minutes of the time slot.
|
|
148
|
+
*
|
|
149
|
+
* Min: `5`
|
|
150
|
+
*/
|
|
151
|
+
duration?: number | null;
|
|
152
|
+
/** The number of time slots to retrieve before the given `date`. */
|
|
153
|
+
slotsBefore?: number | null;
|
|
154
|
+
/** The number of time slots to retrieve after the given `date`. */
|
|
155
|
+
slotsAfter?: number | null;
|
|
156
|
+
}
|
|
@@ -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.
|
|
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-time-slot.universal.ts"],"names":[],"mappings":"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"}
|
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"}
|
|
@@ -13,7 +13,7 @@ export declare function updateReservationLocation(payload: UpdateReservationLoca
|
|
|
13
13
|
/**
|
|
14
14
|
* Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request.
|
|
15
15
|
*
|
|
16
|
-
* For a detailed list of supported operations, see the [Supported
|
|
16
|
+
* 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.
|
|
17
17
|
* To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
18
18
|
*/
|
|
19
19
|
export declare function queryReservationLocations(payload: QueryReservationLocationsRequest): RequestOptionsFactory<QueryReservationLocationsResponse & QueryReservationLocationsResponseNonNullableFields>;
|
|
@@ -155,7 +155,7 @@ export function updateReservationLocation(payload) {
|
|
|
155
155
|
/**
|
|
156
156
|
* Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request.
|
|
157
157
|
*
|
|
158
|
-
* For a detailed list of supported operations, see the [Supported
|
|
158
|
+
* 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.
|
|
159
159
|
* To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
160
160
|
*/
|
|
161
161
|
export function queryReservationLocations(payload) {
|
|
@@ -1417,7 +1417,7 @@ export interface UpdateReservationLocation {
|
|
|
1417
1417
|
/**
|
|
1418
1418
|
* Retrieves a list of reservation locations given the provided paging, filtering, and sorting. Up to 100 reservation locations can be returned per request.
|
|
1419
1419
|
*
|
|
1420
|
-
* For a detailed list of supported operations, see the [Supported
|
|
1420
|
+
* 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.
|
|
1421
1421
|
* To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
1422
1422
|
* @public
|
|
1423
1423
|
* @documentationMaturity preview
|
|
@@ -333,7 +333,7 @@ export function updateReservationLocation(_id, reservationLocation) {
|
|
|
333
333
|
/**
|
|
334
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
335
|
*
|
|
336
|
-
* For a detailed list of supported operations, see the [Supported
|
|
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
337
|
* To learn how to query reservation locations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
338
338
|
* @public
|
|
339
339
|
* @documentationMaturity preview
|
|
@@ -2,8 +2,10 @@ import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
|
2
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
3
|
/**
|
|
4
4
|
* Creates a new reservation.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
*
|
|
6
|
+
* This creates a reservation with either the `RESERVED` status or the `REQUESTED` status if manual approval is required for confirmation.
|
|
7
|
+
* The fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` should only be included in the request if the call is made by a user with `TABLE_RESERVATIONS.RESERVATION_CREATE_FORCE` permissions.
|
|
8
|
+
* Including these fields in the request without the required permissions will result in an application error.
|
|
7
9
|
*/
|
|
8
10
|
export declare function createReservation(payload: CreateReservationRequest): RequestOptionsFactory<CreateReservationResponse & CreateReservationResponseNonNullableFields>;
|
|
9
11
|
/** Retrieves a reservation. */
|
|
@@ -33,7 +35,7 @@ export declare function cancelReservation(payload: CancelReservationRequest): Re
|
|
|
33
35
|
/** Retrieves a list of up to 100 reservations. */
|
|
34
36
|
export declare function listReservations(payload: ListReservationsRequest): RequestOptionsFactory<ListReservationsResponse & ListReservationsResponseNonNullableFields>;
|
|
35
37
|
/**
|
|
36
|
-
* For a detailed list of supported operations, see the [Supported
|
|
38
|
+
* For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/supported-filters-and-sorting) article.
|
|
37
39
|
* To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
38
40
|
*/
|
|
39
41
|
export declare function queryReservations(payload: QueryReservationsRequest): RequestOptionsFactory<QueryReservationsResponse & QueryReservationsResponseNonNullableFields>;
|
|
@@ -108,8 +108,10 @@ function resolveWixTableReservationsReservationV1ReservationsServiceUrl(opts) {
|
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* Creates a new reservation.
|
|
111
|
-
*
|
|
112
|
-
*
|
|
111
|
+
*
|
|
112
|
+
* This creates a reservation with either the `RESERVED` status or the `REQUESTED` status if manual approval is required for confirmation.
|
|
113
|
+
* The fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` should only be included in the request if the call is made by a user with `TABLE_RESERVATIONS.RESERVATION_CREATE_FORCE` permissions.
|
|
114
|
+
* Including these fields in the request without the required permissions will result in an application error.
|
|
113
115
|
*/
|
|
114
116
|
export function createReservation(payload) {
|
|
115
117
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createReservationRequest, { _details, _reservation });
|
|
@@ -307,7 +309,7 @@ export function listReservations(payload) {
|
|
|
307
309
|
return __listReservations;
|
|
308
310
|
}
|
|
309
311
|
/**
|
|
310
|
-
* For a detailed list of supported operations, see the [Supported
|
|
312
|
+
* For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/supported-filters-and-sorting) article.
|
|
311
313
|
* To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
312
314
|
*/
|
|
313
315
|
export function queryReservations(payload) {
|