@squidcloud/client
    Preparing search index...

    Class AiGlossaryClient

    AiGlossaryClient manages the application's glossaries, which hold business vocabulary in plain language. Generation returns drafts and never saves them.

    Index
    • Deletes a glossary with its terms.

      Parameters

      • id: string

        Id of the glossary.

      Returns Promise<void>

      A Promise that resolves when the glossary is deleted.

    • Deletes one term and remembers its name as removed, so generation does not propose it again.

      Parameters

      • glossaryId: string

        Id of the glossary.

      • termId: string

        Id of the term.

      Returns Promise<void>

      A Promise that resolves when the term is deleted.

    • Gets the glossary of a database.

      Parameters

      • integrationId: string

        Id of the database integration.

      Returns Promise<Glossary | undefined>

      A Promise that resolves to the glossary, or undefined when the database has none.

    • Gets one glossary.

      Parameters

      • id: string

        Id of the glossary.

      Returns Promise<Glossary | undefined>

      A Promise that resolves to the glossary, or undefined when it does not exist.

    • Lists every term of a glossary, reading page by page.

      Parameters

      • glossaryId: string

        Id of the glossary.

      Returns Promise<GlossaryTerm[]>

      A Promise that resolves to all the terms.

    • Lists the names a glossary remembers as removed.

      Parameters

      • glossaryId: string

        Id of the glossary.

      Returns Promise<string[]>

      A Promise that resolves to the names.

    • Lists the glossaries, each with its term count.

      Parameters

      • Optionalscope: "database" | "global"

        Limits the list to database or global glossaries.

      Returns Promise<Glossary[]>

      A Promise that resolves to the glossaries.

    • Forgets a removed name, so generation may propose it again.

      Parameters

      • glossaryId: string

        Id of the glossary.

      • name: string

        The name to forget.

      Returns Promise<void>

      A Promise that resolves when the name is forgotten.

    • Saves a glossary with all its terms: the stored terms become exactly the given ones. A glossary that does not exist yet is created; a database's glossary is found by its database. Deleted terms are remembered as removed.

      Parameters

      Returns Promise<Glossary>

      A Promise that resolves to the stored glossary.

    • Adds or changes one term. A term with an unknown or absent id is added.

      Parameters

      Returns Promise<GlossaryTerm>

      A Promise that resolves to the stored term.