Sanity Library Reference Docs
    Preparing search index...

    Interface PreviewUrlValidateUrlResultAlpha

    interface PreviewUrlValidateUrlResult {
        isValid: boolean;
        redirectTo?: string;
        studioOrigin?: string;
        studioPreviewPerspective?: null | string;
    }
    Index

    Properties

    isValid: boolean
    redirectTo?: string

    If the URL is valid, and there's a parameter for what preview path to redirect to, it will be here

    studioOrigin?: string

    If the URL is valid, and the studio URL is known and valid, then its origin will be here

    studioPreviewPerspective?: null | string

    The initial perspective the Studio was using when starting to load the preview. It can change over time and should also be handled with postMessage listeners. The value can be arbitrary and has to be validated to make sure it's a valid perspective.