@wix/auto_sdk_table-reservations_reservations 1.0.49 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +2 -2
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +3 -1
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/cjs/{table-reservations-v1-reservation-reservations.universal-CwPoYY9F.d.ts → table-reservations-v1-reservation-reservations.universal-Bpp4byAh.d.ts} +13 -0
  8. package/build/es/index.d.mts +2 -2
  9. package/build/es/index.mjs.map +1 -1
  10. package/build/es/index.typings.d.mts +2 -2
  11. package/build/es/index.typings.mjs.map +1 -1
  12. package/build/es/meta.d.mts +3 -1
  13. package/build/es/meta.mjs.map +1 -1
  14. package/build/es/{table-reservations-v1-reservation-reservations.universal-CwPoYY9F.d.mts → table-reservations-v1-reservation-reservations.universal-Bpp4byAh.d.mts} +13 -0
  15. package/build/internal/cjs/index.d.ts +2 -2
  16. package/build/internal/cjs/index.js.map +1 -1
  17. package/build/internal/cjs/index.typings.d.ts +2 -2
  18. package/build/internal/cjs/index.typings.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +3 -1
  20. package/build/internal/cjs/meta.js.map +1 -1
  21. package/build/internal/cjs/{table-reservations-v1-reservation-reservations.universal-CwPoYY9F.d.ts → table-reservations-v1-reservation-reservations.universal-Bpp4byAh.d.ts} +13 -0
  22. package/build/internal/es/index.d.mts +2 -2
  23. package/build/internal/es/index.mjs.map +1 -1
  24. package/build/internal/es/index.typings.d.mts +2 -2
  25. package/build/internal/es/index.typings.mjs.map +1 -1
  26. package/build/internal/es/meta.d.mts +3 -1
  27. package/build/internal/es/meta.mjs.map +1 -1
  28. package/build/internal/es/{table-reservations-v1-reservation-reservations.universal-CwPoYY9F.d.mts → table-reservations-v1-reservation-reservations.universal-Bpp4byAh.d.mts} +13 -0
  29. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/table-reservations-v1-reservation-reservations.public.ts","../../src/table-reservations-v1-reservation-reservations.universal.ts","../../src/table-reservations-v1-reservation-reservations.http.ts","../../src/table-reservations-v1-reservation-reservations.context.ts"],"sourcesContent":["export * from './src/table-reservations-v1-reservation-reservations.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkArchiveReservationsResponse,\n BulkUnarchiveReservationsResponse,\n CancelReservationApplicationErrors,\n CancelReservationOptions,\n CancelReservationResponse,\n CreateHeldReservationApplicationErrors,\n CreateHeldReservationResponse,\n CreateReservationApplicationErrors,\n CreateReservationOptions,\n CreateReservationValidationErrors,\n GetReservationOptions,\n HeldReservationDetails,\n ListReservationsOptions,\n ListReservationsResponse,\n QueryReservationsResponse,\n Reservation,\n ReservationCreatedEnvelope,\n ReservationDeletedEnvelope,\n ReservationQuery,\n ReservationSearch,\n ReservationUpdatedEnvelope,\n ReservationsQueryBuilder,\n ReserveReservationApplicationErrors,\n ReserveReservationResponse,\n Reservee,\n SearchReservationsResponse,\n UpdateReservation,\n UpdateReservationApplicationErrors,\n UpdateReservationOptions,\n UpdateReservationValidationErrors,\n bulkArchiveReservations as universalBulkArchiveReservations,\n bulkUnarchiveReservations as universalBulkUnarchiveReservations,\n cancelReservation as universalCancelReservation,\n createHeldReservation as universalCreateHeldReservation,\n createReservation as universalCreateReservation,\n deleteReservation as universalDeleteReservation,\n getReservation as universalGetReservation,\n listReservations as universalListReservations,\n queryReservations as universalQueryReservations,\n reserveReservation as universalReserveReservation,\n searchReservations as universalSearchReservations,\n typedQueryReservations as universalTypedQueryReservations,\n updateReservation as universalUpdateReservation,\n} from './table-reservations-v1-reservation-reservations.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/table-reservations' };\n\nexport function createReservation(\n httpClient: HttpClient\n): CreateReservationSignature {\n return (\n reservation: NonNullablePaths<\n Reservation,\n | `details`\n | `details.partySize`\n | `details.reservationLocationId`\n | `details.startDate`,\n 3\n >,\n options?: CreateReservationOptions\n ) =>\n universalCreateReservation(\n reservation,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateReservationSignature {\n /**\n * Creates a new reservation.\n *\n * `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.\n *\n * **Status and source**\n *\n * If a `status` is not provided, it will be set to:\n * * `RESERVED` if manual approval is not required for confirmation\n * * `REQUESTED` if manual approval is required for confirmation.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields will result in an error.\n *\n * **Permissions**\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.\n *\n *\n * > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.\n * @param - Reservation details.\n * @param - Options for creating the reservation.\n * @returns Reservation.\n */\n (\n reservation: NonNullablePaths<\n Reservation,\n | `details`\n | `details.partySize`\n | `details.reservationLocationId`\n | `details.startDate`,\n 3\n >,\n options?: CreateReservationOptions\n ): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: CreateReservationApplicationErrors;\n __validationErrorsType?: CreateReservationValidationErrors;\n }\n >;\n}\n\nexport function getReservation(\n httpClient: HttpClient\n): GetReservationSignature {\n return (reservationId: string, options?: GetReservationOptions) =>\n universalGetReservation(\n reservationId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetReservationSignature {\n /**\n * Retrieves a reservation.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @param - Reservation ID.\n * @returns Reservation.\n */\n (reservationId: string, options?: GetReservationOptions): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n >\n >;\n}\n\nexport function updateReservation(\n httpClient: HttpClient\n): UpdateReservationSignature {\n return (\n _id: string,\n reservation: NonNullablePaths<UpdateReservation, `revision`, 2>,\n options?: UpdateReservationOptions\n ) =>\n universalUpdateReservation(\n _id,\n reservation,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateReservationSignature {\n /**\n * Updates a reservation.\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites.\n * @param - Reservation ID.\n * @param - Options for updating the reservation.\n * @param - Reservation information to update.\n * @returns Reservation.\n */\n (\n _id: string,\n reservation: NonNullablePaths<UpdateReservation, `revision`, 2>,\n options?: UpdateReservationOptions\n ): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: UpdateReservationApplicationErrors;\n __validationErrorsType?: UpdateReservationValidationErrors;\n }\n >;\n}\n\nexport function createHeldReservation(\n httpClient: HttpClient\n): CreateHeldReservationSignature {\n return (\n reservationDetails: NonNullablePaths<\n HeldReservationDetails,\n `partySize` | `reservationLocationId` | `startDate`,\n 2\n >\n ) =>\n universalCreateHeldReservation(\n reservationDetails,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateHeldReservationSignature {\n /**\n * Creates a new temporary reservation and holds it for the customer for 10 minutes.\n *\n * Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.\n *\n * You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.\n *\n * If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.\n *\n * @param - Held reservation information to update.\n */\n (\n reservationDetails: NonNullablePaths<\n HeldReservationDetails,\n `partySize` | `reservationLocationId` | `startDate`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n CreateHeldReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CreateHeldReservationApplicationErrors;\n }\n >;\n}\n\nexport function reserveReservation(\n httpClient: HttpClient\n): ReserveReservationSignature {\n return (\n reservationId: string,\n reservee: NonNullablePaths<Reservee, `firstName` | `phone`, 2>,\n revision: string\n ) =>\n universalReserveReservation(\n reservationId,\n reservee,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ReserveReservationSignature {\n /**\n * Reserves or requests a held reservation.\n *\n * Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.\n *\n * They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.\n *\n * `Reserve Reservation` changes a reservation's `HELD` status to:\n * * `RESERVED` if the reservation's reservation location does not require manual approval.\n * * `REQUESTED` if the reservation's reservation location requires manual approval.\n * @param - Reservation ID.\n * @param - Reservee details.\n * @param - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n */\n (\n reservationId: string,\n reservee: NonNullablePaths<Reservee, `firstName` | `phone`, 2>,\n revision: string\n ): Promise<\n NonNullablePaths<\n ReserveReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: ReserveReservationApplicationErrors;\n }\n >;\n}\n\nexport function cancelReservation(\n httpClient: HttpClient\n): CancelReservationSignature {\n return (\n reservationId: string,\n revision: string,\n options?: CancelReservationOptions\n ) =>\n universalCancelReservation(\n reservationId,\n revision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CancelReservationSignature {\n /**\n * Cancels a reservation.\n *\n * Sets the reservation status to `CANCELED`.\n * @param - Reservation ID.\n * @param - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n * @param - Options for canceling the reservation.\n */\n (\n reservationId: string,\n revision: string,\n options?: CancelReservationOptions\n ): Promise<\n NonNullablePaths<\n CancelReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CancelReservationApplicationErrors;\n }\n >;\n}\n\nexport function deleteReservation(\n httpClient: HttpClient\n): DeleteReservationSignature {\n return (reservationId: string) =>\n universalDeleteReservation(\n reservationId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteReservationSignature {\n /**\n * Deletes a reservation. Only reservations with the `HELD` status can be deleted.\n * @param - Reservation ID.\n */\n (reservationId: string): Promise<void>;\n}\n\nexport function listReservations(\n httpClient: HttpClient\n): ListReservationsSignature {\n return (options?: ListReservationsOptions) =>\n universalListReservations(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListReservationsSignature {\n /**\n * Retrieves a list of up to 100 reservations.\n * @param - Options for listing the reservations.\n */\n (options?: ListReservationsOptions): Promise<\n NonNullablePaths<\n ListReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n >;\n}\n\nexport function queryReservations(\n httpClient: HttpClient\n): QueryReservationsSignature {\n return () =>\n universalQueryReservations(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryReservationsSignature {\n /**\n * Creates a query to retrieve a list of reservations.\n *\n * The `queryReservations()` function builds a query to retrieve a list of reservations and returns a `ReservationsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.\n *\n * You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.\n *\n * `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:\n *\n * * [`limit(50)`](/reservations/reservations-query-builder/limit)\n * * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)\n *\n * The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-result/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).\n */\n (): ReservationsQueryBuilder;\n}\n\nexport function typedQueryReservations(\n httpClient: HttpClient\n): TypedQueryReservationsSignature {\n return (query: ReservationQuery) =>\n universalTypedQueryReservations(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryReservationsSignature {\n /** */\n (query: ReservationQuery): Promise<\n NonNullablePaths<\n QueryReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n >;\n}\n\nexport function searchReservations(\n httpClient: HttpClient\n): SearchReservationsSignature {\n return (search: ReservationSearch) =>\n universalSearchReservations(\n search,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchReservationsSignature {\n /**\n * Use this method to search the fields of the table reservations on a site for a given expression.\n *\n * You can also use this method to perform data aggregations on a site's table reservation fields.\n * For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n * @param - Search query.\n */\n (search: ReservationSearch): Promise<\n NonNullablePaths<\n SearchReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.scalarDate.type`\n | `aggregationData.results.${number}.scalarDate.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 6\n >\n >;\n}\n\nexport function bulkArchiveReservations(\n httpClient: HttpClient\n): BulkArchiveReservationsSignature {\n return (reservationIds: string[]) =>\n universalBulkArchiveReservations(\n reservationIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkArchiveReservationsSignature {\n /**\n * Archives multiple reservations at once.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @param - IDs of reservations to archive.\n */\n (reservationIds: string[]): Promise<\n NonNullablePaths<\n BulkArchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkUnarchiveReservations(\n httpClient: HttpClient\n): BulkUnarchiveReservationsSignature {\n return (reservationIds: string[]) =>\n universalBulkUnarchiveReservations(\n reservationIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUnarchiveReservationsSignature {\n /**\n * Unarchives multiple reservations at once.\n * @param - Reservation IDs to unarchive.\n */\n (reservationIds: string[]): Promise<\n NonNullablePaths<\n BulkUnarchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport const onReservationCreated = EventDefinition(\n 'wix.table_reservations.v1.reservation_created',\n true,\n (event: ReservationCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.details.startDate' },\n { path: 'entity.details.endDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ReservationCreatedEnvelope>();\nexport const onReservationDeleted = EventDefinition(\n 'wix.table_reservations.v1.reservation_deleted',\n true,\n (event: ReservationDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'undefined.details.startDate' },\n { path: 'undefined.details.endDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ReservationDeletedEnvelope>();\nexport const onReservationUpdated = EventDefinition(\n 'wix.table_reservations.v1.reservation_updated',\n true,\n (event: ReservationUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.details.startDate' },\n { path: 'entity.details.endDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n { path: 'modifiedFields.details.startDate' },\n { path: 'modifiedFields.details.endDate' },\n ],\n },\n ])\n )\n)<ReservationUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n Aggregation,\n AggregationData,\n AggregationKindOneOf,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarDateResult,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkArchiveReservationsRequest,\n BulkArchiveReservationsResponse,\n BulkArchiveReservationsResult,\n BulkUnarchiveReservationsRequest,\n BulkUnarchiveReservationsResponse,\n BulkUnarchiveReservationsResult,\n CancelReservationOptions,\n CancelReservationRequest,\n CancelReservationResponse,\n Conflicts,\n ConflictsExperienceOptions,\n ConflictsOptionsOneOf,\n ConflictsStandardOptions,\n CreateGoogleReservationRequest,\n CreateGoogleReservationResponse,\n CreateHeldReservationRequest,\n CreateHeldReservationResponse,\n CreateReservationOptions,\n CreateReservationRequest,\n CreateReservationResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramAggregation,\n DateHistogramResult,\n DateHistogramResults,\n DeleteReservationRequest,\n DeleteReservationResponse,\n Details,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExperienceConflict,\n ExperienceConflictType,\n ExperienceOptions,\n ExperienceTableCombinationConflict,\n ExperienceTableCombinationConflictType,\n ExtendedFields,\n GetReservationOptions,\n GetReservationRequest,\n GetReservationResponse,\n GroupByValueResults,\n HeadersEntry,\n HeldReservationDetails,\n IdentificationData,\n IdentificationDataIdOneOf,\n IgnoreConflicts,\n IgnoreConflictsIgnoreConflictsOptionsOneOf,\n IgnoreConflictsType,\n IncludeMissingValuesOptions,\n Interval,\n ItemMetadata,\n ListReservationsOptions,\n ListReservationsRequest,\n ListReservationsResponse,\n MessageEnvelope,\n MigrationNote,\n MissingValues,\n Mode,\n NestedAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n NestedAggregationType,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NestedValueAggregationResult,\n PathParametersEntry,\n PaymentStatus,\n QueryParametersEntry,\n QueryReservationsRequest,\n QueryReservationsResponse,\n RangeAggregation,\n RangeAggregationResult,\n RangeBucket,\n RangeResult,\n RangeResults,\n RawHttpRequest,\n RawHttpResponse,\n RemoveReservationMigrationNotesRequest,\n RemoveReservationMigrationNotesResponse,\n Reservation,\n ReservationCanceled,\n ReservationCreated,\n ReservationCreatedEnvelope,\n ReservationDelayedDomainEvent,\n ReservationDelayedDomainEventBodyTypeOneOf,\n ReservationDelayedDomainEventReservationCanceled,\n ReservationDeletedEnvelope,\n ReservationDetailsConflicts,\n ReservationLocationConflict,\n ReservationLocationConflictType,\n ReservationQuerySpec,\n ReservationSearchSpec,\n ReservationUpdated,\n ReservationUpdatedEnvelope,\n ReservationsQueryBuilder,\n ReservationsQueryResult,\n ReserveReservationRequest,\n ReserveReservationResponse,\n ReservedBy,\n Reservee,\n RestoreInfo,\n Results,\n ScalarAggregation,\n ScalarDateResult,\n ScalarResult,\n ScalarType,\n SearchDetails,\n SearchReservationsRequest,\n SearchReservationsResponse,\n Set,\n SortDirection,\n SortOrder,\n SortType,\n Sorting,\n Source,\n StandardOptions,\n Status,\n TableCombinationConflict,\n TableCombinationConflictType,\n TableWithReservationConflicts,\n Tables,\n Type,\n UpdateReservation,\n UpdateReservationOptions,\n UpdateReservationRequest,\n UpdateReservationResponse,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n WebhookIdentityType,\n} from './table-reservations-v1-reservation-reservations.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n Search as SearchSdkType,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixTableReservationsV1Reservation from './table-reservations-v1-reservation-reservations.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** The reservation domain object. */\nexport interface Reservation {\n /**\n * Reservation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Status of the reservation.\n *\n * Supported values:\n *\n * * `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.\n * * `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.\n * * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.\n * * `RESERVED`: The reservation is confirmed.\n * * `SEATED`: The customer is currently occupying the table.\n * * `CANCELED`: The reservation is canceled.\n * * `NO_SHOW`: The customer didn't show up for their reservation.\n * * `FINISHED`: The reservation completed successfully.\n *\n *\n * 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.\n */\n status?: StatusWithLiterals;\n /**\n * Reservation source.\n *\n * This indicates how the reservation was made.\n */\n source?: SourceWithLiterals;\n /** Reservation details. */\n details?: Details;\n /**\n * Information about the person the reservation is being made for.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields results in an error.\n */\n reservee?: Reservee;\n /**\n * Information about the person making the reservation.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @readonly\n */\n reservedBy?: ReservedBy;\n /**\n * Team message.\n *\n * A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.\n * @maxLength 10000\n */\n teamMessage?: string | null;\n /**\n * Date and time the reservation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the reservation was changed.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the reservation is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the reservation.\n *\n * Ignored when creating a reservation.\n * @readonly\n */\n revision?: string | null;\n /**\n * The reason the reservation was declined.\n * @maxLength 1000\n */\n declineReason?: string | null;\n /**\n * Payment status.\n * @readonly\n */\n paymentStatus?: PaymentStatusWithLiterals;\n /**\n * Custom field data for the reservation object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Whether the reservation is archived.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @readonly\n */\n archived?: boolean | null;\n}\n\n/** Tables used for the reservation. If you don't specify a `tables` object, the server attempts to assign tables automatically. */\nexport interface Tables {\n /**\n * IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned.\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport enum Status {\n /** Undefined reservation status. */\n UNKNOWN = 'UNKNOWN',\n /** A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request. */\n HELD = 'HELD',\n /** The reservation is confirmed. */\n RESERVED = 'RESERVED',\n /** The reservation is canceled. */\n CANCELED = 'CANCELED',\n /** The reservation completed successfully. */\n FINISHED = 'FINISHED',\n /** The customer didn't show up for their reservation. */\n NO_SHOW = 'NO_SHOW',\n /** The customer is currently occupying the table. */\n SEATED = 'SEATED',\n /** 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. */\n REQUESTED = 'REQUESTED',\n /** The restaurant’s owner or staff declined the customer’s request to make the reservation. */\n DECLINED = 'DECLINED',\n PAYMENT_PENDING = 'PAYMENT_PENDING',\n /** The reservation is awaiting payment. It will expire in 10 minutes from the created time unless the customer provides payment information. This phase temporarily reserves the required number of seats and tables for the given party size at the chosen time. */\n PAYMENT_INFORMATION_PENDING = 'PAYMENT_INFORMATION_PENDING',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'HELD'\n | 'RESERVED'\n | 'CANCELED'\n | 'FINISHED'\n | 'NO_SHOW'\n | 'SEATED'\n | 'REQUESTED'\n | 'DECLINED'\n | 'PAYMENT_PENDING'\n | 'PAYMENT_INFORMATION_PENDING';\n\nexport enum Source {\n /** Undefined reservation source. */\n UNKNOWN = 'UNKNOWN',\n /** The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. */\n OFFLINE = 'OFFLINE',\n /** The reservation was made through a website or app. */\n ONLINE = 'ONLINE',\n /** The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. */\n WALK_IN = 'WALK_IN',\n}\n\n/** @enumType */\nexport type SourceWithLiterals =\n | Source\n | 'UNKNOWN'\n | 'OFFLINE'\n | 'ONLINE'\n | 'WALK_IN';\n\n/** Reservation details. */\nexport interface Details {\n /**\n * ID of the reservation location at which this reservation will be made.\n * @format GUID\n */\n reservationLocationId?: string | null;\n /**\n * IDs of tables used for this reservation.\n * @format GUID\n * @maxSize 100\n * @deprecated\n * @replacedBy tables\n * @targetRemovalDate 2024-12-31\n */\n tableIds?: string[] | null;\n /** Tables used for this reservation. */\n tables?: Tables;\n /** Start date and time of the reservation. */\n startDate?: Date | null;\n /** End date and time of the reservation. */\n endDate?: Date | null;\n /**\n * Party size.\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n}\n\n/** The person the reservation is being made for. */\nexport interface Reservee {\n /**\n * First name.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @maxLength 1000\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 1000\n */\n lastName?: string | null;\n /**\n * Email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Phone number.\n *\n * This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `\"+972555555555\"`.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @format PHONE\n */\n phone?: string | null;\n /** Whether the reservee has given marketing consent. */\n marketingConsent?: boolean | null;\n /**\n * Custom fields for the reservee in key-value pairs.\n *\n * 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\"`.\n *\n * Empty fields are not returned.\n */\n customFields?: Record<string, any> | null;\n /**\n * Contact ID. If a contact with this ID does not exist on the site, one will be created.\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n}\n\n/** A person making reservation. */\nexport interface ReservedBy {\n /**\n * 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.\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n}\n\n/** Migration note. */\nexport interface MigrationNote {}\n\n/** Table with reservation conflicts. */\nexport interface TableWithReservationConflicts {\n /**\n * Table id.\n * @format GUID\n */\n tableId?: string;\n /**\n * List of reservation ids.\n * @format GUID\n * @maxSize 1000\n */\n reservationIds?: string[];\n}\n\nexport enum PaymentStatus {\n /** Undefined payment status. */\n UNKNOWN = 'UNKNOWN',\n /** A reservation is free of charge. */\n FREE = 'FREE',\n /** Payment is not received yet. */\n NOT_PAID = 'NOT_PAID',\n /** The corresponding reservation order was fully paid. */\n PAID = 'PAID',\n /** The corresponding reservation order was refunded, but the refund amount is less than the order total price. */\n PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED',\n /** The corresponding reservation order was fully refunded. The refund amount equals the total price. */\n FULLY_REFUNDED = 'FULLY_REFUNDED',\n /** The corresponding reservation order was partially paid. */\n PARTIALLY_PAID = 'PARTIALLY_PAID',\n}\n\n/** @enumType */\nexport type PaymentStatusWithLiterals =\n | PaymentStatus\n | 'UNKNOWN'\n | 'FREE'\n | 'NOT_PAID'\n | 'PAID'\n | 'PARTIALLY_REFUNDED'\n | 'FULLY_REFUNDED'\n | 'PARTIALLY_PAID';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ReservationDelayedDomainEvent\n extends ReservationDelayedDomainEventBodyTypeOneOf {\n /** Body of a created reservation event. */\n reservationCreated?: ReservationCreated;\n /** Body of a updated reservation event. */\n reservationUpdated?: ReservationUpdated;\n /** Body of a canceled reservation event. */\n reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;\n}\n\n/** @oneof */\nexport interface ReservationDelayedDomainEventBodyTypeOneOf {\n /** Body of a created reservation event. */\n reservationCreated?: ReservationCreated;\n /** Body of a updated reservation event. */\n reservationUpdated?: ReservationUpdated;\n /** Body of a canceled reservation event. */\n reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;\n}\n\nexport interface ReservationCreated {\n /** Created reservation. */\n createdReservation?: Reservation;\n}\n\nexport interface ReservationUpdated {\n /** Updated reservation. */\n updatedReservation?: Reservation;\n /** Modified fields of previous entity */\n modifiedFields?: Record<string, any>;\n}\n\nexport interface ReservationDelayedDomainEventReservationCanceled {\n /** Canceled reservation. */\n canceledReservation?: Reservation;\n}\n\nexport interface CreateReservationRequest {\n /** Reservation details. */\n reservation: Reservation;\n /**\n * If creation is forced.\n * @deprecated If creation is forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * * `\"OFFLINE_ONLY\"`: The restaurant does not allow online reservations.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"PARTY_PACING\"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.\n * * `\"SEAT_PACING\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\nexport enum TableCombinationConflictType {\n /** Undefined conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** One or more of the chosen tables are already reserved. */\n RESERVED = 'RESERVED',\n /** The party is too big for the selected table. */\n TOO_BIG = 'TOO_BIG',\n /** The party is too small for the selected table. */\n TOO_SMALL = 'TOO_SMALL',\n /** The restaurant does not allow online reservations. */\n OFFLINE_ONLY = 'OFFLINE_ONLY',\n}\n\n/** @enumType */\nexport type TableCombinationConflictTypeWithLiterals =\n | TableCombinationConflictType\n | 'UNKNOWN'\n | 'RESERVED'\n | 'TOO_BIG'\n | 'TOO_SMALL'\n | 'OFFLINE_ONLY';\n\nexport enum ReservationLocationConflictType {\n /** Undefined reservation location conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** The restaurant cannot accommodate a party of the given size according to party pacing settings. */\n PARTY_PACING = 'PARTY_PACING',\n /** The required number of seats are unavailable according to seat pacing settings. */\n SEAT_PACING = 'SEAT_PACING',\n}\n\n/** @enumType */\nexport type ReservationLocationConflictTypeWithLiterals =\n | ReservationLocationConflictType\n | 'UNKNOWN'\n | 'PARTY_PACING'\n | 'SEAT_PACING';\n\nexport interface IgnoreConflicts\n extends IgnoreConflictsIgnoreConflictsOptionsOneOf {\n /** Conflicts to ignore for standard reservations. */\n standardOptions?: StandardOptions;\n /** Conflicts to ignore for experiences. */\n experienceOptions?: ExperienceOptions;\n /** Types of conflicts to ignore. */\n ignoreConflictsType?: IgnoreConflictsTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IgnoreConflictsIgnoreConflictsOptionsOneOf {\n /** Conflicts to ignore for standard reservations. */\n standardOptions?: StandardOptions;\n /** Conflicts to ignore for experiences. */\n experienceOptions?: ExperienceOptions;\n}\n\nexport enum ExperienceTableCombinationConflictType {\n /** Undefined conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** One or more of the chosen tables are already reserved. */\n RESERVED = 'RESERVED',\n /** The party is too big for the selected table. */\n TOO_BIG = 'TOO_BIG',\n /** The party is too small for the selected table. */\n TOO_SMALL = 'TOO_SMALL',\n}\n\n/** @enumType */\nexport type ExperienceTableCombinationConflictTypeWithLiterals =\n | ExperienceTableCombinationConflictType\n | 'UNKNOWN'\n | 'RESERVED'\n | 'TOO_BIG'\n | 'TOO_SMALL';\n\nexport enum ExperienceConflictType {\n /** Undefined reservation location conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** The number of guests exceeds the allowed limit. */\n MAXIMUM_NUMBER_OF_GUESTS = 'MAXIMUM_NUMBER_OF_GUESTS',\n}\n\n/** @enumType */\nexport type ExperienceConflictTypeWithLiterals =\n | ExperienceConflictType\n | 'UNKNOWN'\n | 'MAXIMUM_NUMBER_OF_GUESTS';\n\nexport enum IgnoreConflictsType {\n UNKNOWN_IGNORE_CONFLICTS_TYPE = 'UNKNOWN_IGNORE_CONFLICTS_TYPE',\n STANDARD = 'STANDARD',\n EXPERIENCE = 'EXPERIENCE',\n}\n\n/** @enumType */\nexport type IgnoreConflictsTypeWithLiterals =\n | IgnoreConflictsType\n | 'UNKNOWN_IGNORE_CONFLICTS_TYPE'\n | 'STANDARD'\n | 'EXPERIENCE';\n\nexport interface StandardOptions {\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * * `\"OFFLINE_ONLY\"`: The restaurant does not allow online reservations.\n * @maxSize 4\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"PARTY_PACING\"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.\n * * `\"SEAT_PACING\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 2\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n}\n\nexport interface ExperienceOptions {\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * @maxSize 3\n */\n ignoreTableCombinationConflicts?: ExperienceTableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored experience conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"MAX_NUMBER_OF_GUESTS\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 1\n */\n ignoreExperienceConflicts?: ExperienceConflictTypeWithLiterals[];\n}\n\nexport interface CreateReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface ReservationDetailsConflicts {\n /**\n * Table combinations conflicts.\n * @maxSize 10\n * @deprecated\n * @replacedBy conflicts\n * @targetRemovalDate 2025-12-05\n */\n tableCombinationConflicts?: TableCombinationConflict[];\n /**\n * Reservation location conflicts.\n * @maxSize 10\n * @deprecated\n * @replacedBy conflicts\n * @targetRemovalDate 2025-12-05\n */\n reservationLocationConflicts?: ReservationLocationConflict[];\n /** Conflicts. */\n conflicts?: Conflicts;\n}\n\nexport interface TableCombinationConflict {\n /** Conflict type. */\n type?: TableCombinationConflictTypeWithLiterals;\n}\n\nexport interface ReservationLocationConflict {\n /** Reservation location conflict type. */\n type?: ReservationLocationConflictTypeWithLiterals;\n}\n\nexport interface ExperienceTableCombinationConflict {\n /** Conflict type. */\n type?: ExperienceTableCombinationConflictTypeWithLiterals;\n}\n\nexport interface ExperienceConflict {\n /** Experience conflict type. */\n type?: ExperienceConflictTypeWithLiterals;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n STANDARD = 'STANDARD',\n EXPERIENCE = 'EXPERIENCE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'STANDARD'\n | 'EXPERIENCE';\n\nexport interface ConflictsStandardOptions {\n /**\n * Table combinations conflicts.\n * @maxSize 10\n */\n tableCombinationConflicts?: TableCombinationConflict[];\n /**\n * Reservation location conflicts.\n * @maxSize 10\n */\n reservationLocationConflicts?: ReservationLocationConflict[];\n}\n\nexport interface ConflictsExperienceOptions {\n /**\n * Experience table combination conflicts.\n * @maxSize 10\n */\n experienceTableCombinationConflicts?: ExperienceTableCombinationConflict[];\n /**\n * Experience conflicts.\n * @maxSize 10\n */\n experienceConflicts?: ExperienceConflict[];\n}\n\nexport interface Conflicts extends ConflictsOptionsOneOf {\n standardOptions?: ConflictsStandardOptions;\n experienceOptions?: ConflictsExperienceOptions;\n /** Conflict type. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ConflictsOptionsOneOf {\n standardOptions?: ConflictsStandardOptions;\n experienceOptions?: ConflictsExperienceOptions;\n}\n\nexport interface CreateGoogleReservationRequest {\n /** Reservation details. */\n reservation?: Reservation;\n}\n\nexport interface CreateGoogleReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface GetReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n /**\n * Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @deprecated Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @replacedBy fieldsets\n * @targetRemovalDate 2023-11-01\n */\n fieldSet?: SetWithLiterals;\n /**\n * Array of named, predefined sets of projected fields to be returned.\n *\n * Supported values: `PUBLIC`, `FULL`.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @maxSize 1\n * @deprecated Array of named, predefined sets of projected fields to be returned.\n * Default: If `fields` is omitted from the request, `PUBLIC`.\n * @targetRemovalDate 2025-06-26\n */\n fieldsets?: SetWithLiterals[];\n}\n\nexport enum Set {\n /** Returns `id`, `status`, `details.reservationLocationId`, `details.experienceId`, `details.startDate`, `details.endDate`, `details.partySize`, `createdDate`, `revision`, `declineReason`, `paymentStatus`. */\n PUBLIC = 'PUBLIC',\n /** Returns all fields. */\n FULL = 'FULL',\n}\n\n/** @enumType */\nexport type SetWithLiterals = Set | 'PUBLIC' | 'FULL';\n\nexport interface GetReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface UpdateReservationRequest {\n /** Reservation information to update. */\n reservation: Reservation;\n /**\n * If update should be forced.\n * @deprecated If update should be forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * 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.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\nexport interface UpdateReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface CreateHeldReservationRequest {\n /** Held reservation information to update. */\n reservationDetails: HeldReservationDetails;\n}\n\n/** Reservation details when create reservation in status HELD. */\nexport interface HeldReservationDetails {\n /**\n * ID of the reservation location where the reservation is made.\n * @format GUID\n */\n reservationLocationId?: string | null;\n /** Start date and time of the reservation. */\n startDate?: Date | null;\n /**\n * Party size.\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n}\n\nexport interface CreateHeldReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface ReserveReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n /** Reservee details. */\n reservee: Reservee;\n /**\n * Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n */\n revision: string | null;\n}\n\nexport interface ReserveReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface CancelReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n /**\n * Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n */\n revision: string | null;\n /**\n * The phone number that was provided when the reservation was created.\n *\n * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.\n * @format PHONE\n */\n phone?: string | null;\n}\n\nexport interface CancelReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface ReservationCanceled {\n /** Reserved reservation. */\n reservation?: Reservation;\n}\n\nexport interface DeleteReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n}\n\nexport interface DeleteReservationResponse {}\n\nexport interface ListReservationsRequest {\n /** 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`. */\n paging?: CursorPaging;\n /** Defines how reservations in the response are sorted. */\n sort?: Sorting;\n /** Only reservations starting after this date are returned. */\n startDateFrom?: Date | null;\n /** Only reservations starting before this date are returned. */\n startDateTo?: Date | null;\n /** Only reservations with this status are returned. */\n status?: StatusWithLiterals;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface Sorting {\n /** Name of the field to sort by. */\n fieldName?: string;\n /**\n * Sort order.\n * Default: `ASC`.\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Sort by ascending order. */\n ASC = 'ASC',\n /** Sort by descending order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface ListReservationsResponse {\n /** List of reservations. */\n reservations?: Reservation[];\n /** Metadata for the paginated results. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface QueryReservationsRequest {\n /** Query to select reservations. */\n query: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface QueryReservationsResponse {\n /** List of reservations. */\n reservations?: Reservation[];\n /** Metadata for the paginated results. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface SearchReservationsRequest {\n /** Search query. */\n search: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /** Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 100\n */\n sort?: Sorting[];\n /**\n * A search method for grouping data into various categories (facets) and providing summaries for each category.\n * For example, use aggregations to allow site visitors to narrow down their search results by selecting specific reservation statuses, party sizes, etc.\n * @maxSize 100\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format.\n * @maxLength 100\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /** Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Aggregation extends AggregationKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\n * For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`.\n */\n nested?: NestedAggregation;\n /** @maxLength 1000 */\n name?: string | null;\n type?: AggregationTypeWithLiterals;\n /** @maxLength 1000 */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\n * For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`.\n */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if `to` is not provided. */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if `from` is not provided. */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Sort by number of matches. */\n COUNT = 'COUNT',\n /** Sort by value of the field alphabetically. */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Sort in descending order. */\n DESC = 'DESC',\n /** Sort in ascending order. */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Exclude missing values from the aggregation results */\n EXCLUDE = 'EXCLUDE',\n /** Include missing values in the aggregation results */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Specify a custom name for the bucket containing the missing values. Defaults are \"N/A\" for strings, \"0\" for integers, and \"false\" for booleans.\n * @maxLength 1000\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n /** Undefined scalar type. */\n UNKNOWN_SCALAR_TYPE = 'UNKNOWN_SCALAR_TYPE',\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'UNKNOWN_SCALAR_TYPE'\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport enum NestedAggregationType {\n /** Undefined aggregation type. */\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - such as min, max, sum, and avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n | NestedAggregationType\n | 'UNKNOWN_AGGREGATION_TYPE'\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n /** Options for including missing values in results. */\n includeOptions?: IncludeMissingValuesOptions;\n /** Whether to sort by the number of matches or the value of the field. */\n sortType?: SortTypeWithLiterals;\n /** Whether to sort in ascending or descending order. */\n sortDirection?: SortDirectionWithLiterals;\n /**\n * Number of aggregation results to return.\n * Min: `1`\n * Max: `250`\n * Default: `10`\n */\n limit?: number | null;\n /**\n * Whether missing values should be included or excluded from the aggregation results.\n * Default: `EXCLUDE`.\n */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values in results. */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport interface RangeAggregation {\n /**\n * List of range buckets. During aggregation each entity will be placed in the first bucket its value falls into based on the provided range bounds.\n * @maxSize 1000\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Operation type for the scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for date histogram aggregation. */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n UNKNOWN_INTERVAL = 'UNKNOWN_INTERVAL',\n YEAR = 'YEAR',\n MONTH = 'MONTH',\n WEEK = 'WEEK',\n DAY = 'DAY',\n HOUR = 'HOUR',\n MINUTE = 'MINUTE',\n SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n | Interval\n | 'UNKNOWN_INTERVAL'\n | 'YEAR'\n | 'MONTH'\n | 'WEEK'\n | 'DAY'\n | 'HOUR'\n | 'MINUTE'\n | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * Aggregation name displayed in the return.\n * @maxLength 1000\n */\n name?: string | null;\n /** Type of aggregation to perform. */\n type?: NestedAggregationTypeWithLiterals;\n /** Field to aggregate by. */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n /** Undefined aggregation type. */\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - such as min, max, sum, or avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within the previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'UNKNOWN_AGGREGATION_TYPE'\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each aggregation is nested within the previous one.\n * @minSize 2\n * @maxSize 10\n */\n nestedAggregations?: NestedAggregationItem[];\n}\n\nexport interface SearchDetails {\n /** Boolean search mode. Defines how separate search terms in the `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search in.\n *\n * Searchable fields are `reservee.firstName`, `reservee.lastName`, `reservee.phone`, and `reservee.email`.\n *\n * If the array is empty, all fields are searched.\n * @maxSize 100\n * @maxLength 1000\n */\n fields?: string[];\n /**\n * Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.\n * The search function uses an algorithm to find results that are close to what the site visitor typed.\n */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Returns instances where any terms in the expression occur. */\n OR = 'OR',\n /** Returns instances where all the terms in the expression occur. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface SearchReservationsResponse {\n /** List of Reservations. */\n reservations?: Reservation[];\n /** Cursor paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data. */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * List of the aggregated data results.\n * @maxSize 1000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in the range. */\n count?: number;\n}\n\nexport interface NestedAggregationResults\n extends NestedAggregationResultsResultOneOf {\n /** List of the value aggregation results. */\n values?: ValueResults;\n /** List of the range aggregation results. */\n ranges?: RangeResults;\n /** List of the scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /**\n * Aggregation name defined in the request.\n * @maxLength 1000\n */\n name?: string;\n /** Type of aggregation performed. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field the data was aggregated by.\n * @maxLength 1000\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationResultsResultOneOf {\n /** List of the value aggregation results. */\n values?: ValueResults;\n /** List of the range aggregation results. */\n ranges?: RangeResults;\n /** List of the scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n}\n\nexport interface ValueResults {\n /**\n * List of value aggregations.\n * @maxSize 1000\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in same order as requested.\n * @maxSize 1000\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedValueAggregationResult {\n /** @maxLength 1000 */\n value?: string;\n nestedResults?: NestedAggregationResults;\n}\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in the range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Scalar aggregation results. */\n value?: number;\n}\n\nexport interface ScalarDateResult {\n /**\n * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n * @maxLength 100\n */\n value?: string;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation results. */\n value?: ValueResult;\n /** Range aggregation results. */\n range?: RangeResult;\n /** Scalar aggregation results. */\n scalar?: ScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: ValueResult;\n /** Scalar date aggregation result. */\n scalarDate?: ScalarDateResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation results. */\n value?: ValueResult;\n /** Range aggregation results. */\n range?: RangeResult;\n /** Scalar aggregation results. */\n scalar?: ScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: ValueResult;\n /** Scalar date aggregation result. */\n scalarDate?: ScalarDateResult;\n}\n\nexport interface Results {\n /** List of nested aggregation results. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in ISO 8601 format.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities in the interval. */\n count?: number;\n}\n\n/** deprecated */\nexport interface GroupByValueResults {\n /** @maxSize 1000 */\n results?: NestedValueAggregationResult[];\n}\n\nexport interface DateHistogramResults {\n /**\n * List of date histogram aggregations.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form.\n * Aggregations in the resulting array are keyed by the requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregation results.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResultsScalarDateResult {\n /** Type of scalar date aggregation. Possible values: `MIN`, `MAX`. */\n type?: ScalarTypeWithLiterals;\n /**\n * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n * @maxLength 100\n */\n value?: string;\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** deprecated */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /** Date aggregation results. */\n scalarDate?: AggregationResultsScalarDateResult;\n /**\n * Aggregation name defined in the request.\n * @maxLength 1000\n */\n name?: string;\n /** Type of aggregation that was performed. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field the data was aggregated by.\n * @maxLength 1000\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** deprecated */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /** Date aggregation results. */\n scalarDate?: AggregationResultsScalarDateResult;\n}\n\nexport interface BulkArchiveReservationsRequest {\n /**\n * IDs of reservations to archive.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n reservationIds: string[];\n}\n\nexport interface BulkArchiveReservationsResponse {\n /**\n * Result of bulk archive action\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkArchiveReservationsResult[];\n /** Metadata for the API call. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkArchiveReservationsResult {\n /** Metadata about archiving the reservation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUnarchiveReservationsRequest {\n /**\n * Reservation IDs to unarchive.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n reservationIds: string[];\n}\n\nexport interface BulkUnarchiveReservationsResponse {\n /**\n * Result of bulk unarchive action\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUnarchiveReservationsResult[];\n /** Metadata for the API call. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUnarchiveReservationsResult {\n /** Metadata about unarchiving the reservation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n /** Information about the reservation that was created and event metadata. */\n createdEvent?: EntityCreatedEvent;\n /** Information about the reservation that was updated and event metadata. */\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface RemoveReservationMigrationNotesRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId?: string;\n /** Revision. */\n revision?: string;\n}\n\nexport interface RemoveReservationMigrationNotesResponse {\n reservation?: Reservation;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateReservationApplicationErrors = {\n code?: 'TIME_NOT_AVAILABLE';\n description?: string;\n data?: ReservationDetailsConflicts;\n};\n/** @docsIgnore */\nexport type CreateReservationValidationErrors = {\n ruleName?: 'RESERVATION_VIOLATION';\n};\n/** @docsIgnore */\nexport type UpdateReservationApplicationErrors = {\n code?: 'TIME_NOT_AVAILABLE';\n description?: string;\n data?: ReservationDetailsConflicts;\n};\n/** @docsIgnore */\nexport type UpdateReservationValidationErrors = {\n ruleName?: 'RESERVATION_VIOLATION';\n};\n/** @docsIgnore */\nexport type CreateHeldReservationApplicationErrors = {\n code?: 'MUST_BE_PREMIUM';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ReserveReservationApplicationErrors =\n | {\n code?: 'MUST_BE_PREMIUM';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAN_NOT_BE_UPDATED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CancelReservationApplicationErrors =\n | {\n code?: 'PHONE_NUMBER_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_NUMBER_INCORRECT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAN_NOT_BE_UPDATED';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface ReservationCreatedEnvelope {\n entity: Reservation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reservation is created.\n * @permissionScope Manage Reservations (Medium)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM\n * @permissionScope Manage Reservations (Full)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @webhook\n * @eventType wix.table_reservations.v1.reservation_created\n * @serviceIdentifier wix.table_reservations.reservation.v1.ReservationsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onReservationCreated(\n handler: (event: ReservationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ReservationDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reservation is deleted.\n * @permissionScope Manage Reservations (Medium)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM\n * @permissionScope Manage Reservations (Full)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @webhook\n * @eventType wix.table_reservations.v1.reservation_deleted\n * @serviceIdentifier wix.table_reservations.reservation.v1.ReservationsService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onReservationDeleted(\n handler: (event: ReservationDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ReservationUpdatedEnvelope {\n entity: Reservation;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a reservation is canceled.\n * @permissionScope Manage Reservations (Medium)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM\n * @permissionScope Manage Reservations (Full)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @webhook\n * @eventType wix.table_reservations.v1.reservation_updated\n * @serviceIdentifier wix.table_reservations.reservation.v1.ReservationsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onReservationUpdated(\n handler: (event: ReservationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new reservation.\n *\n * `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.\n *\n * **Status and source**\n *\n * If a `status` is not provided, it will be set to:\n * * `RESERVED` if manual approval is not required for confirmation\n * * `REQUESTED` if manual approval is required for confirmation.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields will result in an error.\n *\n * **Permissions**\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.\n *\n *\n * > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.\n * @param reservation - Reservation details.\n * @public\n * @documentationMaturity preview\n * @requiredField reservation\n * @requiredField reservation.details\n * @requiredField reservation.details.partySize\n * @requiredField reservation.details.reservationLocationId\n * @requiredField reservation.details.startDate\n * @param options - Options for creating the reservation.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE_FORCE\n * @applicableIdentity APP\n * @returns Reservation.\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.CreateReservation\n */\nexport async function createReservation(\n reservation: NonNullablePaths<\n Reservation,\n | `details`\n | `details.partySize`\n | `details.reservationLocationId`\n | `details.startDate`,\n 3\n >,\n options?: CreateReservationOptions\n): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: CreateReservationApplicationErrors;\n __validationErrorsType?: CreateReservationValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservation: reservation,\n force: options?.force,\n ignoreTableCombinationConflicts: options?.ignoreTableCombinationConflicts,\n ignoreReservationLocationConflicts:\n options?.ignoreReservationLocationConflicts,\n ignoreConflicts: options?.ignoreConflicts,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.createReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reservation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservation: '$[0]',\n force: '$[1].force',\n ignoreTableCombinationConflicts:\n '$[1].ignoreTableCombinationConflicts',\n ignoreReservationLocationConflicts:\n '$[1].ignoreReservationLocationConflicts',\n ignoreConflicts: '$[1].ignoreConflicts',\n },\n singleArgumentUnchanged: false,\n },\n ['reservation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateReservationOptions {\n /**\n * If creation is forced.\n * @deprecated If creation is forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * * `\"OFFLINE_ONLY\"`: The restaurant does not allow online reservations.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"PARTY_PACING\"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.\n * * `\"SEAT_PACING\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\n/**\n * Retrieves a reservation.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @param reservationId - Reservation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @returns Reservation.\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.GetReservation\n */\nexport async function getReservation(\n reservationId: string,\n options?: GetReservationOptions\n): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n fieldSet: options?.fieldSet,\n fieldsets: options?.fieldsets,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.getReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reservation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservationId: '$[0]',\n fieldSet: '$[1].fieldSet',\n fieldsets: '$[1].fieldsets',\n },\n singleArgumentUnchanged: false,\n },\n ['reservationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetReservationOptions {\n /**\n * Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @deprecated Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @replacedBy fieldsets\n * @targetRemovalDate 2023-11-01\n */\n fieldSet?: SetWithLiterals;\n /**\n * Array of named, predefined sets of projected fields to be returned.\n *\n * Supported values: `PUBLIC`, `FULL`.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @maxSize 1\n * @deprecated Array of named, predefined sets of projected fields to be returned.\n * Default: If `fields` is omitted from the request, `PUBLIC`.\n * @targetRemovalDate 2025-06-26\n */\n fieldsets?: SetWithLiterals[];\n}\n\n/**\n * Updates a reservation.\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites.\n * @param _id - Reservation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField reservation\n * @requiredField reservation.revision\n * @param options - Options for updating the reservation.\n * @param reservation - Reservation information to update.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_UPDATE\n * @permissionId TABLE_RESERVATIONS.RESERVATION_UPDATE_FORCE\n * @applicableIdentity APP\n * @returns Reservation.\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.UpdateReservation\n */\nexport async function updateReservation(\n _id: string,\n reservation: NonNullablePaths<UpdateReservation, `revision`, 2>,\n options?: UpdateReservationOptions\n): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: UpdateReservationApplicationErrors;\n __validationErrorsType?: UpdateReservationValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservation: { ...reservation, id: _id },\n force: options?.force,\n ignoreTableCombinationConflicts: options?.ignoreTableCombinationConflicts,\n ignoreReservationLocationConflicts:\n options?.ignoreReservationLocationConflicts,\n ignoreConflicts: options?.ignoreConflicts,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.updateReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reservation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { reservation: '$[1]' },\n explicitPathsToArguments: {\n 'reservation.id': '$[0]',\n force: '$[2].force',\n ignoreTableCombinationConflicts:\n '$[2].ignoreTableCombinationConflicts',\n ignoreReservationLocationConflicts:\n '$[2].ignoreReservationLocationConflicts',\n ignoreConflicts: '$[2].ignoreConflicts',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'reservation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateReservation {\n /**\n * Reservation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Status of the reservation.\n *\n * 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.\n */\n status?: StatusWithLiterals;\n /**\n * Reservation source.\n *\n * This indicates how the reservation was made.\n */\n source?: SourceWithLiterals;\n /** Reservation details. */\n details?: Details;\n /**\n * Information about the person the reservation is being made for.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields results in an error.\n */\n reservee?: Reservee;\n /**\n * Information about the person making the reservation.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @readonly\n */\n reservedBy?: ReservedBy;\n /**\n * Team message.\n *\n * A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.\n * @maxLength 10000\n */\n teamMessage?: string | null;\n /**\n * Date and time the reservation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the reservation was changed.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the reservation is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the reservation.\n *\n * Ignored when creating a reservation.\n * @readonly\n */\n revision?: string | null;\n /**\n * The reason the reservation was declined.\n * @maxLength 1000\n */\n declineReason?: string | null;\n /**\n * Payment status.\n * @readonly\n */\n paymentStatus?: PaymentStatusWithLiterals;\n /**\n * Custom field data for the reservation object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Whether the reservation is archived.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @readonly\n */\n archived?: boolean | null;\n}\n\nexport interface UpdateReservationOptions {\n /**\n * If update should be forced.\n * @deprecated If update should be forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * 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.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\n/**\n * Creates a new temporary reservation and holds it for the customer for 10 minutes.\n *\n * Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.\n *\n * You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.\n *\n * If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.\n *\n * @param reservationDetails - Held reservation information to update.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationDetails\n * @requiredField reservationDetails.partySize\n * @requiredField reservationDetails.reservationLocationId\n * @requiredField reservationDetails.startDate\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE_HELD\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.CreateHeldReservation\n */\nexport async function createHeldReservation(\n reservationDetails: NonNullablePaths<\n HeldReservationDetails,\n `partySize` | `reservationLocationId` | `startDate`,\n 2\n >\n): Promise<\n NonNullablePaths<\n CreateHeldReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CreateHeldReservationApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationDetails: reservationDetails,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.createHeldReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationDetails: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationDetails']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Reserves or requests a held reservation.\n *\n * Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.\n *\n * They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.\n *\n * `Reserve Reservation` changes a reservation's `HELD` status to:\n * * `RESERVED` if the reservation's reservation location does not require manual approval.\n * * `REQUESTED` if the reservation's reservation location requires manual approval.\n * @param reservationId - Reservation ID.\n * @param reservee - Reservee details.\n * @param revision - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @requiredField reservee\n * @requiredField reservee.firstName\n * @requiredField reservee.phone\n * @requiredField revision\n * @permissionId TABLE_RESERVATIONS.RESERVATION_RESERVE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.ReserveReservation\n */\nexport async function reserveReservation(\n reservationId: string,\n reservee: NonNullablePaths<Reservee, `firstName` | `phone`, 2>,\n revision: string\n): Promise<\n NonNullablePaths<\n ReserveReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: ReserveReservationApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n reservee: reservee,\n revision: revision,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.reserveReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservationId: '$[0]',\n reservee: '$[1]',\n revision: '$[2]',\n },\n singleArgumentUnchanged: false,\n },\n ['reservationId', 'reservee', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Cancels a reservation.\n *\n * Sets the reservation status to `CANCELED`.\n * @param reservationId - Reservation ID.\n * @param revision - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @requiredField revision\n * @param options - Options for canceling the reservation.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CANCEL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.CancelReservation\n */\nexport async function cancelReservation(\n reservationId: string,\n revision: string,\n options?: CancelReservationOptions\n): Promise<\n NonNullablePaths<\n CancelReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CancelReservationApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n revision: revision,\n phone: options?.phone,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.cancelReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservationId: '$[0]',\n revision: '$[1]',\n phone: '$[2].phone',\n },\n singleArgumentUnchanged: false,\n },\n ['reservationId', 'revision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CancelReservationOptions {\n /**\n * The phone number that was provided when the reservation was created.\n *\n * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.\n * @format PHONE\n */\n phone?: string | null;\n}\n\n/**\n * Deletes a reservation. Only reservations with the `HELD` status can be deleted.\n * @param reservationId - Reservation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @permissionId TABLE_RESERVATIONS.RESERVATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.DeleteReservation\n */\nexport async function deleteReservation(reservationId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.deleteReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 reservations.\n * @public\n * @documentationMaturity preview\n * @param options - Options for listing the reservations.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.ListReservations\n */\nexport async function listReservations(\n options?: ListReservationsOptions\n): Promise<\n NonNullablePaths<\n ListReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n sort: options?.sort,\n startDateFrom: options?.startDateFrom,\n startDateTo: options?.startDateTo,\n status: options?.status,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.listReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n paging: '$[0].paging',\n sort: '$[0].sort',\n startDateFrom: '$[0].startDateFrom',\n startDateTo: '$[0].startDateTo',\n status: '$[0].status',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListReservationsOptions {\n /** 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`. */\n paging?: CursorPaging;\n /** Defines how reservations in the response are sorted. */\n sort?: Sorting;\n /** Only reservations starting after this date are returned. */\n startDateFrom?: Date | null;\n /** Only reservations starting before this date are returned. */\n startDateTo?: Date | null;\n /** Only reservations with this status are returned. */\n status?: StatusWithLiterals;\n}\n\n/**\n * Creates a query to retrieve a list of reservations.\n *\n * The `queryReservations()` function builds a query to retrieve a list of reservations and returns a `ReservationsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.\n *\n * You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.\n *\n * `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:\n *\n * * [`limit(50)`](/reservations/reservations-query-builder/limit)\n * * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)\n *\n * The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-result/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).\n * @public\n * @documentationMaturity preview\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.QueryReservations\n */\nexport function queryReservations(): ReservationsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Reservation,\n 'CURSOR',\n QueryReservationsRequest,\n QueryReservationsResponse\n >({\n func: async (payload: QueryReservationsRequest) => {\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.queryReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryReservationsRequest['query']) => {\n const args = [query, {}] as [QueryReservationsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryReservationsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.reservations,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ReservationsQueryResult extends QueryCursorResult {\n items: Reservation[];\n query: ReservationsQueryBuilder;\n next: () => Promise<ReservationsQueryResult>;\n prev: () => Promise<ReservationsQueryResult>;\n}\n\nexport interface ReservationsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'status' | 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'status' | 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'status' | 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'details.startDate'>\n ) => ReservationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'details.startDate'>\n ) => ReservationsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ReservationsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ReservationsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ReservationsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.QueryReservations\n * @requiredField query\n */\nexport async function typedQueryReservations(\n query: ReservationQuery\n): Promise<\n NonNullablePaths<\n QueryReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.queryReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ReservationQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id', 'status'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['details.startDate'];\n operators: ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne'];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Reservation,\n ReservationQuerySpec\n>;\nexport type ReservationQuery = {\n /** \n 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`. \n */\n cursorPaging?: {\n /** \n Number of items to load. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n You can get the relevant cursor token\n from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object in the following format:\n `\"filter\" : {\n \"fieldName1\": \"value1\",\n \"fieldName2\":{\"$operator\":\"value2\"}\n }`\n\n For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n */\n sort?: {\n /** \n Name of the field to sort by. \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order.\n Default: `ASC`. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Use this method to search the fields of the table reservations on a site for a given expression.\n *\n * You can also use this method to perform data aggregations on a site's table reservation fields.\n * For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n * @param search - Search query.\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.SearchReservations\n */\nexport async function searchReservations(\n search: ReservationSearch\n): Promise<\n NonNullablePaths<\n SearchReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.scalarDate.type`\n | `aggregationData.results.${number}.scalarDate.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.searchReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { search: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['search']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ReservationSearchSpec extends SearchSpec {\n searchable: [\n 'reservee.email',\n 'reservee.firstName',\n 'reservee.lastName',\n 'reservee.phone'\n ];\n aggregatable: [\n '_createdDate',\n '_updatedDate',\n 'archived',\n 'details.partySize',\n 'details.reservationLocationId',\n 'details.startDate',\n 'details.tableIds',\n 'details.tables.ids',\n 'paymentStatus',\n 'reservee.contactId',\n 'source',\n 'status'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$eq', '$in', '$ne'];\n fields: [\n 'archived',\n 'details.reservationLocationId',\n 'paymentStatus',\n 'reservee.contactId',\n 'source',\n 'status'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$hasAll', '$hasSome', '$isEmpty'];\n fields: ['details.tableIds', 'details.tables.ids'];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne'];\n fields: [\n '_createdDate',\n '_updatedDate',\n 'details.partySize',\n 'details.startDate'\n ];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Reservation,\n ReservationSearchSpec\n>;\nexport type ReservationSearch = {\n /** \n Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. \n */\n cursorPaging?: {\n /** \n Number of items to load. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n You can get the relevant cursor token\n from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object in the following format:\n `\"filter\" : {\n \"fieldName1\": \"value1\",\n \"fieldName2\":{\"$operator\":\"value2\"}\n }`\n For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article. \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n @maxSize: 100 \n */\n sort?: {\n /** \n Name of the field to sort by. \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order.\n Default: `ASC`. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n A search method for grouping data into various categories (facets) and providing summaries for each category.\n For example, use aggregations to allow site visitors to narrow down their search results by selecting specific reservation statuses, party sizes, etc. \n @maxSize: 100 \n */\n aggregations?: {\n /** \n A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\n For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`. \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n fieldPath?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['fieldPath'];\n }[];\n /** \n Free text to match in searchable fields. \n */\n search?: {\n /** \n Boolean search mode. Defines how separate search terms in the `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in.\n\n Searchable fields are `reservee.firstName`, `reservee.lastName`, `reservee.phone`, and `reservee.email`.\n\n If the array is empty, all fields are searched. \n @maxSize: 100,\n @maxLength: 1000 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.\n The search function uses an algorithm to find results that are close to what the site visitor typed. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. \n @maxLength: 100 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Archives multiple reservations at once.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @param reservationIds - IDs of reservations to archive.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationIds\n * @permissionId TABLE_RESERVATIONS.RESERVATION_ARCHIVE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.BulkArchiveReservations\n */\nexport async function bulkArchiveReservations(\n reservationIds: string[]\n): Promise<\n NonNullablePaths<\n BulkArchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationIds: reservationIds,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.bulkArchiveReservations(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Unarchives multiple reservations at once.\n * @param reservationIds - Reservation IDs to unarchive.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationIds\n * @permissionId TABLE_RESERVATIONS.RESERVATION_UNARCHIVE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.BulkUnarchiveReservations\n */\nexport async function bulkUnarchiveReservations(\n reservationIds: string[]\n): Promise<\n NonNullablePaths<\n BulkUnarchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationIds: reservationIds,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.bulkUnarchiveReservations(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixTableReservationsReservationV1ReservationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/table-reservations/reservations',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_table-reservations_reservations';\n\n/**\n * Creates a new reservation.\n *\n * `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.\n *\n * **Status and source**\n *\n * If a `status` is not provided, it will be set to:\n * * `RESERVED` if manual approval is not required for confirmation\n * * `REQUESTED` if manual approval is required for confirmation.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields will result in an error.\n *\n * **Permissions**\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.\n *\n *\n * > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.\n */\nexport function createReservation(payload: object): RequestOptionsFactory<any> {\n function __createReservation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.CreateReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createReservation;\n}\n\n/**\n * Retrieves a reservation.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n */\nexport function getReservation(payload: object): RequestOptionsFactory<any> {\n function __getReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'GET' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.GetReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getReservation;\n}\n\n/**\n * Updates a reservation.\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites.\n */\nexport function updateReservation(payload: object): RequestOptionsFactory<any> {\n function __updateReservation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.UpdateReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateReservation;\n}\n\n/**\n * Creates a new temporary reservation and holds it for the customer for 10 minutes.\n *\n * Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.\n *\n * You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.\n *\n * If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.\n *\n */\nexport function createHeldReservation(\n payload: object\n): RequestOptionsFactory<any> {\n function __createHeldReservation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'reservationDetails.startDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.CreateHeldReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/hold',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createHeldReservation;\n}\n\n/**\n * Reserves or requests a held reservation.\n *\n * Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.\n *\n * They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.\n *\n * `Reserve Reservation` changes a reservation's `HELD` status to:\n * * `RESERVED` if the reservation's reservation location does not require manual approval.\n * * `REQUESTED` if the reservation's reservation location requires manual approval.\n */\nexport function reserveReservation(\n payload: object\n): RequestOptionsFactory<any> {\n function __reserveReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.ReserveReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}/reserve',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reserveReservation;\n}\n\n/**\n * Cancels a reservation.\n *\n * Sets the reservation status to `CANCELED`.\n */\nexport function cancelReservation(payload: object): RequestOptionsFactory<any> {\n function __cancelReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.CancelReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cancelReservation;\n}\n\n/** Deletes a reservation. Only reservations with the `HELD` status can be deleted. */\nexport function deleteReservation(payload: object): RequestOptionsFactory<any> {\n function __deleteReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.DeleteReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteReservation;\n}\n\n/** Retrieves a list of up to 100 reservations. */\nexport function listReservations(payload: object): RequestOptionsFactory<any> {\n function __listReservations({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'startDateFrom' }, { path: 'startDateTo' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'GET' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.ListReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservations.createdDate' },\n { path: 'reservations.updatedDate' },\n { path: 'reservations.details.startDate' },\n { path: 'reservations.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listReservations;\n}\n\n/**\n * Creates a query to retrieve a list of reservations.\n *\n * The `queryReservations()` function builds a query to retrieve a list of reservations and returns a `ReservationsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.\n *\n * You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.\n *\n * `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:\n *\n * * [`limit(50)`](/reservations/reservations-query-builder/limit)\n * * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)\n *\n * The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-result/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).\n */\nexport function queryReservations(payload: object): RequestOptionsFactory<any> {\n function __queryReservations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.QueryReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservations.createdDate' },\n { path: 'reservations.updatedDate' },\n { path: 'reservations.details.startDate' },\n { path: 'reservations.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryReservations;\n}\n\n/**\n * Use this method to search the fields of the table reservations on a site for a given expression.\n *\n * You can also use this method to perform data aggregations on a site's table reservation fields.\n * For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n */\nexport function searchReservations(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchReservations({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.SearchReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservations.createdDate' },\n { path: 'reservations.updatedDate' },\n { path: 'reservations.details.startDate' },\n { path: 'reservations.details.endDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchReservations;\n}\n\n/**\n * Archives multiple reservations at once.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n */\nexport function bulkArchiveReservations(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkArchiveReservations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.BulkArchiveReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/bulk/reservations/archive',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkArchiveReservations;\n}\n\n/** Unarchives multiple reservations at once. */\nexport function bulkUnarchiveReservations(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUnarchiveReservations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.BulkUnarchiveReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/bulk/reservations/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUnarchiveReservations;\n}\n","import {\n createReservation as publicCreateReservation,\n getReservation as publicGetReservation,\n updateReservation as publicUpdateReservation,\n createHeldReservation as publicCreateHeldReservation,\n reserveReservation as publicReserveReservation,\n cancelReservation as publicCancelReservation,\n deleteReservation as publicDeleteReservation,\n listReservations as publicListReservations,\n queryReservations as publicQueryReservations,\n typedQueryReservations as publicTypedQueryReservations,\n searchReservations as publicSearchReservations,\n bulkArchiveReservations as publicBulkArchiveReservations,\n bulkUnarchiveReservations as publicBulkUnarchiveReservations,\n} from './table-reservations-v1-reservation-reservations.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ReservationQuery,\n ReservationsQueryBuilder,\n typedQueryReservations as universalTypedQueryReservations,\n} from './table-reservations-v1-reservation-reservations.universal.js';\nimport { onReservationCreated as publicOnReservationCreated } from './table-reservations-v1-reservation-reservations.public.js';\nimport { onReservationDeleted as publicOnReservationDeleted } from './table-reservations-v1-reservation-reservations.public.js';\nimport { onReservationUpdated as publicOnReservationUpdated } from './table-reservations-v1-reservation-reservations.public.js';\n\nfunction customQueryReservations(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryReservations(httpClient)(),\n typedQueryFunction: (query: ReservationQuery) =>\n publicTypedQueryReservations(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ReservationsQueryBuilder;\n function overloadedQuery(\n query: ReservationQuery\n ): ReturnType<typeof universalTypedQueryReservations>;\n function overloadedQuery(query?: ReservationQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createReservation: MaybeContext<\n BuildRESTFunction<typeof publicCreateReservation> &\n typeof publicCreateReservation\n> = /*#__PURE__*/ createRESTModule(publicCreateReservation);\nexport const getReservation: MaybeContext<\n BuildRESTFunction<typeof publicGetReservation> & typeof publicGetReservation\n> = /*#__PURE__*/ createRESTModule(publicGetReservation);\nexport const updateReservation: MaybeContext<\n BuildRESTFunction<typeof publicUpdateReservation> &\n typeof publicUpdateReservation\n> = /*#__PURE__*/ createRESTModule(publicUpdateReservation);\nexport const createHeldReservation: MaybeContext<\n BuildRESTFunction<typeof publicCreateHeldReservation> &\n typeof publicCreateHeldReservation\n> = /*#__PURE__*/ createRESTModule(publicCreateHeldReservation);\nexport const reserveReservation: MaybeContext<\n BuildRESTFunction<typeof publicReserveReservation> &\n typeof publicReserveReservation\n> = /*#__PURE__*/ createRESTModule(publicReserveReservation);\nexport const cancelReservation: MaybeContext<\n BuildRESTFunction<typeof publicCancelReservation> &\n typeof publicCancelReservation\n> = /*#__PURE__*/ createRESTModule(publicCancelReservation);\nexport const deleteReservation: MaybeContext<\n BuildRESTFunction<typeof publicDeleteReservation> &\n typeof publicDeleteReservation\n> = /*#__PURE__*/ createRESTModule(publicDeleteReservation);\nexport const listReservations: MaybeContext<\n BuildRESTFunction<typeof publicListReservations> &\n typeof publicListReservations\n> = /*#__PURE__*/ createRESTModule(publicListReservations);\nexport const searchReservations: MaybeContext<\n BuildRESTFunction<typeof publicSearchReservations> &\n typeof publicSearchReservations\n> = /*#__PURE__*/ createRESTModule(publicSearchReservations);\nexport const bulkArchiveReservations: MaybeContext<\n BuildRESTFunction<typeof publicBulkArchiveReservations> &\n typeof publicBulkArchiveReservations\n> = /*#__PURE__*/ createRESTModule(publicBulkArchiveReservations);\nexport const bulkUnarchiveReservations: MaybeContext<\n BuildRESTFunction<typeof publicBulkUnarchiveReservations> &\n typeof publicBulkUnarchiveReservations\n> = /*#__PURE__*/ createRESTModule(publicBulkUnarchiveReservations);\nexport const queryReservations: MaybeContext<\n BuildRESTFunction<typeof customQueryReservations> &\n typeof customQueryReservations\n> = /*#__PURE__*/ createRESTModule(customQueryReservations);\n/**\n * Triggered when a reservation is created.\n */\nexport const onReservationCreated: BuildEventDefinition<\n typeof publicOnReservationCreated\n> &\n typeof publicOnReservationCreated = createEventModule(\n publicOnReservationCreated\n);\n/**\n * Triggered when a reservation is deleted.\n */\nexport const onReservationDeleted: BuildEventDefinition<\n typeof publicOnReservationDeleted\n> &\n typeof publicOnReservationDeleted = createEventModule(\n publicOnReservationDeleted\n);\n/**\n * Triggered when a reservation is canceled.\n */\nexport const onReservationUpdated: BuildEventDefinition<\n typeof publicOnReservationUpdated\n> &\n typeof publicOnReservationUpdated = createEventModule(\n publicOnReservationUpdated\n);\n\nexport {\n Status,\n Source,\n PaymentStatus,\n TableCombinationConflictType,\n ReservationLocationConflictType,\n ExperienceTableCombinationConflictType,\n ExperienceConflictType,\n IgnoreConflictsType,\n Type,\n Set,\n SortOrder,\n SortType,\n SortDirection,\n MissingValues,\n ScalarType,\n NestedAggregationType,\n Interval,\n AggregationType,\n Mode,\n WebhookIdentityType,\n} from './table-reservations-v1-reservation-reservations.universal.js';\nexport {\n Reservation,\n Tables,\n Details,\n Reservee,\n ReservedBy,\n MigrationNote,\n TableWithReservationConflicts,\n ExtendedFields,\n ReservationDelayedDomainEvent,\n ReservationDelayedDomainEventBodyTypeOneOf,\n ReservationCreated,\n ReservationUpdated,\n ReservationDelayedDomainEventReservationCanceled,\n CreateReservationRequest,\n IgnoreConflicts,\n IgnoreConflictsIgnoreConflictsOptionsOneOf,\n StandardOptions,\n ExperienceOptions,\n CreateReservationResponse,\n ReservationDetailsConflicts,\n TableCombinationConflict,\n ReservationLocationConflict,\n ExperienceTableCombinationConflict,\n ExperienceConflict,\n ConflictsStandardOptions,\n ConflictsExperienceOptions,\n Conflicts,\n ConflictsOptionsOneOf,\n CreateGoogleReservationRequest,\n CreateGoogleReservationResponse,\n GetReservationRequest,\n GetReservationResponse,\n UpdateReservationRequest,\n UpdateReservationResponse,\n CreateHeldReservationRequest,\n HeldReservationDetails,\n CreateHeldReservationResponse,\n ReserveReservationRequest,\n ReserveReservationResponse,\n CancelReservationRequest,\n CancelReservationResponse,\n ReservationCanceled,\n DeleteReservationRequest,\n DeleteReservationResponse,\n ListReservationsRequest,\n CursorPaging,\n Sorting,\n ListReservationsResponse,\n CursorPagingMetadata,\n Cursors,\n QueryReservationsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n QueryReservationsResponse,\n SearchReservationsRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Aggregation,\n AggregationKindOneOf,\n RangeBucket,\n IncludeMissingValuesOptions,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n RangeAggregation,\n ScalarAggregation,\n DateHistogramAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregation,\n SearchDetails,\n SearchReservationsResponse,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n NestedValueAggregationResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n ScalarDateResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n GroupByValueResults,\n DateHistogramResults,\n NestedResults,\n AggregationResultsScalarDateResult,\n AggregationResults,\n AggregationResultsResultOneOf,\n BulkArchiveReservationsRequest,\n BulkArchiveReservationsResponse,\n BulkArchiveReservationsResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n BulkUnarchiveReservationsRequest,\n BulkUnarchiveReservationsResponse,\n BulkUnarchiveReservationsResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n RemoveReservationMigrationNotesRequest,\n RemoveReservationMigrationNotesResponse,\n RawHttpRequest,\n PathParametersEntry,\n QueryParametersEntry,\n HeadersEntry,\n RawHttpResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n ReservationCreatedEnvelope,\n ReservationDeletedEnvelope,\n ReservationUpdatedEnvelope,\n CreateReservationOptions,\n GetReservationOptions,\n UpdateReservation,\n UpdateReservationOptions,\n CancelReservationOptions,\n ListReservationsOptions,\n ReservationsQueryResult,\n ReservationsQueryBuilder,\n ReservationQuerySpec,\n ReservationSearchSpec,\n} from './table-reservations-v1-reservation-reservations.universal.js';\nexport {\n StatusWithLiterals,\n SourceWithLiterals,\n PaymentStatusWithLiterals,\n TableCombinationConflictTypeWithLiterals,\n ReservationLocationConflictTypeWithLiterals,\n ExperienceTableCombinationConflictTypeWithLiterals,\n ExperienceConflictTypeWithLiterals,\n IgnoreConflictsTypeWithLiterals,\n TypeWithLiterals,\n SetWithLiterals,\n SortOrderWithLiterals,\n SortTypeWithLiterals,\n SortDirectionWithLiterals,\n MissingValuesWithLiterals,\n ScalarTypeWithLiterals,\n NestedAggregationTypeWithLiterals,\n IntervalWithLiterals,\n AggregationTypeWithLiterals,\n ModeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateReservationApplicationErrors,\n CreateReservationValidationErrors,\n UpdateReservationApplicationErrors,\n UpdateReservationValidationErrors,\n CreateHeldReservationApplicationErrors,\n ReserveReservationApplicationErrors,\n CancelReservationApplicationErrors,\n CommonQueryWithEntityContext,\n ReservationQuery,\n CommonSearchWithEntityContext,\n ReservationSearch,\n} from './table-reservations-v1-reservation-reservations.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;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T;AAEO,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMZ,qBAGK,2DAAiB,uBAAuB;AAInD,IAAMa,4BAGyB;AAAA,EACpC;AACF;AAIO,IAAMC,4BAGyB;AAAA,EACpC;AACF;AAIO,IAAMC,4BAGyB;AAAA,EACpC;AACF;","names":["bulkArchiveReservations","bulkUnarchiveReservations","cancelReservation","createHeldReservation","createReservation","deleteReservation","getReservation","listReservations","onReservationCreated","onReservationDeleted","onReservationUpdated","queryReservations","reserveReservation","searchReservations","updateReservation","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","Status","Source","PaymentStatus","TableCombinationConflictType","ReservationLocationConflictType","ExperienceTableCombinationConflictType","ExperienceConflictType","IgnoreConflictsType","Type","Set","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","Mode","WebhookIdentityType","createReservation","sdkTransformError","getReservation","updateReservation","createHeldReservation","reserveReservation","cancelReservation","deleteReservation","listReservations","queryReservations","searchReservations","bulkArchiveReservations","bulkUnarchiveReservations","createReservation","getReservation","updateReservation","createHeldReservation","reserveReservation","cancelReservation","deleteReservation","listReservations","queryReservations","typedQueryReservations","searchReservations","bulkArchiveReservations","bulkUnarchiveReservations","import_rest_modules","queryReservations","typedQueryReservations","createReservation","getReservation","updateReservation","createHeldReservation","reserveReservation","cancelReservation","deleteReservation","listReservations","searchReservations","bulkArchiveReservations","bulkUnarchiveReservations","onReservationCreated","onReservationDeleted","onReservationUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/table-reservations-v1-reservation-reservations.public.ts","../../src/table-reservations-v1-reservation-reservations.universal.ts","../../src/table-reservations-v1-reservation-reservations.http.ts","../../src/table-reservations-v1-reservation-reservations.context.ts"],"sourcesContent":["export * from './src/table-reservations-v1-reservation-reservations.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkArchiveReservationsResponse,\n BulkUnarchiveReservationsResponse,\n CancelReservationApplicationErrors,\n CancelReservationOptions,\n CancelReservationResponse,\n CreateHeldReservationApplicationErrors,\n CreateHeldReservationResponse,\n CreateReservationApplicationErrors,\n CreateReservationOptions,\n CreateReservationValidationErrors,\n GetReservationOptions,\n HeldReservationDetails,\n ListReservationsOptions,\n ListReservationsResponse,\n QueryReservationsResponse,\n Reservation,\n ReservationCreatedEnvelope,\n ReservationDeletedEnvelope,\n ReservationQuery,\n ReservationSearch,\n ReservationUpdatedEnvelope,\n ReservationsQueryBuilder,\n ReserveReservationApplicationErrors,\n ReserveReservationResponse,\n Reservee,\n SearchReservationsResponse,\n UpdateReservation,\n UpdateReservationApplicationErrors,\n UpdateReservationOptions,\n UpdateReservationValidationErrors,\n bulkArchiveReservations as universalBulkArchiveReservations,\n bulkUnarchiveReservations as universalBulkUnarchiveReservations,\n cancelReservation as universalCancelReservation,\n createHeldReservation as universalCreateHeldReservation,\n createReservation as universalCreateReservation,\n deleteReservation as universalDeleteReservation,\n getReservation as universalGetReservation,\n listReservations as universalListReservations,\n queryReservations as universalQueryReservations,\n reserveReservation as universalReserveReservation,\n searchReservations as universalSearchReservations,\n typedQueryReservations as universalTypedQueryReservations,\n updateReservation as universalUpdateReservation,\n} from './table-reservations-v1-reservation-reservations.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/table-reservations' };\n\nexport function createReservation(\n httpClient: HttpClient\n): CreateReservationSignature {\n return (\n reservation: NonNullablePaths<\n Reservation,\n | `details`\n | `details.partySize`\n | `details.reservationLocationId`\n | `details.startDate`,\n 3\n >,\n options?: CreateReservationOptions\n ) =>\n universalCreateReservation(\n reservation,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateReservationSignature {\n /**\n * Creates a new reservation.\n *\n * `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.\n *\n * **Status and source**\n *\n * If a `status` is not provided, it will be set to:\n * * `RESERVED` if manual approval is not required for confirmation\n * * `REQUESTED` if manual approval is required for confirmation.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields will result in an error.\n *\n * **Permissions**\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.\n *\n *\n * > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.\n * @param - Reservation details.\n * @param - Options for creating the reservation.\n * @returns Reservation.\n */\n (\n reservation: NonNullablePaths<\n Reservation,\n | `details`\n | `details.partySize`\n | `details.reservationLocationId`\n | `details.startDate`,\n 3\n >,\n options?: CreateReservationOptions\n ): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: CreateReservationApplicationErrors;\n __validationErrorsType?: CreateReservationValidationErrors;\n }\n >;\n}\n\nexport function getReservation(\n httpClient: HttpClient\n): GetReservationSignature {\n return (reservationId: string, options?: GetReservationOptions) =>\n universalGetReservation(\n reservationId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetReservationSignature {\n /**\n * Retrieves a reservation.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @param - Reservation ID.\n * @returns Reservation.\n */\n (reservationId: string, options?: GetReservationOptions): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n >\n >;\n}\n\nexport function updateReservation(\n httpClient: HttpClient\n): UpdateReservationSignature {\n return (\n _id: string,\n reservation: NonNullablePaths<UpdateReservation, `revision`, 2>,\n options?: UpdateReservationOptions\n ) =>\n universalUpdateReservation(\n _id,\n reservation,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateReservationSignature {\n /**\n * Updates a reservation.\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites.\n * @param - Reservation ID.\n * @param - Options for updating the reservation.\n * @param - Reservation information to update.\n * @returns Reservation.\n */\n (\n _id: string,\n reservation: NonNullablePaths<UpdateReservation, `revision`, 2>,\n options?: UpdateReservationOptions\n ): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: UpdateReservationApplicationErrors;\n __validationErrorsType?: UpdateReservationValidationErrors;\n }\n >;\n}\n\nexport function createHeldReservation(\n httpClient: HttpClient\n): CreateHeldReservationSignature {\n return (\n reservationDetails: NonNullablePaths<\n HeldReservationDetails,\n `partySize` | `reservationLocationId` | `startDate`,\n 2\n >\n ) =>\n universalCreateHeldReservation(\n reservationDetails,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateHeldReservationSignature {\n /**\n * Creates a new temporary reservation and holds it for the customer for 10 minutes.\n *\n * Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.\n *\n * You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.\n *\n * If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.\n *\n * @param - Held reservation information to update.\n */\n (\n reservationDetails: NonNullablePaths<\n HeldReservationDetails,\n `partySize` | `reservationLocationId` | `startDate`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n CreateHeldReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CreateHeldReservationApplicationErrors;\n }\n >;\n}\n\nexport function reserveReservation(\n httpClient: HttpClient\n): ReserveReservationSignature {\n return (\n reservationId: string,\n reservee: NonNullablePaths<Reservee, `firstName` | `phone`, 2>,\n revision: string\n ) =>\n universalReserveReservation(\n reservationId,\n reservee,\n revision,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ReserveReservationSignature {\n /**\n * Reserves or requests a held reservation.\n *\n * Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.\n *\n * They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.\n *\n * `Reserve Reservation` changes a reservation's `HELD` status to:\n * * `RESERVED` if the reservation's reservation location does not require manual approval.\n * * `REQUESTED` if the reservation's reservation location requires manual approval.\n * @param - Reservation ID.\n * @param - Reservee details.\n * @param - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n */\n (\n reservationId: string,\n reservee: NonNullablePaths<Reservee, `firstName` | `phone`, 2>,\n revision: string\n ): Promise<\n NonNullablePaths<\n ReserveReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: ReserveReservationApplicationErrors;\n }\n >;\n}\n\nexport function cancelReservation(\n httpClient: HttpClient\n): CancelReservationSignature {\n return (\n reservationId: string,\n revision: string,\n options?: CancelReservationOptions\n ) =>\n universalCancelReservation(\n reservationId,\n revision,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CancelReservationSignature {\n /**\n * Cancels a reservation.\n *\n * Sets the reservation status to `CANCELED`.\n * @param - Reservation ID.\n * @param - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n * @param - Options for canceling the reservation.\n */\n (\n reservationId: string,\n revision: string,\n options?: CancelReservationOptions\n ): Promise<\n NonNullablePaths<\n CancelReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CancelReservationApplicationErrors;\n }\n >;\n}\n\nexport function deleteReservation(\n httpClient: HttpClient\n): DeleteReservationSignature {\n return (reservationId: string) =>\n universalDeleteReservation(\n reservationId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteReservationSignature {\n /**\n * Deletes a reservation. Only reservations with the `HELD` status can be deleted.\n * @param - Reservation ID.\n */\n (reservationId: string): Promise<void>;\n}\n\nexport function listReservations(\n httpClient: HttpClient\n): ListReservationsSignature {\n return (options?: ListReservationsOptions) =>\n universalListReservations(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListReservationsSignature {\n /**\n * Retrieves a list of up to 100 reservations.\n * @param - Options for listing the reservations.\n */\n (options?: ListReservationsOptions): Promise<\n NonNullablePaths<\n ListReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n >;\n}\n\nexport function queryReservations(\n httpClient: HttpClient\n): QueryReservationsSignature {\n return () =>\n universalQueryReservations(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryReservationsSignature {\n /**\n * Creates a query to retrieve a list of reservations.\n *\n * The `queryReservations()` function builds a query to retrieve a list of reservations and returns a `ReservationsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.\n *\n * You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.\n *\n * `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:\n *\n * * [`limit(50)`](/reservations/reservations-query-builder/limit)\n * * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)\n *\n * The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-result/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).\n */\n (): ReservationsQueryBuilder;\n}\n\nexport function typedQueryReservations(\n httpClient: HttpClient\n): TypedQueryReservationsSignature {\n return (query: ReservationQuery) =>\n universalTypedQueryReservations(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryReservationsSignature {\n /** */\n (query: ReservationQuery): Promise<\n NonNullablePaths<\n QueryReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n >;\n}\n\nexport function searchReservations(\n httpClient: HttpClient\n): SearchReservationsSignature {\n return (search: ReservationSearch) =>\n universalSearchReservations(\n search,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SearchReservationsSignature {\n /**\n * Use this method to search the fields of the table reservations on a site for a given expression.\n *\n * You can also use this method to perform data aggregations on a site's table reservation fields.\n * For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n * @param - Search query.\n */\n (search: ReservationSearch): Promise<\n NonNullablePaths<\n SearchReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.scalarDate.type`\n | `aggregationData.results.${number}.scalarDate.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 6\n >\n >;\n}\n\nexport function bulkArchiveReservations(\n httpClient: HttpClient\n): BulkArchiveReservationsSignature {\n return (reservationIds: string[]) =>\n universalBulkArchiveReservations(\n reservationIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkArchiveReservationsSignature {\n /**\n * Archives multiple reservations at once.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @param - IDs of reservations to archive.\n */\n (reservationIds: string[]): Promise<\n NonNullablePaths<\n BulkArchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkUnarchiveReservations(\n httpClient: HttpClient\n): BulkUnarchiveReservationsSignature {\n return (reservationIds: string[]) =>\n universalBulkUnarchiveReservations(\n reservationIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUnarchiveReservationsSignature {\n /**\n * Unarchives multiple reservations at once.\n * @param - Reservation IDs to unarchive.\n */\n (reservationIds: string[]): Promise<\n NonNullablePaths<\n BulkUnarchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport const onReservationCreated = EventDefinition(\n 'wix.table_reservations.v1.reservation_created',\n true,\n (event: ReservationCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.details.startDate' },\n { path: 'entity.details.endDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ReservationCreatedEnvelope>();\nexport const onReservationDeleted = EventDefinition(\n 'wix.table_reservations.v1.reservation_deleted',\n true,\n (event: ReservationDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'undefined.createdDate' },\n { path: 'undefined.updatedDate' },\n { path: 'undefined.details.startDate' },\n { path: 'undefined.details.endDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<ReservationDeletedEnvelope>();\nexport const onReservationUpdated = EventDefinition(\n 'wix.table_reservations.v1.reservation_updated',\n true,\n (event: ReservationUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.details.startDate' },\n { path: 'entity.details.endDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n { path: 'modifiedFields.details.startDate' },\n { path: 'modifiedFields.details.endDate' },\n ],\n },\n ])\n )\n)<ReservationUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n Aggregation,\n AggregationData,\n AggregationKindOneOf,\n AggregationResults,\n AggregationResultsResultOneOf,\n AggregationResultsScalarDateResult,\n AggregationResultsScalarResult,\n AggregationType,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkArchiveReservationsRequest,\n BulkArchiveReservationsResponse,\n BulkArchiveReservationsResult,\n BulkUnarchiveReservationsRequest,\n BulkUnarchiveReservationsResponse,\n BulkUnarchiveReservationsResult,\n CancelReservationOptions,\n CancelReservationRequest,\n CancelReservationResponse,\n Conflicts,\n ConflictsExperienceOptions,\n ConflictsOptionsOneOf,\n ConflictsStandardOptions,\n CreateGoogleReservationRequest,\n CreateGoogleReservationResponse,\n CreateHeldReservationRequest,\n CreateHeldReservationResponse,\n CreateReservationOptions,\n CreateReservationRequest,\n CreateReservationResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Cursors,\n DateHistogramAggregation,\n DateHistogramResult,\n DateHistogramResults,\n DeleteReservationRequest,\n DeleteReservationResponse,\n Details,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExperienceConflict,\n ExperienceConflictType,\n ExperienceOptions,\n ExperienceTableCombinationConflict,\n ExperienceTableCombinationConflictType,\n ExtendedFields,\n GetReservationOptions,\n GetReservationRequest,\n GetReservationResponse,\n GroupByValueResults,\n HeadersEntry,\n HeldReservationDetails,\n IdentificationData,\n IdentificationDataIdOneOf,\n IgnoreConflicts,\n IgnoreConflictsIgnoreConflictsOptionsOneOf,\n IgnoreConflictsType,\n IncludeMissingValuesOptions,\n Interval,\n ItemMetadata,\n ListReservationsOptions,\n ListReservationsRequest,\n ListReservationsResponse,\n MessageEnvelope,\n MigrationNote,\n MissingValues,\n Mode,\n NestedAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n NestedAggregationType,\n NestedResultValue,\n NestedResultValueResultOneOf,\n NestedResults,\n NestedValueAggregationResult,\n PathParametersEntry,\n PaymentStatus,\n QueryParametersEntry,\n QueryReservationsRequest,\n QueryReservationsResponse,\n RangeAggregation,\n RangeAggregationResult,\n RangeBucket,\n RangeResult,\n RangeResults,\n RawHttpRequest,\n RawHttpResponse,\n RemoveReservationMigrationNotesRequest,\n RemoveReservationMigrationNotesResponse,\n Reservation,\n ReservationCanceled,\n ReservationCreated,\n ReservationCreatedEnvelope,\n ReservationDelayedDomainEvent,\n ReservationDelayedDomainEventBodyTypeOneOf,\n ReservationDelayedDomainEventReservationCanceled,\n ReservationDeletedEnvelope,\n ReservationDetailsConflicts,\n ReservationLocationConflict,\n ReservationLocationConflictType,\n ReservationQuerySpec,\n ReservationSearchSpec,\n ReservationUpdated,\n ReservationUpdatedEnvelope,\n ReservationsQueryBuilder,\n ReservationsQueryResult,\n ReserveReservationRequest,\n ReserveReservationResponse,\n ReservedBy,\n Reservee,\n RestoreInfo,\n Results,\n ScalarAggregation,\n ScalarDateResult,\n ScalarResult,\n ScalarType,\n SearchDetails,\n SearchReservationsRequest,\n SearchReservationsResponse,\n Set,\n SortDirection,\n SortOrder,\n SortType,\n Sorting,\n Source,\n StandardOptions,\n Status,\n TableCombinationConflict,\n TableCombinationConflictType,\n TableWithReservationConflicts,\n Tables,\n Type,\n UpdateReservation,\n UpdateReservationOptions,\n UpdateReservationRequest,\n UpdateReservationResponse,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n ValueAggregationResult,\n ValueResult,\n ValueResults,\n WebhookIdentityType,\n} from './table-reservations-v1-reservation-reservations.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n Search as SearchSdkType,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixTableReservationsV1Reservation from './table-reservations-v1-reservation-reservations.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/** The reservation domain object. */\nexport interface Reservation {\n /**\n * Reservation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Status of the reservation.\n *\n * Supported values:\n *\n * * `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.\n * * `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.\n * * `DECLINED`: The restaurant’s owner or staff declined the customer’s request to make the reservation.\n * * `RESERVED`: The reservation is confirmed.\n * * `SEATED`: The customer is currently occupying the table.\n * * `CANCELED`: The reservation is canceled.\n * * `NO_SHOW`: The customer didn't show up for their reservation.\n * * `FINISHED`: The reservation completed successfully.\n *\n *\n * 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.\n */\n status?: StatusWithLiterals;\n /**\n * Reservation source.\n *\n * This indicates how the reservation was made.\n */\n source?: SourceWithLiterals;\n /** Reservation details. */\n details?: Details;\n /**\n * Information about the person the reservation is being made for.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields results in an error.\n */\n reservee?: Reservee;\n /**\n * Information about the person making the reservation.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @readonly\n */\n reservedBy?: ReservedBy;\n /**\n * Team message.\n *\n * A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.\n * @maxLength 10000\n */\n teamMessage?: string | null;\n /**\n * Date and time the reservation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the reservation was changed.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the reservation is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the reservation.\n *\n * Ignored when creating a reservation.\n * @readonly\n */\n revision?: string | null;\n /**\n * The reason the reservation was declined.\n * @maxLength 1000\n */\n declineReason?: string | null;\n /**\n * Payment status.\n * @readonly\n */\n paymentStatus?: PaymentStatusWithLiterals;\n /**\n * Custom field data for the reservation object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Whether the reservation is archived.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @readonly\n */\n archived?: boolean | null;\n}\n\n/** Tables used for the reservation. If you don't specify a `tables` object, the server attempts to assign tables automatically. */\nexport interface Tables {\n /**\n * IDs of tables used for this reservation. If you don't specify an `ids` array, or you specify an empty array, no tables are assigned.\n * @format GUID\n * @maxSize 100\n */\n ids?: string[];\n}\n\nexport enum Status {\n /** Undefined reservation status. */\n UNKNOWN = 'UNKNOWN',\n /** A customer has begun the reservation flow, a temporary reservation is created and will expire in 10 minutes unless the customer moves forward with the reservation flow. This phase temporarily reserves the required number of seats and tables for a given party size at a chosen time while a customer enters details and/or confirms their reservation request. */\n HELD = 'HELD',\n /** The reservation is confirmed. */\n RESERVED = 'RESERVED',\n /** The reservation is canceled. */\n CANCELED = 'CANCELED',\n /** The reservation completed successfully. */\n FINISHED = 'FINISHED',\n /** The customer didn't show up for their reservation. */\n NO_SHOW = 'NO_SHOW',\n /** The customer is currently occupying the table. */\n SEATED = 'SEATED',\n /** 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. */\n REQUESTED = 'REQUESTED',\n /** The restaurant’s owner or staff declined the customer’s request to make the reservation. */\n DECLINED = 'DECLINED',\n PAYMENT_PENDING = 'PAYMENT_PENDING',\n /** The reservation is awaiting payment. It will expire in 10 minutes from the created time unless the customer provides payment information. This phase temporarily reserves the required number of seats and tables for the given party size at the chosen time. */\n PAYMENT_INFORMATION_PENDING = 'PAYMENT_INFORMATION_PENDING',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'HELD'\n | 'RESERVED'\n | 'CANCELED'\n | 'FINISHED'\n | 'NO_SHOW'\n | 'SEATED'\n | 'REQUESTED'\n | 'DECLINED'\n | 'PAYMENT_PENDING'\n | 'PAYMENT_INFORMATION_PENDING';\n\nexport enum Source {\n /** Undefined reservation source. */\n UNKNOWN = 'UNKNOWN',\n /** The reservation was made by a restaurant employee, for example when a customer calls to make a reservation. */\n OFFLINE = 'OFFLINE',\n /** The reservation was made through a website or app. */\n ONLINE = 'ONLINE',\n /** The reservation was made by a restaurant employee when the customer arrived at the restaurant without a prior reservation. */\n WALK_IN = 'WALK_IN',\n}\n\n/** @enumType */\nexport type SourceWithLiterals =\n | Source\n | 'UNKNOWN'\n | 'OFFLINE'\n | 'ONLINE'\n | 'WALK_IN';\n\n/** Reservation details. */\nexport interface Details {\n /**\n * ID of the reservation location at which this reservation will be made.\n * @format GUID\n */\n reservationLocationId?: string | null;\n /**\n * IDs of tables used for this reservation.\n * @format GUID\n * @maxSize 100\n * @deprecated\n * @replacedBy tables\n * @targetRemovalDate 2024-12-31\n */\n tableIds?: string[] | null;\n /** Tables used for this reservation. */\n tables?: Tables;\n /** Start date and time of the reservation. */\n startDate?: Date | null;\n /** End date and time of the reservation. */\n endDate?: Date | null;\n /**\n * Party size.\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n}\n\n/** The person the reservation is being made for. */\nexport interface Reservee {\n /**\n * First name.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @maxLength 1000\n */\n firstName?: string | null;\n /**\n * Last name.\n * @maxLength 1000\n */\n lastName?: string | null;\n /**\n * Email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * Phone number.\n *\n * This property should begin with a +, followed by the country code, and then the rest of the phone number. For example, `\"+972555555555\"`.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @format PHONE\n */\n phone?: string | null;\n /** Whether the reservee has given marketing consent. */\n marketingConsent?: boolean | null;\n /**\n * Custom fields for the reservee in key-value pairs.\n *\n * 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\"`.\n *\n * Empty fields are not returned.\n */\n customFields?: Record<string, any> | null;\n /**\n * Contact ID. If a contact with this ID does not exist on the site, one will be created.\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n}\n\n/** A person making reservation. */\nexport interface ReservedBy {\n /**\n * 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.\n * @format GUID\n * @readonly\n */\n contactId?: string | null;\n}\n\n/** Migration note. */\nexport interface MigrationNote {}\n\n/** Table with reservation conflicts. */\nexport interface TableWithReservationConflicts {\n /**\n * Table id.\n * @format GUID\n */\n tableId?: string;\n /**\n * List of reservation ids.\n * @format GUID\n * @maxSize 1000\n */\n reservationIds?: string[];\n}\n\nexport enum PaymentStatus {\n /** Undefined payment status. */\n UNKNOWN = 'UNKNOWN',\n /** A reservation is free of charge. */\n FREE = 'FREE',\n /** Payment is not received yet. */\n NOT_PAID = 'NOT_PAID',\n /** The corresponding reservation order was fully paid. */\n PAID = 'PAID',\n /** The corresponding reservation order was refunded, but the refund amount is less than the order total price. */\n PARTIALLY_REFUNDED = 'PARTIALLY_REFUNDED',\n /** The corresponding reservation order was fully refunded. The refund amount equals the total price. */\n FULLY_REFUNDED = 'FULLY_REFUNDED',\n /** The corresponding reservation order was partially paid. */\n PARTIALLY_PAID = 'PARTIALLY_PAID',\n}\n\n/** @enumType */\nexport type PaymentStatusWithLiterals =\n | PaymentStatus\n | 'UNKNOWN'\n | 'FREE'\n | 'NOT_PAID'\n | 'PAID'\n | 'PARTIALLY_REFUNDED'\n | 'FULLY_REFUNDED'\n | 'PARTIALLY_PAID';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ReservationDelayedDomainEvent\n extends ReservationDelayedDomainEventBodyTypeOneOf {\n /** Body of a created reservation event. */\n reservationCreated?: ReservationCreated;\n /** Body of a updated reservation event. */\n reservationUpdated?: ReservationUpdated;\n /** Body of a canceled reservation event. */\n reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;\n}\n\n/** @oneof */\nexport interface ReservationDelayedDomainEventBodyTypeOneOf {\n /** Body of a created reservation event. */\n reservationCreated?: ReservationCreated;\n /** Body of a updated reservation event. */\n reservationUpdated?: ReservationUpdated;\n /** Body of a canceled reservation event. */\n reservationCanceled?: ReservationDelayedDomainEventReservationCanceled;\n}\n\nexport interface ReservationCreated {\n /** Created reservation. */\n createdReservation?: Reservation;\n}\n\nexport interface ReservationUpdated {\n /** Updated reservation. */\n updatedReservation?: Reservation;\n /** Modified fields of previous entity */\n modifiedFields?: Record<string, any>;\n}\n\nexport interface ReservationDelayedDomainEventReservationCanceled {\n /** Canceled reservation. */\n canceledReservation?: Reservation;\n}\n\nexport interface CreateReservationRequest {\n /** Reservation details. */\n reservation: Reservation;\n /**\n * If creation is forced.\n * @deprecated If creation is forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * * `\"OFFLINE_ONLY\"`: The restaurant does not allow online reservations.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"PARTY_PACING\"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.\n * * `\"SEAT_PACING\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\nexport enum TableCombinationConflictType {\n /** Undefined conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** One or more of the chosen tables are already reserved. */\n RESERVED = 'RESERVED',\n /** The party is too big for the selected table. */\n TOO_BIG = 'TOO_BIG',\n /** The party is too small for the selected table. */\n TOO_SMALL = 'TOO_SMALL',\n /** The restaurant does not allow online reservations. */\n OFFLINE_ONLY = 'OFFLINE_ONLY',\n}\n\n/** @enumType */\nexport type TableCombinationConflictTypeWithLiterals =\n | TableCombinationConflictType\n | 'UNKNOWN'\n | 'RESERVED'\n | 'TOO_BIG'\n | 'TOO_SMALL'\n | 'OFFLINE_ONLY';\n\nexport enum ReservationLocationConflictType {\n /** Undefined reservation location conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** The restaurant cannot accommodate a party of the given size according to party pacing settings. */\n PARTY_PACING = 'PARTY_PACING',\n /** The required number of seats are unavailable according to seat pacing settings. */\n SEAT_PACING = 'SEAT_PACING',\n}\n\n/** @enumType */\nexport type ReservationLocationConflictTypeWithLiterals =\n | ReservationLocationConflictType\n | 'UNKNOWN'\n | 'PARTY_PACING'\n | 'SEAT_PACING';\n\nexport interface IgnoreConflicts\n extends IgnoreConflictsIgnoreConflictsOptionsOneOf {\n /** Conflicts to ignore for standard reservations. */\n standardOptions?: StandardOptions;\n /** Conflicts to ignore for experiences. */\n experienceOptions?: ExperienceOptions;\n /** Types of conflicts to ignore. */\n ignoreConflictsType?: IgnoreConflictsTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IgnoreConflictsIgnoreConflictsOptionsOneOf {\n /** Conflicts to ignore for standard reservations. */\n standardOptions?: StandardOptions;\n /** Conflicts to ignore for experiences. */\n experienceOptions?: ExperienceOptions;\n}\n\nexport enum ExperienceTableCombinationConflictType {\n /** Undefined conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** One or more of the chosen tables are already reserved. */\n RESERVED = 'RESERVED',\n /** The party is too big for the selected table. */\n TOO_BIG = 'TOO_BIG',\n /** The party is too small for the selected table. */\n TOO_SMALL = 'TOO_SMALL',\n}\n\n/** @enumType */\nexport type ExperienceTableCombinationConflictTypeWithLiterals =\n | ExperienceTableCombinationConflictType\n | 'UNKNOWN'\n | 'RESERVED'\n | 'TOO_BIG'\n | 'TOO_SMALL';\n\nexport enum ExperienceConflictType {\n /** Undefined reservation location conflict type. */\n UNKNOWN = 'UNKNOWN',\n /** The number of guests exceeds the allowed limit. */\n MAXIMUM_NUMBER_OF_GUESTS = 'MAXIMUM_NUMBER_OF_GUESTS',\n}\n\n/** @enumType */\nexport type ExperienceConflictTypeWithLiterals =\n | ExperienceConflictType\n | 'UNKNOWN'\n | 'MAXIMUM_NUMBER_OF_GUESTS';\n\nexport enum IgnoreConflictsType {\n UNKNOWN_IGNORE_CONFLICTS_TYPE = 'UNKNOWN_IGNORE_CONFLICTS_TYPE',\n STANDARD = 'STANDARD',\n EXPERIENCE = 'EXPERIENCE',\n}\n\n/** @enumType */\nexport type IgnoreConflictsTypeWithLiterals =\n | IgnoreConflictsType\n | 'UNKNOWN_IGNORE_CONFLICTS_TYPE'\n | 'STANDARD'\n | 'EXPERIENCE';\n\nexport interface StandardOptions {\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * * `\"OFFLINE_ONLY\"`: The restaurant does not allow online reservations.\n * @maxSize 4\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"PARTY_PACING\"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.\n * * `\"SEAT_PACING\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 2\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n}\n\nexport interface ExperienceOptions {\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * @maxSize 3\n */\n ignoreTableCombinationConflicts?: ExperienceTableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored experience conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"MAX_NUMBER_OF_GUESTS\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 1\n */\n ignoreExperienceConflicts?: ExperienceConflictTypeWithLiterals[];\n}\n\nexport interface CreateReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface ReservationDetailsConflicts {\n /**\n * Table combinations conflicts.\n * @maxSize 10\n * @deprecated\n * @replacedBy conflicts\n * @targetRemovalDate 2025-12-05\n */\n tableCombinationConflicts?: TableCombinationConflict[];\n /**\n * Reservation location conflicts.\n * @maxSize 10\n * @deprecated\n * @replacedBy conflicts\n * @targetRemovalDate 2025-12-05\n */\n reservationLocationConflicts?: ReservationLocationConflict[];\n /** Conflicts. */\n conflicts?: Conflicts;\n}\n\nexport interface TableCombinationConflict {\n /** Conflict type. */\n type?: TableCombinationConflictTypeWithLiterals;\n}\n\nexport interface ReservationLocationConflict {\n /** Reservation location conflict type. */\n type?: ReservationLocationConflictTypeWithLiterals;\n}\n\nexport interface ExperienceTableCombinationConflict {\n /** Conflict type. */\n type?: ExperienceTableCombinationConflictTypeWithLiterals;\n}\n\nexport interface ExperienceConflict {\n /** Experience conflict type. */\n type?: ExperienceConflictTypeWithLiterals;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n STANDARD = 'STANDARD',\n EXPERIENCE = 'EXPERIENCE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_TYPE'\n | 'STANDARD'\n | 'EXPERIENCE';\n\nexport interface ConflictsStandardOptions {\n /**\n * Table combinations conflicts.\n * @maxSize 10\n */\n tableCombinationConflicts?: TableCombinationConflict[];\n /**\n * Reservation location conflicts.\n * @maxSize 10\n */\n reservationLocationConflicts?: ReservationLocationConflict[];\n}\n\nexport interface ConflictsExperienceOptions {\n /**\n * Experience table combination conflicts.\n * @maxSize 10\n */\n experienceTableCombinationConflicts?: ExperienceTableCombinationConflict[];\n /**\n * Experience conflicts.\n * @maxSize 10\n */\n experienceConflicts?: ExperienceConflict[];\n}\n\nexport interface Conflicts extends ConflictsOptionsOneOf {\n standardOptions?: ConflictsStandardOptions;\n experienceOptions?: ConflictsExperienceOptions;\n /** Conflict type. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ConflictsOptionsOneOf {\n standardOptions?: ConflictsStandardOptions;\n experienceOptions?: ConflictsExperienceOptions;\n}\n\nexport interface CreateGoogleReservationRequest {\n /** Reservation details. */\n reservation?: Reservation;\n}\n\nexport interface CreateGoogleReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface GetReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n /**\n * Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @deprecated Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @replacedBy fieldsets\n * @targetRemovalDate 2023-11-01\n */\n fieldSet?: SetWithLiterals;\n /**\n * Array of named, predefined sets of projected fields to be returned.\n *\n * Supported values: `PUBLIC`, `FULL`.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @maxSize 1\n * @deprecated Array of named, predefined sets of projected fields to be returned.\n * Default: If `fields` is omitted from the request, `PUBLIC`.\n * @targetRemovalDate 2025-06-26\n */\n fieldsets?: SetWithLiterals[];\n}\n\nexport enum Set {\n /** Returns `id`, `status`, `details.reservationLocationId`, `details.experienceId`, `details.startDate`, `details.endDate`, `details.partySize`, `createdDate`, `revision`, `declineReason`, `paymentStatus`. */\n PUBLIC = 'PUBLIC',\n /** Returns all fields. */\n FULL = 'FULL',\n}\n\n/** @enumType */\nexport type SetWithLiterals = Set | 'PUBLIC' | 'FULL';\n\nexport interface GetReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface UpdateReservationRequest {\n /** Reservation information to update. */\n reservation: Reservation;\n /**\n * If update should be forced.\n * @deprecated If update should be forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * 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.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\nexport interface UpdateReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface CreateHeldReservationRequest {\n /** Held reservation information to update. */\n reservationDetails: HeldReservationDetails;\n}\n\n/** Reservation details when create reservation in status HELD. */\nexport interface HeldReservationDetails {\n /**\n * ID of the reservation location where the reservation is made.\n * @format GUID\n */\n reservationLocationId?: string | null;\n /** Start date and time of the reservation. */\n startDate?: Date | null;\n /**\n * Party size.\n * @min 1\n * @max 1000\n */\n partySize?: number | null;\n}\n\nexport interface CreateHeldReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface ReserveReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n /** Reservee details. */\n reservee: Reservee;\n /**\n * Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n */\n revision: string | null;\n}\n\nexport interface ReserveReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface CancelReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n /**\n * Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n */\n revision: string | null;\n /**\n * The phone number that was provided when the reservation was created.\n *\n * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.\n * @format PHONE\n */\n phone?: string | null;\n}\n\nexport interface CancelReservationResponse {\n /** Reservation. */\n reservation?: Reservation;\n}\n\nexport interface ReservationCanceled {\n /** Reserved reservation. */\n reservation?: Reservation;\n}\n\nexport interface DeleteReservationRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId: string;\n}\n\nexport interface DeleteReservationResponse {}\n\nexport interface ListReservationsRequest {\n /** 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`. */\n paging?: CursorPaging;\n /** Defines how reservations in the response are sorted. */\n sort?: Sorting;\n /** Only reservations starting after this date are returned. */\n startDateFrom?: Date | null;\n /** Only reservations starting before this date are returned. */\n startDateTo?: Date | null;\n /** Only reservations with this status are returned. */\n status?: StatusWithLiterals;\n}\n\nexport interface CursorPaging {\n /**\n * Number of items to load.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface Sorting {\n /** Name of the field to sort by. */\n fieldName?: string;\n /**\n * Sort order.\n * Default: `ASC`.\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Sort by ascending order. */\n ASC = 'ASC',\n /** Sort by descending order. */\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface ListReservationsResponse {\n /** List of reservations. */\n reservations?: Reservation[];\n /** Metadata for the paginated results. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n /** Cursor pointing to previous page in the list of results. */\n prev?: string | null;\n}\n\nexport interface QueryReservationsRequest {\n /** Query to select reservations. */\n query: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n *\n * For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n * To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** 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`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface QueryReservationsResponse {\n /** List of reservations. */\n reservations?: Reservation[];\n /** Metadata for the paginated results. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface SearchReservationsRequest {\n /** Search query. */\n search: CursorSearch;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\n /** Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 100\n */\n sort?: Sorting[];\n /**\n * A search method for grouping data into various categories (facets) and providing summaries for each category.\n * For example, use aggregations to allow site visitors to narrow down their search results by selecting specific reservation statuses, party sizes, etc.\n * @maxSize 100\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format.\n * @maxLength 100\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\n /** Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Aggregation extends AggregationKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\n * For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`.\n */\n nested?: NestedAggregation;\n /** @maxLength 1000 */\n name?: string | null;\n type?: AggregationTypeWithLiterals;\n /** @maxLength 1000 */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\n * For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`.\n */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if `to` is not provided. */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if `from` is not provided. */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Sort by number of matches. */\n COUNT = 'COUNT',\n /** Sort by value of the field alphabetically. */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Sort in descending order. */\n DESC = 'DESC',\n /** Sort in ascending order. */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Exclude missing values from the aggregation results */\n EXCLUDE = 'EXCLUDE',\n /** Include missing values in the aggregation results */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Specify a custom name for the bucket containing the missing values. Defaults are \"N/A\" for strings, \"0\" for integers, and \"false\" for booleans.\n * @maxLength 1000\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n /** Undefined scalar type. */\n UNKNOWN_SCALAR_TYPE = 'UNKNOWN_SCALAR_TYPE',\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'UNKNOWN_SCALAR_TYPE'\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport enum NestedAggregationType {\n /** Undefined aggregation type. */\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - such as min, max, sum, and avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n | NestedAggregationType\n | 'UNKNOWN_AGGREGATION_TYPE'\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n /** Options for including missing values in results. */\n includeOptions?: IncludeMissingValuesOptions;\n /** Whether to sort by the number of matches or the value of the field. */\n sortType?: SortTypeWithLiterals;\n /** Whether to sort in ascending or descending order. */\n sortDirection?: SortDirectionWithLiterals;\n /**\n * Number of aggregation results to return.\n * Min: `1`\n * Max: `250`\n * Default: `10`\n */\n limit?: number | null;\n /**\n * Whether missing values should be included or excluded from the aggregation results.\n * Default: `EXCLUDE`.\n */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values in results. */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport interface RangeAggregation {\n /**\n * List of range buckets. During aggregation each entity will be placed in the first bucket its value falls into based on the provided range bounds.\n * @maxSize 1000\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Operation type for the scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for date histogram aggregation. */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n UNKNOWN_INTERVAL = 'UNKNOWN_INTERVAL',\n YEAR = 'YEAR',\n MONTH = 'MONTH',\n WEEK = 'WEEK',\n DAY = 'DAY',\n HOUR = 'HOUR',\n MINUTE = 'MINUTE',\n SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n | Interval\n | 'UNKNOWN_INTERVAL'\n | 'YEAR'\n | 'MONTH'\n | 'WEEK'\n | 'DAY'\n | 'HOUR'\n | 'MINUTE'\n | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * Aggregation name displayed in the return.\n * @maxLength 1000\n */\n name?: string | null;\n /** Type of aggregation to perform. */\n type?: NestedAggregationTypeWithLiterals;\n /** Field to aggregate by. */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. */\n value?: ValueAggregation;\n /** A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. */\n range?: RangeAggregation;\n /** A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. */\n scalar?: ScalarAggregation;\n /** A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n /** Undefined aggregation type. */\n UNKNOWN_AGGREGATION_TYPE = 'UNKNOWN_AGGREGATION_TYPE',\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation where you can define a set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation - such as min, max, sum, or avg. */\n SCALAR = 'SCALAR',\n /** An aggregation where result buckets are dynamically built - one per time interval such as hour, day, or week. */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within the previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'UNKNOWN_AGGREGATION_TYPE'\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each aggregation is nested within the previous one.\n * @minSize 2\n * @maxSize 10\n */\n nestedAggregations?: NestedAggregationItem[];\n}\n\nexport interface SearchDetails {\n /** Boolean search mode. Defines how separate search terms in the `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search in.\n *\n * Searchable fields are `reservee.firstName`, `reservee.lastName`, `reservee.phone`, and `reservee.email`.\n *\n * If the array is empty, all fields are searched.\n * @maxSize 100\n * @maxLength 1000\n */\n fields?: string[];\n /**\n * Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.\n * The search function uses an algorithm to find results that are close to what the site visitor typed.\n */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Returns instances where any terms in the expression occur. */\n OR = 'OR',\n /** Returns instances where all the terms in the expression occur. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\nexport interface SearchReservationsResponse {\n /** List of Reservations. */\n reservations?: Reservation[];\n /** Cursor paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data. */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * List of the aggregated data results.\n * @maxSize 1000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in the range. */\n count?: number;\n}\n\nexport interface NestedAggregationResults\n extends NestedAggregationResultsResultOneOf {\n /** List of the value aggregation results. */\n values?: ValueResults;\n /** List of the range aggregation results. */\n ranges?: RangeResults;\n /** List of the scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /**\n * Aggregation name defined in the request.\n * @maxLength 1000\n */\n name?: string;\n /** Type of aggregation performed. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field the data was aggregated by.\n * @maxLength 1000\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationResultsResultOneOf {\n /** List of the value aggregation results. */\n values?: ValueResults;\n /** List of the range aggregation results. */\n ranges?: RangeResults;\n /** List of the scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n}\n\nexport interface ValueResults {\n /**\n * List of value aggregations.\n * @maxSize 1000\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in same order as requested.\n * @maxSize 1000\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedValueAggregationResult {\n /** @maxLength 1000 */\n value?: string;\n nestedResults?: NestedAggregationResults;\n}\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in the range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Scalar aggregation results. */\n value?: number;\n}\n\nexport interface ScalarDateResult {\n /**\n * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n * @maxLength 100\n */\n value?: string;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation results. */\n value?: ValueResult;\n /** Range aggregation results. */\n range?: RangeResult;\n /** Scalar aggregation results. */\n scalar?: ScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: ValueResult;\n /** Scalar date aggregation result. */\n scalarDate?: ScalarDateResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation results. */\n value?: ValueResult;\n /** Range aggregation results. */\n range?: RangeResult;\n /** Scalar aggregation results. */\n scalar?: ScalarResult;\n /** Date histogram aggregation results. */\n dateHistogram?: ValueResult;\n /** Scalar date aggregation result. */\n scalarDate?: ScalarDateResult;\n}\n\nexport interface Results {\n /** List of nested aggregation results. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in ISO 8601 format.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities in the interval. */\n count?: number;\n}\n\n/** deprecated */\nexport interface GroupByValueResults {\n /** @maxSize 1000 */\n results?: NestedValueAggregationResult[];\n}\n\nexport interface DateHistogramResults {\n /**\n * List of date histogram aggregations.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form.\n * Aggregations in the resulting array are keyed by the requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregation results.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResultsScalarDateResult {\n /** Type of scalar date aggregation. Possible values: `MIN`, `MAX`. */\n type?: ScalarTypeWithLiterals;\n /**\n * Date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.\n * @maxLength 100\n */\n value?: string;\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** deprecated */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /** Date aggregation results. */\n scalarDate?: AggregationResultsScalarDateResult;\n /**\n * Aggregation name defined in the request.\n * @maxLength 1000\n */\n name?: string;\n /** Type of aggregation that was performed. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field the data was aggregated by.\n * @maxLength 1000\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** deprecated */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /** Date aggregation results. */\n scalarDate?: AggregationResultsScalarDateResult;\n}\n\nexport interface BulkArchiveReservationsRequest {\n /**\n * IDs of reservations to archive.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n reservationIds: string[];\n}\n\nexport interface BulkArchiveReservationsResponse {\n /**\n * Result of bulk archive action\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkArchiveReservationsResult[];\n /** Metadata for the API call. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkArchiveReservationsResult {\n /** Metadata about archiving the reservation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUnarchiveReservationsRequest {\n /**\n * Reservation IDs to unarchive.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n reservationIds: string[];\n}\n\nexport interface BulkUnarchiveReservationsResponse {\n /**\n * Result of bulk unarchive action\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUnarchiveReservationsResult[];\n /** Metadata for the API call. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUnarchiveReservationsResult {\n /** Metadata about unarchiving the reservation. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n /** Information about the reservation that was created and event metadata. */\n createdEvent?: EntityCreatedEvent;\n /** Information about the reservation that was updated and event metadata. */\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface RemoveReservationMigrationNotesRequest {\n /**\n * Reservation ID.\n * @format GUID\n */\n reservationId?: string;\n /** Revision. */\n revision?: string;\n}\n\nexport interface RemoveReservationMigrationNotesResponse {\n reservation?: Reservation;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateReservationApplicationErrors = {\n code?: 'TIME_NOT_AVAILABLE';\n description?: string;\n data?: ReservationDetailsConflicts;\n};\n/** @docsIgnore */\nexport type CreateReservationValidationErrors = {\n ruleName?: 'RESERVATION_VIOLATION';\n};\n/** @docsIgnore */\nexport type UpdateReservationApplicationErrors = {\n code?: 'TIME_NOT_AVAILABLE';\n description?: string;\n data?: ReservationDetailsConflicts;\n};\n/** @docsIgnore */\nexport type UpdateReservationValidationErrors = {\n ruleName?: 'RESERVATION_VIOLATION';\n};\n/** @docsIgnore */\nexport type CreateHeldReservationApplicationErrors = {\n code?: 'MUST_BE_PREMIUM';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type ReserveReservationApplicationErrors =\n | {\n code?: 'MUST_BE_PREMIUM';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAN_NOT_BE_UPDATED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CancelReservationApplicationErrors =\n | {\n code?: 'PHONE_NUMBER_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PHONE_NUMBER_INCORRECT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAN_NOT_BE_UPDATED';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\ninterface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface ReservationCreatedEnvelope {\n entity: Reservation;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reservation is created.\n * @permissionScope Manage Reservations (Medium)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM\n * @permissionScope Manage Reservations (Full)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @webhook\n * @eventType wix.table_reservations.v1.reservation_created\n * @serviceIdentifier wix.table_reservations.reservation.v1.ReservationsService\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onReservationCreated(\n handler: (event: ReservationCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ReservationDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a reservation is deleted.\n * @permissionScope Manage Reservations (Medium)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM\n * @permissionScope Manage Reservations (Full)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @webhook\n * @eventType wix.table_reservations.v1.reservation_deleted\n * @serviceIdentifier wix.table_reservations.reservation.v1.ReservationsService\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onReservationDeleted(\n handler: (event: ReservationDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface ReservationUpdatedEnvelope {\n entity: Reservation;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a reservation is canceled.\n * @permissionScope Manage Reservations (Medium)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM\n * @permissionScope Manage Reservations (Full)\n * @permissionScopeId SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-FULL\n * @permissionScope Manage Restaurants - all permissions\n * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @webhook\n * @eventType wix.table_reservations.v1.reservation_updated\n * @serviceIdentifier wix.table_reservations.reservation.v1.ReservationsService\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onReservationUpdated(\n handler: (event: ReservationUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a new reservation.\n *\n * `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.\n *\n * **Status and source**\n *\n * If a `status` is not provided, it will be set to:\n * * `RESERVED` if manual approval is not required for confirmation\n * * `REQUESTED` if manual approval is required for confirmation.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields will result in an error.\n *\n * **Permissions**\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.\n *\n *\n * > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.\n * @param reservation - Reservation details.\n * @public\n * @documentationMaturity preview\n * @requiredField reservation\n * @requiredField reservation.details\n * @requiredField reservation.details.partySize\n * @requiredField reservation.details.reservationLocationId\n * @requiredField reservation.details.startDate\n * @param options - Options for creating the reservation.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE_FORCE\n * @applicableIdentity APP\n * @returns Reservation.\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.CreateReservation\n */\nexport async function createReservation(\n reservation: NonNullablePaths<\n Reservation,\n | `details`\n | `details.partySize`\n | `details.reservationLocationId`\n | `details.startDate`,\n 3\n >,\n options?: CreateReservationOptions\n): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: CreateReservationApplicationErrors;\n __validationErrorsType?: CreateReservationValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservation: reservation,\n force: options?.force,\n ignoreTableCombinationConflicts: options?.ignoreTableCombinationConflicts,\n ignoreReservationLocationConflicts:\n options?.ignoreReservationLocationConflicts,\n ignoreConflicts: options?.ignoreConflicts,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.createReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reservation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservation: '$[0]',\n force: '$[1].force',\n ignoreTableCombinationConflicts:\n '$[1].ignoreTableCombinationConflicts',\n ignoreReservationLocationConflicts:\n '$[1].ignoreReservationLocationConflicts',\n ignoreConflicts: '$[1].ignoreConflicts',\n },\n singleArgumentUnchanged: false,\n },\n ['reservation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateReservationOptions {\n /**\n * If creation is forced.\n * @deprecated If creation is forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * Ignore table combination conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"RESERVED\"`: One or more of the chosen tables are already reserved.\n * * `\"TOO_BIG\"`: The party is too big for the selected table.\n * * `\"TOO_SMALL\"`: The party is too small for the selected table.\n * * `\"OFFLINE_ONLY\"`: The restaurant does not allow online reservations.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * Ignored reservation location conflicts of the types specified in the array. This ensures that the reservation is created even if the given conflicts would normally prevent it.\n *\n * Possible values:\n * * `\"PARTY_PACING\"`: The restaurant cannot accommodate a party of the given size according to party pacing settings.\n * * `\"SEAT_PACING\"`: The required number of seats are unavailable according to seat pacing settings.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\n/**\n * Retrieves a reservation.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @param reservationId - Reservation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @returns Reservation.\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.GetReservation\n */\nexport async function getReservation(\n reservationId: string,\n options?: GetReservationOptions\n): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n fieldSet: options?.fieldSet,\n fieldsets: options?.fieldsets,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.getReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reservation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservationId: '$[0]',\n fieldSet: '$[1].fieldSet',\n fieldsets: '$[1].fieldsets',\n },\n singleArgumentUnchanged: false,\n },\n ['reservationId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetReservationOptions {\n /**\n * Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @deprecated Predefined sets of fields to return.\n *\n * You can only retrieve the `FULL` fieldset if the [identity](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities) you're authenticated as has the `MANAGE RESERVATIONS (MEDIUM)` or `MANAGE RESERVATIONS (FULL)` permission scopes.\n * @replacedBy fieldsets\n * @targetRemovalDate 2023-11-01\n */\n fieldSet?: SetWithLiterals;\n /**\n * Array of named, predefined sets of projected fields to be returned.\n *\n * Supported values: `PUBLIC`, `FULL`.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n * @maxSize 1\n * @deprecated Array of named, predefined sets of projected fields to be returned.\n * Default: If `fields` is omitted from the request, `PUBLIC`.\n * @targetRemovalDate 2025-06-26\n */\n fieldsets?: SetWithLiterals[];\n}\n\n/**\n * Updates a reservation.\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites.\n * @param _id - Reservation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField reservation\n * @requiredField reservation.revision\n * @param options - Options for updating the reservation.\n * @param reservation - Reservation information to update.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_UPDATE\n * @permissionId TABLE_RESERVATIONS.RESERVATION_UPDATE_FORCE\n * @applicableIdentity APP\n * @returns Reservation.\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.UpdateReservation\n */\nexport async function updateReservation(\n _id: string,\n reservation: NonNullablePaths<UpdateReservation, `revision`, 2>,\n options?: UpdateReservationOptions\n): Promise<\n NonNullablePaths<\n Reservation,\n | `status`\n | `source`\n | `details.tableIds`\n | `details.tables.ids`\n | `paymentStatus`,\n 4\n > & {\n __applicationErrorsType?: UpdateReservationApplicationErrors;\n __validationErrorsType?: UpdateReservationValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservation: { ...reservation, id: _id },\n force: options?.force,\n ignoreTableCombinationConflicts: options?.ignoreTableCombinationConflicts,\n ignoreReservationLocationConflicts:\n options?.ignoreReservationLocationConflicts,\n ignoreConflicts: options?.ignoreConflicts,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.updateReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.reservation!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { reservation: '$[1]' },\n explicitPathsToArguments: {\n 'reservation.id': '$[0]',\n force: '$[2].force',\n ignoreTableCombinationConflicts:\n '$[2].ignoreTableCombinationConflicts',\n ignoreReservationLocationConflicts:\n '$[2].ignoreReservationLocationConflicts',\n ignoreConflicts: '$[2].ignoreConflicts',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'reservation', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateReservation {\n /**\n * Reservation ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Status of the reservation.\n *\n * 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.\n */\n status?: StatusWithLiterals;\n /**\n * Reservation source.\n *\n * This indicates how the reservation was made.\n */\n source?: SourceWithLiterals;\n /** Reservation details. */\n details?: Details;\n /**\n * Information about the person the reservation is being made for.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields results in an error.\n */\n reservee?: Reservee;\n /**\n * Information about the person making the reservation.\n *\n * This field is required if the reservation's `source` is anything other than `WALK_IN`.\n * @readonly\n */\n reservedBy?: ReservedBy;\n /**\n * Team message.\n *\n * A message for the restaurant staff containing any additional information regarding the reservation, such as special requirements for the guests.\n * @maxLength 10000\n */\n teamMessage?: string | null;\n /**\n * Date and time the reservation was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the reservation was changed.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Revision number, which increments by 1 each time the reservation is updated.\n * To prevent conflicting changes, the current revision must be specified when updating the reservation.\n *\n * Ignored when creating a reservation.\n * @readonly\n */\n revision?: string | null;\n /**\n * The reason the reservation was declined.\n * @maxLength 1000\n */\n declineReason?: string | null;\n /**\n * Payment status.\n * @readonly\n */\n paymentStatus?: PaymentStatusWithLiterals;\n /**\n * Custom field data for the reservation object.\n *\n * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Whether the reservation is archived.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @readonly\n */\n archived?: boolean | null;\n}\n\nexport interface UpdateReservationOptions {\n /**\n * If update should be forced.\n * @deprecated If update should be forced.\n * @replacedBy ignore_table_combination_conflicts\n * @targetRemovalDate 2023-11-01\n */\n force?: boolean;\n /**\n * 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.\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreTableCombinationConflicts?: TableCombinationConflictTypeWithLiterals[];\n /**\n * @maxSize 10\n * @deprecated\n * @replacedBy ignore_conflicts\n * @targetRemovalDate 2025-12-05\n */\n ignoreReservationLocationConflicts?: ReservationLocationConflictTypeWithLiterals[];\n /** Conflicts to ignore. */\n ignoreConflicts?: IgnoreConflicts;\n}\n\n/**\n * Creates a new temporary reservation and holds it for the customer for 10 minutes.\n *\n * Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.\n *\n * You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.\n *\n * If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.\n *\n * @param reservationDetails - Held reservation information to update.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationDetails\n * @requiredField reservationDetails.partySize\n * @requiredField reservationDetails.reservationLocationId\n * @requiredField reservationDetails.startDate\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CREATE_HELD\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.CreateHeldReservation\n */\nexport async function createHeldReservation(\n reservationDetails: NonNullablePaths<\n HeldReservationDetails,\n `partySize` | `reservationLocationId` | `startDate`,\n 2\n >\n): Promise<\n NonNullablePaths<\n CreateHeldReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CreateHeldReservationApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationDetails: reservationDetails,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.createHeldReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationDetails: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationDetails']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Reserves or requests a held reservation.\n *\n * Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.\n *\n * They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.\n *\n * `Reserve Reservation` changes a reservation's `HELD` status to:\n * * `RESERVED` if the reservation's reservation location does not require manual approval.\n * * `REQUESTED` if the reservation's reservation location requires manual approval.\n * @param reservationId - Reservation ID.\n * @param reservee - Reservee details.\n * @param revision - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @requiredField reservee\n * @requiredField reservee.firstName\n * @requiredField reservee.phone\n * @requiredField revision\n * @permissionId TABLE_RESERVATIONS.RESERVATION_RESERVE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.ReserveReservation\n */\nexport async function reserveReservation(\n reservationId: string,\n reservee: NonNullablePaths<Reservee, `firstName` | `phone`, 2>,\n revision: string\n): Promise<\n NonNullablePaths<\n ReserveReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: ReserveReservationApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n reservee: reservee,\n revision: revision,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.reserveReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservationId: '$[0]',\n reservee: '$[1]',\n revision: '$[2]',\n },\n singleArgumentUnchanged: false,\n },\n ['reservationId', 'reservee', 'revision']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Cancels a reservation.\n *\n * Sets the reservation status to `CANCELED`.\n * @param reservationId - Reservation ID.\n * @param revision - Revision number.\n *\n * Specify the existing `revision` to prevent conflicting updates to reservations.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @requiredField revision\n * @param options - Options for canceling the reservation.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_CANCEL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.CancelReservation\n */\nexport async function cancelReservation(\n reservationId: string,\n revision: string,\n options?: CancelReservationOptions\n): Promise<\n NonNullablePaths<\n CancelReservationResponse,\n | `reservation.status`\n | `reservation.source`\n | `reservation.details.tableIds`\n | `reservation.details.tables.ids`\n | `reservation.paymentStatus`,\n 5\n > & {\n __applicationErrorsType?: CancelReservationApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n revision: revision,\n phone: options?.phone,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.cancelReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n reservationId: '$[0]',\n revision: '$[1]',\n phone: '$[2].phone',\n },\n singleArgumentUnchanged: false,\n },\n ['reservationId', 'revision', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CancelReservationOptions {\n /**\n * The phone number that was provided when the reservation was created.\n *\n * This requirement provides additional security by ensuring that the canceling party knows both the reservation's `reservationId` and the reservee's `phone`.\n * @format PHONE\n */\n phone?: string | null;\n}\n\n/**\n * Deletes a reservation. Only reservations with the `HELD` status can be deleted.\n * @param reservationId - Reservation ID.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationId\n * @permissionId TABLE_RESERVATIONS.RESERVATION_DELETE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.DeleteReservation\n */\nexport async function deleteReservation(reservationId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationId: reservationId,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.deleteReservation(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 reservations.\n * @public\n * @documentationMaturity preview\n * @param options - Options for listing the reservations.\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.ListReservations\n */\nexport async function listReservations(\n options?: ListReservationsOptions\n): Promise<\n NonNullablePaths<\n ListReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n paging: options?.paging,\n sort: options?.sort,\n startDateFrom: options?.startDateFrom,\n startDateTo: options?.startDateTo,\n status: options?.status,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.listReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n paging: '$[0].paging',\n sort: '$[0].sort',\n startDateFrom: '$[0].startDateFrom',\n startDateTo: '$[0].startDateTo',\n status: '$[0].status',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListReservationsOptions {\n /** 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`. */\n paging?: CursorPaging;\n /** Defines how reservations in the response are sorted. */\n sort?: Sorting;\n /** Only reservations starting after this date are returned. */\n startDateFrom?: Date | null;\n /** Only reservations starting before this date are returned. */\n startDateTo?: Date | null;\n /** Only reservations with this status are returned. */\n status?: StatusWithLiterals;\n}\n\n/**\n * Creates a query to retrieve a list of reservations.\n *\n * The `queryReservations()` function builds a query to retrieve a list of reservations and returns a `ReservationsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.\n *\n * You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.\n *\n * `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:\n *\n * * [`limit(50)`](/reservations/reservations-query-builder/limit)\n * * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)\n *\n * The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-result/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).\n * @public\n * @documentationMaturity preview\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.QueryReservations\n */\nexport function queryReservations(): ReservationsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Reservation,\n 'CURSOR',\n QueryReservationsRequest,\n QueryReservationsResponse\n >({\n func: async (payload: QueryReservationsRequest) => {\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.queryReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryReservationsRequest['query']) => {\n const args = [query, {}] as [QueryReservationsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryReservationsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.reservations,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ReservationsQueryResult extends QueryCursorResult {\n items: Reservation[];\n query: ReservationsQueryBuilder;\n next: () => Promise<ReservationsQueryResult>;\n prev: () => Promise<ReservationsQueryResult>;\n}\n\nexport interface ReservationsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'status' | 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'status' | 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'status' | 'details.startDate',\n value: any\n ) => ReservationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'details.startDate'>\n ) => ReservationsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'details.startDate'>\n ) => ReservationsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ReservationsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ReservationsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ReservationsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.QueryReservations\n * @requiredField query\n */\nexport async function typedQueryReservations(\n query: ReservationQuery\n): Promise<\n NonNullablePaths<\n QueryReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.queryReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ReservationQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id', 'status'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['details.startDate'];\n operators: ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne'];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Reservation,\n ReservationQuerySpec\n>;\nexport type ReservationQuery = {\n /** \n 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`. \n */\n cursorPaging?: {\n /** \n Number of items to load. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n You can get the relevant cursor token\n from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object in the following format:\n `\"filter\" : {\n \"fieldName1\": \"value1\",\n \"fieldName2\":{\"$operator\":\"value2\"}\n }`\n\n For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n To learn how to query reservations, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n */\n sort?: {\n /** \n Name of the field to sort by. \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order.\n Default: `ASC`. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Use this method to search the fields of the table reservations on a site for a given expression.\n *\n * You can also use this method to perform data aggregations on a site's table reservation fields.\n * For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n * @param search - Search query.\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId TABLE_RESERVATIONS.RESERVATION_READ_FULL\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.SearchReservations\n */\nexport async function searchReservations(\n search: ReservationSearch\n): Promise<\n NonNullablePaths<\n SearchReservationsResponse,\n | `reservations`\n | `reservations.${number}.status`\n | `reservations.${number}.source`\n | `reservations.${number}.paymentStatus`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.scalarDate.type`\n | `aggregationData.results.${number}.scalarDate.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ search: search });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.searchReservations(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { search: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['search']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ReservationSearchSpec extends SearchSpec {\n searchable: [\n 'reservee.email',\n 'reservee.firstName',\n 'reservee.lastName',\n 'reservee.phone'\n ];\n aggregatable: [\n '_createdDate',\n '_updatedDate',\n 'archived',\n 'details.partySize',\n 'details.reservationLocationId',\n 'details.startDate',\n 'details.tableIds',\n 'details.tables.ids',\n 'paymentStatus',\n 'reservee.contactId',\n 'source',\n 'status'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$eq', '$in', '$ne'];\n fields: [\n 'archived',\n 'details.reservationLocationId',\n 'paymentStatus',\n 'reservee.contactId',\n 'source',\n 'status'\n ];\n sort: 'NONE';\n },\n {\n operators: ['$hasAll', '$hasSome', '$isEmpty'];\n fields: ['details.tableIds', 'details.tables.ids'];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne'];\n fields: [\n '_createdDate',\n '_updatedDate',\n 'details.partySize',\n 'details.startDate'\n ];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<\n Reservation,\n ReservationSearchSpec\n>;\nexport type ReservationSearch = {\n /** \n Cursor pointing to a page of results. Can't be used together with 'paging'. 'cursorPaging.cursor' can't be used together with 'filter' or 'sort'. \n */\n cursorPaging?: {\n /** \n Number of items to load. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n You can get the relevant cursor token\n from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n */\n cursor?:\n | NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object in the following format:\n `\"filter\" : {\n \"fieldName1\": \"value1\",\n \"fieldName2\":{\"$operator\":\"value2\"}\n }`\n For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article. \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n @maxSize: 100 \n */\n sort?: {\n /** \n Name of the field to sort by. \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order.\n Default: `ASC`. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n A search method for grouping data into various categories (facets) and providing summaries for each category.\n For example, use aggregations to allow site visitors to narrow down their search results by selecting specific reservation statuses, party sizes, etc. \n @maxSize: 100 \n */\n aggregations?: {\n /** \n A value aggregation calculates metrics such as \"count\" for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of reservations (count) of each status that have been made on the site. \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n A range aggregation calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. For example, use a range aggregation to compare the number of reservations made for parties of 4 or less to the number of reservations made for parties with 5 or more. \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n A scalar aggregation calculates a single numerical value from a dataset, such as the total sum, average, min, or max, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the average part size of reservations made on a site. \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n A date histogram calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.) For example, use a date histogram to find how many reservations have been made at a restaurant each week. \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n A nested aggregation is applied within the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. It allows for more complex analyses where you can summarize data at different levels of detail or hierarchy.\n For example, to get the number of reservations by party size for each week, first perform a date histogram aggregation on `details.startDate` with the interval `WEEK`, and a second value aggregation on `details.partySize`. \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n fieldPath?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['fieldPath'];\n }[];\n /** \n Free text to match in searchable fields. \n */\n search?: {\n /** \n Boolean search mode. Defines how separate search terms in the `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in.\n\n Searchable fields are `reservee.firstName`, `reservee.lastName`, `reservee.phone`, and `reservee.email`.\n\n If the array is empty, all fields are searched. \n @maxSize: 100,\n @maxLength: 1000 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to allow the search function to automatically correct typos or minor mistakes in the search expression.\n The search function uses an algorithm to find results that are close to what the site visitor typed. \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n Time zone to adjust date-time-based filters and aggregations. ISO 8601 or IANA time zone database format. \n @maxLength: 100 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Archives multiple reservations at once.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n * @param reservationIds - IDs of reservations to archive.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationIds\n * @permissionId TABLE_RESERVATIONS.RESERVATION_ARCHIVE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.BulkArchiveReservations\n */\nexport async function bulkArchiveReservations(\n reservationIds: string[]\n): Promise<\n NonNullablePaths<\n BulkArchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationIds: reservationIds,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.bulkArchiveReservations(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Unarchives multiple reservations at once.\n * @param reservationIds - Reservation IDs to unarchive.\n * @public\n * @documentationMaturity preview\n * @requiredField reservationIds\n * @permissionId TABLE_RESERVATIONS.RESERVATION_UNARCHIVE\n * @applicableIdentity APP\n * @fqn wix.table_reservations.reservation.v1.ReservationsService.BulkUnarchiveReservations\n */\nexport async function bulkUnarchiveReservations(\n reservationIds: string[]\n): Promise<\n NonNullablePaths<\n BulkUnarchiveReservationsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n reservationIds: reservationIds,\n });\n\n const reqOpts =\n ambassadorWixTableReservationsV1Reservation.bulkUnarchiveReservations(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { reservationIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['reservationIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixTableReservationsReservationV1ReservationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/table-reservations/reservations',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/table-reservations/reservations',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_table-reservations_reservations';\n\n/**\n * Creates a new reservation.\n *\n * `createReservation()` accepts and requires different fields depending on the `status` provided and your permissions.\n *\n * **Status and source**\n *\n * If a `status` is not provided, it will be set to:\n * * `RESERVED` if manual approval is not required for confirmation\n * * `REQUESTED` if manual approval is required for confirmation.\n *\n * A reservation created with any `source` other than `WALK_IN` requires the `reservation.reservee.phone` and `reservation.reservee.firstName` fields.\n * Attempting to create a reservation without these fields will result in an error.\n *\n * **Permissions**\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, or `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * If `source` is not provided, its value is set depending on the permissions of the user making the call. See this API's Introduction article for more information.\n *\n *\n * > **Note:** `createReservation()` requires all details of the reservation upfront. The process of creating a reservation can be broken up using `createHeldReservation`. `createHeldReservation` creates a temporary reservation that expires automatically unless it is completed with the addition of more details using `reserveReservation()`.\n */\nexport function createReservation(payload: object): RequestOptionsFactory<any> {\n function __createReservation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.CreateReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createReservation;\n}\n\n/**\n * Retrieves a reservation.\n *\n * Calling this method with `fieldsets` set to `FULL` requires additional permissions. See this API's Introduction article for more information.\n */\nexport function getReservation(payload: object): RequestOptionsFactory<any> {\n function __getReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'GET' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.GetReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getReservation;\n}\n\n/**\n * Updates a reservation.\n *\n * Including the fields `status`, `source`, `reservation.details.tableIds`, `reservation.details.endDate`, `ignoreReservationLocationConflicts`, and `ignoreTableCombinationConflicts` in the request requires additional permissions. See this API's Introduction article for more information.\n *\n * Each time the reservation is updated, revision increments by 1. The existing revision must be included when updating the reservation. This ensures you're working with the latest reservation information, and it prevents unintended overwrites.\n */\nexport function updateReservation(payload: object): RequestOptionsFactory<any> {\n function __updateReservation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'mask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'PATCH' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.UpdateReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservation.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateReservation;\n}\n\n/**\n * Creates a new temporary reservation and holds it for the customer for 10 minutes.\n *\n * Creates a new reservation with the `HELD` status. `HELD` reservations are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to change a `HELD` reservation’s status after 10 minutes returns an error.\n *\n * You cannot call `updateReservation()` to change a reservation’s status from `HELD`. Trying to do so returns an error. Instead, you should use `reserveReservation()`.\n *\n * If you do not wish to have `HELD` reservations in your flow, you can create a reservation with all required details using `createReservation()`.\n *\n */\nexport function createHeldReservation(\n payload: object\n): RequestOptionsFactory<any> {\n function __createHeldReservation({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'reservationDetails.startDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.CreateHeldReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/hold',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createHeldReservation;\n}\n\n/**\n * Reserves or requests a held reservation.\n *\n * Held reservations are temporary reservations with the `HELD` status created by `createHeldReservation()`.\n *\n * They are intended to reserve seats and tables for a party in a selected time slot while they enter further reservation details, such as names and contact information. Reservations with the `HELD` status are only valid for 10 minutes. Trying to call `Reserve Reservation` with a held reservation older than 10 minutes returns an error.\n *\n * `Reserve Reservation` changes a reservation's `HELD` status to:\n * * `RESERVED` if the reservation's reservation location does not require manual approval.\n * * `REQUESTED` if the reservation's reservation location requires manual approval.\n */\nexport function reserveReservation(\n payload: object\n): RequestOptionsFactory<any> {\n function __reserveReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.ReserveReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}/reserve',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __reserveReservation;\n}\n\n/**\n * Cancels a reservation.\n *\n * Sets the reservation status to `CANCELED`.\n */\nexport function cancelReservation(payload: object): RequestOptionsFactory<any> {\n function __cancelReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.CancelReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservation.createdDate' },\n { path: 'reservation.updatedDate' },\n { path: 'reservation.details.startDate' },\n { path: 'reservation.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cancelReservation;\n}\n\n/** Deletes a reservation. Only reservations with the `HELD` status can be deleted. */\nexport function deleteReservation(payload: object): RequestOptionsFactory<any> {\n function __deleteReservation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'DELETE' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.DeleteReservation',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/{reservationId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteReservation;\n}\n\n/** Retrieves a list of up to 100 reservations. */\nexport function listReservations(payload: object): RequestOptionsFactory<any> {\n function __listReservations({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'startDateFrom' }, { path: 'startDateTo' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'GET' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.ListReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservations.createdDate' },\n { path: 'reservations.updatedDate' },\n { path: 'reservations.details.startDate' },\n { path: 'reservations.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listReservations;\n}\n\n/**\n * Creates a query to retrieve a list of reservations.\n *\n * The `queryReservations()` function builds a query to retrieve a list of reservations and returns a `ReservationsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [find()](/reservations/reservations-query-builder/find) function.\n *\n * You can refine the query by chaining `ReservationsQueryBuilder` functions onto the query. `ReservationsQueryBuilder` functions enable you to filter, sort, and control the results that `queryReservations()` returns.\n *\n * `queryReservations()` runs with the following `ReservationsQueryBuilder` defaults, which you can override:\n *\n * * [`limit(50)`](/reservations/reservations-query-builder/limit)\n * * [`descending('_createdDate')`](/reservations/reservations-query-builder/descending)\n *\n * The following `ReservationsQueryBuilder` functions are supported for `queryReservations()`. For a full description of the reservation object, see the object returned for the [`items`](/reservations/reservations-query-result/items) property in [`ReservationsQueryResult`](/reservations/reservations-query-result).\n */\nexport function queryReservations(payload: object): RequestOptionsFactory<any> {\n function __queryReservations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.QueryReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservations.createdDate' },\n { path: 'reservations.updatedDate' },\n { path: 'reservations.details.startDate' },\n { path: 'reservations.details.endDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryReservations;\n}\n\n/**\n * Use this method to search the fields of the table reservations on a site for a given expression.\n *\n * You can also use this method to perform data aggregations on a site's table reservation fields.\n * For a detailed list of supported operations, see the [Sorting, Filtering, and Search](https://dev.wix.com/docs/rest/api-reference/wix-restaurants/reservations/reservations/sorting-filtering-and-search) article.\n */\nexport function searchReservations(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchReservations({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.SearchReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/reservations/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'reservations.createdDate' },\n { path: 'reservations.updatedDate' },\n { path: 'reservations.details.startDate' },\n { path: 'reservations.details.endDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __searchReservations;\n}\n\n/**\n * Archives multiple reservations at once.\n *\n * Archived reservations aren't shown in the dashboard along with other reservations. However, they can still be viewed in a separate section.\n * Archived reservations can't be updated with Update Reservation.\n */\nexport function bulkArchiveReservations(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkArchiveReservations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.BulkArchiveReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/bulk/reservations/archive',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkArchiveReservations;\n}\n\n/** Unarchives multiple reservations at once. */\nexport function bulkUnarchiveReservations(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUnarchiveReservations({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.table_reservations.v1.reservation',\n method: 'POST' as any,\n methodFqn:\n 'wix.table_reservations.reservation.v1.ReservationsService.BulkUnarchiveReservations',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixTableReservationsReservationV1ReservationsServiceUrl({\n protoPath: '/v1/bulk/reservations/unarchive',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUnarchiveReservations;\n}\n","import {\n createReservation as publicCreateReservation,\n getReservation as publicGetReservation,\n updateReservation as publicUpdateReservation,\n createHeldReservation as publicCreateHeldReservation,\n reserveReservation as publicReserveReservation,\n cancelReservation as publicCancelReservation,\n deleteReservation as publicDeleteReservation,\n listReservations as publicListReservations,\n queryReservations as publicQueryReservations,\n typedQueryReservations as publicTypedQueryReservations,\n searchReservations as publicSearchReservations,\n bulkArchiveReservations as publicBulkArchiveReservations,\n bulkUnarchiveReservations as publicBulkUnarchiveReservations,\n} from './table-reservations-v1-reservation-reservations.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ReservationQuery,\n ReservationsQueryBuilder,\n typedQueryReservations as universalTypedQueryReservations,\n} from './table-reservations-v1-reservation-reservations.universal.js';\nimport { onReservationCreated as publicOnReservationCreated } from './table-reservations-v1-reservation-reservations.public.js';\nimport { onReservationDeleted as publicOnReservationDeleted } from './table-reservations-v1-reservation-reservations.public.js';\nimport { onReservationUpdated as publicOnReservationUpdated } from './table-reservations-v1-reservation-reservations.public.js';\n\nfunction customQueryReservations(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryReservations(httpClient)(),\n typedQueryFunction: (query: ReservationQuery) =>\n publicTypedQueryReservations(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ReservationsQueryBuilder;\n function overloadedQuery(\n query: ReservationQuery\n ): ReturnType<typeof universalTypedQueryReservations>;\n function overloadedQuery(query?: ReservationQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createReservation: MaybeContext<\n BuildRESTFunction<typeof publicCreateReservation> &\n typeof publicCreateReservation\n> = /*#__PURE__*/ createRESTModule(publicCreateReservation);\nexport const getReservation: MaybeContext<\n BuildRESTFunction<typeof publicGetReservation> & typeof publicGetReservation\n> = /*#__PURE__*/ createRESTModule(publicGetReservation);\nexport const updateReservation: MaybeContext<\n BuildRESTFunction<typeof publicUpdateReservation> &\n typeof publicUpdateReservation\n> = /*#__PURE__*/ createRESTModule(publicUpdateReservation);\nexport const createHeldReservation: MaybeContext<\n BuildRESTFunction<typeof publicCreateHeldReservation> &\n typeof publicCreateHeldReservation\n> = /*#__PURE__*/ createRESTModule(publicCreateHeldReservation);\nexport const reserveReservation: MaybeContext<\n BuildRESTFunction<typeof publicReserveReservation> &\n typeof publicReserveReservation\n> = /*#__PURE__*/ createRESTModule(publicReserveReservation);\nexport const cancelReservation: MaybeContext<\n BuildRESTFunction<typeof publicCancelReservation> &\n typeof publicCancelReservation\n> = /*#__PURE__*/ createRESTModule(publicCancelReservation);\nexport const deleteReservation: MaybeContext<\n BuildRESTFunction<typeof publicDeleteReservation> &\n typeof publicDeleteReservation\n> = /*#__PURE__*/ createRESTModule(publicDeleteReservation);\nexport const listReservations: MaybeContext<\n BuildRESTFunction<typeof publicListReservations> &\n typeof publicListReservations\n> = /*#__PURE__*/ createRESTModule(publicListReservations);\nexport const searchReservations: MaybeContext<\n BuildRESTFunction<typeof publicSearchReservations> &\n typeof publicSearchReservations\n> = /*#__PURE__*/ createRESTModule(publicSearchReservations);\nexport const bulkArchiveReservations: MaybeContext<\n BuildRESTFunction<typeof publicBulkArchiveReservations> &\n typeof publicBulkArchiveReservations\n> = /*#__PURE__*/ createRESTModule(publicBulkArchiveReservations);\nexport const bulkUnarchiveReservations: MaybeContext<\n BuildRESTFunction<typeof publicBulkUnarchiveReservations> &\n typeof publicBulkUnarchiveReservations\n> = /*#__PURE__*/ createRESTModule(publicBulkUnarchiveReservations);\nexport const queryReservations: MaybeContext<\n BuildRESTFunction<typeof customQueryReservations> &\n typeof customQueryReservations\n> = /*#__PURE__*/ createRESTModule(customQueryReservations);\n/**\n * Triggered when a reservation is created.\n */\nexport const onReservationCreated: BuildEventDefinition<\n typeof publicOnReservationCreated\n> &\n typeof publicOnReservationCreated = createEventModule(\n publicOnReservationCreated\n);\n/**\n * Triggered when a reservation is deleted.\n */\nexport const onReservationDeleted: BuildEventDefinition<\n typeof publicOnReservationDeleted\n> &\n typeof publicOnReservationDeleted = createEventModule(\n publicOnReservationDeleted\n);\n/**\n * Triggered when a reservation is canceled.\n */\nexport const onReservationUpdated: BuildEventDefinition<\n typeof publicOnReservationUpdated\n> &\n typeof publicOnReservationUpdated = createEventModule(\n publicOnReservationUpdated\n);\n\nexport {\n Status,\n Source,\n PaymentStatus,\n TableCombinationConflictType,\n ReservationLocationConflictType,\n ExperienceTableCombinationConflictType,\n ExperienceConflictType,\n IgnoreConflictsType,\n Type,\n Set,\n SortOrder,\n SortType,\n SortDirection,\n MissingValues,\n ScalarType,\n NestedAggregationType,\n Interval,\n AggregationType,\n Mode,\n WebhookIdentityType,\n} from './table-reservations-v1-reservation-reservations.universal.js';\nexport {\n Reservation,\n Tables,\n Details,\n Reservee,\n ReservedBy,\n MigrationNote,\n TableWithReservationConflicts,\n ExtendedFields,\n ReservationDelayedDomainEvent,\n ReservationDelayedDomainEventBodyTypeOneOf,\n ReservationCreated,\n ReservationUpdated,\n ReservationDelayedDomainEventReservationCanceled,\n CreateReservationRequest,\n IgnoreConflicts,\n IgnoreConflictsIgnoreConflictsOptionsOneOf,\n StandardOptions,\n ExperienceOptions,\n CreateReservationResponse,\n ReservationDetailsConflicts,\n TableCombinationConflict,\n ReservationLocationConflict,\n ExperienceTableCombinationConflict,\n ExperienceConflict,\n ConflictsStandardOptions,\n ConflictsExperienceOptions,\n Conflicts,\n ConflictsOptionsOneOf,\n CreateGoogleReservationRequest,\n CreateGoogleReservationResponse,\n GetReservationRequest,\n GetReservationResponse,\n UpdateReservationRequest,\n UpdateReservationResponse,\n CreateHeldReservationRequest,\n HeldReservationDetails,\n CreateHeldReservationResponse,\n ReserveReservationRequest,\n ReserveReservationResponse,\n CancelReservationRequest,\n CancelReservationResponse,\n ReservationCanceled,\n DeleteReservationRequest,\n DeleteReservationResponse,\n ListReservationsRequest,\n CursorPaging,\n Sorting,\n ListReservationsResponse,\n CursorPagingMetadata,\n Cursors,\n QueryReservationsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n QueryReservationsResponse,\n SearchReservationsRequest,\n CursorSearch,\n CursorSearchPagingMethodOneOf,\n Aggregation,\n AggregationKindOneOf,\n RangeBucket,\n IncludeMissingValuesOptions,\n ValueAggregation,\n ValueAggregationOptionsOneOf,\n RangeAggregation,\n ScalarAggregation,\n DateHistogramAggregation,\n NestedAggregationItem,\n NestedAggregationItemKindOneOf,\n NestedAggregation,\n SearchDetails,\n SearchReservationsResponse,\n AggregationData,\n ValueAggregationResult,\n RangeAggregationResult,\n NestedAggregationResults,\n NestedAggregationResultsResultOneOf,\n ValueResults,\n RangeResults,\n AggregationResultsScalarResult,\n NestedValueAggregationResult,\n ValueResult,\n RangeResult,\n ScalarResult,\n ScalarDateResult,\n NestedResultValue,\n NestedResultValueResultOneOf,\n Results,\n DateHistogramResult,\n GroupByValueResults,\n DateHistogramResults,\n NestedResults,\n AggregationResultsScalarDateResult,\n AggregationResults,\n AggregationResultsResultOneOf,\n BulkArchiveReservationsRequest,\n BulkArchiveReservationsResponse,\n BulkArchiveReservationsResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n BulkUnarchiveReservationsRequest,\n BulkUnarchiveReservationsResponse,\n BulkUnarchiveReservationsResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n RemoveReservationMigrationNotesRequest,\n RemoveReservationMigrationNotesResponse,\n RawHttpRequest,\n PathParametersEntry,\n QueryParametersEntry,\n HeadersEntry,\n RawHttpResponse,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n ReservationCreatedEnvelope,\n ReservationDeletedEnvelope,\n ReservationUpdatedEnvelope,\n CreateReservationOptions,\n GetReservationOptions,\n UpdateReservation,\n UpdateReservationOptions,\n CancelReservationOptions,\n ListReservationsOptions,\n ReservationsQueryResult,\n ReservationsQueryBuilder,\n ReservationQuerySpec,\n ReservationSearchSpec,\n} from './table-reservations-v1-reservation-reservations.universal.js';\nexport {\n StatusWithLiterals,\n SourceWithLiterals,\n PaymentStatusWithLiterals,\n TableCombinationConflictTypeWithLiterals,\n ReservationLocationConflictTypeWithLiterals,\n ExperienceTableCombinationConflictTypeWithLiterals,\n ExperienceConflictTypeWithLiterals,\n IgnoreConflictsTypeWithLiterals,\n TypeWithLiterals,\n SetWithLiterals,\n SortOrderWithLiterals,\n SortTypeWithLiterals,\n SortDirectionWithLiterals,\n MissingValuesWithLiterals,\n ScalarTypeWithLiterals,\n NestedAggregationTypeWithLiterals,\n IntervalWithLiterals,\n AggregationTypeWithLiterals,\n ModeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateReservationApplicationErrors,\n CreateReservationValidationErrors,\n UpdateReservationApplicationErrors,\n UpdateReservationValidationErrors,\n CreateHeldReservationApplicationErrors,\n ReserveReservationApplicationErrors,\n CancelReservationApplicationErrors,\n CommonQueryWithEntityContext,\n ReservationQuery,\n CommonSearchWithEntityContext,\n ReservationSearch,\n} from './table-reservations-v1-reservation-reservations.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iCAAAA;AAAA,EAAA,iCAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,yBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2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iCAA0C;AAU1C,SAAS,wBAAwB,YAAwB;AACvD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,mBAAwB,UAAU,EAAE;AAAA,IAChE,oBAAoB,CAAC,UACnBC,wBAA6B,UAAU,EAAE,KAAK;AAAA,IAChD,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA+B;AACtD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMC,oBAGK,2DAAiBA,iBAAsB;AAClD,IAAMC,sBAGK,2DAAiBA,mBAAwB;AACpD,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,6BAGK,2DAAiBA,0BAA+B;AAC3D,IAAMZ,qBAGK,2DAAiB,uBAAuB;AAInD,IAAMa,4BAGyB;AAAA,EACpC;AACF;AAIO,IAAMC,4BAGyB;AAAA,EACpC;AACF;AAIO,IAAMC,4BAGyB;AAAA,EACpC;AACF;","names":["bulkArchiveReservations","bulkUnarchiveReservations","cancelReservation","createHeldReservation","createReservation","deleteReservation","getReservation","listReservations","onReservationCreated","onReservationDeleted","onReservationUpdated","queryReservations","reserveReservation","searchReservations","updateReservation","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","Status","Source","PaymentStatus","TableCombinationConflictType","ReservationLocationConflictType","ExperienceTableCombinationConflictType","ExperienceConflictType","IgnoreConflictsType","Type","Set","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","Mode","WebhookIdentityType","createReservation","sdkTransformError","getReservation","updateReservation","createHeldReservation","reserveReservation","cancelReservation","deleteReservation","listReservations","queryReservations","searchReservations","bulkArchiveReservations","bulkUnarchiveReservations","createReservation","getReservation","updateReservation","createHeldReservation","reserveReservation","cancelReservation","deleteReservation","listReservations","queryReservations","typedQueryReservations","searchReservations","bulkArchiveReservations","bulkUnarchiveReservations","import_rest_modules","queryReservations","typedQueryReservations","createReservation","getReservation","updateReservation","createHeldReservation","reserveReservation","cancelReservation","deleteReservation","listReservations","searchReservations","bulkArchiveReservations","bulkUnarchiveReservations","onReservationCreated","onReservationDeleted","onReservationUpdated"]}