@wix/auto_sdk_bookings_service-options-and-variants 1.0.55 → 1.0.56

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.
@@ -581,6 +581,31 @@ function queryServiceOptionsAndVariants2() {
581
581
  transformationPaths: {}
582
582
  });
583
583
  }
584
+ async function typedQueryServiceOptionsAndVariants(query) {
585
+ const { httpClient, sideEffects } = arguments[1];
586
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
587
+ const reqOpts = queryServiceOptionsAndVariants(
588
+ payload
589
+ );
590
+ sideEffects?.onSiteCall?.();
591
+ try {
592
+ const result = await httpClient.request(reqOpts);
593
+ sideEffects?.onSuccess?.(result);
594
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
595
+ } catch (err) {
596
+ const transformedError = (0, import_transform_error.transformError)(
597
+ err,
598
+ {
599
+ spreadPathsToArguments: {},
600
+ explicitPathsToArguments: { query: "$[0]" },
601
+ singleArgumentUnchanged: false
602
+ },
603
+ ["query"]
604
+ );
605
+ sideEffects?.onError?.(err);
606
+ throw transformedError;
607
+ }
608
+ }
584
609
 
585
610
  // src/bookings-catalog-v1-service-options-and-variants-service-options-and-variants.public.ts
586
611
  function createServiceOptionsAndVariants3(httpClient) {
@@ -634,6 +659,13 @@ function queryServiceOptionsAndVariants3(httpClient) {
634
659
  { httpClient }
635
660
  );
636
661
  }
662
+ function typedQueryServiceOptionsAndVariants2(httpClient) {
663
+ return (query) => typedQueryServiceOptionsAndVariants(
664
+ query,
665
+ // @ts-ignore
666
+ { httpClient }
667
+ );
668
+ }
637
669
  var onServiceOptionsAndVariantsCreated = (0, import_sdk_types.EventDefinition)(
638
670
  "wix.bookings.catalog.v1.service_options_and_variants_created",
639
671
  true,
@@ -674,6 +706,18 @@ var onServiceOptionsAndVariantsUpdated = (0, import_sdk_types.EventDefinition)(
674
706
  // src/bookings-catalog-v1-service-options-and-variants-service-options-and-variants.context.ts
675
707
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
676
708
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
709
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
710
+ function customQueryServiceOptionsAndVariants(httpClient) {
711
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
712
+ builderQueryFunction: () => queryServiceOptionsAndVariants3(httpClient)(),
713
+ typedQueryFunction: (query) => typedQueryServiceOptionsAndVariants2(httpClient)(query),
714
+ hasOptionsParameter: false
715
+ });
716
+ function overloadedQuery(query) {
717
+ return router(...arguments);
718
+ }
719
+ return overloadedQuery;
720
+ }
677
721
  var createServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createServiceOptionsAndVariants3);
678
722
  var cloneServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(cloneServiceOptionsAndVariants3);
679
723
  var getServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getServiceOptionsAndVariants3);
@@ -682,7 +726,7 @@ var getServiceOptionsAndVariantsByServiceId4 = /* @__PURE__ */ (0, import_rest_m
682
726
  );
683
727
  var updateServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateServiceOptionsAndVariants3);
684
728
  var deleteServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteServiceOptionsAndVariants3);
685
- var queryServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryServiceOptionsAndVariants3);
729
+ var queryServiceOptionsAndVariants4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryServiceOptionsAndVariants);
686
730
  var onServiceOptionsAndVariantsCreated2 = (0, import_event_definition_modules.createEventModule)(
687
731
  onServiceOptionsAndVariantsCreated
688
732
  );