mise API - v0.0.0
    Preparing search index...

    Class Searchable

    Represents a searchable string for ChRIS resource queries.

    A Searchable encapsulates the logic for parsing, validating, and converting search strings into formats usable by the ChRIS API.

    // Simple name search
    const s1 = Searchable.from("pl-dircopy");
    s1.toQueryParams(); // { name: "pl-dircopy" }
    // Compound search
    const s2 = Searchable.from("name: pl-dircopy, version: 1.3.2");
    s2.toQueryParams(); // { name: "pl-dircopy", version: "1.3.2" }
    // Batch operations
    const s3 = Searchable.from("id:77++id:33");
    s3.toBatchSearchables(); // [Searchable("id:77"), Searchable("id:33")]
    Index
    • Converts the searchable to a normalized string format suitable for API queries. For simple searchables, this adds the "name:" prefix. For compound searchables, returns the original key:value format. For batch searchables, returns the original ++ separated format.

      Returns string

      A normalized searchable string.

    • Converts the searchable to query parameters suitable for the ChRIS API. For batch searchables, this returns a placeholder. Use toBatchSearchables() instead.

      Returns Record<string, string>

      A record of key-value pairs.

    • Creates a batch searchable containing multiple searchables separated by ++. The parsed result is a placeholder; use toBatchSearchables() to get individual items.

      Parameters

      • batchString: string

        Multiple searchables separated by ++.

      Returns Searchable

      A Searchable instance.

    • Creates a compound searchable from key:value pairs. Parses "name: pl-dircopy, version: 1.3.2" → { name: "pl-dircopy", version: "1.3.2" }

      Parameters

      • keyValueString: string

        Comma-separated key:value pairs.

      Returns Searchable

      A Searchable instance.