import { CreateRedirectSessionRequest as CreateRedirectSessionRequest$1, CreateRedirectSessionResponse as CreateRedirectSessionResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** Information for redirecting a visitor from an external Wix Headless client site to a Wix page for Wix-managed functionality. */ interface RedirectSession { /** * ID of the redirect session created. * @format GUID */ id?: string; /** * The full URL of the Wix page to redirect the visitor to. This URL includes query parameters informing Wix where to redirect the visitor back to on the Wix Headless client site. * @maxLength 2048 * @readonly */ fullUrl?: string; /** Details about the URL of the redirect session. */ urlDetails?: URLDetails; /** * The session token to pass to the Wix page to maintain the visitor's identity. * @maxLength 2048 * @readonly */ sessionToken?: string | null; /** * The short URL of the Wix page to redirect the visitor to. This URL includes query parameters informing Wix where to redirect the visitor back to on the Wix Headless client site. * @maxLength 2048 * @readonly */ shortUrl?: string; } interface URLDetails { /** * Endpoint of the url. This includes the base URL and the path to the endpoint, without query parameters. * For example: `https://mysite.com/_api/oauth2/authorize`. * @maxLength 2048 * @readonly */ endpoint?: string; /** URL query parameters. */ searchParams?: Record; } interface CreateRedirectSessionRequest extends CreateRedirectSessionRequestIntentOneOf { /** Information required for generating a custom URL for a Wix Bookings checkout. */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** Information required for generating a custom URL for a Wix eCommerce checkout. */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** Information required for generating a custom URL for a Wix Events checkout. */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** Information required for generating a custom URL for a Wix Paid Plans checkout. */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */ login?: RedirectSessionLoginParams; /** Information required for generating a custom URL to log out from a Wix account. This process invalidates the visitor or member token and clears cookies associated with the Wix domain from their browser. */ logout?: RedirectSessionLogoutParams; /** Information required for generating a custom URL for Wix authentication. */ auth?: RedirectSessionAuthParams; /** Information required for generating a custom URL for a Wix stores product page. */ storesProduct?: RedirectSessionStoresProductParams; /** Information required for generating a custom URL for Wix bookings book page. */ bookingsBook?: RedirectSessionBookingsBookParams; /** * Details of pages to redirect the visitor back to on the Wix Headless client site. * When redirecting to any callback URL, Wix specifies the boolean `wixMemberLoggedIn` parameter. * If `true`, a member logged in during the preceding Wix-managed process. * * **Note**: For an authentication redirect, don't specify a post-flow URL here. Instead, specify one in `auth.authRequest.redirectUri`. */ callbacks?: CallbackParams; /** Optional preferences for customizing redirection to Wix pages. */ preferences?: RedirectSessionPreferences; /** * The origin of the request * @maxLength 2048 */ origin?: string | null; } /** @oneof */ interface CreateRedirectSessionRequestIntentOneOf { /** Information required for generating a custom URL for a Wix Bookings checkout. */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** Information required for generating a custom URL for a Wix eCommerce checkout. */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** Information required for generating a custom URL for a Wix Events checkout. */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** Information required for generating a custom URL for a Wix Paid Plans checkout. */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** Specify an empty object in this parameter to generate a URL for Wix login without first checking whether the visitor is authenticated. */ login?: RedirectSessionLoginParams; /** Information required for generating a custom URL to log out from a Wix account. This process invalidates the visitor or member token and clears cookies associated with the Wix domain from their browser. */ logout?: RedirectSessionLogoutParams; /** Information required for generating a custom URL for Wix authentication. */ auth?: RedirectSessionAuthParams; /** Information required for generating a custom URL for a Wix stores product page. */ storesProduct?: RedirectSessionStoresProductParams; /** Information required for generating a custom URL for Wix bookings book page. */ bookingsBook?: RedirectSessionBookingsBookParams; } interface RedirectSessionBookingsCheckoutParams { /** * The timezone to use when presenting the selected slot to users, in [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format. For example, `America/Santiago`. * * Default: If you don't specify a timezone, the timezone in `slotAvailability.slot.timezone` is used. * @maxLength 40 */ timezone?: string; /** Required. The selected calendar slots to begin a booking checkout. */ slotAvailability?: SlotAvailability; } 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; /** * Deprecated. not in use since 2025-06-15. * @deprecated Deprecated. not in use since 2025-06-15. * @targetRemovalDate 2025-06-15 */ isFromV2?: boolean; } 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. * * Deprecated. Please use `eventId` instead. * @deprecated ID for the slot's corresponding session, when the session is either a single session * or a specific session generated from a recurring session. * * Deprecated. Please use `eventId` instead. * @replacedBy event_id * @targetRemovalDate 2025-09-30 */ 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; /** * ID for the slot's corresponding event, when the event is either a single event * or a specific event generated from a recurring event. * @minLength 36 * @maxLength 250 */ eventId?: string | null; } interface SlotResource { /** * Resource ID. * @format GUID * @readonly */ id?: string | null; /** * Resource name. Read only. * @maxLength 1200 */ name?: string | null; } interface Location { /** * Business location ID. Available only for locations that are business locations, * meaning the `location_type` is `"OWNER_BUSINESS"`. * @format GUID */ id?: string | null; /** Location name. */ name?: string | null; /** The full address of this location. */ formattedAddress?: string | null; /** * The full translated address of this location. * @maxLength 512 */ formattedAddressTranslated?: string | null; /** Location type. */ locationType?: LocationTypeWithLiterals; } declare enum LocationType { /** Undefined location type. */ UNDEFINED = "UNDEFINED", /** The business address, as set in the site’s general settings. */ OWNER_BUSINESS = "OWNER_BUSINESS", /** The address as set when creating the service. */ OWNER_CUSTOM = "OWNER_CUSTOM", /** The address as set for the individual session. */ CUSTOM = "CUSTOM" } /** @enumType */ type LocationTypeWithLiterals = LocationType | 'UNDEFINED' | 'OWNER_BUSINESS' | 'OWNER_CUSTOM' | 'CUSTOM'; interface PhoneCall { /** Whether the service is delivered via phone call. */ enabled?: boolean | null; } 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; } 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; /** Bookings policy violation. Intake Form submission is required for this slot. */ validSubmissionRequired?: boolean | null; } interface NestedTimeSlot { /** @format GUID */ serviceId?: string; /** @maxLength 30 */ start?: string; /** @maxLength 30 */ end?: string; resource?: SlotResource; /** Schedule ID. */ scheduleId?: string; } interface RedirectSessionEcomCheckoutParams { /** * Required. ID of the checkout to process. * To retrieve this ID, create a checkout and the relevant ID is returned in the response. * * Create a checkout using one of the following: * - SDK: [Create Checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/create-checkout) or [Create Checkout From Current Cart](https://dev.wix.com/docs/sdk/backend-modules/ecom/current-cart/create-checkout-from-current-cart). * - REST: [Create Checkout From Cart](https://dev.wix.com/docs/rest/business-solutions/e-commerce/cart/create-checkout-from-cart). * @format GUID */ checkoutId?: string; } interface RedirectSessionEventsCheckoutParams { /** * Required. ID of the temporary event reservation. Call Create Reservation ([SDK](https://dev.wix.com/docs/sdk/backend-modules/events/orders/create-reservation) | [REST](https://dev.wix.com/docs/rest/business-solutions/events/orders/create-reservation)) to reserve a ticket temporarily and obtain a reservation ID. * @format GUID */ reservationId?: string; /** * Required. URL-friendly event slug, generated from the event title of the event. For example, `my-event-4`. To obtain an event slug, call Get Event ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/get-event) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/get-event)). * @maxLength 150 */ eventSlug?: string; } interface RedirectSessionPaidPlansCheckoutParams { /** * Required. ID of the paid plan selected. To get a plan ID, call Query Public Plans ([SDK](https://dev.wix.com/docs/sdk/backend-modules/pricing-plans/plans/query-public-plans) | [REST](https://dev.wix.com/docs/rest/business-solutions/pricing-plans/pricing-plans/plans/query-public-plans)). * @format GUID */ planId?: string; /** * For use when pricing plan selection is part of a checkout flow, only if the paid plan selection page is implemented on an external Wix Headless client site. * In this case, a string is received by the external pricing plans page as a `checkoutData` query parameter. Pass this string back here when redirecting back to Wix for checkout. * @maxLength 2048 */ checkoutData?: string | null; } interface RedirectSessionLoginParams { } interface RedirectSessionLogoutParams { /** * Required. ID of the OAuth app authorizing the client. To get this ID, go to your [Headless settings](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2F{{oauth-apps-settings/manage}}) and copy the Client ID of your OAuth app. * @format GUID */ clientId?: string; } interface RedirectSessionAuthParams { /** Required. Details of the authorization request. */ authRequest?: AuthorizeRequest; /** The type of prompt to use during the authorization process. */ prompt?: PromptWithLiterals; } /** * AuthorizeRequest is sent by the client to the authorization server to initiate * the authorization process. */ interface AuthorizeRequest { /** * ID of the Wix OAuth app requesting authorization. * @format GUID */ clientId?: string; /** * Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types). * * Supported values: * + `code`: The endpoint returns an authorization code that can be used to obtain an access token. * @minLength 1 */ responseType?: string; /** * URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. * @minLength 1 */ redirectUri?: string | null; /** * Desired scope of access. If this field is left empty, only an access token is granted. * To received a refresh token, pass `offline_access` as the value of this field. */ scope?: string | null; /** * A value used to confirm the state of an application before and after it makes an authorization * request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser * is redirected there. * Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters). * @minLength 1 */ state?: string; /** * esired response format. * * Supported values: * + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting. * + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting. * + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00). * * Default value: `query` */ responseMode?: string | null; /** * Code challenge to use for PKCE verification. * This field is only used if `responseType` is set to `code`. */ codeChallenge?: string | null; /** * Code challenge method to use for PKCE verification. * This field is only used if `responseType` is set to `code`. * * Supported values: * + `S256`: The code challenge is transformed using SHA-256 encyption. * + `S512`: The code challenge is transformed using SHA-512 encyption. */ codeChallengeMethod?: string | null; /** Session token of the site visitor to authorize. */ sessionToken?: string | null; /** * URL to redirect user to sign in * @format SECURE_WEB_URL */ signInUrl?: string | null; /** Indicates whether the user has consented to the requested scopes */ userConsented?: boolean | null; /** Indicates whether login is optional. If true, will not redirect to the sign_in_url if user is not logged in. */ optionalLogin?: boolean | null; /** * The site id the authorization is requested for. * @format GUID */ metaSiteId?: string | null; } /** Specifies the behavior of the authorization flow regarding site member authentication and consent. */ declare enum Prompt { /** Display the login page to the member, prompting them to enter their credentials. */ login = "login", /** * Bypass the Wix login page and redirect the member directly to your site. * This option checks if the member has an active session from a previous login * and, if so, immediately redirects to the specified URL while retrieving tokens. */ none = "none" } /** @enumType */ type PromptWithLiterals = Prompt | 'login' | 'none'; interface RedirectSessionMembersAccountParams { /** * The member account page to redirect to. * * Default: `ACCOUNT_INFO` */ section?: MembersAccountSectionWithLiterals; } declare enum MembersAccountSection { /** Account info section in "my account". */ ACCOUNT_INFO = "ACCOUNT_INFO", /** My Bookings section in "my account". */ BOOKINGS = "BOOKINGS", /** My Orders section in "my account". */ ORDERS = "ORDERS", /** Subscriptions section in "my account". */ SUBSCRIPTIONS = "SUBSCRIPTIONS", /** Events section in "my account". */ EVENTS = "EVENTS" } /** @enumType */ type MembersAccountSectionWithLiterals = MembersAccountSection | 'ACCOUNT_INFO' | 'BOOKINGS' | 'ORDERS' | 'SUBSCRIPTIONS' | 'EVENTS'; interface RedirectSessionStoresProductParams { /** * Required. Unique slug of the product to redirect to. To obtain a product slug, call Query Products [SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/products-v3/get-product-by-slug) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/products-v3/query-products)). * @maxLength 150 */ productSlug?: string; } interface RedirectSessionBookingsBookParams { /** * For use when filtering the bookings page by a specific resource. * @format GUID */ resourceId?: string; } interface CallbackParams { /** * The URL for a custom thank you page implemented on a site outside of Wix. The visitor is directed to this page after the Wix-managed process is completed. * When redirecting to this URL, Wix passes different query parameters depending on the preceding transaction: * * After a pricing plans checkout: * + `planOrderId`: ID of a pricing plan order. * * After an eCommerce checkout: * + `orderId`: ID of an eCommerce order. * * After an Events checkout: * + `orderNumber`: Unique order number for the transaction. * + `eventId`: ID of the event. * * If the process is abandoned or interrupted, the visitor is redirected to the URL specified in `postFlowUrl` instead. * * Default: If you don't specify a URL, the visitor is redirected to a Wix thank you page, and from there to the URL specified in `postFlowUrl`. * @maxLength 2048 */ thankYouPageUrl?: string | null; /** * The URL Wix should redirect the visitor to when the Wix-managed process is completed, abandoned, or interrupted. * * **Note**: For an authentication redirect, don't specify a URL here. Instead, specify one in `auth.authRequest.redirectUri`. * @maxLength 2048 */ postFlowUrl?: string | null; /** * The URL for a custom login page implemented outside of Wix. * * Default: If you don't specify a URL, a Wix login page is used. * @maxLength 2048 */ loginUrl?: string | null; /** * The URL for a custom bookings services page implemented outside of Wix. * * Default: If you don't specify a URL, a Wix bookings services page is used. * @maxLength 2048 */ bookingsServiceListUrl?: string | null; /** * The URL for a custom eCommerce cart page implemented outside of Wix. * * Default: If you don't specify a URL, a Wix cart page is used. * @maxLength 2048 */ cartPageUrl?: string | null; /** * The URL for a custom pricing plans page implemented outside of Wix. * When redirecting to this URL, Wix specifies the following query parameters: * + `planIds`: IDs of the pricing plans on the custom page. * + `checkoutData`: Pass this string back in `paidPlansCheckout.checkoutData` when redirecting back to Wix for checkout. * * Default: If you don't specify a URL, a Wix pricing plans page is used. * @maxLength 2048 */ planListUrl?: string | null; } interface RedirectSessionPreferences { /** * Whether to use a standard Wix template for Wix-managed pages the visitor is redirected to. Set to `false` only if your client site connects with a Wix site that has custom pages. * * Default: `true` */ useGenericWixPages?: boolean | null; /** * Whether to maintain the identity used in the redirect to Wix (not relevant for `logout` and `auth` intents), or to use a new visitor identity. * * Default: `true` */ maintainIdentity?: boolean | null; /** * Map of global query parameters to append to the Wix URL. * * Common parameters include: * - [UTM parameters](https://en.wikipedia.org/wiki/UTM_parameters): Use to track the source of site traffic. * * - `lang`: Use to control the displayed language of the Wix-managed page. For supported values, see [ISO 639 language codes](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes). */ additionalQueryParameters?: Record; /** * Check if Wix page for the requested intent is published and return it if possible. Otherwise, return a standard Wix template for it. * Default: `false` */ checkIfPublish?: boolean | null; } interface CustomMemberPaths { /** * Path of the account page in the site's members area. Required if `useGenericWixPages` is `false` and the account page path has been changed in the Wix editor. * @format URL_SLUG */ accountPagePath?: string | null; /** * Path of the member profile page in the site's members area. Required if `useGenericWixPages` is `false` and the member profile page path has been changed in the Wix editor. * @format URL_SLUG */ profilePagePath?: string | null; } interface CreateRedirectSessionResponse { /** Details for redirecting the visitor to a Wix page. */ redirectSession?: RedirectSession; } interface CreateAnonymousRedirectSessionRequest extends CreateAnonymousRedirectSessionRequestIntentOneOf { /** Information required for generating a custom URL for a Wix Bookings checkout. */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** Information required for generating a custom URL for a Wix eCommerce checkout. */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** Information required for generating a custom URL for a Wix Events checkout. */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** Information required for generating a custom URL for a Wix Paid Plans checkout. */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** Information required for generating a custom URL for a Wix stores product page. */ storesProduct?: RedirectSessionStoresProductParams; /** Information required for generating a custom URL for Wix bookings book page. */ bookingsBook?: RedirectSessionBookingsBookParams; /** Optional preferences for customizing redirection to Wix pages. */ preferences?: RedirectSessionPreferences; } /** @oneof */ interface CreateAnonymousRedirectSessionRequestIntentOneOf { /** Information required for generating a custom URL for a Wix Bookings checkout. */ bookingsCheckout?: RedirectSessionBookingsCheckoutParams; /** Information required for generating a custom URL for a Wix eCommerce checkout. */ ecomCheckout?: RedirectSessionEcomCheckoutParams; /** Information required for generating a custom URL for a Wix Events checkout. */ eventsCheckout?: RedirectSessionEventsCheckoutParams; /** Information required for generating a custom URL for a Wix Paid Plans checkout. */ paidPlansCheckout?: RedirectSessionPaidPlansCheckoutParams; /** Information required for generating a custom URL for a Wix stores product page. */ storesProduct?: RedirectSessionStoresProductParams; /** Information required for generating a custom URL for Wix bookings book page. */ bookingsBook?: RedirectSessionBookingsBookParams; } interface CreateAnonymousRedirectSessionResponse { /** Details for redirecting the visitor to a Wix page. */ redirectSession?: RedirectSession; } interface AttachPagesRequest { /** * App ID that we want to inherit pages for. * @format GUID */ appDefId?: string; } interface AttachPagesResponse { /** The status of the operation. */ status?: AttachPagesResponseStatusWithLiterals; /** * A descriptive message about the operation * @maxLength 2048 */ message?: string; /** True if pages were attached, false otherwise */ pagesAttached?: boolean; /** True if the site was already published */ sitePublished?: boolean; } declare enum AttachPagesResponseStatus { /** Invalid value. */ UNKNOWN = "UNKNOWN", /** Pages were successfully attached. */ SUCCESS = "SUCCESS", /** No pages were attached because the site is already published. */ NO_ACTION = "NO_ACTION", /** An error occurred, such as when the site or app is not found. */ ERROR = "ERROR" } /** @enumType */ type AttachPagesResponseStatusWithLiterals = AttachPagesResponseStatus | 'UNKNOWN' | 'SUCCESS' | 'NO_ACTION' | 'ERROR'; interface ValidateCallbackURLRequest { /** * An external URL to validate * @maxLength 2048 */ callbackUrl?: string; /** Type of the callback URL. */ callbackType?: CallbackTypeWithLiterals; /** * 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 * @format GUID */ clientId?: string; } declare enum CallbackType { /** Invalid value. */ UNKNOWN = "UNKNOWN", /** Callback URL is used for the logout flow. */ LOGOUT = "LOGOUT", /** Callback URL is used for a checkout flow. */ CHECKOUT = "CHECKOUT", /** Callback URL is used for the authorize flow. */ AUTHORIZE = "AUTHORIZE" } /** @enumType */ type CallbackTypeWithLiterals = CallbackType | 'UNKNOWN' | 'LOGOUT' | 'CHECKOUT' | 'AUTHORIZE'; interface ValidateCallbackURLResponse { /** Indicates if the provided URL is allowed for the given client id */ isValid?: boolean; } 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 * @format GUID */ clientId?: string; } interface SignInURLResponse { /** The Wix URL details to redirect into */ redirectSession?: RedirectSession; } interface AttachAllTemplatesRequest { } interface AttachAllTemplatesResponse { /** The status of the operation. */ status?: StatusWithLiterals; } declare enum Status { /** Invalid value. */ UNKNOWN = "UNKNOWN", /** Templates were successfully attached. */ SUCCESS = "SUCCESS", /** An error occurred. */ ERROR = "ERROR" } /** @enumType */ type StatusWithLiterals = Status | 'UNKNOWN' | 'SUCCESS' | 'ERROR'; interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For 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 that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } 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. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createRedirectSession(): __PublicMethodMetaInfo<'POST', {}, CreateRedirectSessionRequest$1, CreateRedirectSessionRequest, CreateRedirectSessionResponse$1, CreateRedirectSessionResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AttachAllTemplatesRequest as AttachAllTemplatesRequestOriginal, type AttachAllTemplatesResponse as AttachAllTemplatesResponseOriginal, type AttachPagesRequest as AttachPagesRequestOriginal, type AttachPagesResponse as AttachPagesResponseOriginal, AttachPagesResponseStatus as AttachPagesResponseStatusOriginal, type AttachPagesResponseStatusWithLiterals as AttachPagesResponseStatusWithLiteralsOriginal, type AuthorizeRequest as AuthorizeRequestOriginal, type BookingPolicyViolations as BookingPolicyViolationsOriginal, type CallbackParams as CallbackParamsOriginal, CallbackType as CallbackTypeOriginal, type CallbackTypeWithLiterals as CallbackTypeWithLiteralsOriginal, type CreateAnonymousRedirectSessionRequestIntentOneOf as CreateAnonymousRedirectSessionRequestIntentOneOfOriginal, type CreateAnonymousRedirectSessionRequest as CreateAnonymousRedirectSessionRequestOriginal, type CreateAnonymousRedirectSessionResponse as CreateAnonymousRedirectSessionResponseOriginal, type CreateRedirectSessionRequestIntentOneOf as CreateRedirectSessionRequestIntentOneOfOriginal, type CreateRedirectSessionRequest as CreateRedirectSessionRequestOriginal, type CreateRedirectSessionResponse as CreateRedirectSessionResponseOriginal, type CustomMemberPaths as CustomMemberPathsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type Location as LocationOriginal, LocationType as LocationTypeOriginal, type LocationTypeWithLiterals as LocationTypeWithLiteralsOriginal, MembersAccountSection as MembersAccountSectionOriginal, type MembersAccountSectionWithLiterals as MembersAccountSectionWithLiteralsOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type NestedTimeSlot as NestedTimeSlotOriginal, type PhoneCall as PhoneCallOriginal, Prompt as PromptOriginal, type PromptWithLiterals as PromptWithLiteralsOriginal, type RedirectSessionAuthParams as RedirectSessionAuthParamsOriginal, type RedirectSessionBookingsBookParams as RedirectSessionBookingsBookParamsOriginal, type RedirectSessionBookingsCheckoutParams as RedirectSessionBookingsCheckoutParamsOriginal, type RedirectSessionEcomCheckoutParams as RedirectSessionEcomCheckoutParamsOriginal, type RedirectSessionEventsCheckoutParams as RedirectSessionEventsCheckoutParamsOriginal, type RedirectSessionLoginParams as RedirectSessionLoginParamsOriginal, type RedirectSessionLogoutParams as RedirectSessionLogoutParamsOriginal, type RedirectSessionMembersAccountParams as RedirectSessionMembersAccountParamsOriginal, type RedirectSession as RedirectSessionOriginal, type RedirectSessionPaidPlansCheckoutParams as RedirectSessionPaidPlansCheckoutParamsOriginal, type RedirectSessionPreferences as RedirectSessionPreferencesOriginal, type RedirectSessionStoresProductParams as RedirectSessionStoresProductParamsOriginal, type RestoreInfo as RestoreInfoOriginal, type SignInURLRequest as SignInURLRequestOriginal, type SignInURLResponse as SignInURLResponseOriginal, type SlotAvailability as SlotAvailabilityOriginal, type Slot as SlotOriginal, type SlotResource as SlotResourceOriginal, Status as StatusOriginal, type StatusWithLiterals as StatusWithLiteralsOriginal, type URLDetails as URLDetailsOriginal, type ValidateCallbackURLRequest as ValidateCallbackURLRequestOriginal, type ValidateCallbackURLResponse as ValidateCallbackURLResponseOriginal, type WaitingList as WaitingListOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createRedirectSession };