@wix/auto_sdk_bookings_catalog-search 1.0.1 → 1.0.3

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +17 -9
  2. package/build/cjs/index.js +13 -13
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +10 -10
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +17 -9
  8. package/build/cjs/meta.js +8 -8
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +17 -9
  11. package/build/es/index.mjs +12 -12
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +9 -9
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +17 -9
  17. package/build/es/meta.mjs +7 -7
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +7 -7
  20. package/build/internal/cjs/index.js +13 -13
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +20 -12
  23. package/build/internal/cjs/index.typings.js +10 -10
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +17 -9
  26. package/build/internal/cjs/meta.js +8 -8
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +7 -7
  29. package/build/internal/es/index.mjs +12 -12
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +20 -12
  32. package/build/internal/es/index.typings.mjs +9 -9
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +17 -9
  35. package/build/internal/es/meta.mjs +7 -7
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -2,7 +2,7 @@ interface CatalogSearchResult {
2
2
  /** @format GUID */
3
3
  _id?: string;
4
4
  }
5
- interface QueryServicesByAvailabilityRequest {
5
+ interface QueryServicesByFiltersRequest {
6
6
  /**
7
7
  * Query against the service catalog — WQL filter, sort, and cursor paging.
8
8
  * Supports the same fields as QueryServices.
@@ -12,7 +12,7 @@ interface QueryServicesByAvailabilityRequest {
12
12
  * Availability and resource constraints applied on top of the service query.
13
13
  * When absent, no availability check is performed and all pre-filtered services are returned.
14
14
  */
15
- availabilityFilter?: AvailabilityFilter;
15
+ serviceFilters?: ServiceFilters;
16
16
  }
17
17
  interface QueryV2 extends QueryV2PagingMethodOneOf {
18
18
  paging?: Paging;
@@ -60,7 +60,7 @@ interface CursorPaging {
60
60
  */
61
61
  cursor?: string | null;
62
62
  }
63
- interface AvailabilityFilter {
63
+ interface ServiceFilters {
64
64
  /**
65
65
  * Start of the availability window (ISO local date-time, e.g. "2024-03-25T09:00:00").
66
66
  * Must be provided together with local_end_date.
@@ -180,7 +180,7 @@ interface NumberValues {
180
180
  */
181
181
  values?: number[];
182
182
  }
183
- interface QueryServicesByAvailabilityResponse {
183
+ interface QueryServicesByFiltersResponse {
184
184
  /** Services matching the query, each enriched with availability data. */
185
185
  results?: ServiceWithAvailability[];
186
186
  /**
@@ -696,12 +696,18 @@ interface FullUpfrontPayment {
696
696
  */
697
697
  discountPercent?: string | null;
698
698
  }
699
+ /**
700
+ * The payment options a customer can use to pay for the service.
701
+ * For payments of type `FIXED` or `VARIED`, at least one of `online`, `inPerson`, or `pricingPlan` must be `true`.
702
+ */
699
703
  interface PaymentOptions {
700
704
  /**
701
705
  * Customers can pay for the service online.
702
706
  * When `true`:
703
- * + `rateType` must be `FIXED` or `VARIED`.
704
- * + `fixed.price` or `varied.defaultPrice` must be specified respectively.
707
+ * + `rateType` must be `FIXED`, `VARIED`, or `SUBSCRIPTION`.
708
+ * + `fixed.price`, `varied.defaultPrice`, or `subscription.amountPerBillingCycle` must be specified respectively.
709
+ *
710
+ * Required when: `rateType` is `SUBSCRIPTION`.
705
711
  * Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online).
706
712
  */
707
713
  online?: boolean | null;
@@ -712,6 +718,8 @@ interface PaymentOptions {
712
718
  * When `true`:
713
719
  * + `rateType` must be `VARIED` or `FIXED`.
714
720
  * + A `deposit` must be specified.
721
+ * + `online` must be `true`.
722
+ * + `inPerson` must be `false`.
715
723
  */
716
724
  deposit?: boolean | null;
717
725
  /**
@@ -1832,7 +1840,7 @@ interface Cursors {
1832
1840
  */
1833
1841
  prev?: string | null;
1834
1842
  }
1835
- interface QueryServicesByAvailabilityOptions {
1843
+ interface QueryServicesByFiltersOptions {
1836
1844
  /**
1837
1845
  * Query against the service catalog — WQL filter, sort, and cursor paging.
1838
1846
  * Supports the same fields as QueryServices.
@@ -1842,7 +1850,7 @@ interface QueryServicesByAvailabilityOptions {
1842
1850
  * Availability and resource constraints applied on top of the service query.
1843
1851
  * When absent, no availability check is performed and all pre-filtered services are returned.
1844
1852
  */
1845
- availabilityFilter?: AvailabilityFilter;
1853
+ serviceFilters?: ServiceFilters;
1846
1854
  }
1847
1855
 
1848
- export { type AddOnDetails, type AddOnGroup, AddOnPaymentOptions, type AddOnPaymentOptionsWithLiterals, type Address, type AddressLocation, type AddressStreetOneOf, type Attribute, type AttributeValueOneOf, type AvailabilityConstraints, type AvailabilityFilter, type BookAfterStartPolicy, type BookingPolicy, type BusinessLocationOptions, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type CatalogSearchResult, type Category, CompletionRequirement, type CompletionRequirementWithLiterals, type Conferencing, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomLocationOptions, type CustomOptions, type CustomPayment, type DailyConfig, type DiscountInfo, type Duration, type DurationRange, type DurationRangeConfigOneOf, type ExtendedFields, FirstChargeDateType, type FirstChargeDateTypeWithLiterals, type FixedPayment, type Form, type FormSettings, FrequencyType, type FrequencyTypeWithLiterals, type FullUpfrontPayment, type HourlyConfig, type IntakeFormPolicy, type Keyword, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Location, type LocationOptionsOneOf, LocationType, type LocationTypeWithLiterals, type Media, type MediaItem, type MediaItemItemOneOf, type Money, type NumberRange, type NumberValues, type OnlineBooking, type Paging, type ParticipantsPolicy, type Payment, type PaymentOptions, type PaymentRateOneOf, type PhoneCall, type PolicyDescription, type QueryServicesByAvailabilityOptions, type QueryServicesByAvailabilityRequest, type QueryServicesByAvailabilityResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RankingOptions, RankingOrder, type RankingOrderWithLiterals, RateType, type RateTypeWithLiterals, type ReschedulePolicy, type ResourceDetails, type ResourceGroup, type ResourceIds, type ResourceInfo, type ResourceType, type ResourcesPolicy, type SaveCreditCardPolicy, type Schedule, type SeoSchema, type Service, type ServiceResource, type ServiceResourceSelectionOneOf, ServiceType, type ServiceTypeWithLiterals, type ServiceWithAvailability, type Settings, type Slug, SortOrder, type SortOrderWithLiterals, type Sorting, SortingMethodType, type SortingMethodTypeWithLiterals, type StaffMediaItem, type StaffMediaItemItemOneOf, type StaffMember, type StaffMemberDetails, type StaffSortingPolicy, type StaffSortingPolicyOptionsOneOf, type StreetAddress, type SubscriptionPayment, type Tag, type TaxableAddress, TaxableAddressType, type TaxableAddressTypeWithLiterals, Timing, type TimingWithLiterals, type URLs, UnitType, type UnitTypeWithLiterals, type VariedPayment, type WaitlistPolicy, type WorkingHoursLocationCoverage };
1856
+ export { type AddOnDetails, type AddOnGroup, AddOnPaymentOptions, type AddOnPaymentOptionsWithLiterals, type Address, type AddressLocation, type AddressStreetOneOf, type Attribute, type AttributeValueOneOf, type AvailabilityConstraints, type BookAfterStartPolicy, type BookingPolicy, type BusinessLocationOptions, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type CatalogSearchResult, type Category, CompletionRequirement, type CompletionRequirementWithLiterals, type Conferencing, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomLocationOptions, type CustomOptions, type CustomPayment, type DailyConfig, type DiscountInfo, type Duration, type DurationRange, type DurationRangeConfigOneOf, type ExtendedFields, FirstChargeDateType, type FirstChargeDateTypeWithLiterals, type FixedPayment, type Form, type FormSettings, FrequencyType, type FrequencyTypeWithLiterals, type FullUpfrontPayment, type HourlyConfig, type IntakeFormPolicy, type Keyword, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Location, type LocationOptionsOneOf, LocationType, type LocationTypeWithLiterals, type Media, type MediaItem, type MediaItemItemOneOf, type Money, type NumberRange, type NumberValues, type OnlineBooking, type Paging, type ParticipantsPolicy, type Payment, type PaymentOptions, type PaymentRateOneOf, type PhoneCall, type PolicyDescription, type QueryServicesByFiltersOptions, type QueryServicesByFiltersRequest, type QueryServicesByFiltersResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RankingOptions, RankingOrder, type RankingOrderWithLiterals, RateType, type RateTypeWithLiterals, type ReschedulePolicy, type ResourceDetails, type ResourceGroup, type ResourceIds, type ResourceInfo, type ResourceType, type ResourcesPolicy, type SaveCreditCardPolicy, type Schedule, type SeoSchema, type Service, type ServiceFilters, type ServiceResource, type ServiceResourceSelectionOneOf, ServiceType, type ServiceTypeWithLiterals, type ServiceWithAvailability, type Settings, type Slug, SortOrder, type SortOrderWithLiterals, type Sorting, SortingMethodType, type SortingMethodTypeWithLiterals, type StaffMediaItem, type StaffMediaItemItemOneOf, type StaffMember, type StaffMemberDetails, type StaffSortingPolicy, type StaffSortingPolicyOptionsOneOf, type StreetAddress, type SubscriptionPayment, type Tag, type TaxableAddress, TaxableAddressType, type TaxableAddressTypeWithLiterals, Timing, type TimingWithLiterals, type URLs, UnitType, type UnitTypeWithLiterals, type VariedPayment, type WaitlistPolicy, type WorkingHoursLocationCoverage };
@@ -33,7 +33,7 @@ __export(index_exports, {
33
33
  TaxableAddressType: () => TaxableAddressType,
34
34
  Timing: () => Timing,
35
35
  UnitType: () => UnitType,
36
- queryServicesByAvailability: () => queryServicesByAvailability4
36
+ queryServicesByFilters: () => queryServicesByFilters4
37
37
  });
38
38
  module.exports = __toCommonJS(index_exports);
39
39
 
@@ -58,12 +58,12 @@ function resolveWixBookingsCatalogSearchV1CatalogSearchUrl(opts) {
58
58
  return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
59
59
  }
60
60
  var PACKAGE_NAME = "@wix/auto_sdk_bookings_catalog-search";
61
- function queryServicesByAvailability(payload) {
62
- function __queryServicesByAvailability({ host }) {
61
+ function queryServicesByFilters(payload) {
62
+ function __queryServicesByFilters({ host }) {
63
63
  const metadata = {
64
64
  entityFqdn: "wix.bookings.catalog_search.v1.catalog_search",
65
65
  method: "POST",
66
- methodFqn: "wix.bookings.catalog.search.v1.CatalogSearch.QueryServicesByAvailability",
66
+ methodFqn: "wix.bookings.catalog.search.v1.CatalogSearch.QueryServicesByFilters",
67
67
  packageName: PACKAGE_NAME,
68
68
  migrationOptions: {
69
69
  optInTransformResponse: true
@@ -131,7 +131,7 @@ function queryServicesByAvailability(payload) {
131
131
  };
132
132
  return metadata;
133
133
  }
134
- return __queryServicesByAvailability;
134
+ return __queryServicesByFilters;
135
135
  }
136
136
 
137
137
  // src/bookings-catalog-search-v1-catalog-search-catalog-search.universal.ts
@@ -209,13 +209,13 @@ var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
209
209
  TaxableAddressType2["BILLING"] = "BILLING";
210
210
  return TaxableAddressType2;
211
211
  })(TaxableAddressType || {});
212
- async function queryServicesByAvailability2(options) {
212
+ async function queryServicesByFilters2(options) {
213
213
  const { httpClient, sideEffects } = arguments[1];
214
214
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
215
215
  query: options?.query,
216
- availabilityFilter: options?.availabilityFilter
216
+ serviceFilters: options?.serviceFilters
217
217
  });
218
- const reqOpts = queryServicesByAvailability(
218
+ const reqOpts = queryServicesByFilters(
219
219
  payload
220
220
  );
221
221
  sideEffects?.onSiteCall?.();
@@ -261,7 +261,7 @@ async function queryServicesByAvailability2(options) {
261
261
  spreadPathsToArguments: {},
262
262
  explicitPathsToArguments: {
263
263
  query: "$[0].query",
264
- availabilityFilter: "$[0].availabilityFilter"
264
+ serviceFilters: "$[0].serviceFilters"
265
265
  },
266
266
  singleArgumentUnchanged: false
267
267
  },
@@ -273,8 +273,8 @@ async function queryServicesByAvailability2(options) {
273
273
  }
274
274
 
275
275
  // src/bookings-catalog-search-v1-catalog-search-catalog-search.public.ts
276
- function queryServicesByAvailability3(httpClient) {
277
- return (options) => queryServicesByAvailability2(
276
+ function queryServicesByFilters3(httpClient) {
277
+ return (options) => queryServicesByFilters2(
278
278
  options,
279
279
  // @ts-ignore
280
280
  { httpClient }
@@ -283,7 +283,7 @@ function queryServicesByAvailability3(httpClient) {
283
283
 
284
284
  // src/bookings-catalog-search-v1-catalog-search-catalog-search.context.ts
285
285
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
286
- var queryServicesByAvailability4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(queryServicesByAvailability3);
286
+ var queryServicesByFilters4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(queryServicesByFilters3);
287
287
  // Annotate the CommonJS export names for ESM import in node:
288
288
  0 && (module.exports = {
289
289
  AddOnPaymentOptions,
@@ -299,6 +299,6 @@ var queryServicesByAvailability4 = /* @__PURE__ */ (0, import_rest_modules2.crea
299
299
  TaxableAddressType,
300
300
  Timing,
301
301
  UnitType,
302
- queryServicesByAvailability
302
+ queryServicesByFilters
303
303
  });
304
304
  //# sourceMappingURL=index.js.map