artifact
Module: vibex/artifact
Artifact Management for VibeX
Provides a simple interface for managing space artifacts (documents, images, and other files) within the VibeX system
Classes
ArtifactManager
View sourceMethods:
saveArtifact
View sourceSave an artifact to the space
function saveArtifact(spaceId: string, filename: string, content: Buffer | string, metadata?: Partial<ArtifactMetadata>): Promise<ArtifactMetadata>Parameters:
| Name | Type | Description |
|---|---|---|
spaceId | string | |
filename | string | |
content | Buffer | string | |
metadata | Partial<ArtifactMetadata> (optional) |
getArtifact
View sourceGet an artifact from the space
function getArtifact(spaceId: string, filename: string): Promise<Buffer | null>Parameters:
| Name | Type | Description |
|---|---|---|
spaceId | string | |
filename | string |
listArtifacts
View sourceList all artifacts in the space
function listArtifacts(): Promise<ArtifactMetadata[]>deleteArtifact
View sourceDelete an artifact
function deleteArtifact(spaceId: string, filename: string): Promise<boolean>Parameters:
| Name | Type | Description |
|---|---|---|
spaceId | string | |
filename | string |
Interfaces
ArtifactMetadata
View sourceProperties:
| Name | Type | Description |
|---|---|---|
name | string | |
path | string | |
mimeType | string | |
size | number | |
createdAt | string | |
updatedAt | string | (optional) |
tags | string[] | (optional) |
description | string | (optional) |