ADK for TypeScript: API Reference
    Preparing search index...

    Interface BaseArtifactService

    Interface for artifact services.

    interface BaseArtifactService {
        deleteArtifact(request: DeleteArtifactRequest): Promise<void>;
        listArtifactKeys(request: ListArtifactKeysRequest): Promise<string[]>;
        listVersions(request: ListVersionsRequest): Promise<number[]>;
        loadArtifact(request: LoadArtifactRequest): Promise<Part | undefined>;
        saveArtifact(request: SaveArtifactRequest): Promise<number>;
    }

    Implemented by

    Methods

    • Gets an artifact from the artifact service storage.

      The artifact is a file identified by the app name, user ID, session ID, and filename.

      Parameters

      Returns Promise<Part | undefined>

      A promise that resolves to the artifact or undefined if not found.

    • Saves an artifact to the artifact service storage.

      The artifact is a file identified by the app name, user ID, session ID, and filename. After saving the artifact, a revision ID is returned to identify the artifact version.

      Parameters

      Returns Promise<number>

      A promise that resolves to The revision ID. The first version of the artifact has a revision ID of 0. This is incremented by 1 after each successful save.