# Class GcsArtifactService

Interface for artifact services.

#### Implements

- BaseArtifactService

- Defined in artifacts/gcs_artifact_service.ts:21

## Constructors

### constructor

- new GcsArtifactService(bucket: string): GcsArtifactService

  #### Parameters

  - bucket: string

  #### Returns GcsArtifactService

  - Defined in artifacts/gcs_artifact_service.ts:24

## Methods

### deleteArtifact

- deleteArtifact(request: DeleteArtifactRequest): Promise<void>

  Deletes an artifact.

  #### Parameters

  - request: DeleteArtifactRequest

    The request to delete an artifact.

  #### Returns Promise<void>

  A promise that resolves when the artifact is deleted.

  Implementation of BaseArtifactService.deleteArtifact

  - Defined in artifacts/gcs_artifact_service.ts:119

### getArtifactVersion

- getArtifactVersion(
  request: LoadArtifactRequest,
  ): Promise<ArtifactVersion | undefined>

  Gets metadata for a specific artifact version.

  #### Parameters

  - request: LoadArtifactRequest

    The request to get an artifact version.

  #### Returns Promise<ArtifactVersion | undefined>

  A promise that resolves to the artifact version metadata or undefined.

  Implementation of BaseArtifactService.getArtifactVersion

  - Defined in artifacts/gcs_artifact_service.ts:175

### listArtifactKeys

- listArtifactKeys(request: ListArtifactKeysRequest): Promise<string[]>

  Lists all the artifact filenames within a session.

  #### Parameters

  - request: ListArtifactKeysRequest

    The request to list artifact keys.

  #### Returns Promise<string[]>

  A promise that resolves to a list of all artifact filenames within a session.

  Implementation of BaseArtifactService.listArtifactKeys

  - Defined in artifacts/gcs_artifact_service.ts:105

### listArtifactVersions

- listArtifactVersions(request: ListVersionsRequest): Promise<ArtifactVersion[]>

  Lists metadata for each artifact version.

  #### Parameters

  - request: ListVersionsRequest

    The request to list artifact versions.

  #### Returns Promise<ArtifactVersion[]>

  A promise that resolves to a list of artifact version metadata.

  Implementation of BaseArtifactService.listArtifactVersions

  - Defined in artifacts/gcs_artifact_service.ts:155

### listVersions

- listVersions(request: ListVersionsRequest): Promise<number[]>

  Lists all versions of an artifact.

  #### Parameters

  - request: ListVersionsRequest

    The request to list versions.

  #### Returns Promise<number[]>

  A promise that resolves to a list of all available versions of the artifact.

  Implementation of BaseArtifactService.listVersions

  - Defined in artifacts/gcs_artifact_service.ts:138

### loadArtifact

- loadArtifact(request: LoadArtifactRequest): Promise<Part | undefined>

  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

  - request: LoadArtifactRequest

    The request to load an artifact.

  #### Returns Promise<Part | undefined>

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

  Implementation of BaseArtifactService.loadArtifact

  - Defined in artifacts/gcs_artifact_service.ts:64

### saveArtifact

- saveArtifact(request: SaveArtifactRequest): Promise<number>

  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

  - request: SaveArtifactRequest

    The request to save an artifact.

  #### 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.

  Implementation of BaseArtifactService.saveArtifact

  - Defined in artifacts/gcs_artifact_service.ts:28