@wix/auto_sdk_seatings_seating-reservation 1.0.5 → 1.0.7

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.
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  interface SeatingReservation {
2
4
  /**
3
5
  * The id of the reservation
@@ -298,20 +300,20 @@ interface QuerySeatingReservationRequest {
298
300
  query: QueryV2;
299
301
  }
300
302
  interface QueryV2 extends QueryV2PagingMethodOneOf {
301
- /** Paging options to limit and skip the number of items. */
303
+ /** Paging options to limit and offset the number of items. */
302
304
  paging?: Paging;
303
305
  /** 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`. */
304
306
  cursorPaging?: CursorPaging;
305
307
  /**
306
308
  * Filter object.
307
309
  *
308
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
310
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
309
311
  */
310
312
  filter?: Record<string, any> | null;
311
313
  /**
312
314
  * Sort object.
313
315
  *
314
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
316
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
315
317
  */
316
318
  sort?: Sorting[];
317
319
  /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
@@ -321,7 +323,7 @@ interface QueryV2 extends QueryV2PagingMethodOneOf {
321
323
  }
322
324
  /** @oneof */
323
325
  interface QueryV2PagingMethodOneOf {
324
- /** Paging options to limit and skip the number of items. */
326
+ /** Paging options to limit and offset the number of items. */
325
327
  paging?: Paging;
326
328
  /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
327
329
  cursorPaging?: CursorPaging;
@@ -1173,6 +1175,15 @@ declare enum WebhookIdentityType {
1173
1175
  }
1174
1176
  /** @enumType */
1175
1177
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1178
+ type CreateSeatingReservationApplicationErrors = {
1179
+ code?: 'PLACE_NOT_FOUND';
1180
+ description?: string;
1181
+ data?: Places;
1182
+ } | {
1183
+ code?: 'PLACE_RESERVED';
1184
+ description?: string;
1185
+ data?: UnavailablePlaces;
1186
+ };
1176
1187
  interface BaseEventMetadata {
1177
1188
  /**
1178
1189
  * App instance ID.
@@ -1221,14 +1232,66 @@ interface SeatingReservationCreatedEnvelope {
1221
1232
  entity: SeatingReservation;
1222
1233
  metadata: EventMetadata;
1223
1234
  }
1235
+ /** @permissionScope Manage Events
1236
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1237
+ * @permissionId SEATING_PLANS.READ_RESERVATIONS
1238
+ * @webhook
1239
+ * @eventType wix.seating.v1.seating_reservation_created
1240
+ * @slug created
1241
+ * @documentationMaturity preview
1242
+ */
1243
+ declare function onSeatingReservationCreated(handler: (event: SeatingReservationCreatedEnvelope) => void | Promise<void>): void;
1224
1244
  interface SeatingReservationDeletedEnvelope {
1225
1245
  entity: SeatingReservation;
1226
1246
  metadata: EventMetadata;
1227
1247
  }
1248
+ /** @permissionScope Manage Events
1249
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1250
+ * @permissionId SEATING_PLANS.READ_RESERVATIONS
1251
+ * @webhook
1252
+ * @eventType wix.seating.v1.seating_reservation_deleted
1253
+ * @slug deleted
1254
+ * @documentationMaturity preview
1255
+ */
1256
+ declare function onSeatingReservationDeleted(handler: (event: SeatingReservationDeletedEnvelope) => void | Promise<void>): void;
1257
+ type SeatingReservationNonNullablePaths = `reservedPlaces` | `reservedPlaces.${number}._id`;
1258
+ /**
1259
+ * Creates a seating reservation
1260
+ * @public
1261
+ * @documentationMaturity preview
1262
+ * @permissionId SEATING_PLANS.MANAGE_RESERVATIONS
1263
+ * @applicableIdentity APP
1264
+ * @returns Created reservation
1265
+ * @fqn com.wixpress.seating.SeatingReservationService.CreateSeatingReservation
1266
+ */
1267
+ declare function createSeatingReservation(options?: CreateSeatingReservationOptions): Promise<NonNullablePaths<SeatingReservation, SeatingReservationNonNullablePaths> & {
1268
+ __applicationErrorsType?: CreateSeatingReservationApplicationErrors;
1269
+ }>;
1228
1270
  interface CreateSeatingReservationOptions {
1229
1271
  /** A reservation to create */
1230
1272
  reservation?: SeatingReservation;
1231
1273
  }
1274
+ /**
1275
+ * Returns seating reservation
1276
+ * @param _id - The id of the reservation to return
1277
+ * @public
1278
+ * @documentationMaturity preview
1279
+ * @requiredField _id
1280
+ * @permissionId SEATING_PLANS.READ_RESERVATIONS
1281
+ * @applicableIdentity APP
1282
+ * @returns Created reservation
1283
+ * @fqn com.wixpress.seating.SeatingReservationService.GetReservation
1284
+ */
1285
+ declare function getReservation(_id: string): Promise<NonNullablePaths<SeatingReservation, SeatingReservationNonNullablePaths>>;
1286
+ /**
1287
+ * Lists seating reservations by query request
1288
+ * @public
1289
+ * @documentationMaturity preview
1290
+ * @permissionId SEATING_PLANS.READ_RESERVATIONS
1291
+ * @applicableIdentity APP
1292
+ * @fqn com.wixpress.seating.SeatingReservationService.QuerySeatingReservation
1293
+ */
1294
+ declare function querySeatingReservation(): ReservationsQueryBuilder;
1232
1295
  interface QueryCursorResult {
1233
1296
  cursors: Cursors;
1234
1297
  hasNext: () => boolean;
@@ -1254,6 +1317,27 @@ interface ReservationsQueryBuilder {
1254
1317
  /** @documentationMaturity preview */
1255
1318
  find: () => Promise<ReservationsQueryResult>;
1256
1319
  }
1320
+ /**
1321
+ * Deletes the seating reservation
1322
+ * @param _id - The id of the reservation to delete
1323
+ * @public
1324
+ * @documentationMaturity preview
1325
+ * @requiredField _id
1326
+ * @permissionId SEATING_PLANS.MANAGE_RESERVATIONS
1327
+ * @applicableIdentity APP
1328
+ * @fqn com.wixpress.seating.SeatingReservationService.DeleteSeatingReservation
1329
+ */
1330
+ declare function deleteSeatingReservation(_id: string): Promise<NonNullablePaths<DeleteSeatingReservationResponse, {
1331
+ [P in SeatingReservationNonNullablePaths]: `reservation.${P}`;
1332
+ }[SeatingReservationNonNullablePaths]>>;
1333
+ /** @public
1334
+ * @documentationMaturity preview
1335
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1336
+ * @applicableIdentity APP
1337
+ * @applicableIdentity VISITOR
1338
+ * @fqn com.wixpress.seating.SeatingReservationService.GetSeatingCategorySummary
1339
+ */
1340
+ declare function getSeatingCategorySummary(options?: GetSeatingCategorySummaryOptions): Promise<NonNullablePaths<GetSeatingCategorySummaryResponse, `categories`>>;
1257
1341
  interface GetSeatingCategorySummaryOptions {
1258
1342
  /**
1259
1343
  * Seating plan external id
@@ -1262,5 +1346,15 @@ interface GetSeatingCategorySummaryOptions {
1262
1346
  */
1263
1347
  externalId?: string;
1264
1348
  }
1349
+ /** @param externalId - Seating plan external id
1350
+ * @public
1351
+ * @documentationMaturity preview
1352
+ * @requiredField externalId
1353
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1354
+ * @applicableIdentity APP
1355
+ * @applicableIdentity VISITOR
1356
+ * @fqn com.wixpress.seating.SeatingReservationService.GetSeatingReservationSummary
1357
+ */
1358
+ declare function getSeatingReservationSummary(externalId: string): Promise<NonNullablePaths<GetSeatingReservationSummaryResponse, `plan.sections` | `plan.sections.${number}._id` | `plan.sections.${number}.default` | `plan.categories` | `plan.categories.${number}._id` | `plan.categories.${number}.title` | `plan.uncategorizedPlaces` | `plan.elementGroups` | `plan.elementGroups.${number}._id` | `places` | `places.${number}.placeId` | `places.${number}.occupied`>>;
1265
1359
 
1266
- export { type GetSeatingCategorySummaryRequest as $, type App as A, type QuerySeatingReservationResponse as B, type CreateSeatingReservationOptions as C, type DeleteSeatingReservationResponse as D, type PagingMetadataV2 as E, type File as F, type GetSeatingCategorySummaryOptions as G, type Cursors as H, Icon as I, type DeleteSeatingReservationRequest as J, type DeleteSeatingPlaceReservationRequest as K, type Empty as L, type CancelSeatingPlaceReservationsRequest as M, Numbering as N, type PlaceReservationDetails as O, PlaceTypeEnumType as P, type QuerySeatingReservationRequest as Q, type ReservationsQueryBuilder as R, type SeatingReservation as S, Type as T, type URI as U, type CancelSeatingPlaceReservationsResponse as V, WebhookIdentityType as W, type UpdateSeatingReservationRequest as X, type UpdateSeatingReservationResponse as Y, type GetReservedPlacesRequest as Z, type GetReservedPlacesResponse as _, type GetSeatingCategorySummaryResponse as a, type GetSeatingReservationSummaryRequest as a0, type SeatingPlan as a1, type Section as a2, type Element as a3, type Sequencing as a4, type Place as a5, type ReservationOptions as a6, type ElementUiProperties as a7, type Image as a8, type MultiRowProperties as a9, type RowElement as aa, type RowElementUiProperties as ab, type VerticalSequencing as ac, type Category as ad, type ExtendedFields as ae, type SeatingPlanUiProperties as af, type ElementGroup as ag, type ElementGroupUiProperties as ah, type RegenerateSummariesRequest as ai, type RegenerateSummariesResponse as aj, type SeatingReservationsSummary as ak, type DomainEvent as al, type DomainEventBodyOneOf as am, type EntityCreatedEvent as an, type RestoreInfo as ao, type EntityUpdatedEvent as ap, type EntityDeletedEvent as aq, type ActionEvent as ar, type MessageEnvelope as as, type IdentificationData as at, type IdentificationDataIdOneOf as au, type BaseEventMetadata as av, type EventMetadata as aw, type ReservationsQueryResult as ax, type GetSeatingReservationSummaryResponse as b, type SeatingReservationCreatedEnvelope as c, type SeatingReservationDeletedEnvelope as d, SortOrder as e, ShapeTypeEnumType as f, Position as g, type PlaceReservation as h, type SeatingPlanCategoriesSummaryUpdated as i, type CategoryDetails as j, type InvalidateCache as k, type InvalidateCacheGetByOneOf as l, type Page as m, type CustomTag as n, type CreateSeatingReservationRequest as o, type CreateSeatingReservationResponse as p, type Places as q, type UnavailablePlaces as r, type ReservationErrorDetails as s, type GetReservationRequest as t, type GetReservationResponse as u, type QueryV2 as v, type QueryV2PagingMethodOneOf as w, type Sorting as x, type Paging as y, type CursorPaging as z };
1360
+ export { type ActionEvent, type App, type BaseEventMetadata, type CancelSeatingPlaceReservationsRequest, type CancelSeatingPlaceReservationsResponse, type Category, type CategoryDetails, type CreateSeatingReservationApplicationErrors, type CreateSeatingReservationOptions, type CreateSeatingReservationRequest, type CreateSeatingReservationResponse, type CursorPaging, type Cursors, type CustomTag, type DeleteSeatingPlaceReservationRequest, type DeleteSeatingReservationRequest, type DeleteSeatingReservationResponse, type DomainEvent, type DomainEventBodyOneOf, type Element, type ElementGroup, type ElementGroupUiProperties, type ElementUiProperties, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type File, type GetReservationRequest, type GetReservationResponse, type GetReservedPlacesRequest, type GetReservedPlacesResponse, type GetSeatingCategorySummaryOptions, type GetSeatingCategorySummaryRequest, type GetSeatingCategorySummaryResponse, type GetSeatingReservationSummaryRequest, type GetSeatingReservationSummaryResponse, Icon, type IconWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, type Image, type InvalidateCache, type InvalidateCacheGetByOneOf, type MessageEnvelope, type MultiRowProperties, Numbering, type NumberingWithLiterals, type Page, type Paging, type PagingMetadataV2, type Place, type PlaceReservation, type PlaceReservationDetails, PlaceTypeEnumType, type PlaceTypeEnumTypeWithLiterals, type Places, Position, type PositionWithLiterals, type QuerySeatingReservationRequest, type QuerySeatingReservationResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RegenerateSummariesRequest, type RegenerateSummariesResponse, type ReservationErrorDetails, type ReservationOptions, type ReservationsQueryBuilder, type ReservationsQueryResult, type RestoreInfo, type RowElement, type RowElementUiProperties, type SeatingPlan, type SeatingPlanCategoriesSummaryUpdated, type SeatingPlanUiProperties, type SeatingReservation, type SeatingReservationCreatedEnvelope, type SeatingReservationDeletedEnvelope, type SeatingReservationsSummary, type Section, type Sequencing, ShapeTypeEnumType, type ShapeTypeEnumTypeWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, Type, type TypeWithLiterals, type URI, type UnavailablePlaces, type UpdateSeatingReservationRequest, type UpdateSeatingReservationResponse, type VerticalSequencing, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createSeatingReservation, deleteSeatingReservation, getReservation, getSeatingCategorySummary, getSeatingReservationSummary, onSeatingReservationCreated, onSeatingReservationDeleted, querySeatingReservation };