Skip to content

@codesoul-co/hypha-adapters-local / local-artifact-store-values

Using this module

Use the Local artifact store values module for persisting and reading data at this boundary. It exports 4 functions.

Import from the package entrypoint

ts
import {
  cloneLocalArtifactMetadata,
  localManifestMetadata,
  normalizeLocalArtifactRange,
  normalizeLocalArtifactStoreError,
} from '@codesoul-co/hypha-adapters-local';

Usage patterns

  • The module exposes 4 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.

Public exports

SymbolKindSignatureDescription
cloneLocalArtifactMetadatafunctioncloneLocalArtifactMetadata(value?: Record<string, string>): Record<string, string> | undefinedClone Local Artifact Metadata function with 1 public call signature; parameters and return types are listed below.
localManifestMetadatafunctionlocalManifestMetadata(manifest: LocalArtifactObjectManifest): ArtifactObjectMetadataLocal Manifest Metadata function with 1 public call signature; parameters and return types are listed below.
normalizeLocalArtifactRangefunctionnormalizeLocalArtifactRange(range: ArtifactGetRequest["range"], sizeBytes: number): { start: number; endInclusive: number; } | undefinedNormalize Local Artifact Range function with 1 public call signature; parameters and return types are listed below.
normalizeLocalArtifactStoreErrorfunctionnormalizeLocalArtifactStoreError(error: unknown, operation: string): ArtifactStoreAdapterErrorNormalize Local Artifact Store Error function with 1 public call signature; parameters and return types are listed below.

cloneLocalArtifactMetadata

Clone Local Artifact Metadata function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { cloneLocalArtifactMetadata } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-artifact-store-values

Declaration

text
export declare function cloneLocalArtifactMetadata(value?: Record<string, string>): Record<string, string> | undefined;

Call signature

text
cloneLocalArtifactMetadata(value?: Record<string, string>): Record<string, string> | undefined

Parameters

ParameterTypeRequiredDescription
valueRecord<string, string>NoOptional parameter; accepted values are defined by the type column.

Returns

  • Type: Record<string, string>
  • Description: The return contract is defined by the type shown above.

localManifestMetadata

Local Manifest Metadata function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { localManifestMetadata } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-artifact-store-values

Declaration

text
export declare function localManifestMetadata(manifest: LocalArtifactObjectManifest): ArtifactObjectMetadata;

Call signature

text
localManifestMetadata(manifest: LocalArtifactObjectManifest): ArtifactObjectMetadata

Parameters

ParameterTypeRequiredDescription
manifestLocalArtifactObjectManifestYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ArtifactObjectMetadata
  • Description: The return contract is defined by the type shown above.

normalizeLocalArtifactRange

Normalize Local Artifact Range function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { normalizeLocalArtifactRange } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-artifact-store-values

Declaration

text
export declare function normalizeLocalArtifactRange(range: ArtifactGetRequest['range'], sizeBytes: number): {
    start: number;
    endInclusive: number;
} | undefined;

Call signature

text
normalizeLocalArtifactRange(range: ArtifactGetRequest["range"], sizeBytes: number): { start: number; endInclusive: number; } | undefined

Parameters

ParameterTypeRequiredDescription
rangeArtifactByteRangeYesRequired parameter; accepted values are defined by the type column.
sizeBytesnumberYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: { start: number; endInclusive: number; }
  • Description: The return contract is defined by the type shown above.

normalizeLocalArtifactStoreError

Normalize Local Artifact Store Error function with 1 public call signature; parameters and return types are listed below.

  • Kind: function
  • Import: import { normalizeLocalArtifactStoreError } from '@codesoul-co/hypha-adapters-local';
  • Source module: local-artifact-store-values

Declaration

text
export declare function normalizeLocalArtifactStoreError(error: unknown, operation: string): ArtifactStoreAdapterError;

Call signature

text
normalizeLocalArtifactStoreError(error: unknown, operation: string): ArtifactStoreAdapterError

Parameters

ParameterTypeRequiredDescription
errorunknownYesRequired parameter; accepted values are defined by the type column.
operationstringYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ArtifactStoreAdapterError
  • Description: The return contract is defined by the type shown above.