@wix/auto_sdk_seatings_seating-plan 1.0.26 → 1.0.28

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,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { SeatingPlan, CreateSeatingPlanApplicationErrors, UpdateSeatingPlanOptions, UpdateSeatingPlanApplicationErrors, CopySeatingPlanOptions, CopySeatingPlanResponse, QuerySeatingPlanOptions, PlansQueryBuilder, GetSeatingPlanOptions, FindSeatingPlanOptions, FindSeatingPlanResponse, DeleteSeatingPlanResponse, SeatingPlanThumbnail, UpdateSeatingPlanThumbnailResponse, GetSeatingPlanThumbnailResponse, SeatingPlanCreatedEnvelope, SeatingPlanDeletedEnvelope, SeatingPlanUpdatedEnvelope } from './index.typings.mjs';
3
- export { ActionEvent, BaseEventMetadata, CapacityExceededViolation, Category, CopySeatingPlanRequest, CreateSeatingPlanRequest, CreateSeatingPlanResponse, CursorPaging, Cursors, DeleteSeatingPlanRequest, DiscardSeatingPlanVersionsRequest, DiscardSeatingPlanVersionsResponse, DomainEvent, DomainEventBodyOneOf, Element, ElementGroup, ElementGroupUiProperties, ElementUiProperties, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Fieldset, FieldsetWithLiterals, FindSeatingPlanRequest, GetSeatingPlanRequest, GetSeatingPlanResponse, GetSeatingPlanThumbnailRequest, Icon, IconWithLiterals, IdentificationData, IdentificationDataIdOneOf, Image, MessageEnvelope, MultiRowProperties, Numbering, NumberingWithLiterals, Paging, PagingMetadataV2, Place, PlaceTypeEnumType, PlaceTypeEnumTypeWithLiterals, PlansQueryResult, Position, PositionWithLiterals, QuerySeatingPlanRequest, QuerySeatingPlanResponse, QuerySeatingPlanVersionsRequest, QuerySeatingPlanVersionsResponse, QueryV2, QueryV2PagingMethodOneOf, ReservationOptions, RestoreInfo, RestoreSeatingPlanRequest, RestoreSeatingPlanResponse, RowElement, RowElementUiProperties, SaveSeatingPlanVersionRequest, SaveSeatingPlanVersionResponse, SeatingPlanMask, SeatingPlanUiProperties, Section, Sequencing, ShapeTypeEnumType, ShapeTypeEnumTypeWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, Type, TypeWithLiterals, UpdateSeatingPlanRequest, UpdateSeatingPlanResponse, UpdateSeatingPlanThumbnailRequest, VerticalSequencing, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
2
+ import { SeatingPlan, CreateSeatingPlanApplicationErrors, UpdateSeatingPlanOptions, UpdateSeatingPlanApplicationErrors, CopySeatingPlanOptions, CopySeatingPlanResponse, GetSeatingPlanOptions, FindSeatingPlanOptions, FindSeatingPlanResponse, DeleteSeatingPlanResponse, SeatingPlanThumbnail, UpdateSeatingPlanThumbnailResponse, GetSeatingPlanThumbnailResponse, SeatingPlanCreatedEnvelope, SeatingPlanDeletedEnvelope, SeatingPlanUpdatedEnvelope, QueryV2, typedQuerySeatingPlan, QuerySeatingPlanOptions, PlansQueryBuilder } from './index.typings.mjs';
3
+ export { ActionEvent, BaseEventMetadata, CapacityExceededViolation, Category, CopySeatingPlanRequest, CreateSeatingPlanRequest, CreateSeatingPlanResponse, CursorPaging, Cursors, DeleteSeatingPlanRequest, DiscardSeatingPlanVersionsRequest, DiscardSeatingPlanVersionsResponse, DomainEvent, DomainEventBodyOneOf, Element, ElementGroup, ElementGroupUiProperties, ElementUiProperties, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, Fieldset, FieldsetWithLiterals, FindSeatingPlanRequest, GetSeatingPlanRequest, GetSeatingPlanResponse, GetSeatingPlanThumbnailRequest, Icon, IconWithLiterals, IdentificationData, IdentificationDataIdOneOf, Image, MessageEnvelope, MultiRowProperties, Numbering, NumberingWithLiterals, Paging, PagingMetadataV2, Place, PlaceTypeEnumType, PlaceTypeEnumTypeWithLiterals, PlansQueryResult, Position, PositionWithLiterals, QuerySeatingPlanRequest, QuerySeatingPlanResponse, QuerySeatingPlanVersionsRequest, QuerySeatingPlanVersionsResponse, QueryV2PagingMethodOneOf, ReservationOptions, RestoreInfo, RestoreSeatingPlanRequest, RestoreSeatingPlanResponse, RowElement, RowElementUiProperties, SaveSeatingPlanVersionRequest, SaveSeatingPlanVersionResponse, SeatingPlanMask, SeatingPlanUiProperties, Section, Sequencing, ShapeTypeEnumType, ShapeTypeEnumTypeWithLiterals, SortOrder, SortOrderWithLiterals, Sorting, Type, TypeWithLiterals, UpdateSeatingPlanRequest, UpdateSeatingPlanResponse, UpdateSeatingPlanThumbnailRequest, VerticalSequencing, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
4
 
5
5
  declare function createSeatingPlan$1(httpClient: HttpClient): CreateSeatingPlanSignature;
6
6
  interface CreateSeatingPlanSignature {
@@ -31,13 +31,6 @@ interface CopySeatingPlanSignature {
31
31
  */
32
32
  (_id: string, options: NonNullablePaths<CopySeatingPlanOptions, `externalId` | `title`, 2>): Promise<NonNullablePaths<CopySeatingPlanResponse, `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`, 5>>;
33
33
  }
34
- declare function querySeatingPlan$1(httpClient: HttpClient): QuerySeatingPlanSignature;
35
- interface QuerySeatingPlanSignature {
36
- /**
37
- * Retrieves multiple seating plans based on filter criteria. Supports fieldset projections to control response size and improve performance.
38
- */
39
- (options?: QuerySeatingPlanOptions): PlansQueryBuilder;
40
- }
41
34
  declare function getSeatingPlan$1(httpClient: HttpClient): GetSeatingPlanSignature;
42
35
  interface GetSeatingPlanSignature {
43
36
  /**
@@ -83,15 +76,21 @@ declare const onSeatingPlanCreated$1: EventDefinition<SeatingPlanCreatedEnvelope
83
76
  declare const onSeatingPlanDeleted$1: EventDefinition<SeatingPlanDeletedEnvelope, "wix.seating.v1.seating_plan_deleted">;
84
77
  declare const onSeatingPlanUpdated$1: EventDefinition<SeatingPlanUpdatedEnvelope, "wix.seating.v1.seating_plan_updated">;
85
78
 
79
+ declare function customQuerySeatingPlan(httpClient: HttpClient): {
80
+ (query: QueryV2): ReturnType<typeof typedQuerySeatingPlan>;
81
+ (query: QueryV2, options: QuerySeatingPlanOptions): ReturnType<typeof typedQuerySeatingPlan>;
82
+ (): PlansQueryBuilder;
83
+ (options: QuerySeatingPlanOptions): PlansQueryBuilder;
84
+ };
86
85
  declare const createSeatingPlan: MaybeContext<BuildRESTFunction<typeof createSeatingPlan$1> & typeof createSeatingPlan$1>;
87
86
  declare const updateSeatingPlan: MaybeContext<BuildRESTFunction<typeof updateSeatingPlan$1> & typeof updateSeatingPlan$1>;
88
87
  declare const copySeatingPlan: MaybeContext<BuildRESTFunction<typeof copySeatingPlan$1> & typeof copySeatingPlan$1>;
89
- declare const querySeatingPlan: MaybeContext<BuildRESTFunction<typeof querySeatingPlan$1> & typeof querySeatingPlan$1>;
90
88
  declare const getSeatingPlan: MaybeContext<BuildRESTFunction<typeof getSeatingPlan$1> & typeof getSeatingPlan$1>;
91
89
  declare const findSeatingPlan: MaybeContext<BuildRESTFunction<typeof findSeatingPlan$1> & typeof findSeatingPlan$1>;
92
90
  declare const deleteSeatingPlan: MaybeContext<BuildRESTFunction<typeof deleteSeatingPlan$1> & typeof deleteSeatingPlan$1>;
93
91
  declare const updateSeatingPlanThumbnail: MaybeContext<BuildRESTFunction<typeof updateSeatingPlanThumbnail$1> & typeof updateSeatingPlanThumbnail$1>;
94
92
  declare const getSeatingPlanThumbnail: MaybeContext<BuildRESTFunction<typeof getSeatingPlanThumbnail$1> & typeof getSeatingPlanThumbnail$1>;
93
+ declare const querySeatingPlan: MaybeContext<BuildRESTFunction<typeof customQuerySeatingPlan> & typeof customQuerySeatingPlan>;
95
94
  /** */
96
95
  declare const onSeatingPlanCreated: BuildEventDefinition<typeof onSeatingPlanCreated$1> & typeof onSeatingPlanCreated$1;
97
96
  /** */
@@ -99,4 +98,4 @@ declare const onSeatingPlanDeleted: BuildEventDefinition<typeof onSeatingPlanDel
99
98
  /** */
100
99
  declare const onSeatingPlanUpdated: BuildEventDefinition<typeof onSeatingPlanUpdated$1> & typeof onSeatingPlanUpdated$1;
101
100
 
102
- export { CopySeatingPlanOptions, CopySeatingPlanResponse, CreateSeatingPlanApplicationErrors, DeleteSeatingPlanResponse, FindSeatingPlanOptions, FindSeatingPlanResponse, GetSeatingPlanOptions, GetSeatingPlanThumbnailResponse, PlansQueryBuilder, QuerySeatingPlanOptions, SeatingPlan, SeatingPlanCreatedEnvelope, SeatingPlanDeletedEnvelope, SeatingPlanThumbnail, SeatingPlanUpdatedEnvelope, UpdateSeatingPlanApplicationErrors, UpdateSeatingPlanOptions, UpdateSeatingPlanThumbnailResponse, copySeatingPlan, createSeatingPlan, deleteSeatingPlan, findSeatingPlan, getSeatingPlan, getSeatingPlanThumbnail, onSeatingPlanCreated, onSeatingPlanDeleted, onSeatingPlanUpdated, querySeatingPlan, updateSeatingPlan, updateSeatingPlanThumbnail };
101
+ export { CopySeatingPlanOptions, CopySeatingPlanResponse, CreateSeatingPlanApplicationErrors, DeleteSeatingPlanResponse, FindSeatingPlanOptions, FindSeatingPlanResponse, GetSeatingPlanOptions, GetSeatingPlanThumbnailResponse, PlansQueryBuilder, QuerySeatingPlanOptions, QueryV2, SeatingPlan, SeatingPlanCreatedEnvelope, SeatingPlanDeletedEnvelope, SeatingPlanThumbnail, SeatingPlanUpdatedEnvelope, UpdateSeatingPlanApplicationErrors, UpdateSeatingPlanOptions, UpdateSeatingPlanThumbnailResponse, copySeatingPlan, createSeatingPlan, deleteSeatingPlan, findSeatingPlan, getSeatingPlan, getSeatingPlanThumbnail, onSeatingPlanCreated, onSeatingPlanDeleted, onSeatingPlanUpdated, querySeatingPlan, updateSeatingPlan, updateSeatingPlanThumbnail };
@@ -914,6 +914,32 @@ function querySeatingPlan2(options) {
914
914
  transformationPaths: {}
915
915
  });
916
916
  }
917
+ async function typedQuerySeatingPlan(query, options) {
918
+ const { httpClient, sideEffects } = arguments[2];
919
+ const payload = renameKeysFromSDKRequestToRESTRequest({
920
+ query,
921
+ ...options
922
+ });
923
+ const reqOpts = querySeatingPlan(payload);
924
+ sideEffects?.onSiteCall?.();
925
+ try {
926
+ const result = await httpClient.request(reqOpts);
927
+ sideEffects?.onSuccess?.(result);
928
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
929
+ } catch (err) {
930
+ const transformedError = sdkTransformError(
931
+ err,
932
+ {
933
+ spreadPathsToArguments: {},
934
+ explicitPathsToArguments: { query: "$[0]" },
935
+ singleArgumentUnchanged: false
936
+ },
937
+ ["query", "options"]
938
+ );
939
+ sideEffects?.onError?.(err);
940
+ throw transformedError;
941
+ }
942
+ }
917
943
  async function getSeatingPlan2(_id, options) {
918
944
  const { httpClient, sideEffects } = arguments[2];
919
945
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1082,6 +1108,14 @@ function querySeatingPlan3(httpClient) {
1082
1108
  { httpClient }
1083
1109
  );
1084
1110
  }
1111
+ function typedQuerySeatingPlan2(httpClient) {
1112
+ return (query, options) => typedQuerySeatingPlan(
1113
+ query,
1114
+ options,
1115
+ // @ts-ignore
1116
+ { httpClient }
1117
+ );
1118
+ }
1085
1119
  function getSeatingPlan3(httpClient) {
1086
1120
  return (_id, options) => getSeatingPlan2(
1087
1121
  _id,
@@ -1270,15 +1304,27 @@ var onSeatingPlanUpdated = EventDefinition(
1270
1304
  // src/seating-v1-seating-plan-seating-plan.context.ts
1271
1305
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1272
1306
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1307
+ import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
1308
+ function customQuerySeatingPlan(httpClient) {
1309
+ const router = createQueryOverloadRouter({
1310
+ builderQueryFunction: (options) => querySeatingPlan3(httpClient)(options),
1311
+ typedQueryFunction: (query, options) => typedQuerySeatingPlan2(httpClient)(query, options),
1312
+ hasOptionsParameter: true
1313
+ });
1314
+ function overloadedQuery(queryOrOptions, options) {
1315
+ return router(...arguments);
1316
+ }
1317
+ return overloadedQuery;
1318
+ }
1273
1319
  var createSeatingPlan4 = /* @__PURE__ */ createRESTModule(createSeatingPlan3);
1274
1320
  var updateSeatingPlan4 = /* @__PURE__ */ createRESTModule(updateSeatingPlan3);
1275
1321
  var copySeatingPlan4 = /* @__PURE__ */ createRESTModule(copySeatingPlan3);
1276
- var querySeatingPlan4 = /* @__PURE__ */ createRESTModule(querySeatingPlan3);
1277
1322
  var getSeatingPlan4 = /* @__PURE__ */ createRESTModule(getSeatingPlan3);
1278
1323
  var findSeatingPlan4 = /* @__PURE__ */ createRESTModule(findSeatingPlan3);
1279
1324
  var deleteSeatingPlan4 = /* @__PURE__ */ createRESTModule(deleteSeatingPlan3);
1280
1325
  var updateSeatingPlanThumbnail4 = /* @__PURE__ */ createRESTModule(updateSeatingPlanThumbnail3);
1281
1326
  var getSeatingPlanThumbnail4 = /* @__PURE__ */ createRESTModule(getSeatingPlanThumbnail3);
1327
+ var querySeatingPlan4 = /* @__PURE__ */ createRESTModule(customQuerySeatingPlan);
1282
1328
  var onSeatingPlanCreated2 = createEventModule(
1283
1329
  onSeatingPlanCreated
1284
1330
  );