@wix/table-reservations 1.0.77 → 1.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/context.d.ts +3 -3
- package/build/cjs/context.js +3 -3
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +3 -3
- package/build/cjs/index.js +3 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +3 -3
- package/build/cjs/meta.js +3 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +3 -3
- package/build/es/context.js +3 -3
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +3 -3
- package/build/es/index.js +3 -3
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +3 -3
- package/build/es/meta.js +3 -3
- package/build/es/meta.js.map +1 -1
- package/package.json +13 -9
- package/build/cjs/index.typings.d.ts +0 -3
- package/build/cjs/index.typings.js +0 -30
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.context.d.ts +0 -6
- package/build/cjs/src/table-reservations-v1-reservation-location.context.js +0 -73
- package/build/cjs/src/table-reservations-v1-reservation-location.context.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.http.d.ts +0 -40
- package/build/cjs/src/table-reservations-v1-reservation-location.http.js +0 -266
- package/build/cjs/src/table-reservations-v1-reservation-location.http.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.meta.d.ts +0 -20
- package/build/cjs/src/table-reservations-v1-reservation-location.meta.js +0 -106
- package/build/cjs/src/table-reservations-v1-reservation-location.meta.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.public.d.ts +0 -178
- package/build/cjs/src/table-reservations-v1-reservation-location.public.js +0 -48
- package/build/cjs/src/table-reservations-v1-reservation-location.public.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.types.d.ts +0 -2260
- package/build/cjs/src/table-reservations-v1-reservation-location.types.js +0 -187
- package/build/cjs/src/table-reservations-v1-reservation-location.types.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.d.ts +0 -2333
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.js +0 -613
- package/build/cjs/src/table-reservations-v1-reservation-location.universal.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.context.d.ts +0 -11
- package/build/cjs/src/table-reservations-v1-reservation.context.js +0 -158
- package/build/cjs/src/table-reservations-v1-reservation.context.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.http.d.ts +0 -89
- package/build/cjs/src/table-reservations-v1-reservation.http.js +0 -508
- package/build/cjs/src/table-reservations-v1-reservation.http.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.meta.d.ts +0 -29
- package/build/cjs/src/table-reservations-v1-reservation.meta.js +0 -199
- package/build/cjs/src/table-reservations-v1-reservation.meta.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.public.d.ts +0 -26
- package/build/cjs/src/table-reservations-v1-reservation.public.js +0 -78
- package/build/cjs/src/table-reservations-v1-reservation.public.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.types.d.ts +0 -976
- package/build/cjs/src/table-reservations-v1-reservation.types.js +0 -119
- package/build/cjs/src/table-reservations-v1-reservation.types.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-reservation.universal.d.ts +0 -1382
- package/build/cjs/src/table-reservations-v1-reservation.universal.js +0 -872
- package/build/cjs/src/table-reservations-v1-reservation.universal.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.context.d.ts +0 -3
- package/build/cjs/src/table-reservations-v1-time-slot.context.js +0 -22
- package/build/cjs/src/table-reservations-v1-time-slot.context.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.http.d.ts +0 -13
- package/build/cjs/src/table-reservations-v1-time-slot.http.js +0 -126
- package/build/cjs/src/table-reservations-v1-time-slot.http.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.meta.d.ts +0 -13
- package/build/cjs/src/table-reservations-v1-time-slot.meta.js +0 -47
- package/build/cjs/src/table-reservations-v1-time-slot.meta.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.public.d.ts +0 -8
- package/build/cjs/src/table-reservations-v1-time-slot.public.js +0 -17
- package/build/cjs/src/table-reservations-v1-time-slot.public.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.types.d.ts +0 -137
- package/build/cjs/src/table-reservations-v1-time-slot.types.js +0 -32
- package/build/cjs/src/table-reservations-v1-time-slot.types.js.map +0 -1
- package/build/cjs/src/table-reservations-v1-time-slot.universal.d.ts +0 -178
- package/build/cjs/src/table-reservations-v1-time-slot.universal.js +0 -166
- package/build/cjs/src/table-reservations-v1-time-slot.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -3
- package/build/es/index.typings.js +0 -4
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.context.d.ts +0 -6
- package/build/es/src/table-reservations-v1-reservation-location.context.js +0 -66
- package/build/es/src/table-reservations-v1-reservation-location.context.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.http.d.ts +0 -40
- package/build/es/src/table-reservations-v1-reservation-location.http.js +0 -259
- package/build/es/src/table-reservations-v1-reservation-location.http.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.meta.d.ts +0 -20
- package/build/es/src/table-reservations-v1-reservation-location.meta.js +0 -76
- package/build/es/src/table-reservations-v1-reservation-location.meta.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.public.d.ts +0 -178
- package/build/es/src/table-reservations-v1-reservation-location.public.js +0 -25
- package/build/es/src/table-reservations-v1-reservation-location.public.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.types.d.ts +0 -2260
- package/build/es/src/table-reservations-v1-reservation-location.types.js +0 -184
- package/build/es/src/table-reservations-v1-reservation-location.types.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation-location.universal.d.ts +0 -2333
- package/build/es/src/table-reservations-v1-reservation-location.universal.js +0 -583
- package/build/es/src/table-reservations-v1-reservation-location.universal.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.context.d.ts +0 -11
- package/build/es/src/table-reservations-v1-reservation.context.js +0 -146
- package/build/es/src/table-reservations-v1-reservation.context.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.http.d.ts +0 -89
- package/build/es/src/table-reservations-v1-reservation.http.js +0 -496
- package/build/es/src/table-reservations-v1-reservation.http.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.meta.d.ts +0 -29
- package/build/es/src/table-reservations-v1-reservation.meta.js +0 -164
- package/build/es/src/table-reservations-v1-reservation.meta.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.public.d.ts +0 -26
- package/build/es/src/table-reservations-v1-reservation.public.js +0 -50
- package/build/es/src/table-reservations-v1-reservation.public.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.types.d.ts +0 -976
- package/build/es/src/table-reservations-v1-reservation.types.js +0 -116
- package/build/es/src/table-reservations-v1-reservation.types.js.map +0 -1
- package/build/es/src/table-reservations-v1-reservation.universal.d.ts +0 -1382
- package/build/es/src/table-reservations-v1-reservation.universal.js +0 -837
- package/build/es/src/table-reservations-v1-reservation.universal.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.context.d.ts +0 -3
- package/build/es/src/table-reservations-v1-time-slot.context.js +0 -18
- package/build/es/src/table-reservations-v1-time-slot.context.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.http.d.ts +0 -13
- package/build/es/src/table-reservations-v1-time-slot.http.js +0 -122
- package/build/es/src/table-reservations-v1-time-slot.http.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.meta.d.ts +0 -13
- package/build/es/src/table-reservations-v1-time-slot.meta.js +0 -20
- package/build/es/src/table-reservations-v1-time-slot.meta.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.public.d.ts +0 -8
- package/build/es/src/table-reservations-v1-time-slot.public.js +0 -9
- package/build/es/src/table-reservations-v1-time-slot.public.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.types.d.ts +0 -137
- package/build/es/src/table-reservations-v1-time-slot.types.js +0 -29
- package/build/es/src/table-reservations-v1-time-slot.types.js.map +0 -1
- package/build/es/src/table-reservations-v1-time-slot.universal.d.ts +0 -178
- package/build/es/src/table-reservations-v1-time-slot.universal.js +0 -139
- package/build/es/src/table-reservations-v1-time-slot.universal.js.map +0 -1
|
@@ -1,976 +0,0 @@
|
|
|
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
|
-
* * `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.
|
|
12
|
-
* * `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.
|
|
13
|
-
* * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
|
|
14
|
-
* * `RESERVED`: The reservation is confirmed.
|
|
15
|
-
* * `SEATED`: The customer is currently occupying the table.
|
|
16
|
-
* * `CANCELED`: The reservation is canceled.
|
|
17
|
-
* * `NO_SHOW`: The customer didn't show up for their reservation.
|
|
18
|
-
* * `FINISHED`: The reservation completed successfully.
|
|
19
|
-
* * `PAYMENT_PENDING`: The reservation is temporary and will expire in 10 minutes from the created time, during which time the reservee should pay. This status is set automatically when the reservation is in HELD status and reserve reservation endpoint is called and payment is needed. After payment is completed status will be changed automatically to RESERVED.
|
|
20
|
-
*
|
|
21
|
-
* See the [Reservation Lifecycle article](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/the-reservation-lifecycle) for an explanation of the role of statuses in the reservation lifecycle.
|
|
22
|
-
*/
|
|
23
|
-
status?: Status;
|
|
24
|
-
/**
|
|
25
|
-
* Reservation source.
|
|
26
|
-
*
|
|
27
|
-
* This indicates how the reservation was made.
|
|
28
|
-
* * `ONLINE` indicates that the customer made the reservation through a website or app.
|
|
29
|
-
* * `OFFLINE` indicates that the reservation was made by a restaurant employee, for example when a customer calls to make a reservation.
|
|
30
|
-
* * `WALK-IN` indicates that the customer did not make a reservation beforehand, and the reservation was entered into the system by a restaurant employee when the customer arrived at the restaurant.
|
|
31
|
-
*/
|
|
32
|
-
source?: Source;
|
|
33
|
-
/** Reservation details. */
|
|
34
|
-
details?: Details;
|
|
35
|
-
/**
|
|
36
|
-
* Information about the person the reservation is being made for.
|
|
37
|
-
*
|
|
38
|
-
* A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
|
|
39
|
-
* Attempting to create a reservation without these fields results in an error.
|
|
40
|
-
*/
|
|
41
|
-
reservee?: Reservee;
|
|
42
|
-
/**
|
|
43
|
-
* Information about the person making the reservation.
|
|
44
|
-
*
|
|
45
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
46
|
-
* @readonly
|
|
47
|
-
*/
|
|
48
|
-
reservedBy?: ReservedBy;
|
|
49
|
-
/**
|
|
50
|
-
* Team message.
|
|
51
|
-
*
|
|
52
|
-
* A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
|
|
53
|
-
*/
|
|
54
|
-
teamMessage?: string | null;
|
|
55
|
-
/**
|
|
56
|
-
* Date and time the reservation was created.
|
|
57
|
-
* @readonly
|
|
58
|
-
*/
|
|
59
|
-
createdDate?: Date;
|
|
60
|
-
/**
|
|
61
|
-
* Date and time the reservation was changed.
|
|
62
|
-
* @readonly
|
|
63
|
-
*/
|
|
64
|
-
updatedDate?: Date;
|
|
65
|
-
/**
|
|
66
|
-
* Revision number, which increments by 1 each time the reservation is updated.
|
|
67
|
-
* To prevent conflicting changes, the current revision must be passed when updating the reservation.
|
|
68
|
-
*
|
|
69
|
-
* Ignored when creating a reservation.
|
|
70
|
-
* @readonly
|
|
71
|
-
*/
|
|
72
|
-
revision?: string | null;
|
|
73
|
-
/** The reason the reservation was declined. */
|
|
74
|
-
declineReason?: string | null;
|
|
75
|
-
}
|
|
76
|
-
export declare enum Status {
|
|
77
|
-
UNKNOWN = "UNKNOWN",
|
|
78
|
-
/** The reservation is held for 10 minutes, during which time the reservee should fill in their details. */
|
|
79
|
-
HELD = "HELD",
|
|
80
|
-
/** The reservation has been reserved. */
|
|
81
|
-
RESERVED = "RESERVED",
|
|
82
|
-
/** The reservation has been canceled. */
|
|
83
|
-
CANCELED = "CANCELED",
|
|
84
|
-
/** The reservation has finished successfully. */
|
|
85
|
-
FINISHED = "FINISHED",
|
|
86
|
-
/** The reservee didn't arrive. */
|
|
87
|
-
NO_SHOW = "NO_SHOW",
|
|
88
|
-
/** The reservee occupied the table. */
|
|
89
|
-
SEATED = "SEATED",
|
|
90
|
-
/** The reservee requested a reservation and is waiting for manual approval. */
|
|
91
|
-
REQUESTED = "REQUESTED",
|
|
92
|
-
/** The owner declined a reservee's request. */
|
|
93
|
-
DECLINED = "DECLINED",
|
|
94
|
-
/** The reservation is held for 10 minutes from the created time, during which time the reservee should pay. After payment is completed status will be changed automatically to RESERVED. */
|
|
95
|
-
PAYMENT_PENDING = "PAYMENT_PENDING"
|
|
96
|
-
}
|
|
97
|
-
export declare enum Source {
|
|
98
|
-
UNKNOWN = "UNKNOWN",
|
|
99
|
-
/** The reservation is created by a User. */
|
|
100
|
-
OFFLINE = "OFFLINE",
|
|
101
|
-
/** The reservation is created by UoU. */
|
|
102
|
-
ONLINE = "ONLINE",
|
|
103
|
-
/** The reservation is created by a User. It can be created without reservee data. */
|
|
104
|
-
WALK_IN = "WALK_IN"
|
|
105
|
-
}
|
|
106
|
-
/** Reservation details. */
|
|
107
|
-
export interface Details {
|
|
108
|
-
/** ID of the reservation location at which this reservation will be made. */
|
|
109
|
-
reservationLocationId?: string | null;
|
|
110
|
-
/** IDs of tables used for this reservation. */
|
|
111
|
-
tableIds?: string[] | null;
|
|
112
|
-
/** Start date and time of the reservation. */
|
|
113
|
-
startDate?: Date;
|
|
114
|
-
/** End date and time of the reservation. */
|
|
115
|
-
endDate?: Date;
|
|
116
|
-
/** Party size. */
|
|
117
|
-
partySize?: number | null;
|
|
118
|
-
}
|
|
119
|
-
/** The person the reservation is being made for. */
|
|
120
|
-
export interface Reservee {
|
|
121
|
-
/**
|
|
122
|
-
* First name.
|
|
123
|
-
*
|
|
124
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
125
|
-
*/
|
|
126
|
-
firstName?: string | null;
|
|
127
|
-
/** Last name. */
|
|
128
|
-
lastName?: string | null;
|
|
129
|
-
/** Email address. */
|
|
130
|
-
email?: string | null;
|
|
131
|
-
/**
|
|
132
|
-
* Phone number.
|
|
133
|
-
*
|
|
134
|
-
* This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`.
|
|
135
|
-
*
|
|
136
|
-
* This field is required if the reservation's `status` is anything other than `WALK_IN`.
|
|
137
|
-
*/
|
|
138
|
-
phone?: string | null;
|
|
139
|
-
/** Whether the reservee has given marketing consent. */
|
|
140
|
-
marketingConsent?: boolean | null;
|
|
141
|
-
/**
|
|
142
|
-
* Custom fields for the reservee in key-value pairs.
|
|
143
|
-
*
|
|
144
|
-
* 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"`.
|
|
145
|
-
*
|
|
146
|
-
* Empty fields are not returned.
|
|
147
|
-
*/
|
|
148
|
-
customFields?: Record<string, any> | null;
|
|
149
|
-
/**
|
|
150
|
-
* Contact ID. If a contact with this ID does not exist on the site, one will be created.
|
|
151
|
-
* @readonly
|
|
152
|
-
*/
|
|
153
|
-
contactId?: string | null;
|
|
154
|
-
}
|
|
155
|
-
/** A person making reservation. */
|
|
156
|
-
export interface ReservedBy {
|
|
157
|
-
/**
|
|
158
|
-
* 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.
|
|
159
|
-
* @readonly
|
|
160
|
-
*/
|
|
161
|
-
contactId?: string | null;
|
|
162
|
-
}
|
|
163
|
-
/** Migration note. */
|
|
164
|
-
export interface MigrationNote {
|
|
165
|
-
}
|
|
166
|
-
/** Table with reservation conflicts. */
|
|
167
|
-
export interface TableWithReservationConflicts {
|
|
168
|
-
/** Table id. */
|
|
169
|
-
tableId?: string;
|
|
170
|
-
/** List of reservation ids. */
|
|
171
|
-
reservationIds?: string[];
|
|
172
|
-
}
|
|
173
|
-
export interface CreateReservationRequest {
|
|
174
|
-
/** Reservation details. */
|
|
175
|
-
reservation: Reservation;
|
|
176
|
-
/**
|
|
177
|
-
* Ignore table combination conflicts of the types included in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
178
|
-
*
|
|
179
|
-
* Possible values:
|
|
180
|
-
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
181
|
-
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
182
|
-
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
183
|
-
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
184
|
-
*/
|
|
185
|
-
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
186
|
-
/**
|
|
187
|
-
* Ignored reservation location conflicts of the types included in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.
|
|
188
|
-
*
|
|
189
|
-
* Possible values:
|
|
190
|
-
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
191
|
-
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
192
|
-
*/
|
|
193
|
-
ignoreReservationLocationConflicts?: Type[];
|
|
194
|
-
}
|
|
195
|
-
export declare enum TableCombinationConflictType {
|
|
196
|
-
UNKNOWN = "UNKNOWN",
|
|
197
|
-
RESERVED = "RESERVED",
|
|
198
|
-
TOO_BIG = "TOO_BIG",
|
|
199
|
-
TOO_SMALL = "TOO_SMALL",
|
|
200
|
-
OFFLINE_ONLY = "OFFLINE_ONLY"
|
|
201
|
-
}
|
|
202
|
-
export declare enum Type {
|
|
203
|
-
UNKNOWN = "UNKNOWN",
|
|
204
|
-
PARTY_PACING = "PARTY_PACING",
|
|
205
|
-
SEAT_PACING = "SEAT_PACING"
|
|
206
|
-
}
|
|
207
|
-
export interface CreateReservationResponse {
|
|
208
|
-
/** Reservation. */
|
|
209
|
-
reservation?: Reservation;
|
|
210
|
-
}
|
|
211
|
-
export interface ReservationDetailsConflicts {
|
|
212
|
-
/** Table combinations conflicts. */
|
|
213
|
-
tableCombinationConflicts?: TableCombinationConflict[];
|
|
214
|
-
/** Reservation location conflicts. */
|
|
215
|
-
reservationLocationConflicts?: ReservationLocationConflict[];
|
|
216
|
-
}
|
|
217
|
-
export interface TableCombinationConflict {
|
|
218
|
-
/** Conflict type. */
|
|
219
|
-
type?: TableCombinationConflictType;
|
|
220
|
-
}
|
|
221
|
-
export interface ReservationLocationConflict {
|
|
222
|
-
/** Reservation location conflict type. */
|
|
223
|
-
type?: Type;
|
|
224
|
-
}
|
|
225
|
-
export interface GetReservationRequest {
|
|
226
|
-
/** Reservation ID. */
|
|
227
|
-
reservationId: string;
|
|
228
|
-
/**
|
|
229
|
-
* Array of named, predefined sets of projected fields to be returned.
|
|
230
|
-
*
|
|
231
|
-
* - `PUBLIC`: Returns `id`, `status`, `details.reservationLocationId`, `details.startDate`, `details.endDate`, `details.partySize`, `createdDate`, `revision`, `declineReason`.
|
|
232
|
-
* `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
|
|
233
|
-
* - `FULL`: Returns all fields.
|
|
234
|
-
*
|
|
235
|
-
* Default: If `fields` is omitted from the request, `PUBLIC`.
|
|
236
|
-
*/
|
|
237
|
-
fieldsets?: Set[];
|
|
238
|
-
}
|
|
239
|
-
export declare enum Set {
|
|
240
|
-
PUBLIC = "PUBLIC",
|
|
241
|
-
FULL = "FULL"
|
|
242
|
-
}
|
|
243
|
-
export interface GetReservationResponse {
|
|
244
|
-
/** Reservation. */
|
|
245
|
-
reservation?: Reservation;
|
|
246
|
-
}
|
|
247
|
-
export interface UpdateReservationRequest {
|
|
248
|
-
/** Reservation information to update. */
|
|
249
|
-
reservation: Reservation;
|
|
250
|
-
/**
|
|
251
|
-
* 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.
|
|
252
|
-
*
|
|
253
|
-
* Possible values:
|
|
254
|
-
* * `"RESERVED"`: One or more of the chosen tables are already reserved.
|
|
255
|
-
* * `"TOO_BIG"`: The party is too big for the selected table.
|
|
256
|
-
* * `"TOO_SMALL"`: The party is too small for the selected table.
|
|
257
|
-
* * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
|
|
258
|
-
*/
|
|
259
|
-
ignoreTableCombinationConflicts?: TableCombinationConflictType[];
|
|
260
|
-
/**
|
|
261
|
-
* Ignored reservation location conflicts of the types included in the array. This ensures that the reservation is updated even if the given conflicts would normally prevent it.
|
|
262
|
-
*
|
|
263
|
-
* Possible values:
|
|
264
|
-
* * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
|
|
265
|
-
* * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
|
|
266
|
-
*/
|
|
267
|
-
ignoreReservationLocationConflicts?: Type[];
|
|
268
|
-
}
|
|
269
|
-
export interface UpdateReservationResponse {
|
|
270
|
-
/** Reservation. */
|
|
271
|
-
reservation?: Reservation;
|
|
272
|
-
}
|
|
273
|
-
export interface ReservationDataUpdated {
|
|
274
|
-
/** Reserved reservation. */
|
|
275
|
-
reservation?: Reservation;
|
|
276
|
-
/** Old reservation. */
|
|
277
|
-
oldReservation?: Reservation;
|
|
278
|
-
}
|
|
279
|
-
export interface CreateHeldReservationRequest {
|
|
280
|
-
/** Held reservation information to update. */
|
|
281
|
-
reservationDetails: HeldReservationDetails;
|
|
282
|
-
}
|
|
283
|
-
/** Reservation details when create reservation in status HELD. */
|
|
284
|
-
export interface HeldReservationDetails {
|
|
285
|
-
/** ID of the reservation location where the reservation is made. */
|
|
286
|
-
reservationLocationId?: string | null;
|
|
287
|
-
/** Start date and time of the reservation. */
|
|
288
|
-
startDate?: Date;
|
|
289
|
-
/** Party size. */
|
|
290
|
-
partySize?: number | null;
|
|
291
|
-
}
|
|
292
|
-
export interface CreateHeldReservationResponse {
|
|
293
|
-
/** Reservation. */
|
|
294
|
-
reservation?: Reservation;
|
|
295
|
-
}
|
|
296
|
-
export interface ReserveReservationRequest {
|
|
297
|
-
/** Reservation ID. */
|
|
298
|
-
reservationId: string;
|
|
299
|
-
/** Reservee details. */
|
|
300
|
-
reservee: Reservee;
|
|
301
|
-
/**
|
|
302
|
-
* Revision number.
|
|
303
|
-
*
|
|
304
|
-
* Include the existing `revision` to prevent conflicting updates to reservations.
|
|
305
|
-
*/
|
|
306
|
-
revision: string | null;
|
|
307
|
-
}
|
|
308
|
-
export interface ReserveReservationResponse {
|
|
309
|
-
/** Reservation. */
|
|
310
|
-
reservation?: Reservation;
|
|
311
|
-
}
|
|
312
|
-
export interface ReservationReserved {
|
|
313
|
-
/** Reserved reservation. */
|
|
314
|
-
reservation?: Reservation;
|
|
315
|
-
}
|
|
316
|
-
export interface CancelReservationRequest {
|
|
317
|
-
/** Reservation ID. */
|
|
318
|
-
reservationId: string;
|
|
319
|
-
/**
|
|
320
|
-
* Revision number.
|
|
321
|
-
*
|
|
322
|
-
* Include the existing `revision` to prevent conflicting updates to reservations.
|
|
323
|
-
*/
|
|
324
|
-
revision: string | null;
|
|
325
|
-
/**
|
|
326
|
-
* The phone number that was provided when the reservation was created.
|
|
327
|
-
*
|
|
328
|
-
* This is required for reservations with any `source` other than `WALK_IN`.
|
|
329
|
-
*
|
|
330
|
-
* This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
|
|
331
|
-
*/
|
|
332
|
-
phone?: string | null;
|
|
333
|
-
}
|
|
334
|
-
export interface CancelReservationResponse {
|
|
335
|
-
/** Reservation. */
|
|
336
|
-
reservation?: Reservation;
|
|
337
|
-
}
|
|
338
|
-
export interface ReservationCanceled {
|
|
339
|
-
/** Reserved reservation. */
|
|
340
|
-
reservation?: Reservation;
|
|
341
|
-
}
|
|
342
|
-
export interface DeleteReservationRequest {
|
|
343
|
-
/** Reservation ID. */
|
|
344
|
-
reservationId?: string;
|
|
345
|
-
revision?: string;
|
|
346
|
-
}
|
|
347
|
-
export interface DeleteReservationResponse {
|
|
348
|
-
}
|
|
349
|
-
export interface ListReservationsRequest {
|
|
350
|
-
/** 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`. */
|
|
351
|
-
paging?: CursorPaging;
|
|
352
|
-
/** Defines how reservations in the response are sorted. */
|
|
353
|
-
sort?: Sorting;
|
|
354
|
-
/** Only reservations starting after this date are returned. */
|
|
355
|
-
startDateFrom?: Date;
|
|
356
|
-
/** Only reservations starting before this date are returned. */
|
|
357
|
-
startDateTo?: Date;
|
|
358
|
-
/**
|
|
359
|
-
* Only reservations with this status are returned.
|
|
360
|
-
*
|
|
361
|
-
* * `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.
|
|
362
|
-
* * `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.
|
|
363
|
-
* * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
|
|
364
|
-
* * `RESERVED`: The reservation is confirmed.
|
|
365
|
-
* * `SEATED`: The customer is currently occupying the table.
|
|
366
|
-
* * `CANCELED`: The reservation is canceled.
|
|
367
|
-
* * `NO_SHOW`: The customer didn't show up for their reservation.
|
|
368
|
-
* * `FINISHED`: The reservation completed successfully.
|
|
369
|
-
*/
|
|
370
|
-
status?: Status;
|
|
371
|
-
}
|
|
372
|
-
export interface CursorPaging {
|
|
373
|
-
/** Number of items to load. */
|
|
374
|
-
limit?: number | null;
|
|
375
|
-
/**
|
|
376
|
-
* Pointer to the next or previous page in the list of results.
|
|
377
|
-
*
|
|
378
|
-
* You can get the relevant cursor token
|
|
379
|
-
* from the `pagingMetadata` object in the previous call's response.
|
|
380
|
-
* Not relevant for the first request.
|
|
381
|
-
*/
|
|
382
|
-
cursor?: string | null;
|
|
383
|
-
}
|
|
384
|
-
export interface Sorting {
|
|
385
|
-
/** Name of the field to sort by. */
|
|
386
|
-
fieldName?: string;
|
|
387
|
-
/**
|
|
388
|
-
* Sort order.
|
|
389
|
-
*
|
|
390
|
-
* Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`.
|
|
391
|
-
*/
|
|
392
|
-
order?: SortOrder;
|
|
393
|
-
}
|
|
394
|
-
export declare enum SortOrder {
|
|
395
|
-
ASC = "ASC",
|
|
396
|
-
DESC = "DESC"
|
|
397
|
-
}
|
|
398
|
-
export interface ListReservationsResponse {
|
|
399
|
-
/** List of reservations. */
|
|
400
|
-
reservations?: Reservation[];
|
|
401
|
-
/** Metadata for the paginated results. */
|
|
402
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
403
|
-
}
|
|
404
|
-
export interface CursorPagingMetadata {
|
|
405
|
-
/** Number of items returned in the response. */
|
|
406
|
-
count?: number | null;
|
|
407
|
-
/** Offset that was requested. */
|
|
408
|
-
cursors?: Cursors;
|
|
409
|
-
/**
|
|
410
|
-
* Indicates if there are more results after the current page.
|
|
411
|
-
* If `true`, another page of results can be retrieved.
|
|
412
|
-
* If `false`, this is the last page.
|
|
413
|
-
*/
|
|
414
|
-
hasNext?: boolean | null;
|
|
415
|
-
}
|
|
416
|
-
export interface Cursors {
|
|
417
|
-
/** Cursor pointing to next page in the list of results. */
|
|
418
|
-
next?: string | null;
|
|
419
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
420
|
-
prev?: string | null;
|
|
421
|
-
}
|
|
422
|
-
export interface QueryReservationsRequest {
|
|
423
|
-
/** Query to select reservations. */
|
|
424
|
-
query: CursorQuery;
|
|
425
|
-
}
|
|
426
|
-
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
427
|
-
/** 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`. */
|
|
428
|
-
cursorPaging?: CursorPaging;
|
|
429
|
-
/**
|
|
430
|
-
* Filter object in the following format:
|
|
431
|
-
* `"filter" : {
|
|
432
|
-
* "fieldName1": "value1",
|
|
433
|
-
* "fieldName2":{"$operator":"value2"}
|
|
434
|
-
* }`
|
|
435
|
-
*
|
|
436
|
-
* For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-and-filtering) article.
|
|
437
|
-
* To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
438
|
-
*/
|
|
439
|
-
filter?: Record<string, any> | null;
|
|
440
|
-
/**
|
|
441
|
-
* Sort object in the following format:
|
|
442
|
-
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
443
|
-
*/
|
|
444
|
-
sort?: Sorting[];
|
|
445
|
-
}
|
|
446
|
-
/** @oneof */
|
|
447
|
-
export interface CursorQueryPagingMethodOneOf {
|
|
448
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
449
|
-
cursorPaging?: CursorPaging;
|
|
450
|
-
}
|
|
451
|
-
export interface QueryReservationsResponse {
|
|
452
|
-
/** List of reservations. */
|
|
453
|
-
reservations?: Reservation[];
|
|
454
|
-
/** Metadata for the paginated results. */
|
|
455
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
456
|
-
}
|
|
457
|
-
export interface SearchReservationsRequest {
|
|
458
|
-
/** Search query. */
|
|
459
|
-
search: CursorSearch;
|
|
460
|
-
}
|
|
461
|
-
export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
462
|
-
/** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort' */
|
|
463
|
-
cursorPaging?: CursorPaging;
|
|
464
|
-
/** A filter object. See the filter section [here](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/wix-api-basics/1011-wql-wix-query-language) */
|
|
465
|
-
filter?: Record<string, any> | null;
|
|
466
|
-
/** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
|
|
467
|
-
sort?: Sorting[];
|
|
468
|
-
/** Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. */
|
|
469
|
-
aggregations?: Aggregation[];
|
|
470
|
-
/** free text to match in searchable fields */
|
|
471
|
-
search?: SearchDetails;
|
|
472
|
-
/** Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. */
|
|
473
|
-
timeZone?: string | null;
|
|
474
|
-
}
|
|
475
|
-
/** @oneof */
|
|
476
|
-
export interface CursorSearchPagingMethodOneOf {
|
|
477
|
-
/** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort' */
|
|
478
|
-
cursorPaging?: CursorPaging;
|
|
479
|
-
}
|
|
480
|
-
export interface Aggregation extends AggregationKindOneOf {
|
|
481
|
-
value?: ValueAggregation;
|
|
482
|
-
range?: RangeAggregation;
|
|
483
|
-
scalar?: ScalarAggregation;
|
|
484
|
-
dateHistogram?: DateHistogramAggregation;
|
|
485
|
-
nested?: NestedAggregation;
|
|
486
|
-
name?: string | null;
|
|
487
|
-
type?: AggregationType;
|
|
488
|
-
fieldPath?: string;
|
|
489
|
-
groupBy?: GroupByAggregation;
|
|
490
|
-
}
|
|
491
|
-
/** @oneof */
|
|
492
|
-
export interface AggregationKindOneOf {
|
|
493
|
-
value?: ValueAggregation;
|
|
494
|
-
range?: RangeAggregation;
|
|
495
|
-
scalar?: ScalarAggregation;
|
|
496
|
-
dateHistogram?: DateHistogramAggregation;
|
|
497
|
-
nested?: NestedAggregation;
|
|
498
|
-
}
|
|
499
|
-
export interface RangeBucket {
|
|
500
|
-
/** Inclusive lower bound of the range. Required if to is not given. */
|
|
501
|
-
from?: number | null;
|
|
502
|
-
/** Exclusive upper bound of the range. Required if from is not given. */
|
|
503
|
-
to?: number | null;
|
|
504
|
-
}
|
|
505
|
-
export declare enum SortType {
|
|
506
|
-
COUNT = "COUNT",
|
|
507
|
-
VALUE = "VALUE"
|
|
508
|
-
}
|
|
509
|
-
export declare enum SortDirection {
|
|
510
|
-
DESC = "DESC",
|
|
511
|
-
ASC = "ASC"
|
|
512
|
-
}
|
|
513
|
-
export declare enum MissingValues {
|
|
514
|
-
EXCLUDE = "EXCLUDE",
|
|
515
|
-
INCLUDE = "INCLUDE"
|
|
516
|
-
}
|
|
517
|
-
export interface IncludeMissingValuesOptions {
|
|
518
|
-
/** can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... */
|
|
519
|
-
addToBucket?: string;
|
|
520
|
-
}
|
|
521
|
-
export declare enum ScalarType {
|
|
522
|
-
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
523
|
-
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
524
|
-
MIN = "MIN",
|
|
525
|
-
MAX = "MAX",
|
|
526
|
-
SUM = "SUM",
|
|
527
|
-
AVG = "AVG"
|
|
528
|
-
}
|
|
529
|
-
export interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
530
|
-
/** options for including missing values */
|
|
531
|
-
includeOptions?: IncludeMissingValuesOptions;
|
|
532
|
-
sortType?: SortType;
|
|
533
|
-
sortDirection?: SortDirection;
|
|
534
|
-
/** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
|
|
535
|
-
limit?: number | null;
|
|
536
|
-
/** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
|
|
537
|
-
missingValues?: MissingValues;
|
|
538
|
-
}
|
|
539
|
-
/** @oneof */
|
|
540
|
-
export interface ValueAggregationOptionsOneOf {
|
|
541
|
-
/** options for including missing values */
|
|
542
|
-
includeOptions?: IncludeMissingValuesOptions;
|
|
543
|
-
}
|
|
544
|
-
export declare enum NestedAggregationType {
|
|
545
|
-
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
546
|
-
VALUE = "VALUE",
|
|
547
|
-
RANGE = "RANGE",
|
|
548
|
-
SCALAR = "SCALAR",
|
|
549
|
-
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
550
|
-
}
|
|
551
|
-
export interface RangeAggregation {
|
|
552
|
-
buckets?: RangeBucket[];
|
|
553
|
-
}
|
|
554
|
-
export interface ScalarAggregation {
|
|
555
|
-
type?: ScalarType;
|
|
556
|
-
}
|
|
557
|
-
export interface DateHistogramAggregation {
|
|
558
|
-
interval?: Interval;
|
|
559
|
-
}
|
|
560
|
-
export declare enum Interval {
|
|
561
|
-
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
562
|
-
YEAR = "YEAR",
|
|
563
|
-
MONTH = "MONTH",
|
|
564
|
-
WEEK = "WEEK",
|
|
565
|
-
DAY = "DAY",
|
|
566
|
-
HOUR = "HOUR",
|
|
567
|
-
MINUTE = "MINUTE",
|
|
568
|
-
SECOND = "SECOND"
|
|
569
|
-
}
|
|
570
|
-
export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
571
|
-
value?: ValueAggregation;
|
|
572
|
-
range?: RangeAggregation;
|
|
573
|
-
scalar?: ScalarAggregation;
|
|
574
|
-
dateHistogram?: DateHistogramAggregation;
|
|
575
|
-
name?: string | null;
|
|
576
|
-
type?: NestedAggregationType;
|
|
577
|
-
fieldPath?: string;
|
|
578
|
-
}
|
|
579
|
-
/** @oneof */
|
|
580
|
-
export interface NestedAggregationItemKindOneOf {
|
|
581
|
-
value?: ValueAggregation;
|
|
582
|
-
range?: RangeAggregation;
|
|
583
|
-
scalar?: ScalarAggregation;
|
|
584
|
-
dateHistogram?: DateHistogramAggregation;
|
|
585
|
-
}
|
|
586
|
-
export declare enum AggregationType {
|
|
587
|
-
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
588
|
-
VALUE = "VALUE",
|
|
589
|
-
RANGE = "RANGE",
|
|
590
|
-
SCALAR = "SCALAR",
|
|
591
|
-
DATE_HISTOGRAM = "DATE_HISTOGRAM",
|
|
592
|
-
NESTED = "NESTED"
|
|
593
|
-
}
|
|
594
|
-
export interface NestedAggregation {
|
|
595
|
-
nestedAggregations?: NestedAggregationItem[];
|
|
596
|
-
}
|
|
597
|
-
export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
598
|
-
value?: ValueAggregation;
|
|
599
|
-
name?: string | null;
|
|
600
|
-
fieldPath?: string;
|
|
601
|
-
}
|
|
602
|
-
/** @oneof */
|
|
603
|
-
export interface GroupByAggregationKindOneOf {
|
|
604
|
-
value?: ValueAggregation;
|
|
605
|
-
}
|
|
606
|
-
export interface SearchDetails {
|
|
607
|
-
/** boolean search mode */
|
|
608
|
-
mode?: Mode;
|
|
609
|
-
/** search term or expression */
|
|
610
|
-
expression?: string | null;
|
|
611
|
-
/** fields to search in. if empty - server will search in own default fields */
|
|
612
|
-
fields?: string[];
|
|
613
|
-
/** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
614
|
-
fuzzy?: boolean;
|
|
615
|
-
}
|
|
616
|
-
export declare enum Mode {
|
|
617
|
-
/** any */
|
|
618
|
-
OR = "OR",
|
|
619
|
-
/** all */
|
|
620
|
-
AND = "AND"
|
|
621
|
-
}
|
|
622
|
-
export interface SearchReservationsResponse {
|
|
623
|
-
/** List of Reservations. */
|
|
624
|
-
reservations?: Reservation[];
|
|
625
|
-
/** Cursor paging metadata. */
|
|
626
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
627
|
-
/** Aggregation data. */
|
|
628
|
-
aggregationData?: AggregationData;
|
|
629
|
-
}
|
|
630
|
-
export interface AggregationData {
|
|
631
|
-
/** key = aggregation name (as derived from search request) */
|
|
632
|
-
results?: AggregationResults[];
|
|
633
|
-
}
|
|
634
|
-
export interface ValueAggregationResult {
|
|
635
|
-
value?: string;
|
|
636
|
-
count?: number;
|
|
637
|
-
}
|
|
638
|
-
export interface RangeAggregationResult {
|
|
639
|
-
from?: number | null;
|
|
640
|
-
to?: number | null;
|
|
641
|
-
count?: number;
|
|
642
|
-
}
|
|
643
|
-
export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
644
|
-
values?: ValueResults;
|
|
645
|
-
ranges?: RangeResults;
|
|
646
|
-
scalar?: ScalarResult;
|
|
647
|
-
name?: string;
|
|
648
|
-
type?: AggregationType;
|
|
649
|
-
fieldPath?: string;
|
|
650
|
-
}
|
|
651
|
-
/** @oneof */
|
|
652
|
-
export interface NestedAggregationResultsResultOneOf {
|
|
653
|
-
values?: ValueResults;
|
|
654
|
-
ranges?: RangeResults;
|
|
655
|
-
scalar?: ScalarResult;
|
|
656
|
-
}
|
|
657
|
-
export interface ValueResults {
|
|
658
|
-
results?: ValueAggregationResult[];
|
|
659
|
-
}
|
|
660
|
-
export interface RangeResults {
|
|
661
|
-
results?: RangeAggregationResult[];
|
|
662
|
-
}
|
|
663
|
-
export interface ScalarResult {
|
|
664
|
-
type?: ScalarType;
|
|
665
|
-
value?: number;
|
|
666
|
-
}
|
|
667
|
-
export interface NestedValueAggregationResult {
|
|
668
|
-
value?: string;
|
|
669
|
-
nestedResults?: NestedAggregationResults;
|
|
670
|
-
}
|
|
671
|
-
export interface ValueResult {
|
|
672
|
-
value?: string;
|
|
673
|
-
count?: number | null;
|
|
674
|
-
}
|
|
675
|
-
export interface RangeResult {
|
|
676
|
-
from?: number | null;
|
|
677
|
-
to?: number | null;
|
|
678
|
-
count?: number | null;
|
|
679
|
-
}
|
|
680
|
-
export interface NestedResultsScalarResult {
|
|
681
|
-
value?: number;
|
|
682
|
-
}
|
|
683
|
-
export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
684
|
-
value?: ValueResult;
|
|
685
|
-
range?: RangeResult;
|
|
686
|
-
scalar?: NestedResultsScalarResult;
|
|
687
|
-
dateHistogram?: ValueResult;
|
|
688
|
-
}
|
|
689
|
-
/** @oneof */
|
|
690
|
-
export interface NestedResultValueResultOneOf {
|
|
691
|
-
value?: ValueResult;
|
|
692
|
-
range?: RangeResult;
|
|
693
|
-
scalar?: NestedResultsScalarResult;
|
|
694
|
-
dateHistogram?: ValueResult;
|
|
695
|
-
}
|
|
696
|
-
export interface Results {
|
|
697
|
-
results?: Record<string, NestedResultValue>;
|
|
698
|
-
}
|
|
699
|
-
export interface DateHistogramResult {
|
|
700
|
-
value?: string;
|
|
701
|
-
count?: number;
|
|
702
|
-
}
|
|
703
|
-
export interface GroupByValueResults {
|
|
704
|
-
results?: NestedValueAggregationResult[];
|
|
705
|
-
}
|
|
706
|
-
export interface DateHistogramResults {
|
|
707
|
-
results?: DateHistogramResult[];
|
|
708
|
-
}
|
|
709
|
-
export interface NestedResults {
|
|
710
|
-
results?: Results[];
|
|
711
|
-
}
|
|
712
|
-
export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
713
|
-
values?: ValueResults;
|
|
714
|
-
ranges?: RangeResults;
|
|
715
|
-
scalar?: ScalarResult;
|
|
716
|
-
groupedByValue?: GroupByValueResults;
|
|
717
|
-
dateHistogram?: DateHistogramResults;
|
|
718
|
-
nested?: NestedResults;
|
|
719
|
-
name?: string;
|
|
720
|
-
type?: AggregationType;
|
|
721
|
-
fieldPath?: string;
|
|
722
|
-
}
|
|
723
|
-
/** @oneof */
|
|
724
|
-
export interface AggregationResultsResultOneOf {
|
|
725
|
-
values?: ValueResults;
|
|
726
|
-
ranges?: RangeResults;
|
|
727
|
-
scalar?: ScalarResult;
|
|
728
|
-
groupedByValue?: GroupByValueResults;
|
|
729
|
-
dateHistogram?: DateHistogramResults;
|
|
730
|
-
nested?: NestedResults;
|
|
731
|
-
}
|
|
732
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
733
|
-
createdEvent?: EntityCreatedEvent;
|
|
734
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
735
|
-
deletedEvent?: EntityDeletedEvent;
|
|
736
|
-
actionEvent?: ActionEvent;
|
|
737
|
-
/**
|
|
738
|
-
* Unique event ID.
|
|
739
|
-
* Allows clients to ignore duplicate webhooks.
|
|
740
|
-
*/
|
|
741
|
-
id?: string;
|
|
742
|
-
/**
|
|
743
|
-
* Assumes actions are also always typed to an entity_type
|
|
744
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
745
|
-
*/
|
|
746
|
-
entityFqdn?: string;
|
|
747
|
-
/**
|
|
748
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
749
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
750
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
751
|
-
*/
|
|
752
|
-
slug?: string;
|
|
753
|
-
/** ID of the entity associated with the event. */
|
|
754
|
-
entityId?: string;
|
|
755
|
-
/** Event timestamp. */
|
|
756
|
-
eventTime?: Date;
|
|
757
|
-
/**
|
|
758
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
759
|
-
* (for example, GDPR).
|
|
760
|
-
*/
|
|
761
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
762
|
-
/** If present, indicates the action that triggered the event. */
|
|
763
|
-
originatedFrom?: string | null;
|
|
764
|
-
/**
|
|
765
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
766
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
767
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
768
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
769
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
770
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
771
|
-
*/
|
|
772
|
-
entityEventSequence?: string | null;
|
|
773
|
-
}
|
|
774
|
-
/** @oneof */
|
|
775
|
-
export interface DomainEventBodyOneOf {
|
|
776
|
-
createdEvent?: EntityCreatedEvent;
|
|
777
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
778
|
-
deletedEvent?: EntityDeletedEvent;
|
|
779
|
-
actionEvent?: ActionEvent;
|
|
780
|
-
}
|
|
781
|
-
export interface EntityCreatedEvent {
|
|
782
|
-
entityAsJson?: string;
|
|
783
|
-
}
|
|
784
|
-
export interface EntityUpdatedEvent {
|
|
785
|
-
/**
|
|
786
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
787
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
788
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
789
|
-
*/
|
|
790
|
-
currentEntityAsJson?: string;
|
|
791
|
-
}
|
|
792
|
-
export interface EntityDeletedEvent {
|
|
793
|
-
/** Entity that was deleted */
|
|
794
|
-
deletedEntityAsJson?: string | null;
|
|
795
|
-
}
|
|
796
|
-
export interface ActionEvent {
|
|
797
|
-
bodyAsJson?: string;
|
|
798
|
-
}
|
|
799
|
-
export interface Empty {
|
|
800
|
-
}
|
|
801
|
-
export interface RemoveReservationMigrationNotesRequest {
|
|
802
|
-
/** Reservation ID. */
|
|
803
|
-
reservationId?: string;
|
|
804
|
-
/** Revision. */
|
|
805
|
-
revision?: string;
|
|
806
|
-
}
|
|
807
|
-
export interface RemoveReservationMigrationNotesResponse {
|
|
808
|
-
reservation?: Reservation;
|
|
809
|
-
}
|
|
810
|
-
export interface CreateReservationResponseNonNullableFields {
|
|
811
|
-
reservation?: {
|
|
812
|
-
status: Status;
|
|
813
|
-
source: Source;
|
|
814
|
-
migrationNotes: MigrationNote[];
|
|
815
|
-
tablesWithReservationConflicts: {
|
|
816
|
-
tableId: string;
|
|
817
|
-
reservationIds: string[];
|
|
818
|
-
}[];
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
export interface GetReservationResponseNonNullableFields {
|
|
822
|
-
reservation?: {
|
|
823
|
-
status: Status;
|
|
824
|
-
source: Source;
|
|
825
|
-
migrationNotes: MigrationNote[];
|
|
826
|
-
tablesWithReservationConflicts: {
|
|
827
|
-
tableId: string;
|
|
828
|
-
reservationIds: string[];
|
|
829
|
-
}[];
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
export interface UpdateReservationResponseNonNullableFields {
|
|
833
|
-
reservation?: {
|
|
834
|
-
status: Status;
|
|
835
|
-
source: Source;
|
|
836
|
-
migrationNotes: MigrationNote[];
|
|
837
|
-
tablesWithReservationConflicts: {
|
|
838
|
-
tableId: string;
|
|
839
|
-
reservationIds: string[];
|
|
840
|
-
}[];
|
|
841
|
-
};
|
|
842
|
-
}
|
|
843
|
-
export interface CreateHeldReservationResponseNonNullableFields {
|
|
844
|
-
reservation?: {
|
|
845
|
-
status: Status;
|
|
846
|
-
source: Source;
|
|
847
|
-
migrationNotes: MigrationNote[];
|
|
848
|
-
tablesWithReservationConflicts: {
|
|
849
|
-
tableId: string;
|
|
850
|
-
reservationIds: string[];
|
|
851
|
-
}[];
|
|
852
|
-
};
|
|
853
|
-
}
|
|
854
|
-
export interface ReserveReservationResponseNonNullableFields {
|
|
855
|
-
reservation?: {
|
|
856
|
-
status: Status;
|
|
857
|
-
source: Source;
|
|
858
|
-
migrationNotes: MigrationNote[];
|
|
859
|
-
tablesWithReservationConflicts: {
|
|
860
|
-
tableId: string;
|
|
861
|
-
reservationIds: string[];
|
|
862
|
-
}[];
|
|
863
|
-
};
|
|
864
|
-
}
|
|
865
|
-
export interface CancelReservationResponseNonNullableFields {
|
|
866
|
-
reservation?: {
|
|
867
|
-
status: Status;
|
|
868
|
-
source: Source;
|
|
869
|
-
migrationNotes: MigrationNote[];
|
|
870
|
-
tablesWithReservationConflicts: {
|
|
871
|
-
tableId: string;
|
|
872
|
-
reservationIds: string[];
|
|
873
|
-
}[];
|
|
874
|
-
};
|
|
875
|
-
}
|
|
876
|
-
export interface ListReservationsResponseNonNullableFields {
|
|
877
|
-
reservations: {
|
|
878
|
-
status: Status;
|
|
879
|
-
source: Source;
|
|
880
|
-
migrationNotes: MigrationNote[];
|
|
881
|
-
tablesWithReservationConflicts: {
|
|
882
|
-
tableId: string;
|
|
883
|
-
reservationIds: string[];
|
|
884
|
-
}[];
|
|
885
|
-
}[];
|
|
886
|
-
}
|
|
887
|
-
export interface QueryReservationsResponseNonNullableFields {
|
|
888
|
-
reservations: {
|
|
889
|
-
status: Status;
|
|
890
|
-
source: Source;
|
|
891
|
-
migrationNotes: MigrationNote[];
|
|
892
|
-
tablesWithReservationConflicts: {
|
|
893
|
-
tableId: string;
|
|
894
|
-
reservationIds: string[];
|
|
895
|
-
}[];
|
|
896
|
-
}[];
|
|
897
|
-
}
|
|
898
|
-
export interface SearchReservationsResponseNonNullableFields {
|
|
899
|
-
reservations: {
|
|
900
|
-
status: Status;
|
|
901
|
-
source: Source;
|
|
902
|
-
migrationNotes: MigrationNote[];
|
|
903
|
-
tablesWithReservationConflicts: {
|
|
904
|
-
tableId: string;
|
|
905
|
-
reservationIds: string[];
|
|
906
|
-
}[];
|
|
907
|
-
}[];
|
|
908
|
-
aggregationData?: {
|
|
909
|
-
results: {
|
|
910
|
-
values?: {
|
|
911
|
-
results: {
|
|
912
|
-
value: string;
|
|
913
|
-
count: number;
|
|
914
|
-
}[];
|
|
915
|
-
};
|
|
916
|
-
ranges?: {
|
|
917
|
-
results: {
|
|
918
|
-
count: number;
|
|
919
|
-
}[];
|
|
920
|
-
};
|
|
921
|
-
scalar?: {
|
|
922
|
-
type: ScalarType;
|
|
923
|
-
value: number;
|
|
924
|
-
};
|
|
925
|
-
groupedByValue?: {
|
|
926
|
-
results: {
|
|
927
|
-
value: string;
|
|
928
|
-
nestedResults?: {
|
|
929
|
-
values?: {
|
|
930
|
-
results: {
|
|
931
|
-
value: string;
|
|
932
|
-
count: number;
|
|
933
|
-
}[];
|
|
934
|
-
};
|
|
935
|
-
ranges?: {
|
|
936
|
-
results: {
|
|
937
|
-
count: number;
|
|
938
|
-
}[];
|
|
939
|
-
};
|
|
940
|
-
scalar?: {
|
|
941
|
-
type: ScalarType;
|
|
942
|
-
value: number;
|
|
943
|
-
};
|
|
944
|
-
name: string;
|
|
945
|
-
type: AggregationType;
|
|
946
|
-
fieldPath: string;
|
|
947
|
-
};
|
|
948
|
-
}[];
|
|
949
|
-
};
|
|
950
|
-
dateHistogram?: {
|
|
951
|
-
results: {
|
|
952
|
-
value: string;
|
|
953
|
-
count: number;
|
|
954
|
-
}[];
|
|
955
|
-
};
|
|
956
|
-
nested?: {
|
|
957
|
-
results: {
|
|
958
|
-
results?: {
|
|
959
|
-
value?: {
|
|
960
|
-
value: string;
|
|
961
|
-
};
|
|
962
|
-
scalar?: {
|
|
963
|
-
value: number;
|
|
964
|
-
};
|
|
965
|
-
dateHistogram?: {
|
|
966
|
-
value: string;
|
|
967
|
-
};
|
|
968
|
-
};
|
|
969
|
-
}[];
|
|
970
|
-
};
|
|
971
|
-
name: string;
|
|
972
|
-
type: AggregationType;
|
|
973
|
-
fieldPath: string;
|
|
974
|
-
}[];
|
|
975
|
-
};
|
|
976
|
-
}
|