@wix/auto_sdk_bookings_booking-policies 1.0.63 → 1.0.65

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.
@@ -1524,8 +1597,6 @@ interface BookingPolicyCreatedEnvelope {
1524
1597
  }
1525
1598
  /**
1526
1599
  * Triggered when a booking policy is created.
1527
- * @permissionScope Manage Stores
1528
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1529
1600
  * @permissionScope Read Bookings - Public Data
1530
1601
  * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1531
1602
  * @permissionScope Manage Bookings Services and Settings
@@ -1553,8 +1624,6 @@ interface BookingPolicyDefaultBookingPolicySetEnvelope {
1553
1624
  * _Booking Policy Updated_
1554
1625
  * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/on-booking-policy-updated) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/booking-policy-updated))
1555
1626
  * is also triggered both for the new and the previous default policy.
1556
- * @permissionScope Manage Stores
1557
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1558
1627
  * @permissionScope Read Bookings - Public Data
1559
1628
  * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1560
1629
  * @permissionScope Manage Bookings Services and Settings
@@ -1578,8 +1647,6 @@ interface BookingPolicyDeletedEnvelope {
1578
1647
  }
1579
1648
  /**
1580
1649
  * Triggered when a booking policy is deleted.
1581
- * @permissionScope Manage Stores
1582
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1583
1650
  * @permissionScope Read Bookings - Public Data
1584
1651
  * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1585
1652
  * @permissionScope Manage Bookings Services and Settings
@@ -1605,8 +1672,6 @@ interface BookingPolicyUpdatedEnvelope {
1605
1672
  /**
1606
1673
  * Triggered when a booking policy is updated, including when a policy's
1607
1674
  * `default` attribute changes.
1608
- * @permissionScope Manage Stores
1609
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
1610
1675
  * @permissionScope Read Bookings - Public Data
1611
1676
  * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
1612
1677
  * @permissionScope Manage Bookings Services and Settings
@@ -1883,4 +1948,4 @@ interface CountBookingPoliciesOptions {
1883
1948
  filter?: Record<string, any> | null;
1884
1949
  }
1885
1950
 
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 };
1951
+ 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 };
@@ -270,6 +270,19 @@ function countBookingPolicies(payload) {
270
270
 
271
271
  // src/bookings-v1-booking-policy-booking-policies.universal.ts
272
272
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
273
+ var RankingOrder = /* @__PURE__ */ ((RankingOrder2) => {
274
+ RankingOrder2["UNKNOWN_RANKING_ORDER"] = "UNKNOWN_RANKING_ORDER";
275
+ RankingOrder2["LOWEST_TO_HIGHEST"] = "LOWEST_TO_HIGHEST";
276
+ RankingOrder2["HIGHEST_TO_LOWEST"] = "HIGHEST_TO_LOWEST";
277
+ return RankingOrder2;
278
+ })(RankingOrder || {});
279
+ var SortingMethodType = /* @__PURE__ */ ((SortingMethodType2) => {
280
+ SortingMethodType2["UNKNOWN_SORTING_METHOD_TYPE"] = "UNKNOWN_SORTING_METHOD_TYPE";
281
+ SortingMethodType2["RANDOM"] = "RANDOM";
282
+ SortingMethodType2["RANKING"] = "RANKING";
283
+ SortingMethodType2["CUSTOM"] = "CUSTOM";
284
+ return SortingMethodType2;
285
+ })(SortingMethodType || {});
273
286
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
274
287
  SortOrder2["ASC"] = "ASC";
275
288
  SortOrder2["DESC"] = "DESC";
@@ -590,9 +603,11 @@ export {
590
603
  DeleteStatus,
591
604
  Namespace,
592
605
  PlacementType,
606
+ RankingOrder,
593
607
  ResolutionMethod,
594
608
  SiteCreatedContext,
595
609
  SortOrder,
610
+ SortingMethodType,
596
611
  State,
597
612
  WebhookIdentityType,
598
613
  countBookingPolicies2 as countBookingPolicies,