@wix/table-reservations 1.0.78 → 1.0.80
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/context.d.ts +3 -3
- package/build/cjs/context.js +3 -3
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +3 -3
- package/build/cjs/index.js +3 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -3
- package/build/cjs/meta.js +3 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +3 -3
- package/build/es/context.js +3 -3
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +3 -3
- package/build/es/index.js +3 -3
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +3 -3
- package/build/es/meta.js +3 -3
- package/build/es/meta.js.map +1 -1
- package/package.json +13 -9
- package/build/cjs/index.typings.d.ts +0 -3
- package/build/cjs/index.typings.js +0 -30
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.context.d.ts +0 -6
- package/build/cjs/src/table-reservations-v1-reservation-location.context.js +0 -73
- package/build/cjs/src/table-reservations-v1-reservation-location.context.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.http.d.ts +0 -40
- package/build/cjs/src/table-reservations-v1-reservation-location.http.js +0 -266
- package/build/cjs/src/table-reservations-v1-reservation-location.http.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.meta.d.ts +0 -20
- package/build/cjs/src/table-reservations-v1-reservation-location.meta.js +0 -106
- package/build/cjs/src/table-reservations-v1-reservation-location.meta.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.public.d.ts +0 -178
- package/build/cjs/src/table-reservations-v1-reservation-location.public.js +0 -48
- package/build/cjs/src/table-reservations-v1-reservation-location.public.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.types.d.ts +0 -2260
- package/build/cjs/src/table-reservations-v1-reservation-location.types.js +0 -187
- package/build/cjs/src/table-reservations-v1-reservation-location.types.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.d.ts +0 -2333
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.js +0 -613
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.context.d.ts +0 -11
- package/build/cjs/src/table-reservations-v1-reservation.context.js +0 -158
- package/build/cjs/src/table-reservations-v1-reservation.context.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.http.d.ts +0 -89
- package/build/cjs/src/table-reservations-v1-reservation.http.js +0 -508
- package/build/cjs/src/table-reservations-v1-reservation.http.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.meta.d.ts +0 -29
- package/build/cjs/src/table-reservations-v1-reservation.meta.js +0 -199
- package/build/cjs/src/table-reservations-v1-reservation.meta.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.public.d.ts +0 -29
- package/build/cjs/src/table-reservations-v1-reservation.public.js +0 -79
- package/build/cjs/src/table-reservations-v1-reservation.public.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.types.d.ts +0 -1005
- package/build/cjs/src/table-reservations-v1-reservation.types.js +0 -135
- package/build/cjs/src/table-reservations-v1-reservation.types.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.universal.d.ts +0 -1416
- package/build/cjs/src/table-reservations-v1-reservation.universal.js +0 -888
- package/build/cjs/src/table-reservations-v1-reservation.universal.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.context.d.ts +0 -3
- package/build/cjs/src/table-reservations-v1-time-slot.context.js +0 -22
- package/build/cjs/src/table-reservations-v1-time-slot.context.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.http.d.ts +0 -13
- package/build/cjs/src/table-reservations-v1-time-slot.http.js +0 -126
- package/build/cjs/src/table-reservations-v1-time-slot.http.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.meta.d.ts +0 -13
- package/build/cjs/src/table-reservations-v1-time-slot.meta.js +0 -47
- package/build/cjs/src/table-reservations-v1-time-slot.meta.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.public.d.ts +0 -8
- package/build/cjs/src/table-reservations-v1-time-slot.public.js +0 -17
- package/build/cjs/src/table-reservations-v1-time-slot.public.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.types.d.ts +0 -137
- package/build/cjs/src/table-reservations-v1-time-slot.types.js +0 -32
- package/build/cjs/src/table-reservations-v1-time-slot.types.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.universal.d.ts +0 -178
- package/build/cjs/src/table-reservations-v1-time-slot.universal.js +0 -166
- package/build/cjs/src/table-reservations-v1-time-slot.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -3
- package/build/es/index.typings.js +0 -4
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.context.d.ts +0 -6
- package/build/es/src/table-reservations-v1-reservation-location.context.js +0 -66
- package/build/es/src/table-reservations-v1-reservation-location.context.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.http.d.ts +0 -40
- package/build/es/src/table-reservations-v1-reservation-location.http.js +0 -259
- package/build/es/src/table-reservations-v1-reservation-location.http.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.meta.d.ts +0 -20
- package/build/es/src/table-reservations-v1-reservation-location.meta.js +0 -76
- package/build/es/src/table-reservations-v1-reservation-location.meta.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.public.d.ts +0 -178
- package/build/es/src/table-reservations-v1-reservation-location.public.js +0 -25
- package/build/es/src/table-reservations-v1-reservation-location.public.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.types.d.ts +0 -2260
- package/build/es/src/table-reservations-v1-reservation-location.types.js +0 -184
- package/build/es/src/table-reservations-v1-reservation-location.types.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.universal.d.ts +0 -2333
- package/build/es/src/table-reservations-v1-reservation-location.universal.js +0 -583
- package/build/es/src/table-reservations-v1-reservation-location.universal.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.context.d.ts +0 -11
- package/build/es/src/table-reservations-v1-reservation.context.js +0 -146
- package/build/es/src/table-reservations-v1-reservation.context.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.http.d.ts +0 -89
- package/build/es/src/table-reservations-v1-reservation.http.js +0 -496
- package/build/es/src/table-reservations-v1-reservation.http.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.meta.d.ts +0 -29
- package/build/es/src/table-reservations-v1-reservation.meta.js +0 -164
- package/build/es/src/table-reservations-v1-reservation.meta.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.public.d.ts +0 -29
- package/build/es/src/table-reservations-v1-reservation.public.js +0 -50
- package/build/es/src/table-reservations-v1-reservation.public.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.types.d.ts +0 -1005
- package/build/es/src/table-reservations-v1-reservation.types.js +0 -132
- package/build/es/src/table-reservations-v1-reservation.types.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.universal.d.ts +0 -1416
- package/build/es/src/table-reservations-v1-reservation.universal.js +0 -853
- package/build/es/src/table-reservations-v1-reservation.universal.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.context.d.ts +0 -3
- package/build/es/src/table-reservations-v1-time-slot.context.js +0 -18
- package/build/es/src/table-reservations-v1-time-slot.context.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.http.d.ts +0 -13
- package/build/es/src/table-reservations-v1-time-slot.http.js +0 -122
- package/build/es/src/table-reservations-v1-time-slot.http.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.meta.d.ts +0 -13
- package/build/es/src/table-reservations-v1-time-slot.meta.js +0 -20
- package/build/es/src/table-reservations-v1-time-slot.meta.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.public.d.ts +0 -8
- package/build/es/src/table-reservations-v1-time-slot.public.js +0 -9
- package/build/es/src/table-reservations-v1-time-slot.public.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.types.d.ts +0 -137
- package/build/es/src/table-reservations-v1-time-slot.types.js +0 -29
- package/build/es/src/table-reservations-v1-time-slot.types.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.universal.d.ts +0 -178
- package/build/es/src/table-reservations-v1-time-slot.universal.js +0 -139
- package/build/es/src/table-reservations-v1-time-slot.universal.js.map +0 -1
|
@@ -1,1416 +0,0 @@
|
|
|
1
|
-
import { EventDefinition } from '@wix/sdk-types';
|
|
2
|
-
/** The reservation domain object. */
|
|
3
|
-
export interface Reservation {
|
|
4
|
-
/**
|
|
5
|
-
* Reservation ID.
|
|
6
|
-
* @readonly
|
|
7
|
-
*/
|
|
8
|
-
_id?: string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Status of the reservation.
|
|
11
|
-
*
|
|
12
|
-
* Supported values:
|
|
13
|
-
*
|
|
14
|
-
* * `HELD`: The reservation is temporary and will expire in 10 minutes if its status isn’t changed. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request.
|
|
15
|
-
* * `REQUESTED`: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request.
|
|
16
|
-
* * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
|
|
17
|
-
* * `RESERVED`: The reservation is confirmed.
|
|
18
|
-
* * `SEATED`: The customer is currently occupying the table.
|
|
19
|
-
* * `CANCELED`: The reservation is canceled.
|
|
20
|
-
* * `NO_SHOW`: The customer didn't show up for their reservation.
|
|
21
|
-
* * `FINISHED`: The reservation completed successfully.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* See the article for this API titled "The Reservation Lifecycle" in the menu on the left for more details on each of the statuses, and an explanation of the reservation lifecycle.
|
|
25
|
-
*/
|
|
26
|
-
status?: Status;
|
|
27
|
-
/**
|
|
28
|
-
* Reservation source.
|
|
29
|
-
*
|
|
30
|
-
* This indicates how the reservation was made.
|
|
31
|
-
* * `ONLINE` indicates that the customer made the reservation through a website or app.
|
|
32
|
-
* * `OFFLINE` indicates that the reservation was made by a restaurant employee, for example when a customer calls to make a reservation.
|
|
33
|
-
* * `WALK-IN` indicates that the customer did not make a reservation beforehand, and the reservation was entered into the system by a restaurant employee when the customer arrived at the restaurant.
|
|
34
|
-
*/
|
|
35
|
-
source?: Source;
|
|
36
|
-
/** Reservation details. */
|
|
37
|
-
details?: Details;
|
|
38
|
-
/**
|
|
39
|
-
* Information about the person the reservation is being made for.
|
|
40
|
-
*
|
|
41
|
-
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
42
|
-
* Attempting to create a reservation without these fields results in an error.
|
|
43
|
-
*/
|
|
44
|
-
reservee?: Reservee;
|
|
45
|
-
/**
|
|
46
|
-
* Information about the person making the reservation.
|
|
47
|
-
*
|
|
48
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
49
|
-
* @readonly
|
|
50
|
-
*/
|
|
51
|
-
reservedBy?: ReservedBy;
|
|
52
|
-
/**
|
|
53
|
-
* Team message.
|
|
54
|
-
*
|
|
55
|
-
* A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
|
|
56
|
-
*/
|
|
57
|
-
teamMessage?: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* Date and time the reservation was created.
|
|
60
|
-
* @readonly
|
|
61
|
-
*/
|
|
62
|
-
_createdDate?: Date;
|
|
63
|
-
/**
|
|
64
|
-
* Date and time the reservation was changed.
|
|
65
|
-
* @readonly
|
|
66
|
-
*/
|
|
67
|
-
_updatedDate?: Date;
|
|
68
|
-
/**
|
|
69
|
-
* Revision number, which increments by 1 each time the reservation is updated.
|
|
70
|
-
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
71
|
-
*
|
|
72
|
-
* Ignored when creating a reservation.
|
|
73
|
-
* @readonly
|
|
74
|
-
*/
|
|
75
|
-
revision?: string | null;
|
|
76
|
-
/** The reason the reservation was declined. */
|
|
77
|
-
declineReason?: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Payment status.
|
|
80
|
-
* @readonly
|
|
81
|
-
*/
|
|
82
|
-
paymentStatus?: PaymentStatus;
|
|
83
|
-
}
|
|
84
|
-
export declare enum Status {
|
|
85
|
-
UNKNOWN = "UNKNOWN",
|
|
86
|
-
/** The reservation is held for 10 minutes, during which time the reservee should fill in their details. */
|
|
87
|
-
HELD = "HELD",
|
|
88
|
-
/** The reservation has been reserved. */
|
|
89
|
-
RESERVED = "RESERVED",
|
|
90
|
-
/** The reservation has been canceled. */
|
|
91
|
-
CANCELED = "CANCELED",
|
|
92
|
-
/** The reservation has finished successfully. */
|
|
93
|
-
FINISHED = "FINISHED",
|
|
94
|
-
/** The reservee didn't arrive. */
|
|
95
|
-
NO_SHOW = "NO_SHOW",
|
|
96
|
-
/** The reservee occupied the table. */
|
|
97
|
-
SEATED = "SEATED",
|
|
98
|
-
/** The reservee requested a reservation and is waiting for manual approval. */
|
|
99
|
-
REQUESTED = "REQUESTED",
|
|
100
|
-
/** The owner declined a reservee's request. */
|
|
101
|
-
DECLINED = "DECLINED",
|
|
102
|
-
/** The reservation is held for 10 minutes from the created time, during which time the reservee should pay. After payment is completed status will be changed automatically to RESERVED. */
|
|
103
|
-
PAYMENT_PENDING = "PAYMENT_PENDING"
|
|
104
|
-
}
|
|
105
|
-
export declare enum Source {
|
|
106
|
-
UNKNOWN = "UNKNOWN",
|
|
107
|
-
/** The reservation is created by a User. */
|
|
108
|
-
OFFLINE = "OFFLINE",
|
|
109
|
-
/** The reservation is created by UoU. */
|
|
110
|
-
ONLINE = "ONLINE",
|
|
111
|
-
/** The reservation is created by a User. It can be created without reservee data. */
|
|
112
|
-
WALK_IN = "WALK_IN"
|
|
113
|
-
}
|
|
114
|
-
/** Reservation details. */
|
|
115
|
-
export interface Details {
|
|
116
|
-
/** ID of the reservation location at which this reservation will be made. */
|
|
117
|
-
reservationLocationId?: string | null;
|
|
118
|
-
/** IDs of tables used for this reservation. */
|
|
119
|
-
tableIds?: string[] | null;
|
|
120
|
-
/** Start date and time of the reservation. */
|
|
121
|
-
startDate?: Date;
|
|
122
|
-
/** End date and time of the reservation. */
|
|
123
|
-
endDate?: Date;
|
|
124
|
-
/** Party size. */
|
|
125
|
-
partySize?: number | null;
|
|
126
|
-
}
|
|
127
|
-
/** The person the reservation is being made for. */
|
|
128
|
-
export interface Reservee {
|
|
129
|
-
/**
|
|
130
|
-
* First name.
|
|
131
|
-
*
|
|
132
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
133
|
-
*/
|
|
134
|
-
firstName?: string | null;
|
|
135
|
-
/** Last name. */
|
|
136
|
-
lastName?: string | null;
|
|
137
|
-
/** Email address. */
|
|
138
|
-
email?: string | null;
|
|
139
|
-
/**
|
|
140
|
-
* Phone number.
|
|
141
|
-
*
|
|
142
|
-
* This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`.
|
|
143
|
-
*
|
|
144
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
145
|
-
*/
|
|
146
|
-
phone?: string | null;
|
|
147
|
-
/** Whether the reservee has given marketing consent. */
|
|
148
|
-
marketingConsent?: boolean | null;
|
|
149
|
-
/**
|
|
150
|
-
* Custom fields for the reservee in key-value pairs.
|
|
151
|
-
*
|
|
152
|
-
* The key is the custom field's ID, and the value is the custom field's value. For example, a custom field for allergies might have the key-value pair `f4283b2d-6340-4cf9-bae7-8769e6b62127 : "Nuts, Seafood"`.
|
|
153
|
-
*
|
|
154
|
-
* Empty fields are not returned.
|
|
155
|
-
*/
|
|
156
|
-
customFields?: Record<string, any> | null;
|
|
157
|
-
/**
|
|
158
|
-
* Contact ID. If a contact with this ID does not exist on the site, one will be created.
|
|
159
|
-
* @readonly
|
|
160
|
-
*/
|
|
161
|
-
contactId?: string | null;
|
|
162
|
-
}
|
|
163
|
-
/** A person making reservation. */
|
|
164
|
-
export interface ReservedBy {
|
|
165
|
-
/**
|
|
166
|
-
* Contact ID for the person who made the reservation. If a contact with this ID does not exist on the site, one will be created.
|
|
167
|
-
* @readonly
|
|
168
|
-
*/
|
|
169
|
-
contactId?: string | null;
|
|
170
|
-
}
|
|
171
|
-
/** Migration note. */
|
|
172
|
-
export interface MigrationNote {
|
|
173
|
-
}
|
|
174
|
-
/** Table with reservation conflicts. */
|
|
175
|
-
export interface TableWithReservationConflicts {
|
|
176
|
-
/** Table id. */
|
|
177
|
-
tableId?: string;
|
|
178
|
-
/** List of reservation ids. */
|
|
179
|
-
reservationIds?: string[];
|
|
180
|
-
}
|
|
181
|
-
export declare enum PaymentStatus {
|
|
182
|
-
UNKNOWN = "UNKNOWN",
|
|
183
|
-
/** A reservation is free of charge. */
|
|
184
|
-
FREE = "FREE",
|
|
185
|
-
/** A payment is not received yet. */
|
|
186
|
-
NOT_PAID = "NOT_PAID",
|
|
187
|
-
/** A corresponding to reservation order was fully payed. */
|
|
188
|
-
PAID = "PAID",
|
|
189
|
-
/** A corresponding to reservation order was refunded, but refund amount is less than order total price. */
|
|
190
|
-
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
191
|
-
/** A corresponding to reservation order was fully refunded. The refund amount equals total price. */
|
|
192
|
-
FULLY_REFUNDED = "FULLY_REFUNDED",
|
|
193
|
-
/** A corresponding to reservation order was partially payed. */
|
|
194
|
-
PARTIALLY_PAID = "PARTIALLY_PAID"
|
|
195
|
-
}
|
|
196
|
-
export interface CreateReservationRequest {
|
|
197
|
-
/** Reservation details. */
|
|
198
|
-
reservation: Reservation;
|
|
199
|
-
/**
|
|
200
|
-
* Ignore table combination conflicts of the types included in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
201
|
-
*
|
|
202
|
-
* Possible values:
|
|
203
|
-
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
204
|
-
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
205
|
-
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
206
|
-
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
207
|
-
*/
|
|
208
|
-
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
209
|
-
/**
|
|
210
|
-
* Ignored reservation location conflicts of the types included in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
211
|
-
*
|
|
212
|
-
* Possible values:
|
|
213
|
-
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
214
|
-
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
215
|
-
*/
|
|
216
|
-
ignoreReservationLocationConflicts?: Type[];
|
|
217
|
-
}
|
|
218
|
-
export declare enum TableCombinationConflictType {
|
|
219
|
-
UNKNOWN = "UNKNOWN",
|
|
220
|
-
RESERVED = "RESERVED",
|
|
221
|
-
TOO_BIG = "TOO_BIG",
|
|
222
|
-
TOO_SMALL = "TOO_SMALL",
|
|
223
|
-
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
224
|
-
}
|
|
225
|
-
export declare enum Type {
|
|
226
|
-
UNKNOWN = "UNKNOWN",
|
|
227
|
-
PARTY_PACING = "PARTY_PACING",
|
|
228
|
-
SEAT_PACING = "SEAT_PACING"
|
|
229
|
-
}
|
|
230
|
-
export interface CreateReservationResponse {
|
|
231
|
-
/** Reservation. */
|
|
232
|
-
reservation?: Reservation;
|
|
233
|
-
}
|
|
234
|
-
export interface ReservationDetailsConflicts {
|
|
235
|
-
/** Table combinations conflicts. */
|
|
236
|
-
tableCombinationConflicts?: TableCombinationConflict[];
|
|
237
|
-
/** Reservation location conflicts. */
|
|
238
|
-
reservationLocationConflicts?: ReservationLocationConflict[];
|
|
239
|
-
}
|
|
240
|
-
export interface TableCombinationConflict {
|
|
241
|
-
/** Conflict type. */
|
|
242
|
-
type?: TableCombinationConflictType;
|
|
243
|
-
}
|
|
244
|
-
export interface ReservationLocationConflict {
|
|
245
|
-
/** Reservation location conflict type. */
|
|
246
|
-
type?: Type;
|
|
247
|
-
}
|
|
248
|
-
export interface GetReservationRequest {
|
|
249
|
-
/** Reservation ID. */
|
|
250
|
-
reservationId: string;
|
|
251
|
-
/**
|
|
252
|
-
* Array of named, predefined sets of projected fields to be returned.
|
|
253
|
-
*
|
|
254
|
-
* Supported values: `PUBLIC`, `FULL`.
|
|
255
|
-
*
|
|
256
|
-
* Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
|
|
257
|
-
*/
|
|
258
|
-
fieldsets?: Set[];
|
|
259
|
-
}
|
|
260
|
-
export declare enum Set {
|
|
261
|
-
PUBLIC = "PUBLIC",
|
|
262
|
-
FULL = "FULL"
|
|
263
|
-
}
|
|
264
|
-
export interface GetReservationResponse {
|
|
265
|
-
/** Reservation. */
|
|
266
|
-
reservation?: Reservation;
|
|
267
|
-
}
|
|
268
|
-
export interface UpdateReservationRequest {
|
|
269
|
-
/** Reservation information to update. */
|
|
270
|
-
reservation: Reservation;
|
|
271
|
-
/**
|
|
272
|
-
* Ignore table combination conflicts of the types included in the array. This ensures that the reservation is updated even if the given conflicts would normally prevent it.
|
|
273
|
-
*
|
|
274
|
-
* Possible values:
|
|
275
|
-
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
276
|
-
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
277
|
-
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
278
|
-
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
279
|
-
*/
|
|
280
|
-
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
281
|
-
/**
|
|
282
|
-
* Ignored reservation location conflicts of the types included in the array. This ensures that the reservation is updated even if the given conflicts would normally prevent it.
|
|
283
|
-
*
|
|
284
|
-
* Possible values:
|
|
285
|
-
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
286
|
-
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
287
|
-
*/
|
|
288
|
-
ignoreReservationLocationConflicts?: Type[];
|
|
289
|
-
}
|
|
290
|
-
export interface UpdateReservationResponse {
|
|
291
|
-
/** Reservation. */
|
|
292
|
-
reservation?: Reservation;
|
|
293
|
-
}
|
|
294
|
-
export interface ReservationDataUpdated {
|
|
295
|
-
/** Reserved reservation. */
|
|
296
|
-
reservation?: Reservation;
|
|
297
|
-
/** Old reservation. */
|
|
298
|
-
oldReservation?: Reservation;
|
|
299
|
-
}
|
|
300
|
-
export interface CreateHeldReservationRequest {
|
|
301
|
-
/** Held reservation information to update. */
|
|
302
|
-
reservationDetails: HeldReservationDetails;
|
|
303
|
-
}
|
|
304
|
-
/** Reservation details when create reservation in status HELD. */
|
|
305
|
-
export interface HeldReservationDetails {
|
|
306
|
-
/** ID of the reservation location where the reservation is made. */
|
|
307
|
-
reservationLocationId?: string | null;
|
|
308
|
-
/** Start date and time of the reservation. */
|
|
309
|
-
startDate?: Date;
|
|
310
|
-
/** Party size. */
|
|
311
|
-
partySize?: number | null;
|
|
312
|
-
}
|
|
313
|
-
export interface CreateHeldReservationResponse {
|
|
314
|
-
/** Reservation. */
|
|
315
|
-
reservation?: Reservation;
|
|
316
|
-
}
|
|
317
|
-
export interface ReserveReservationRequest {
|
|
318
|
-
/** Reservation ID. */
|
|
319
|
-
reservationId: string;
|
|
320
|
-
/** Reservee details. */
|
|
321
|
-
reservee: Reservee;
|
|
322
|
-
/**
|
|
323
|
-
* Revision number.
|
|
324
|
-
*
|
|
325
|
-
* Include the existing `revision` to prevent conflicting updates to reservations.
|
|
326
|
-
*/
|
|
327
|
-
revision: string | null;
|
|
328
|
-
}
|
|
329
|
-
export interface ReserveReservationResponse {
|
|
330
|
-
/** Reservation. */
|
|
331
|
-
reservation?: Reservation;
|
|
332
|
-
}
|
|
333
|
-
export interface ReservationReserved {
|
|
334
|
-
/** Reserved reservation. */
|
|
335
|
-
reservation?: Reservation;
|
|
336
|
-
}
|
|
337
|
-
export interface CancelReservationRequest {
|
|
338
|
-
/** Reservation ID. */
|
|
339
|
-
reservationId: string;
|
|
340
|
-
/**
|
|
341
|
-
* Revision number.
|
|
342
|
-
*
|
|
343
|
-
* Include the existing `revision` to prevent conflicting updates to reservations.
|
|
344
|
-
*/
|
|
345
|
-
revision: string | null;
|
|
346
|
-
/**
|
|
347
|
-
* The phone number that was provided when the reservation was created.
|
|
348
|
-
*
|
|
349
|
-
* This is required for reservations with any `source` other than `WALK_IN`.
|
|
350
|
-
*
|
|
351
|
-
* This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
|
|
352
|
-
*/
|
|
353
|
-
phone?: string | null;
|
|
354
|
-
}
|
|
355
|
-
export interface CancelReservationResponse {
|
|
356
|
-
/** Reservation. */
|
|
357
|
-
reservation?: Reservation;
|
|
358
|
-
}
|
|
359
|
-
export interface ReservationCanceled {
|
|
360
|
-
/** Reserved reservation. */
|
|
361
|
-
reservation?: Reservation;
|
|
362
|
-
}
|
|
363
|
-
export interface DeleteReservationRequest {
|
|
364
|
-
/** Reservation ID. */
|
|
365
|
-
reservationId?: string;
|
|
366
|
-
revision?: string;
|
|
367
|
-
}
|
|
368
|
-
export interface DeleteReservationResponse {
|
|
369
|
-
}
|
|
370
|
-
export interface ListReservationsRequest {
|
|
371
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
372
|
-
paging?: CursorPaging;
|
|
373
|
-
/** Defines how reservations in the response are sorted. */
|
|
374
|
-
sort?: Sorting;
|
|
375
|
-
/** Only reservations starting after this date are returned. */
|
|
376
|
-
startDateFrom?: Date;
|
|
377
|
-
/** Only reservations starting before this date are returned. */
|
|
378
|
-
startDateTo?: Date;
|
|
379
|
-
/**
|
|
380
|
-
* Only reservations with this status are returned.
|
|
381
|
-
*
|
|
382
|
-
* * `HELD`: The reservation is temporary and will expire in 10 minutes if its status isn’t changed. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request.
|
|
383
|
-
* * `REQUESTED`: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request.
|
|
384
|
-
* * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
|
|
385
|
-
* * `RESERVED`: The reservation is confirmed.
|
|
386
|
-
* * `SEATED`: The customer is currently occupying the table.
|
|
387
|
-
* * `CANCELED`: The reservation is canceled.
|
|
388
|
-
* * `NO_SHOW`: The customer didn't show up for their reservation.
|
|
389
|
-
* * `FINISHED`: The reservation completed successfully.
|
|
390
|
-
*/
|
|
391
|
-
status?: Status;
|
|
392
|
-
}
|
|
393
|
-
export interface CursorPaging {
|
|
394
|
-
/** Number of items to load. */
|
|
395
|
-
limit?: number | null;
|
|
396
|
-
/**
|
|
397
|
-
* Pointer to the next or previous page in the list of results.
|
|
398
|
-
*
|
|
399
|
-
* You can get the relevant cursor token
|
|
400
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
401
|
-
* Not relevant for the first request.
|
|
402
|
-
*/
|
|
403
|
-
cursor?: string | null;
|
|
404
|
-
}
|
|
405
|
-
export interface Sorting {
|
|
406
|
-
/** Name of the field to sort by. */
|
|
407
|
-
fieldName?: string;
|
|
408
|
-
/**
|
|
409
|
-
* Sort order.
|
|
410
|
-
*
|
|
411
|
-
* Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`.
|
|
412
|
-
*/
|
|
413
|
-
order?: SortOrder;
|
|
414
|
-
}
|
|
415
|
-
export declare enum SortOrder {
|
|
416
|
-
ASC = "ASC",
|
|
417
|
-
DESC = "DESC"
|
|
418
|
-
}
|
|
419
|
-
export interface ListReservationsResponse {
|
|
420
|
-
/** List of reservations. */
|
|
421
|
-
reservations?: Reservation[];
|
|
422
|
-
/** Metadata for the paginated results. */
|
|
423
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
424
|
-
}
|
|
425
|
-
export interface CursorPagingMetadata {
|
|
426
|
-
/** Number of items returned in the response. */
|
|
427
|
-
count?: number | null;
|
|
428
|
-
/** Offset that was requested. */
|
|
429
|
-
cursors?: Cursors;
|
|
430
|
-
/**
|
|
431
|
-
* Indicates if there are more results after the current page.
|
|
432
|
-
* If `true`, another page of results can be retrieved.
|
|
433
|
-
* If `false`, this is the last page.
|
|
434
|
-
*/
|
|
435
|
-
hasNext?: boolean | null;
|
|
436
|
-
}
|
|
437
|
-
export interface Cursors {
|
|
438
|
-
/** Cursor pointing to next page in the list of results. */
|
|
439
|
-
next?: string | null;
|
|
440
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
441
|
-
prev?: string | null;
|
|
442
|
-
}
|
|
443
|
-
export interface QueryReservationsRequest {
|
|
444
|
-
/** Query to select reservations. */
|
|
445
|
-
query: CursorQuery;
|
|
446
|
-
}
|
|
447
|
-
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
448
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
449
|
-
cursorPaging?: CursorPaging;
|
|
450
|
-
/**
|
|
451
|
-
* Filter object in the following format:
|
|
452
|
-
* `"filter" : {
|
|
453
|
-
* "fieldName1": "value1",
|
|
454
|
-
* "fieldName2":{"$operator":"value2"}
|
|
455
|
-
* }`
|
|
456
|
-
*
|
|
457
|
-
* 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/sorting-and-filtering) article.
|
|
458
|
-
* To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
459
|
-
*/
|
|
460
|
-
filter?: Record<string, any> | null;
|
|
461
|
-
/**
|
|
462
|
-
* Sort object in the following format:
|
|
463
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
464
|
-
*/
|
|
465
|
-
sort?: Sorting[];
|
|
466
|
-
}
|
|
467
|
-
/** @oneof */
|
|
468
|
-
export interface CursorQueryPagingMethodOneOf {
|
|
469
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
470
|
-
cursorPaging?: CursorPaging;
|
|
471
|
-
}
|
|
472
|
-
export interface QueryReservationsResponse {
|
|
473
|
-
/** List of reservations. */
|
|
474
|
-
reservations?: Reservation[];
|
|
475
|
-
/** Metadata for the paginated results. */
|
|
476
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
477
|
-
}
|
|
478
|
-
export interface SearchReservationsRequest {
|
|
479
|
-
/** Search query. */
|
|
480
|
-
search: CursorSearch;
|
|
481
|
-
}
|
|
482
|
-
export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
483
|
-
/** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort' */
|
|
484
|
-
cursorPaging?: CursorPaging;
|
|
485
|
-
/** A filter object. See the filter section [here](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/wix-api-basics/1011-wql-wix-query-language) */
|
|
486
|
-
filter?: Record<string, any> | null;
|
|
487
|
-
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
|
488
|
-
sort?: Sorting[];
|
|
489
|
-
/** Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. */
|
|
490
|
-
aggregations?: Aggregation[];
|
|
491
|
-
/** free text to match in searchable fields */
|
|
492
|
-
search?: SearchDetails;
|
|
493
|
-
/** Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. */
|
|
494
|
-
timeZone?: string | null;
|
|
495
|
-
}
|
|
496
|
-
/** @oneof */
|
|
497
|
-
export interface CursorSearchPagingMethodOneOf {
|
|
498
|
-
/** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort' */
|
|
499
|
-
cursorPaging?: CursorPaging;
|
|
500
|
-
}
|
|
501
|
-
export interface Aggregation extends AggregationKindOneOf {
|
|
502
|
-
value?: ValueAggregation;
|
|
503
|
-
range?: RangeAggregation;
|
|
504
|
-
scalar?: ScalarAggregation;
|
|
505
|
-
dateHistogram?: DateHistogramAggregation;
|
|
506
|
-
nested?: NestedAggregation;
|
|
507
|
-
name?: string | null;
|
|
508
|
-
type?: AggregationType;
|
|
509
|
-
fieldPath?: string;
|
|
510
|
-
groupBy?: GroupByAggregation;
|
|
511
|
-
}
|
|
512
|
-
/** @oneof */
|
|
513
|
-
export interface AggregationKindOneOf {
|
|
514
|
-
value?: ValueAggregation;
|
|
515
|
-
range?: RangeAggregation;
|
|
516
|
-
scalar?: ScalarAggregation;
|
|
517
|
-
dateHistogram?: DateHistogramAggregation;
|
|
518
|
-
nested?: NestedAggregation;
|
|
519
|
-
}
|
|
520
|
-
export interface RangeBucket {
|
|
521
|
-
/** Inclusive lower bound of the range. Required if to is not given. */
|
|
522
|
-
from?: number | null;
|
|
523
|
-
/** Exclusive upper bound of the range. Required if from is not given. */
|
|
524
|
-
to?: number | null;
|
|
525
|
-
}
|
|
526
|
-
export declare enum SortType {
|
|
527
|
-
COUNT = "COUNT",
|
|
528
|
-
VALUE = "VALUE"
|
|
529
|
-
}
|
|
530
|
-
export declare enum SortDirection {
|
|
531
|
-
DESC = "DESC",
|
|
532
|
-
ASC = "ASC"
|
|
533
|
-
}
|
|
534
|
-
export declare enum MissingValues {
|
|
535
|
-
EXCLUDE = "EXCLUDE",
|
|
536
|
-
INCLUDE = "INCLUDE"
|
|
537
|
-
}
|
|
538
|
-
export interface IncludeMissingValuesOptions {
|
|
539
|
-
/** can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... */
|
|
540
|
-
addToBucket?: string;
|
|
541
|
-
}
|
|
542
|
-
export declare enum ScalarType {
|
|
543
|
-
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
544
|
-
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
545
|
-
MIN = "MIN",
|
|
546
|
-
MAX = "MAX",
|
|
547
|
-
SUM = "SUM",
|
|
548
|
-
AVG = "AVG"
|
|
549
|
-
}
|
|
550
|
-
export interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
551
|
-
/** options for including missing values */
|
|
552
|
-
includeOptions?: IncludeMissingValuesOptions;
|
|
553
|
-
sortType?: SortType;
|
|
554
|
-
sortDirection?: SortDirection;
|
|
555
|
-
/** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
|
|
556
|
-
limit?: number | null;
|
|
557
|
-
/** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
|
|
558
|
-
missingValues?: MissingValues;
|
|
559
|
-
}
|
|
560
|
-
/** @oneof */
|
|
561
|
-
export interface ValueAggregationOptionsOneOf {
|
|
562
|
-
/** options for including missing values */
|
|
563
|
-
includeOptions?: IncludeMissingValuesOptions;
|
|
564
|
-
}
|
|
565
|
-
export declare enum NestedAggregationType {
|
|
566
|
-
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
567
|
-
VALUE = "VALUE",
|
|
568
|
-
RANGE = "RANGE",
|
|
569
|
-
SCALAR = "SCALAR",
|
|
570
|
-
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
571
|
-
}
|
|
572
|
-
export interface RangeAggregation {
|
|
573
|
-
buckets?: RangeBucket[];
|
|
574
|
-
}
|
|
575
|
-
export interface ScalarAggregation {
|
|
576
|
-
type?: ScalarType;
|
|
577
|
-
}
|
|
578
|
-
export interface DateHistogramAggregation {
|
|
579
|
-
interval?: Interval;
|
|
580
|
-
}
|
|
581
|
-
export declare enum Interval {
|
|
582
|
-
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
583
|
-
YEAR = "YEAR",
|
|
584
|
-
MONTH = "MONTH",
|
|
585
|
-
WEEK = "WEEK",
|
|
586
|
-
DAY = "DAY",
|
|
587
|
-
HOUR = "HOUR",
|
|
588
|
-
MINUTE = "MINUTE",
|
|
589
|
-
SECOND = "SECOND"
|
|
590
|
-
}
|
|
591
|
-
export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
592
|
-
value?: ValueAggregation;
|
|
593
|
-
range?: RangeAggregation;
|
|
594
|
-
scalar?: ScalarAggregation;
|
|
595
|
-
dateHistogram?: DateHistogramAggregation;
|
|
596
|
-
name?: string | null;
|
|
597
|
-
type?: NestedAggregationType;
|
|
598
|
-
fieldPath?: string;
|
|
599
|
-
}
|
|
600
|
-
/** @oneof */
|
|
601
|
-
export interface NestedAggregationItemKindOneOf {
|
|
602
|
-
value?: ValueAggregation;
|
|
603
|
-
range?: RangeAggregation;
|
|
604
|
-
scalar?: ScalarAggregation;
|
|
605
|
-
dateHistogram?: DateHistogramAggregation;
|
|
606
|
-
}
|
|
607
|
-
export declare enum AggregationType {
|
|
608
|
-
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
609
|
-
VALUE = "VALUE",
|
|
610
|
-
RANGE = "RANGE",
|
|
611
|
-
SCALAR = "SCALAR",
|
|
612
|
-
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
613
|
-
NESTED = "NESTED"
|
|
614
|
-
}
|
|
615
|
-
export interface NestedAggregation {
|
|
616
|
-
nestedAggregations?: NestedAggregationItem[];
|
|
617
|
-
}
|
|
618
|
-
export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
619
|
-
value?: ValueAggregation;
|
|
620
|
-
name?: string | null;
|
|
621
|
-
fieldPath?: string;
|
|
622
|
-
}
|
|
623
|
-
/** @oneof */
|
|
624
|
-
export interface GroupByAggregationKindOneOf {
|
|
625
|
-
value?: ValueAggregation;
|
|
626
|
-
}
|
|
627
|
-
export interface SearchDetails {
|
|
628
|
-
/** boolean search mode */
|
|
629
|
-
mode?: Mode;
|
|
630
|
-
/** search term or expression */
|
|
631
|
-
expression?: string | null;
|
|
632
|
-
/** fields to search in. if empty - server will search in own default fields */
|
|
633
|
-
fields?: string[];
|
|
634
|
-
/** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
635
|
-
fuzzy?: boolean;
|
|
636
|
-
}
|
|
637
|
-
export declare enum Mode {
|
|
638
|
-
/** any */
|
|
639
|
-
OR = "OR",
|
|
640
|
-
/** all */
|
|
641
|
-
AND = "AND"
|
|
642
|
-
}
|
|
643
|
-
export interface SearchReservationsResponse {
|
|
644
|
-
/** List of Reservations. */
|
|
645
|
-
reservations?: Reservation[];
|
|
646
|
-
/** Cursor paging metadata. */
|
|
647
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
648
|
-
/** Aggregation data. */
|
|
649
|
-
aggregationData?: AggregationData;
|
|
650
|
-
}
|
|
651
|
-
export interface AggregationData {
|
|
652
|
-
/** key = aggregation name (as derived from search request) */
|
|
653
|
-
results?: AggregationResults[];
|
|
654
|
-
}
|
|
655
|
-
export interface ValueAggregationResult {
|
|
656
|
-
value?: string;
|
|
657
|
-
count?: number;
|
|
658
|
-
}
|
|
659
|
-
export interface RangeAggregationResult {
|
|
660
|
-
from?: number | null;
|
|
661
|
-
to?: number | null;
|
|
662
|
-
count?: number;
|
|
663
|
-
}
|
|
664
|
-
export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
665
|
-
values?: ValueResults;
|
|
666
|
-
ranges?: RangeResults;
|
|
667
|
-
scalar?: ScalarResult;
|
|
668
|
-
name?: string;
|
|
669
|
-
type?: AggregationType;
|
|
670
|
-
fieldPath?: string;
|
|
671
|
-
}
|
|
672
|
-
/** @oneof */
|
|
673
|
-
export interface NestedAggregationResultsResultOneOf {
|
|
674
|
-
values?: ValueResults;
|
|
675
|
-
ranges?: RangeResults;
|
|
676
|
-
scalar?: ScalarResult;
|
|
677
|
-
}
|
|
678
|
-
export interface ValueResults {
|
|
679
|
-
results?: ValueAggregationResult[];
|
|
680
|
-
}
|
|
681
|
-
export interface RangeResults {
|
|
682
|
-
results?: RangeAggregationResult[];
|
|
683
|
-
}
|
|
684
|
-
export interface ScalarResult {
|
|
685
|
-
type?: ScalarType;
|
|
686
|
-
value?: number;
|
|
687
|
-
}
|
|
688
|
-
export interface NestedValueAggregationResult {
|
|
689
|
-
value?: string;
|
|
690
|
-
nestedResults?: NestedAggregationResults;
|
|
691
|
-
}
|
|
692
|
-
export interface ValueResult {
|
|
693
|
-
value?: string;
|
|
694
|
-
count?: number | null;
|
|
695
|
-
}
|
|
696
|
-
export interface RangeResult {
|
|
697
|
-
from?: number | null;
|
|
698
|
-
to?: number | null;
|
|
699
|
-
count?: number | null;
|
|
700
|
-
}
|
|
701
|
-
export interface NestedResultsScalarResult {
|
|
702
|
-
value?: number;
|
|
703
|
-
}
|
|
704
|
-
export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
705
|
-
value?: ValueResult;
|
|
706
|
-
range?: RangeResult;
|
|
707
|
-
scalar?: NestedResultsScalarResult;
|
|
708
|
-
dateHistogram?: ValueResult;
|
|
709
|
-
}
|
|
710
|
-
/** @oneof */
|
|
711
|
-
export interface NestedResultValueResultOneOf {
|
|
712
|
-
value?: ValueResult;
|
|
713
|
-
range?: RangeResult;
|
|
714
|
-
scalar?: NestedResultsScalarResult;
|
|
715
|
-
dateHistogram?: ValueResult;
|
|
716
|
-
}
|
|
717
|
-
export interface Results {
|
|
718
|
-
results?: Record<string, NestedResultValue>;
|
|
719
|
-
}
|
|
720
|
-
export interface DateHistogramResult {
|
|
721
|
-
value?: string;
|
|
722
|
-
count?: number;
|
|
723
|
-
}
|
|
724
|
-
export interface GroupByValueResults {
|
|
725
|
-
results?: NestedValueAggregationResult[];
|
|
726
|
-
}
|
|
727
|
-
export interface DateHistogramResults {
|
|
728
|
-
results?: DateHistogramResult[];
|
|
729
|
-
}
|
|
730
|
-
export interface NestedResults {
|
|
731
|
-
results?: Results[];
|
|
732
|
-
}
|
|
733
|
-
export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
734
|
-
values?: ValueResults;
|
|
735
|
-
ranges?: RangeResults;
|
|
736
|
-
scalar?: ScalarResult;
|
|
737
|
-
groupedByValue?: GroupByValueResults;
|
|
738
|
-
dateHistogram?: DateHistogramResults;
|
|
739
|
-
nested?: NestedResults;
|
|
740
|
-
name?: string;
|
|
741
|
-
type?: AggregationType;
|
|
742
|
-
fieldPath?: string;
|
|
743
|
-
}
|
|
744
|
-
/** @oneof */
|
|
745
|
-
export interface AggregationResultsResultOneOf {
|
|
746
|
-
values?: ValueResults;
|
|
747
|
-
ranges?: RangeResults;
|
|
748
|
-
scalar?: ScalarResult;
|
|
749
|
-
groupedByValue?: GroupByValueResults;
|
|
750
|
-
dateHistogram?: DateHistogramResults;
|
|
751
|
-
nested?: NestedResults;
|
|
752
|
-
}
|
|
753
|
-
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
|
754
|
-
/** Information about the reservation that was created and event metadata. */
|
|
755
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
756
|
-
/** Information about the reservation that was updated and event metadata. */
|
|
757
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
758
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
759
|
-
actionEvent?: ActionEvent<T>;
|
|
760
|
-
/**
|
|
761
|
-
* Unique event ID.
|
|
762
|
-
* Allows clients to ignore duplicate webhooks.
|
|
763
|
-
*/
|
|
764
|
-
_id?: string;
|
|
765
|
-
/**
|
|
766
|
-
* Assumes actions are also always typed to an entity_type
|
|
767
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
768
|
-
*/
|
|
769
|
-
entityFqdn?: string;
|
|
770
|
-
/**
|
|
771
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
772
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
773
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
774
|
-
*/
|
|
775
|
-
slug?: string;
|
|
776
|
-
/** ID of the entity associated with the event. */
|
|
777
|
-
entityId?: string;
|
|
778
|
-
/** Event timestamp. */
|
|
779
|
-
eventTime?: Date;
|
|
780
|
-
/**
|
|
781
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
782
|
-
* (for example, GDPR).
|
|
783
|
-
*/
|
|
784
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
785
|
-
/** If present, indicates the action that triggered the event. */
|
|
786
|
-
originatedFrom?: string | null;
|
|
787
|
-
/**
|
|
788
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
789
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
790
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
791
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
792
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
793
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
794
|
-
*/
|
|
795
|
-
entityEventSequence?: string | null;
|
|
796
|
-
}
|
|
797
|
-
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
798
|
-
}
|
|
799
|
-
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
|
800
|
-
}
|
|
801
|
-
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
|
802
|
-
}
|
|
803
|
-
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
|
804
|
-
}
|
|
805
|
-
/** @oneof */
|
|
806
|
-
export interface DomainEventBodyOneOf<T> {
|
|
807
|
-
createdEvent?: EntityCreatedEvent<T>;
|
|
808
|
-
updatedEvent?: EntityUpdatedEvent<T>;
|
|
809
|
-
deletedEvent?: EntityDeletedEvent<T>;
|
|
810
|
-
actionEvent?: ActionEvent<T>;
|
|
811
|
-
}
|
|
812
|
-
export interface EntityCreatedEvent<T> {
|
|
813
|
-
entity?: T;
|
|
814
|
-
}
|
|
815
|
-
export interface EntityUpdatedEvent<T> {
|
|
816
|
-
/**
|
|
817
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
818
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
819
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
820
|
-
*/
|
|
821
|
-
currentEntity?: T;
|
|
822
|
-
}
|
|
823
|
-
export interface EntityDeletedEvent<T> {
|
|
824
|
-
/** Entity that was deleted */
|
|
825
|
-
deletedEntity?: T | null;
|
|
826
|
-
}
|
|
827
|
-
export interface ActionEvent<T> {
|
|
828
|
-
body?: T;
|
|
829
|
-
}
|
|
830
|
-
export interface Empty {
|
|
831
|
-
}
|
|
832
|
-
export interface RemoveReservationMigrationNotesRequest {
|
|
833
|
-
/** Reservation ID. */
|
|
834
|
-
reservationId?: string;
|
|
835
|
-
/** Revision. */
|
|
836
|
-
revision?: string;
|
|
837
|
-
}
|
|
838
|
-
export interface RemoveReservationMigrationNotesResponse {
|
|
839
|
-
reservation?: Reservation;
|
|
840
|
-
}
|
|
841
|
-
export interface CreateReservationResponseNonNullableFields {
|
|
842
|
-
reservation?: {
|
|
843
|
-
status: Status;
|
|
844
|
-
source: Source;
|
|
845
|
-
paymentStatus: PaymentStatus;
|
|
846
|
-
};
|
|
847
|
-
}
|
|
848
|
-
export interface GetReservationResponseNonNullableFields {
|
|
849
|
-
reservation?: {
|
|
850
|
-
status: Status;
|
|
851
|
-
source: Source;
|
|
852
|
-
paymentStatus: PaymentStatus;
|
|
853
|
-
};
|
|
854
|
-
}
|
|
855
|
-
export interface UpdateReservationResponseNonNullableFields {
|
|
856
|
-
reservation?: {
|
|
857
|
-
status: Status;
|
|
858
|
-
source: Source;
|
|
859
|
-
paymentStatus: PaymentStatus;
|
|
860
|
-
};
|
|
861
|
-
}
|
|
862
|
-
export interface CreateHeldReservationResponseNonNullableFields {
|
|
863
|
-
reservation?: {
|
|
864
|
-
status: Status;
|
|
865
|
-
source: Source;
|
|
866
|
-
paymentStatus: PaymentStatus;
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
export interface ReserveReservationResponseNonNullableFields {
|
|
870
|
-
reservation?: {
|
|
871
|
-
status: Status;
|
|
872
|
-
source: Source;
|
|
873
|
-
paymentStatus: PaymentStatus;
|
|
874
|
-
};
|
|
875
|
-
}
|
|
876
|
-
export interface CancelReservationResponseNonNullableFields {
|
|
877
|
-
reservation?: {
|
|
878
|
-
status: Status;
|
|
879
|
-
source: Source;
|
|
880
|
-
paymentStatus: PaymentStatus;
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
export interface ListReservationsResponseNonNullableFields {
|
|
884
|
-
reservations: {
|
|
885
|
-
status: Status;
|
|
886
|
-
source: Source;
|
|
887
|
-
paymentStatus: PaymentStatus;
|
|
888
|
-
}[];
|
|
889
|
-
}
|
|
890
|
-
export interface QueryReservationsResponseNonNullableFields {
|
|
891
|
-
reservations: {
|
|
892
|
-
status: Status;
|
|
893
|
-
source: Source;
|
|
894
|
-
paymentStatus: PaymentStatus;
|
|
895
|
-
}[];
|
|
896
|
-
}
|
|
897
|
-
export interface SearchReservationsResponseNonNullableFields {
|
|
898
|
-
reservations: {
|
|
899
|
-
status: Status;
|
|
900
|
-
source: Source;
|
|
901
|
-
paymentStatus: PaymentStatus;
|
|
902
|
-
}[];
|
|
903
|
-
aggregationData?: {
|
|
904
|
-
results: {
|
|
905
|
-
values?: {
|
|
906
|
-
results: {
|
|
907
|
-
value: string;
|
|
908
|
-
count: number;
|
|
909
|
-
}[];
|
|
910
|
-
};
|
|
911
|
-
ranges?: {
|
|
912
|
-
results: {
|
|
913
|
-
count: number;
|
|
914
|
-
}[];
|
|
915
|
-
};
|
|
916
|
-
scalar?: {
|
|
917
|
-
type: ScalarType;
|
|
918
|
-
value: number;
|
|
919
|
-
};
|
|
920
|
-
groupedByValue?: {
|
|
921
|
-
results: {
|
|
922
|
-
value: string;
|
|
923
|
-
nestedResults?: {
|
|
924
|
-
values?: {
|
|
925
|
-
results: {
|
|
926
|
-
value: string;
|
|
927
|
-
count: number;
|
|
928
|
-
}[];
|
|
929
|
-
};
|
|
930
|
-
ranges?: {
|
|
931
|
-
results: {
|
|
932
|
-
count: number;
|
|
933
|
-
}[];
|
|
934
|
-
};
|
|
935
|
-
scalar?: {
|
|
936
|
-
type: ScalarType;
|
|
937
|
-
value: number;
|
|
938
|
-
};
|
|
939
|
-
name: string;
|
|
940
|
-
type: AggregationType;
|
|
941
|
-
fieldPath: string;
|
|
942
|
-
};
|
|
943
|
-
}[];
|
|
944
|
-
};
|
|
945
|
-
dateHistogram?: {
|
|
946
|
-
results: {
|
|
947
|
-
value: string;
|
|
948
|
-
count: number;
|
|
949
|
-
}[];
|
|
950
|
-
};
|
|
951
|
-
nested?: {
|
|
952
|
-
results: {
|
|
953
|
-
results?: {
|
|
954
|
-
value?: {
|
|
955
|
-
value: string;
|
|
956
|
-
};
|
|
957
|
-
scalar?: {
|
|
958
|
-
value: number;
|
|
959
|
-
};
|
|
960
|
-
dateHistogram?: {
|
|
961
|
-
value: string;
|
|
962
|
-
};
|
|
963
|
-
};
|
|
964
|
-
}[];
|
|
965
|
-
};
|
|
966
|
-
name: string;
|
|
967
|
-
type: AggregationType;
|
|
968
|
-
fieldPath: string;
|
|
969
|
-
}[];
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
export declare const onReservationCreated: EventDefinition<DomainCreatedEvent<Reservation>, "wix.table_reservations.v1.reservation_created">;
|
|
973
|
-
export declare const onReservationUpdated: EventDefinition<DomainUpdatedEvent<Reservation>, "wix.table_reservations.v1.reservation_updated">;
|
|
974
|
-
/**
|
|
975
|
-
* Creates a new reservation.
|
|
976
|
-
*
|
|
977
|
-
* `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.
|
|
978
|
-
*
|
|
979
|
-
* **Status and source**
|
|
980
|
-
*
|
|
981
|
-
* If a `status` is not provided, it will be set to:
|
|
982
|
-
* * `RESERVED` if manual approval is not required for confirmation
|
|
983
|
-
* * `REQUESTED` if manual approval is required for confirmation.
|
|
984
|
-
*
|
|
985
|
-
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
986
|
-
* Attempting to create a reservation without these fields will result in an error.
|
|
987
|
-
*
|
|
988
|
-
* **Permissions**
|
|
989
|
-
*
|
|
990
|
-
* Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.
|
|
991
|
-
*
|
|
992
|
-
* If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.
|
|
993
|
-
*
|
|
994
|
-
*
|
|
995
|
-
* > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.
|
|
996
|
-
* @param reservation - Reservation details.
|
|
997
|
-
* @public
|
|
998
|
-
* @documentationMaturity preview
|
|
999
|
-
* @requiredField reservation
|
|
1000
|
-
* @requiredField reservation.details
|
|
1001
|
-
* @requiredField reservation.details.partySize
|
|
1002
|
-
* @requiredField reservation.details.reservationLocationId
|
|
1003
|
-
* @requiredField reservation.details.startDate
|
|
1004
|
-
* @param options - Options for creating the reservation.
|
|
1005
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1006
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1007
|
-
* @permissionScope Manage Reservations (Full)
|
|
1008
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1009
|
-
* @permissionScope Manage Reservations (Basic)
|
|
1010
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1011
|
-
* @permissionScope Manage Reservations (Full)
|
|
1012
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1013
|
-
* @applicableIdentity APP
|
|
1014
|
-
* @applicableIdentity MEMBER
|
|
1015
|
-
* @applicableIdentity VISITOR
|
|
1016
|
-
* @returns Reservation.
|
|
1017
|
-
*/
|
|
1018
|
-
export declare function createReservation(reservation: Reservation, options?: CreateReservationOptions): Promise<Reservation & NonNullable<CreateReservationResponseNonNullableFields>['reservation']>;
|
|
1019
|
-
export interface CreateReservationOptions {
|
|
1020
|
-
/**
|
|
1021
|
-
* Ignore table combination conflicts of the types included in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
1022
|
-
*
|
|
1023
|
-
* Possible values:
|
|
1024
|
-
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
1025
|
-
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
1026
|
-
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
1027
|
-
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
1028
|
-
*/
|
|
1029
|
-
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
1030
|
-
/**
|
|
1031
|
-
* Ignored reservation location conflicts of the types included in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
1032
|
-
*
|
|
1033
|
-
* Possible values:
|
|
1034
|
-
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
1035
|
-
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
1036
|
-
*/
|
|
1037
|
-
ignoreReservationLocationConflicts?: Type[];
|
|
1038
|
-
}
|
|
1039
|
-
/**
|
|
1040
|
-
* Retrieves a reservation.
|
|
1041
|
-
*
|
|
1042
|
-
* Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
|
|
1043
|
-
* @param reservationId - Reservation ID.
|
|
1044
|
-
* @public
|
|
1045
|
-
* @documentationMaturity preview
|
|
1046
|
-
* @requiredField reservationId
|
|
1047
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1048
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1049
|
-
* @permissionScope Manage Reservations (Full)
|
|
1050
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1051
|
-
* @permissionScope Manage Reservations (Basic)
|
|
1052
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1053
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1054
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1055
|
-
* @permissionScope Manage Reservations (Full)
|
|
1056
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1057
|
-
* @applicableIdentity APP
|
|
1058
|
-
* @applicableIdentity MEMBER
|
|
1059
|
-
* @applicableIdentity VISITOR
|
|
1060
|
-
* @returns Reservation.
|
|
1061
|
-
*/
|
|
1062
|
-
export declare function getReservation(reservationId: string, options?: GetReservationOptions): Promise<Reservation & NonNullable<GetReservationResponseNonNullableFields>['reservation']>;
|
|
1063
|
-
export interface GetReservationOptions {
|
|
1064
|
-
/**
|
|
1065
|
-
* Array of named, predefined sets of projected fields to be returned.
|
|
1066
|
-
*
|
|
1067
|
-
* Supported values: `PUBLIC`, `FULL`.
|
|
1068
|
-
*
|
|
1069
|
-
* Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
|
|
1070
|
-
*/
|
|
1071
|
-
fieldsets?: Set[];
|
|
1072
|
-
}
|
|
1073
|
-
/**
|
|
1074
|
-
* Updates a reservation.
|
|
1075
|
-
*
|
|
1076
|
-
* Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.
|
|
1077
|
-
*
|
|
1078
|
-
* 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.
|
|
1079
|
-
* @param _id - Reservation ID.
|
|
1080
|
-
* @public
|
|
1081
|
-
* @documentationMaturity preview
|
|
1082
|
-
* @requiredField _id
|
|
1083
|
-
* @requiredField reservation
|
|
1084
|
-
* @requiredField reservation.revision
|
|
1085
|
-
* @param options - Options for updating the reservation.
|
|
1086
|
-
* @param reservation - Reservation information to update.
|
|
1087
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1088
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1089
|
-
* @permissionScope Manage Reservations (Full)
|
|
1090
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1091
|
-
* @permissionScope Manage Reservations (Full)
|
|
1092
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1093
|
-
* @applicableIdentity APP
|
|
1094
|
-
* @returns Reservation.
|
|
1095
|
-
*/
|
|
1096
|
-
export declare function updateReservation(_id: string | null, reservation: UpdateReservation, options?: UpdateReservationOptions): Promise<Reservation & NonNullable<UpdateReservationResponseNonNullableFields>['reservation']>;
|
|
1097
|
-
export interface UpdateReservation {
|
|
1098
|
-
/**
|
|
1099
|
-
* Reservation ID.
|
|
1100
|
-
* @readonly
|
|
1101
|
-
*/
|
|
1102
|
-
_id?: string | null;
|
|
1103
|
-
/**
|
|
1104
|
-
* Status of the reservation.
|
|
1105
|
-
*
|
|
1106
|
-
* See the article for this API titled "The Reservation Lifecycle" in the menu on the left for more details on each of the statuses, and an explanation of the reservation lifecycle.
|
|
1107
|
-
*/
|
|
1108
|
-
status?: Status;
|
|
1109
|
-
/**
|
|
1110
|
-
* Reservation source.
|
|
1111
|
-
*
|
|
1112
|
-
* This indicates how the reservation was made.
|
|
1113
|
-
* * `ONLINE` indicates that the customer made the reservation through a website or app.
|
|
1114
|
-
* * `OFFLINE` indicates that the reservation was made by a restaurant employee, for example when a customer calls to make a reservation.
|
|
1115
|
-
* * `WALK-IN` indicates that the customer did not make a reservation beforehand, and the reservation was entered into the system by a restaurant employee when the customer arrived at the restaurant.
|
|
1116
|
-
*/
|
|
1117
|
-
source?: Source;
|
|
1118
|
-
/** Reservation details. */
|
|
1119
|
-
details?: Details;
|
|
1120
|
-
/**
|
|
1121
|
-
* Information about the person the reservation is being made for.
|
|
1122
|
-
*
|
|
1123
|
-
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
1124
|
-
* Attempting to create a reservation without these fields results in an error.
|
|
1125
|
-
*/
|
|
1126
|
-
reservee?: Reservee;
|
|
1127
|
-
/**
|
|
1128
|
-
* Information about the person making the reservation.
|
|
1129
|
-
*
|
|
1130
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
1131
|
-
* @readonly
|
|
1132
|
-
*/
|
|
1133
|
-
reservedBy?: ReservedBy;
|
|
1134
|
-
/**
|
|
1135
|
-
* Team message.
|
|
1136
|
-
*
|
|
1137
|
-
* A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
|
|
1138
|
-
*/
|
|
1139
|
-
teamMessage?: string | null;
|
|
1140
|
-
/**
|
|
1141
|
-
* Date and time the reservation was created.
|
|
1142
|
-
* @readonly
|
|
1143
|
-
*/
|
|
1144
|
-
_createdDate?: Date;
|
|
1145
|
-
/**
|
|
1146
|
-
* Date and time the reservation was changed.
|
|
1147
|
-
* @readonly
|
|
1148
|
-
*/
|
|
1149
|
-
_updatedDate?: Date;
|
|
1150
|
-
/**
|
|
1151
|
-
* Revision number, which increments by 1 each time the reservation is updated.
|
|
1152
|
-
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
1153
|
-
*
|
|
1154
|
-
* Ignored when creating a reservation.
|
|
1155
|
-
* @readonly
|
|
1156
|
-
*/
|
|
1157
|
-
revision?: string | null;
|
|
1158
|
-
/** The reason the reservation was declined. */
|
|
1159
|
-
declineReason?: string | null;
|
|
1160
|
-
/**
|
|
1161
|
-
* Payment status.
|
|
1162
|
-
* @readonly
|
|
1163
|
-
*/
|
|
1164
|
-
paymentStatus?: PaymentStatus;
|
|
1165
|
-
}
|
|
1166
|
-
export interface UpdateReservationOptions {
|
|
1167
|
-
/**
|
|
1168
|
-
* Ignore table combination conflicts of the types included in the array. This ensures that the reservation is updated even if the given conflicts would normally prevent it.
|
|
1169
|
-
*
|
|
1170
|
-
* Possible values:
|
|
1171
|
-
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
1172
|
-
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
1173
|
-
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
1174
|
-
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
1175
|
-
*/
|
|
1176
|
-
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
1177
|
-
/**
|
|
1178
|
-
* Ignored reservation location conflicts of the types included in the array. This ensures that the reservation is updated even if the given conflicts would normally prevent it.
|
|
1179
|
-
*
|
|
1180
|
-
* Possible values:
|
|
1181
|
-
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
1182
|
-
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
1183
|
-
*/
|
|
1184
|
-
ignoreReservationLocationConflicts?: Type[];
|
|
1185
|
-
}
|
|
1186
|
-
/**
|
|
1187
|
-
* Creates a new temporary reservation and holds it for the customer for 10 minutes.
|
|
1188
|
-
*
|
|
1189
|
-
* Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. 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.
|
|
1190
|
-
*
|
|
1191
|
-
* You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.
|
|
1192
|
-
*
|
|
1193
|
-
* If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.
|
|
1194
|
-
*
|
|
1195
|
-
* @param reservationDetails - Held reservation information to update.
|
|
1196
|
-
* @public
|
|
1197
|
-
* @documentationMaturity preview
|
|
1198
|
-
* @requiredField reservationDetails
|
|
1199
|
-
* @requiredField reservationDetails.partySize
|
|
1200
|
-
* @requiredField reservationDetails.reservationLocationId
|
|
1201
|
-
* @requiredField reservationDetails.startDate
|
|
1202
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1203
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1204
|
-
* @permissionScope Manage Reservations (Full)
|
|
1205
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1206
|
-
* @permissionScope Manage Reservations (Basic)
|
|
1207
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1208
|
-
* @applicableIdentity APP
|
|
1209
|
-
* @applicableIdentity MEMBER
|
|
1210
|
-
* @applicableIdentity VISITOR
|
|
1211
|
-
*/
|
|
1212
|
-
export declare function createHeldReservation(reservationDetails: HeldReservationDetails): Promise<CreateHeldReservationResponse & CreateHeldReservationResponseNonNullableFields>;
|
|
1213
|
-
/**
|
|
1214
|
-
* Reserves or requests a held reservation.
|
|
1215
|
-
*
|
|
1216
|
-
* Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.
|
|
1217
|
-
*
|
|
1218
|
-
* They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.
|
|
1219
|
-
*
|
|
1220
|
-
* `Reserve Reservation` changes a reservation's `HELD` status to:
|
|
1221
|
-
* * `RESERVED` if the reservation's reservation location does not require manual approval.
|
|
1222
|
-
* * `REQUESTED` if the reservation's reservation location requires manual approval.
|
|
1223
|
-
* @param reservationId - Reservation ID.
|
|
1224
|
-
* @param reservee - Reservee details.
|
|
1225
|
-
* @param revision - Revision number.
|
|
1226
|
-
*
|
|
1227
|
-
* Include the existing `revision` to prevent conflicting updates to reservations.
|
|
1228
|
-
* @public
|
|
1229
|
-
* @documentationMaturity preview
|
|
1230
|
-
* @requiredField reservationId
|
|
1231
|
-
* @requiredField reservee
|
|
1232
|
-
* @requiredField reservee.firstName
|
|
1233
|
-
* @requiredField reservee.phone
|
|
1234
|
-
* @requiredField revision
|
|
1235
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1236
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1237
|
-
* @permissionScope Manage Reservations (Full)
|
|
1238
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1239
|
-
* @permissionScope Manage Reservations (Basic)
|
|
1240
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1241
|
-
* @applicableIdentity APP
|
|
1242
|
-
* @applicableIdentity MEMBER
|
|
1243
|
-
* @applicableIdentity VISITOR
|
|
1244
|
-
*/
|
|
1245
|
-
export declare function reserveReservation(reservationId: string, reservee: Reservee, revision: string | null): Promise<ReserveReservationResponse & ReserveReservationResponseNonNullableFields>;
|
|
1246
|
-
/**
|
|
1247
|
-
* Cancels a reservation.
|
|
1248
|
-
*
|
|
1249
|
-
* Sets the reservation status to `CANCELED`.
|
|
1250
|
-
* @param reservationId - Reservation ID.
|
|
1251
|
-
* @param revision - Revision number.
|
|
1252
|
-
*
|
|
1253
|
-
* Include the existing `revision` to prevent conflicting updates to reservations.
|
|
1254
|
-
* @public
|
|
1255
|
-
* @documentationMaturity preview
|
|
1256
|
-
* @requiredField reservationId
|
|
1257
|
-
* @requiredField revision
|
|
1258
|
-
* @param options - Options for canceling the reservation.
|
|
1259
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1260
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1261
|
-
* @permissionScope Manage Reservations (Full)
|
|
1262
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1263
|
-
* @permissionScope Manage Reservations (Basic)
|
|
1264
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1265
|
-
* @applicableIdentity APP
|
|
1266
|
-
* @applicableIdentity MEMBER
|
|
1267
|
-
* @applicableIdentity VISITOR
|
|
1268
|
-
*/
|
|
1269
|
-
export declare function cancelReservation(reservationId: string, revision: string | null, options?: CancelReservationOptions): Promise<CancelReservationResponse & CancelReservationResponseNonNullableFields>;
|
|
1270
|
-
export interface CancelReservationOptions {
|
|
1271
|
-
/**
|
|
1272
|
-
* The phone number that was provided when the reservation was created.
|
|
1273
|
-
*
|
|
1274
|
-
* This is required for reservations with any `source` other than `WALK_IN`.
|
|
1275
|
-
*
|
|
1276
|
-
* This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
|
|
1277
|
-
*/
|
|
1278
|
-
phone?: string | null;
|
|
1279
|
-
}
|
|
1280
|
-
/**
|
|
1281
|
-
* Retrieves a list of up to 100 reservations.
|
|
1282
|
-
* @public
|
|
1283
|
-
* @documentationMaturity preview
|
|
1284
|
-
* @param options - Options for listing the reservations.
|
|
1285
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1286
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1287
|
-
* @permissionScope Manage Reservations (Full)
|
|
1288
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1289
|
-
* @applicableIdentity APP
|
|
1290
|
-
*/
|
|
1291
|
-
export declare function listReservations(options?: ListReservationsOptions): Promise<ListReservationsResponse & ListReservationsResponseNonNullableFields>;
|
|
1292
|
-
export interface ListReservationsOptions {
|
|
1293
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1294
|
-
paging?: CursorPaging;
|
|
1295
|
-
/** Defines how reservations in the response are sorted. */
|
|
1296
|
-
sort?: Sorting;
|
|
1297
|
-
/** Only reservations starting after this date are returned. */
|
|
1298
|
-
startDateFrom?: Date;
|
|
1299
|
-
/** Only reservations starting before this date are returned. */
|
|
1300
|
-
startDateTo?: Date;
|
|
1301
|
-
/**
|
|
1302
|
-
* Only reservations with this status are returned.
|
|
1303
|
-
*
|
|
1304
|
-
* * `HELD`: The reservation is temporary and will expire in 10 minutes if its status isn’t changed. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request.
|
|
1305
|
-
* * `REQUESTED`: A customer finished requesting this reservation, meaning they have added all necessary details and confirmed the request. Restaurant staff can now either approve or decline the reservation request.
|
|
1306
|
-
* * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
|
|
1307
|
-
* * `RESERVED`: The reservation is confirmed.
|
|
1308
|
-
* * `SEATED`: The customer is currently occupying the table.
|
|
1309
|
-
* * `CANCELED`: The reservation is canceled.
|
|
1310
|
-
* * `NO_SHOW`: The customer didn't show up for their reservation.
|
|
1311
|
-
* * `FINISHED`: The reservation completed successfully.
|
|
1312
|
-
*/
|
|
1313
|
-
status?: Status;
|
|
1314
|
-
}
|
|
1315
|
-
/**
|
|
1316
|
-
* Creates a query to retrieve a list of reservations.
|
|
1317
|
-
*
|
|
1318
|
-
* The `queryReservations()` function builds a query to retrieve a list of reservations and returns a [`ReservationsQueryBuilder`](#ReservationsQueryBuilder) object.
|
|
1319
|
-
*
|
|
1320
|
-
* The returned object contains the query definition, which is used to run the query using the [find()](#ReservationsQueryBuilder/find) function.
|
|
1321
|
-
*
|
|
1322
|
-
* You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.
|
|
1323
|
-
*
|
|
1324
|
-
* `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:
|
|
1325
|
-
*
|
|
1326
|
-
* * [`skip(0)`](#ReservationsQueryBuilder/skip)
|
|
1327
|
-
* * [`limit(50)`](#ReservationsQueryBuilder/limit)
|
|
1328
|
-
* * [`descending('_createdDate')`](#ReservationsQueryBuilder/descending)
|
|
1329
|
-
*
|
|
1330
|
-
* The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](#ReservationsQueryResult/items) property in [`ReservationsQueryResult`](#ReservationsQueryResult).
|
|
1331
|
-
* @public
|
|
1332
|
-
* @documentationMaturity preview
|
|
1333
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1334
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1335
|
-
* @permissionScope Manage Reservations (Full)
|
|
1336
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1337
|
-
* @applicableIdentity APP
|
|
1338
|
-
*/
|
|
1339
|
-
export declare function queryReservations(): ReservationsQueryBuilder;
|
|
1340
|
-
interface QueryCursorResult {
|
|
1341
|
-
cursors: Cursors;
|
|
1342
|
-
hasNext: () => boolean;
|
|
1343
|
-
hasPrev: () => boolean;
|
|
1344
|
-
length: number;
|
|
1345
|
-
pageSize: number;
|
|
1346
|
-
}
|
|
1347
|
-
export interface ReservationsQueryResult extends QueryCursorResult {
|
|
1348
|
-
items: Reservation[];
|
|
1349
|
-
query: ReservationsQueryBuilder;
|
|
1350
|
-
next: () => Promise<ReservationsQueryResult>;
|
|
1351
|
-
prev: () => Promise<ReservationsQueryResult>;
|
|
1352
|
-
}
|
|
1353
|
-
export interface ReservationsQueryBuilder {
|
|
1354
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1355
|
-
* @param value - Value to compare against.
|
|
1356
|
-
* @documentationMaturity preview
|
|
1357
|
-
*/
|
|
1358
|
-
eq: (propertyName: '_id' | 'status' | 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1359
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1360
|
-
* @param value - Value to compare against.
|
|
1361
|
-
* @documentationMaturity preview
|
|
1362
|
-
*/
|
|
1363
|
-
ne: (propertyName: '_id' | 'status' | 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1364
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1365
|
-
* @param value - Value to compare against.
|
|
1366
|
-
* @documentationMaturity preview
|
|
1367
|
-
*/
|
|
1368
|
-
ge: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1369
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1370
|
-
* @param value - Value to compare against.
|
|
1371
|
-
* @documentationMaturity preview
|
|
1372
|
-
*/
|
|
1373
|
-
gt: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1374
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1375
|
-
* @param value - Value to compare against.
|
|
1376
|
-
* @documentationMaturity preview
|
|
1377
|
-
*/
|
|
1378
|
-
le: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1379
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1380
|
-
* @param value - Value to compare against.
|
|
1381
|
-
* @documentationMaturity preview
|
|
1382
|
-
*/
|
|
1383
|
-
lt: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1384
|
-
/** @documentationMaturity preview */
|
|
1385
|
-
in: (propertyName: '_id' | 'status' | 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1386
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1387
|
-
* @documentationMaturity preview
|
|
1388
|
-
*/
|
|
1389
|
-
ascending: (...propertyNames: Array<'details.startDate'>) => ReservationsQueryBuilder;
|
|
1390
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1391
|
-
* @documentationMaturity preview
|
|
1392
|
-
*/
|
|
1393
|
-
descending: (...propertyNames: Array<'details.startDate'>) => ReservationsQueryBuilder;
|
|
1394
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1395
|
-
* @documentationMaturity preview
|
|
1396
|
-
*/
|
|
1397
|
-
limit: (limit: number) => ReservationsQueryBuilder;
|
|
1398
|
-
/** @param cursor - A pointer to specific record
|
|
1399
|
-
* @documentationMaturity preview
|
|
1400
|
-
*/
|
|
1401
|
-
skipTo: (cursor: string) => ReservationsQueryBuilder;
|
|
1402
|
-
/** @documentationMaturity preview */
|
|
1403
|
-
find: () => Promise<ReservationsQueryResult>;
|
|
1404
|
-
}
|
|
1405
|
-
/** @param search - Search query.
|
|
1406
|
-
* @public
|
|
1407
|
-
* @documentationMaturity preview
|
|
1408
|
-
* @requiredField search
|
|
1409
|
-
* @permissionScope Manage Reservations (Medium)
|
|
1410
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1411
|
-
* @permissionScope Manage Reservations (Full)
|
|
1412
|
-
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1413
|
-
* @applicableIdentity APP
|
|
1414
|
-
*/
|
|
1415
|
-
export declare function searchReservations(search: CursorSearch): Promise<SearchReservationsResponse & SearchReservationsResponseNonNullableFields>;
|
|
1416
|
-
export {};
|