@codesoul-co/hypha-core / contracts/artifact-retention
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/artifact-retention.ts - Exports: 9
Using this module
Use the Artifact retention module for declaring and runtime-validating contracts. It exports 7 interfaces, 2 types.
Import from the package entrypoint
import type {
ArtifactRetentionDecision,
ArtifactRetentionEvaluationRequest,
ArtifactRetentionEvaluator,
ArtifactRetentionProcessor,
ArtifactRetentionProcessRequest,
ArtifactRetentionProcessResult,
DefaultArtifactRetentionProcessorOptions,
ArtifactRetentionAction,
} from '@codesoul-co/hypha-core';
// The complete export list is documented below.Usage patterns
- Use the 9 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 |
|---|---|---|---|
ArtifactRetentionDecision | interface | interface ArtifactRetentionDecision | Artifact Retention Decision interface with 3 public fields or methods. |
ArtifactRetentionEvaluationRequest | interface | interface ArtifactRetentionEvaluationRequest | Artifact Retention Evaluation Request interface with 3 public fields or methods. |
ArtifactRetentionEvaluator | interface | interface ArtifactRetentionEvaluator | Artifact Retention Evaluator interface with 1 public fields or methods. |
ArtifactRetentionProcessor | interface | interface ArtifactRetentionProcessor | Artifact Retention Processor interface with 1 public fields or methods. |
ArtifactRetentionProcessRequest | interface | interface ArtifactRetentionProcessRequest | Artifact Retention Process Request interface with 6 public fields or methods. |
ArtifactRetentionProcessResult | interface | interface ArtifactRetentionProcessResult | Artifact Retention Process Result interface with 7 public fields or methods. |
DefaultArtifactRetentionProcessorOptions | interface | interface DefaultArtifactRetentionProcessorOptions | Default Artifact Retention Processor Options interface with 4 public fields or methods. |
ArtifactRetentionAction | type | type ArtifactRetentionAction = 'retain' | 'archive' | 'delete' | Public type alias for Artifact Retention Action; the declaration contains its complete type expression. |
ArtifactRetentionDecisionReason | type | type ArtifactRetentionDecisionReason = 'not_due' | 'already_terminal' | 'archive_after' | 'delete_after' | 'expired' | 'legal_hold' | 'referenced' | 'retain_final' | 'retain_failure' | Public type alias for Artifact Retention Decision Reason; the declaration contains its complete type expression. |
ArtifactRetentionDecision
Artifact Retention Decision interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRetentionDecision } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface ArtifactRetentionDecision {
action: ArtifactRetentionAction;
reason: ArtifactRetentionDecisionReason;
effectiveAt?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
action | property | action: ArtifactRetentionAction | Public property; its type, readonly modifier and optionality are shown in the signature. |
effectiveAt | property | effectiveAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: ArtifactRetentionDecisionReason | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactRetentionEvaluationRequest
Artifact Retention Evaluation Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRetentionEvaluationRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface ArtifactRetentionEvaluationRequest {
record: ArtifactRecord;
profile: ArtifactProfileSpec;
evaluatedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
evaluatedAt | property | evaluatedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profile | property | profile: ArtifactProfileSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
record | property | record: ArtifactRecord | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactRetentionEvaluator
Artifact Retention Evaluator interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRetentionEvaluator } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface ArtifactRetentionEvaluator {
evaluate(request: ArtifactRetentionEvaluationRequest): ArtifactRetentionDecision;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
evaluate | method | evaluate(request: ArtifactRetentionEvaluationRequest): ArtifactRetentionDecision | Public method; parameters and return type are shown in the signature. |
ArtifactRetentionProcessor
Artifact Retention Processor interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRetentionProcessor } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface ArtifactRetentionProcessor {
process(request: ArtifactRetentionProcessRequest): Promise<ArtifactRetentionProcessResult>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
process | method | process(request: ArtifactRetentionProcessRequest): Promise<ArtifactRetentionProcessResult> | Public method; parameters and return type are shown in the signature. |
ArtifactRetentionProcessRequest
Artifact Retention Process Request interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRetentionProcessRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface ArtifactRetentionProcessRequest {
operationId: string;
principal: ExecutionPrincipal;
artifactId: string;
evaluatedAt?: string;
dryRun?: boolean;
idempotencyKey?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactId | property | artifactId: string | 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. |
evaluatedAt | property | evaluatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
idempotencyKey | property | idempotencyKey?: string | 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. |
principal | property | principal: ExecutionPrincipal | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactRetentionProcessResult
Artifact Retention Process Result interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { ArtifactRetentionProcessResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface ArtifactRetentionProcessResult {
artifactId: string;
versionId: string;
workspaceId: string;
decision: ArtifactRetentionDecision;
/** True when this invocation applied the retention mutation. */
applied: boolean;
/** True when the same idempotent mutation was committed by an earlier attempt. */
replayed: boolean;
dryRun: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
applied | property | applied: boolean | True when this invocation applied the retention mutation. |
artifactId | property | artifactId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
decision | property | decision: ArtifactRetentionDecision | 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. |
replayed | property | replayed: boolean | True when the same idempotent mutation was committed by an earlier attempt. |
versionId | property | versionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
workspaceId | property | workspaceId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
DefaultArtifactRetentionProcessorOptions
Default Artifact Retention Processor Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { DefaultArtifactRetentionProcessorOptions } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export interface DefaultArtifactRetentionProcessorOptions {
manager: ArtifactManager;
repository: ArtifactRecordRepository;
evaluator?: ArtifactRetentionEvaluator;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
evaluator | property | evaluator?: ArtifactRetentionEvaluator | Public property; its type, readonly modifier and optionality are shown in the signature. |
manager | property | manager: ArtifactManager | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
repository | property | repository: ArtifactRecordRepository | Public property; its type, readonly modifier and optionality are shown in the signature. |
ArtifactRetentionAction
Public type alias for Artifact Retention Action; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ArtifactRetentionAction } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export type ArtifactRetentionAction = 'retain' | 'archive' | 'delete';ArtifactRetentionDecisionReason
Public type alias for Artifact Retention Decision Reason; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { ArtifactRetentionDecisionReason } from '@codesoul-co/hypha-core'; - Source module:
contracts/artifact-retention
Declaration
export type ArtifactRetentionDecisionReason = 'not_due' | 'already_terminal' | 'archive_after' | 'delete_after' | 'expired' | 'legal_hold' | 'referenced' | 'retain_final' | 'retain_failure';