/** * The `bookingPolicySnapshot` object is the version of a service's booking policy * at the time a booking is created. This allows you for example to charge * customers the correct cancellation fee even after a service's cancellation * policy has been updated. */ export interface BookingPolicySnapshot { /** * Booking policy snapshot ID. * @readonly */ _id?: string | null; /** ID of the booking that's associated with this policy snapshot. */ bookingId?: string | null; /** * Snapshot of the [booking policy](https://dev.wix.com/docs/sdk/backend-modules/bookings/booking-policies/get-booking-policy). * at the time the corresponding booking was created. */ policy?: BookingPolicy; /** * Date and time the booking policy snapshot was created in `YYYY-MM-DDThh:mm:ssZ` format. * @readonly */ _createdDate?: Date | null; } /** * `BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service * by visitors and members. * * Each `BookingPolicy` consists of a number of sub-policies. When the Bookings App is provisioned to a meta site then a * default `BookingPolicy` will be created with defaults for each of these sub-policies. This also applies when a request * is received to create a new `BookingPolicy` and one or more of these sub-policies are not provided. * * Sub-policies are defined in separate objects as specified below. * - The `CancellationPolicy` object defines the policy for canceling a booked session. * - The `ReschedulePolicy` object defines the policy for rescheduling booked session. * * By default each sub-policy is disabled. A more detailed specification of the default settings of each sub-policy * can be found in the description of the corresponding object. * * Partial updates are supported on the main entity level, however in order to update a sub-policy the client needs to provide the whole sub-policy object. */ export interface BookingPolicy { /** * Booking policy ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the booking policy is updated. To prevent conflicting changes, the current `revision` must be passed when updating the booking policy. * @readonly */ revision?: string | null; /** * Date and time the booking policy was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the booking policy was updated. * @readonly */ _updatedDate?: Date | null; /** Name of the booking policy. */ name?: string | null; /** Custom description for the booking policy and whether the booking policy is displayed to the participant. */ customPolicyDescription?: PolicyDescription; /** * Whether the booking policy is the default. * @readonly */ default?: boolean | null; /** Rule for canceling a booking. */ cancellationPolicy?: CancellationPolicy; /** Rule for rescheduling a booking. */ reschedulePolicy?: ReschedulePolicy; /** Rules for cancellation fees. */ cancellationFeePolicy?: CancellationFeePolicy; /** Rule for saving credit card details. */ saveCreditCardPolicy?: SaveCreditCardPolicy; } /** A description of the booking policy to display to participants. */ export interface PolicyDescription { /** * Whether the description is displayed to the participant. `true` means the * description is displayed. * * Default: `false` */ enabled?: boolean; /** * Description of the booking policy. * * Default: Empty * Max length: 2500 characters */ description?: string; /** * Description of the translated booking policy. * * Default: Empty * Max length: 2500 characters */ descriptionTranslated?: string | null; } /** The rule for canceling a booked session. */ export interface CancellationPolicy { /** * Whether customers can cancel the booking. `true` means customers can cancel * the booking. * * Default: `false` */ enabled?: boolean; /** * Whether there's a limit on the latest cancellation time. `false` means * customers can cancel the booking until the last minute before the course or * session starts. * * Default: `false` */ limitLatestCancellation?: boolean; /** * Minimum number of minutes before the start of the session customers can cancel. * For courses, this refers to the start of the first course session. * * Default: `1440` minutes (1 day) * Min: `1` minute */ latestCancellationInMinutes?: number; } /** The rule for rescheduling a booked session. */ export interface ReschedulePolicy { /** * Whether customers can reschedule a booking for an appointment-based service. * `true` means customers can reschedule. * * Default: `false` */ enabled?: boolean; /** * Whether there's a limit on the latest supported rescheduling time. `false` * means customers can reschedule until the last minute before the session start. * * Default: `false` */ limitLatestReschedule?: boolean; /** * Minimum number of minutes before the session start session customers can * reschedule their booking. * * Default: `1440` minutes (1 day) * Min: `1` minute */ latestRescheduleInMinutes?: number; } export interface CancellationFeePolicy { /** * Whether customers must pay a cancellation fee when canceling a booking. * * Default: `false` */ enabled?: boolean; /** * Time windows relative to the session start during which customers can cancel * their booking. Each window includes details about the fee for canceling * within it. */ cancellationWindows?: CancellationWindow[]; /** * Whether Wix automatically charges the cancellation fee from the customer once * they cancel their booking. * * Default: `true` */ autoCollectFeeEnabled?: boolean | null; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ export interface Money { /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */ value?: string; /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } export interface CancellationWindow extends CancellationWindowFeeOneOf { /** Fixed amount customers must pay when canceling the booking within this window. */ amount?: Money; /** * Percentage of the booking price customers must pay when canceling within this window. * * Min: `0.01` percent * Max: `100` percent */ percentage?: string; /** * Start of the cancellation window in minutes before the session start. For * courses, this refers to the start of the first course session. */ startInMinutes?: number | null; } /** @oneof */ export interface CancellationWindowFeeOneOf { /** Fixed amount customers must pay when canceling the booking within this window. */ amount?: Money; /** * Percentage of the booking price customers must pay when canceling within this window. * * Min: `0.01` percent * Max: `100` percent */ percentage?: string; } export interface SaveCreditCardPolicy { /** * Whether Wix stores credit card details of the customer. Storing the details * allows Wix to prefill the checkout and thus increases the likelihood that the * customer completes the booking process. * * Default: `false` */ enabled?: boolean; } export interface ListPolicySnapshotsByBookingIdsRequest { /** List of booking IDs to retrieve policy snapshots for. */ bookingIds: string[] | null; } export interface ListPolicySnapshotsByBookingIdsResponse { /** Retrieved booking policy snapshots. */ bookingPolicySnapshots?: BookingPolicySnapshot[]; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface Empty { } interface PolicyDescriptionNonNullableFields { enabled: boolean; description: string; } interface CancellationPolicyNonNullableFields { enabled: boolean; limitLatestCancellation: boolean; latestCancellationInMinutes: number; } interface ReschedulePolicyNonNullableFields { enabled: boolean; limitLatestReschedule: boolean; latestRescheduleInMinutes: number; } interface MoneyNonNullableFields { value: string; currency: string; } interface CancellationWindowNonNullableFields { amount?: MoneyNonNullableFields; percentage: string; } interface CancellationFeePolicyNonNullableFields { enabled: boolean; cancellationWindows: CancellationWindowNonNullableFields[]; } interface SaveCreditCardPolicyNonNullableFields { enabled: boolean; } interface BookingPolicyNonNullableFields { customPolicyDescription?: PolicyDescriptionNonNullableFields; cancellationPolicy?: CancellationPolicyNonNullableFields; reschedulePolicy?: ReschedulePolicyNonNullableFields; cancellationFeePolicy?: CancellationFeePolicyNonNullableFields; saveCreditCardPolicy?: SaveCreditCardPolicyNonNullableFields; } interface BookingPolicySnapshotNonNullableFields { policy?: BookingPolicyNonNullableFields; } export interface ListPolicySnapshotsByBookingIdsResponseNonNullableFields { bookingPolicySnapshots: BookingPolicySnapshotNonNullableFields[]; } /** * Retrieves a list of booking policy snapshots by *booking IDs* * ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/about-the-bookings-apis)). * @param bookingIds - List of booking IDs to retrieve policy snapshots for. * @public * @documentationMaturity preview * @requiredField bookingIds * @permissionId BOOKINGS.BOOKING_POLICY_SNAPSHOT_READ * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Manage Bookings Services and Settings * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn com.wixpress.bookings.policy.snapshots.v1.BookingPolicySnapshots.ListPolicySnapshotsByBookingIds */ export declare function listPolicySnapshotsByBookingIds(bookingIds: string[] | null): Promise; export {};