@wix/auto_sdk_table-reservations_reservations 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.context.js +49 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.http.js +561 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.meta.js +218 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.public.js +123 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.types.js +180 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.universal.js +775 -0
- package/build/cjs/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.context.js +30 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.http.js +548 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.meta.js +182 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.public.js +94 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.types.js +177 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.universal.js +739 -0
- package/build/es/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.context.js +49 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.http.js +561 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.meta.js +218 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.public.js +123 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.types.js +180 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.universal.js +775 -0
- package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.context.js +30 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.http.js +548 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.meta.js +182 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.public.js +94 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.types.js +177 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.universal.js +739 -0
- package/build/internal/es/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1740 @@
|
|
|
1
|
+
/** The reservation domain object. */
|
|
2
|
+
export interface Reservation {
|
|
3
|
+
/**
|
|
4
|
+
* Reservation ID.
|
|
5
|
+
* @readonly
|
|
6
|
+
*/
|
|
7
|
+
_id?: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Status of the reservation.
|
|
10
|
+
*
|
|
11
|
+
* Supported values:
|
|
12
|
+
*
|
|
13
|
+
* * `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.
|
|
14
|
+
* * `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.
|
|
15
|
+
* * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
|
|
16
|
+
* * `RESERVED`: The reservation is confirmed.
|
|
17
|
+
* * `SEATED`: The customer is currently occupying the table.
|
|
18
|
+
* * `CANCELED`: The reservation is canceled.
|
|
19
|
+
* * `NO_SHOW`: The customer didn't show up for their reservation.
|
|
20
|
+
* * `FINISHED`: The reservation completed successfully.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* 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.
|
|
24
|
+
*/
|
|
25
|
+
status?: Status;
|
|
26
|
+
/**
|
|
27
|
+
* Reservation source.
|
|
28
|
+
*
|
|
29
|
+
* This indicates how the reservation was made.
|
|
30
|
+
*/
|
|
31
|
+
source?: Source;
|
|
32
|
+
/** Reservation details. */
|
|
33
|
+
details?: Details;
|
|
34
|
+
/**
|
|
35
|
+
* Information about the person the reservation is being made for.
|
|
36
|
+
*
|
|
37
|
+
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
38
|
+
* Attempting to create a reservation without these fields results in an error.
|
|
39
|
+
*/
|
|
40
|
+
reservee?: Reservee;
|
|
41
|
+
/**
|
|
42
|
+
* Information about the person making the reservation.
|
|
43
|
+
*
|
|
44
|
+
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
45
|
+
* @readonly
|
|
46
|
+
*/
|
|
47
|
+
reservedBy?: ReservedBy;
|
|
48
|
+
/**
|
|
49
|
+
* Team message.
|
|
50
|
+
*
|
|
51
|
+
* A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
|
|
52
|
+
*/
|
|
53
|
+
teamMessage?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Date and time the reservation was created.
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
_createdDate?: Date | null;
|
|
59
|
+
/**
|
|
60
|
+
* Date and time the reservation was changed.
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
_updatedDate?: Date | null;
|
|
64
|
+
/**
|
|
65
|
+
* Revision number, which increments by 1 each time the reservation is updated.
|
|
66
|
+
* To prevent conflicting changes, the current revision must be specified when updating the reservation.
|
|
67
|
+
*
|
|
68
|
+
* Ignored when creating a reservation.
|
|
69
|
+
* @readonly
|
|
70
|
+
*/
|
|
71
|
+
revision?: string | null;
|
|
72
|
+
/** The reason the reservation was declined. */
|
|
73
|
+
declineReason?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Payment status.
|
|
76
|
+
* @readonly
|
|
77
|
+
*/
|
|
78
|
+
paymentStatus?: PaymentStatus;
|
|
79
|
+
/**
|
|
80
|
+
* Custom field data for the reservation object.
|
|
81
|
+
*
|
|
82
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
83
|
+
*/
|
|
84
|
+
extendedFields?: ExtendedFields;
|
|
85
|
+
}
|
|
86
|
+
/** Tables used for the reservation. If you don't specify a `tables` object, the server attempts to assign tables automatically. */
|
|
87
|
+
export interface Tables {
|
|
88
|
+
/** IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned. */
|
|
89
|
+
ids?: string[];
|
|
90
|
+
}
|
|
91
|
+
export declare enum Status {
|
|
92
|
+
/** Undefined reservation status. */
|
|
93
|
+
UNKNOWN = "UNKNOWN",
|
|
94
|
+
/** A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. 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. */
|
|
95
|
+
HELD = "HELD",
|
|
96
|
+
/** The reservation is confirmed. */
|
|
97
|
+
RESERVED = "RESERVED",
|
|
98
|
+
/** The reservation is canceled. */
|
|
99
|
+
CANCELED = "CANCELED",
|
|
100
|
+
/** The reservation completed successfully. */
|
|
101
|
+
FINISHED = "FINISHED",
|
|
102
|
+
/** The customer didn't show up for their reservation. */
|
|
103
|
+
NO_SHOW = "NO_SHOW",
|
|
104
|
+
/** The customer is currently occupying the table. */
|
|
105
|
+
SEATED = "SEATED",
|
|
106
|
+
/** 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. */
|
|
107
|
+
REQUESTED = "REQUESTED",
|
|
108
|
+
/** The restaurant’s owner or staff declined the customer’s request to make the reservation. */
|
|
109
|
+
DECLINED = "DECLINED",
|
|
110
|
+
/** A customer has begun the checkout flow, the temporary reservation is moved to this status and will expire in 10 minutes from the created time, during which time the reservee should pay. This status is set automatically when the reserve reservation endpoint is called for a reservation in `HELD` status and payment is needed. After payment is completed status will be changed automatically to `RESERVED`. */
|
|
111
|
+
PAYMENT_PENDING = "PAYMENT_PENDING"
|
|
112
|
+
}
|
|
113
|
+
export declare enum Source {
|
|
114
|
+
/** Undefined reservation source. */
|
|
115
|
+
UNKNOWN = "UNKNOWN",
|
|
116
|
+
/** The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. */
|
|
117
|
+
OFFLINE = "OFFLINE",
|
|
118
|
+
/** The reservation was made through a website or app. */
|
|
119
|
+
ONLINE = "ONLINE",
|
|
120
|
+
/** The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. */
|
|
121
|
+
WALK_IN = "WALK_IN"
|
|
122
|
+
}
|
|
123
|
+
/** Reservation details. */
|
|
124
|
+
export interface Details {
|
|
125
|
+
/** ID of the reservation location at which this reservation will be made. */
|
|
126
|
+
reservationLocationId?: string | null;
|
|
127
|
+
/**
|
|
128
|
+
* IDs of tables used for this reservation.
|
|
129
|
+
* @deprecated
|
|
130
|
+
* @replacedBy tables
|
|
131
|
+
* @targetRemovalDate 2024-12-31
|
|
132
|
+
*/
|
|
133
|
+
tableIds?: string[] | null;
|
|
134
|
+
/** Tables used for this reservation. */
|
|
135
|
+
tables?: Tables;
|
|
136
|
+
/** Start date and time of the reservation. */
|
|
137
|
+
startDate?: Date | null;
|
|
138
|
+
/** End date and time of the reservation. */
|
|
139
|
+
endDate?: Date | null;
|
|
140
|
+
/** Party size. */
|
|
141
|
+
partySize?: number | null;
|
|
142
|
+
}
|
|
143
|
+
/** The person the reservation is being made for. */
|
|
144
|
+
export interface Reservee {
|
|
145
|
+
/**
|
|
146
|
+
* First name.
|
|
147
|
+
*
|
|
148
|
+
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
149
|
+
*/
|
|
150
|
+
firstName?: string | null;
|
|
151
|
+
/** Last name. */
|
|
152
|
+
lastName?: string | null;
|
|
153
|
+
/** Email address. */
|
|
154
|
+
email?: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Phone number.
|
|
157
|
+
*
|
|
158
|
+
* This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`.
|
|
159
|
+
*
|
|
160
|
+
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
161
|
+
*/
|
|
162
|
+
phone?: string | null;
|
|
163
|
+
/** Whether the reservee has given marketing consent. */
|
|
164
|
+
marketingConsent?: boolean | null;
|
|
165
|
+
/**
|
|
166
|
+
* Custom fields for the reservee in key-value pairs.
|
|
167
|
+
*
|
|
168
|
+
* 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"`.
|
|
169
|
+
*
|
|
170
|
+
* Empty fields are not returned.
|
|
171
|
+
*/
|
|
172
|
+
customFields?: Record<string, any> | null;
|
|
173
|
+
/**
|
|
174
|
+
* Contact ID. If a contact with this ID does not exist on the site, one will be created.
|
|
175
|
+
* @readonly
|
|
176
|
+
*/
|
|
177
|
+
contactId?: string | null;
|
|
178
|
+
}
|
|
179
|
+
/** A person making reservation. */
|
|
180
|
+
export interface ReservedBy {
|
|
181
|
+
/**
|
|
182
|
+
* 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.
|
|
183
|
+
* @readonly
|
|
184
|
+
*/
|
|
185
|
+
contactId?: string | null;
|
|
186
|
+
}
|
|
187
|
+
/** Migration note. */
|
|
188
|
+
export interface MigrationNote {
|
|
189
|
+
}
|
|
190
|
+
/** Table with reservation conflicts. */
|
|
191
|
+
export interface TableWithReservationConflicts {
|
|
192
|
+
/** Table id. */
|
|
193
|
+
tableId?: string;
|
|
194
|
+
/** List of reservation ids. */
|
|
195
|
+
reservationIds?: string[];
|
|
196
|
+
}
|
|
197
|
+
export declare enum PaymentStatus {
|
|
198
|
+
/** Undefined payment status. */
|
|
199
|
+
UNKNOWN = "UNKNOWN",
|
|
200
|
+
/** A reservation is free of charge. */
|
|
201
|
+
FREE = "FREE",
|
|
202
|
+
/** Payment is not received yet. */
|
|
203
|
+
NOT_PAID = "NOT_PAID",
|
|
204
|
+
/** The corresponding reservation order was fully paid. */
|
|
205
|
+
PAID = "PAID",
|
|
206
|
+
/** The corresponding reservation order was refunded, but the refund amount is less than the order total price. */
|
|
207
|
+
PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
|
|
208
|
+
/** The corresponding reservation order was fully refunded. The refund amount equals the total price. */
|
|
209
|
+
FULLY_REFUNDED = "FULLY_REFUNDED",
|
|
210
|
+
/** The corresponding reservation order was partially paid. */
|
|
211
|
+
PARTIALLY_PAID = "PARTIALLY_PAID"
|
|
212
|
+
}
|
|
213
|
+
export interface ExtendedFields {
|
|
214
|
+
/**
|
|
215
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
216
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
217
|
+
*
|
|
218
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
219
|
+
*
|
|
220
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
221
|
+
*/
|
|
222
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
223
|
+
}
|
|
224
|
+
export interface ReservationDelayedDomainEvent extends ReservationDelayedDomainEventBodyTypeOneOf {
|
|
225
|
+
/** Body of a created reservation event. */
|
|
226
|
+
reservationCreated?: ReservationCreated;
|
|
227
|
+
/** Body of a updated reservation event. */
|
|
228
|
+
reservationUpdated?: ReservationUpdated;
|
|
229
|
+
/** Body of a canceled reservation event. */
|
|
230
|
+
reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;
|
|
231
|
+
}
|
|
232
|
+
/** @oneof */
|
|
233
|
+
export interface ReservationDelayedDomainEventBodyTypeOneOf {
|
|
234
|
+
/** Body of a created reservation event. */
|
|
235
|
+
reservationCreated?: ReservationCreated;
|
|
236
|
+
/** Body of a updated reservation event. */
|
|
237
|
+
reservationUpdated?: ReservationUpdated;
|
|
238
|
+
/** Body of a canceled reservation event. */
|
|
239
|
+
reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;
|
|
240
|
+
}
|
|
241
|
+
export interface ReservationCreated {
|
|
242
|
+
/** Created reservation. */
|
|
243
|
+
createdReservation?: Reservation;
|
|
244
|
+
}
|
|
245
|
+
export interface ReservationUpdated {
|
|
246
|
+
/** Updated reservation. */
|
|
247
|
+
updatedReservation?: Reservation;
|
|
248
|
+
/** Modified fields of previous entity */
|
|
249
|
+
modifiedFields?: Record<string, any>;
|
|
250
|
+
}
|
|
251
|
+
export interface ReservationDelayedDomainEventReservationCanceled {
|
|
252
|
+
/** Canceled reservation. */
|
|
253
|
+
canceledReservation?: Reservation;
|
|
254
|
+
}
|
|
255
|
+
export interface CreateReservationRequest {
|
|
256
|
+
/** Reservation details. */
|
|
257
|
+
reservation: Reservation;
|
|
258
|
+
/**
|
|
259
|
+
* Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
260
|
+
*
|
|
261
|
+
* Possible values:
|
|
262
|
+
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
263
|
+
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
264
|
+
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
265
|
+
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
266
|
+
*/
|
|
267
|
+
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
268
|
+
/**
|
|
269
|
+
* Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
270
|
+
*
|
|
271
|
+
* Possible values:
|
|
272
|
+
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
273
|
+
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
274
|
+
*/
|
|
275
|
+
ignoreReservationLocationConflicts?: Type[];
|
|
276
|
+
}
|
|
277
|
+
export declare enum TableCombinationConflictType {
|
|
278
|
+
/** Undefined conflict type. */
|
|
279
|
+
UNKNOWN = "UNKNOWN",
|
|
280
|
+
/** One or more of the chosen tables are already reserved. */
|
|
281
|
+
RESERVED = "RESERVED",
|
|
282
|
+
/** The party is too big for the selected table. */
|
|
283
|
+
TOO_BIG = "TOO_BIG",
|
|
284
|
+
/** The party is too small for the selected table. */
|
|
285
|
+
TOO_SMALL = "TOO_SMALL",
|
|
286
|
+
/** The restaurant does not allow online reservations. */
|
|
287
|
+
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
288
|
+
}
|
|
289
|
+
export declare enum Type {
|
|
290
|
+
/** Undefined reservation location conflict type. */
|
|
291
|
+
UNKNOWN = "UNKNOWN",
|
|
292
|
+
/** The restaurant cannot accommodate a party of the given size according to party pacing settings. */
|
|
293
|
+
PARTY_PACING = "PARTY_PACING",
|
|
294
|
+
/** The required number of seats are unavailable according to seat pacing settings. */
|
|
295
|
+
SEAT_PACING = "SEAT_PACING"
|
|
296
|
+
}
|
|
297
|
+
export interface CreateReservationResponse {
|
|
298
|
+
/** Reservation. */
|
|
299
|
+
reservation?: Reservation;
|
|
300
|
+
}
|
|
301
|
+
export interface ReservationDetailsConflicts {
|
|
302
|
+
/** Table combinations conflicts. */
|
|
303
|
+
tableCombinationConflicts?: TableCombinationConflict[];
|
|
304
|
+
/** Reservation location conflicts. */
|
|
305
|
+
reservationLocationConflicts?: ReservationLocationConflict[];
|
|
306
|
+
}
|
|
307
|
+
export interface TableCombinationConflict {
|
|
308
|
+
/** Conflict type. */
|
|
309
|
+
type?: TableCombinationConflictType;
|
|
310
|
+
}
|
|
311
|
+
export interface ReservationLocationConflict {
|
|
312
|
+
/** Reservation location conflict type. */
|
|
313
|
+
type?: Type;
|
|
314
|
+
}
|
|
315
|
+
export interface GetReservationRequest {
|
|
316
|
+
/** Reservation ID. */
|
|
317
|
+
reservationId: string;
|
|
318
|
+
/**
|
|
319
|
+
* Array of named, predefined sets of projected fields to be returned.
|
|
320
|
+
*
|
|
321
|
+
* Supported values: `PUBLIC`, `FULL`.
|
|
322
|
+
*
|
|
323
|
+
* Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
|
|
324
|
+
*/
|
|
325
|
+
fieldsets?: Set[];
|
|
326
|
+
}
|
|
327
|
+
export declare enum Set {
|
|
328
|
+
/**
|
|
329
|
+
* Returns `id`, `status`, `details.reservationLocationId`, `details.startDate`, `details.endDate`, `details.partySize`, `createdDate`, `revision`, `declineReason`,
|
|
330
|
+
* `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
|
|
331
|
+
*/
|
|
332
|
+
PUBLIC = "PUBLIC",
|
|
333
|
+
/** Returns all fields. */
|
|
334
|
+
FULL = "FULL"
|
|
335
|
+
}
|
|
336
|
+
export interface GetReservationResponse {
|
|
337
|
+
/** Reservation. */
|
|
338
|
+
reservation?: Reservation;
|
|
339
|
+
}
|
|
340
|
+
export interface UpdateReservationRequest {
|
|
341
|
+
/** Reservation information to update. */
|
|
342
|
+
reservation: Reservation;
|
|
343
|
+
/** 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. */
|
|
344
|
+
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
345
|
+
ignoreReservationLocationConflicts?: Type[];
|
|
346
|
+
}
|
|
347
|
+
export interface UpdateReservationResponse {
|
|
348
|
+
/** Reservation. */
|
|
349
|
+
reservation?: Reservation;
|
|
350
|
+
}
|
|
351
|
+
export interface CreateHeldReservationRequest {
|
|
352
|
+
/** Held reservation information to update. */
|
|
353
|
+
reservationDetails: HeldReservationDetails;
|
|
354
|
+
}
|
|
355
|
+
/** Reservation details when create reservation in status HELD. */
|
|
356
|
+
export interface HeldReservationDetails {
|
|
357
|
+
/** ID of the reservation location where the reservation is made. */
|
|
358
|
+
reservationLocationId?: string | null;
|
|
359
|
+
/** Start date and time of the reservation. */
|
|
360
|
+
startDate?: Date | null;
|
|
361
|
+
/** Party size. */
|
|
362
|
+
partySize?: number | null;
|
|
363
|
+
}
|
|
364
|
+
export interface CreateHeldReservationResponse {
|
|
365
|
+
/** Reservation. */
|
|
366
|
+
reservation?: Reservation;
|
|
367
|
+
}
|
|
368
|
+
export interface ReserveReservationRequest {
|
|
369
|
+
/** Reservation ID. */
|
|
370
|
+
reservationId: string;
|
|
371
|
+
/** Reservee details. */
|
|
372
|
+
reservee: Reservee;
|
|
373
|
+
/**
|
|
374
|
+
* Revision number.
|
|
375
|
+
*
|
|
376
|
+
* Specify the existing `revision` to prevent conflicting updates to reservations.
|
|
377
|
+
*/
|
|
378
|
+
revision: string | null;
|
|
379
|
+
}
|
|
380
|
+
export interface ReserveReservationResponse {
|
|
381
|
+
/** Reservation. */
|
|
382
|
+
reservation?: Reservation;
|
|
383
|
+
}
|
|
384
|
+
export interface CancelReservationRequest {
|
|
385
|
+
/** Reservation ID. */
|
|
386
|
+
reservationId: string;
|
|
387
|
+
/**
|
|
388
|
+
* Revision number.
|
|
389
|
+
*
|
|
390
|
+
* Specify the existing `revision` to prevent conflicting updates to reservations.
|
|
391
|
+
*/
|
|
392
|
+
revision: string | null;
|
|
393
|
+
/**
|
|
394
|
+
* The phone number that was provided when the reservation was created.
|
|
395
|
+
*
|
|
396
|
+
* This is required for reservations with any `source` other than `WALK_IN`.
|
|
397
|
+
*
|
|
398
|
+
* This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
|
|
399
|
+
*/
|
|
400
|
+
phone?: string | null;
|
|
401
|
+
}
|
|
402
|
+
export interface CancelReservationResponse {
|
|
403
|
+
/** Reservation. */
|
|
404
|
+
reservation?: Reservation;
|
|
405
|
+
}
|
|
406
|
+
export interface ReservationCanceled {
|
|
407
|
+
/** Reserved reservation. */
|
|
408
|
+
reservation?: Reservation;
|
|
409
|
+
}
|
|
410
|
+
export interface DeleteReservationRequest {
|
|
411
|
+
/** Reservation ID. */
|
|
412
|
+
reservationId: string;
|
|
413
|
+
}
|
|
414
|
+
export interface DeleteReservationResponse {
|
|
415
|
+
}
|
|
416
|
+
export interface ListReservationsRequest {
|
|
417
|
+
/** 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`. */
|
|
418
|
+
paging?: CursorPaging;
|
|
419
|
+
/** Defines how reservations in the response are sorted. */
|
|
420
|
+
sort?: Sorting;
|
|
421
|
+
/** Only reservations starting after this date are returned. */
|
|
422
|
+
startDateFrom?: Date | null;
|
|
423
|
+
/** Only reservations starting before this date are returned. */
|
|
424
|
+
startDateTo?: Date | null;
|
|
425
|
+
/** Only reservations with this status are returned. */
|
|
426
|
+
status?: Status;
|
|
427
|
+
}
|
|
428
|
+
export interface CursorPaging {
|
|
429
|
+
/** Number of items to load. */
|
|
430
|
+
limit?: number | null;
|
|
431
|
+
/**
|
|
432
|
+
* Pointer to the next or previous page in the list of results.
|
|
433
|
+
*
|
|
434
|
+
* You can get the relevant cursor token
|
|
435
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
436
|
+
* Not relevant for the first request.
|
|
437
|
+
*/
|
|
438
|
+
cursor?: string | null;
|
|
439
|
+
}
|
|
440
|
+
export interface Sorting {
|
|
441
|
+
/** Name of the field to sort by. */
|
|
442
|
+
fieldName?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Sort order.
|
|
445
|
+
* Default: `ASC`.
|
|
446
|
+
*/
|
|
447
|
+
order?: SortOrder;
|
|
448
|
+
}
|
|
449
|
+
export declare enum SortOrder {
|
|
450
|
+
/** Sort by ascending order. */
|
|
451
|
+
ASC = "ASC",
|
|
452
|
+
/** Sort by descending order. */
|
|
453
|
+
DESC = "DESC"
|
|
454
|
+
}
|
|
455
|
+
export interface ListReservationsResponse {
|
|
456
|
+
/** List of reservations. */
|
|
457
|
+
reservations?: Reservation[];
|
|
458
|
+
/** Metadata for the paginated results. */
|
|
459
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
460
|
+
}
|
|
461
|
+
export interface CursorPagingMetadata {
|
|
462
|
+
/** Number of items returned in the response. */
|
|
463
|
+
count?: number | null;
|
|
464
|
+
/** Offset that was requested. */
|
|
465
|
+
cursors?: Cursors;
|
|
466
|
+
/**
|
|
467
|
+
* Indicates if there are more results after the current page.
|
|
468
|
+
* If `true`, another page of results can be retrieved.
|
|
469
|
+
* If `false`, this is the last page.
|
|
470
|
+
*/
|
|
471
|
+
hasNext?: boolean | null;
|
|
472
|
+
}
|
|
473
|
+
export interface Cursors {
|
|
474
|
+
/** Cursor pointing to next page in the list of results. */
|
|
475
|
+
next?: string | null;
|
|
476
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
477
|
+
prev?: string | null;
|
|
478
|
+
}
|
|
479
|
+
export interface QueryReservationsRequest {
|
|
480
|
+
/** Query to select reservations. */
|
|
481
|
+
query: CursorQuery;
|
|
482
|
+
}
|
|
483
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
484
|
+
/** 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`. */
|
|
485
|
+
cursorPaging?: CursorPaging;
|
|
486
|
+
/**
|
|
487
|
+
* Filter object in the following format:
|
|
488
|
+
* `"filter" : {
|
|
489
|
+
* "fieldName1": "value1",
|
|
490
|
+
* "fieldName2":{"$operator":"value2"}
|
|
491
|
+
* }`
|
|
492
|
+
*
|
|
493
|
+
* 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-filtering-and-search) article.
|
|
494
|
+
* To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
495
|
+
*/
|
|
496
|
+
filter?: Record<string, any> | null;
|
|
497
|
+
/**
|
|
498
|
+
* Sort object in the following format:
|
|
499
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
500
|
+
*/
|
|
501
|
+
sort?: Sorting[];
|
|
502
|
+
}
|
|
503
|
+
/** @oneof */
|
|
504
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
505
|
+
/** 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`. */
|
|
506
|
+
cursorPaging?: CursorPaging;
|
|
507
|
+
}
|
|
508
|
+
export interface QueryReservationsResponse {
|
|
509
|
+
/** List of reservations. */
|
|
510
|
+
reservations?: Reservation[];
|
|
511
|
+
/** Metadata for the paginated results. */
|
|
512
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
513
|
+
}
|
|
514
|
+
export interface SearchReservationsRequest {
|
|
515
|
+
/** Search query. */
|
|
516
|
+
search: CursorSearch;
|
|
517
|
+
}
|
|
518
|
+
export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
519
|
+
/** Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. */
|
|
520
|
+
cursorPaging?: CursorPaging;
|
|
521
|
+
/**
|
|
522
|
+
* Filter object in the following format:
|
|
523
|
+
* `"filter" : {
|
|
524
|
+
* "fieldName1": "value1",
|
|
525
|
+
* "fieldName2":{"$operator":"value2"}
|
|
526
|
+
* }`
|
|
527
|
+
* 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-filtering-and-search) article.
|
|
528
|
+
*/
|
|
529
|
+
filter?: Record<string, any> | null;
|
|
530
|
+
/**
|
|
531
|
+
* Sort object in the following format:
|
|
532
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
533
|
+
*/
|
|
534
|
+
sort?: Sorting[];
|
|
535
|
+
/**
|
|
536
|
+
* A search method for grouping data into various categories (facets) and providing summaries for each category.
|
|
537
|
+
* For example, use aggregations to allow site visitors to narrow down their search results by selecting specific reservation statuses, party sizes, etc.
|
|
538
|
+
*/
|
|
539
|
+
aggregations?: Aggregation[];
|
|
540
|
+
/** Free text to match in searchable fields. */
|
|
541
|
+
search?: SearchDetails;
|
|
542
|
+
/** Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. */
|
|
543
|
+
timeZone?: string | null;
|
|
544
|
+
}
|
|
545
|
+
/** @oneof */
|
|
546
|
+
export interface CursorSearchPagingMethodOneOf {
|
|
547
|
+
/** Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. */
|
|
548
|
+
cursorPaging?: CursorPaging;
|
|
549
|
+
}
|
|
550
|
+
export interface Aggregation extends AggregationKindOneOf {
|
|
551
|
+
/** A value aggregation calculates metrics such as "count" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */
|
|
552
|
+
value?: ValueAggregation;
|
|
553
|
+
/** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
|
|
554
|
+
range?: RangeAggregation;
|
|
555
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */
|
|
556
|
+
scalar?: ScalarAggregation;
|
|
557
|
+
/** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
|
|
558
|
+
dateHistogram?: DateHistogramAggregation;
|
|
559
|
+
/**
|
|
560
|
+
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
561
|
+
* For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`.
|
|
562
|
+
*/
|
|
563
|
+
nested?: NestedAggregation;
|
|
564
|
+
name?: string | null;
|
|
565
|
+
type?: AggregationType;
|
|
566
|
+
fieldPath?: string;
|
|
567
|
+
}
|
|
568
|
+
/** @oneof */
|
|
569
|
+
export interface AggregationKindOneOf {
|
|
570
|
+
/** A value aggregation calculates metrics such as "count" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */
|
|
571
|
+
value?: ValueAggregation;
|
|
572
|
+
/** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
|
|
573
|
+
range?: RangeAggregation;
|
|
574
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */
|
|
575
|
+
scalar?: ScalarAggregation;
|
|
576
|
+
/** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
|
|
577
|
+
dateHistogram?: DateHistogramAggregation;
|
|
578
|
+
/**
|
|
579
|
+
* A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.
|
|
580
|
+
* For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`.
|
|
581
|
+
*/
|
|
582
|
+
nested?: NestedAggregation;
|
|
583
|
+
}
|
|
584
|
+
export interface RangeBucket {
|
|
585
|
+
/** Inclusive lower bound of the range. Required if `to` is not provided. */
|
|
586
|
+
from?: number | null;
|
|
587
|
+
/** Exclusive upper bound of the range. Required if `from` is not provided. */
|
|
588
|
+
to?: number | null;
|
|
589
|
+
}
|
|
590
|
+
export declare enum SortType {
|
|
591
|
+
/** Sort by number of matches. */
|
|
592
|
+
COUNT = "COUNT",
|
|
593
|
+
/** Sort by value of the field alphabetically. */
|
|
594
|
+
VALUE = "VALUE"
|
|
595
|
+
}
|
|
596
|
+
export declare enum SortDirection {
|
|
597
|
+
/** Sort in descending order. */
|
|
598
|
+
DESC = "DESC",
|
|
599
|
+
/** Sort in ascending order. */
|
|
600
|
+
ASC = "ASC"
|
|
601
|
+
}
|
|
602
|
+
export declare enum MissingValues {
|
|
603
|
+
/** Exclude missing values from the aggregation results */
|
|
604
|
+
EXCLUDE = "EXCLUDE",
|
|
605
|
+
/** Include missing values in the aggregation results */
|
|
606
|
+
INCLUDE = "INCLUDE"
|
|
607
|
+
}
|
|
608
|
+
export interface IncludeMissingValuesOptions {
|
|
609
|
+
/** Specify a custom name for the bucket containing the missing values. Defaults are "N/A" for strings, "0" for integers, and "false" for booleans. */
|
|
610
|
+
addToBucket?: string;
|
|
611
|
+
}
|
|
612
|
+
export declare enum ScalarType {
|
|
613
|
+
/** Undefined scalar type. */
|
|
614
|
+
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
615
|
+
/** Count of distinct values. */
|
|
616
|
+
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
617
|
+
/** Minimum value. */
|
|
618
|
+
MIN = "MIN",
|
|
619
|
+
/** Maximum value. */
|
|
620
|
+
MAX = "MAX"
|
|
621
|
+
}
|
|
622
|
+
export declare enum NestedAggregationType {
|
|
623
|
+
/** Undefined aggregation type. */
|
|
624
|
+
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
625
|
+
/** An aggregation where result buckets are dynamically built - one per unique value. */
|
|
626
|
+
VALUE = "VALUE",
|
|
627
|
+
/** An aggregation where you can define a set of ranges - each representing a bucket. */
|
|
628
|
+
RANGE = "RANGE",
|
|
629
|
+
/** A single-value metric aggregation - such as min, max, sum, and avg. */
|
|
630
|
+
SCALAR = "SCALAR",
|
|
631
|
+
/** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */
|
|
632
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
633
|
+
}
|
|
634
|
+
export interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
635
|
+
/** Options for including missing values in results. */
|
|
636
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
637
|
+
/** Whether to sort by the number of matches or the value of the field. */
|
|
638
|
+
sortType?: SortType;
|
|
639
|
+
/** Whether to sort in ascending or descending order. */
|
|
640
|
+
sortDirection?: SortDirection;
|
|
641
|
+
/**
|
|
642
|
+
* Number of aggregation results to return.
|
|
643
|
+
* Min: `1`
|
|
644
|
+
* Max: `250`
|
|
645
|
+
* Default: `10`
|
|
646
|
+
*/
|
|
647
|
+
limit?: number | null;
|
|
648
|
+
/**
|
|
649
|
+
* Whether missing values should be included or excluded from the aggregation results.
|
|
650
|
+
* Default: `EXCLUDE`.
|
|
651
|
+
*/
|
|
652
|
+
missingValues?: MissingValues;
|
|
653
|
+
}
|
|
654
|
+
/** @oneof */
|
|
655
|
+
export interface ValueAggregationOptionsOneOf {
|
|
656
|
+
/** Options for including missing values in results. */
|
|
657
|
+
includeOptions?: IncludeMissingValuesOptions;
|
|
658
|
+
}
|
|
659
|
+
export interface RangeAggregation {
|
|
660
|
+
/** List of range buckets. During aggregation each entity will be placed in the first bucket its value falls into based on the provided range bounds. */
|
|
661
|
+
buckets?: RangeBucket[];
|
|
662
|
+
}
|
|
663
|
+
export interface ScalarAggregation {
|
|
664
|
+
/** Operation type for the scalar aggregation. */
|
|
665
|
+
type?: ScalarType;
|
|
666
|
+
}
|
|
667
|
+
export interface DateHistogramAggregation {
|
|
668
|
+
/** Interval for date histogram aggregation. */
|
|
669
|
+
interval?: Interval;
|
|
670
|
+
}
|
|
671
|
+
export declare enum Interval {
|
|
672
|
+
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
673
|
+
YEAR = "YEAR",
|
|
674
|
+
MONTH = "MONTH",
|
|
675
|
+
WEEK = "WEEK",
|
|
676
|
+
DAY = "DAY",
|
|
677
|
+
HOUR = "HOUR",
|
|
678
|
+
MINUTE = "MINUTE",
|
|
679
|
+
SECOND = "SECOND"
|
|
680
|
+
}
|
|
681
|
+
export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
682
|
+
/** A value aggregation calculates metrics such as "count" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */
|
|
683
|
+
value?: ValueAggregation;
|
|
684
|
+
/** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
|
|
685
|
+
range?: RangeAggregation;
|
|
686
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */
|
|
687
|
+
scalar?: ScalarAggregation;
|
|
688
|
+
/** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
|
|
689
|
+
dateHistogram?: DateHistogramAggregation;
|
|
690
|
+
/** Aggregation name displayed in the return. */
|
|
691
|
+
name?: string | null;
|
|
692
|
+
/** Type of aggregation to perform. */
|
|
693
|
+
type?: NestedAggregationType;
|
|
694
|
+
/** Field to aggregate by. */
|
|
695
|
+
fieldPath?: string;
|
|
696
|
+
}
|
|
697
|
+
/** @oneof */
|
|
698
|
+
export interface NestedAggregationItemKindOneOf {
|
|
699
|
+
/** A value aggregation calculates metrics such as "count" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */
|
|
700
|
+
value?: ValueAggregation;
|
|
701
|
+
/** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */
|
|
702
|
+
range?: RangeAggregation;
|
|
703
|
+
/** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */
|
|
704
|
+
scalar?: ScalarAggregation;
|
|
705
|
+
/** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */
|
|
706
|
+
dateHistogram?: DateHistogramAggregation;
|
|
707
|
+
}
|
|
708
|
+
export declare enum AggregationType {
|
|
709
|
+
/** Undefined aggregation type. */
|
|
710
|
+
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
711
|
+
/** An aggregation where result buckets are dynamically built - one per unique value. */
|
|
712
|
+
VALUE = "VALUE",
|
|
713
|
+
/** An aggregation where you can define a set of ranges - each representing a bucket. */
|
|
714
|
+
RANGE = "RANGE",
|
|
715
|
+
/** A single-value metric aggregation - such as min, max, sum, or avg. */
|
|
716
|
+
SCALAR = "SCALAR",
|
|
717
|
+
/** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */
|
|
718
|
+
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
719
|
+
/** Multi-level aggregation, where each next aggregation is nested within the previous one. */
|
|
720
|
+
NESTED = "NESTED"
|
|
721
|
+
}
|
|
722
|
+
export interface NestedAggregation {
|
|
723
|
+
/** Flattened list of aggregations, where each aggregation is nested within the previous one. */
|
|
724
|
+
nestedAggregations?: NestedAggregationItem[];
|
|
725
|
+
}
|
|
726
|
+
export interface SearchDetails {
|
|
727
|
+
/** Boolean search mode. Defines how separate search terms in the `expression` are combined. */
|
|
728
|
+
mode?: Mode;
|
|
729
|
+
/** Search term or expression. */
|
|
730
|
+
expression?: string | null;
|
|
731
|
+
/**
|
|
732
|
+
* Fields to search in.
|
|
733
|
+
*
|
|
734
|
+
* Searchable fields are `reservee.firstName`, `reservee.lastName`, `reservee.phone`, and `reservee.email`.
|
|
735
|
+
*
|
|
736
|
+
* If the array is empty, all fields are searched.
|
|
737
|
+
*/
|
|
738
|
+
fields?: string[];
|
|
739
|
+
/**
|
|
740
|
+
* Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.
|
|
741
|
+
* The search function uses an algorithm to find results that are close to what the site visitor typed.
|
|
742
|
+
*/
|
|
743
|
+
fuzzy?: boolean;
|
|
744
|
+
}
|
|
745
|
+
export declare enum Mode {
|
|
746
|
+
/** Returns instances where any terms in the expression occur. */
|
|
747
|
+
OR = "OR",
|
|
748
|
+
/** Returns instances where all the terms in the expression occur. */
|
|
749
|
+
AND = "AND"
|
|
750
|
+
}
|
|
751
|
+
export interface SearchReservationsResponse {
|
|
752
|
+
/** List of Reservations. */
|
|
753
|
+
reservations?: Reservation[];
|
|
754
|
+
/** Cursor paging metadata. */
|
|
755
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
756
|
+
/** Aggregation data. */
|
|
757
|
+
aggregationData?: AggregationData;
|
|
758
|
+
}
|
|
759
|
+
export interface AggregationData {
|
|
760
|
+
/** List of the aggregated data results. */
|
|
761
|
+
results?: AggregationResults[];
|
|
762
|
+
}
|
|
763
|
+
export interface ValueAggregationResult {
|
|
764
|
+
/** Value of the field */
|
|
765
|
+
value?: string;
|
|
766
|
+
/** Count of entities with this value */
|
|
767
|
+
count?: number;
|
|
768
|
+
}
|
|
769
|
+
export interface RangeAggregationResult {
|
|
770
|
+
/** Inclusive lower bound of the range. */
|
|
771
|
+
from?: number | null;
|
|
772
|
+
/** Exclusive upper bound of the range. */
|
|
773
|
+
to?: number | null;
|
|
774
|
+
/** Count of entities in the range. */
|
|
775
|
+
count?: number;
|
|
776
|
+
}
|
|
777
|
+
export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
778
|
+
/** List of the value aggregation results. */
|
|
779
|
+
values?: ValueResults;
|
|
780
|
+
/** List of the range aggregation results. */
|
|
781
|
+
ranges?: RangeResults;
|
|
782
|
+
/** List of the scalar aggregation results. */
|
|
783
|
+
scalar?: AggregationResultsScalarResult;
|
|
784
|
+
/** Aggregation name defined in the request. */
|
|
785
|
+
name?: string;
|
|
786
|
+
/** Type of aggregation performed. */
|
|
787
|
+
type?: AggregationType;
|
|
788
|
+
/** Field the data was aggregated by. */
|
|
789
|
+
fieldPath?: string;
|
|
790
|
+
}
|
|
791
|
+
/** @oneof */
|
|
792
|
+
export interface NestedAggregationResultsResultOneOf {
|
|
793
|
+
/** List of the value aggregation results. */
|
|
794
|
+
values?: ValueResults;
|
|
795
|
+
/** List of the range aggregation results. */
|
|
796
|
+
ranges?: RangeResults;
|
|
797
|
+
/** List of the scalar aggregation results. */
|
|
798
|
+
scalar?: AggregationResultsScalarResult;
|
|
799
|
+
}
|
|
800
|
+
export interface ValueResults {
|
|
801
|
+
/** List of value aggregations. */
|
|
802
|
+
results?: ValueAggregationResult[];
|
|
803
|
+
}
|
|
804
|
+
export interface RangeResults {
|
|
805
|
+
/** List of ranges returned in same order as requested. */
|
|
806
|
+
results?: RangeAggregationResult[];
|
|
807
|
+
}
|
|
808
|
+
export interface AggregationResultsScalarResult {
|
|
809
|
+
/** Type of scalar aggregation. */
|
|
810
|
+
type?: ScalarType;
|
|
811
|
+
/** Value of the scalar aggregation. */
|
|
812
|
+
value?: number;
|
|
813
|
+
}
|
|
814
|
+
export interface NestedValueAggregationResult {
|
|
815
|
+
value?: string;
|
|
816
|
+
nestedResults?: NestedAggregationResults;
|
|
817
|
+
}
|
|
818
|
+
export interface ValueResult {
|
|
819
|
+
/** Value of the field. */
|
|
820
|
+
value?: string;
|
|
821
|
+
/** Count of entities with this value. */
|
|
822
|
+
count?: number | null;
|
|
823
|
+
}
|
|
824
|
+
export interface RangeResult {
|
|
825
|
+
/** Inclusive lower bound of the range. */
|
|
826
|
+
from?: number | null;
|
|
827
|
+
/** Exclusive upper bound of the range. */
|
|
828
|
+
to?: number | null;
|
|
829
|
+
/** Count of entities in the range. */
|
|
830
|
+
count?: number | null;
|
|
831
|
+
}
|
|
832
|
+
export interface ScalarResult {
|
|
833
|
+
/** Scalar aggregation results. */
|
|
834
|
+
value?: number;
|
|
835
|
+
}
|
|
836
|
+
export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
837
|
+
/** Value aggregation results. */
|
|
838
|
+
value?: ValueResult;
|
|
839
|
+
/** Range aggregation results. */
|
|
840
|
+
range?: RangeResult;
|
|
841
|
+
/** Scalar aggregation results. */
|
|
842
|
+
scalar?: ScalarResult;
|
|
843
|
+
/** Date histogram aggregation results. */
|
|
844
|
+
dateHistogram?: ValueResult;
|
|
845
|
+
}
|
|
846
|
+
/** @oneof */
|
|
847
|
+
export interface NestedResultValueResultOneOf {
|
|
848
|
+
/** Value aggregation results. */
|
|
849
|
+
value?: ValueResult;
|
|
850
|
+
/** Range aggregation results. */
|
|
851
|
+
range?: RangeResult;
|
|
852
|
+
/** Scalar aggregation results. */
|
|
853
|
+
scalar?: ScalarResult;
|
|
854
|
+
/** Date histogram aggregation results. */
|
|
855
|
+
dateHistogram?: ValueResult;
|
|
856
|
+
}
|
|
857
|
+
export interface Results {
|
|
858
|
+
/** List of nested aggregation results. */
|
|
859
|
+
results?: Record<string, NestedResultValue>;
|
|
860
|
+
}
|
|
861
|
+
export interface DateHistogramResult {
|
|
862
|
+
/** Date in ISO 8601 format. */
|
|
863
|
+
value?: string;
|
|
864
|
+
/** Count of entities in the interval. */
|
|
865
|
+
count?: number;
|
|
866
|
+
}
|
|
867
|
+
/** deprecated */
|
|
868
|
+
export interface GroupByValueResults {
|
|
869
|
+
results?: NestedValueAggregationResult[];
|
|
870
|
+
}
|
|
871
|
+
export interface DateHistogramResults {
|
|
872
|
+
/** List of date histogram aggregations. */
|
|
873
|
+
results?: DateHistogramResult[];
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Results of `NESTED` aggregation type in a flattened form.
|
|
877
|
+
* Aggregations in the resulting array are keyed by the requested aggregation `name`.
|
|
878
|
+
*/
|
|
879
|
+
export interface NestedResults {
|
|
880
|
+
/** List of nested aggregation results. */
|
|
881
|
+
results?: Results[];
|
|
882
|
+
}
|
|
883
|
+
export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
884
|
+
/** Value aggregation results. */
|
|
885
|
+
values?: ValueResults;
|
|
886
|
+
/** Range aggregation results. */
|
|
887
|
+
ranges?: RangeResults;
|
|
888
|
+
/** Scalar aggregation results. */
|
|
889
|
+
scalar?: AggregationResultsScalarResult;
|
|
890
|
+
/** deprecated */
|
|
891
|
+
groupedByValue?: GroupByValueResults;
|
|
892
|
+
/** Date histogram aggregation results. */
|
|
893
|
+
dateHistogram?: DateHistogramResults;
|
|
894
|
+
/** Nested aggregation results. */
|
|
895
|
+
nested?: NestedResults;
|
|
896
|
+
/** Aggregation name defined in the request. */
|
|
897
|
+
name?: string;
|
|
898
|
+
/** Type of aggregation that was performed. */
|
|
899
|
+
type?: AggregationType;
|
|
900
|
+
/** Field the data was aggregated by. */
|
|
901
|
+
fieldPath?: string;
|
|
902
|
+
}
|
|
903
|
+
/** @oneof */
|
|
904
|
+
export interface AggregationResultsResultOneOf {
|
|
905
|
+
/** Value aggregation results. */
|
|
906
|
+
values?: ValueResults;
|
|
907
|
+
/** Range aggregation results. */
|
|
908
|
+
ranges?: RangeResults;
|
|
909
|
+
/** Scalar aggregation results. */
|
|
910
|
+
scalar?: AggregationResultsScalarResult;
|
|
911
|
+
/** deprecated */
|
|
912
|
+
groupedByValue?: GroupByValueResults;
|
|
913
|
+
/** Date histogram aggregation results. */
|
|
914
|
+
dateHistogram?: DateHistogramResults;
|
|
915
|
+
/** Nested aggregation results. */
|
|
916
|
+
nested?: NestedResults;
|
|
917
|
+
}
|
|
918
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
919
|
+
/** Information about the reservation that was created and event metadata. */
|
|
920
|
+
createdEvent?: EntityCreatedEvent;
|
|
921
|
+
/** Information about the reservation that was updated and event metadata. */
|
|
922
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
923
|
+
deletedEvent?: EntityDeletedEvent;
|
|
924
|
+
actionEvent?: ActionEvent;
|
|
925
|
+
/**
|
|
926
|
+
* Unique event ID.
|
|
927
|
+
* Allows clients to ignore duplicate webhooks.
|
|
928
|
+
*/
|
|
929
|
+
_id?: string;
|
|
930
|
+
/**
|
|
931
|
+
* Assumes actions are also always typed to an entity_type
|
|
932
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
933
|
+
*/
|
|
934
|
+
entityFqdn?: string;
|
|
935
|
+
/**
|
|
936
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
937
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
938
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
939
|
+
*/
|
|
940
|
+
slug?: string;
|
|
941
|
+
/** ID of the entity associated with the event. */
|
|
942
|
+
entityId?: string;
|
|
943
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
944
|
+
eventTime?: Date | null;
|
|
945
|
+
/**
|
|
946
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
947
|
+
* (for example, GDPR).
|
|
948
|
+
*/
|
|
949
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
950
|
+
/** If present, indicates the action that triggered the event. */
|
|
951
|
+
originatedFrom?: string | null;
|
|
952
|
+
/**
|
|
953
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
954
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
955
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
956
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
957
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
958
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
959
|
+
*/
|
|
960
|
+
entityEventSequence?: string | null;
|
|
961
|
+
}
|
|
962
|
+
/** @oneof */
|
|
963
|
+
export interface DomainEventBodyOneOf {
|
|
964
|
+
createdEvent?: EntityCreatedEvent;
|
|
965
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
966
|
+
deletedEvent?: EntityDeletedEvent;
|
|
967
|
+
actionEvent?: ActionEvent;
|
|
968
|
+
}
|
|
969
|
+
export interface EntityCreatedEvent {
|
|
970
|
+
entity?: string;
|
|
971
|
+
}
|
|
972
|
+
export interface RestoreInfo {
|
|
973
|
+
deletedDate?: Date | null;
|
|
974
|
+
}
|
|
975
|
+
export interface EntityUpdatedEvent {
|
|
976
|
+
/**
|
|
977
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
978
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
979
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
980
|
+
*/
|
|
981
|
+
currentEntity?: string;
|
|
982
|
+
}
|
|
983
|
+
export interface EntityDeletedEvent {
|
|
984
|
+
/** Entity that was deleted */
|
|
985
|
+
deletedEntity?: string | null;
|
|
986
|
+
}
|
|
987
|
+
export interface ActionEvent {
|
|
988
|
+
body?: string;
|
|
989
|
+
}
|
|
990
|
+
export interface Empty {
|
|
991
|
+
}
|
|
992
|
+
export interface RemoveReservationMigrationNotesRequest {
|
|
993
|
+
/** Reservation ID. */
|
|
994
|
+
reservationId?: string;
|
|
995
|
+
/** Revision. */
|
|
996
|
+
revision?: string;
|
|
997
|
+
}
|
|
998
|
+
export interface RemoveReservationMigrationNotesResponse {
|
|
999
|
+
reservation?: Reservation;
|
|
1000
|
+
}
|
|
1001
|
+
export interface RawHttpRequest {
|
|
1002
|
+
body?: Uint8Array;
|
|
1003
|
+
pathParams?: PathParametersEntry[];
|
|
1004
|
+
queryParams?: QueryParametersEntry[];
|
|
1005
|
+
headers?: HeadersEntry[];
|
|
1006
|
+
method?: string;
|
|
1007
|
+
rawPath?: string;
|
|
1008
|
+
rawQuery?: string;
|
|
1009
|
+
}
|
|
1010
|
+
export interface PathParametersEntry {
|
|
1011
|
+
key?: string;
|
|
1012
|
+
value?: string;
|
|
1013
|
+
}
|
|
1014
|
+
export interface QueryParametersEntry {
|
|
1015
|
+
key?: string;
|
|
1016
|
+
value?: string;
|
|
1017
|
+
}
|
|
1018
|
+
export interface HeadersEntry {
|
|
1019
|
+
key?: string;
|
|
1020
|
+
value?: string;
|
|
1021
|
+
}
|
|
1022
|
+
export interface RawHttpResponse {
|
|
1023
|
+
body?: Uint8Array;
|
|
1024
|
+
statusCode?: number | null;
|
|
1025
|
+
headers?: HeadersEntry[];
|
|
1026
|
+
}
|
|
1027
|
+
export interface MessageEnvelope {
|
|
1028
|
+
/** App instance ID. */
|
|
1029
|
+
instanceId?: string | null;
|
|
1030
|
+
/** Event type. */
|
|
1031
|
+
eventType?: string;
|
|
1032
|
+
/** The identification type and identity data. */
|
|
1033
|
+
identity?: IdentificationData;
|
|
1034
|
+
/** Stringify payload. */
|
|
1035
|
+
data?: string;
|
|
1036
|
+
}
|
|
1037
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1038
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1039
|
+
anonymousVisitorId?: string;
|
|
1040
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1041
|
+
memberId?: string;
|
|
1042
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1043
|
+
wixUserId?: string;
|
|
1044
|
+
/** ID of an app. */
|
|
1045
|
+
appId?: string;
|
|
1046
|
+
/** @readonly */
|
|
1047
|
+
identityType?: WebhookIdentityType;
|
|
1048
|
+
}
|
|
1049
|
+
/** @oneof */
|
|
1050
|
+
export interface IdentificationDataIdOneOf {
|
|
1051
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1052
|
+
anonymousVisitorId?: string;
|
|
1053
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1054
|
+
memberId?: string;
|
|
1055
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1056
|
+
wixUserId?: string;
|
|
1057
|
+
/** ID of an app. */
|
|
1058
|
+
appId?: string;
|
|
1059
|
+
}
|
|
1060
|
+
export declare enum WebhookIdentityType {
|
|
1061
|
+
UNKNOWN = "UNKNOWN",
|
|
1062
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1063
|
+
MEMBER = "MEMBER",
|
|
1064
|
+
WIX_USER = "WIX_USER",
|
|
1065
|
+
APP = "APP"
|
|
1066
|
+
}
|
|
1067
|
+
interface TablesNonNullableFields {
|
|
1068
|
+
ids: string[];
|
|
1069
|
+
}
|
|
1070
|
+
interface DetailsNonNullableFields {
|
|
1071
|
+
tables?: TablesNonNullableFields;
|
|
1072
|
+
}
|
|
1073
|
+
interface TableWithReservationConflictsNonNullableFields {
|
|
1074
|
+
tableId: string;
|
|
1075
|
+
reservationIds: string[];
|
|
1076
|
+
}
|
|
1077
|
+
export interface ReservationNonNullableFields {
|
|
1078
|
+
status: Status;
|
|
1079
|
+
source: Source;
|
|
1080
|
+
details?: DetailsNonNullableFields;
|
|
1081
|
+
tablesWithReservationConflicts: TableWithReservationConflictsNonNullableFields[];
|
|
1082
|
+
paymentStatus: PaymentStatus;
|
|
1083
|
+
}
|
|
1084
|
+
export interface CreateReservationResponseNonNullableFields {
|
|
1085
|
+
reservation?: ReservationNonNullableFields;
|
|
1086
|
+
}
|
|
1087
|
+
export interface GetReservationResponseNonNullableFields {
|
|
1088
|
+
reservation?: ReservationNonNullableFields;
|
|
1089
|
+
}
|
|
1090
|
+
export interface UpdateReservationResponseNonNullableFields {
|
|
1091
|
+
reservation?: ReservationNonNullableFields;
|
|
1092
|
+
}
|
|
1093
|
+
export interface CreateHeldReservationResponseNonNullableFields {
|
|
1094
|
+
reservation?: ReservationNonNullableFields;
|
|
1095
|
+
}
|
|
1096
|
+
export interface ReserveReservationResponseNonNullableFields {
|
|
1097
|
+
reservation?: ReservationNonNullableFields;
|
|
1098
|
+
}
|
|
1099
|
+
export interface CancelReservationResponseNonNullableFields {
|
|
1100
|
+
reservation?: ReservationNonNullableFields;
|
|
1101
|
+
}
|
|
1102
|
+
export interface ListReservationsResponseNonNullableFields {
|
|
1103
|
+
reservations: ReservationNonNullableFields[];
|
|
1104
|
+
}
|
|
1105
|
+
export interface QueryReservationsResponseNonNullableFields {
|
|
1106
|
+
reservations: ReservationNonNullableFields[];
|
|
1107
|
+
}
|
|
1108
|
+
interface ValueAggregationResultNonNullableFields {
|
|
1109
|
+
value: string;
|
|
1110
|
+
count: number;
|
|
1111
|
+
}
|
|
1112
|
+
interface ValueResultsNonNullableFields {
|
|
1113
|
+
results: ValueAggregationResultNonNullableFields[];
|
|
1114
|
+
}
|
|
1115
|
+
interface RangeAggregationResultNonNullableFields {
|
|
1116
|
+
count: number;
|
|
1117
|
+
}
|
|
1118
|
+
interface RangeResultsNonNullableFields {
|
|
1119
|
+
results: RangeAggregationResultNonNullableFields[];
|
|
1120
|
+
}
|
|
1121
|
+
interface AggregationResultsScalarResultNonNullableFields {
|
|
1122
|
+
type: ScalarType;
|
|
1123
|
+
value: number;
|
|
1124
|
+
}
|
|
1125
|
+
interface NestedAggregationResultsNonNullableFields {
|
|
1126
|
+
values?: ValueResultsNonNullableFields;
|
|
1127
|
+
ranges?: RangeResultsNonNullableFields;
|
|
1128
|
+
scalar?: AggregationResultsScalarResultNonNullableFields;
|
|
1129
|
+
name: string;
|
|
1130
|
+
type: AggregationType;
|
|
1131
|
+
fieldPath: string;
|
|
1132
|
+
}
|
|
1133
|
+
interface NestedValueAggregationResultNonNullableFields {
|
|
1134
|
+
value: string;
|
|
1135
|
+
nestedResults?: NestedAggregationResultsNonNullableFields;
|
|
1136
|
+
}
|
|
1137
|
+
interface GroupByValueResultsNonNullableFields {
|
|
1138
|
+
results: NestedValueAggregationResultNonNullableFields[];
|
|
1139
|
+
}
|
|
1140
|
+
interface DateHistogramResultNonNullableFields {
|
|
1141
|
+
value: string;
|
|
1142
|
+
count: number;
|
|
1143
|
+
}
|
|
1144
|
+
interface DateHistogramResultsNonNullableFields {
|
|
1145
|
+
results: DateHistogramResultNonNullableFields[];
|
|
1146
|
+
}
|
|
1147
|
+
interface AggregationResultsNonNullableFields {
|
|
1148
|
+
values?: ValueResultsNonNullableFields;
|
|
1149
|
+
ranges?: RangeResultsNonNullableFields;
|
|
1150
|
+
scalar?: AggregationResultsScalarResultNonNullableFields;
|
|
1151
|
+
groupedByValue?: GroupByValueResultsNonNullableFields;
|
|
1152
|
+
dateHistogram?: DateHistogramResultsNonNullableFields;
|
|
1153
|
+
name: string;
|
|
1154
|
+
type: AggregationType;
|
|
1155
|
+
fieldPath: string;
|
|
1156
|
+
}
|
|
1157
|
+
interface AggregationDataNonNullableFields {
|
|
1158
|
+
results: AggregationResultsNonNullableFields[];
|
|
1159
|
+
}
|
|
1160
|
+
export interface SearchReservationsResponseNonNullableFields {
|
|
1161
|
+
reservations: ReservationNonNullableFields[];
|
|
1162
|
+
aggregationData?: AggregationDataNonNullableFields;
|
|
1163
|
+
}
|
|
1164
|
+
export interface BaseEventMetadata {
|
|
1165
|
+
/** App instance ID. */
|
|
1166
|
+
instanceId?: string | null;
|
|
1167
|
+
/** Event type. */
|
|
1168
|
+
eventType?: string;
|
|
1169
|
+
/** The identification type and identity data. */
|
|
1170
|
+
identity?: IdentificationData;
|
|
1171
|
+
}
|
|
1172
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
1173
|
+
/**
|
|
1174
|
+
* Unique event ID.
|
|
1175
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1176
|
+
*/
|
|
1177
|
+
_id?: string;
|
|
1178
|
+
/**
|
|
1179
|
+
* Assumes actions are also always typed to an entity_type
|
|
1180
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1181
|
+
*/
|
|
1182
|
+
entityFqdn?: string;
|
|
1183
|
+
/**
|
|
1184
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1185
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1186
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1187
|
+
*/
|
|
1188
|
+
slug?: string;
|
|
1189
|
+
/** ID of the entity associated with the event. */
|
|
1190
|
+
entityId?: string;
|
|
1191
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1192
|
+
eventTime?: Date | null;
|
|
1193
|
+
/**
|
|
1194
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1195
|
+
* (for example, GDPR).
|
|
1196
|
+
*/
|
|
1197
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1198
|
+
/** If present, indicates the action that triggered the event. */
|
|
1199
|
+
originatedFrom?: string | null;
|
|
1200
|
+
/**
|
|
1201
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1202
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1203
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1204
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1205
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1206
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1207
|
+
*/
|
|
1208
|
+
entityEventSequence?: string | null;
|
|
1209
|
+
}
|
|
1210
|
+
export interface ReservationCreatedEnvelope {
|
|
1211
|
+
entity: Reservation;
|
|
1212
|
+
metadata: EventMetadata;
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Triggered when a held reservation is created.
|
|
1216
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1217
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1218
|
+
* @permissionScope Manage Reservations (Full)
|
|
1219
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1220
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1221
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1222
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1223
|
+
* @webhook
|
|
1224
|
+
* @eventType wix.table_reservations.v1.reservation_created
|
|
1225
|
+
* @documentationMaturity preview
|
|
1226
|
+
*/
|
|
1227
|
+
export declare function onReservationCreated(handler: (event: ReservationCreatedEnvelope) => void | Promise<void>): void;
|
|
1228
|
+
export interface ReservationDeletedEnvelope {
|
|
1229
|
+
metadata: EventMetadata;
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Triggered when a reservation is deleted.
|
|
1233
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1234
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1235
|
+
* @permissionScope Manage Reservations (Full)
|
|
1236
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1237
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1238
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1239
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1240
|
+
* @webhook
|
|
1241
|
+
* @eventType wix.table_reservations.v1.reservation_deleted
|
|
1242
|
+
* @documentationMaturity preview
|
|
1243
|
+
*/
|
|
1244
|
+
export declare function onReservationDeleted(handler: (event: ReservationDeletedEnvelope) => void | Promise<void>): void;
|
|
1245
|
+
export interface ReservationUpdatedEnvelope {
|
|
1246
|
+
entity: Reservation;
|
|
1247
|
+
metadata: EventMetadata;
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Triggered when a reservation is canceled.
|
|
1251
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1252
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1253
|
+
* @permissionScope Manage Reservations (Full)
|
|
1254
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1255
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1256
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1257
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1258
|
+
* @webhook
|
|
1259
|
+
* @eventType wix.table_reservations.v1.reservation_updated
|
|
1260
|
+
* @documentationMaturity preview
|
|
1261
|
+
*/
|
|
1262
|
+
export declare function onReservationUpdated(handler: (event: ReservationUpdatedEnvelope) => void | Promise<void>): void;
|
|
1263
|
+
/**
|
|
1264
|
+
* Creates a new reservation.
|
|
1265
|
+
*
|
|
1266
|
+
* `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.
|
|
1267
|
+
*
|
|
1268
|
+
* **Status and source**
|
|
1269
|
+
*
|
|
1270
|
+
* If a `status` is not provided, it will be set to:
|
|
1271
|
+
* * `RESERVED` if manual approval is not required for confirmation
|
|
1272
|
+
* * `REQUESTED` if manual approval is required for confirmation.
|
|
1273
|
+
*
|
|
1274
|
+
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
1275
|
+
* Attempting to create a reservation without these fields will result in an error.
|
|
1276
|
+
*
|
|
1277
|
+
* **Permissions**
|
|
1278
|
+
*
|
|
1279
|
+
* 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.
|
|
1280
|
+
*
|
|
1281
|
+
* 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.
|
|
1282
|
+
*
|
|
1283
|
+
*
|
|
1284
|
+
* > **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()`.
|
|
1285
|
+
* @param reservation - Reservation details.
|
|
1286
|
+
* @public
|
|
1287
|
+
* @documentationMaturity preview
|
|
1288
|
+
* @requiredField reservation
|
|
1289
|
+
* @requiredField reservation.details
|
|
1290
|
+
* @requiredField reservation.details.partySize
|
|
1291
|
+
* @requiredField reservation.details.reservationLocationId
|
|
1292
|
+
* @requiredField reservation.details.startDate
|
|
1293
|
+
* @param options - Options for creating the reservation.
|
|
1294
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE
|
|
1295
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE_FORCE
|
|
1296
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1297
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1298
|
+
* @permissionScope Manage Reservations (Full)
|
|
1299
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1300
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1301
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1302
|
+
* @permissionScope Manage Reservations (Basic)
|
|
1303
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1304
|
+
* @permissionScope Manage Reservations (Full)
|
|
1305
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1306
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1307
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1308
|
+
* @applicableIdentity APP
|
|
1309
|
+
* @applicableIdentity VISITOR
|
|
1310
|
+
* @returns Reservation.
|
|
1311
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.CreateReservation
|
|
1312
|
+
*/
|
|
1313
|
+
export declare function createReservation(reservation: Reservation, options?: CreateReservationOptions): Promise<Reservation & ReservationNonNullableFields>;
|
|
1314
|
+
export interface CreateReservationOptions {
|
|
1315
|
+
/**
|
|
1316
|
+
* Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
1317
|
+
*
|
|
1318
|
+
* Possible values:
|
|
1319
|
+
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
1320
|
+
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
1321
|
+
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
1322
|
+
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
1323
|
+
*/
|
|
1324
|
+
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
1325
|
+
/**
|
|
1326
|
+
* Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
1327
|
+
*
|
|
1328
|
+
* Possible values:
|
|
1329
|
+
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
1330
|
+
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
1331
|
+
*/
|
|
1332
|
+
ignoreReservationLocationConflicts?: Type[];
|
|
1333
|
+
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Retrieves a reservation.
|
|
1336
|
+
*
|
|
1337
|
+
* Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
|
|
1338
|
+
* @param reservationId - Reservation ID.
|
|
1339
|
+
* @public
|
|
1340
|
+
* @documentationMaturity preview
|
|
1341
|
+
* @requiredField reservationId
|
|
1342
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ
|
|
1343
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1344
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1345
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1346
|
+
* @permissionScope Manage Reservations (Full)
|
|
1347
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1348
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1349
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1350
|
+
* @permissionScope Manage Reservations (Basic)
|
|
1351
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1352
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1353
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1354
|
+
* @permissionScope Manage Reservations (Full)
|
|
1355
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1356
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1357
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1358
|
+
* @applicableIdentity APP
|
|
1359
|
+
* @applicableIdentity VISITOR
|
|
1360
|
+
* @returns Reservation.
|
|
1361
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.GetReservation
|
|
1362
|
+
*/
|
|
1363
|
+
export declare function getReservation(reservationId: string, options?: GetReservationOptions): Promise<Reservation & ReservationNonNullableFields>;
|
|
1364
|
+
export interface GetReservationOptions {
|
|
1365
|
+
/**
|
|
1366
|
+
* Array of named, predefined sets of projected fields to be returned.
|
|
1367
|
+
*
|
|
1368
|
+
* Supported values: `PUBLIC`, `FULL`.
|
|
1369
|
+
*
|
|
1370
|
+
* Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
|
|
1371
|
+
*/
|
|
1372
|
+
fieldsets?: Set[];
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Updates a reservation.
|
|
1376
|
+
*
|
|
1377
|
+
* 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.
|
|
1378
|
+
*
|
|
1379
|
+
* 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.
|
|
1380
|
+
* @param _id - Reservation ID.
|
|
1381
|
+
* @public
|
|
1382
|
+
* @documentationMaturity preview
|
|
1383
|
+
* @requiredField _id
|
|
1384
|
+
* @requiredField reservation
|
|
1385
|
+
* @requiredField reservation.revision
|
|
1386
|
+
* @param options - Options for updating the reservation.
|
|
1387
|
+
* @param reservation - Reservation information to update.
|
|
1388
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_UPDATE
|
|
1389
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_UPDATE_FORCE
|
|
1390
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1391
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1392
|
+
* @permissionScope Manage Reservations (Full)
|
|
1393
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1394
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1395
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1396
|
+
* @permissionScope Manage Reservations (Full)
|
|
1397
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1398
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1399
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1400
|
+
* @applicableIdentity APP
|
|
1401
|
+
* @returns Reservation.
|
|
1402
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.UpdateReservation
|
|
1403
|
+
*/
|
|
1404
|
+
export declare function updateReservation(_id: string | null, reservation: UpdateReservation, options?: UpdateReservationOptions): Promise<Reservation & ReservationNonNullableFields>;
|
|
1405
|
+
export interface UpdateReservation {
|
|
1406
|
+
/**
|
|
1407
|
+
* Reservation ID.
|
|
1408
|
+
* @readonly
|
|
1409
|
+
*/
|
|
1410
|
+
_id?: string | null;
|
|
1411
|
+
/**
|
|
1412
|
+
* Status of the reservation.
|
|
1413
|
+
*
|
|
1414
|
+
* 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.
|
|
1415
|
+
*/
|
|
1416
|
+
status?: Status;
|
|
1417
|
+
/**
|
|
1418
|
+
* Reservation source.
|
|
1419
|
+
*
|
|
1420
|
+
* This indicates how the reservation was made.
|
|
1421
|
+
*/
|
|
1422
|
+
source?: Source;
|
|
1423
|
+
/** Reservation details. */
|
|
1424
|
+
details?: Details;
|
|
1425
|
+
/**
|
|
1426
|
+
* Information about the person the reservation is being made for.
|
|
1427
|
+
*
|
|
1428
|
+
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
1429
|
+
* Attempting to create a reservation without these fields results in an error.
|
|
1430
|
+
*/
|
|
1431
|
+
reservee?: Reservee;
|
|
1432
|
+
/**
|
|
1433
|
+
* Information about the person making the reservation.
|
|
1434
|
+
*
|
|
1435
|
+
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
1436
|
+
* @readonly
|
|
1437
|
+
*/
|
|
1438
|
+
reservedBy?: ReservedBy;
|
|
1439
|
+
/**
|
|
1440
|
+
* Team message.
|
|
1441
|
+
*
|
|
1442
|
+
* A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
|
|
1443
|
+
*/
|
|
1444
|
+
teamMessage?: string | null;
|
|
1445
|
+
/**
|
|
1446
|
+
* Date and time the reservation was created.
|
|
1447
|
+
* @readonly
|
|
1448
|
+
*/
|
|
1449
|
+
_createdDate?: Date | null;
|
|
1450
|
+
/**
|
|
1451
|
+
* Date and time the reservation was changed.
|
|
1452
|
+
* @readonly
|
|
1453
|
+
*/
|
|
1454
|
+
_updatedDate?: Date | null;
|
|
1455
|
+
/**
|
|
1456
|
+
* Revision number, which increments by 1 each time the reservation is updated.
|
|
1457
|
+
* To prevent conflicting changes, the current revision must be specified when updating the reservation.
|
|
1458
|
+
*
|
|
1459
|
+
* Ignored when creating a reservation.
|
|
1460
|
+
* @readonly
|
|
1461
|
+
*/
|
|
1462
|
+
revision?: string | null;
|
|
1463
|
+
/** The reason the reservation was declined. */
|
|
1464
|
+
declineReason?: string | null;
|
|
1465
|
+
/**
|
|
1466
|
+
* Payment status.
|
|
1467
|
+
* @readonly
|
|
1468
|
+
*/
|
|
1469
|
+
paymentStatus?: PaymentStatus;
|
|
1470
|
+
/**
|
|
1471
|
+
* Custom field data for the reservation object.
|
|
1472
|
+
*
|
|
1473
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
1474
|
+
*/
|
|
1475
|
+
extendedFields?: ExtendedFields;
|
|
1476
|
+
}
|
|
1477
|
+
export interface UpdateReservationOptions {
|
|
1478
|
+
/** 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. */
|
|
1479
|
+
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
1480
|
+
ignoreReservationLocationConflicts?: Type[];
|
|
1481
|
+
}
|
|
1482
|
+
/**
|
|
1483
|
+
* Creates a new temporary reservation and holds it for the customer for 10 minutes.
|
|
1484
|
+
*
|
|
1485
|
+
* 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.
|
|
1486
|
+
*
|
|
1487
|
+
* You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.
|
|
1488
|
+
*
|
|
1489
|
+
* If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.
|
|
1490
|
+
*
|
|
1491
|
+
* @param reservationDetails - Held reservation information to update.
|
|
1492
|
+
* @public
|
|
1493
|
+
* @documentationMaturity preview
|
|
1494
|
+
* @requiredField reservationDetails
|
|
1495
|
+
* @requiredField reservationDetails.partySize
|
|
1496
|
+
* @requiredField reservationDetails.reservationLocationId
|
|
1497
|
+
* @requiredField reservationDetails.startDate
|
|
1498
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE_HELD
|
|
1499
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1500
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1501
|
+
* @permissionScope Manage Reservations (Full)
|
|
1502
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1503
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1504
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1505
|
+
* @permissionScope Manage Reservations (Basic)
|
|
1506
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1507
|
+
* @applicableIdentity APP
|
|
1508
|
+
* @applicableIdentity VISITOR
|
|
1509
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.CreateHeldReservation
|
|
1510
|
+
*/
|
|
1511
|
+
export declare function createHeldReservation(reservationDetails: HeldReservationDetails): Promise<CreateHeldReservationResponse & CreateHeldReservationResponseNonNullableFields>;
|
|
1512
|
+
/**
|
|
1513
|
+
* Reserves or requests a held reservation.
|
|
1514
|
+
*
|
|
1515
|
+
* Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.
|
|
1516
|
+
*
|
|
1517
|
+
* 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.
|
|
1518
|
+
*
|
|
1519
|
+
* `Reserve Reservation` changes a reservation's `HELD` status to:
|
|
1520
|
+
* * `RESERVED` if the reservation's reservation location does not require manual approval.
|
|
1521
|
+
* * `REQUESTED` if the reservation's reservation location requires manual approval.
|
|
1522
|
+
* @param reservationId - Reservation ID.
|
|
1523
|
+
* @param reservee - Reservee details.
|
|
1524
|
+
* @param revision - Revision number.
|
|
1525
|
+
*
|
|
1526
|
+
* Specify the existing `revision` to prevent conflicting updates to reservations.
|
|
1527
|
+
* @public
|
|
1528
|
+
* @documentationMaturity preview
|
|
1529
|
+
* @requiredField reservationId
|
|
1530
|
+
* @requiredField reservee
|
|
1531
|
+
* @requiredField reservee.firstName
|
|
1532
|
+
* @requiredField reservee.phone
|
|
1533
|
+
* @requiredField revision
|
|
1534
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_RESERVE
|
|
1535
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1536
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1537
|
+
* @permissionScope Manage Reservations (Full)
|
|
1538
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1539
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1540
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1541
|
+
* @permissionScope Manage Reservations (Basic)
|
|
1542
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1543
|
+
* @applicableIdentity APP
|
|
1544
|
+
* @applicableIdentity VISITOR
|
|
1545
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.ReserveReservation
|
|
1546
|
+
*/
|
|
1547
|
+
export declare function reserveReservation(reservationId: string, reservee: Reservee, revision: string | null): Promise<ReserveReservationResponse & ReserveReservationResponseNonNullableFields>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Cancels a reservation.
|
|
1550
|
+
*
|
|
1551
|
+
* Sets the reservation status to `CANCELED`.
|
|
1552
|
+
* @param reservationId - Reservation ID.
|
|
1553
|
+
* @param revision - Revision number.
|
|
1554
|
+
*
|
|
1555
|
+
* Specify the existing `revision` to prevent conflicting updates to reservations.
|
|
1556
|
+
* @public
|
|
1557
|
+
* @documentationMaturity preview
|
|
1558
|
+
* @requiredField reservationId
|
|
1559
|
+
* @requiredField revision
|
|
1560
|
+
* @param options - Options for canceling the reservation.
|
|
1561
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_CANCEL
|
|
1562
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1563
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1564
|
+
* @permissionScope Manage Reservations (Full)
|
|
1565
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1566
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1567
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1568
|
+
* @permissionScope Manage Reservations (Basic)
|
|
1569
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-BASIC
|
|
1570
|
+
* @applicableIdentity APP
|
|
1571
|
+
* @applicableIdentity VISITOR
|
|
1572
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.CancelReservation
|
|
1573
|
+
*/
|
|
1574
|
+
export declare function cancelReservation(reservationId: string, revision: string | null, options?: CancelReservationOptions): Promise<CancelReservationResponse & CancelReservationResponseNonNullableFields>;
|
|
1575
|
+
export interface CancelReservationOptions {
|
|
1576
|
+
/**
|
|
1577
|
+
* The phone number that was provided when the reservation was created.
|
|
1578
|
+
*
|
|
1579
|
+
* This is required for reservations with any `source` other than `WALK_IN`.
|
|
1580
|
+
*
|
|
1581
|
+
* This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
|
|
1582
|
+
*/
|
|
1583
|
+
phone?: string | null;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Deletes a reservation. Only reservations with the `HELD` status can be deleted.
|
|
1587
|
+
* @param reservationId - Reservation ID.
|
|
1588
|
+
* @public
|
|
1589
|
+
* @documentationMaturity preview
|
|
1590
|
+
* @requiredField reservationId
|
|
1591
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_DELETE
|
|
1592
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1593
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1594
|
+
* @applicableIdentity APP
|
|
1595
|
+
* @applicableIdentity VISITOR
|
|
1596
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.DeleteReservation
|
|
1597
|
+
*/
|
|
1598
|
+
export declare function deleteReservation(reservationId: string): Promise<void>;
|
|
1599
|
+
/**
|
|
1600
|
+
* Retrieves a list of up to 100 reservations.
|
|
1601
|
+
* @public
|
|
1602
|
+
* @documentationMaturity preview
|
|
1603
|
+
* @param options - Options for listing the reservations.
|
|
1604
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1605
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1606
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1607
|
+
* @permissionScope Manage Reservations (Full)
|
|
1608
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1609
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1610
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1611
|
+
* @applicableIdentity APP
|
|
1612
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.ListReservations
|
|
1613
|
+
*/
|
|
1614
|
+
export declare function listReservations(options?: ListReservationsOptions): Promise<ListReservationsResponse & ListReservationsResponseNonNullableFields>;
|
|
1615
|
+
export interface ListReservationsOptions {
|
|
1616
|
+
/** 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`. */
|
|
1617
|
+
paging?: CursorPaging;
|
|
1618
|
+
/** Defines how reservations in the response are sorted. */
|
|
1619
|
+
sort?: Sorting;
|
|
1620
|
+
/** Only reservations starting after this date are returned. */
|
|
1621
|
+
startDateFrom?: Date | null;
|
|
1622
|
+
/** Only reservations starting before this date are returned. */
|
|
1623
|
+
startDateTo?: Date | null;
|
|
1624
|
+
/** Only reservations with this status are returned. */
|
|
1625
|
+
status?: Status;
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Creates a query to retrieve a list of reservations.
|
|
1629
|
+
*
|
|
1630
|
+
* The `queryReservations()` function builds a query to retrieve a list of reservations and returns a [`ReservationsQueryBuilder`](/reservations/reservations-query-builder) object.
|
|
1631
|
+
*
|
|
1632
|
+
* The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.
|
|
1633
|
+
*
|
|
1634
|
+
* 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.
|
|
1635
|
+
*
|
|
1636
|
+
* `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:
|
|
1637
|
+
*
|
|
1638
|
+
* * [`limit(50)`](/reservations/reservations-query-builder/limit)
|
|
1639
|
+
* * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)
|
|
1640
|
+
*
|
|
1641
|
+
* The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-builder/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).
|
|
1642
|
+
* @public
|
|
1643
|
+
* @documentationMaturity preview
|
|
1644
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1645
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1646
|
+
* @permissionScope Manage Reservations (Full)
|
|
1647
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1648
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1649
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1650
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1651
|
+
* @applicableIdentity APP
|
|
1652
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.QueryReservations
|
|
1653
|
+
*/
|
|
1654
|
+
export declare function queryReservations(): ReservationsQueryBuilder;
|
|
1655
|
+
interface QueryCursorResult {
|
|
1656
|
+
cursors: Cursors;
|
|
1657
|
+
hasNext: () => boolean;
|
|
1658
|
+
hasPrev: () => boolean;
|
|
1659
|
+
length: number;
|
|
1660
|
+
pageSize: number;
|
|
1661
|
+
}
|
|
1662
|
+
export interface ReservationsQueryResult extends QueryCursorResult {
|
|
1663
|
+
items: Reservation[];
|
|
1664
|
+
query: ReservationsQueryBuilder;
|
|
1665
|
+
next: () => Promise<ReservationsQueryResult>;
|
|
1666
|
+
prev: () => Promise<ReservationsQueryResult>;
|
|
1667
|
+
}
|
|
1668
|
+
export interface ReservationsQueryBuilder {
|
|
1669
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1670
|
+
* @param value - Value to compare against.
|
|
1671
|
+
* @documentationMaturity preview
|
|
1672
|
+
*/
|
|
1673
|
+
eq: (propertyName: '_id' | 'status' | 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1674
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1675
|
+
* @param value - Value to compare against.
|
|
1676
|
+
* @documentationMaturity preview
|
|
1677
|
+
*/
|
|
1678
|
+
ne: (propertyName: '_id' | 'status' | 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1679
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1680
|
+
* @param value - Value to compare against.
|
|
1681
|
+
* @documentationMaturity preview
|
|
1682
|
+
*/
|
|
1683
|
+
ge: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1684
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1685
|
+
* @param value - Value to compare against.
|
|
1686
|
+
* @documentationMaturity preview
|
|
1687
|
+
*/
|
|
1688
|
+
gt: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1689
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1690
|
+
* @param value - Value to compare against.
|
|
1691
|
+
* @documentationMaturity preview
|
|
1692
|
+
*/
|
|
1693
|
+
le: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1694
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
1695
|
+
* @param value - Value to compare against.
|
|
1696
|
+
* @documentationMaturity preview
|
|
1697
|
+
*/
|
|
1698
|
+
lt: (propertyName: 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1699
|
+
/** @documentationMaturity preview */
|
|
1700
|
+
in: (propertyName: '_id' | 'status' | 'details.startDate', value: any) => ReservationsQueryBuilder;
|
|
1701
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1702
|
+
* @documentationMaturity preview
|
|
1703
|
+
*/
|
|
1704
|
+
ascending: (...propertyNames: Array<'details.startDate'>) => ReservationsQueryBuilder;
|
|
1705
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1706
|
+
* @documentationMaturity preview
|
|
1707
|
+
*/
|
|
1708
|
+
descending: (...propertyNames: Array<'details.startDate'>) => ReservationsQueryBuilder;
|
|
1709
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1710
|
+
* @documentationMaturity preview
|
|
1711
|
+
*/
|
|
1712
|
+
limit: (limit: number) => ReservationsQueryBuilder;
|
|
1713
|
+
/** @param cursor - A pointer to specific record
|
|
1714
|
+
* @documentationMaturity preview
|
|
1715
|
+
*/
|
|
1716
|
+
skipTo: (cursor: string) => ReservationsQueryBuilder;
|
|
1717
|
+
/** @documentationMaturity preview */
|
|
1718
|
+
find: () => Promise<ReservationsQueryResult>;
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Use this method to search the fields of the table reservations on a site for a given expression.
|
|
1722
|
+
*
|
|
1723
|
+
* You can also use this method to perform data aggregations on a site's table reservation fields.
|
|
1724
|
+
* For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.
|
|
1725
|
+
* @param search - Search query.
|
|
1726
|
+
* @public
|
|
1727
|
+
* @documentationMaturity preview
|
|
1728
|
+
* @requiredField search
|
|
1729
|
+
* @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL
|
|
1730
|
+
* @permissionScope Manage Reservations (Medium)
|
|
1731
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM
|
|
1732
|
+
* @permissionScope Manage Reservations (Full)
|
|
1733
|
+
* @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL
|
|
1734
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1735
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1736
|
+
* @applicableIdentity APP
|
|
1737
|
+
* @fqn wix.table_reservations.reservation.v1.ReservationsService.SearchReservations
|
|
1738
|
+
*/
|
|
1739
|
+
export declare function searchReservations(search: CursorSearch): Promise<SearchReservationsResponse & SearchReservationsResponseNonNullableFields>;
|
|
1740
|
+
export {};
|