Sanity Library Reference Docs
    Preparing search index...

    Interface WorkspaceOptionsBeta

    interface WorkspaceOptions {
        __internal_tasks?: { footerAction: ReactNode };
        "[DECISION_PARAMETERS_SCHEMA]"?: DecisionParametersConfig;
        advancedVersionControl?: {
            enabled?: boolean | ComposableOption<boolean, ConfigContext>;
        };
        apiHost?: string;
        apps?: AppsOptions;
        auth?: AuthConfig
        | AuthStore;
        basePath: string;
        dataset: string;
        document?: DocumentPluginOptions;
        form?: SanityFormConfig;
        i18n?: LocalePluginOptions;
        icon?: ComponentType;
        logo?: ComponentType;
        name: string;
        onUncaughtError?: (error: Error, errorInfo: ErrorInfo) => void;
        plugins?: PluginOptions[];
        projectId: string;
        scheduledDrafts?: { enabled: boolean };
        scheduledPublishing?: ScheduledPublishingPluginOptions;
        schema?: SchemaPluginOptions;
        search?: {
            enableLegacySearch?: boolean;
            strategy?: "groqLegacy" | "groq2024";
            unstable_partialIndexing?: { enabled: boolean };
        };
        studio?: { components?: StudioComponentsPluginOptions };
        subtitle?: string;
        theme?: StudioTheme;
        title?: string;
        tools?: Tool<any>[] | ComposableOption<Tool<any>[], ConfigContext>;
        unstable_clientFactory?: (options: ClientConfig) => SanityClient;
        unstable_sources?: SourceOptions[];
        unstable_tasks?: { enabled: boolean };
    }

    Hierarchy (View Summary)

    Index

    Properties

    __internal_tasks?: { footerAction: ReactNode }
    "[DECISION_PARAMETERS_SCHEMA]"?: DecisionParametersConfig
    advancedVersionControl?: {
        enabled?: boolean | ComposableOption<boolean, ConfigContext>;
    }

    Advanced version control provides features such as inline content diffs in Studio to make resolving conflicts across document versions easier.

    Type declaration

    • Optional Betaenabled?: boolean | ComposableOption<boolean, ConfigContext>

      Control whether advanced version control functionality is enabled.

      Advanced version control provides features such as inline content diffs in Studio to make resolving conflicts across document versions easier.

    apiHost?: string

    API hostname used for requests. Generally used for custom CNAMEs, allowing businesses to use their own domain for API requests. Must include protocol: eg https://sanityapi.mycompany.com

    Note that (currently) the project ID will be prepended to the passed URL, so the above example would end up as: https://<projectId>.sanityapi.mycompany.com

    Authentication options for this source.

    basePath: string
    dataset: string

    Dataset name for this source

    icon?: ComponentType
    logo?: ComponentType

    The workspace logo

    Custom logo components are no longer supported. Users are encouraged to provide custom components for individual workspace icons instead.

    name: string
    onUncaughtError?: (error: Error, errorInfo: ErrorInfo) => void

    Configuration for error handling.

    plugins?: PluginOptions[]
    projectId: string

    Project ID for this source

    scheduledDrafts?: { enabled: boolean }

    Configuration for Scheduled drafts

    scheduledPublishing?: ScheduledPublishingPluginOptions
    search?: {
        enableLegacySearch?: boolean;
        strategy?: "groqLegacy" | "groq2024";
        unstable_partialIndexing?: { enabled: boolean };
    }

    Type declaration

    • OptionalenableLegacySearch?: boolean

      Enables the legacy Query API search strategy.

      Use search.strategy instead.

    • Optionalstrategy?: "groqLegacy" | "groq2024"

      Control the strategy used for searching documents. This should generally only be used if you wish to try experimental search strategies.

      This option takes precedence over the deprecated search.enableLegacySearch option.

      Can be one of:

      • "groqLegacy" (default): Use client-side tokenization and schema introspection to search using the GROQ Query API.
      • "groq2024": (experimental) Perform full text searching using the GROQ Query API and its new text::matchQuery function.
    • Optionalunstable_partialIndexing?: { enabled: boolean }
    studio?: { components?: StudioComponentsPluginOptions }

    Type declaration

    subtitle?: string
    theme?: StudioTheme
    title?: string
    tools?: Tool<any>[] | ComposableOption<Tool<any>[], ConfigContext>
    unstable_clientFactory?: (options: ClientConfig) => SanityClient
    unstable_sources?: SourceOptions[]
    unstable_tasks?: { enabled: boolean }

    Use tasks instead