@codesoul-co/hypha-core / contracts/artifact-gc
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/artifact-gc.ts - Exports: 8
Using this module
Use the Artifact gc module for declaring and runtime-validating contracts. It exports 8 interfaces.
Import from the package entrypoint
ts
import type {
ArtifactGarbageCollectionCandidate,
ArtifactGarbageCollectionClaimRequest,
ArtifactGarbageCollectionFailure,
ArtifactGarbageCollectionRequest,
ArtifactGarbageCollectionResult,
ArtifactGarbageCollectionScanRequest,
ArtifactGarbageCollector,
DefaultArtifactGarbageCollectorOptions,
} from '@codesoul-co/hypha-core';Usage patterns
- Use the 8 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
ArtifactGarbageCollectionCandidate | interface | interface ArtifactGarbageCollectionCandidate | Artifact Garbage Collection Candidate interface with 5 public fields or methods. |
ArtifactGarbageCollectionClaimRequest | interface | interface ArtifactGarbageCollectionClaimRequest | Artifact Garbage Collection Claim Request interface with 4 public fields or methods. |
ArtifactGarbageCollectionFailure | interface | interface ArtifactGarbageCollectionFailure | Artifact Garbage Collection Failure interface with 4 public fields or methods. |
ArtifactGarbageCollectionRequest | interface | interface ArtifactGarbageCollectionRequest | Artifact Garbage Collection Request interface with 4 public fields or methods. |
ArtifactGarbageCollectionResult | interface | interface ArtifactGarbageCollectionResult | Artifact Garbage Collection Result interface with 12 public fields or methods. |
ArtifactGarbageCollectionScanRequest | interface | interface ArtifactGarbageCollectionScanRequest | Artifact Garbage Collection Scan Request interface with 2 public fields or methods. |
ArtifactGarbageCollector | interface | interface ArtifactGarbageCollector | Artifact Garbage Collector interface with 1 public fields or methods. |
DefaultArtifactGarbageCollectorOptions | interface | interface DefaultArtifactGarbageCollectorOptions | Default Artifact Garbage Collector Options interface with 5 public fields or methods. |
ArtifactGarbageCollectionCandidate
Artifact Garbage Collection Candidate interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollectionCandidate } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollectionCandidate {
storageRef: ArtifactStorageRef;
contentHash: string;
sizeBytes: number;
versionIds: string[];
profileRefs: SpecRef[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
contentHash | property | contentHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRefs | property | profileRefs: SpecRef[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
sizeBytes | property | sizeBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
storageRef | property | storageRef: ArtifactStorageRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionIds | property | versionIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactGarbageCollectionClaimRequest
Artifact Garbage Collection Claim Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollectionClaimRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollectionClaimRequest {
claimId: string;
claimedAt: string;
staleBefore: string;
candidate: ArtifactGarbageCollectionCandidate;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
candidate | property | candidate: ArtifactGarbageCollectionCandidate | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimedAt | property | claimedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimId | property | claimId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
staleBefore | property | staleBefore: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactGarbageCollectionFailure
Artifact Garbage Collection Failure interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollectionFailure } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollectionFailure {
storageRef: ArtifactStorageRef;
code: string;
message: string;
retryable: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
code | property | code: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
message | property | message: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryable | property | retryable: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
storageRef | property | storageRef: ArtifactStorageRef | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactGarbageCollectionRequest
Artifact Garbage Collection Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollectionRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollectionRequest {
operationId: string;
dryRun?: boolean;
limit?: number;
claimTtlSeconds?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
claimTtlSeconds | property | claimTtlSeconds?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
dryRun | property | dryRun?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactGarbageCollectionResult
Artifact Garbage Collection Result interface with 12 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollectionResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollectionResult {
operationId: string;
dryRun: boolean;
candidateObjects: number;
claimedObjects: number;
deletedObjects: number;
missingObjects: number;
skippedPolicyObjects: number;
skippedConcurrentObjects: number;
reclaimedBytes: number;
failures: ArtifactGarbageCollectionFailure[];
startedAt: string;
completedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
candidateObjects | property | candidateObjects: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
claimedObjects | property | claimedObjects: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
completedAt | property | completedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
deletedObjects | property | deletedObjects: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
dryRun | property | dryRun: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
failures | property | failures: ArtifactGarbageCollectionFailure[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
missingObjects | property | missingObjects: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reclaimedBytes | property | reclaimedBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
skippedConcurrentObjects | property | skippedConcurrentObjects: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
skippedPolicyObjects | property | skippedPolicyObjects: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
startedAt | property | startedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactGarbageCollectionScanRequest
Artifact Garbage Collection Scan Request interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollectionScanRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollectionScanRequest {
limit?: number;
staleBefore: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
staleBefore | property | staleBefore: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactGarbageCollector
Artifact Garbage Collector interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactGarbageCollector } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface ArtifactGarbageCollector {
collect(request: ArtifactGarbageCollectionRequest): Promise<ArtifactGarbageCollectionResult>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
collect | method | collect(request: ArtifactGarbageCollectionRequest): Promise<ArtifactGarbageCollectionResult> | Public method; parameters and return type are shown in the signature. |
DefaultArtifactGarbageCollectorOptions
Default Artifact Garbage Collector Options interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { DefaultArtifactGarbageCollectorOptions } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-gc
Declaration
text
export interface DefaultArtifactGarbageCollectorOptions {
profiles: ArtifactProfileSpec[];
stores: ArtifactStoreProvider[];
repository: ArtifactRecordRepository;
idGenerator: () => string;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
idGenerator | method | idGenerator(): string | Public method; parameters and return type are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
profiles | property | profiles: ArtifactProfileSpec[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
repository | property | repository: ArtifactRecordRepository | Public property; its type, readonly modifier and optionality are shown in the signature. |
stores | property | stores: ArtifactStoreProvider[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
