Sanity Library Reference Docs
    Preparing search index...

    Interface SourceOptionsBeta

    interface SourceOptions {
        __internal_tasks?: { footerAction: ReactNode };
        advancedVersionControl?: {
            enabled?: boolean | ComposableOption<boolean, ConfigContext>;
        };
        apiHost?: string;
        auth?: AuthConfig
        | AuthStore;
        dataset: string;
        document?: DocumentPluginOptions;
        form?: SanityFormConfig;
        i18n?: LocalePluginOptions;
        mediaLibrary?: MediaLibraryConfig;
        name: string;
        onUncaughtError?: (error: Error, errorInfo: ErrorInfo) => void;
        plugins?: PluginOptions[];
        projectId: string;
        releases?: {
            actions?: ReleaseActionComponent[] | ReleaseActionsResolver;
            enabled?: boolean;
            limit?: number;
        };
        scheduledDrafts?: { enabled: boolean };
        schema?: SchemaPluginOptions;
        search?: {
            strategy?: "groq2024" | "groqLegacy";
            unstable_partialIndexing?: { enabled: boolean };
        };
        studio?: { components?: StudioComponentsPluginOptions };
        title?: string;
        tools?: Tool<any>[] | ComposableOption<Tool<any>[], ConfigContext>;
        unstable_clientFactory?: (options: ClientConfig) => SanityClient;
    }

    Hierarchy (View Summary)

    Index

    Properties

    __internal_tasks?: { footerAction: ReactNode }
    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.

    dataset: string

    Dataset name for this source

    mediaLibrary?: MediaLibraryConfig

    Config for the Sanity Media Library asset source integration.

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

    Configuration for error handling.

    plugins?: PluginOptions[]
    projectId: string

    Project ID for this source

    releases?: {
        actions?: ReleaseActionComponent[] | ReleaseActionsResolver;
        enabled?: boolean;
        limit?: number;
    }

    Configuration for Content Releases

    Type declaration

    scheduledDrafts?: { enabled: boolean }

    Configuration for Scheduled drafts

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

    Type declaration

    • Optionalstrategy?: "groq2024" | "groqLegacy"

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

      Can be one of:

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

    Type declaration

    title?: string
    tools?: Tool<any>[] | ComposableOption<Tool<any>[], ConfigContext>
    unstable_clientFactory?: (options: ClientConfig) => SanityClient