@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.
- package/build/cjs/index.d.ts +13 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{seating-v1-seating-reservation-seating-reservation.universal-CzABkBgJ.d.ts → index.typings.d.ts} +99 -5
- package/build/cjs/index.typings.js +527 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +6 -5
- package/build/es/index.d.mts +13 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/{seating-v1-seating-reservation-seating-reservation.universal-CzABkBgJ.d.mts → index.typings.d.mts} +99 -5
- package/build/es/index.typings.mjs +490 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +6 -5
- package/build/internal/cjs/index.d.ts +13 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{seating-v1-seating-reservation-seating-reservation.universal-CzABkBgJ.d.ts → index.typings.d.ts} +99 -5
- package/build/internal/cjs/index.typings.js +527 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +6 -5
- package/build/internal/es/index.d.mts +13 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{seating-v1-seating-reservation-seating-reservation.universal-CzABkBgJ.d.mts → index.typings.d.mts} +99 -5
- package/build/internal/es/index.typings.mjs +490 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +6 -5
- package/package.json +3 -3
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 };
|