Strands Agents Typescript SDK
    Preparing search index...

    Type Alias CitationLocation

    CitationLocation:
        | {
            type: "documentChar";
            documentIndex: number;
            start: number;
            end: number;
        }
        | {
            type: "documentPage";
            documentIndex: number;
            start: number;
            end: number;
        }
        | {
            type: "documentChunk";
            documentIndex: number;
            start: number;
            end: number;
        }
        | {
            type: "searchResult";
            searchResultIndex: number;
            start: number;
            end: number;
        }
        | { type: "web"; url: string; domain?: string }

    Discriminated union of citation location types. Each variant uses a type field to identify the location kind.

    Type Declaration

    • { type: "documentChar"; documentIndex: number; start: number; end: number }
      • type: "documentChar"

        Location referencing character positions within a document.

      • documentIndex: number

        Index of the source document.

      • start: number

        Start character position.

      • end: number

        End character position.

    • { type: "documentPage"; documentIndex: number; start: number; end: number }
      • type: "documentPage"

        Location referencing page positions within a document.

      • documentIndex: number

        Index of the source document.

      • start: number

        Start page number.

      • end: number

        End page number.

    • { type: "documentChunk"; documentIndex: number; start: number; end: number }
      • type: "documentChunk"

        Location referencing chunk positions within a document.

      • documentIndex: number

        Index of the source document.

      • start: number

        Start chunk index.

      • end: number

        End chunk index.

    • { type: "searchResult"; searchResultIndex: number; start: number; end: number }
      • type: "searchResult"

        Location referencing a search result.

      • searchResultIndex: number

        Index of the search result.

      • start: number

        Start position within the search result.

      • end: number

        End position within the search result.

    • { type: "web"; url: string; domain?: string }
      • type: "web"

        Location referencing a web URL.

      • url: string

        The URL of the web source.

      • Optionaldomain?: string

        The domain of the web source.