@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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
  11. package/build/cjs/src/table-reservations-v1-reservation-reservations.context.js +49 -0
  12. package/build/cjs/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
  13. package/build/cjs/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
  14. package/build/cjs/src/table-reservations-v1-reservation-reservations.http.js +561 -0
  15. package/build/cjs/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
  16. package/build/cjs/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
  17. package/build/cjs/src/table-reservations-v1-reservation-reservations.meta.js +218 -0
  18. package/build/cjs/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
  19. package/build/cjs/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
  20. package/build/cjs/src/table-reservations-v1-reservation-reservations.public.js +123 -0
  21. package/build/cjs/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
  22. package/build/cjs/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
  23. package/build/cjs/src/table-reservations-v1-reservation-reservations.types.js +180 -0
  24. package/build/cjs/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
  25. package/build/cjs/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
  26. package/build/cjs/src/table-reservations-v1-reservation-reservations.universal.js +775 -0
  27. package/build/cjs/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
  39. package/build/es/src/table-reservations-v1-reservation-reservations.context.js +30 -0
  40. package/build/es/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
  41. package/build/es/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
  42. package/build/es/src/table-reservations-v1-reservation-reservations.http.js +548 -0
  43. package/build/es/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
  44. package/build/es/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
  45. package/build/es/src/table-reservations-v1-reservation-reservations.meta.js +182 -0
  46. package/build/es/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
  47. package/build/es/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
  48. package/build/es/src/table-reservations-v1-reservation-reservations.public.js +94 -0
  49. package/build/es/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
  50. package/build/es/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
  51. package/build/es/src/table-reservations-v1-reservation-reservations.types.js +177 -0
  52. package/build/es/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
  53. package/build/es/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
  54. package/build/es/src/table-reservations-v1-reservation-reservations.universal.js +739 -0
  55. package/build/es/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
  66. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.context.js +49 -0
  67. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
  68. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
  69. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.http.js +561 -0
  70. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
  71. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
  72. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.meta.js +218 -0
  73. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
  74. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
  75. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.public.js +123 -0
  76. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
  77. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
  78. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.types.js +180 -0
  79. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
  80. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
  81. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.universal.js +775 -0
  82. package/build/internal/cjs/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/table-reservations-v1-reservation-reservations.context.d.ts +30 -0
  93. package/build/internal/es/src/table-reservations-v1-reservation-reservations.context.js +30 -0
  94. package/build/internal/es/src/table-reservations-v1-reservation-reservations.context.js.map +1 -0
  95. package/build/internal/es/src/table-reservations-v1-reservation-reservations.http.d.ts +96 -0
  96. package/build/internal/es/src/table-reservations-v1-reservation-reservations.http.js +548 -0
  97. package/build/internal/es/src/table-reservations-v1-reservation-reservations.http.js.map +1 -0
  98. package/build/internal/es/src/table-reservations-v1-reservation-reservations.meta.d.ts +32 -0
  99. package/build/internal/es/src/table-reservations-v1-reservation-reservations.meta.js +182 -0
  100. package/build/internal/es/src/table-reservations-v1-reservation-reservations.meta.js.map +1 -0
  101. package/build/internal/es/src/table-reservations-v1-reservation-reservations.public.d.ts +161 -0
  102. package/build/internal/es/src/table-reservations-v1-reservation-reservations.public.js +94 -0
  103. package/build/internal/es/src/table-reservations-v1-reservation-reservations.public.js.map +1 -0
  104. package/build/internal/es/src/table-reservations-v1-reservation-reservations.types.d.ts +1149 -0
  105. package/build/internal/es/src/table-reservations-v1-reservation-reservations.types.js +177 -0
  106. package/build/internal/es/src/table-reservations-v1-reservation-reservations.types.js.map +1 -0
  107. package/build/internal/es/src/table-reservations-v1-reservation-reservations.universal.d.ts +1740 -0
  108. package/build/internal/es/src/table-reservations-v1-reservation-reservations.universal.js +739 -0
  109. package/build/internal/es/src/table-reservations-v1-reservation-reservations.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1149 @@
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
+ * See the Reservation Lifecycle article([REST](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/the-reservation-lifecycle) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/table-reservations/reservations/the-reservation-lifecycle)) for an explanation of the role of statuses in the reservation lifecycle.
12
+ */
13
+ status?: Status;
14
+ /**
15
+ * Reservation source.
16
+ *
17
+ * This indicates how the reservation was made.
18
+ */
19
+ source?: Source;
20
+ /** Reservation details. */
21
+ details?: Details;
22
+ /**
23
+ * Information about the person the reservation is being made for.
24
+ *
25
+ * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
26
+ * Attempting to create a reservation without these fields results in an error.
27
+ */
28
+ reservee?: Reservee;
29
+ /**
30
+ * Information about the person making the reservation.
31
+ *
32
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
33
+ * @readonly
34
+ */
35
+ reservedBy?: ReservedBy;
36
+ /**
37
+ * Team message.
38
+ *
39
+ * A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
40
+ */
41
+ teamMessage?: string | null;
42
+ /**
43
+ * Date and time the reservation was created.
44
+ * @readonly
45
+ */
46
+ createdDate?: Date | null;
47
+ /**
48
+ * Date and time the reservation was changed.
49
+ * @readonly
50
+ */
51
+ updatedDate?: Date | null;
52
+ /**
53
+ * Revision number, which increments by 1 each time the reservation is updated.
54
+ * To prevent conflicting changes, the current revision must be specified when updating the reservation.
55
+ *
56
+ * Ignored when creating a reservation.
57
+ * @readonly
58
+ */
59
+ revision?: string | null;
60
+ /** The reason the reservation was declined. */
61
+ declineReason?: string | null;
62
+ /**
63
+ * Payment status.
64
+ * @readonly
65
+ */
66
+ paymentStatus?: PaymentStatus;
67
+ /**
68
+ * Custom field data for the reservation object.
69
+ *
70
+ * [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.
71
+ */
72
+ extendedFields?: ExtendedFields;
73
+ }
74
+ /** Tables used for the reservation. If you don't specify a `tables` object, the server attempts to assign tables automatically. */
75
+ export interface Tables {
76
+ /** 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. */
77
+ ids?: string[];
78
+ }
79
+ export declare enum Status {
80
+ /** Undefined reservation status. */
81
+ UNKNOWN = "UNKNOWN",
82
+ /** 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. */
83
+ HELD = "HELD",
84
+ /** The reservation is confirmed. */
85
+ RESERVED = "RESERVED",
86
+ /** The reservation is canceled. */
87
+ CANCELED = "CANCELED",
88
+ /** The reservation completed successfully. */
89
+ FINISHED = "FINISHED",
90
+ /** The customer didn't show up for their reservation. */
91
+ NO_SHOW = "NO_SHOW",
92
+ /** The customer is currently occupying the table. */
93
+ SEATED = "SEATED",
94
+ /** 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. */
95
+ REQUESTED = "REQUESTED",
96
+ /** The restaurant’s owner or staff declined the customer’s request to make the reservation. */
97
+ DECLINED = "DECLINED",
98
+ /** 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`. */
99
+ PAYMENT_PENDING = "PAYMENT_PENDING"
100
+ }
101
+ export declare enum Source {
102
+ /** Undefined reservation source. */
103
+ UNKNOWN = "UNKNOWN",
104
+ /** The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. */
105
+ OFFLINE = "OFFLINE",
106
+ /** The reservation was made through a website or app. */
107
+ ONLINE = "ONLINE",
108
+ /** The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. */
109
+ WALK_IN = "WALK_IN"
110
+ }
111
+ /** Reservation details. */
112
+ export interface Details {
113
+ /** ID of the reservation location at which this reservation will be made. */
114
+ reservationLocationId?: string | null;
115
+ /**
116
+ * IDs of tables used for this reservation.
117
+ * @deprecated
118
+ * @replacedBy tables
119
+ * @targetRemovalDate 2024-12-31
120
+ */
121
+ tableIds?: string[] | null;
122
+ /** Tables used for this reservation. */
123
+ tables?: Tables;
124
+ /** Start date and time of the reservation. */
125
+ startDate?: Date | null;
126
+ /** End date and time of the reservation. */
127
+ endDate?: Date | null;
128
+ /** Party size. */
129
+ partySize?: number | null;
130
+ }
131
+ /** The person the reservation is being made for. */
132
+ export interface Reservee {
133
+ /**
134
+ * First name.
135
+ *
136
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
137
+ */
138
+ firstName?: string | null;
139
+ /** Last name. */
140
+ lastName?: string | null;
141
+ /** Email address. */
142
+ email?: string | null;
143
+ /**
144
+ * Phone number.
145
+ *
146
+ * This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`.
147
+ *
148
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
149
+ */
150
+ phone?: string | null;
151
+ /** Whether the reservee has given marketing consent. */
152
+ marketingConsent?: boolean | null;
153
+ /**
154
+ * Custom fields for the reservee in key-value pairs.
155
+ *
156
+ * 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"`.
157
+ *
158
+ * Empty fields are not returned.
159
+ */
160
+ customFields?: Record<string, any> | null;
161
+ /**
162
+ * Contact ID. If a contact with this ID does not exist on the site, one will be created.
163
+ * @readonly
164
+ */
165
+ contactId?: string | null;
166
+ }
167
+ /** A person making reservation. */
168
+ export interface ReservedBy {
169
+ /**
170
+ * 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.
171
+ * @readonly
172
+ */
173
+ contactId?: string | null;
174
+ }
175
+ /** Migration note. */
176
+ export interface MigrationNote {
177
+ }
178
+ /** Table with reservation conflicts. */
179
+ export interface TableWithReservationConflicts {
180
+ /** Table id. */
181
+ tableId?: string;
182
+ /** List of reservation ids. */
183
+ reservationIds?: string[];
184
+ }
185
+ export declare enum PaymentStatus {
186
+ /** Undefined payment status. */
187
+ UNKNOWN = "UNKNOWN",
188
+ /** A reservation is free of charge. */
189
+ FREE = "FREE",
190
+ /** Payment is not received yet. */
191
+ NOT_PAID = "NOT_PAID",
192
+ /** The corresponding reservation order was fully paid. */
193
+ PAID = "PAID",
194
+ /** The corresponding reservation order was refunded, but the refund amount is less than the order total price. */
195
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
196
+ /** The corresponding reservation order was fully refunded. The refund amount equals the total price. */
197
+ FULLY_REFUNDED = "FULLY_REFUNDED",
198
+ /** The corresponding reservation order was partially paid. */
199
+ PARTIALLY_PAID = "PARTIALLY_PAID"
200
+ }
201
+ export interface ExtendedFields {
202
+ /**
203
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
204
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
205
+ *
206
+ * You can only access fields for which you have the appropriate permissions.
207
+ *
208
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
209
+ */
210
+ namespaces?: Record<string, Record<string, any>>;
211
+ }
212
+ export interface ReservationDelayedDomainEvent extends ReservationDelayedDomainEventBodyTypeOneOf {
213
+ /** Body of a created reservation event. */
214
+ reservationCreated?: ReservationCreated;
215
+ /** Body of a updated reservation event. */
216
+ reservationUpdated?: ReservationUpdated;
217
+ /** Body of a canceled reservation event. */
218
+ reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;
219
+ }
220
+ /** @oneof */
221
+ export interface ReservationDelayedDomainEventBodyTypeOneOf {
222
+ /** Body of a created reservation event. */
223
+ reservationCreated?: ReservationCreated;
224
+ /** Body of a updated reservation event. */
225
+ reservationUpdated?: ReservationUpdated;
226
+ /** Body of a canceled reservation event. */
227
+ reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;
228
+ }
229
+ export interface ReservationCreated {
230
+ /** Created reservation. */
231
+ createdReservation?: Reservation;
232
+ }
233
+ export interface ReservationUpdated {
234
+ /** Updated reservation. */
235
+ updatedReservation?: Reservation;
236
+ /** Modified fields of previous entity */
237
+ modifiedFields?: Record<string, any>;
238
+ }
239
+ export interface ReservationDelayedDomainEventReservationCanceled {
240
+ /** Canceled reservation. */
241
+ canceledReservation?: Reservation;
242
+ }
243
+ export interface CreateReservationRequest {
244
+ /** Reservation details. */
245
+ reservation: Reservation;
246
+ /**
247
+ * 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.
248
+ *
249
+ * Possible values:
250
+ * * `"RESERVED"`: One or more of the chosen tables are already reserved.
251
+ * * `"TOO_BIG"`: The party is too big for the selected table.
252
+ * * `"TOO_SMALL"`: The party is too small for the selected table.
253
+ * * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
254
+ */
255
+ ignoreTableCombinationConflicts?: TableCombinationConflictType[];
256
+ /**
257
+ * 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.
258
+ *
259
+ * Possible values:
260
+ * * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
261
+ * * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
262
+ */
263
+ ignoreReservationLocationConflicts?: Type[];
264
+ }
265
+ export declare enum TableCombinationConflictType {
266
+ /** Undefined conflict type. */
267
+ UNKNOWN = "UNKNOWN",
268
+ /** One or more of the chosen tables are already reserved. */
269
+ RESERVED = "RESERVED",
270
+ /** The party is too big for the selected table. */
271
+ TOO_BIG = "TOO_BIG",
272
+ /** The party is too small for the selected table. */
273
+ TOO_SMALL = "TOO_SMALL",
274
+ /** The restaurant does not allow online reservations. */
275
+ OFFLINE_ONLY = "OFFLINE_ONLY"
276
+ }
277
+ export declare enum Type {
278
+ /** Undefined reservation location conflict type. */
279
+ UNKNOWN = "UNKNOWN",
280
+ /** The restaurant cannot accommodate a party of the given size according to party pacing settings. */
281
+ PARTY_PACING = "PARTY_PACING",
282
+ /** The required number of seats are unavailable according to seat pacing settings. */
283
+ SEAT_PACING = "SEAT_PACING"
284
+ }
285
+ export interface CreateReservationResponse {
286
+ /** Reservation. */
287
+ reservation?: Reservation;
288
+ }
289
+ export interface ReservationDetailsConflicts {
290
+ /** Table combinations conflicts. */
291
+ tableCombinationConflicts?: TableCombinationConflict[];
292
+ /** Reservation location conflicts. */
293
+ reservationLocationConflicts?: ReservationLocationConflict[];
294
+ }
295
+ export interface TableCombinationConflict {
296
+ /** Conflict type. */
297
+ type?: TableCombinationConflictType;
298
+ }
299
+ export interface ReservationLocationConflict {
300
+ /** Reservation location conflict type. */
301
+ type?: Type;
302
+ }
303
+ export interface GetReservationRequest {
304
+ /** Reservation ID. */
305
+ reservationId: string;
306
+ /**
307
+ * Array of named, predefined sets of projected fields to be returned.
308
+ * Default: If `fields` is omitted from the request, `PUBLIC`.
309
+ */
310
+ fieldsets?: Set[];
311
+ }
312
+ export declare enum Set {
313
+ /**
314
+ * Returns `id`, `status`, `details.reservationLocationId`, `details.startDate`, `details.endDate`, `details.partySize`, `createdDate`, `revision`, `declineReason`,
315
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
316
+ */
317
+ PUBLIC = "PUBLIC",
318
+ /** Returns all fields. */
319
+ FULL = "FULL"
320
+ }
321
+ export interface GetReservationResponse {
322
+ /** Reservation. */
323
+ reservation?: Reservation;
324
+ }
325
+ export interface UpdateReservationRequest {
326
+ /** Reservation information to update. */
327
+ reservation: Reservation;
328
+ /** 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. */
329
+ ignoreTableCombinationConflicts?: TableCombinationConflictType[];
330
+ ignoreReservationLocationConflicts?: Type[];
331
+ }
332
+ export interface UpdateReservationResponse {
333
+ /** Reservation. */
334
+ reservation?: Reservation;
335
+ }
336
+ export interface CreateHeldReservationRequest {
337
+ /** Held reservation information to update. */
338
+ reservationDetails: HeldReservationDetails;
339
+ }
340
+ /** Reservation details when create reservation in status HELD. */
341
+ export interface HeldReservationDetails {
342
+ /** ID of the reservation location where the reservation is made. */
343
+ reservationLocationId?: string | null;
344
+ /** Start date and time of the reservation. */
345
+ startDate?: Date | null;
346
+ /** Party size. */
347
+ partySize?: number | null;
348
+ }
349
+ export interface CreateHeldReservationResponse {
350
+ /** Reservation. */
351
+ reservation?: Reservation;
352
+ }
353
+ export interface ReserveReservationRequest {
354
+ /** Reservation ID. */
355
+ reservationId: string;
356
+ /** Reservee details. */
357
+ reservee: Reservee;
358
+ /**
359
+ * Revision number.
360
+ *
361
+ * Specify the existing `revision` to prevent conflicting updates to reservations.
362
+ */
363
+ revision: string | null;
364
+ }
365
+ export interface ReserveReservationResponse {
366
+ /** Reservation. */
367
+ reservation?: Reservation;
368
+ }
369
+ export interface CancelReservationRequest {
370
+ /** Reservation ID. */
371
+ reservationId: string;
372
+ /**
373
+ * Revision number.
374
+ *
375
+ * Specify the existing `revision` to prevent conflicting updates to reservations.
376
+ */
377
+ revision: string | null;
378
+ /**
379
+ * The phone number that was provided when the reservation was created.
380
+ *
381
+ * This is required for reservations with any `source` other than `WALK_IN`.
382
+ *
383
+ * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
384
+ */
385
+ phone?: string | null;
386
+ }
387
+ export interface CancelReservationResponse {
388
+ /** Reservation. */
389
+ reservation?: Reservation;
390
+ }
391
+ export interface ReservationCanceled {
392
+ /** Reserved reservation. */
393
+ reservation?: Reservation;
394
+ }
395
+ export interface DeleteReservationRequest {
396
+ /** Reservation ID. */
397
+ reservationId: string;
398
+ }
399
+ export interface DeleteReservationResponse {
400
+ }
401
+ export interface ListReservationsRequest {
402
+ /** 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`. */
403
+ paging?: CursorPaging;
404
+ /** Defines how reservations in the response are sorted. */
405
+ sort?: Sorting;
406
+ /** Only reservations starting after this date are returned. */
407
+ startDateFrom?: Date | null;
408
+ /** Only reservations starting before this date are returned. */
409
+ startDateTo?: Date | null;
410
+ /** Only reservations with this status are returned. */
411
+ status?: Status;
412
+ }
413
+ export interface CursorPaging {
414
+ /** Number of items to load. */
415
+ limit?: number | null;
416
+ /**
417
+ * Pointer to the next or previous page in the list of results.
418
+ *
419
+ * You can get the relevant cursor token
420
+ * from the `pagingMetadata` object in the previous call's response.
421
+ * Not relevant for the first request.
422
+ */
423
+ cursor?: string | null;
424
+ }
425
+ export interface Sorting {
426
+ /** Name of the field to sort by. */
427
+ fieldName?: string;
428
+ /**
429
+ * Sort order.
430
+ * Default: `ASC`.
431
+ */
432
+ order?: SortOrder;
433
+ }
434
+ export declare enum SortOrder {
435
+ /** Sort by ascending order. */
436
+ ASC = "ASC",
437
+ /** Sort by descending order. */
438
+ DESC = "DESC"
439
+ }
440
+ export interface ListReservationsResponse {
441
+ /** List of reservations. */
442
+ reservations?: Reservation[];
443
+ /** Metadata for the paginated results. */
444
+ pagingMetadata?: CursorPagingMetadata;
445
+ }
446
+ export interface CursorPagingMetadata {
447
+ /** Number of items returned in the response. */
448
+ count?: number | null;
449
+ /** Offset that was requested. */
450
+ cursors?: Cursors;
451
+ /**
452
+ * Indicates if there are more results after the current page.
453
+ * If `true`, another page of results can be retrieved.
454
+ * If `false`, this is the last page.
455
+ */
456
+ hasNext?: boolean | null;
457
+ }
458
+ export interface Cursors {
459
+ /** Cursor pointing to next page in the list of results. */
460
+ next?: string | null;
461
+ /** Cursor pointing to previous page in the list of results. */
462
+ prev?: string | null;
463
+ }
464
+ export interface QueryReservationsRequest {
465
+ /** Query to select reservations. */
466
+ query: CursorQuery;
467
+ }
468
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
469
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
470
+ cursorPaging?: CursorPaging;
471
+ /**
472
+ * Filter object in the following format:
473
+ * `"filter" : {
474
+ * "fieldName1": "value1",
475
+ * "fieldName2":{"$operator":"value2"}
476
+ * }`
477
+ *
478
+ * 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.
479
+ * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
480
+ */
481
+ filter?: Record<string, any> | null;
482
+ /**
483
+ * Sort object in the following format:
484
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
485
+ */
486
+ sort?: Sorting[];
487
+ }
488
+ /** @oneof */
489
+ export interface CursorQueryPagingMethodOneOf {
490
+ /** 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`. */
491
+ cursorPaging?: CursorPaging;
492
+ }
493
+ export interface QueryReservationsResponse {
494
+ /** List of reservations. */
495
+ reservations?: Reservation[];
496
+ /** Metadata for the paginated results. */
497
+ pagingMetadata?: CursorPagingMetadata;
498
+ }
499
+ export interface SearchReservationsRequest {
500
+ /** Search query. */
501
+ search: CursorSearch;
502
+ }
503
+ export interface CursorSearch extends CursorSearchPagingMethodOneOf {
504
+ /** 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'. */
505
+ cursorPaging?: CursorPaging;
506
+ /**
507
+ * Filter object in the following format:
508
+ * `"filter" : {
509
+ * "fieldName1": "value1",
510
+ * "fieldName2":{"$operator":"value2"}
511
+ * }`
512
+ * 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.
513
+ */
514
+ filter?: Record<string, any> | null;
515
+ /**
516
+ * Sort object in the following format:
517
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
518
+ */
519
+ sort?: Sorting[];
520
+ /**
521
+ * A search method for grouping data into various categories (facets) and providing summaries for each category.
522
+ * For example, use aggregations to allow site visitors to narrow down their search results by selecting specific reservation statuses, party sizes, etc.
523
+ */
524
+ aggregations?: Aggregation[];
525
+ /** Free text to match in searchable fields. */
526
+ search?: SearchDetails;
527
+ /** Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. */
528
+ timeZone?: string | null;
529
+ }
530
+ /** @oneof */
531
+ export interface CursorSearchPagingMethodOneOf {
532
+ /** 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'. */
533
+ cursorPaging?: CursorPaging;
534
+ }
535
+ export interface Aggregation extends AggregationKindOneOf {
536
+ /** 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. */
537
+ value?: ValueAggregation;
538
+ /** 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. */
539
+ range?: RangeAggregation;
540
+ /** 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. */
541
+ scalar?: ScalarAggregation;
542
+ /** 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. */
543
+ dateHistogram?: DateHistogramAggregation;
544
+ /**
545
+ * 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.
546
+ * 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`.
547
+ */
548
+ nested?: NestedAggregation;
549
+ name?: string | null;
550
+ type?: AggregationType;
551
+ fieldPath?: string;
552
+ }
553
+ /** @oneof */
554
+ export interface AggregationKindOneOf {
555
+ /** 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. */
556
+ value?: ValueAggregation;
557
+ /** 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. */
558
+ range?: RangeAggregation;
559
+ /** 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. */
560
+ scalar?: ScalarAggregation;
561
+ /** 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. */
562
+ dateHistogram?: DateHistogramAggregation;
563
+ /**
564
+ * 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.
565
+ * 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`.
566
+ */
567
+ nested?: NestedAggregation;
568
+ }
569
+ export interface RangeBucket {
570
+ /** Inclusive lower bound of the range. Required if `to` is not provided. */
571
+ from?: number | null;
572
+ /** Exclusive upper bound of the range. Required if `from` is not provided. */
573
+ to?: number | null;
574
+ }
575
+ export declare enum SortType {
576
+ /** Sort by number of matches. */
577
+ COUNT = "COUNT",
578
+ /** Sort by value of the field alphabetically. */
579
+ VALUE = "VALUE"
580
+ }
581
+ export declare enum SortDirection {
582
+ /** Sort in descending order. */
583
+ DESC = "DESC",
584
+ /** Sort in ascending order. */
585
+ ASC = "ASC"
586
+ }
587
+ export declare enum MissingValues {
588
+ /** Exclude missing values from the aggregation results */
589
+ EXCLUDE = "EXCLUDE",
590
+ /** Include missing values in the aggregation results */
591
+ INCLUDE = "INCLUDE"
592
+ }
593
+ export interface IncludeMissingValuesOptions {
594
+ /** Specify a custom name for the bucket containing the missing values. Defaults are "N/A" for strings, "0" for integers, and "false" for booleans. */
595
+ addToBucket?: string;
596
+ }
597
+ export declare enum ScalarType {
598
+ /** Undefined scalar type. */
599
+ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
600
+ /** Count of distinct values. */
601
+ COUNT_DISTINCT = "COUNT_DISTINCT",
602
+ /** Minimum value. */
603
+ MIN = "MIN",
604
+ /** Maximum value. */
605
+ MAX = "MAX"
606
+ }
607
+ export declare enum NestedAggregationType {
608
+ /** Undefined aggregation type. */
609
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
610
+ /** An aggregation where result buckets are dynamically built - one per unique value. */
611
+ VALUE = "VALUE",
612
+ /** An aggregation where you can define a set of ranges - each representing a bucket. */
613
+ RANGE = "RANGE",
614
+ /** A single-value metric aggregation - such as min, max, sum, and avg. */
615
+ SCALAR = "SCALAR",
616
+ /** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */
617
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
618
+ }
619
+ export interface ValueAggregation extends ValueAggregationOptionsOneOf {
620
+ /** Options for including missing values in results. */
621
+ includeOptions?: IncludeMissingValuesOptions;
622
+ /** Whether to sort by the number of matches or the value of the field. */
623
+ sortType?: SortType;
624
+ /** Whether to sort in ascending or descending order. */
625
+ sortDirection?: SortDirection;
626
+ /**
627
+ * Number of aggregation results to return.
628
+ * Min: `1`
629
+ * Max: `250`
630
+ * Default: `10`
631
+ */
632
+ limit?: number | null;
633
+ /**
634
+ * Whether missing values should be included or excluded from the aggregation results.
635
+ * Default: `EXCLUDE`.
636
+ */
637
+ missingValues?: MissingValues;
638
+ }
639
+ /** @oneof */
640
+ export interface ValueAggregationOptionsOneOf {
641
+ /** Options for including missing values in results. */
642
+ includeOptions?: IncludeMissingValuesOptions;
643
+ }
644
+ export interface RangeAggregation {
645
+ /** 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. */
646
+ buckets?: RangeBucket[];
647
+ }
648
+ export interface ScalarAggregation {
649
+ /** Operation type for the scalar aggregation. */
650
+ type?: ScalarType;
651
+ }
652
+ export interface DateHistogramAggregation {
653
+ /** Interval for date histogram aggregation. */
654
+ interval?: Interval;
655
+ }
656
+ export declare enum Interval {
657
+ UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
658
+ YEAR = "YEAR",
659
+ MONTH = "MONTH",
660
+ WEEK = "WEEK",
661
+ DAY = "DAY",
662
+ HOUR = "HOUR",
663
+ MINUTE = "MINUTE",
664
+ SECOND = "SECOND"
665
+ }
666
+ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
667
+ /** 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. */
668
+ value?: ValueAggregation;
669
+ /** 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. */
670
+ range?: RangeAggregation;
671
+ /** 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. */
672
+ scalar?: ScalarAggregation;
673
+ /** 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. */
674
+ dateHistogram?: DateHistogramAggregation;
675
+ /** Aggregation name displayed in the return. */
676
+ name?: string | null;
677
+ /** Type of aggregation to perform. */
678
+ type?: NestedAggregationType;
679
+ /** Field to aggregate by. */
680
+ fieldPath?: string;
681
+ }
682
+ /** @oneof */
683
+ export interface NestedAggregationItemKindOneOf {
684
+ /** 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. */
685
+ value?: ValueAggregation;
686
+ /** 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. */
687
+ range?: RangeAggregation;
688
+ /** 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. */
689
+ scalar?: ScalarAggregation;
690
+ /** 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. */
691
+ dateHistogram?: DateHistogramAggregation;
692
+ }
693
+ export declare enum AggregationType {
694
+ /** Undefined aggregation type. */
695
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
696
+ /** An aggregation where result buckets are dynamically built - one per unique value. */
697
+ VALUE = "VALUE",
698
+ /** An aggregation where you can define a set of ranges - each representing a bucket. */
699
+ RANGE = "RANGE",
700
+ /** A single-value metric aggregation - such as min, max, sum, or avg. */
701
+ SCALAR = "SCALAR",
702
+ /** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */
703
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
704
+ /** Multi-level aggregation, where each next aggregation is nested within the previous one. */
705
+ NESTED = "NESTED"
706
+ }
707
+ export interface NestedAggregation {
708
+ /** Flattened list of aggregations, where each aggregation is nested within the previous one. */
709
+ nestedAggregations?: NestedAggregationItem[];
710
+ }
711
+ export interface SearchDetails {
712
+ /** Boolean search mode. Defines how separate search terms in the `expression` are combined. */
713
+ mode?: Mode;
714
+ /** Search term or expression. */
715
+ expression?: string | null;
716
+ /**
717
+ * Fields to search in.
718
+ *
719
+ * Searchable fields are `reservee.firstName`, `reservee.lastName`, `reservee.phone`, and `reservee.email`.
720
+ *
721
+ * If the array is empty, all fields are searched.
722
+ */
723
+ fields?: string[];
724
+ /**
725
+ * Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.
726
+ * The search function uses an algorithm to find results that are close to what the site visitor typed.
727
+ */
728
+ fuzzy?: boolean;
729
+ }
730
+ export declare enum Mode {
731
+ /** Returns instances where any terms in the expression occur. */
732
+ OR = "OR",
733
+ /** Returns instances where all the terms in the expression occur. */
734
+ AND = "AND"
735
+ }
736
+ export interface SearchReservationsResponse {
737
+ /** List of Reservations. */
738
+ reservations?: Reservation[];
739
+ /** Cursor paging metadata. */
740
+ pagingMetadata?: CursorPagingMetadata;
741
+ /** Aggregation data. */
742
+ aggregationData?: AggregationData;
743
+ }
744
+ export interface AggregationData {
745
+ /** List of the aggregated data results. */
746
+ results?: AggregationResults[];
747
+ }
748
+ export interface ValueAggregationResult {
749
+ /** Value of the field */
750
+ value?: string;
751
+ /** Count of entities with this value */
752
+ count?: number;
753
+ }
754
+ export interface RangeAggregationResult {
755
+ /** Inclusive lower bound of the range. */
756
+ from?: number | null;
757
+ /** Exclusive upper bound of the range. */
758
+ to?: number | null;
759
+ /** Count of entities in the range. */
760
+ count?: number;
761
+ }
762
+ export interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
763
+ /** List of the value aggregation results. */
764
+ values?: ValueResults;
765
+ /** List of the range aggregation results. */
766
+ ranges?: RangeResults;
767
+ /** List of the scalar aggregation results. */
768
+ scalar?: AggregationResultsScalarResult;
769
+ /** Aggregation name defined in the request. */
770
+ name?: string;
771
+ /** Type of aggregation performed. */
772
+ type?: AggregationType;
773
+ /** Field the data was aggregated by. */
774
+ fieldPath?: string;
775
+ }
776
+ /** @oneof */
777
+ export interface 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
+ }
785
+ export interface ValueResults {
786
+ /** List of value aggregations. */
787
+ results?: ValueAggregationResult[];
788
+ }
789
+ export interface RangeResults {
790
+ /** List of ranges returned in same order as requested. */
791
+ results?: RangeAggregationResult[];
792
+ }
793
+ export interface AggregationResultsScalarResult {
794
+ /** Type of scalar aggregation. */
795
+ type?: ScalarType;
796
+ /** Value of the scalar aggregation. */
797
+ value?: number;
798
+ }
799
+ export interface NestedValueAggregationResult {
800
+ value?: string;
801
+ nestedResults?: NestedAggregationResults;
802
+ }
803
+ export interface ValueResult {
804
+ /** Value of the field. */
805
+ value?: string;
806
+ /** Count of entities with this value. */
807
+ count?: number | null;
808
+ }
809
+ export interface RangeResult {
810
+ /** Inclusive lower bound of the range. */
811
+ from?: number | null;
812
+ /** Exclusive upper bound of the range. */
813
+ to?: number | null;
814
+ /** Count of entities in the range. */
815
+ count?: number | null;
816
+ }
817
+ export interface ScalarResult {
818
+ /** Scalar aggregation results. */
819
+ value?: number;
820
+ }
821
+ export interface NestedResultValue extends NestedResultValueResultOneOf {
822
+ /** Value aggregation results. */
823
+ value?: ValueResult;
824
+ /** Range aggregation results. */
825
+ range?: RangeResult;
826
+ /** Scalar aggregation results. */
827
+ scalar?: ScalarResult;
828
+ /** Date histogram aggregation results. */
829
+ dateHistogram?: ValueResult;
830
+ }
831
+ /** @oneof */
832
+ export interface NestedResultValueResultOneOf {
833
+ /** Value aggregation results. */
834
+ value?: ValueResult;
835
+ /** Range aggregation results. */
836
+ range?: RangeResult;
837
+ /** Scalar aggregation results. */
838
+ scalar?: ScalarResult;
839
+ /** Date histogram aggregation results. */
840
+ dateHistogram?: ValueResult;
841
+ }
842
+ export interface Results {
843
+ /** List of nested aggregation results. */
844
+ results?: Record<string, NestedResultValue>;
845
+ }
846
+ export interface DateHistogramResult {
847
+ /** Date in ISO 8601 format. */
848
+ value?: string;
849
+ /** Count of entities in the interval. */
850
+ count?: number;
851
+ }
852
+ /** deprecated */
853
+ export interface GroupByValueResults {
854
+ results?: NestedValueAggregationResult[];
855
+ }
856
+ export interface DateHistogramResults {
857
+ /** List of date histogram aggregations. */
858
+ results?: DateHistogramResult[];
859
+ }
860
+ /**
861
+ * Results of `NESTED` aggregation type in a flattened form.
862
+ * Aggregations in the resulting array are keyed by the requested aggregation `name`.
863
+ */
864
+ export interface NestedResults {
865
+ /** List of nested aggregation results. */
866
+ results?: Results[];
867
+ }
868
+ export interface AggregationResults extends AggregationResultsResultOneOf {
869
+ /** Value aggregation results. */
870
+ values?: ValueResults;
871
+ /** Range aggregation results. */
872
+ ranges?: RangeResults;
873
+ /** Scalar aggregation results. */
874
+ scalar?: AggregationResultsScalarResult;
875
+ /** deprecated */
876
+ groupedByValue?: GroupByValueResults;
877
+ /** Date histogram aggregation results. */
878
+ dateHistogram?: DateHistogramResults;
879
+ /** Nested aggregation results. */
880
+ nested?: NestedResults;
881
+ /** Aggregation name defined in the request. */
882
+ name?: string;
883
+ /** Type of aggregation that was performed. */
884
+ type?: AggregationType;
885
+ /** Field the data was aggregated by. */
886
+ fieldPath?: string;
887
+ }
888
+ /** @oneof */
889
+ export interface AggregationResultsResultOneOf {
890
+ /** Value aggregation results. */
891
+ values?: ValueResults;
892
+ /** Range aggregation results. */
893
+ ranges?: RangeResults;
894
+ /** Scalar aggregation results. */
895
+ scalar?: AggregationResultsScalarResult;
896
+ /** deprecated */
897
+ groupedByValue?: GroupByValueResults;
898
+ /** Date histogram aggregation results. */
899
+ dateHistogram?: DateHistogramResults;
900
+ /** Nested aggregation results. */
901
+ nested?: NestedResults;
902
+ }
903
+ export interface DomainEvent extends DomainEventBodyOneOf {
904
+ createdEvent?: EntityCreatedEvent;
905
+ updatedEvent?: EntityUpdatedEvent;
906
+ deletedEvent?: EntityDeletedEvent;
907
+ actionEvent?: ActionEvent;
908
+ /**
909
+ * Unique event ID.
910
+ * Allows clients to ignore duplicate webhooks.
911
+ */
912
+ id?: string;
913
+ /**
914
+ * Assumes actions are also always typed to an entity_type
915
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
916
+ */
917
+ entityFqdn?: string;
918
+ /**
919
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
920
+ * This is although the created/updated/deleted notion is duplication of the oneof types
921
+ * Example: created/updated/deleted/started/completed/email_opened
922
+ */
923
+ slug?: string;
924
+ /** ID of the entity associated with the event. */
925
+ entityId?: string;
926
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
927
+ eventTime?: Date | null;
928
+ /**
929
+ * Whether the event was triggered as a result of a privacy regulation application
930
+ * (for example, GDPR).
931
+ */
932
+ triggeredByAnonymizeRequest?: boolean | null;
933
+ /** If present, indicates the action that triggered the event. */
934
+ originatedFrom?: string | null;
935
+ /**
936
+ * A sequence number defining the order of updates to the underlying entity.
937
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
938
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
939
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
940
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
941
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
942
+ */
943
+ entityEventSequence?: string | null;
944
+ }
945
+ /** @oneof */
946
+ export interface DomainEventBodyOneOf {
947
+ createdEvent?: EntityCreatedEvent;
948
+ updatedEvent?: EntityUpdatedEvent;
949
+ deletedEvent?: EntityDeletedEvent;
950
+ actionEvent?: ActionEvent;
951
+ }
952
+ export interface EntityCreatedEvent {
953
+ entityAsJson?: string;
954
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
955
+ restoreInfo?: RestoreInfo;
956
+ }
957
+ export interface RestoreInfo {
958
+ deletedDate?: Date | null;
959
+ }
960
+ export interface EntityUpdatedEvent {
961
+ /**
962
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
963
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
964
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
965
+ */
966
+ currentEntityAsJson?: string;
967
+ }
968
+ export interface EntityDeletedEvent {
969
+ /** Entity that was deleted */
970
+ deletedEntityAsJson?: string | null;
971
+ }
972
+ export interface ActionEvent {
973
+ bodyAsJson?: string;
974
+ }
975
+ export interface Empty {
976
+ }
977
+ export interface RemoveReservationMigrationNotesRequest {
978
+ /** Reservation ID. */
979
+ reservationId?: string;
980
+ /** Revision. */
981
+ revision?: string;
982
+ }
983
+ export interface RemoveReservationMigrationNotesResponse {
984
+ reservation?: Reservation;
985
+ }
986
+ export interface RawHttpRequest {
987
+ body?: Uint8Array;
988
+ pathParams?: PathParametersEntry[];
989
+ queryParams?: QueryParametersEntry[];
990
+ headers?: HeadersEntry[];
991
+ method?: string;
992
+ rawPath?: string;
993
+ rawQuery?: string;
994
+ }
995
+ export interface PathParametersEntry {
996
+ key?: string;
997
+ value?: string;
998
+ }
999
+ export interface QueryParametersEntry {
1000
+ key?: string;
1001
+ value?: string;
1002
+ }
1003
+ export interface HeadersEntry {
1004
+ key?: string;
1005
+ value?: string;
1006
+ }
1007
+ export interface RawHttpResponse {
1008
+ body?: Uint8Array;
1009
+ statusCode?: number | null;
1010
+ headers?: HeadersEntry[];
1011
+ }
1012
+ export interface MessageEnvelope {
1013
+ /** App instance ID. */
1014
+ instanceId?: string | null;
1015
+ /** Event type. */
1016
+ eventType?: string;
1017
+ /** The identification type and identity data. */
1018
+ identity?: IdentificationData;
1019
+ /** Stringify payload. */
1020
+ data?: string;
1021
+ }
1022
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1023
+ /** ID of a site visitor that has not logged in to the site. */
1024
+ anonymousVisitorId?: string;
1025
+ /** ID of a site visitor that has logged in to the site. */
1026
+ memberId?: string;
1027
+ /** ID of a Wix user (site owner, contributor, etc.). */
1028
+ wixUserId?: string;
1029
+ /** ID of an app. */
1030
+ appId?: string;
1031
+ /** @readonly */
1032
+ identityType?: WebhookIdentityType;
1033
+ }
1034
+ /** @oneof */
1035
+ export interface IdentificationDataIdOneOf {
1036
+ /** ID of a site visitor that has not logged in to the site. */
1037
+ anonymousVisitorId?: string;
1038
+ /** ID of a site visitor that has logged in to the site. */
1039
+ memberId?: string;
1040
+ /** ID of a Wix user (site owner, contributor, etc.). */
1041
+ wixUserId?: string;
1042
+ /** ID of an app. */
1043
+ appId?: string;
1044
+ }
1045
+ export declare enum WebhookIdentityType {
1046
+ UNKNOWN = "UNKNOWN",
1047
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1048
+ MEMBER = "MEMBER",
1049
+ WIX_USER = "WIX_USER",
1050
+ APP = "APP"
1051
+ }
1052
+ interface TablesNonNullableFields {
1053
+ ids: string[];
1054
+ }
1055
+ interface DetailsNonNullableFields {
1056
+ tables?: TablesNonNullableFields;
1057
+ }
1058
+ interface TableWithReservationConflictsNonNullableFields {
1059
+ tableId: string;
1060
+ reservationIds: string[];
1061
+ }
1062
+ interface ReservationNonNullableFields {
1063
+ status: Status;
1064
+ source: Source;
1065
+ details?: DetailsNonNullableFields;
1066
+ tablesWithReservationConflicts: TableWithReservationConflictsNonNullableFields[];
1067
+ paymentStatus: PaymentStatus;
1068
+ }
1069
+ export interface CreateReservationResponseNonNullableFields {
1070
+ reservation?: ReservationNonNullableFields;
1071
+ }
1072
+ export interface GetReservationResponseNonNullableFields {
1073
+ reservation?: ReservationNonNullableFields;
1074
+ }
1075
+ export interface UpdateReservationResponseNonNullableFields {
1076
+ reservation?: ReservationNonNullableFields;
1077
+ }
1078
+ export interface CreateHeldReservationResponseNonNullableFields {
1079
+ reservation?: ReservationNonNullableFields;
1080
+ }
1081
+ export interface ReserveReservationResponseNonNullableFields {
1082
+ reservation?: ReservationNonNullableFields;
1083
+ }
1084
+ export interface CancelReservationResponseNonNullableFields {
1085
+ reservation?: ReservationNonNullableFields;
1086
+ }
1087
+ export interface ListReservationsResponseNonNullableFields {
1088
+ reservations: ReservationNonNullableFields[];
1089
+ }
1090
+ export interface QueryReservationsResponseNonNullableFields {
1091
+ reservations: ReservationNonNullableFields[];
1092
+ }
1093
+ interface ValueAggregationResultNonNullableFields {
1094
+ value: string;
1095
+ count: number;
1096
+ }
1097
+ interface ValueResultsNonNullableFields {
1098
+ results: ValueAggregationResultNonNullableFields[];
1099
+ }
1100
+ interface RangeAggregationResultNonNullableFields {
1101
+ count: number;
1102
+ }
1103
+ interface RangeResultsNonNullableFields {
1104
+ results: RangeAggregationResultNonNullableFields[];
1105
+ }
1106
+ interface AggregationResultsScalarResultNonNullableFields {
1107
+ type: ScalarType;
1108
+ value: number;
1109
+ }
1110
+ interface NestedAggregationResultsNonNullableFields {
1111
+ values?: ValueResultsNonNullableFields;
1112
+ ranges?: RangeResultsNonNullableFields;
1113
+ scalar?: AggregationResultsScalarResultNonNullableFields;
1114
+ name: string;
1115
+ type: AggregationType;
1116
+ fieldPath: string;
1117
+ }
1118
+ interface NestedValueAggregationResultNonNullableFields {
1119
+ value: string;
1120
+ nestedResults?: NestedAggregationResultsNonNullableFields;
1121
+ }
1122
+ interface GroupByValueResultsNonNullableFields {
1123
+ results: NestedValueAggregationResultNonNullableFields[];
1124
+ }
1125
+ interface DateHistogramResultNonNullableFields {
1126
+ value: string;
1127
+ count: number;
1128
+ }
1129
+ interface DateHistogramResultsNonNullableFields {
1130
+ results: DateHistogramResultNonNullableFields[];
1131
+ }
1132
+ interface AggregationResultsNonNullableFields {
1133
+ values?: ValueResultsNonNullableFields;
1134
+ ranges?: RangeResultsNonNullableFields;
1135
+ scalar?: AggregationResultsScalarResultNonNullableFields;
1136
+ groupedByValue?: GroupByValueResultsNonNullableFields;
1137
+ dateHistogram?: DateHistogramResultsNonNullableFields;
1138
+ name: string;
1139
+ type: AggregationType;
1140
+ fieldPath: string;
1141
+ }
1142
+ interface AggregationDataNonNullableFields {
1143
+ results: AggregationResultsNonNullableFields[];
1144
+ }
1145
+ export interface SearchReservationsResponseNonNullableFields {
1146
+ reservations: ReservationNonNullableFields[];
1147
+ aggregationData?: AggregationDataNonNullableFields;
1148
+ }
1149
+ export {};