Sanity App SDK
    Preparing search index...

    Interface IntentFilter

    Filter criteria for intent matching. Can be combined to create more specific intents.

    // matches only geopoints in the travel-project project, production dataset
    const filter: IntentFilter = {
    projectId: 'travel-project',
    dataset: 'production',
    types: ['geopoint']
    }

    // matches all documents in the travel-project project
    const filter: IntentFilter = {
    projectId: 'travel-project',
    types: ['*']
    }

    // matches geopoints in the travel-project production dataset and map pins in all projects in the org
    const filters: IntentFilter[] = [
    {
    projectId: 'travel-project',
    dataset: 'production',
    types: ['geopoint']
    },
    {
    types: ['map-pin']
    }
    ]
    interface IntentFilter {
        dataset?: string;
        projectId?: string;
        types: string[];
    }
    Index

    Properties

    dataset?: string

    Dataset to match against

    When specified, the intent will only match for the specified dataset. Requires projectId to be specified.

    projectId?: string

    Project ID to match against

    When specified, the intent will only match for the specified project.

    types: string[]

    Document types that this intent can handle

    This is required for all filters. Use ['*'] to match all document types.