export declare const __debug: { verboseLogging: { on: () => boolean; off: () => boolean; }; }; /** WixUrl is the main entity of WixUrlService that can be used for lorem ipsum dolor */ export interface RedirectSession { /** A guid representing the redirect session (for future use) */ _id?: string; /** * The Wix URL to redirect into * @readonly */ fullUrl?: string; } export interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf { /** The parameters used in order to generate the URL into the Bookings checkout flow */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** The parameters used in order to generate the URL into the Ecom checkout flow */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** The parameters used in order to generate the URL into the events checkout flow */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** The parameters used in order to generate the URL into the paid plans checkout flow */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** The parameters used in order to generate the URL into the Wix login page */ login?: RedirectSessionLoginParams; /** The parameters used in order to generate the URL to logout from Wix (invalidate token and clear cookies on wix domain) */ logout?: RedirectSessionLogoutParams; /** The parameters used in order to generate the URL into the authorize page */ auth?: RedirectSessionAuthParams; /** The callbacks (URL) allowing the definition of the pages which should be redirected back to the original site during the flow initiated in Wix */ callbacks?: CallbackParams; /** Redirect sessions options */ preferences?: RedirectSessionPreferences; } /** @oneof */ export interface CreateRedirectSessionRequestIntentOneOf { /** The parameters used in order to generate the URL into the Bookings checkout flow */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** The parameters used in order to generate the URL into the Ecom checkout flow */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** The parameters used in order to generate the URL into the events checkout flow */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** The parameters used in order to generate the URL into the paid plans checkout flow */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** The parameters used in order to generate the URL into the Wix login page */ login?: RedirectSessionLoginParams; /** The parameters used in order to generate the URL to logout from Wix (invalidate token and clear cookies on wix domain) */ logout?: RedirectSessionLogoutParams; /** The parameters used in order to generate the URL into the authorize page */ auth?: RedirectSessionAuthParams; } export interface RedirectSessionBookingsCheckoutParams { /** The timezone used for presentation and formatting when presenting the selected slot in a human readable format */ timezone?: string; /** (Required) The ID of the service used in order to select the slot */ serviceId?: string; /** (Required) The selected calendar slots to checkout */ slotAvailability?: SlotAvailability; } export interface SlotAvailability { /** * The slot for the corresponding session, when the session is either a single session * or a specific session generated from a recurring session. */ slot?: Slot; /** * Whether the slot is bookable. Bookability is determined by checking a * session's open slots and booking policies. Locks are not taken into * account. */ bookable?: boolean; /** * Total number of spots for this slot. * For example, if a session has a total of 10 spots and 3 spots are booked, * `spotsTotal` is 10 and `openSpots` is 7. */ totalSpots?: number | null; /** Number of open spots for this slot. */ openSpots?: number | null; /** An object describing the slot's waitlist and its occupancy. */ waitingList?: WaitingList; /** Booking policy violations for the slot. */ bookingPolicyViolations?: BookingPolicyViolations; /** * Indicates whether the slot is locked because a waitlist exists. * When a slot frees up, the slot is offered to the next customer on the waitlist. Read-only. */ locked?: boolean | null; } export interface Slot { /** * ID for the slot's corresponding session, when the session is either a single session * or a specific session generated from a recurring session. */ sessionId?: string | null; /** Service ID. */ serviceId?: string; /** Schedule ID. */ scheduleId?: string; /** * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) * format. * * If `timezone` is specified, * dates are based on the local date/time. This means that the timezone offset * in the `start_date` is ignored. */ startDate?: string | null; /** * The end time of this slot in * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format. * * If `timezone` is specified, * dates are based on the local date/time. This means that the timezone offset * in the `end_date` is ignored. */ endDate?: string | null; /** * The timezone for which slot availability is to be calculated. * * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones) * when calculating availability. */ timezone?: string | null; /** * The resource required for this slot. Currently, the only supported resource * is the relevant staff member for the slot. */ resource?: SlotResource; /** Geographic location of the slot. */ location?: Location; } export interface SlotResource { /** * Resource ID. * @readonly */ _id?: string | null; /** Resource name. Read only. */ name?: string | null; } export interface Location { /** * Business location ID. Available only for locations that are business locations, * meaning the `location_type` is `"OWNER_BUSINESS"`. */ _id?: string | null; /** Location name. */ name?: string | null; /** The full address of this location. */ formattedAddress?: string | null; /** * Location type. * * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings. * - `"OWNER_CUSTOM"`: The address as set when creating the service. * - `"CUSTOM"`: The address as set for the individual session. */ locationType?: LocationType; } export declare enum LocationType { UNDEFINED = "UNDEFINED", OWNER_BUSINESS = "OWNER_BUSINESS", OWNER_CUSTOM = "OWNER_CUSTOM", CUSTOM = "CUSTOM" } export interface WaitingList { /** * Total number of spots and open spots for this waitlist. * For example, a Yoga class with 10 waitlist spots and 3 registered * on the waitlist has 10 `total_spots` and 7 `open_spots`. */ totalSpots?: number | null; /** Number of open spots for this waitlist. */ openSpots?: number | null; } export interface BookingPolicyViolations { /** Bookings policy violation. Too early to book this slot. */ tooEarlyToBook?: boolean | null; /** Bookings policy violation. Too late to book this slot. */ tooLateToBook?: boolean | null; /** Bookings policy violation. Online booking is disabled for this slot. */ bookOnlineDisabled?: boolean | null; } export interface RedirectSessionEcomCheckoutParams { /** (Required) The ID of the checkout entity used in order to start the checkout with */ checkoutId?: string; } export interface RedirectSessionEventsCheckoutParams { /** (Required) The ID of the selected event */ reservationId?: string; /** (Required) The slug of the selected event (url friendly name) */ eventSlug?: string; } export interface RedirectSessionPaidPlansCheckoutParams { /** (Required) The ID of the selected paid plan */ planId?: string; /** The encoded string representing the navigation defined for the end of the flow, probably received by wix site when navigating to headless */ checkoutData?: string | null; } export interface RedirectSessionLoginParams { } /** Deprecated - replaced by RedirectSessionAuthParams */ export interface RedirectSessionAuthorizeParams { /** (Required) The authorization request to be sent to the authorization server */ auth?: AuthorizeRequest; } /** * AuthorizeRequest is sent by the client to the authorization server to initiate * the authorization process. */ export interface AuthorizeRequest { /** client_id is the unique identifier of the client application. */ clientId?: string; /** * response_type specifies the desired authorization grant type. * This can be "code" for the authorization code. */ responseType?: string; /** * redirect_uri is the URI to which the authorization server will redirect the * user-agent after the user grants/denies permission. */ redirectUri?: string; /** * scope is a space-delimited string that specifies the requested scope of the * access request. */ scope?: string | null; /** * An opaque value, used for security purposes. If this request parameter is set * in the request, then it is returned to the application as part of the redirect_uri. */ state?: string; /** (Optional) How the result of the authorization request is formatted */ responseMode?: string | null; /** * code_challenge is the code challenge sent by the client as part of the PKCE * process. This field is only used if response_type is "code". */ codeChallenge?: string | null; /** * code_challenge_method is the code challenge method sent by the client as part * of the PKCE process. This field is only used if response_type is "code". */ codeChallengeMethod?: string | null; /** Current client session */ sessionToken?: string | null; /** * Optional fields for errors * A short error code that describes the type of error that occurred (e.g. "invalid_request") */ error?: string | null; /** A human-readable description of the error that occurred */ errorDescription?: string | null; } export interface RedirectSessionLogoutParams { /** (Required) The oauth app id used */ clientId?: string; } export interface RedirectSessionAuthParams { /** (Required) The authorization request to be sent to the authorization server */ authRequest?: AuthorizeRequest; } export interface CallbackParams { /** An external thank you page URL, used when the thank you page is implemented outside of Wix */ thankYouPageUrl?: string | null; /** The external home page URL, used in order to indicate where to redirect to at the end of the flow (after thank you page/error) */ postFlowUrl?: string | null; /** An external pricing plans page URL, used in case the checkout allows payment with a paid plans */ plansListUrl?: string | null; /** An external login page in case login form is implemented outside Wix */ loginUrl?: string | null; /** An external service list page URL (Bookings Services), used when the services page is implemented outside of Wix */ bookingsServiceListUrl?: string | null; /** An external cart page URL, used when the cart page is implemented outside of Wix */ cartPageUrl?: string | null; } export interface RedirectSessionPreferences { /** (Default: true) - Define whether the base wix site should be used or the template site for all checkouts */ useGenericWixPages?: boolean | null; } export interface CreateRedirectSessionResponse { /** The Wix URL details to redirect into */ redirectSession?: RedirectSession; } export interface ValidateCallbackURLRequest { /** An external URL to validate */ callbackUrl?: string; /** The type of the callback URL */ callbackType?: CallbackType; /** The oauth app id used in order to pull the allowed domains from, has to correspond to the same metasite as the site in context */ clientId?: string; } export declare enum CallbackType { /** Invalid value - default */ UNKNOWN = "UNKNOWN", /** The callback URL is used for the logout flow */ LOGOUT = "LOGOUT", /** The callback URL is used for a checkout flow */ CHECKOUT = "CHECKOUT", /** The callback URL is used for the authorize flow */ AUTHORIZE = "AUTHORIZE" } export interface ValidateCallbackURLResponse { /** is the provided url allowed for the given client id */ isValid?: boolean; } export interface SignInURLRequest { /** The oauth app id used in order to pull the allowed domains from, has to correspond to the same metasite as the site in context */ clientId?: string; } export interface SignInURLResponse { /** The Wix URL details to redirect into */ redirectSession?: RedirectSession; } /** * Creates a new WixUrl * @public * @documentationMaturity preview * @requiredField CreateRedirectSessionRequest */ export declare function createRedirectSession(options?: CreateRedirectSessionOptions): Promise; export interface CreateRedirectSessionOptions extends CreateRedirectSessionRequestIntentOneOf { /** The parameters used in order to generate the URL into the Bookings checkout flow */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** The parameters used in order to generate the URL into the Ecom checkout flow */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** The parameters used in order to generate the URL into the events checkout flow */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** The parameters used in order to generate the URL into the paid plans checkout flow */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** The parameters used in order to generate the URL into the Wix login page */ login?: RedirectSessionLoginParams; /** The parameters used in order to generate the URL to logout from Wix (invalidate token and clear cookies on wix domain) */ logout?: RedirectSessionLogoutParams; /** The parameters used in order to generate the URL into the authorize page */ auth?: RedirectSessionAuthParams; /** The callbacks (URL) allowing the definition of the pages which should be redirected back to the original site during the flow initiated in Wix */ callbacks?: CallbackParams; /** Redirect sessions options */ preferences?: RedirectSessionPreferences; }