@wix/auto_sdk_bookings_catalog-search 1.0.0 → 1.0.2

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 +89 -25
  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 +89 -25
  8. package/build/cjs/meta.js +9 -8
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +89 -25
  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 +89 -25
  17. package/build/es/meta.mjs +8 -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 +79 -35
  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 +89 -25
  26. package/build/internal/cjs/meta.js +9 -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 +79 -35
  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 +89 -25
  35. package/build/internal/es/meta.mjs +8 -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.
@@ -127,10 +127,18 @@ interface Attribute extends AttributeValueOneOf {
127
127
  * @maxLength 40
128
128
  */
129
129
  enumValue?: string;
130
- /** Exact number value to match. */
131
- numberValue?: number;
130
+ /**
131
+ * Inclusive number range to match. At least one bound must be present; min must not exceed max.
132
+ * To match an exact number, set min and max to the same value.
133
+ */
134
+ numberRangeValue?: NumberRange;
132
135
  /** Exact boolean value to match. */
133
136
  boolValue?: boolean;
137
+ /**
138
+ * Discrete set of numbers to match. At least one value must be present.
139
+ * A resource matches if its stored number equals any value in the set.
140
+ */
141
+ numberValues?: NumberValues;
134
142
  /**
135
143
  * ID of the attribute definition to filter by.
136
144
  * @format GUID
@@ -144,12 +152,35 @@ interface AttributeValueOneOf {
144
152
  * @maxLength 40
145
153
  */
146
154
  enumValue?: string;
147
- /** Exact number value to match. */
148
- numberValue?: number;
155
+ /**
156
+ * Inclusive number range to match. At least one bound must be present; min must not exceed max.
157
+ * To match an exact number, set min and max to the same value.
158
+ */
159
+ numberRangeValue?: NumberRange;
149
160
  /** Exact boolean value to match. */
150
161
  boolValue?: boolean;
162
+ /**
163
+ * Discrete set of numbers to match. At least one value must be present.
164
+ * A resource matches if its stored number equals any value in the set.
165
+ */
166
+ numberValues?: NumberValues;
151
167
  }
