@wix/auto_sdk_bookings_booking-policies 1.0.59 → 1.0.60

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.
@@ -347,6 +347,79 @@ interface SaveCreditCardPolicy {
347
347
  */
348
348
  enabled?: boolean;
349
349
  }
350
+ /**
351
+ * Policy for determining how staff members are sorted and selected during the booking process.
352
+ * This affects which staff member is chosen when multiple staff members are available for a service.
353
+ */
354
+ interface StaffSortingPolicy extends StaffSortingPolicyOptionsOneOf {
355
+ rankingOptions?: RankingOptions;
356
+ customOptions?: CustomOptions;
357
+ /**
358
+ * Method used for sorting and selecting staff members.
359
+ *
360
+ * Default: `RANDOM`
361
+ */
362
+ sortingMethodType?: SortingMethodTypeWithLiterals;
363
+ }
364
+ /** @oneof */
365
+ interface StaffSortingPolicyOptionsOneOf {
366
+ rankingOptions?: RankingOptions;
367
+ customOptions?: CustomOptions;
368
+ }
369
+ /** Order for ranking-based staff selection. */
370
+ declare enum RankingOrder {
371
+ UNKNOWN_RANKING_ORDER = "UNKNOWN_RANKING_ORDER",
372
+ /** Staff members with lower priority values are selected first. */
373
+ LOWEST_TO_HIGHEST = "LOWEST_TO_HIGHEST",
374
+ /** Staff members with higher priority values are selected first. */
375
+ HIGHEST_TO_LOWEST = "HIGHEST_TO_LOWEST"
376
+ }
377
+ /** @enumType */
378
+ type RankingOrderWithLiterals = RankingOrder | 'UNKNOWN_RANKING_ORDER' | 'LOWEST_TO_HIGHEST' | 'HIGHEST_TO_LOWEST';
379
+ /** Method used to sort and select staff members. */
380
+ declare enum SortingMethodType {
381
+ UNKNOWN_SORTING_METHOD_TYPE = "UNKNOWN_SORTING_METHOD_TYPE",
382
+ /** Staff members are selected randomly from available options. */
383
+ RANDOM = "RANDOM",
384
+ /** Staff members are selected based on their priority ranking. */
385
+ RANKING = "RANKING",
386
+ /**
387
+ * Staff members are selected using a custom method provided by StaffSelectionSPI.
388
+ * This allows third-party apps to implement custom staff selection logic.
389
+ */
390
+ CUSTOM = "CUSTOM"
391
+ }
392
+ /** @enumType */
393
+ type SortingMethodTypeWithLiterals = SortingMethodType | 'UNKNOWN_SORTING_METHOD_TYPE' | 'RANDOM' | 'RANKING' | 'CUSTOM';
394
+ /**
395
+ * Configuration options for ranking-based staff selection.
396
+ * Used when `sorting_method_type` is set to `RANKING`.
397
+ */
398
+ interface RankingOptions {
399
+ /**
400
+ * Order in which staff members are sorted by their priority ranking.
401
+ *
402
+ * Default: `LOWEST_TO_HIGHEST`
403
+ */
404
+ order?: RankingOrderWithLiterals;
405
+ }
406
+ /**
407
+ * Configuration options for custom staff selection methods.
408
+ * Used when `sorting_method_type` is set to `CUSTOM`.
409
+ */
410
+ interface CustomOptions {
411
+ /**
412
+ * ID of the custom selection method implemented in StaffSelectionSPI.
413
+ * This identifies which custom sorting algorithm to use.
414
+ * @format GUID
415
+ */
416
+ methodId?: string;
417
+ /**
418
+ * ID of the app that provides the custom selection method.
419
+ * @format GUID
420
+ */
421
+ appId?: string;
422
+ }
350
423
  interface ExtendedFields {
351
424
  /**
352
425
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
@@ -1883,4 +1956,4 @@ interface CountBookingPoliciesOptions {
1883
1956
  filter?: Record<string, any> | null;
1884
1957
  }
1885
1958
 
1886
- export { type ActionEvent, type Address, type AddressHint, type Asset, type BaseEventMetadata, type BookAfterStartPolicy, type BookingPoliciesQueryBuilder, type BookingPoliciesQueryResult, type BookingPolicy, type BookingPolicyCreatedEnvelope, type BookingPolicyDefaultBookingPolicySetEnvelope, type BookingPolicyDeletedEnvelope, type BookingPolicyUpdatedEnvelope, type BusinessSchedule, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type Categories, type ChangeContext, type ChangeContextPayloadOneOf, type ConsentPolicy, type CountBookingPoliciesOptions, type CountBookingPoliciesRequest, type CountBookingPoliciesResponse, type CreateBookingPolicyRequest, type CreateBookingPolicyResponse, type CreateBookingPolicyValidationErrors, type CreateMissingDefaultPolicyRequest, type CreateMissingDefaultPolicyResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, DayOfWeek, type DayOfWeekWithLiterals, type DefaultBookingPolicySet, type DeleteBookingPolicyApplicationErrors, type DeleteBookingPolicyRequest, type DeleteBookingPolicyResponse, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GeoCoordinates, type GetBookingPolicyRequest, type GetBookingPolicyResponse, type GetStrictestBookingPolicyRequest, type GetStrictestBookingPolicyResponse, type IdentificationData, type IdentificationDataIdOneOf, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Locale, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type Money, type Multilingual, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type ParticipantsPolicy, type PicassoAssigned, type PicassoUnassigned, PlacementType, type PlacementTypeWithLiterals, type PolicyDescription, type Properties, type PropertiesChange, type QueryBookingPoliciesRequest, type QueryBookingPoliciesResponse, type ReschedulePolicy, ResolutionMethod, type ResolutionMethodWithLiterals, type ResourcesPolicy, type RestoreInfo, type SaveCreditCardPolicy, type ServiceProvisioned, type ServiceRemoved, type SetDefaultBookingPolicyRequest, type SetDefaultBookingPolicyResponse, type SiteCloned, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePropertiesEvent, type SitePropertiesNotification, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, type SpecialHourPeriod, State, type StateWithLiterals, type StudioAssigned, type StudioUnassigned, type SupportedLanguage, type TimePeriod, type Translation, type UpdateAllPoliciesRequest, type UpdateAllPoliciesResponse, type UpdateBookingPolicy, type UpdateBookingPolicyRequest, type UpdateBookingPolicyResponse, type UpdateBookingPolicyValidationErrors, type V4SiteCreated, type WaitlistPolicy, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, countBookingPolicies, createBookingPolicy, deleteBookingPolicy, getBookingPolicy, getStrictestBookingPolicy, onBookingPolicyCreated, onBookingPolicyDefaultBookingPolicySet, onBookingPolicyDeleted, onBookingPolicyUpdated, queryBookingPolicies, setDefaultBookingPolicy, updateBookingPolicy };
1959
+ export { type ActionEvent, type Address, type AddressHint, type Asset, type BaseEventMetadata, type BookAfterStartPolicy, type BookingPoliciesQueryBuilder, type BookingPoliciesQueryResult, type BookingPolicy, type BookingPolicyCreatedEnvelope, type BookingPolicyDefaultBookingPolicySetEnvelope, type BookingPolicyDeletedEnvelope, type BookingPolicyUpdatedEnvelope, type BusinessSchedule, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type Categories, type ChangeContext, type ChangeContextPayloadOneOf, type ConsentPolicy, type CountBookingPoliciesOptions, type CountBookingPoliciesRequest, type CountBookingPoliciesResponse, type CreateBookingPolicyRequest, type CreateBookingPolicyResponse, type CreateBookingPolicyValidationErrors, type CreateMissingDefaultPolicyRequest, type CreateMissingDefaultPolicyResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomOptions, DayOfWeek, type DayOfWeekWithLiterals, type DefaultBookingPolicySet, type DeleteBookingPolicyApplicationErrors, type DeleteBookingPolicyRequest, type DeleteBookingPolicyResponse, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GeoCoordinates, type GetBookingPolicyRequest, type GetBookingPolicyResponse, type GetStrictestBookingPolicyRequest, type GetStrictestBookingPolicyResponse, type IdentificationData, type IdentificationDataIdOneOf, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Locale, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, type Money, type Multilingual, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type ParticipantsPolicy, type PicassoAssigned, type PicassoUnassigned, PlacementType, type PlacementTypeWithLiterals, type PolicyDescription, type Properties, type PropertiesChange, type QueryBookingPoliciesRequest, type QueryBookingPoliciesResponse, type RankingOptions, RankingOrder, type RankingOrderWithLiterals, type ReschedulePolicy, ResolutionMethod, type ResolutionMethodWithLiterals, type ResourcesPolicy, type RestoreInfo, type SaveCreditCardPolicy, type ServiceProvisioned, type ServiceRemoved, type SetDefaultBookingPolicyRequest, type SetDefaultBookingPolicyResponse, type SiteCloned, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePropertiesEvent, type SitePropertiesNotification, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, SortingMethodType, type SortingMethodTypeWithLiterals, type SpecialHourPeriod, type StaffSortingPolicy, type StaffSortingPolicyOptionsOneOf, State, type StateWithLiterals, type StudioAssigned, type StudioUnassigned, type SupportedLanguage, type TimePeriod, type Translation, type UpdateAllPoliciesRequest, type UpdateAllPoliciesResponse, type UpdateBookingPolicy, type UpdateBookingPolicyRequest, type UpdateBookingPolicyResponse, type UpdateBookingPolicyValidationErrors, type V4SiteCreated, type WaitlistPolicy, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, countBookingPolicies, createBookingPolicy, deleteBookingPolicy, getBookingPolicy, getStrictestBookingPolicy, onBookingPolicyCreated, onBookingPolicyDefaultBookingPolicySet, onBookingPolicyDeleted, onBookingPolicyUpdated, queryBookingPolicies, setDefaultBookingPolicy, updateBookingPolicy };
@@ -24,9 +24,11 @@ __export(index_typings_exports, {
24
24
  DeleteStatus: () => DeleteStatus,
25
25
  Namespace: () => Namespace,
26
26
  PlacementType: () => PlacementType,
27
+ RankingOrder: () => RankingOrder,
27
28
  ResolutionMethod: () => ResolutionMethod,
28
29
  SiteCreatedContext: () => SiteCreatedContext,
29
30
  SortOrder: () => SortOrder,
31
+ SortingMethodType: () => SortingMethodType,
30
32
  State: () => State,
31
33
  WebhookIdentityType: () => WebhookIdentityType,
32
34
  countBookingPolicies: () => countBookingPolicies2,
@@ -309,6 +311,19 @@ function countBookingPolicies(payload) {
309
311
 
310
312
  // src/bookings-v1-booking-policy-booking-policies.universal.ts
311
313
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
314
+ var RankingOrder = /* @__PURE__ */ ((RankingOrder2) => {
315
+ RankingOrder2["UNKNOWN_RANKING_ORDER"] = "UNKNOWN_RANKING_ORDER";
316
+ RankingOrder2["LOWEST_TO_HIGHEST"] = "LOWEST_TO_HIGHEST";
317
+ RankingOrder2["HIGHEST_TO_LOWEST"] = "HIGHEST_TO_LOWEST";
318
+ return RankingOrder2;
319
+ })(RankingOrder || {});
320
+ var SortingMethodType = /* @__PURE__ */ ((SortingMethodType2) => {
321
+ SortingMethodType2["UNKNOWN_SORTING_METHOD_TYPE"] = "UNKNOWN_SORTING_METHOD_TYPE";
322
+ SortingMethodType2["RANDOM"] = "RANDOM";
323
+ SortingMethodType2["RANKING"] = "RANKING";
324
+ SortingMethodType2["CUSTOM"] = "CUSTOM";
325
+ return SortingMethodType2;
326
+ })(SortingMethodType || {});
312
327
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
313
328
  SortOrder2["ASC"] = "ASC";
314
329
  SortOrder2["DESC"] = "DESC";
@@ -630,9 +645,11 @@ async function countBookingPolicies2(options) {
630
645
  DeleteStatus,
631
646
  Namespace,
632
647
  PlacementType,
648
+ RankingOrder,
633
649
  ResolutionMethod,
634
650
  SiteCreatedContext,
635
651
  SortOrder,
652
+ SortingMethodType,
636
653
  State,
637
654
  WebhookIdentityType,
638
655
  countBookingPolicies,