@wix/table-reservations 1.0.95 → 1.0.97

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.
@@ -0,0 +1,3923 @@
1
+ /** The reservation domain object. */
2
+ interface Reservation$1 {
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$3;
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$1;
33
+ /** Reservation details. */
34
+ details?: Details$1;
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$1;
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$1;
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
+ * Payment status.
77
+ * @readonly
78
+ */
79
+ paymentStatus?: PaymentStatus$1;
80
+ }
81
+ declare enum Status$3 {
82
+ UNKNOWN = "UNKNOWN",
83
+ /** The reservation is held for 10 minutes, during which time the reservee should fill in their details. */
84
+ HELD = "HELD",
85
+ /** The reservation has been reserved. */
86
+ RESERVED = "RESERVED",
87
+ /** The reservation has been canceled. */
88
+ CANCELED = "CANCELED",
89
+ /** The reservation has finished successfully. */
90
+ FINISHED = "FINISHED",
91
+ /** The reservee didn't arrive. */
92
+ NO_SHOW = "NO_SHOW",
93
+ /** The reservee occupied the table. */
94
+ SEATED = "SEATED",
95
+ /** The reservee requested a reservation and is waiting for manual approval. */
96
+ REQUESTED = "REQUESTED",
97
+ /** The owner declined a reservee's request. */
98
+ DECLINED = "DECLINED",
99
+ /** 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. */
100
+ PAYMENT_PENDING = "PAYMENT_PENDING"
101
+ }
102
+ declare enum Source$1 {
103
+ UNKNOWN = "UNKNOWN",
104
+ /** The reservation is created by a User. */
105
+ OFFLINE = "OFFLINE",
106
+ /** The reservation is created by UoU. */
107
+ ONLINE = "ONLINE",
108
+ /** The reservation is created by a User. It can be created without reservee data. */
109
+ WALK_IN = "WALK_IN"
110
+ }
111
+ /** Reservation details. */
112
+ interface Details$1 {
113
+ /** ID of the reservation location at which this reservation will be made. */
114
+ reservationLocationId?: string | null;
115
+ /** IDs of tables used for this reservation. */
116
+ tableIds?: string[] | null;
117
+ /** Start date and time of the reservation. */
118
+ startDate?: Date;
119
+ /** End date and time of the reservation. */
120
+ endDate?: Date;
121
+ /** Party size. */
122
+ partySize?: number | null;
123
+ }
124
+ /** The person the reservation is being made for. */
125
+ interface Reservee$1 {
126
+ /**
127
+ * First name.
128
+ *
129
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
130
+ */
131
+ firstName?: string | null;
132
+ /** Last name. */
133
+ lastName?: string | null;
134
+ /** Email address. */
135
+ email?: string | null;
136
+ /**
137
+ * Phone number.
138
+ *
139
+ * This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`.
140
+ *
141
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
142
+ */
143
+ phone?: string | null;
144
+ /** Whether the reservee has given marketing consent. */
145
+ marketingConsent?: boolean | null;
146
+ /**
147
+ * Custom fields for the reservee in key-value pairs.
148
+ *
149
+ * 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"`.
150
+ *
151
+ * Empty fields are not returned.
152
+ */
153
+ customFields?: Record<string, any> | null;
154
+ /**
155
+ * Contact ID. If a contact with this ID does not exist on the site, one will be created.
156
+ * @readonly
157
+ */
158
+ contactId?: string | null;
159
+ }
160
+ /** A person making reservation. */
161
+ interface ReservedBy$1 {
162
+ /**
163
+ * 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.
164
+ * @readonly
165
+ */
166
+ contactId?: string | null;
167
+ }
168
+ /** Migration note. */
169
+ interface MigrationNote {
170
+ }
171
+ declare enum PaymentStatus$1 {
172
+ UNKNOWN = "UNKNOWN",
173
+ /** A reservation is free of charge. */
174
+ FREE = "FREE",
175
+ /** A payment is not received yet. */
176
+ NOT_PAID = "NOT_PAID",
177
+ /** A corresponding to reservation order was fully payed. */
178
+ PAID = "PAID",
179
+ /** A corresponding to reservation order was refunded, but refund amount is less than order total price. */
180
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
181
+ /** A corresponding to reservation order was fully refunded. The refund amount equals total price. */
182
+ FULLY_REFUNDED = "FULLY_REFUNDED",
183
+ /** A corresponding to reservation order was partially payed. */
184
+ PARTIALLY_PAID = "PARTIALLY_PAID"
185
+ }
186
+ interface CreateReservationRequest$1 {
187
+ /** Reservation details. */
188
+ reservation: Reservation$1;
189
+ /**
190
+ * 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.
191
+ *
192
+ * Possible values:
193
+ * * `"RESERVED"`: One or more of the chosen tables are already reserved.
194
+ * * `"TOO_BIG"`: The party is too big for the selected table.
195
+ * * `"TOO_SMALL"`: The party is too small for the selected table.
196
+ * * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
197
+ */
198
+ ignoreTableCombinationConflicts?: TableCombinationConflictType$1[];
199
+ /**
200
+ * 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.
201
+ *
202
+ * Possible values:
203
+ * * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
204
+ * * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
205
+ */
206
+ ignoreReservationLocationConflicts?: Type$1[];
207
+ }
208
+ declare enum TableCombinationConflictType$1 {
209
+ UNKNOWN = "UNKNOWN",
210
+ RESERVED = "RESERVED",
211
+ TOO_BIG = "TOO_BIG",
212
+ TOO_SMALL = "TOO_SMALL",
213
+ OFFLINE_ONLY = "OFFLINE_ONLY"
214
+ }
215
+ declare enum Type$1 {
216
+ UNKNOWN = "UNKNOWN",
217
+ PARTY_PACING = "PARTY_PACING",
218
+ SEAT_PACING = "SEAT_PACING"
219
+ }
220
+ interface CreateReservationResponse$1 {
221
+ /** Reservation. */
222
+ reservation?: Reservation$1;
223
+ }
224
+ interface GetReservationRequest$1 {
225
+ /** Reservation ID. */
226
+ reservationId: string;
227
+ /**
228
+ * Array of named, predefined sets of projected fields to be returned.
229
+ *
230
+ * - `PUBLIC`: Returns `id`, `status`, `details.reservationLocationId`, `details.startDate`, `details.endDate`, `details.partySize`, `createdDate`, `revision`, `declineReason`.
231
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
232
+ * - `FULL`: Returns all fields.
233
+ *
234
+ * Default: If `fields` is omitted from the request, `PUBLIC`.
235
+ */
236
+ fieldsets?: Set$3[];
237
+ }
238
+ declare enum Set$3 {
239
+ PUBLIC = "PUBLIC",
240
+ FULL = "FULL"
241
+ }
242
+ interface GetReservationResponse$1 {
243
+ /** Reservation. */
244
+ reservation?: Reservation$1;
245
+ }
246
+ interface UpdateReservationRequest$1 {
247
+ /** Reservation information to update. */
248
+ reservation: Reservation$1;
249
+ /**
250
+ * 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.
251
+ *
252
+ * Possible values:
253
+ * * `"RESERVED"`: One or more of the chosen tables are already reserved.
254
+ * * `"TOO_BIG"`: The party is too big for the selected table.
255
+ * * `"TOO_SMALL"`: The party is too small for the selected table.
256
+ * * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
257
+ */
258
+ ignoreTableCombinationConflicts?: TableCombinationConflictType$1[];
259
+ /**
260
+ * 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.
261
+ *
262
+ * Possible values:
263
+ * * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
264
+ * * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
265
+ */
266
+ ignoreReservationLocationConflicts?: Type$1[];
267
+ }
268
+ interface UpdateReservationResponse$1 {
269
+ /** Reservation. */
270
+ reservation?: Reservation$1;
271
+ }
272
+ interface CreateHeldReservationRequest$1 {
273
+ /** Held reservation information to update. */
274
+ reservationDetails: HeldReservationDetails$1;
275
+ }
276
+ /** Reservation details when create reservation in status HELD. */
277
+ interface HeldReservationDetails$1 {
278
+ /** ID of the reservation location where the reservation is made. */
279
+ reservationLocationId?: string | null;
280
+ /** Start date and time of the reservation. */
281
+ startDate?: Date;
282
+ /** Party size. */
283
+ partySize?: number | null;
284
+ }
285
+ interface CreateHeldReservationResponse$1 {
286
+ /** Reservation. */
287
+ reservation?: Reservation$1;
288
+ }
289
+ interface ReserveReservationRequest$1 {
290
+ /** Reservation ID. */
291
+ reservationId: string;
292
+ /** Reservee details. */
293
+ reservee: Reservee$1;
294
+ /**
295
+ * Revision number.
296
+ *
297
+ * Include the existing `revision` to prevent conflicting updates to reservations.
298
+ */
299
+ revision: string | null;
300
+ }
301
+ interface ReserveReservationResponse$1 {
302
+ /** Reservation. */
303
+ reservation?: Reservation$1;
304
+ }
305
+ interface CancelReservationRequest$1 {
306
+ /** Reservation ID. */
307
+ reservationId: string;
308
+ /**
309
+ * Revision number.
310
+ *
311
+ * Include the existing `revision` to prevent conflicting updates to reservations.
312
+ */
313
+ revision: string | null;
314
+ /**
315
+ * The phone number that was provided when the reservation was created.
316
+ *
317
+ * This is required for reservations with any `source` other than `WALK_IN`.
318
+ *
319
+ * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
320
+ */
321
+ phone?: string | null;
322
+ }
323
+ interface CancelReservationResponse$1 {
324
+ /** Reservation. */
325
+ reservation?: Reservation$1;
326
+ }
327
+ interface ListReservationsRequest$1 {
328
+ /** 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`. */
329
+ paging?: CursorPaging$3;
330
+ /** Defines how reservations in the response are sorted. */
331
+ sort?: Sorting$3;
332
+ /** Only reservations starting after this date are returned. */
333
+ startDateFrom?: Date;
334
+ /** Only reservations starting before this date are returned. */
335
+ startDateTo?: Date;
336
+ /**
337
+ * Only reservations with this status are returned.
338
+ *
339
+ * * `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.
340
+ * * `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.
341
+ * * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
342
+ * * `RESERVED`: The reservation is confirmed.
343
+ * * `SEATED`: The customer is currently occupying the table.
344
+ * * `CANCELED`: The reservation is canceled.
345
+ * * `NO_SHOW`: The customer didn't show up for their reservation.
346
+ * * `FINISHED`: The reservation completed successfully.
347
+ */
348
+ status?: Status$3;
349
+ }
350
+ interface CursorPaging$3 {
351
+ /** Number of items to load. */
352
+ limit?: number | null;
353
+ /**
354
+ * Pointer to the next or previous page in the list of results.
355
+ *
356
+ * You can get the relevant cursor token
357
+ * from the `pagingMetadata` object in the previous call's response.
358
+ * Not relevant for the first request.
359
+ */
360
+ cursor?: string | null;
361
+ }
362
+ interface Sorting$3 {
363
+ /** Name of the field to sort by. */
364
+ fieldName?: string;
365
+ /**
366
+ * Sort order.
367
+ *
368
+ * Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`.
369
+ */
370
+ order?: SortOrder$3;
371
+ }
372
+ declare enum SortOrder$3 {
373
+ ASC = "ASC",
374
+ DESC = "DESC"
375
+ }
376
+ interface ListReservationsResponse$1 {
377
+ /** List of reservations. */
378
+ reservations?: Reservation$1[];
379
+ /** Metadata for the paginated results. */
380
+ pagingMetadata?: CursorPagingMetadata$3;
381
+ }
382
+ interface CursorPagingMetadata$3 {
383
+ /** Number of items returned in the response. */
384
+ count?: number | null;
385
+ /** Offset that was requested. */
386
+ cursors?: Cursors$3;
387
+ /**
388
+ * Indicates if there are more results after the current page.
389
+ * If `true`, another page of results can be retrieved.
390
+ * If `false`, this is the last page.
391
+ */
392
+ hasNext?: boolean | null;
393
+ }
394
+ interface Cursors$3 {
395
+ /** Cursor pointing to next page in the list of results. */
396
+ next?: string | null;
397
+ /** Cursor pointing to previous page in the list of results. */
398
+ prev?: string | null;
399
+ }
400
+ interface QueryReservationsRequest$1 {
401
+ /** Query to select reservations. */
402
+ query: CursorQuery$1;
403
+ }
404
+ interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 {
405
+ /** 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`. */
406
+ cursorPaging?: CursorPaging$3;
407
+ /**
408
+ * Filter object in the following format:
409
+ * `"filter" : {
410
+ * "fieldName1": "value1",
411
+ * "fieldName2":{"$operator":"value2"}
412
+ * }`
413
+ *
414
+ * 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.
415
+ * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
416
+ */
417
+ filter?: Record<string, any> | null;
418
+ /**
419
+ * Sort object in the following format:
420
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
421
+ */
422
+ sort?: Sorting$3[];
423
+ }
424
+ /** @oneof */
425
+ interface CursorQueryPagingMethodOneOf$1 {
426
+ /** 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`. */
427
+ cursorPaging?: CursorPaging$3;
428
+ }
429
+ interface QueryReservationsResponse$1 {
430
+ /** List of reservations. */
431
+ reservations?: Reservation$1[];
432
+ /** Metadata for the paginated results. */
433
+ pagingMetadata?: CursorPagingMetadata$3;
434
+ }
435
+ interface SearchReservationsRequest$1 {
436
+ /** Search query. */
437
+ search: CursorSearch$1;
438
+ }
439
+ interface CursorSearch$1 extends CursorSearchPagingMethodOneOf$1 {
440
+ /** 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' */
441
+ cursorPaging?: CursorPaging$3;
442
+ /** 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) */
443
+ filter?: Record<string, any> | null;
444
+ /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
445
+ sort?: Sorting$3[];
446
+ /** 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. */
447
+ aggregations?: Aggregation$1[];
448
+ /** free text to match in searchable fields */
449
+ search?: SearchDetails$1;
450
+ /** Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. */
451
+ timeZone?: string | null;
452
+ }
453
+ /** @oneof */
454
+ interface CursorSearchPagingMethodOneOf$1 {
455
+ /** 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' */
456
+ cursorPaging?: CursorPaging$3;
457
+ }
458
+ interface Aggregation$1 extends AggregationKindOneOf$1 {
459
+ value?: ValueAggregation$1;
460
+ range?: RangeAggregation$1;
461
+ scalar?: ScalarAggregation$1;
462
+ dateHistogram?: DateHistogramAggregation$1;
463
+ nested?: NestedAggregation$1;
464
+ name?: string | null;
465
+ type?: AggregationType$1;
466
+ fieldPath?: string;
467
+ groupBy?: GroupByAggregation$1;
468
+ }
469
+ /** @oneof */
470
+ interface AggregationKindOneOf$1 {
471
+ value?: ValueAggregation$1;
472
+ range?: RangeAggregation$1;
473
+ scalar?: ScalarAggregation$1;
474
+ dateHistogram?: DateHistogramAggregation$1;
475
+ nested?: NestedAggregation$1;
476
+ }
477
+ interface RangeBucket$1 {
478
+ /** Inclusive lower bound of the range. Required if to is not given. */
479
+ from?: number | null;
480
+ /** Exclusive upper bound of the range. Required if from is not given. */
481
+ to?: number | null;
482
+ }
483
+ declare enum SortType$1 {
484
+ COUNT = "COUNT",
485
+ VALUE = "VALUE"
486
+ }
487
+ declare enum SortDirection$1 {
488
+ DESC = "DESC",
489
+ ASC = "ASC"
490
+ }
491
+ declare enum MissingValues$1 {
492
+ EXCLUDE = "EXCLUDE",
493
+ INCLUDE = "INCLUDE"
494
+ }
495
+ interface IncludeMissingValuesOptions$1 {
496
+ /** can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... */
497
+ addToBucket?: string;
498
+ }
499
+ declare enum ScalarType$1 {
500
+ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
501
+ COUNT_DISTINCT = "COUNT_DISTINCT",
502
+ MIN = "MIN",
503
+ MAX = "MAX",
504
+ SUM = "SUM",
505
+ AVG = "AVG"
506
+ }
507
+ interface ValueAggregation$1 extends ValueAggregationOptionsOneOf$1 {
508
+ /** options for including missing values */
509
+ includeOptions?: IncludeMissingValuesOptions$1;
510
+ sortType?: SortType$1;
511
+ sortDirection?: SortDirection$1;
512
+ /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
513
+ limit?: number | null;
514
+ /** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
515
+ missingValues?: MissingValues$1;
516
+ }
517
+ /** @oneof */
518
+ interface ValueAggregationOptionsOneOf$1 {
519
+ /** options for including missing values */
520
+ includeOptions?: IncludeMissingValuesOptions$1;
521
+ }
522
+ declare enum NestedAggregationType$1 {
523
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
524
+ VALUE = "VALUE",
525
+ RANGE = "RANGE",
526
+ SCALAR = "SCALAR",
527
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
528
+ }
529
+ interface RangeAggregation$1 {
530
+ buckets?: RangeBucket$1[];
531
+ }
532
+ interface ScalarAggregation$1 {
533
+ type?: ScalarType$1;
534
+ }
535
+ interface DateHistogramAggregation$1 {
536
+ interval?: Interval$1;
537
+ }
538
+ declare enum Interval$1 {
539
+ UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
540
+ YEAR = "YEAR",
541
+ MONTH = "MONTH",
542
+ WEEK = "WEEK",
543
+ DAY = "DAY",
544
+ HOUR = "HOUR",
545
+ MINUTE = "MINUTE",
546
+ SECOND = "SECOND"
547
+ }
548
+ interface NestedAggregationItem$1 extends NestedAggregationItemKindOneOf$1 {
549
+ value?: ValueAggregation$1;
550
+ range?: RangeAggregation$1;
551
+ scalar?: ScalarAggregation$1;
552
+ dateHistogram?: DateHistogramAggregation$1;
553
+ name?: string | null;
554
+ type?: NestedAggregationType$1;
555
+ fieldPath?: string;
556
+ }
557
+ /** @oneof */
558
+ interface NestedAggregationItemKindOneOf$1 {
559
+ value?: ValueAggregation$1;
560
+ range?: RangeAggregation$1;
561
+ scalar?: ScalarAggregation$1;
562
+ dateHistogram?: DateHistogramAggregation$1;
563
+ }
564
+ declare enum AggregationType$1 {
565
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
566
+ VALUE = "VALUE",
567
+ RANGE = "RANGE",
568
+ SCALAR = "SCALAR",
569
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
570
+ NESTED = "NESTED"
571
+ }
572
+ interface NestedAggregation$1 {
573
+ nestedAggregations?: NestedAggregationItem$1[];
574
+ }
575
+ interface GroupByAggregation$1 extends GroupByAggregationKindOneOf$1 {
576
+ value?: ValueAggregation$1;
577
+ name?: string | null;
578
+ fieldPath?: string;
579
+ }
580
+ /** @oneof */
581
+ interface GroupByAggregationKindOneOf$1 {
582
+ value?: ValueAggregation$1;
583
+ }
584
+ interface SearchDetails$1 {
585
+ /** boolean search mode */
586
+ mode?: Mode$1;
587
+ /** search term or expression */
588
+ expression?: string | null;
589
+ /** fields to search in. if empty - server will search in own default fields */
590
+ fields?: string[];
591
+ /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
592
+ fuzzy?: boolean;
593
+ }
594
+ declare enum Mode$1 {
595
+ /** any */
596
+ OR = "OR",
597
+ /** all */
598
+ AND = "AND"
599
+ }
600
+ interface SearchReservationsResponse$1 {
601
+ /** List of Reservations. */
602
+ reservations?: Reservation$1[];
603
+ /** Cursor paging metadata. */
604
+ pagingMetadata?: CursorPagingMetadata$3;
605
+ /** Aggregation data. */
606
+ aggregationData?: AggregationData$1;
607
+ }
608
+ interface AggregationData$1 {
609
+ /** key = aggregation name (as derived from search request) */
610
+ results?: AggregationResults$1[];
611
+ }
612
+ interface ValueAggregationResult$1 {
613
+ value?: string;
614
+ count?: number;
615
+ }
616
+ interface RangeAggregationResult$1 {
617
+ from?: number | null;
618
+ to?: number | null;
619
+ count?: number;
620
+ }
621
+ interface NestedAggregationResults$1 extends NestedAggregationResultsResultOneOf$1 {
622
+ values?: ValueResults$1;
623
+ ranges?: RangeResults$1;
624
+ scalar?: AggregationResultsScalarResult$1;
625
+ name?: string;
626
+ type?: AggregationType$1;
627
+ fieldPath?: string;
628
+ }
629
+ /** @oneof */
630
+ interface NestedAggregationResultsResultOneOf$1 {
631
+ values?: ValueResults$1;
632
+ ranges?: RangeResults$1;
633
+ scalar?: AggregationResultsScalarResult$1;
634
+ }
635
+ interface ValueResults$1 {
636
+ results?: ValueAggregationResult$1[];
637
+ }
638
+ interface RangeResults$1 {
639
+ results?: RangeAggregationResult$1[];
640
+ }
641
+ interface AggregationResultsScalarResult$1 {
642
+ type?: ScalarType$1;
643
+ value?: number;
644
+ }
645
+ interface NestedValueAggregationResult$1 {
646
+ value?: string;
647
+ nestedResults?: NestedAggregationResults$1;
648
+ }
649
+ interface ValueResult$1 {
650
+ value?: string;
651
+ count?: number | null;
652
+ }
653
+ interface RangeResult$1 {
654
+ from?: number | null;
655
+ to?: number | null;
656
+ count?: number | null;
657
+ }
658
+ interface ScalarResult$1 {
659
+ value?: number;
660
+ }
661
+ interface NestedResultValue$1 extends NestedResultValueResultOneOf$1 {
662
+ value?: ValueResult$1;
663
+ range?: RangeResult$1;
664
+ scalar?: ScalarResult$1;
665
+ dateHistogram?: ValueResult$1;
666
+ }
667
+ /** @oneof */
668
+ interface NestedResultValueResultOneOf$1 {
669
+ value?: ValueResult$1;
670
+ range?: RangeResult$1;
671
+ scalar?: ScalarResult$1;
672
+ dateHistogram?: ValueResult$1;
673
+ }
674
+ interface Results$1 {
675
+ results?: Record<string, NestedResultValue$1>;
676
+ }
677
+ interface DateHistogramResult$1 {
678
+ value?: string;
679
+ count?: number;
680
+ }
681
+ interface GroupByValueResults$1 {
682
+ results?: NestedValueAggregationResult$1[];
683
+ }
684
+ interface DateHistogramResults$1 {
685
+ results?: DateHistogramResult$1[];
686
+ }
687
+ interface NestedResults$1 {
688
+ results?: Results$1[];
689
+ }
690
+ interface AggregationResults$1 extends AggregationResultsResultOneOf$1 {
691
+ values?: ValueResults$1;
692
+ ranges?: RangeResults$1;
693
+ scalar?: AggregationResultsScalarResult$1;
694
+ groupedByValue?: GroupByValueResults$1;
695
+ dateHistogram?: DateHistogramResults$1;
696
+ nested?: NestedResults$1;
697
+ name?: string;
698
+ type?: AggregationType$1;
699
+ fieldPath?: string;
700
+ }
701
+ /** @oneof */
702
+ interface AggregationResultsResultOneOf$1 {
703
+ values?: ValueResults$1;
704
+ ranges?: RangeResults$1;
705
+ scalar?: AggregationResultsScalarResult$1;
706
+ groupedByValue?: GroupByValueResults$1;
707
+ dateHistogram?: DateHistogramResults$1;
708
+ nested?: NestedResults$1;
709
+ }
710
+ interface CreateReservationResponseNonNullableFields$1 {
711
+ reservation?: {
712
+ status: Status$3;
713
+ source: Source$1;
714
+ migrationNotes: MigrationNote[];
715
+ tablesWithReservationConflicts: {
716
+ tableId: string;
717
+ reservationIds: string[];
718
+ }[];
719
+ paymentStatus: PaymentStatus$1;
720
+ };
721
+ }
722
+ interface GetReservationResponseNonNullableFields$1 {
723
+ reservation?: {
724
+ status: Status$3;
725
+ source: Source$1;
726
+ migrationNotes: MigrationNote[];
727
+ tablesWithReservationConflicts: {
728
+ tableId: string;
729
+ reservationIds: string[];
730
+ }[];
731
+ paymentStatus: PaymentStatus$1;
732
+ };
733
+ }
734
+ interface UpdateReservationResponseNonNullableFields$1 {
735
+ reservation?: {
736
+ status: Status$3;
737
+ source: Source$1;
738
+ migrationNotes: MigrationNote[];
739
+ tablesWithReservationConflicts: {
740
+ tableId: string;
741
+ reservationIds: string[];
742
+ }[];
743
+ paymentStatus: PaymentStatus$1;
744
+ };
745
+ }
746
+ interface CreateHeldReservationResponseNonNullableFields$1 {
747
+ reservation?: {
748
+ status: Status$3;
749
+ source: Source$1;
750
+ migrationNotes: MigrationNote[];
751
+ tablesWithReservationConflicts: {
752
+ tableId: string;
753
+ reservationIds: string[];
754
+ }[];
755
+ paymentStatus: PaymentStatus$1;
756
+ };
757
+ }
758
+ interface ReserveReservationResponseNonNullableFields$1 {
759
+ reservation?: {
760
+ status: Status$3;
761
+ source: Source$1;
762
+ migrationNotes: MigrationNote[];
763
+ tablesWithReservationConflicts: {
764
+ tableId: string;
765
+ reservationIds: string[];
766
+ }[];
767
+ paymentStatus: PaymentStatus$1;
768
+ };
769
+ }
770
+ interface CancelReservationResponseNonNullableFields$1 {
771
+ reservation?: {
772
+ status: Status$3;
773
+ source: Source$1;
774
+ migrationNotes: MigrationNote[];
775
+ tablesWithReservationConflicts: {
776
+ tableId: string;
777
+ reservationIds: string[];
778
+ }[];
779
+ paymentStatus: PaymentStatus$1;
780
+ };
781
+ }
782
+ interface ListReservationsResponseNonNullableFields$1 {
783
+ reservations: {
784
+ status: Status$3;
785
+ source: Source$1;
786
+ migrationNotes: MigrationNote[];
787
+ tablesWithReservationConflicts: {
788
+ tableId: string;
789
+ reservationIds: string[];
790
+ }[];
791
+ paymentStatus: PaymentStatus$1;
792
+ }[];
793
+ }
794
+ interface QueryReservationsResponseNonNullableFields$1 {
795
+ reservations: {
796
+ status: Status$3;
797
+ source: Source$1;
798
+ migrationNotes: MigrationNote[];
799
+ tablesWithReservationConflicts: {
800
+ tableId: string;
801
+ reservationIds: string[];
802
+ }[];
803
+ paymentStatus: PaymentStatus$1;
804
+ }[];
805
+ }
806
+ interface SearchReservationsResponseNonNullableFields$1 {
807
+ reservations: {
808
+ status: Status$3;
809
+ source: Source$1;
810
+ migrationNotes: MigrationNote[];
811
+ tablesWithReservationConflicts: {
812
+ tableId: string;
813
+ reservationIds: string[];
814
+ }[];
815
+ paymentStatus: PaymentStatus$1;
816
+ }[];
817
+ aggregationData?: {
818
+ results: {
819
+ values?: {
820
+ results: {
821
+ value: string;
822
+ count: number;
823
+ }[];
824
+ };
825
+ ranges?: {
826
+ results: {
827
+ count: number;
828
+ }[];
829
+ };
830
+ scalar?: {
831
+ type: ScalarType$1;
832
+ value: number;
833
+ };
834
+ groupedByValue?: {
835
+ results: {
836
+ value: string;
837
+ nestedResults?: {
838
+ values?: {
839
+ results: {
840
+ value: string;
841
+ count: number;
842
+ }[];
843
+ };
844
+ ranges?: {
845
+ results: {
846
+ count: number;
847
+ }[];
848
+ };
849
+ scalar?: {
850
+ type: ScalarType$1;
851
+ value: number;
852
+ };
853
+ name: string;
854
+ type: AggregationType$1;
855
+ fieldPath: string;
856
+ };
857
+ }[];
858
+ };
859
+ dateHistogram?: {
860
+ results: {
861
+ value: string;
862
+ count: number;
863
+ }[];
864
+ };
865
+ nested?: {
866
+ results: {
867
+ results?: {
868
+ value?: {
869
+ value: string;
870
+ };
871
+ scalar?: {
872
+ value: number;
873
+ };
874
+ dateHistogram?: {
875
+ value: string;
876
+ };
877
+ };
878
+ }[];
879
+ };
880
+ name: string;
881
+ type: AggregationType$1;
882
+ fieldPath: string;
883
+ }[];
884
+ };
885
+ }
886
+
887
+ /** The reservation domain object. */
888
+ interface Reservation {
889
+ /**
890
+ * Reservation ID.
891
+ * @readonly
892
+ */
893
+ _id?: string | null;
894
+ /**
895
+ * Status of the reservation.
896
+ *
897
+ * Supported values:
898
+ *
899
+ * * `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.
900
+ * * `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.
901
+ * * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
902
+ * * `RESERVED`: The reservation is confirmed.
903
+ * * `SEATED`: The customer is currently occupying the table.
904
+ * * `CANCELED`: The reservation is canceled.
905
+ * * `NO_SHOW`: The customer didn't show up for their reservation.
906
+ * * `FINISHED`: The reservation completed successfully.
907
+ *
908
+ *
909
+ * See the article for this API titled "The Reservation Lifecycle" in the menu on the left for more details on each of the statuses, and an explanation of the reservation lifecycle.
910
+ */
911
+ status?: Status$2;
912
+ /**
913
+ * Reservation source.
914
+ *
915
+ * This indicates how the reservation was made.
916
+ * * `ONLINE` indicates that the customer made the reservation through a website or app.
917
+ * * `OFFLINE` indicates that the reservation was made by a restaurant employee, for example when a customer calls to make a reservation.
918
+ * * `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.
919
+ */
920
+ source?: Source;
921
+ /** Reservation details. */
922
+ details?: Details;
923
+ /**
924
+ * Information about the person the reservation is being made for.
925
+ *
926
+ * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.
927
+ * Attempting to create a reservation without these fields results in an error.
928
+ */
929
+ reservee?: Reservee;
930
+ /**
931
+ * Information about the person making the reservation.
932
+ *
933
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
934
+ * @readonly
935
+ */
936
+ reservedBy?: ReservedBy;
937
+ /**
938
+ * Team message.
939
+ *
940
+ * A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.
941
+ */
942
+ teamMessage?: string | null;
943
+ /**
944
+ * Date and time the reservation was created.
945
+ * @readonly
946
+ */
947
+ _createdDate?: Date;
948
+ /**
949
+ * Date and time the reservation was changed.
950
+ * @readonly
951
+ */
952
+ _updatedDate?: Date;
953
+ /**
954
+ * Revision number, which increments by 1 each time the reservation is updated.
955
+ * To prevent conflicting changes, the current revision must be passed when updating the reservation.
956
+ *
957
+ * Ignored when creating a reservation.
958
+ * @readonly
959
+ */
960
+ revision?: string | null;
961
+ /** The reason the reservation was declined. */
962
+ declineReason?: string | null;
963
+ /**
964
+ * Payment status.
965
+ * @readonly
966
+ */
967
+ paymentStatus?: PaymentStatus;
968
+ }
969
+ declare enum Status$2 {
970
+ UNKNOWN = "UNKNOWN",
971
+ /** The reservation is held for 10 minutes, during which time the reservee should fill in their details. */
972
+ HELD = "HELD",
973
+ /** The reservation has been reserved. */
974
+ RESERVED = "RESERVED",
975
+ /** The reservation has been canceled. */
976
+ CANCELED = "CANCELED",
977
+ /** The reservation has finished successfully. */
978
+ FINISHED = "FINISHED",
979
+ /** The reservee didn't arrive. */
980
+ NO_SHOW = "NO_SHOW",
981
+ /** The reservee occupied the table. */
982
+ SEATED = "SEATED",
983
+ /** The reservee requested a reservation and is waiting for manual approval. */
984
+ REQUESTED = "REQUESTED",
985
+ /** The owner declined a reservee's request. */
986
+ DECLINED = "DECLINED",
987
+ /** 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. */
988
+ PAYMENT_PENDING = "PAYMENT_PENDING"
989
+ }
990
+ declare enum Source {
991
+ UNKNOWN = "UNKNOWN",
992
+ /** The reservation is created by a User. */
993
+ OFFLINE = "OFFLINE",
994
+ /** The reservation is created by UoU. */
995
+ ONLINE = "ONLINE",
996
+ /** The reservation is created by a User. It can be created without reservee data. */
997
+ WALK_IN = "WALK_IN"
998
+ }
999
+ /** Reservation details. */
1000
+ interface Details {
1001
+ /** ID of the reservation location at which this reservation will be made. */
1002
+ reservationLocationId?: string | null;
1003
+ /** IDs of tables used for this reservation. */
1004
+ tableIds?: string[] | null;
1005
+ /** Start date and time of the reservation. */
1006
+ startDate?: Date;
1007
+ /** End date and time of the reservation. */
1008
+ endDate?: Date;
1009
+ /** Party size. */
1010
+ partySize?: number | null;
1011
+ }
1012
+ /** The person the reservation is being made for. */
1013
+ interface Reservee {
1014
+ /**
1015
+ * First name.
1016
+ *
1017
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
1018
+ */
1019
+ firstName?: string | null;
1020
+ /** Last name. */
1021
+ lastName?: string | null;
1022
+ /** Email address. */
1023
+ email?: string | null;
1024
+ /**
1025
+ * Phone number.
1026
+ *
1027
+ * This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `"+972555555555"`.
1028
+ *
1029
+ * This field is required if the reservation's `status` is anything other than `WALK_IN`.
1030
+ */
1031
+ phone?: string | null;
1032
+ /** Whether the reservee has given marketing consent. */
1033
+ marketingConsent?: boolean | null;
1034
+ /**
1035
+ * Custom fields for the reservee in key-value pairs.
1036
+ *
1037
+ * 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"`.
1038
+ *
1039
+ * Empty fields are not returned.
1040
+ */
1041
+ customFields?: Record<string, any> | null;
1042
+ /**
1043
+ * Contact ID. If a contact with this ID does not exist on the site, one will be created.
1044
+ * @readonly
1045
+ */
1046
+ contactId?: string | null;
1047
+ }
1048
+ /** A person making reservation. */
1049
+ interface ReservedBy {
1050
+ /**
1051
+ * 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.
1052
+ * @readonly
1053
+ */
1054
+ contactId?: string | null;
1055
+ }
1056
+ declare enum PaymentStatus {
1057
+ UNKNOWN = "UNKNOWN",
1058
+ /** A reservation is free of charge. */
1059
+ FREE = "FREE",
1060
+ /** A payment is not received yet. */
1061
+ NOT_PAID = "NOT_PAID",
1062
+ /** A corresponding to reservation order was fully payed. */
1063
+ PAID = "PAID",
1064
+ /** A corresponding to reservation order was refunded, but refund amount is less than order total price. */
1065
+ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED",
1066
+ /** A corresponding to reservation order was fully refunded. The refund amount equals total price. */
1067
+ FULLY_REFUNDED = "FULLY_REFUNDED",
1068
+ /** A corresponding to reservation order was partially payed. */
1069
+ PARTIALLY_PAID = "PARTIALLY_PAID"
1070
+ }
1071
+ interface CreateReservationRequest {
1072
+ /** Reservation details. */
1073
+ reservation: Reservation;
1074
+ /**
1075
+ * 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.
1076
+ *
1077
+ * Possible values:
1078
+ * * `"RESERVED"`: One or more of the chosen tables are already reserved.
1079
+ * * `"TOO_BIG"`: The party is too big for the selected table.
1080
+ * * `"TOO_SMALL"`: The party is too small for the selected table.
1081
+ * * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
1082
+ */
1083
+ ignoreTableCombinationConflicts?: TableCombinationConflictType[];
1084
+ /**
1085
+ * 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.
1086
+ *
1087
+ * Possible values:
1088
+ * * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
1089
+ * * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
1090
+ */
1091
+ ignoreReservationLocationConflicts?: Type[];
1092
+ }
1093
+ declare enum TableCombinationConflictType {
1094
+ UNKNOWN = "UNKNOWN",
1095
+ RESERVED = "RESERVED",
1096
+ TOO_BIG = "TOO_BIG",
1097
+ TOO_SMALL = "TOO_SMALL",
1098
+ OFFLINE_ONLY = "OFFLINE_ONLY"
1099
+ }
1100
+ declare enum Type {
1101
+ UNKNOWN = "UNKNOWN",
1102
+ PARTY_PACING = "PARTY_PACING",
1103
+ SEAT_PACING = "SEAT_PACING"
1104
+ }
1105
+ interface CreateReservationResponse {
1106
+ /** Reservation. */
1107
+ reservation?: Reservation;
1108
+ }
1109
+ interface GetReservationRequest {
1110
+ /** Reservation ID. */
1111
+ reservationId: string;
1112
+ /**
1113
+ * Array of named, predefined sets of projected fields to be returned.
1114
+ *
1115
+ * Supported values: `PUBLIC`, `FULL`.
1116
+ *
1117
+ * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.
1118
+ */
1119
+ fieldsets?: Set$2[];
1120
+ }
1121
+ declare enum Set$2 {
1122
+ PUBLIC = "PUBLIC",
1123
+ FULL = "FULL"
1124
+ }
1125
+ interface GetReservationResponse {
1126
+ /** Reservation. */
1127
+ reservation?: Reservation;
1128
+ }
1129
+ interface UpdateReservationRequest {
1130
+ /** Reservation information to update. */
1131
+ reservation: Reservation;
1132
+ /**
1133
+ * 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.
1134
+ *
1135
+ * Possible values:
1136
+ * * `"RESERVED"`: One or more of the chosen tables are already reserved.
1137
+ * * `"TOO_BIG"`: The party is too big for the selected table.
1138
+ * * `"TOO_SMALL"`: The party is too small for the selected table.
1139
+ * * `"OFFLINE_ONLY"`: The restaurant does not allow online reservations.
1140
+ */
1141
+ ignoreTableCombinationConflicts?: TableCombinationConflictType[];
1142
+ /**
1143
+ * 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.
1144
+ *
1145
+ * Possible values:
1146
+ * * `"PARTY_PACING"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.
1147
+ * * `"SEAT_PACING"`: The required number of seats are unavailable according to seat pacing settings.
1148
+ */
1149
+ ignoreReservationLocationConflicts?: Type[];
1150
+ }
1151
+ interface UpdateReservationResponse {
1152
+ /** Reservation. */
1153
+ reservation?: Reservation;
1154
+ }
1155
+ interface CreateHeldReservationRequest {
1156
+ /** Held reservation information to update. */
1157
+ reservationDetails: HeldReservationDetails;
1158
+ }
1159
+ /** Reservation details when create reservation in status HELD. */
1160
+ interface HeldReservationDetails {
1161
+ /** ID of the reservation location where the reservation is made. */
1162
+ reservationLocationId?: string | null;
1163
+ /** Start date and time of the reservation. */
1164
+ startDate?: Date;
1165
+ /** Party size. */
1166
+ partySize?: number | null;
1167
+ }
1168
+ interface CreateHeldReservationResponse {
1169
+ /** Reservation. */
1170
+ reservation?: Reservation;
1171
+ }
1172
+ interface ReserveReservationRequest {
1173
+ /** Reservation ID. */
1174
+ reservationId: string;
1175
+ /** Reservee details. */
1176
+ reservee: Reservee;
1177
+ /**
1178
+ * Revision number.
1179
+ *
1180
+ * Include the existing `revision` to prevent conflicting updates to reservations.
1181
+ */
1182
+ revision: string | null;
1183
+ }
1184
+ interface ReserveReservationResponse {
1185
+ /** Reservation. */
1186
+ reservation?: Reservation;
1187
+ }
1188
+ interface CancelReservationRequest {
1189
+ /** Reservation ID. */
1190
+ reservationId: string;
1191
+ /**
1192
+ * Revision number.
1193
+ *
1194
+ * Include the existing `revision` to prevent conflicting updates to reservations.
1195
+ */
1196
+ revision: string | null;
1197
+ /**
1198
+ * The phone number that was provided when the reservation was created.
1199
+ *
1200
+ * This is required for reservations with any `source` other than `WALK_IN`.
1201
+ *
1202
+ * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.
1203
+ */
1204
+ phone?: string | null;
1205
+ }
1206
+ interface CancelReservationResponse {
1207
+ /** Reservation. */
1208
+ reservation?: Reservation;
1209
+ }
1210
+ interface ListReservationsRequest {
1211
+ /** 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`. */
1212
+ paging?: CursorPaging$2;
1213
+ /** Defines how reservations in the response are sorted. */
1214
+ sort?: Sorting$2;
1215
+ /** Only reservations starting after this date are returned. */
1216
+ startDateFrom?: Date;
1217
+ /** Only reservations starting before this date are returned. */
1218
+ startDateTo?: Date;
1219
+ /**
1220
+ * Only reservations with this status are returned.
1221
+ *
1222
+ * * `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.
1223
+ * * `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.
1224
+ * * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.
1225
+ * * `RESERVED`: The reservation is confirmed.
1226
+ * * `SEATED`: The customer is currently occupying the table.
1227
+ * * `CANCELED`: The reservation is canceled.
1228
+ * * `NO_SHOW`: The customer didn't show up for their reservation.
1229
+ * * `FINISHED`: The reservation completed successfully.
1230
+ */
1231
+ status?: Status$2;
1232
+ }
1233
+ interface CursorPaging$2 {
1234
+ /** Number of items to load. */
1235
+ limit?: number | null;
1236
+ /**
1237
+ * Pointer to the next or previous page in the list of results.
1238
+ *
1239
+ * You can get the relevant cursor token
1240
+ * from the `pagingMetadata` object in the previous call's response.
1241
+ * Not relevant for the first request.
1242
+ */
1243
+ cursor?: string | null;
1244
+ }
1245
+ interface Sorting$2 {
1246
+ /** Name of the field to sort by. */
1247
+ fieldName?: string;
1248
+ /**
1249
+ * Sort order.
1250
+ *
1251
+ * Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`.
1252
+ */
1253
+ order?: SortOrder$2;
1254
+ }
1255
+ declare enum SortOrder$2 {
1256
+ ASC = "ASC",
1257
+ DESC = "DESC"
1258
+ }
1259
+ interface ListReservationsResponse {
1260
+ /** List of reservations. */
1261
+ reservations?: Reservation[];
1262
+ /** Metadata for the paginated results. */
1263
+ pagingMetadata?: CursorPagingMetadata$2;
1264
+ }
1265
+ interface CursorPagingMetadata$2 {
1266
+ /** Number of items returned in the response. */
1267
+ count?: number | null;
1268
+ /** Offset that was requested. */
1269
+ cursors?: Cursors$2;
1270
+ /**
1271
+ * Indicates if there are more results after the current page.
1272
+ * If `true`, another page of results can be retrieved.
1273
+ * If `false`, this is the last page.
1274
+ */
1275
+ hasNext?: boolean | null;
1276
+ }
1277
+ interface Cursors$2 {
1278
+ /** Cursor pointing to next page in the list of results. */
1279
+ next?: string | null;
1280
+ /** Cursor pointing to previous page in the list of results. */
1281
+ prev?: string | null;
1282
+ }
1283
+ interface QueryReservationsRequest {
1284
+ /** Query to select reservations. */
1285
+ query: CursorQuery;
1286
+ }
1287
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
1288
+ /** 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`. */
1289
+ cursorPaging?: CursorPaging$2;
1290
+ /**
1291
+ * Filter object in the following format:
1292
+ * `"filter" : {
1293
+ * "fieldName1": "value1",
1294
+ * "fieldName2":{"$operator":"value2"}
1295
+ * }`
1296
+ *
1297
+ * 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.
1298
+ * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
1299
+ */
1300
+ filter?: Record<string, any> | null;
1301
+ /**
1302
+ * Sort object in the following format:
1303
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1304
+ */
1305
+ sort?: Sorting$2[];
1306
+ }
1307
+ /** @oneof */
1308
+ interface CursorQueryPagingMethodOneOf {
1309
+ /** 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`. */
1310
+ cursorPaging?: CursorPaging$2;
1311
+ }
1312
+ interface QueryReservationsResponse {
1313
+ /** List of reservations. */
1314
+ reservations?: Reservation[];
1315
+ /** Metadata for the paginated results. */
1316
+ pagingMetadata?: CursorPagingMetadata$2;
1317
+ }
1318
+ interface SearchReservationsRequest {
1319
+ /** Search query. */
1320
+ search: CursorSearch;
1321
+ }
1322
+ interface CursorSearch extends CursorSearchPagingMethodOneOf {
1323
+ /** 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' */
1324
+ cursorPaging?: CursorPaging$2;
1325
+ /** 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) */
1326
+ filter?: Record<string, any> | null;
1327
+ /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
1328
+ sort?: Sorting$2[];
1329
+ /** 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. */
1330
+ aggregations?: Aggregation[];
1331
+ /** free text to match in searchable fields */
1332
+ search?: SearchDetails;
1333
+ /** Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. */
1334
+ timeZone?: string | null;
1335
+ }
1336
+ /** @oneof */
1337
+ interface CursorSearchPagingMethodOneOf {
1338
+ /** 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' */
1339
+ cursorPaging?: CursorPaging$2;
1340
+ }
1341
+ interface Aggregation extends AggregationKindOneOf {
1342
+ value?: ValueAggregation;
1343
+ range?: RangeAggregation;
1344
+ scalar?: ScalarAggregation;
1345
+ dateHistogram?: DateHistogramAggregation;
1346
+ nested?: NestedAggregation;
1347
+ name?: string | null;
1348
+ type?: AggregationType;
1349
+ fieldPath?: string;
1350
+ groupBy?: GroupByAggregation;
1351
+ }
1352
+ /** @oneof */
1353
+ interface AggregationKindOneOf {
1354
+ value?: ValueAggregation;
1355
+ range?: RangeAggregation;
1356
+ scalar?: ScalarAggregation;
1357
+ dateHistogram?: DateHistogramAggregation;
1358
+ nested?: NestedAggregation;
1359
+ }
1360
+ interface RangeBucket {
1361
+ /** Inclusive lower bound of the range. Required if to is not given. */
1362
+ from?: number | null;
1363
+ /** Exclusive upper bound of the range. Required if from is not given. */
1364
+ to?: number | null;
1365
+ }
1366
+ declare enum SortType {
1367
+ COUNT = "COUNT",
1368
+ VALUE = "VALUE"
1369
+ }
1370
+ declare enum SortDirection {
1371
+ DESC = "DESC",
1372
+ ASC = "ASC"
1373
+ }
1374
+ declare enum MissingValues {
1375
+ EXCLUDE = "EXCLUDE",
1376
+ INCLUDE = "INCLUDE"
1377
+ }
1378
+ interface IncludeMissingValuesOptions {
1379
+ /** can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ... */
1380
+ addToBucket?: string;
1381
+ }
1382
+ declare enum ScalarType {
1383
+ UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
1384
+ COUNT_DISTINCT = "COUNT_DISTINCT",
1385
+ MIN = "MIN",
1386
+ MAX = "MAX",
1387
+ SUM = "SUM",
1388
+ AVG = "AVG"
1389
+ }
1390
+ interface ValueAggregation extends ValueAggregationOptionsOneOf {
1391
+ /** options for including missing values */
1392
+ includeOptions?: IncludeMissingValuesOptions;
1393
+ sortType?: SortType;
1394
+ sortDirection?: SortDirection;
1395
+ /** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
1396
+ limit?: number | null;
1397
+ /** should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
1398
+ missingValues?: MissingValues;
1399
+ }
1400
+ /** @oneof */
1401
+ interface ValueAggregationOptionsOneOf {
1402
+ /** options for including missing values */
1403
+ includeOptions?: IncludeMissingValuesOptions;
1404
+ }
1405
+ declare enum NestedAggregationType {
1406
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
1407
+ VALUE = "VALUE",
1408
+ RANGE = "RANGE",
1409
+ SCALAR = "SCALAR",
1410
+ DATE_HISTOGRAM = "DATE_HISTOGRAM"
1411
+ }
1412
+ interface RangeAggregation {
1413
+ buckets?: RangeBucket[];
1414
+ }
1415
+ interface ScalarAggregation {
1416
+ type?: ScalarType;
1417
+ }
1418
+ interface DateHistogramAggregation {
1419
+ interval?: Interval;
1420
+ }
1421
+ declare enum Interval {
1422
+ UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
1423
+ YEAR = "YEAR",
1424
+ MONTH = "MONTH",
1425
+ WEEK = "WEEK",
1426
+ DAY = "DAY",
1427
+ HOUR = "HOUR",
1428
+ MINUTE = "MINUTE",
1429
+ SECOND = "SECOND"
1430
+ }
1431
+ interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
1432
+ value?: ValueAggregation;
1433
+ range?: RangeAggregation;
1434
+ scalar?: ScalarAggregation;
1435
+ dateHistogram?: DateHistogramAggregation;
1436
+ name?: string | null;
1437
+ type?: NestedAggregationType;
1438
+ fieldPath?: string;
1439
+ }
1440
+ /** @oneof */
1441
+ interface NestedAggregationItemKindOneOf {
1442
+ value?: ValueAggregation;
1443
+ range?: RangeAggregation;
1444
+ scalar?: ScalarAggregation;
1445
+ dateHistogram?: DateHistogramAggregation;
1446
+ }
1447
+ declare enum AggregationType {
1448
+ UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
1449
+ VALUE = "VALUE",
1450
+ RANGE = "RANGE",
1451
+ SCALAR = "SCALAR",
1452
+ DATE_HISTOGRAM = "DATE_HISTOGRAM",
1453
+ NESTED = "NESTED"
1454
+ }
1455
+ interface NestedAggregation {
1456
+ nestedAggregations?: NestedAggregationItem[];
1457
+ }
1458
+ interface GroupByAggregation extends GroupByAggregationKindOneOf {
1459
+ value?: ValueAggregation;
1460
+ name?: string | null;
1461
+ fieldPath?: string;
1462
+ }
1463
+ /** @oneof */
1464
+ interface GroupByAggregationKindOneOf {
1465
+ value?: ValueAggregation;
1466
+ }
1467
+ interface SearchDetails {
1468
+ /** boolean search mode */
1469
+ mode?: Mode;
1470
+ /** search term or expression */
1471
+ expression?: string | null;
1472
+ /** fields to search in. if empty - server will search in own default fields */
1473
+ fields?: string[];
1474
+ /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
1475
+ fuzzy?: boolean;
1476
+ }
1477
+ declare enum Mode {
1478
+ /** any */
1479
+ OR = "OR",
1480
+ /** all */
1481
+ AND = "AND"
1482
+ }
1483
+ interface SearchReservationsResponse {
1484
+ /** List of Reservations. */
1485
+ reservations?: Reservation[];
1486
+ /** Cursor paging metadata. */
1487
+ pagingMetadata?: CursorPagingMetadata$2;
1488
+ /** Aggregation data. */
1489
+ aggregationData?: AggregationData;
1490
+ }
1491
+ interface AggregationData {
1492
+ /** key = aggregation name (as derived from search request) */
1493
+ results?: AggregationResults[];
1494
+ }
1495
+ interface ValueAggregationResult {
1496
+ value?: string;
1497
+ count?: number;
1498
+ }
1499
+ interface RangeAggregationResult {
1500
+ from?: number | null;
1501
+ to?: number | null;
1502
+ count?: number;
1503
+ }
1504
+ interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
1505
+ values?: ValueResults;
1506
+ ranges?: RangeResults;
1507
+ scalar?: AggregationResultsScalarResult;
1508
+ name?: string;
1509
+ type?: AggregationType;
1510
+ fieldPath?: string;
1511
+ }
1512
+ /** @oneof */
1513
+ interface NestedAggregationResultsResultOneOf {
1514
+ values?: ValueResults;
1515
+ ranges?: RangeResults;
1516
+ scalar?: AggregationResultsScalarResult;
1517
+ }
1518
+ interface ValueResults {
1519
+ results?: ValueAggregationResult[];
1520
+ }
1521
+ interface RangeResults {
1522
+ results?: RangeAggregationResult[];
1523
+ }
1524
+ interface AggregationResultsScalarResult {
1525
+ type?: ScalarType;
1526
+ value?: number;
1527
+ }
1528
+ interface NestedValueAggregationResult {
1529
+ value?: string;
1530
+ nestedResults?: NestedAggregationResults;
1531
+ }
1532
+ interface ValueResult {
1533
+ value?: string;
1534
+ count?: number | null;
1535
+ }
1536
+ interface RangeResult {
1537
+ from?: number | null;
1538
+ to?: number | null;
1539
+ count?: number | null;
1540
+ }
1541
+ interface ScalarResult {
1542
+ value?: number;
1543
+ }
1544
+ interface NestedResultValue extends NestedResultValueResultOneOf {
1545
+ value?: ValueResult;
1546
+ range?: RangeResult;
1547
+ scalar?: ScalarResult;
1548
+ dateHistogram?: ValueResult;
1549
+ }
1550
+ /** @oneof */
1551
+ interface NestedResultValueResultOneOf {
1552
+ value?: ValueResult;
1553
+ range?: RangeResult;
1554
+ scalar?: ScalarResult;
1555
+ dateHistogram?: ValueResult;
1556
+ }
1557
+ interface Results {
1558
+ results?: Record<string, NestedResultValue>;
1559
+ }
1560
+ interface DateHistogramResult {
1561
+ value?: string;
1562
+ count?: number;
1563
+ }
1564
+ interface GroupByValueResults {
1565
+ results?: NestedValueAggregationResult[];
1566
+ }
1567
+ interface DateHistogramResults {
1568
+ results?: DateHistogramResult[];
1569
+ }
1570
+ interface NestedResults {
1571
+ results?: Results[];
1572
+ }
1573
+ interface AggregationResults extends AggregationResultsResultOneOf {
1574
+ values?: ValueResults;
1575
+ ranges?: RangeResults;
1576
+ scalar?: AggregationResultsScalarResult;
1577
+ groupedByValue?: GroupByValueResults;
1578
+ dateHistogram?: DateHistogramResults;
1579
+ nested?: NestedResults;
1580
+ name?: string;
1581
+ type?: AggregationType;
1582
+ fieldPath?: string;
1583
+ }
1584
+ /** @oneof */
1585
+ interface AggregationResultsResultOneOf {
1586
+ values?: ValueResults;
1587
+ ranges?: RangeResults;
1588
+ scalar?: AggregationResultsScalarResult;
1589
+ groupedByValue?: GroupByValueResults;
1590
+ dateHistogram?: DateHistogramResults;
1591
+ nested?: NestedResults;
1592
+ }
1593
+ interface CreateReservationResponseNonNullableFields {
1594
+ reservation?: {
1595
+ status: Status$2;
1596
+ source: Source;
1597
+ paymentStatus: PaymentStatus;
1598
+ };
1599
+ }
1600
+ interface GetReservationResponseNonNullableFields {
1601
+ reservation?: {
1602
+ status: Status$2;
1603
+ source: Source;
1604
+ paymentStatus: PaymentStatus;
1605
+ };
1606
+ }
1607
+ interface UpdateReservationResponseNonNullableFields {
1608
+ reservation?: {
1609
+ status: Status$2;
1610
+ source: Source;
1611
+ paymentStatus: PaymentStatus;
1612
+ };
1613
+ }
1614
+ interface CreateHeldReservationResponseNonNullableFields {
1615
+ reservation?: {
1616
+ status: Status$2;
1617
+ source: Source;
1618
+ paymentStatus: PaymentStatus;
1619
+ };
1620
+ }
1621
+ interface ReserveReservationResponseNonNullableFields {
1622
+ reservation?: {
1623
+ status: Status$2;
1624
+ source: Source;
1625
+ paymentStatus: PaymentStatus;
1626
+ };
1627
+ }
1628
+ interface CancelReservationResponseNonNullableFields {
1629
+ reservation?: {
1630
+ status: Status$2;
1631
+ source: Source;
1632
+ paymentStatus: PaymentStatus;
1633
+ };
1634
+ }
1635
+ interface ListReservationsResponseNonNullableFields {
1636
+ reservations: {
1637
+ status: Status$2;
1638
+ source: Source;
1639
+ paymentStatus: PaymentStatus;
1640
+ }[];
1641
+ }
1642
+ interface QueryReservationsResponseNonNullableFields {
1643
+ reservations: {
1644
+ status: Status$2;
1645
+ source: Source;
1646
+ paymentStatus: PaymentStatus;
1647
+ }[];
1648
+ }
1649
+ interface SearchReservationsResponseNonNullableFields {
1650
+ reservations: {
1651
+ status: Status$2;
1652
+ source: Source;
1653
+ paymentStatus: PaymentStatus;
1654
+ }[];
1655
+ aggregationData?: {
1656
+ results: {
1657
+ values?: {
1658
+ results: {
1659
+ value: string;
1660
+ count: number;
1661
+ }[];
1662
+ };
1663
+ ranges?: {
1664
+ results: {
1665
+ count: number;
1666
+ }[];
1667
+ };
1668
+ scalar?: {
1669
+ type: ScalarType;
1670
+ value: number;
1671
+ };
1672
+ groupedByValue?: {
1673
+ results: {
1674
+ value: string;
1675
+ nestedResults?: {
1676
+ values?: {
1677
+ results: {
1678
+ value: string;
1679
+ count: number;
1680
+ }[];
1681
+ };
1682
+ ranges?: {
1683
+ results: {
1684
+ count: number;
1685
+ }[];
1686
+ };
1687
+ scalar?: {
1688
+ type: ScalarType;
1689
+ value: number;
1690
+ };
1691
+ name: string;
1692
+ type: AggregationType;
1693
+ fieldPath: string;
1694
+ };
1695
+ }[];
1696
+ };
1697
+ dateHistogram?: {
1698
+ results: {
1699
+ value: string;
1700
+ count: number;
1701
+ }[];
1702
+ };
1703
+ nested?: {
1704
+ results: {
1705
+ results?: {
1706
+ value?: {
1707
+ value: string;
1708
+ };
1709
+ scalar?: {
1710
+ value: number;
1711
+ };
1712
+ dateHistogram?: {
1713
+ value: string;
1714
+ };
1715
+ };
1716
+ }[];
1717
+ };
1718
+ name: string;
1719
+ type: AggregationType;
1720
+ fieldPath: string;
1721
+ }[];
1722
+ };
1723
+ }
1724
+
1725
+ type __PublicMethodMetaInfo$2<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
1726
+ getUrl: (context: any) => string;
1727
+ httpMethod: K;
1728
+ path: string;
1729
+ pathParams: M;
1730
+ __requestType: T;
1731
+ __originalRequestType: S;
1732
+ __responseType: Q;
1733
+ __originalResponseType: R;
1734
+ };
1735
+ declare function createReservation(): __PublicMethodMetaInfo$2<'POST', {}, CreateReservationRequest, CreateReservationRequest$1, CreateReservationResponse & CreateReservationResponseNonNullableFields, CreateReservationResponse$1 & CreateReservationResponseNonNullableFields$1>;
1736
+ declare function getReservation(): __PublicMethodMetaInfo$2<'GET', {
1737
+ reservationId: string;
1738
+ }, GetReservationRequest, GetReservationRequest$1, GetReservationResponse & GetReservationResponseNonNullableFields, GetReservationResponse$1 & GetReservationResponseNonNullableFields$1>;
1739
+ declare function updateReservation(): __PublicMethodMetaInfo$2<'PATCH', {
1740
+ reservationId: string;
1741
+ }, UpdateReservationRequest, UpdateReservationRequest$1, UpdateReservationResponse & UpdateReservationResponseNonNullableFields, UpdateReservationResponse$1 & UpdateReservationResponseNonNullableFields$1>;
1742
+ declare function createHeldReservation(): __PublicMethodMetaInfo$2<'POST', {}, CreateHeldReservationRequest, CreateHeldReservationRequest$1, CreateHeldReservationResponse & CreateHeldReservationResponseNonNullableFields, CreateHeldReservationResponse$1 & CreateHeldReservationResponseNonNullableFields$1>;
1743
+ declare function reserveReservation(): __PublicMethodMetaInfo$2<'POST', {
1744
+ reservationId: string;
1745
+ }, ReserveReservationRequest, ReserveReservationRequest$1, ReserveReservationResponse & ReserveReservationResponseNonNullableFields, ReserveReservationResponse$1 & ReserveReservationResponseNonNullableFields$1>;
1746
+ declare function cancelReservation(): __PublicMethodMetaInfo$2<'POST', {
1747
+ reservationId: string;
1748
+ }, CancelReservationRequest, CancelReservationRequest$1, CancelReservationResponse & CancelReservationResponseNonNullableFields, CancelReservationResponse$1 & CancelReservationResponseNonNullableFields$1>;
1749
+ declare function listReservations(): __PublicMethodMetaInfo$2<'GET', {}, ListReservationsRequest, ListReservationsRequest$1, ListReservationsResponse & ListReservationsResponseNonNullableFields, ListReservationsResponse$1 & ListReservationsResponseNonNullableFields$1>;
1750
+ declare function queryReservations(): __PublicMethodMetaInfo$2<'POST', {}, QueryReservationsRequest, QueryReservationsRequest$1, QueryReservationsResponse & QueryReservationsResponseNonNullableFields, QueryReservationsResponse$1 & QueryReservationsResponseNonNullableFields$1>;
1751
+ declare function searchReservations(): __PublicMethodMetaInfo$2<'POST', {}, SearchReservationsRequest, SearchReservationsRequest$1, SearchReservationsResponse & SearchReservationsResponseNonNullableFields, SearchReservationsResponse$1 & SearchReservationsResponseNonNullableFields$1>;
1752
+
1753
+ declare const meta$2_cancelReservation: typeof cancelReservation;
1754
+ declare const meta$2_createHeldReservation: typeof createHeldReservation;
1755
+ declare const meta$2_createReservation: typeof createReservation;
1756
+ declare const meta$2_getReservation: typeof getReservation;
1757
+ declare const meta$2_listReservations: typeof listReservations;
1758
+ declare const meta$2_queryReservations: typeof queryReservations;
1759
+ declare const meta$2_reserveReservation: typeof reserveReservation;
1760
+ declare const meta$2_searchReservations: typeof searchReservations;
1761
+ declare const meta$2_updateReservation: typeof updateReservation;
1762
+ declare namespace meta$2 {
1763
+ export { type __PublicMethodMetaInfo$2 as __PublicMethodMetaInfo, meta$2_cancelReservation as cancelReservation, meta$2_createHeldReservation as createHeldReservation, meta$2_createReservation as createReservation, meta$2_getReservation as getReservation, meta$2_listReservations as listReservations, meta$2_queryReservations as queryReservations, meta$2_reserveReservation as reserveReservation, meta$2_searchReservations as searchReservations, meta$2_updateReservation as updateReservation };
1764
+ }
1765
+
1766
+ interface ReservationLocation$1 {
1767
+ /**
1768
+ * Reservation location ID.
1769
+ * @readonly
1770
+ */
1771
+ id?: string | null;
1772
+ /** Represents the current state of a reservation location. Each time the reservation location is modified, its `revision` changes. For an update operation to succeed, you must pass the latest revision. */
1773
+ revision?: string | null;
1774
+ /**
1775
+ * The date and time this reservation location was created.
1776
+ * @readonly
1777
+ */
1778
+ createdDate?: Date;
1779
+ /**
1780
+ * The date and time this reservation location was last updated.
1781
+ * @readonly
1782
+ */
1783
+ updatedDate?: Date;
1784
+ /**
1785
+ * Physical location details.
1786
+ *
1787
+ * Locations can be created and configured using the [Locations API](https://dev.wix.com/docs/rest/api-reference/business-info/locations/introduction)
1788
+ * or on the [Business Info](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsettings/business-info) page in the Dashboard.
1789
+ * @readonly
1790
+ */
1791
+ location?: Location$1;
1792
+ /** Reservation location configuration. */
1793
+ configuration?: Configuration$1;
1794
+ /**
1795
+ * Whether this reservation location's `location` is the default location of the business.
1796
+ * @readonly
1797
+ */
1798
+ default?: boolean | null;
1799
+ /**
1800
+ * Whether this reservation location's `location` is archived.
1801
+ * @readonly
1802
+ */
1803
+ archived?: boolean | null;
1804
+ }
1805
+ /**
1806
+ * Time periods that this location is open for business. Includes a collection of TimePeriod instances.
1807
+ * Aligned with https://developers.google.com/my-business/reference/rest/v4/accounts.locations#businesshours
1808
+ * With a few minor adjustments
1809
+ */
1810
+ interface CommonBusinessSchedule$1 {
1811
+ periods?: CommonTimePeriod$1[];
1812
+ /**
1813
+ * Time periods during which this location is open. Each period represents a range of hours during the week during which the location is
1814
+ * open.
1815
+ *
1816
+ * Max: 100 time periods
1817
+ */
1818
+ specialHourPeriod?: CommonSpecialHourPeriod$1[];
1819
+ }
1820
+ /**
1821
+ * A span of time that the business is open,
1822
+ * starting on the specified open day/time and closing on the specified close day/time.
1823
+ * Closing time must occur after the opening time, for example later in the same day, or on a subsequent day.
1824
+ */
1825
+ interface CommonTimePeriod$1 {
1826
+ /** Day of the week this period starts on. */
1827
+ openDay?: CommonDayOfWeek$1;
1828
+ /**
1829
+ * Time this period starts in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents
1830
+ * midnight at the end of the specified day field.
1831
+ */
1832
+ openTime?: string;
1833
+ /** Day of the week this period ends on. */
1834
+ closeDay?: CommonDayOfWeek$1;
1835
+ /**
1836
+ * Time this period ends in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents
1837
+ * midnight at the end of the specified day field.
1838
+ *
1839
+ * This is the last time a reservation can be made at the restaurant, not the time the restaurant closes its doors.
1840
+ */
1841
+ closeTime?: string;
1842
+ }
1843
+ /** Enumerates the days of the week. */
1844
+ declare enum CommonDayOfWeek$1 {
1845
+ MONDAY = "MONDAY",
1846
+ TUESDAY = "TUESDAY",
1847
+ WEDNESDAY = "WEDNESDAY",
1848
+ THURSDAY = "THURSDAY",
1849
+ FRIDAY = "FRIDAY",
1850
+ SATURDAY = "SATURDAY",
1851
+ SUNDAY = "SUNDAY"
1852
+ }
1853
+ /** Set of time periods when a location's operational hours differ from its normal business hours. */
1854
+ interface CommonSpecialHourPeriod$1 {
1855
+ /** Start date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. */
1856
+ startDate?: string;
1857
+ /** End date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. */
1858
+ endDate?: string;
1859
+ /** Whether or not the location is closed during this period. */
1860
+ isClosed?: boolean;
1861
+ /** Additional details about the period. */
1862
+ comment?: string;
1863
+ }
1864
+ interface TableDefinition$1 {
1865
+ /**
1866
+ * Table ID.
1867
+ * @readonly
1868
+ */
1869
+ id?: string | null;
1870
+ /** Table name. */
1871
+ name?: string;
1872
+ /** Minimum number of seats. */
1873
+ seatsMin?: number;
1874
+ /** Maximum number of seats. */
1875
+ seatsMax?: number;
1876
+ /** Whether the table is active (available to be reserved). */
1877
+ isActive?: boolean | null;
1878
+ }
1879
+ interface TableCombination$1 {
1880
+ /**
1881
+ * Table combination ID.
1882
+ * @readonly
1883
+ */
1884
+ id?: string | null;
1885
+ /** IDs of tables in the combination. */
1886
+ tableIds?: string[] | null;
1887
+ /** Minimum number of seats that can be reserved in this table combination. */
1888
+ seatsMin?: number;
1889
+ /** Maximum number of seats that can be reserved in this table combination. */
1890
+ seatsMax?: number;
1891
+ /** Whether the table combination is active (available to be reserved). */
1892
+ isActive?: boolean | null;
1893
+ }
1894
+ declare enum Unit$1 {
1895
+ UNKNOWN = "UNKNOWN",
1896
+ MINUTES = "MINUTES",
1897
+ HOURS = "HOURS",
1898
+ DAYS = "DAYS"
1899
+ }
1900
+ /**
1901
+ * Seat pacing.
1902
+ * The maximum number of seats that can be filled by new reservations within a 15-minute period.
1903
+ * For example, setting a seat pacing of 15 would mean that between `10:00.000`-`10:14.999` there will be no more than 15 new seats available for reservation.
1904
+ */
1905
+ interface SeatPacing$1 {
1906
+ /** Maximum number of seats that can be reserved every 15 minutes. */
1907
+ number?: number;
1908
+ /** Whether this option is enabled. */
1909
+ enabled?: boolean;
1910
+ }
1911
+ /**
1912
+ * Party pacing.
1913
+ * The maximum number of party reservations that can start within a 15-minute period.
1914
+ * For example, a party pacing of 5 would mean that no more than 5 parties could make a reservation for the period between `10:00.000`-`10:14.999`.
1915
+ */
1916
+ interface PartyPacing$1 {
1917
+ /** Maximum number of new party reservations that can be made every 15 minutes. */
1918
+ number?: number;
1919
+ /** Whether this option is enabled. */
1920
+ enabled?: boolean;
1921
+ }
1922
+ /** The party size limits for a single reservation. */
1923
+ interface PartySize$1 {
1924
+ /** Minimum number of seats a party can reserve. */
1925
+ min?: number;
1926
+ /** Maximum number of seats a party can reserve. */
1927
+ max?: number;
1928
+ }
1929
+ /**
1930
+ * Reservation notice period.
1931
+ *
1932
+ * The period of time between making a reservation and that reservation's start time. Reservations cannot be made after the start of this period.
1933
+ */
1934
+ interface NoticePeriod$1 {
1935
+ /** The quantity of the chosen time unit. */
1936
+ number?: number;
1937
+ /** Time unit. */
1938
+ unit?: Unit$1;
1939
+ }
1940
+ /** Turnover time rule. A turnover time is defined per party size range. */
1941
+ interface TurnoverTimeRule$1 {
1942
+ /** Minimum number of seats to qualify for this rule. */
1943
+ seatsMin?: number;
1944
+ /** Maximum number of seats to qualify for this rule. */
1945
+ seatsMax?: number;
1946
+ /** Turnover time in minutes for qualifying parties. */
1947
+ minutes?: number;
1948
+ }
1949
+ /** Manual approval settings. */
1950
+ interface ManualApproval$1 extends ManualApprovalValueOneOf$1 {
1951
+ /** The minimum party size that requires manual approval. */
1952
+ partySizeThreshold?: number;
1953
+ /** Custom approvals provider id. */
1954
+ customApprovalsProviderId?: string;
1955
+ /** Whether manual approval is required for online reservations. */
1956
+ enabled?: boolean;
1957
+ }
1958
+ /** @oneof */
1959
+ interface ManualApprovalValueOneOf$1 {
1960
+ /** The minimum party size that requires manual approval. */
1961
+ partySizeThreshold?: number;
1962
+ /** Custom approvals provider id. */
1963
+ customApprovalsProviderId?: string;
1964
+ }
1965
+ /** Type of the field. */
1966
+ declare enum FieldType$1 {
1967
+ UNKNOWN = "UNKNOWN",
1968
+ TABLE = "TABLE",
1969
+ START_DATE = "START_DATE",
1970
+ END_DATE = "END_DATE",
1971
+ CREATED_DATE = "CREATED_DATE",
1972
+ UPDATED_DATE = "UPDATED_DATE",
1973
+ PARTY_SIZE = "PARTY_SIZE",
1974
+ FIRST_NAME = "FIRST_NAME",
1975
+ LAST_NAME = "LAST_NAME",
1976
+ EMAIL = "EMAIL",
1977
+ PHONE = "PHONE",
1978
+ ADDITIONAL_INFO = "ADDITIONAL_INFO",
1979
+ TEAM_MESSAGE = "TEAM_MESSAGE",
1980
+ CUSTOM_FIELD = "CUSTOM_FIELD",
1981
+ STATUS = "STATUS"
1982
+ }
1983
+ interface PageUrlV2 {
1984
+ /** The relative path for the page within the site. For example, `/product-page/a-product`. */
1985
+ relativePath?: string;
1986
+ /** The page's full URL. For example, `https://mysite.com/product-page/a-product`. */
1987
+ url?: string | null;
1988
+ }
1989
+ /** Terms and conditions. */
1990
+ interface TermsAndConditions$1 extends TermsAndConditionsValueOneOf$1 {
1991
+ /** Terms and conditions URL. */
1992
+ url?: PageUrlV2;
1993
+ /** Terms and conditions text. */
1994
+ text?: string | null;
1995
+ /**
1996
+ * Whether the terms and conditions are shown to the customer.
1997
+ *
1998
+ * Default: `false`
1999
+ */
2000
+ enabled?: boolean;
2001
+ }
2002
+ /** @oneof */
2003
+ interface TermsAndConditionsValueOneOf$1 {
2004
+ /** Terms and conditions URL. */
2005
+ url?: PageUrlV2;
2006
+ /** Terms and conditions text. */
2007
+ text?: string | null;
2008
+ }
2009
+ /** Privacy policy. */
2010
+ interface PrivacyPolicy$1 extends PrivacyPolicyValueOneOf$1 {
2011
+ /** Privacy policy URL. */
2012
+ url?: PageUrlV2;
2013
+ /** Privacy policy text. */
2014
+ text?: string | null;
2015
+ /**
2016
+ * Whether the privacy policy is shown to the customer.
2017
+ *
2018
+ * Default: `false`
2019
+ */
2020
+ enabled?: boolean;
2021
+ }
2022
+ /** @oneof */
2023
+ interface PrivacyPolicyValueOneOf$1 {
2024
+ /** Privacy policy URL. */
2025
+ url?: PageUrlV2;
2026
+ /** Privacy policy text. */
2027
+ text?: string | null;
2028
+ }
2029
+ /** Custom field definition. Definitions of the fields that are added to the reservation form. */
2030
+ interface CustomFieldDefinition$1 {
2031
+ /**
2032
+ * Custom field ID.
2033
+ * @readonly
2034
+ */
2035
+ id?: string | null;
2036
+ /** Custom field name. */
2037
+ name?: string;
2038
+ /**
2039
+ * Whether the custom field is required.
2040
+ *
2041
+ * Default: `false`
2042
+ */
2043
+ required?: boolean;
2044
+ }
2045
+ /** Email marketing checkbox. */
2046
+ interface EmailMarketingCheckbox$1 {
2047
+ /**
2048
+ * Whether the checkbox is shown to the customer.
2049
+ *
2050
+ * Default: `false`
2051
+ */
2052
+ enabled?: boolean;
2053
+ /**
2054
+ * Whether the checkbox is checked by default.
2055
+ *
2056
+ * Default: `false`
2057
+ */
2058
+ checkedByDefault?: boolean;
2059
+ }
2060
+ interface OnlineReservations$1 {
2061
+ /**
2062
+ * Seat pacing settings.
2063
+ *
2064
+ * The maximum number of seats that can be filled by new reservations within a 15-minute period.
2065
+ * For example, setting a seat pacing of 15 would mean that between `10:00.000`-`10:14.999` there will be no more than 15 new seats available for reservation.
2066
+ */
2067
+ seatPacing?: SeatPacing$1;
2068
+ /**
2069
+ * Party pacing settings.
2070
+ *
2071
+ * The maximum number of party reservations that can start within a 15-minute period.
2072
+ * For example, a party pacing of 5 would mean that no more than 5 parties could make a reservation for the period between `10:00.000`-`10:14.999`.
2073
+ */
2074
+ partyPacing?: PartyPacing$1;
2075
+ /** Party size limits for a reservation. */
2076
+ partySize?: PartySize$1;
2077
+ /**
2078
+ * Minimum reservation notice.
2079
+ *
2080
+ * The minimum amount of time that must be allowed between making a reservation and that reservation's start time.
2081
+ */
2082
+ minimumReservationNotice?: NoticePeriod$1;
2083
+ /**
2084
+ * Default turnover time in minutes.
2085
+ *
2086
+ * Turnover time is how much time a party is allotted for their entire reservation - from being seated to leaving the restaurant.
2087
+ */
2088
+ defaultTurnoverTime?: number | null;
2089
+ /**
2090
+ * Custom turnover time rules.
2091
+ *
2092
+ * This allows you to set different turnover times for different party sizes.
2093
+ */
2094
+ turnoverTimeRules?: TurnoverTimeRule$1[];
2095
+ /**
2096
+ * The location's business schedule.
2097
+ *
2098
+ * By default, the business schedule of a reservation location uses the values of its location's business schedule. However, after the first time a reservation location's business schedule has been modified, it stores and uses its own values and no longer mirrors its location's business schedule.
2099
+ * Limited to 100 time periods.
2100
+ */
2101
+ businessSchedule?: CommonBusinessSchedule$1;
2102
+ /** Whether a phone number is shown. */
2103
+ showPhoneNumber?: boolean | null;
2104
+ /** Whether online reservations are enabled. */
2105
+ onlineReservationsEnabled?: boolean | null;
2106
+ /** Manual approval settings. */
2107
+ manualApproval?: ManualApproval$1;
2108
+ }
2109
+ /** Reservation form settings. */
2110
+ interface ReservationForm$1 {
2111
+ /** A message shown to the customer in the registration form. */
2112
+ submitMessage?: string | null;
2113
+ /** Whether to show policies (the terms and conditions, and the privacy policy) to the customer. */
2114
+ policiesEnabled?: boolean | null;
2115
+ /** Settings for displaying the terms and conditions. */
2116
+ termsAndConditions?: TermsAndConditions$1;
2117
+ /** Settings for displaying the privacy policy. */
2118
+ privacyPolicy?: PrivacyPolicy$1;
2119
+ /** Custom fields you wish to add to the registration form for the customer to fill in. */
2120
+ customFieldDefinitions?: CustomFieldDefinition$1[];
2121
+ /**
2122
+ * Whether a last_name is required in the reservation form.
2123
+ *
2124
+ * Default: `false`
2125
+ */
2126
+ lastNameRequired?: boolean | null;
2127
+ /**
2128
+ * Whether an email is required in the reservation form.
2129
+ *
2130
+ * Default: `false`
2131
+ */
2132
+ emailRequired?: boolean | null;
2133
+ /** Email marketing checkbox settings. */
2134
+ emailMarketingCheckbox?: EmailMarketingCheckbox$1;
2135
+ }
2136
+ /** My reservations field definition. */
2137
+ interface MyReservationsField$1 {
2138
+ /** Field type. */
2139
+ fieldType?: FieldType$1;
2140
+ /**
2141
+ * Custom field ID.
2142
+ *
2143
+ * This should only be provided if the `fieldType` is `CUSTOM_FIELD`, in which case it is required and must match the ID of a custom field in the `customFieldDefinitions` array of the `reservationForm`.
2144
+ * @readonly
2145
+ */
2146
+ customFieldId?: string | null;
2147
+ /** Whether the field is shown. */
2148
+ shown?: boolean;
2149
+ }
2150
+ interface TableManagement$1 {
2151
+ /** Table definitions. */
2152
+ tableDefinitions?: TableDefinition$1[];
2153
+ /** Deleted table definitions. */
2154
+ deletedTableDefinitions?: TableDefinition$1[];
2155
+ /** Table combinations. */
2156
+ tableCombinations?: TableCombination$1[];
2157
+ }
2158
+ interface Location$1 {
2159
+ /**
2160
+ * Location ID.
2161
+ * @readonly
2162
+ */
2163
+ id?: string | null;
2164
+ }
2165
+ interface Configuration$1 {
2166
+ /** Settings for this location that are used to determine restaurant availability for reservations made online. */
2167
+ onlineReservations?: OnlineReservations$1;
2168
+ /** Reservation form settings. */
2169
+ reservationForm?: ReservationForm$1;
2170
+ /**
2171
+ * "My reservations" field details.
2172
+ *
2173
+ * These are the fields that appear in the "My reservations" section of the Table Reservations page on the restaurant's Wix site dashboard.
2174
+ */
2175
+ myReservationsFields?: MyReservationsField$1[];
2176
+ /** Table management settings. */
2177
+ tableManagement?: TableManagement$1;
2178
+ }
2179
+ interface GetReservationLocationRequest$1 {
2180
+ /** ID of the ReservationLocation to retrieve. */
2181
+ reservationLocationId: string;
2182
+ /**
2183
+ * Array of named, predefined sets of projected fields to be returned.
2184
+ *
2185
+ * - `PUBLIC`: Returns `id`, `archived`, `location`, `default`, `configuration.onlineReservations.partiesSize`, `configuration.onlineReservations.minimumReservationNotice`, `configuration.onlineReservations.businessSchedule`,
2186
+ * `configuration.onlineReservations.showPhoneNumber`, `configuration.onlineReservations.onlineReservationsEnabled`, `configuration.onlineReservations.manualApproval`, `configuration.reservationForm.submitMessage`,
2187
+ * `configuration.reservationForm.policiesEnabled`, `configuration.reservationForm.termsAndConditions`, `configuration.reservationForm.privacyPolicy`,
2188
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
2189
+ * - `FULL`: Returns all fields.
2190
+ *
2191
+ * Default: `PUBLIC`.
2192
+ */
2193
+ fieldsets?: Set$1[];
2194
+ }
2195
+ declare enum Set$1 {
2196
+ PUBLIC = "PUBLIC",
2197
+ FULL = "FULL"
2198
+ }
2199
+ interface GetReservationLocationResponse$1 {
2200
+ /** The retrieved reservation location. */
2201
+ reservationLocation?: ReservationLocation$1;
2202
+ }
2203
+ interface UpdateReservationLocationRequest$1 {
2204
+ /** ReservationLocation to be updated, may be partial. */
2205
+ reservationLocation: ReservationLocation$1;
2206
+ }
2207
+ interface UpdateReservationLocationResponse$1 {
2208
+ /** The updated reservation location. */
2209
+ reservationLocation?: ReservationLocation$1;
2210
+ }
2211
+ interface QueryReservationLocationsRequest$1 {
2212
+ /** Query options. */
2213
+ query: QueryV2$1;
2214
+ /**
2215
+ * Array of named, predefined sets of projected fields to be returned.
2216
+ *
2217
+ * - `PUBLIC`: Returns `id`, `archived`, `location`, `default`, `configuration.onlineReservations.partiesSize`, `configuration.onlineReservations.minimumReservationNotice`, `configuration.onlineReservations.businessSchedule`,
2218
+ * `configuration.onlineReservations.showPhoneNumber`, `configuration.onlineReservations.onlineReservationsEnabled`, `configuration.onlineReservations.manualApproval`, `configuration.reservationForm.submitMessage`,
2219
+ * `configuration.reservationForm.policiesEnabled`, `configuration.reservationForm.termsAndConditions`, `configuration.reservationForm.privacyPolicy`,
2220
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
2221
+ * - `FULL`: Returns all fields.
2222
+ *
2223
+ * Default: `PUBLIC`.
2224
+ */
2225
+ fieldsets?: Set$1[];
2226
+ }
2227
+ interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 {
2228
+ /** Paging options to limit and skip the number of items. */
2229
+ paging?: Paging$1;
2230
+ /** 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`. */
2231
+ cursorPaging?: CursorPaging$1;
2232
+ /**
2233
+ * Filter object in the following format:
2234
+ * `"filter" : {
2235
+ * "fieldName1": "value1",
2236
+ * "fieldName2":{"$operator":"value2"}
2237
+ * }`
2238
+ *
2239
+ * 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.
2240
+ * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
2241
+ */
2242
+ filter?: Record<string, any> | null;
2243
+ /**
2244
+ * Sort object in the following format:
2245
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
2246
+ */
2247
+ sort?: Sorting$1[];
2248
+ }
2249
+ /** @oneof */
2250
+ interface QueryV2PagingMethodOneOf$1 {
2251
+ /** Paging options to limit and skip the number of items. */
2252
+ paging?: Paging$1;
2253
+ /** 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`. */
2254
+ cursorPaging?: CursorPaging$1;
2255
+ }
2256
+ interface Sorting$1 {
2257
+ /** Name of the field to sort by. */
2258
+ fieldName?: string;
2259
+ /**
2260
+ * Sort order.
2261
+ *
2262
+ * Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`.
2263
+ */
2264
+ order?: SortOrder$1;
2265
+ }
2266
+ declare enum SortOrder$1 {
2267
+ ASC = "ASC",
2268
+ DESC = "DESC"
2269
+ }
2270
+ interface Paging$1 {
2271
+ /** Number of items to load. */
2272
+ limit?: number | null;
2273
+ /** Number of items to skip in the current sort order. */
2274
+ offset?: number | null;
2275
+ }
2276
+ interface CursorPaging$1 {
2277
+ /** Number of items to load. */
2278
+ limit?: number | null;
2279
+ /**
2280
+ * Pointer to the next or previous page in the list of results.
2281
+ *
2282
+ * You can get the relevant cursor token
2283
+ * from the `pagingMetadata` object in the previous call's response.
2284
+ * Not relevant for the first request.
2285
+ */
2286
+ cursor?: string | null;
2287
+ }
2288
+ interface QueryReservationLocationsResponse$1 {
2289
+ /** List of reservation locations */
2290
+ reservationLocations?: ReservationLocation$1[];
2291
+ /** Metadata for the paginated results. */
2292
+ pagingMetadata?: PagingMetadataV2$1;
2293
+ }
2294
+ interface PagingMetadataV2$1 {
2295
+ /** Offset that was requested. */
2296
+ offset?: number | null;
2297
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
2298
+ cursors?: Cursors$1;
2299
+ }
2300
+ interface Cursors$1 {
2301
+ /** Cursor pointing to next page in the list of results. */
2302
+ next?: string | null;
2303
+ /** Cursor pointing to previous page in the list of results. */
2304
+ prev?: string | null;
2305
+ }
2306
+ interface ListReservationLocationsRequest$1 {
2307
+ /** 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`. */
2308
+ paging?: CursorPaging$1;
2309
+ /** Sorting for the locations list. */
2310
+ sort?: Sorting$1;
2311
+ /**
2312
+ * Array of named, predefined sets of projected fields to be returned.
2313
+ *
2314
+ * - `PUBLIC`: Returns `id`, `archived`, `location`, `default`, `configuration.onlineReservations.partiesSize`, `configuration.onlineReservations.minimumReservationNotice`, `configuration.onlineReservations.businessSchedule`,
2315
+ * `configuration.onlineReservations.showPhoneNumber`, `configuration.onlineReservations.onlineReservationsEnabled`, `configuration.onlineReservations.manualApproval`, `configuration.reservationForm.submitMessage`,
2316
+ * `configuration.reservationForm.policiesEnabled`, `configuration.reservationForm.termsAndConditions`, `configuration.reservationForm.privacyPolicy`,
2317
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
2318
+ * - `FULL`: Returns all fields.
2319
+ *
2320
+ * Default: `PUBLIC`.
2321
+ */
2322
+ fieldsets?: Set$1[];
2323
+ }
2324
+ interface ListReservationLocationsResponse$1 {
2325
+ /** Locations list. */
2326
+ reservationLocations?: ReservationLocation$1[];
2327
+ /** Metadata for the paginated results. */
2328
+ pagingMetadata?: CursorPagingMetadata$1;
2329
+ }
2330
+ interface CursorPagingMetadata$1 {
2331
+ /** Number of items returned in the response. */
2332
+ count?: number | null;
2333
+ /** Offset that was requested. */
2334
+ cursors?: Cursors$1;
2335
+ /**
2336
+ * Indicates if there are more results after the current page.
2337
+ * If `true`, another page of results can be retrieved.
2338
+ * If `false`, this is the last page.
2339
+ */
2340
+ hasNext?: boolean | null;
2341
+ }
2342
+ interface GetReservationLocationResponseNonNullableFields$1 {
2343
+ reservationLocation?: {
2344
+ location?: {
2345
+ address?: {
2346
+ streetAddress?: {
2347
+ number: string;
2348
+ name: string;
2349
+ apt: string;
2350
+ };
2351
+ };
2352
+ businessSchedule?: {
2353
+ periods: {
2354
+ openDay: CommonDayOfWeek$1;
2355
+ openTime: string;
2356
+ closeDay: CommonDayOfWeek$1;
2357
+ closeTime: string;
2358
+ }[];
2359
+ specialHourPeriod: {
2360
+ startDate: string;
2361
+ endDate: string;
2362
+ isClosed: boolean;
2363
+ comment: string;
2364
+ }[];
2365
+ };
2366
+ };
2367
+ configuration?: {
2368
+ onlineReservations?: {
2369
+ seatPacing?: {
2370
+ number: number;
2371
+ enabled: boolean;
2372
+ };
2373
+ partyPacing?: {
2374
+ number: number;
2375
+ enabled: boolean;
2376
+ };
2377
+ partiesSize?: {
2378
+ min: number;
2379
+ max: number;
2380
+ };
2381
+ partySize?: {
2382
+ min: number;
2383
+ max: number;
2384
+ };
2385
+ minimumReservationNotice?: {
2386
+ number: number;
2387
+ unit: Unit$1;
2388
+ };
2389
+ turnoverTimeRules: {
2390
+ seatsMin: number;
2391
+ seatsMax: number;
2392
+ minutes: number;
2393
+ }[];
2394
+ turnoverRules: {
2395
+ minSeats: number;
2396
+ maxSeats: number;
2397
+ minutes: number;
2398
+ }[];
2399
+ businessSchedule?: {
2400
+ periods: {
2401
+ openDay: CommonDayOfWeek$1;
2402
+ openTime: string;
2403
+ closeDay: CommonDayOfWeek$1;
2404
+ closeTime: string;
2405
+ }[];
2406
+ specialHourPeriod: {
2407
+ startDate: string;
2408
+ endDate: string;
2409
+ isClosed: boolean;
2410
+ comment: string;
2411
+ }[];
2412
+ };
2413
+ manualApproval?: {
2414
+ partySizeThreshold: number;
2415
+ customApprovalsProviderId: string;
2416
+ enabled: boolean;
2417
+ };
2418
+ };
2419
+ reservationForm?: {
2420
+ termsAndConditions?: {
2421
+ url?: {
2422
+ relativePath: string;
2423
+ };
2424
+ enabled: boolean;
2425
+ };
2426
+ privacyPolicy?: {
2427
+ url?: {
2428
+ relativePath: string;
2429
+ };
2430
+ enabled: boolean;
2431
+ };
2432
+ customFieldDefinitions: {
2433
+ name: string;
2434
+ required: boolean;
2435
+ }[];
2436
+ emailMarketingCheckbox?: {
2437
+ enabled: boolean;
2438
+ checkedByDefault: boolean;
2439
+ };
2440
+ };
2441
+ myReservationsFields: {
2442
+ fieldType: FieldType$1;
2443
+ shown: boolean;
2444
+ }[];
2445
+ tableManagement?: {
2446
+ tableDefinitions: {
2447
+ name: string;
2448
+ seatsMin: number;
2449
+ seatsMax: number;
2450
+ }[];
2451
+ deletedTableDefinitions: {
2452
+ name: string;
2453
+ seatsMin: number;
2454
+ seatsMax: number;
2455
+ }[];
2456
+ tableCombinations: {
2457
+ seatsMin: number;
2458
+ seatsMax: number;
2459
+ }[];
2460
+ };
2461
+ reservationPayment?: {
2462
+ value: string;
2463
+ minPartySize: number;
2464
+ };
2465
+ };
2466
+ };
2467
+ }
2468
+ interface UpdateReservationLocationResponseNonNullableFields$1 {
2469
+ reservationLocation?: {
2470
+ location?: {
2471
+ address?: {
2472
+ streetAddress?: {
2473
+ number: string;
2474
+ name: string;
2475
+ apt: string;
2476
+ };
2477
+ };
2478
+ businessSchedule?: {
2479
+ periods: {
2480
+ openDay: CommonDayOfWeek$1;
2481
+ openTime: string;
2482
+ closeDay: CommonDayOfWeek$1;
2483
+ closeTime: string;
2484
+ }[];
2485
+ specialHourPeriod: {
2486
+ startDate: string;
2487
+ endDate: string;
2488
+ isClosed: boolean;
2489
+ comment: string;
2490
+ }[];
2491
+ };
2492
+ };
2493
+ configuration?: {
2494
+ onlineReservations?: {
2495
+ seatPacing?: {
2496
+ number: number;
2497
+ enabled: boolean;
2498
+ };
2499
+ partyPacing?: {
2500
+ number: number;
2501
+ enabled: boolean;
2502
+ };
2503
+ partiesSize?: {
2504
+ min: number;
2505
+ max: number;
2506
+ };
2507
+ partySize?: {
2508
+ min: number;
2509
+ max: number;
2510
+ };
2511
+ minimumReservationNotice?: {
2512
+ number: number;
2513
+ unit: Unit$1;
2514
+ };
2515
+ turnoverTimeRules: {
2516
+ seatsMin: number;
2517
+ seatsMax: number;
2518
+ minutes: number;
2519
+ }[];
2520
+ turnoverRules: {
2521
+ minSeats: number;
2522
+ maxSeats: number;
2523
+ minutes: number;
2524
+ }[];
2525
+ businessSchedule?: {
2526
+ periods: {
2527
+ openDay: CommonDayOfWeek$1;
2528
+ openTime: string;
2529
+ closeDay: CommonDayOfWeek$1;
2530
+ closeTime: string;
2531
+ }[];
2532
+ specialHourPeriod: {
2533
+ startDate: string;
2534
+ endDate: string;
2535
+ isClosed: boolean;
2536
+ comment: string;
2537
+ }[];
2538
+ };
2539
+ manualApproval?: {
2540
+ partySizeThreshold: number;
2541
+ customApprovalsProviderId: string;
2542
+ enabled: boolean;
2543
+ };
2544
+ };
2545
+ reservationForm?: {
2546
+ termsAndConditions?: {
2547
+ url?: {
2548
+ relativePath: string;
2549
+ };
2550
+ enabled: boolean;
2551
+ };
2552
+ privacyPolicy?: {
2553
+ url?: {
2554
+ relativePath: string;
2555
+ };
2556
+ enabled: boolean;
2557
+ };
2558
+ customFieldDefinitions: {
2559
+ name: string;
2560
+ required: boolean;
2561
+ }[];
2562
+ emailMarketingCheckbox?: {
2563
+ enabled: boolean;
2564
+ checkedByDefault: boolean;
2565
+ };
2566
+ };
2567
+ myReservationsFields: {
2568
+ fieldType: FieldType$1;
2569
+ shown: boolean;
2570
+ }[];
2571
+ tableManagement?: {
2572
+ tableDefinitions: {
2573
+ name: string;
2574
+ seatsMin: number;
2575
+ seatsMax: number;
2576
+ }[];
2577
+ deletedTableDefinitions: {
2578
+ name: string;
2579
+ seatsMin: number;
2580
+ seatsMax: number;
2581
+ }[];
2582
+ tableCombinations: {
2583
+ seatsMin: number;
2584
+ seatsMax: number;
2585
+ }[];
2586
+ };
2587
+ reservationPayment?: {
2588
+ value: string;
2589
+ minPartySize: number;
2590
+ };
2591
+ };
2592
+ };
2593
+ }
2594
+ interface QueryReservationLocationsResponseNonNullableFields$1 {
2595
+ reservationLocations: {
2596
+ location?: {
2597
+ address?: {
2598
+ streetAddress?: {
2599
+ number: string;
2600
+ name: string;
2601
+ apt: string;
2602
+ };
2603
+ };
2604
+ businessSchedule?: {
2605
+ periods: {
2606
+ openDay: CommonDayOfWeek$1;
2607
+ openTime: string;
2608
+ closeDay: CommonDayOfWeek$1;
2609
+ closeTime: string;
2610
+ }[];
2611
+ specialHourPeriod: {
2612
+ startDate: string;
2613
+ endDate: string;
2614
+ isClosed: boolean;
2615
+ comment: string;
2616
+ }[];
2617
+ };
2618
+ };
2619
+ configuration?: {
2620
+ onlineReservations?: {
2621
+ seatPacing?: {
2622
+ number: number;
2623
+ enabled: boolean;
2624
+ };
2625
+ partyPacing?: {
2626
+ number: number;
2627
+ enabled: boolean;
2628
+ };
2629
+ partiesSize?: {
2630
+ min: number;
2631
+ max: number;
2632
+ };
2633
+ partySize?: {
2634
+ min: number;
2635
+ max: number;
2636
+ };
2637
+ minimumReservationNotice?: {
2638
+ number: number;
2639
+ unit: Unit$1;
2640
+ };
2641
+ turnoverTimeRules: {
2642
+ seatsMin: number;
2643
+ seatsMax: number;
2644
+ minutes: number;
2645
+ }[];
2646
+ turnoverRules: {
2647
+ minSeats: number;
2648
+ maxSeats: number;
2649
+ minutes: number;
2650
+ }[];
2651
+ businessSchedule?: {
2652
+ periods: {
2653
+ openDay: CommonDayOfWeek$1;
2654
+ openTime: string;
2655
+ closeDay: CommonDayOfWeek$1;
2656
+ closeTime: string;
2657
+ }[];
2658
+ specialHourPeriod: {
2659
+ startDate: string;
2660
+ endDate: string;
2661
+ isClosed: boolean;
2662
+ comment: string;
2663
+ }[];
2664
+ };
2665
+ manualApproval?: {
2666
+ partySizeThreshold: number;
2667
+ customApprovalsProviderId: string;
2668
+ enabled: boolean;
2669
+ };
2670
+ };
2671
+ reservationForm?: {
2672
+ termsAndConditions?: {
2673
+ url?: {
2674
+ relativePath: string;
2675
+ };
2676
+ enabled: boolean;
2677
+ };
2678
+ privacyPolicy?: {
2679
+ url?: {
2680
+ relativePath: string;
2681
+ };
2682
+ enabled: boolean;
2683
+ };
2684
+ customFieldDefinitions: {
2685
+ name: string;
2686
+ required: boolean;
2687
+ }[];
2688
+ emailMarketingCheckbox?: {
2689
+ enabled: boolean;
2690
+ checkedByDefault: boolean;
2691
+ };
2692
+ };
2693
+ myReservationsFields: {
2694
+ fieldType: FieldType$1;
2695
+ shown: boolean;
2696
+ }[];
2697
+ tableManagement?: {
2698
+ tableDefinitions: {
2699
+ name: string;
2700
+ seatsMin: number;
2701
+ seatsMax: number;
2702
+ }[];
2703
+ deletedTableDefinitions: {
2704
+ name: string;
2705
+ seatsMin: number;
2706
+ seatsMax: number;
2707
+ }[];
2708
+ tableCombinations: {
2709
+ seatsMin: number;
2710
+ seatsMax: number;
2711
+ }[];
2712
+ };
2713
+ reservationPayment?: {
2714
+ value: string;
2715
+ minPartySize: number;
2716
+ };
2717
+ };
2718
+ }[];
2719
+ }
2720
+ interface ListReservationLocationsResponseNonNullableFields$1 {
2721
+ reservationLocations: {
2722
+ location?: {
2723
+ address?: {
2724
+ streetAddress?: {
2725
+ number: string;
2726
+ name: string;
2727
+ apt: string;
2728
+ };
2729
+ };
2730
+ businessSchedule?: {
2731
+ periods: {
2732
+ openDay: CommonDayOfWeek$1;
2733
+ openTime: string;
2734
+ closeDay: CommonDayOfWeek$1;
2735
+ closeTime: string;
2736
+ }[];
2737
+ specialHourPeriod: {
2738
+ startDate: string;
2739
+ endDate: string;
2740
+ isClosed: boolean;
2741
+ comment: string;
2742
+ }[];
2743
+ };
2744
+ };
2745
+ configuration?: {
2746
+ onlineReservations?: {
2747
+ seatPacing?: {
2748
+ number: number;
2749
+ enabled: boolean;
2750
+ };
2751
+ partyPacing?: {
2752
+ number: number;
2753
+ enabled: boolean;
2754
+ };
2755
+ partiesSize?: {
2756
+ min: number;
2757
+ max: number;
2758
+ };
2759
+ partySize?: {
2760
+ min: number;
2761
+ max: number;
2762
+ };
2763
+ minimumReservationNotice?: {
2764
+ number: number;
2765
+ unit: Unit$1;
2766
+ };
2767
+ turnoverTimeRules: {
2768
+ seatsMin: number;
2769
+ seatsMax: number;
2770
+ minutes: number;
2771
+ }[];
2772
+ turnoverRules: {
2773
+ minSeats: number;
2774
+ maxSeats: number;
2775
+ minutes: number;
2776
+ }[];
2777
+ businessSchedule?: {
2778
+ periods: {
2779
+ openDay: CommonDayOfWeek$1;
2780
+ openTime: string;
2781
+ closeDay: CommonDayOfWeek$1;
2782
+ closeTime: string;
2783
+ }[];
2784
+ specialHourPeriod: {
2785
+ startDate: string;
2786
+ endDate: string;
2787
+ isClosed: boolean;
2788
+ comment: string;
2789
+ }[];
2790
+ };
2791
+ manualApproval?: {
2792
+ partySizeThreshold: number;
2793
+ customApprovalsProviderId: string;
2794
+ enabled: boolean;
2795
+ };
2796
+ };
2797
+ reservationForm?: {
2798
+ termsAndConditions?: {
2799
+ url?: {
2800
+ relativePath: string;
2801
+ };
2802
+ enabled: boolean;
2803
+ };
2804
+ privacyPolicy?: {
2805
+ url?: {
2806
+ relativePath: string;
2807
+ };
2808
+ enabled: boolean;
2809
+ };
2810
+ customFieldDefinitions: {
2811
+ name: string;
2812
+ required: boolean;
2813
+ }[];
2814
+ emailMarketingCheckbox?: {
2815
+ enabled: boolean;
2816
+ checkedByDefault: boolean;
2817
+ };
2818
+ };
2819
+ myReservationsFields: {
2820
+ fieldType: FieldType$1;
2821
+ shown: boolean;
2822
+ }[];
2823
+ tableManagement?: {
2824
+ tableDefinitions: {
2825
+ name: string;
2826
+ seatsMin: number;
2827
+ seatsMax: number;
2828
+ }[];
2829
+ deletedTableDefinitions: {
2830
+ name: string;
2831
+ seatsMin: number;
2832
+ seatsMax: number;
2833
+ }[];
2834
+ tableCombinations: {
2835
+ seatsMin: number;
2836
+ seatsMax: number;
2837
+ }[];
2838
+ };
2839
+ reservationPayment?: {
2840
+ value: string;
2841
+ minPartySize: number;
2842
+ };
2843
+ };
2844
+ }[];
2845
+ }
2846
+
2847
+ interface ReservationLocation {
2848
+ /**
2849
+ * Reservation location ID.
2850
+ * @readonly
2851
+ */
2852
+ _id?: string | null;
2853
+ /** Represents the current state of a reservation location. Each time the reservation location is modified, its `revision` changes. For an update operation to succeed, you must pass the latest revision. */
2854
+ revision?: string | null;
2855
+ /**
2856
+ * The date and time this reservation location was created.
2857
+ * @readonly
2858
+ */
2859
+ _createdDate?: Date;
2860
+ /**
2861
+ * The date and time this reservation location was last updated.
2862
+ * @readonly
2863
+ */
2864
+ _updatedDate?: Date;
2865
+ /**
2866
+ * Physical location details.
2867
+ *
2868
+ * Locations can be created and configured using the [Locations API](https://dev.wix.com/docs/rest/api-reference/business-info/locations/introduction)
2869
+ * or on the [Business Info](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fsettings/business-info) page in the Dashboard.
2870
+ * @readonly
2871
+ */
2872
+ location?: Location;
2873
+ /** Reservation location configuration. */
2874
+ configuration?: Configuration;
2875
+ /**
2876
+ * Whether this reservation location's `location` is the default location of the business.
2877
+ * @readonly
2878
+ */
2879
+ default?: boolean | null;
2880
+ /**
2881
+ * Whether this reservation location's `location` is archived.
2882
+ * @readonly
2883
+ */
2884
+ archived?: boolean | null;
2885
+ }
2886
+ /**
2887
+ * Time periods that this location is open for business. Includes a collection of TimePeriod instances.
2888
+ * Aligned with https://developers.google.com/my-business/reference/rest/v4/accounts.locations#businesshours
2889
+ * With a few minor adjustments
2890
+ */
2891
+ interface CommonBusinessSchedule {
2892
+ periods?: CommonTimePeriod[];
2893
+ /**
2894
+ * Time periods during which this location is open. Each period represents a range of hours during the week during which the location is
2895
+ * open.
2896
+ *
2897
+ * Max: 100 time periods
2898
+ */
2899
+ specialHourPeriod?: CommonSpecialHourPeriod[];
2900
+ }
2901
+ /**
2902
+ * A span of time that the business is open,
2903
+ * starting on the specified open day/time and closing on the specified close day/time.
2904
+ * Closing time must occur after the opening time, for example later in the same day, or on a subsequent day.
2905
+ */
2906
+ interface CommonTimePeriod {
2907
+ /** Day of the week this period starts on. */
2908
+ openDay?: CommonDayOfWeek;
2909
+ /**
2910
+ * Time this period starts in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents
2911
+ * midnight at the end of the specified day field.
2912
+ */
2913
+ openTime?: string;
2914
+ /** Day of the week this period ends on. */
2915
+ closeDay?: CommonDayOfWeek;
2916
+ /**
2917
+ * Time this period ends in 24hr [ISO 8601](http://www.w3.org/TR/NOTE-datetime) extended format (hh:mm). Valid values are `00:00-24:00`, where `24:00` represents
2918
+ * midnight at the end of the specified day field.
2919
+ *
2920
+ * This is the last time a reservation can be made at the restaurant, not the time the restaurant closes its doors.
2921
+ */
2922
+ closeTime?: string;
2923
+ }
2924
+ /** Enumerates the days of the week. */
2925
+ declare enum CommonDayOfWeek {
2926
+ MONDAY = "MONDAY",
2927
+ TUESDAY = "TUESDAY",
2928
+ WEDNESDAY = "WEDNESDAY",
2929
+ THURSDAY = "THURSDAY",
2930
+ FRIDAY = "FRIDAY",
2931
+ SATURDAY = "SATURDAY",
2932
+ SUNDAY = "SUNDAY"
2933
+ }
2934
+ /** Set of time periods when a location's operational hours differ from its normal business hours. */
2935
+ interface CommonSpecialHourPeriod {
2936
+ /** Start date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. */
2937
+ startDate?: string;
2938
+ /** End date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format. */
2939
+ endDate?: string;
2940
+ /** Whether or not the location is closed during this period. */
2941
+ isClosed?: boolean;
2942
+ /** Additional details about the period. */
2943
+ comment?: string;
2944
+ }
2945
+ interface TableDefinition {
2946
+ /**
2947
+ * Table ID.
2948
+ * @readonly
2949
+ */
2950
+ _id?: string | null;
2951
+ /** Table name. */
2952
+ name?: string;
2953
+ /** Minimum number of seats. */
2954
+ seatsMin?: number;
2955
+ /** Maximum number of seats. */
2956
+ seatsMax?: number;
2957
+ /** Whether the table is active (available to be reserved). */
2958
+ isActive?: boolean | null;
2959
+ }
2960
+ interface TableCombination {
2961
+ /**
2962
+ * Table combination ID.
2963
+ * @readonly
2964
+ */
2965
+ _id?: string | null;
2966
+ /** IDs of tables in the combination. */
2967
+ tableIds?: string[] | null;
2968
+ /** Minimum number of seats that can be reserved in this table combination. */
2969
+ seatsMin?: number;
2970
+ /** Maximum number of seats that can be reserved in this table combination. */
2971
+ seatsMax?: number;
2972
+ /** Whether the table combination is active (available to be reserved). */
2973
+ isActive?: boolean | null;
2974
+ }
2975
+ declare enum Unit {
2976
+ UNKNOWN = "UNKNOWN",
2977
+ MINUTES = "MINUTES",
2978
+ HOURS = "HOURS",
2979
+ DAYS = "DAYS"
2980
+ }
2981
+ /**
2982
+ * Seat pacing.
2983
+ * The maximum number of seats that can be filled by new reservations within a 15-minute period.
2984
+ * For example, setting a seat pacing of 15 would mean that between `10:00.000`-`10:14.999` there will be no more than 15 new seats available for reservation.
2985
+ */
2986
+ interface SeatPacing {
2987
+ /** Maximum number of seats that can be reserved every 15 minutes. */
2988
+ number?: number;
2989
+ /** Whether this option is enabled. */
2990
+ enabled?: boolean;
2991
+ }
2992
+ /**
2993
+ * Party pacing.
2994
+ * The maximum number of party reservations that can start within a 15-minute period.
2995
+ * For example, a party pacing of 5 would mean that no more than 5 parties could make a reservation for the period between `10:00.000`-`10:14.999`.
2996
+ */
2997
+ interface PartyPacing {
2998
+ /** Maximum number of new party reservations that can be made every 15 minutes. */
2999
+ number?: number;
3000
+ /** Whether this option is enabled. */
3001
+ enabled?: boolean;
3002
+ }
3003
+ /** The party size limits for a single reservation. */
3004
+ interface PartySize {
3005
+ /** Minimum number of seats a party can reserve. */
3006
+ min?: number;
3007
+ /** Maximum number of seats a party can reserve. */
3008
+ max?: number;
3009
+ }
3010
+ /**
3011
+ * Reservation notice period.
3012
+ *
3013
+ * The period of time between making a reservation and that reservation's start time. Reservations cannot be made after the start of this period.
3014
+ */
3015
+ interface NoticePeriod {
3016
+ /** The quantity of the chosen time unit. */
3017
+ number?: number;
3018
+ /**
3019
+ * Time unit.
3020
+ *
3021
+ * Supported values:
3022
+ * 'UNKNOWN', 'MINUTES, 'HOURS', 'DAYS'.
3023
+ */
3024
+ unit?: Unit;
3025
+ }
3026
+ /** Turnover time rule. A turnover time is defined per party size range. */
3027
+ interface TurnoverTimeRule {
3028
+ /** Minimum number of seats to qualify for this rule. */
3029
+ seatsMin?: number;
3030
+ /** Maximum number of seats to qualify for this rule. */
3031
+ seatsMax?: number;
3032
+ /** Turnover time in minutes for qualifying parties. */
3033
+ minutes?: number;
3034
+ }
3035
+ /** Manual approval settings. */
3036
+ interface ManualApproval extends ManualApprovalValueOneOf {
3037
+ /** The minimum party size that requires manual approval. */
3038
+ partySizeThreshold?: number;
3039
+ /** Custom approvals provider id. */
3040
+ customApprovalsProviderId?: string;
3041
+ /** Whether manual approval is required for online reservations. */
3042
+ enabled?: boolean;
3043
+ }
3044
+ /** @oneof */
3045
+ interface ManualApprovalValueOneOf {
3046
+ /** The minimum party size that requires manual approval. */
3047
+ partySizeThreshold?: number;
3048
+ /** Custom approvals provider id. */
3049
+ customApprovalsProviderId?: string;
3050
+ }
3051
+ /** Type of the field. */
3052
+ declare enum FieldType {
3053
+ UNKNOWN = "UNKNOWN",
3054
+ TABLE = "TABLE",
3055
+ START_DATE = "START_DATE",
3056
+ END_DATE = "END_DATE",
3057
+ CREATED_DATE = "CREATED_DATE",
3058
+ UPDATED_DATE = "UPDATED_DATE",
3059
+ PARTY_SIZE = "PARTY_SIZE",
3060
+ FIRST_NAME = "FIRST_NAME",
3061
+ LAST_NAME = "LAST_NAME",
3062
+ EMAIL = "EMAIL",
3063
+ PHONE = "PHONE",
3064
+ ADDITIONAL_INFO = "ADDITIONAL_INFO",
3065
+ TEAM_MESSAGE = "TEAM_MESSAGE",
3066
+ CUSTOM_FIELD = "CUSTOM_FIELD",
3067
+ STATUS = "STATUS"
3068
+ }
3069
+ /** Terms and conditions. */
3070
+ interface TermsAndConditions extends TermsAndConditionsValueOneOf {
3071
+ /** Terms and conditions URL. */
3072
+ url?: string;
3073
+ /** Terms and conditions text. */
3074
+ text?: string | null;
3075
+ /**
3076
+ * Whether the terms and conditions are shown to the customer.
3077
+ *
3078
+ * Default: `false`
3079
+ */
3080
+ enabled?: boolean;
3081
+ }
3082
+ /** @oneof */
3083
+ interface TermsAndConditionsValueOneOf {
3084
+ /** Terms and conditions URL. */
3085
+ url?: string;
3086
+ /** Terms and conditions text. */
3087
+ text?: string | null;
3088
+ }
3089
+ /** Privacy policy. */
3090
+ interface PrivacyPolicy extends PrivacyPolicyValueOneOf {
3091
+ /** Privacy policy URL. */
3092
+ url?: string;
3093
+ /** Privacy policy text. */
3094
+ text?: string | null;
3095
+ /**
3096
+ * Whether the privacy policy is shown to the customer.
3097
+ *
3098
+ * Default: `false`
3099
+ */
3100
+ enabled?: boolean;
3101
+ }
3102
+ /** @oneof */
3103
+ interface PrivacyPolicyValueOneOf {
3104
+ /** Privacy policy URL. */
3105
+ url?: string;
3106
+ /** Privacy policy text. */
3107
+ text?: string | null;
3108
+ }
3109
+ /** Custom field definition. Definitions of the fields that are added to the reservation form. */
3110
+ interface CustomFieldDefinition {
3111
+ /**
3112
+ * Custom field ID.
3113
+ * @readonly
3114
+ */
3115
+ _id?: string | null;
3116
+ /** Custom field name. */
3117
+ name?: string;
3118
+ /**
3119
+ * Whether the custom field is required.
3120
+ *
3121
+ * Default: `false`
3122
+ */
3123
+ required?: boolean;
3124
+ }
3125
+ /** Email marketing checkbox. */
3126
+ interface EmailMarketingCheckbox {
3127
+ /**
3128
+ * Whether the checkbox is shown to the customer.
3129
+ *
3130
+ * Default: `false`
3131
+ */
3132
+ enabled?: boolean;
3133
+ /**
3134
+ * Whether the checkbox is checked by default.
3135
+ *
3136
+ * Default: `false`
3137
+ */
3138
+ checkedByDefault?: boolean;
3139
+ }
3140
+ interface OnlineReservations {
3141
+ /**
3142
+ * Seat pacing settings.
3143
+ *
3144
+ * The maximum number of seats that can be filled by new reservations within a 15-minute period.
3145
+ * For example, setting a seat pacing of 15 would mean that between `10:00.000`-`10:14.999` there will be no more than 15 new seats available for reservation.
3146
+ */
3147
+ seatPacing?: SeatPacing;
3148
+ /**
3149
+ * Party pacing settings.
3150
+ *
3151
+ * The maximum number of party reservations that can start within a 15-minute period.
3152
+ * For example, a party pacing of 5 would mean that no more than 5 parties could make a reservation for the period between `10:00.000`-`10:14.999`.
3153
+ */
3154
+ partyPacing?: PartyPacing;
3155
+ /** Party size limits for a reservation. */
3156
+ partySize?: PartySize;
3157
+ /**
3158
+ * Minimum reservation notice.
3159
+ *
3160
+ * The minimum amount of time that must be allowed between making a reservation and that reservation's start time.
3161
+ */
3162
+ minimumReservationNotice?: NoticePeriod;
3163
+ /**
3164
+ * Default turnover time in minutes.
3165
+ *
3166
+ * Turnover time is how much time a party is allotted for their entire reservation - from being seated to leaving the restaurant.
3167
+ */
3168
+ defaultTurnoverTime?: number | null;
3169
+ /**
3170
+ * Custom turnover time rules.
3171
+ *
3172
+ * This allows you to set different turnover times for different party sizes.
3173
+ */
3174
+ turnoverTimeRules?: TurnoverTimeRule[];
3175
+ /**
3176
+ * The location's business schedule.
3177
+ *
3178
+ * By default, the business schedule of a reservation location uses the values of its location's business schedule. However, after the first time a reservation location's business schedule has been modified, it stores and uses its own values and no longer mirrors its location's business schedule.
3179
+ * Limited to 100 time periods.
3180
+ */
3181
+ businessSchedule?: CommonBusinessSchedule;
3182
+ /** Whether a phone number is shown. */
3183
+ showPhoneNumber?: boolean | null;
3184
+ /** Whether online reservations are enabled. */
3185
+ onlineReservationsEnabled?: boolean | null;
3186
+ /** Manual approval settings. */
3187
+ manualApproval?: ManualApproval;
3188
+ }
3189
+ /** Reservation form settings. */
3190
+ interface ReservationForm {
3191
+ /** A message shown to the customer in the registration form. */
3192
+ submitMessage?: string | null;
3193
+ /** Whether to show policies (the terms and conditions, and the privacy policy) to the customer. */
3194
+ policiesEnabled?: boolean | null;
3195
+ /** Settings for displaying the terms and conditions. */
3196
+ termsAndConditions?: TermsAndConditions;
3197
+ /** Settings for displaying the privacy policy. */
3198
+ privacyPolicy?: PrivacyPolicy;
3199
+ /** Custom fields you wish to add to the registration form for the customer to fill in. */
3200
+ customFieldDefinitions?: CustomFieldDefinition[];
3201
+ /**
3202
+ * Whether a last_name is required in the reservation form.
3203
+ *
3204
+ * Default: `false`
3205
+ */
3206
+ lastNameRequired?: boolean | null;
3207
+ /**
3208
+ * Whether an email is required in the reservation form.
3209
+ *
3210
+ * Default: `false`
3211
+ */
3212
+ emailRequired?: boolean | null;
3213
+ /** Email marketing checkbox settings. */
3214
+ emailMarketingCheckbox?: EmailMarketingCheckbox;
3215
+ }
3216
+ /** My reservations field definition. */
3217
+ interface MyReservationsField {
3218
+ /** Field type. */
3219
+ fieldType?: FieldType;
3220
+ /**
3221
+ * Custom field ID.
3222
+ *
3223
+ * This should only be provided if the `fieldType` is `CUSTOM_FIELD`, in which case it is required and must match the ID of a custom field in the `customFieldDefinitions` array of the `reservationForm`.
3224
+ * @readonly
3225
+ */
3226
+ customFieldId?: string | null;
3227
+ /** Whether the field is shown. */
3228
+ shown?: boolean;
3229
+ }
3230
+ interface TableManagement {
3231
+ /** Table definitions. */
3232
+ tableDefinitions?: TableDefinition[];
3233
+ /** Deleted table definitions. */
3234
+ deletedTableDefinitions?: TableDefinition[];
3235
+ /** Table combinations. */
3236
+ tableCombinations?: TableCombination[];
3237
+ }
3238
+ interface Location {
3239
+ /**
3240
+ * Location ID.
3241
+ * @readonly
3242
+ */
3243
+ _id?: string | null;
3244
+ }
3245
+ interface Configuration {
3246
+ /** Settings for this location that are used to determine restaurant availability for reservations made online. */
3247
+ onlineReservations?: OnlineReservations;
3248
+ /** Reservation form settings. */
3249
+ reservationForm?: ReservationForm;
3250
+ /**
3251
+ * "My reservations" field details.
3252
+ *
3253
+ * These are the fields that appear in the "My reservations" section of the Table Reservations page on the restaurant's Wix site dashboard.
3254
+ */
3255
+ myReservationsFields?: MyReservationsField[];
3256
+ /** Table management settings. */
3257
+ tableManagement?: TableManagement;
3258
+ }
3259
+ interface GetReservationLocationRequest {
3260
+ /** ID of the ReservationLocation to retrieve. */
3261
+ reservationLocationId: string;
3262
+ /**
3263
+ * Array of named, predefined sets of projected fields to be returned.
3264
+ *
3265
+ * - `PUBLIC`: Returns `id`, `archived`, `location`, `default`, `configuration.onlineReservations.partiesSize`, `configuration.onlineReservations.minimumReservationNotice`, `configuration.onlineReservations.businessSchedule`,
3266
+ * `configuration.onlineReservations.showPhoneNumber`, `configuration.onlineReservations.onlineReservationsEnabled`, `configuration.onlineReservations.manualApproval`, `configuration.reservationForm.submitMessage`,
3267
+ * `configuration.reservationForm.policiesEnabled`, `configuration.reservationForm.termsAndConditions`, `configuration.reservationForm.privacyPolicy`,
3268
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
3269
+ * - `FULL`: Returns all fields.
3270
+ *
3271
+ * Default: `PUBLIC`.
3272
+ */
3273
+ fieldsets?: Set[];
3274
+ }
3275
+ declare enum Set {
3276
+ PUBLIC = "PUBLIC",
3277
+ FULL = "FULL"
3278
+ }
3279
+ interface GetReservationLocationResponse {
3280
+ /** The retrieved reservation location. */
3281
+ reservationLocation?: ReservationLocation;
3282
+ }
3283
+ interface UpdateReservationLocationRequest {
3284
+ /** ReservationLocation to be updated, may be partial. */
3285
+ reservationLocation: ReservationLocation;
3286
+ }
3287
+ interface UpdateReservationLocationResponse {
3288
+ /** The updated reservation location. */
3289
+ reservationLocation?: ReservationLocation;
3290
+ }
3291
+ interface QueryReservationLocationsRequest {
3292
+ /** Query options. */
3293
+ query: QueryV2;
3294
+ /**
3295
+ * Array of named, predefined sets of projected fields to be returned.
3296
+ *
3297
+ * - `PUBLIC`: Returns `id`, `archived`, `location`, `default`, `configuration.onlineReservations.partiesSize`, `configuration.onlineReservations.minimumReservationNotice`, `configuration.onlineReservations.businessSchedule`,
3298
+ * `configuration.onlineReservations.showPhoneNumber`, `configuration.onlineReservations.onlineReservationsEnabled`, `configuration.onlineReservations.manualApproval`, `configuration.reservationForm.submitMessage`,
3299
+ * `configuration.reservationForm.policiesEnabled`, `configuration.reservationForm.termsAndConditions`, `configuration.reservationForm.privacyPolicy`,
3300
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
3301
+ * - `FULL`: Returns all fields.
3302
+ *
3303
+ * Default: `PUBLIC`.
3304
+ */
3305
+ fieldsets?: Set[];
3306
+ }
3307
+ interface QueryV2 extends QueryV2PagingMethodOneOf {
3308
+ /** Paging options to limit and skip the number of items. */
3309
+ paging?: Paging;
3310
+ /** 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`. */
3311
+ cursorPaging?: CursorPaging;
3312
+ /**
3313
+ * Filter object in the following format:
3314
+ * `"filter" : {
3315
+ * "fieldName1": "value1",
3316
+ * "fieldName2":{"$operator":"value2"}
3317
+ * }`
3318
+ *
3319
+ * 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.
3320
+ * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
3321
+ */
3322
+ filter?: Record<string, any> | null;
3323
+ /**
3324
+ * Sort object in the following format:
3325
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
3326
+ */
3327
+ sort?: Sorting[];
3328
+ }
3329
+ /** @oneof */
3330
+ interface QueryV2PagingMethodOneOf {
3331
+ /** Paging options to limit and skip the number of items. */
3332
+ paging?: Paging;
3333
+ /** 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`. */
3334
+ cursorPaging?: CursorPaging;
3335
+ }
3336
+ interface Sorting {
3337
+ /** Name of the field to sort by. */
3338
+ fieldName?: string;
3339
+ /**
3340
+ * Sort order.
3341
+ *
3342
+ * Use `ASC` for ascending order or `DESC` for descending order. Defaults to `ASC`.
3343
+ */
3344
+ order?: SortOrder;
3345
+ }
3346
+ declare enum SortOrder {
3347
+ ASC = "ASC",
3348
+ DESC = "DESC"
3349
+ }
3350
+ interface Paging {
3351
+ /** Number of items to load. */
3352
+ limit?: number | null;
3353
+ /** Number of items to skip in the current sort order. */
3354
+ offset?: number | null;
3355
+ }
3356
+ interface CursorPaging {
3357
+ /** Number of items to load. */
3358
+ limit?: number | null;
3359
+ /**
3360
+ * Pointer to the next or previous page in the list of results.
3361
+ *
3362
+ * You can get the relevant cursor token
3363
+ * from the `pagingMetadata` object in the previous call's response.
3364
+ * Not relevant for the first request.
3365
+ */
3366
+ cursor?: string | null;
3367
+ }
3368
+ interface QueryReservationLocationsResponse {
3369
+ /** List of reservation locations */
3370
+ reservationLocations?: ReservationLocation[];
3371
+ /** Metadata for the paginated results. */
3372
+ pagingMetadata?: PagingMetadataV2;
3373
+ }
3374
+ interface PagingMetadataV2 {
3375
+ /** Offset that was requested. */
3376
+ offset?: number | null;
3377
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
3378
+ cursors?: Cursors;
3379
+ }
3380
+ interface Cursors {
3381
+ /** Cursor pointing to next page in the list of results. */
3382
+ next?: string | null;
3383
+ /** Cursor pointing to previous page in the list of results. */
3384
+ prev?: string | null;
3385
+ }
3386
+ interface ListReservationLocationsRequest {
3387
+ /** 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`. */
3388
+ paging?: CursorPaging;
3389
+ /** Sorting for the locations list. */
3390
+ sort?: Sorting;
3391
+ /**
3392
+ * Array of named, predefined sets of projected fields to be returned.
3393
+ *
3394
+ * - `PUBLIC`: Returns `id`, `archived`, `location`, `default`, `configuration.onlineReservations.partiesSize`, `configuration.onlineReservations.minimumReservationNotice`, `configuration.onlineReservations.businessSchedule`,
3395
+ * `configuration.onlineReservations.showPhoneNumber`, `configuration.onlineReservations.onlineReservationsEnabled`, `configuration.onlineReservations.manualApproval`, `configuration.reservationForm.submitMessage`,
3396
+ * `configuration.reservationForm.policiesEnabled`, `configuration.reservationForm.termsAndConditions`, `configuration.reservationForm.privacyPolicy`,
3397
+ * `configuration.reservationForm.customFieldDefinitions`, `configuration.reservationForm.lastNameRequired`, `configuration.reservationForm.emailRequired`, `configuration.reservationForm.emailMarketingCheckbox`.
3398
+ * - `FULL`: Returns all fields.
3399
+ *
3400
+ * Default: `PUBLIC`.
3401
+ */
3402
+ fieldsets?: Set[];
3403
+ }
3404
+ interface ListReservationLocationsResponse {
3405
+ /** Locations list. */
3406
+ reservationLocations?: ReservationLocation[];
3407
+ /** Metadata for the paginated results. */
3408
+ pagingMetadata?: CursorPagingMetadata;
3409
+ }
3410
+ interface CursorPagingMetadata {
3411
+ /** Number of items returned in the response. */
3412
+ count?: number | null;
3413
+ /** Offset that was requested. */
3414
+ cursors?: Cursors;
3415
+ /**
3416
+ * Indicates if there are more results after the current page.
3417
+ * If `true`, another page of results can be retrieved.
3418
+ * If `false`, this is the last page.
3419
+ */
3420
+ hasNext?: boolean | null;
3421
+ }
3422
+ interface GetReservationLocationResponseNonNullableFields {
3423
+ reservationLocation?: {
3424
+ configuration?: {
3425
+ onlineReservations?: {
3426
+ seatPacing?: {
3427
+ number: number;
3428
+ enabled: boolean;
3429
+ };
3430
+ partyPacing?: {
3431
+ number: number;
3432
+ enabled: boolean;
3433
+ };
3434
+ partySize?: {
3435
+ min: number;
3436
+ max: number;
3437
+ };
3438
+ minimumReservationNotice?: {
3439
+ number: number;
3440
+ unit: Unit;
3441
+ };
3442
+ turnoverTimeRules: {
3443
+ seatsMin: number;
3444
+ seatsMax: number;
3445
+ minutes: number;
3446
+ }[];
3447
+ businessSchedule?: {
3448
+ periods: {
3449
+ openDay: CommonDayOfWeek;
3450
+ openTime: string;
3451
+ closeDay: CommonDayOfWeek;
3452
+ closeTime: string;
3453
+ }[];
3454
+ specialHourPeriod: {
3455
+ startDate: string;
3456
+ endDate: string;
3457
+ isClosed: boolean;
3458
+ comment: string;
3459
+ }[];
3460
+ };
3461
+ manualApproval?: {
3462
+ partySizeThreshold: number;
3463
+ customApprovalsProviderId: string;
3464
+ enabled: boolean;
3465
+ };
3466
+ };
3467
+ reservationForm?: {
3468
+ termsAndConditions?: {
3469
+ url: string;
3470
+ enabled: boolean;
3471
+ };
3472
+ privacyPolicy?: {
3473
+ url: string;
3474
+ enabled: boolean;
3475
+ };
3476
+ customFieldDefinitions: {
3477
+ name: string;
3478
+ required: boolean;
3479
+ }[];
3480
+ emailMarketingCheckbox?: {
3481
+ enabled: boolean;
3482
+ checkedByDefault: boolean;
3483
+ };
3484
+ };
3485
+ myReservationsFields: {
3486
+ fieldType: FieldType;
3487
+ shown: boolean;
3488
+ }[];
3489
+ tableManagement?: {
3490
+ tableDefinitions: {
3491
+ name: string;
3492
+ seatsMin: number;
3493
+ seatsMax: number;
3494
+ }[];
3495
+ deletedTableDefinitions: {
3496
+ name: string;
3497
+ seatsMin: number;
3498
+ seatsMax: number;
3499
+ }[];
3500
+ tableCombinations: {
3501
+ seatsMin: number;
3502
+ seatsMax: number;
3503
+ }[];
3504
+ };
3505
+ };
3506
+ };
3507
+ }
3508
+ interface UpdateReservationLocationResponseNonNullableFields {
3509
+ reservationLocation?: {
3510
+ configuration?: {
3511
+ onlineReservations?: {
3512
+ seatPacing?: {
3513
+ number: number;
3514
+ enabled: boolean;
3515
+ };
3516
+ partyPacing?: {
3517
+ number: number;
3518
+ enabled: boolean;
3519
+ };
3520
+ partySize?: {
3521
+ min: number;
3522
+ max: number;
3523
+ };
3524
+ minimumReservationNotice?: {
3525
+ number: number;
3526
+ unit: Unit;
3527
+ };
3528
+ turnoverTimeRules: {
3529
+ seatsMin: number;
3530
+ seatsMax: number;
3531
+ minutes: number;
3532
+ }[];
3533
+ businessSchedule?: {
3534
+ periods: {
3535
+ openDay: CommonDayOfWeek;
3536
+ openTime: string;
3537
+ closeDay: CommonDayOfWeek;
3538
+ closeTime: string;
3539
+ }[];
3540
+ specialHourPeriod: {
3541
+ startDate: string;
3542
+ endDate: string;
3543
+ isClosed: boolean;
3544
+ comment: string;
3545
+ }[];
3546
+ };
3547
+ manualApproval?: {
3548
+ partySizeThreshold: number;
3549
+ customApprovalsProviderId: string;
3550
+ enabled: boolean;
3551
+ };
3552
+ };
3553
+ reservationForm?: {
3554
+ termsAndConditions?: {
3555
+ url: string;
3556
+ enabled: boolean;
3557
+ };
3558
+ privacyPolicy?: {
3559
+ url: string;
3560
+ enabled: boolean;
3561
+ };
3562
+ customFieldDefinitions: {
3563
+ name: string;
3564
+ required: boolean;
3565
+ }[];
3566
+ emailMarketingCheckbox?: {
3567
+ enabled: boolean;
3568
+ checkedByDefault: boolean;
3569
+ };
3570
+ };
3571
+ myReservationsFields: {
3572
+ fieldType: FieldType;
3573
+ shown: boolean;
3574
+ }[];
3575
+ tableManagement?: {
3576
+ tableDefinitions: {
3577
+ name: string;
3578
+ seatsMin: number;
3579
+ seatsMax: number;
3580
+ }[];
3581
+ deletedTableDefinitions: {
3582
+ name: string;
3583
+ seatsMin: number;
3584
+ seatsMax: number;
3585
+ }[];
3586
+ tableCombinations: {
3587
+ seatsMin: number;
3588
+ seatsMax: number;
3589
+ }[];
3590
+ };
3591
+ };
3592
+ };
3593
+ }
3594
+ interface QueryReservationLocationsResponseNonNullableFields {
3595
+ reservationLocations: {
3596
+ configuration?: {
3597
+ onlineReservations?: {
3598
+ seatPacing?: {
3599
+ number: number;
3600
+ enabled: boolean;
3601
+ };
3602
+ partyPacing?: {
3603
+ number: number;
3604
+ enabled: boolean;
3605
+ };
3606
+ partySize?: {
3607
+ min: number;
3608
+ max: number;
3609
+ };
3610
+ minimumReservationNotice?: {
3611
+ number: number;
3612
+ unit: Unit;
3613
+ };
3614
+ turnoverTimeRules: {
3615
+ seatsMin: number;
3616
+ seatsMax: number;
3617
+ minutes: number;
3618
+ }[];
3619
+ businessSchedule?: {
3620
+ periods: {
3621
+ openDay: CommonDayOfWeek;
3622
+ openTime: string;
3623
+ closeDay: CommonDayOfWeek;
3624
+ closeTime: string;
3625
+ }[];
3626
+ specialHourPeriod: {
3627
+ startDate: string;
3628
+ endDate: string;
3629
+ isClosed: boolean;
3630
+ comment: string;
3631
+ }[];
3632
+ };
3633
+ manualApproval?: {
3634
+ partySizeThreshold: number;
3635
+ customApprovalsProviderId: string;
3636
+ enabled: boolean;
3637
+ };
3638
+ };
3639
+ reservationForm?: {
3640
+ termsAndConditions?: {
3641
+ url: string;
3642
+ enabled: boolean;
3643
+ };
3644
+ privacyPolicy?: {
3645
+ url: string;
3646
+ enabled: boolean;
3647
+ };
3648
+ customFieldDefinitions: {
3649
+ name: string;
3650
+ required: boolean;
3651
+ }[];
3652
+ emailMarketingCheckbox?: {
3653
+ enabled: boolean;
3654
+ checkedByDefault: boolean;
3655
+ };
3656
+ };
3657
+ myReservationsFields: {
3658
+ fieldType: FieldType;
3659
+ shown: boolean;
3660
+ }[];
3661
+ tableManagement?: {
3662
+ tableDefinitions: {
3663
+ name: string;
3664
+ seatsMin: number;
3665
+ seatsMax: number;
3666
+ }[];
3667
+ deletedTableDefinitions: {
3668
+ name: string;
3669
+ seatsMin: number;
3670
+ seatsMax: number;
3671
+ }[];
3672
+ tableCombinations: {
3673
+ seatsMin: number;
3674
+ seatsMax: number;
3675
+ }[];
3676
+ };
3677
+ };
3678
+ }[];
3679
+ }
3680
+ interface ListReservationLocationsResponseNonNullableFields {
3681
+ reservationLocations: {
3682
+ configuration?: {
3683
+ onlineReservations?: {
3684
+ seatPacing?: {
3685
+ number: number;
3686
+ enabled: boolean;
3687
+ };
3688
+ partyPacing?: {
3689
+ number: number;
3690
+ enabled: boolean;
3691
+ };
3692
+ partySize?: {
3693
+ min: number;
3694
+ max: number;
3695
+ };
3696
+ minimumReservationNotice?: {
3697
+ number: number;
3698
+ unit: Unit;
3699
+ };
3700
+ turnoverTimeRules: {
3701
+ seatsMin: number;
3702
+ seatsMax: number;
3703
+ minutes: number;
3704
+ }[];
3705
+ businessSchedule?: {
3706
+ periods: {
3707
+ openDay: CommonDayOfWeek;
3708
+ openTime: string;
3709
+ closeDay: CommonDayOfWeek;
3710
+ closeTime: string;
3711
+ }[];
3712
+ specialHourPeriod: {
3713
+ startDate: string;
3714
+ endDate: string;
3715
+ isClosed: boolean;
3716
+ comment: string;
3717
+ }[];
3718
+ };
3719
+ manualApproval?: {
3720
+ partySizeThreshold: number;
3721
+ customApprovalsProviderId: string;
3722
+ enabled: boolean;
3723
+ };
3724
+ };
3725
+ reservationForm?: {
3726
+ termsAndConditions?: {
3727
+ url: string;
3728
+ enabled: boolean;
3729
+ };
3730
+ privacyPolicy?: {
3731
+ url: string;
3732
+ enabled: boolean;
3733
+ };
3734
+ customFieldDefinitions: {
3735
+ name: string;
3736
+ required: boolean;
3737
+ }[];
3738
+ emailMarketingCheckbox?: {
3739
+ enabled: boolean;
3740
+ checkedByDefault: boolean;
3741
+ };
3742
+ };
3743
+ myReservationsFields: {
3744
+ fieldType: FieldType;
3745
+ shown: boolean;
3746
+ }[];
3747
+ tableManagement?: {
3748
+ tableDefinitions: {
3749
+ name: string;
3750
+ seatsMin: number;
3751
+ seatsMax: number;
3752
+ }[];
3753
+ deletedTableDefinitions: {
3754
+ name: string;
3755
+ seatsMin: number;
3756
+ seatsMax: number;
3757
+ }[];
3758
+ tableCombinations: {
3759
+ seatsMin: number;
3760
+ seatsMax: number;
3761
+ }[];
3762
+ };
3763
+ };
3764
+ }[];
3765
+ }
3766
+
3767
+ type __PublicMethodMetaInfo$1<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
3768
+ getUrl: (context: any) => string;
3769
+ httpMethod: K;
3770
+ path: string;
3771
+ pathParams: M;
3772
+ __requestType: T;
3773
+ __originalRequestType: S;
3774
+ __responseType: Q;
3775
+ __originalResponseType: R;
3776
+ };
3777
+ declare function getReservationLocation(): __PublicMethodMetaInfo$1<'GET', {
3778
+ reservationLocationId: string;
3779
+ }, GetReservationLocationRequest, GetReservationLocationRequest$1, GetReservationLocationResponse & GetReservationLocationResponseNonNullableFields, GetReservationLocationResponse$1 & GetReservationLocationResponseNonNullableFields$1>;
3780
+ declare function updateReservationLocation(): __PublicMethodMetaInfo$1<'PATCH', {
3781
+ reservationLocationId: string;
3782
+ }, UpdateReservationLocationRequest, UpdateReservationLocationRequest$1, UpdateReservationLocationResponse & UpdateReservationLocationResponseNonNullableFields, UpdateReservationLocationResponse$1 & UpdateReservationLocationResponseNonNullableFields$1>;
3783
+ declare function queryReservationLocations(): __PublicMethodMetaInfo$1<'POST', {}, QueryReservationLocationsRequest, QueryReservationLocationsRequest$1, QueryReservationLocationsResponse & QueryReservationLocationsResponseNonNullableFields, QueryReservationLocationsResponse$1 & QueryReservationLocationsResponseNonNullableFields$1>;
3784
+ declare function listReservationLocations(): __PublicMethodMetaInfo$1<'GET', {}, ListReservationLocationsRequest, ListReservationLocationsRequest$1, ListReservationLocationsResponse & ListReservationLocationsResponseNonNullableFields, ListReservationLocationsResponse$1 & ListReservationLocationsResponseNonNullableFields$1>;
3785
+
3786
+ declare const meta$1_getReservationLocation: typeof getReservationLocation;
3787
+ declare const meta$1_listReservationLocations: typeof listReservationLocations;
3788
+ declare const meta$1_queryReservationLocations: typeof queryReservationLocations;
3789
+ declare const meta$1_updateReservationLocation: typeof updateReservationLocation;
3790
+ declare namespace meta$1 {
3791
+ export { type __PublicMethodMetaInfo$1 as __PublicMethodMetaInfo, meta$1_getReservationLocation as getReservationLocation, meta$1_listReservationLocations as listReservationLocations, meta$1_queryReservationLocations as queryReservationLocations, meta$1_updateReservationLocation as updateReservationLocation };
3792
+ }
3793
+
3794
+ interface TimeSlot$1 {
3795
+ /** Start date and time of this time slot. */
3796
+ startDate?: Date;
3797
+ /** Duration in minutes of this time slot. */
3798
+ duration?: number;
3799
+ /**
3800
+ * Availability status of this time slot.
3801
+ *
3802
+ * * `AVAILABLE`: The restaurant can accommodate a party of the given size in this time slot.
3803
+ * * `UNAVAILABLE`: The restaurant can't accommodate a party of the given size in this time slot.
3804
+ * * `NON_WORKING_HOURS`: The restaurant is not open during this time slot.
3805
+ */
3806
+ status?: Status$1;
3807
+ /** Whether manual approval is required to make a reservation in this time slot. */
3808
+ manualApproval?: boolean | null;
3809
+ }
3810
+ declare enum Status$1 {
3811
+ AVAILABLE = "AVAILABLE",
3812
+ UNAVAILABLE = "UNAVAILABLE",
3813
+ NON_WORKING_HOURS = "NON_WORKING_HOURS"
3814
+ }
3815
+ interface GetTimeSlotsRequest$1 {
3816
+ /** ID of the reservation location for which to retrieve time slots. */
3817
+ reservationLocationId: string;
3818
+ /** Date and time for which to retrieve a time slot. */
3819
+ date: Date;
3820
+ /**
3821
+ * Duration in minutes of the time slot.
3822
+ *
3823
+ * Min: `5`
3824
+ */
3825
+ duration?: number | null;
3826
+ /**
3827
+ * Size of the party that needs to be seated during this time slot.
3828
+ *
3829
+ * Min: `1`
3830
+ */
3831
+ partySize: number | null;
3832
+ /** The number of time slots to retrieve before the given `date`. */
3833
+ slotsBefore?: number | null;
3834
+ /** The number of time slots to retrieve after the given `date`. */
3835
+ slotsAfter?: number | null;
3836
+ }
3837
+ interface GetTimeSlotsResponse$1 {
3838
+ /** A list of time slots and their availability according to the given party size. */
3839
+ timeSlots?: TimeSlot$1[];
3840
+ }
3841
+ interface GetTimeSlotsResponseNonNullableFields$1 {
3842
+ timeSlots: {
3843
+ duration: number;
3844
+ status: Status$1;
3845
+ tableCombinations: {
3846
+ tableIds: string[];
3847
+ }[];
3848
+ }[];
3849
+ }
3850
+
3851
+ interface TimeSlot {
3852
+ /** Start date and time of this time slot. */
3853
+ startDate?: Date;
3854
+ /** Duration in minutes of this time slot. */
3855
+ duration?: number;
3856
+ /**
3857
+ * Availability status of this time slot.
3858
+ *
3859
+ * * `AVAILABLE`: The restaurant can accommodate a party of the given size in this time slot.
3860
+ * * `UNAVAILABLE`: The restaurant can't accommodate a party of the given size in this time slot.
3861
+ * * `NON_WORKING_HOURS`: The restaurant is not open during this time slot.
3862
+ */
3863
+ status?: Status;
3864
+ /** Whether manual approval is required to make a reservation in this time slot. */
3865
+ manualApproval?: boolean | null;
3866
+ }
3867
+ declare enum Status {
3868
+ AVAILABLE = "AVAILABLE",
3869
+ UNAVAILABLE = "UNAVAILABLE",
3870
+ NON_WORKING_HOURS = "NON_WORKING_HOURS"
3871
+ }
3872
+ interface GetTimeSlotsRequest {
3873
+ /** ID of the reservation location for which to retrieve time slots. */
3874
+ reservationLocationId: string;
3875
+ /** Date and time for which to retrieve a time slot. */
3876
+ date: Date;
3877
+ /**
3878
+ * Duration in minutes of the time slot.
3879
+ *
3880
+ * Min: `5`
3881
+ */
3882
+ duration?: number | null;
3883
+ /**
3884
+ * Size of the party that needs to be seated during this time slot.
3885
+ *
3886
+ * Min: `1`
3887
+ */
3888
+ partySize: number | null;
3889
+ /** The number of time slots to retrieve before the given `date`. */
3890
+ slotsBefore?: number | null;
3891
+ /** The number of time slots to retrieve after the given `date`. */
3892
+ slotsAfter?: number | null;
3893
+ }
3894
+ interface GetTimeSlotsResponse {
3895
+ /** A list of time slots and their availability according to the given party size. */
3896
+ timeSlots?: TimeSlot[];
3897
+ }
3898
+ interface GetTimeSlotsResponseNonNullableFields {
3899
+ timeSlots: {
3900
+ duration: number;
3901
+ status: Status;
3902
+ }[];
3903
+ }
3904
+
3905
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
3906
+ getUrl: (context: any) => string;
3907
+ httpMethod: K;
3908
+ path: string;
3909
+ pathParams: M;
3910
+ __requestType: T;
3911
+ __originalRequestType: S;
3912
+ __responseType: Q;
3913
+ __originalResponseType: R;
3914
+ };
3915
+ declare function getTimeSlots(): __PublicMethodMetaInfo<'POST', {}, GetTimeSlotsRequest, GetTimeSlotsRequest$1, GetTimeSlotsResponse & GetTimeSlotsResponseNonNullableFields, GetTimeSlotsResponse$1 & GetTimeSlotsResponseNonNullableFields$1>;
3916
+
3917
+ type meta___PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = __PublicMethodMetaInfo<K, M, T, S, Q, R>;
3918
+ declare const meta_getTimeSlots: typeof getTimeSlots;
3919
+ declare namespace meta {
3920
+ export { type meta___PublicMethodMetaInfo as __PublicMethodMetaInfo, meta_getTimeSlots as getTimeSlots };
3921
+ }
3922
+
3923
+ export { meta$1 as reservationLocations, meta$2 as reservations, meta as timeSlots };