152
- interface QueryServicesByAvailabilityResponse {
168
+ /** Inclusive numeric range filter. At least one bound must be present. */
169
+ interface NumberRange {
170
+ /** Minimum value (inclusive). If absent, no lower bound is applied. */
171
+ min?: number | null;
172
+ /** Maximum value (inclusive). If absent, no upper bound is applied. */
173
+ max?: number | null;
174
+ }
175
+ /** Discrete set of numeric values to match. At least one value must be present. */
176
+ interface NumberValues {
177
+ /**
178
+ * Numbers to match against. A resource matches if its stored number equals any entry.
179
+ * @maxSize 10
180
+ */
181
+ values?: number[];
182
+ }
183
+ interface QueryServicesByFiltersResponse {
153
184
  /** Services matching the query, each enriched with availability data. */
154
185
  results?: ServiceWithAvailability[];
155
186
  /**
@@ -428,6 +459,13 @@ interface Payment extends PaymentRateOneOf {
428
459
  * Required when: `rateType` is `VARIED`
429
460
  */
430
461
  varied?: VariedPayment;
462
+ /**
463
+ * Subscription pricing details for the service. Supported for course services only.
464
+ * The business charges recurring monthly payments instead of a one-time fee.
465
+ *
466
+ * Required when: `rateType` is `SUBSCRIPTION`.
467
+ */
468
+ subscription?: SubscriptionPayment;
431
469
  /** The rate the customer is expected to pay for the service. */
432
470
  rateType?: RateTypeWithLiterals;
433
471
  /** The payment options a customer can use to pay for the service. */
@@ -479,6 +517,13 @@ interface PaymentRateOneOf {
479
517
  * Required when: `rateType` is `VARIED`
480
518
  */
481
519
  varied?: VariedPayment;
520
+ /**
521
+ * Subscription pricing details for the service. Supported for course services only.
522
+ * The business charges recurring monthly payments instead of a one-time fee.
523
+ *
524
+ * Required when: `rateType` is `SUBSCRIPTION`.
525
+ */
526
+ subscription?: SubscriptionPayment;
482
527
  }
483
528
  declare enum RateType {
484
529
  /** The service has a fixed price. */
@@ -488,10 +533,15 @@ declare enum RateType {
488
533
  /** This service is offered with a set of different prices based on different terms. */
489
534
  VARIED = "VARIED",
490
535
  /** This service is offered free of charge. */
491
- NO_FEE = "NO_FEE"
536
+ NO_FEE = "NO_FEE",
537
+ /**
538
+ * The service charges recurring monthly payments. Supported for course services only.
539
+ * @documentationMaturity preview
540
+ */
541
+ SUBSCRIPTION = "SUBSCRIPTION"
492
542
  }
493
543
  /** @enumType */
494
- type RateTypeWithLiterals = RateType | 'FIXED' | 'CUSTOM' | 'VARIED' | 'NO_FEE';
544
+ type RateTypeWithLiterals = RateType | 'FIXED' | 'CUSTOM' | 'VARIED' | 'NO_FEE' | 'SUBSCRIPTION';
495
545
  interface FixedPayment {
496
546
  /**
497
547
  * The fixed price required to book the service.
@@ -573,24 +623,38 @@ interface VariedPayment {
573
623
  fullUpfrontPaymentAllowed?: boolean | null;
574
624
  }
575
625
  interface SubscriptionPayment {
576
- /** Amount charged each billing cycle. */
626
+ /**
627
+ * Base price charged per billing cycle before tax and discounts.
628
+ * The actual amount charged may differ after checkout applies tax and discounts.
629
+ */
577
630
  amountPerBillingCycle?: Money;
578
- /** Billing frequency used for recurring subscription charges. */
631
+ /**
632
+ * Billing frequency for recurring subscription charges.
633
+ * Reflected as `billingFrequency` in the booking's subscription info.
634
+ *
635
+ * Currently supports `MONTHLY` only.
636
+ */
579
637
  frequency?: FrequencyTypeWithLiterals;
580
638
  /**
581
- * Total number of recurring payments in the subscription.
582
- * Value must be greater than `1`.
583
- * Required when: `rateType` is `SUBSCRIPTION`
639
+ * Total number of billing cycles in the subscription. For example, `12` for a 12-month subscription with monthly payments.
640
+ * Reflected as `totalCycles` in the booking's subscription info.
641
+ *
642
+ * Required when: `rateType` is `SUBSCRIPTION`.
584
643
  * @min 2
585
644
  */
586
645
  totalPayments?: number | null;
587
- /** When the first recurring payment is charged. */
646
+ /** Determines when the first billing cycle payment is charged. Used together with `recurringStartDate` to define the subscription billing schedule. */
588
647
  firstChargeDate?: FirstChargeDateTypeWithLiterals;
589
648
  /**
590
- * Date and time when recurring payments start in `YYYY-MM-DDThh:mm:ss.sssZ` format.
649
+ * Date and time when recurring billing starts.
650
+ *
651
+ * When `firstChargeDate` is `CHECKOUT`, the first charge occurs at checkout and subsequent billing cycles start from this date.
652
+ *
591
653
  * When `firstChargeDate` is `SCHEDULED`, the first charge occurs on this date.
592
- * When `firstChargeDate` is `CHECKOUT`, the first charge occurs at checkout and recurring billing begins on this date.
593
- * Required when: `rateType` is `SUBSCRIPTION`. Sets the future billing cycle dates.
654
+ *
655
+ * Customers who book after recurring billing starts are billed for the remaining billing cycles only.
656
+ *
657
+ * Required when: `rateType` is `SUBSCRIPTION`.
594
658
  */
595
659
  recurringStartDate?: Date | null;
596
660
  /**
@@ -607,15 +671,15 @@ interface SubscriptionPayment {
607
671
  fullUpfrontPayment?: FullUpfrontPayment;
608
672
  }
609
673
  declare enum FrequencyType {
610
- /** Payment is charged once every month. */
674
+ /** Billing cycle repeats once per month. */
611
675
  MONTHLY = "MONTHLY"
612
676
  }
613
677
  /** @enumType */
614
678
  type FrequencyTypeWithLiterals = FrequencyType | 'MONTHLY';
615
679
  declare enum FirstChargeDateType {
616
- /** Charge the first billing cycle at checkout. */
680
+ /** The first billing cycle is charged at checkout. Recurring billing continues from the `recurringStartDate`. */
617
681
  CHECKOUT = "CHECKOUT",
618
- /** Charge the first billing cycle on the `recurringStartDate`. */
682
+ /** The first billing cycle is charged on the `recurringStartDate`. */
619
683
  SCHEDULED = "SCHEDULED"
620
684
  }
621
685
  /** @enumType */
@@ -1768,7 +1832,7 @@ interface Cursors {
1768
1832
  */
1769
1833
  prev?: string | null;
1770
1834
  }
1771
- interface QueryServicesByAvailabilityOptions {
1835
+ interface QueryServicesByFiltersOptions {
1772
1836
  /**
1773
1837
  * Query against the service catalog — WQL filter, sort, and cursor paging.
1774
1838
  * Supports the same fields as QueryServices.
@@ -1778,7 +1842,7 @@ interface QueryServicesByAvailabilityOptions {
1778
1842
  * Availability and resource constraints applied on top of the service query.
1779
1843
  * When absent, no availability check is performed and all pre-filtered services are returned.
1780
1844
  */
1781
- availabilityFilter?: AvailabilityFilter;
1845
+ serviceFilters?: ServiceFilters;
1782
1846
  }
1783
1847
 
1784
- 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 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 };
1848
+ 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