@wix/auto_sdk_seatings_seating-plan 1.0.10 → 1.0.12

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 SeatingPlan {
2
4
  /**
3
5
  * Auto generated unique plan id
@@ -974,6 +976,20 @@ interface GetSeatingPlanThumbnailRequest {
974
976
  interface GetSeatingPlanThumbnailResponse {
975
977
  thumbnail?: SeatingPlanThumbnail;
976
978
  }
979
+ type CreateSeatingPlanApplicationErrors = {
980
+ code?: 'PLAN_MAX_CAPACITY_EXCEEDED';
981
+ description?: string;
982
+ data?: CapacityExceededViolation;
983
+ } | {
984
+ code?: 'ELEMENT_MAX_CAPACITY_EXCEEDED';
985
+ description?: string;
986
+ data?: CapacityExceededViolation;
987
+ };
988
+ type UpdateSeatingPlanApplicationErrors = {
989
+ code?: 'INVALID_FIELD_MASK';
990
+ description?: string;
991
+ data?: Record<string, any>;
992
+ };
977
993
  interface BaseEventMetadata {
978
994
  /**
979
995
  * App instance ID.
@@ -1022,20 +1038,94 @@ interface SeatingPlanCreatedEnvelope {
1022
1038
  entity: SeatingPlan;
1023
1039
  metadata: EventMetadata;
1024
1040
  }
1041
+ /** @permissionScope Manage Events
1042
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1043
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1044
+ * @webhook
1045
+ * @eventType wix.seating.v1.seating_plan_created
1046
+ * @slug created
1047
+ * @documentationMaturity preview
1048
+ */
1049
+ declare function onSeatingPlanCreated(handler: (event: SeatingPlanCreatedEnvelope) => void | Promise<void>): void;
1025
1050
  interface SeatingPlanDeletedEnvelope {
1026
1051
  entity: SeatingPlan;
1027
1052
  metadata: EventMetadata;
1028
1053
  }
1054
+ /** @permissionScope Manage Events
1055
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1056
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1057
+ * @webhook
1058
+ * @eventType wix.seating.v1.seating_plan_deleted
1059
+ * @slug deleted
1060
+ * @documentationMaturity preview
1061
+ */
1062
+ declare function onSeatingPlanDeleted(handler: (event: SeatingPlanDeletedEnvelope) => void | Promise<void>): void;
1029
1063
  interface SeatingPlanUpdatedEnvelope {
1030
1064
  entity: SeatingPlan;
1031
1065
  metadata: EventMetadata;
1032
1066
  }
1067
+ /** @permissionScope Manage Events
1068
+ * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
1069
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1070
+ * @webhook
1071
+ * @eventType wix.seating.v1.seating_plan_updated
1072
+ * @slug updated
1073
+ * @documentationMaturity preview
1074
+ */
1075
+ declare function onSeatingPlanUpdated(handler: (event: SeatingPlanUpdatedEnvelope) => void | Promise<void>): void;
1076
+ type SeatingPlanNonNullablePaths = `sections` | `sections.${number}._id` | `sections.${number}.default` | `categories` | `categories.${number}._id` | `categories.${number}.title` | `uncategorizedPlaces` | `uncategorizedPlaces.${number}.index` | `uncategorizedPlaces.${number}.label` | `uncategorizedPlaces.${number}.elementType` | `uncategorizedPlaces.${number}.type` | `elementGroups` | `elementGroups.${number}._id`;
1077
+ /**
1078
+ * Crates a seating plan
1079
+ * @param plan - A plan to be created
1080
+ * @public
1081
+ * @documentationMaturity preview
1082
+ * @requiredField plan
1083
+ * @requiredField plan.sections.elements.title
1084
+ * @requiredField plan.title
1085
+ * @permissionId SEATING_PLANS.MANAGE_SEATING_PLANS
1086
+ * @applicableIdentity APP
1087
+ * @returns The created plan
1088
+ * @fqn com.wixpress.seating.SeatingPlanManagement.CreateSeatingPlan
1089
+ */
1090
+ declare function createSeatingPlan(plan: NonNullablePaths<SeatingPlan, `sections.${number}.elements.${number}.title` | `title`>): Promise<NonNullablePaths<SeatingPlan, SeatingPlanNonNullablePaths> & {
1091
+ __applicationErrorsType?: CreateSeatingPlanApplicationErrors;
1092
+ }>;
1093
+ /**
1094
+ * Updates the seating plan
1095
+ * @public
1096
+ * @documentationMaturity preview
1097
+ * @requiredField options.plan._id
1098
+ * @requiredField options.plan.sections.elements.title
1099
+ * @permissionId SEATING_PLANS.MANAGE_SEATING_PLANS
1100
+ * @applicableIdentity APP
1101
+ * @returns The updated plan
1102
+ * @fqn com.wixpress.seating.SeatingPlanManagement.UpdateSeatingPlan
1103
+ */
1104
+ declare function updateSeatingPlan(options?: NonNullablePaths<UpdateSeatingPlanOptions, `plan._id` | `plan.sections.${number}.elements.${number}.title`>): Promise<NonNullablePaths<SeatingPlan, SeatingPlanNonNullablePaths> & {
1105
+ __applicationErrorsType?: UpdateSeatingPlanApplicationErrors;
1106
+ }>;
1033
1107
  interface UpdateSeatingPlanOptions {
1034
1108
  /** The plan updates */
1035
1109
  plan?: SeatingPlan;
1036
1110
  /** A set of field paths, specifying which parts of seating plan to update */
1037
1111
  fields?: string[];
1038
1112
  }
1113
+ /**
1114
+ * Copies the seating plan
1115
+ * @param _id - The id of the plan to be copied
1116
+ * @public
1117
+ * @documentationMaturity preview
1118
+ * @requiredField _id
1119
+ * @requiredField options
1120
+ * @requiredField options.externalId
1121
+ * @requiredField options.title
1122
+ * @permissionId SEATING_PLANS.MANAGE_SEATING_PLANS
1123
+ * @applicableIdentity APP
1124
+ * @fqn com.wixpress.seating.SeatingPlanManagement.CopySeatingPlan
1125
+ */
1126
+ declare function copySeatingPlan(_id: string, options: NonNullablePaths<CopySeatingPlanOptions, `externalId` | `title`>): Promise<NonNullablePaths<CopySeatingPlanResponse, {
1127
+ [P in SeatingPlanNonNullablePaths]: `plan.${P}`;
1128
+ }[SeatingPlanNonNullablePaths]>>;
1039
1129
  interface CopySeatingPlanOptions {
1040
1130
  /**
1041
1131
  * New plan title
@@ -1050,6 +1140,16 @@ interface CopySeatingPlanOptions {
1050
1140
  */
1051
1141
  externalId: string | null;
1052
1142
  }
1143
+ /**
1144
+ * Lists seating plans by provided query request
1145
+ * @public
1146
+ * @documentationMaturity preview
1147
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1148
+ * @applicableIdentity APP
1149
+ * @applicableIdentity VISITOR
1150
+ * @fqn com.wixpress.seating.SeatingPlanManagement.QuerySeatingPlan
1151
+ */
1152
+ declare function querySeatingPlan(options?: QuerySeatingPlanOptions): PlansQueryBuilder;
1053
1153
  interface QuerySeatingPlanOptions {
1054
1154
  /** A fieldset for the response */
1055
1155
  fieldset?: FieldsetWithLiterals[] | undefined;
@@ -1079,6 +1179,19 @@ interface PlansQueryBuilder {
1079
1179
  /** @documentationMaturity preview */
1080
1180
  find: () => Promise<PlansQueryResult>;
1081
1181
  }
1182
+ /**
1183
+ * Returns the seating plan. Fails of not fond.
1184
+ * @param _id - The id of the plan
1185
+ * @public
1186
+ * @documentationMaturity preview
1187
+ * @requiredField _id
1188
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1189
+ * @applicableIdentity APP
1190
+ * @applicableIdentity VISITOR
1191
+ * @returns The plan
1192
+ * @fqn com.wixpress.seating.SeatingPlanManagement.GetSeatingPlan
1193
+ */
1194
+ declare function getSeatingPlan(_id: string, options?: GetSeatingPlanOptions): Promise<NonNullablePaths<SeatingPlan, SeatingPlanNonNullablePaths>>;
1082
1195
  interface GetSeatingPlanOptions {
1083
1196
  /**
1084
1197
  * A fieldset for the response
@@ -1093,6 +1206,20 @@ interface GetSeatingPlanOptions {
1093
1206
  /** Seating Plan Mask */
1094
1207
  seatingPlanMask?: SeatingPlanMask;
1095
1208
  }
1209
+ /**
1210
+ * Returns the first seating plan found by filter request.
1211
+ * @param filter - The filter of the plan
1212
+ * @public
1213
+ * @documentationMaturity preview
1214
+ * @requiredField filter
1215
+ * @permissionId SEATING_PLANS.READ_SEATING_PLANS
1216
+ * @applicableIdentity APP
1217
+ * @applicableIdentity VISITOR
1218
+ * @fqn com.wixpress.seating.SeatingPlanManagement.FindSeatingPlan
1219
+ */
1220
+ declare function findSeatingPlan(filter: Record<string, any>, options?: FindSeatingPlanOptions): Promise<NonNullablePaths<FindSeatingPlanResponse, {
1221
+ [P in SeatingPlanNonNullablePaths]: `plan.${P}`;
1222
+ }[SeatingPlanNonNullablePaths]>>;
1096
1223
  interface FindSeatingPlanOptions {
1097
1224
  /**
1098
1225
  * A fieldset for the response
@@ -1107,5 +1234,40 @@ interface FindSeatingPlanOptions {
1107
1234
  /** Seating Plan Mask */
1108
1235
  seatingPlanMask?: SeatingPlanMask;
1109
1236
  }
1237
+ /**
1238
+ * Deletes the seating plan.
1239
+ * @param _id - The id of the plan
1240
+ * @public
1241
+ * @documentationMaturity preview
1242
+ * @requiredField _id
1243
+ * @permissionId SEATING_PLANS.MANAGE_SEATING_PLANS
1244
+ * @applicableIdentity APP
1245
+ * @fqn com.wixpress.seating.SeatingPlanManagement.DeleteSeatingPlan
1246
+ */
1247
+ declare function deleteSeatingPlan(_id: string): Promise<NonNullablePaths<DeleteSeatingPlanResponse, {
1248
+ [P in SeatingPlanNonNullablePaths]: `plan.${P}`;
1249
+ }[SeatingPlanNonNullablePaths]>>;
1250
+ /**
1251
+ * Updates seating plan thumbnail.
1252
+ * @public
1253
+ * @documentationMaturity preview
1254
+ * @requiredField thumbnail
1255
+ * @requiredField thumbnail._id
1256
+ * @requiredField thumbnail.img
1257
+ * @permissionId SEATING_PLANS.MANAGE_SEATING_PLANS
1258
+ * @applicableIdentity APP
1259
+ * @fqn com.wixpress.seating.SeatingPlanThumbnailService.UpdateSeatingPlanThumbnail
1260
+ */
1261
+ declare function updateSeatingPlanThumbnail(thumbnail: NonNullablePaths<SeatingPlanThumbnail, `_id` | `img`>): Promise<UpdateSeatingPlanThumbnailResponse>;
1262
+ /**
1263
+ * Get seating plan thumbnail.
1264
+ * @public
1265
+ * @documentationMaturity preview
1266
+ * @requiredField _id
1267
+ * @permissionId SEATING_PLANS.MANAGE_SEATING_PLANS
1268
+ * @applicableIdentity APP
1269
+ * @fqn com.wixpress.seating.SeatingPlanThumbnailService.GetSeatingPlanThumbnail
1270
+ */
1271
+ declare function getSeatingPlanThumbnail(_id: string): Promise<GetSeatingPlanThumbnailResponse>;
1110
1272
 
1111
- export { type QuerySeatingPlanResponse as $, type CreateSeatingPlanResponse as A, type CapacityExceededViolation as B, type CopySeatingPlanOptions as C, type DeleteSeatingPlanResponse as D, type Element as E, type FindSeatingPlanOptions as F, type GetSeatingPlanOptions as G, type UpdateSeatingPlanRequest as H, Icon as I, type UpdateSeatingPlanResponse as J, type CopySeatingPlanRequest as K, type QuerySeatingPlanRequest as L, type MultiRowProperties as M, Numbering as N, type QueryV2 as O, type PlansQueryBuilder as P, type QuerySeatingPlanOptions as Q, type ReservationOptions as R, type SeatingPlan as S, Type as T, type UpdateSeatingPlanOptions as U, type VerticalSequencing as V, WebhookIdentityType as W, type QueryV2PagingMethodOneOf as X, type Sorting as Y, type Paging as Z, type CursorPaging as _, type CopySeatingPlanResponse as a, type GetSeatingPlanRequest as a0, type SeatingPlanMask as a1, type GetSeatingPlanResponse as a2, type FindSeatingPlanRequest as a3, type DeleteSeatingPlanRequest as a4, type DomainEvent as a5, type DomainEventBodyOneOf as a6, type EntityCreatedEvent as a7, type RestoreInfo as a8, type EntityUpdatedEvent as a9, type EntityDeletedEvent as aa, type ActionEvent as ab, type MessageEnvelope as ac, type IdentificationData as ad, type IdentificationDataIdOneOf as ae, type SaveSeatingPlanVersionRequest as af, type SaveSeatingPlanVersionResponse as ag, type QuerySeatingPlanVersionsRequest as ah, type QuerySeatingPlanVersionsResponse as ai, type PagingMetadataV2 as aj, type Cursors as ak, type DiscardSeatingPlanVersionsRequest as al, type DiscardSeatingPlanVersionsResponse as am, type RestoreSeatingPlanRequest as an, type RestoreSeatingPlanResponse as ao, type UpdateSeatingPlanThumbnailRequest as ap, type GetSeatingPlanThumbnailRequest as aq, type BaseEventMetadata as ar, type EventMetadata as as, type PlansQueryResult as at, type FindSeatingPlanResponse as b, type SeatingPlanThumbnail as c, type UpdateSeatingPlanThumbnailResponse as d, type GetSeatingPlanThumbnailResponse as e, type SeatingPlanCreatedEnvelope as f, type SeatingPlanDeletedEnvelope as g, type SeatingPlanUpdatedEnvelope as h, PlaceTypeEnumType as i, ShapeTypeEnumType as j, Position as k, SortOrder as l, Fieldset as m, type Section as n, type Sequencing as o, type Place as p, type ElementUiProperties as q, type Image as r, type RowElement as s, type RowElementUiProperties as t, type Category as u, type ExtendedFields as v, type SeatingPlanUiProperties as w, type ElementGroup as x, type ElementGroupUiProperties as y, type CreateSeatingPlanRequest as z };
1273
+ export { type ActionEvent, type BaseEventMetadata, type CapacityExceededViolation, type Category, type CopySeatingPlanOptions, type CopySeatingPlanRequest, type CopySeatingPlanResponse, type CreateSeatingPlanApplicationErrors, type CreateSeatingPlanRequest, type CreateSeatingPlanResponse, type CursorPaging, type Cursors, type DeleteSeatingPlanRequest, type DeleteSeatingPlanResponse, type DiscardSeatingPlanVersionsRequest, type DiscardSeatingPlanVersionsResponse, type DomainEvent, type DomainEventBodyOneOf, type Element, type ElementGroup, type ElementGroupUiProperties, type ElementUiProperties, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, Fieldset, type FieldsetWithLiterals, type FindSeatingPlanOptions, type FindSeatingPlanRequest, type FindSeatingPlanResponse, type GetSeatingPlanOptions, type GetSeatingPlanRequest, type GetSeatingPlanResponse, type GetSeatingPlanThumbnailRequest, type GetSeatingPlanThumbnailResponse, Icon, type IconWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, type Image, type MessageEnvelope, type MultiRowProperties, Numbering, type NumberingWithLiterals, type Paging, type PagingMetadataV2, type Place, PlaceTypeEnumType, type PlaceTypeEnumTypeWithLiterals, type PlansQueryBuilder, type PlansQueryResult, Position, type PositionWithLiterals, type QuerySeatingPlanOptions, type QuerySeatingPlanRequest, type QuerySeatingPlanResponse, type QuerySeatingPlanVersionsRequest, type QuerySeatingPlanVersionsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ReservationOptions, type RestoreInfo, type RestoreSeatingPlanRequest, type RestoreSeatingPlanResponse, type RowElement, type RowElementUiProperties, type SaveSeatingPlanVersionRequest, type SaveSeatingPlanVersionResponse, type SeatingPlan, type SeatingPlanCreatedEnvelope, type SeatingPlanDeletedEnvelope, type SeatingPlanMask, type SeatingPlanThumbnail, type SeatingPlanUiProperties, type SeatingPlanUpdatedEnvelope, type Section, type Sequencing, ShapeTypeEnumType, type ShapeTypeEnumTypeWithLiterals, SortOrder, type SortOrderWithLiterals, type Sorting, Type, type TypeWithLiterals, type UpdateSeatingPlanApplicationErrors, type UpdateSeatingPlanOptions, type UpdateSeatingPlanRequest, type UpdateSeatingPlanResponse, type UpdateSeatingPlanThumbnailRequest, type UpdateSeatingPlanThumbnailResponse, type VerticalSequencing, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, copySeatingPlan, createSeatingPlan, deleteSeatingPlan, findSeatingPlan, getSeatingPlan, getSeatingPlanThumbnail, onSeatingPlanCreated, onSeatingPlanDeleted, onSeatingPlanUpdated, querySeatingPlan, updateSeatingPlan, updateSeatingPlanThumbnail };