Skip to main content

ArtifactExportStore

@forge/monorepo


@forge/monorepo / backend/src / ArtifactExportStore

Interface: ArtifactExportStore

Defined in: backend/src/persistence/index.ts:999

Methods

claim()

claim(input): Promise<{ claimed: boolean; export: ArtifactExport; }>

Defined in: backend/src/persistence/index.ts:1007

Claims the export slot for (artifactId, version, format).

Returns the existing row when there is one, so a second request for the same export is a read rather than a second render. claimed: false means someone else has it — which is the answer that stops two workers rendering the same PDF.

Parameters

input

TenantScope & object

Returns

Promise<{ claimed: boolean; export: ArtifactExport; }>


complete()

complete(input): Promise<{ recorded: boolean; }>

Defined in: backend/src/persistence/index.ts:1014

Records the outcome. Idempotent, because a worker retrying after a crash cannot know what it wrote.

Parameters

input

TenantScope & object

Returns

Promise<{ recorded: boolean; }>


find()

find(input): Promise<ArtifactExport | null>

Defined in: backend/src/persistence/index.ts:1030

The export for a specific version and format, which is the cache lookup.

Parameters

input

TenantScope & object

Returns

Promise<ArtifactExport | null>


get()

get(input): Promise<ArtifactExport | null>

Defined in: backend/src/persistence/index.ts:1027

Parameters

input

TenantScope & object

Returns

Promise<ArtifactExport | null>


listByArtifact()

listByArtifact(input): Promise<Page<ArtifactExport>>

Defined in: backend/src/persistence/index.ts:1034

Parameters

input

TenantScope & PageRequest & object

Returns

Promise<Page<ArtifactExport>>