prorm API Reference
    Preparing search index...

    Class TypesenseStore

    TypesenseStore wraps the official typesense client and exposes collection management, document CRUD, and search as a typed, promise-based API.

    Implements

    Index
    name: "typesense" = 'typesense'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "typesense" = 'typesense'

    The client library being used

    • Create a collection from a schema ({ name, fields, default_sorting_field? }).

      Parameters

      • schema: Record<string, unknown>

      Returns Promise<any>

    • Delete a collection by name.

      Parameters

      • name: string

      Returns Promise<any>

    • Index (create) a single document in a collection.

      Parameters

      • collection: string
      • document: Record<string, unknown>

      Returns Promise<any>

    • Run a search against a collection's documents.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • collection: string
      • params: Record<string, unknown>

      Returns Promise<T>

    • Retrieve a single document by its id.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • collection: string
      • id: string

      Returns Promise<T>

    • Delete a single document by its id.

      Parameters

      • collection: string
      • id: string

      Returns Promise<any>