Skip to content

@codesoul-co/hypha-core / modules/artifact/manager-content

Using this module

Use the Manager content module for using the public contracts and operations for this capability boundary. It exports 1 function, 2 interfaces.

Import from the package entrypoint

ts
import {
  persistArtifactContent,
} from '@codesoul-co/hypha-core';

import type {
  PersistArtifactContentRequest,
  PersistedArtifactContent,
} from '@codesoul-co/hypha-core';

Usage patterns

  • Use the 2 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 function as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.

Public exports

SymbolKindSignatureDescription
persistArtifactContentfunctionpersistArtifactContent(request: PersistArtifactContentRequest, options?: ArtifactOperationOptions): Promise<PersistedArtifactContent>Persist Artifact Content function with 1 public call signature; parameters and return types are listed below.
PersistArtifactContentRequestinterfaceinterface PersistArtifactContentRequestPersist Artifact Content Request interface with 8 public fields or methods.
PersistedArtifactContentinterfaceinterface PersistedArtifactContentPersisted Artifact Content interface with 5 public fields or methods.

persistArtifactContent

Persist Artifact Content function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function persistArtifactContent(request: PersistArtifactContentRequest, options?: ArtifactOperationOptions): Promise<PersistedArtifactContent>;

Call signature

text
persistArtifactContent(request: PersistArtifactContentRequest, options?: ArtifactOperationOptions): Promise<PersistedArtifactContent>

Parameters

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

Returns

  • Type: Promise<PersistedArtifactContent>
  • Description: The return contract is defined by the type shown above.

PersistArtifactContentRequest

Persist Artifact Content Request interface with 8 public fields or methods.

Declaration

text
export interface PersistArtifactContentRequest {
    operationId: string;
    content: ArtifactByteSource;
    expectedContentHash?: string;
    expectedSizeBytes?: number;
    mimeType?: string;
    profile: ArtifactProfileSpec;
    store: ArtifactStoreProvider;
    nonce: string;
}

Contract members

MemberKindSignatureDescription
contentpropertycontent: ArtifactByteSourcePublic property; its type, readonly modifier and optionality are shown in the signature.
expectedContentHashpropertyexpectedContentHash?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
expectedSizeBytespropertyexpectedSizeBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
mimeTypepropertymimeType?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
noncepropertynonce: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
operationIdpropertyoperationId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
profilepropertyprofile: ArtifactProfileSpecPublic property; its type, readonly modifier and optionality are shown in the signature.
storepropertystore: ArtifactStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.

PersistedArtifactContent

Persisted Artifact Content interface with 5 public fields or methods.

Declaration

text
export interface PersistedArtifactContent {
    storageRef: ArtifactStorageRef;
    contentHash: string;
    sizeBytes: number;
    mimeType?: string;
    deduplicated: boolean;
}

Contract members

MemberKindSignatureDescription
contentHashpropertycontentHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
deduplicatedpropertydeduplicated: booleanPublic property; its type, readonly modifier and optionality are shown in the signature.
mimeTypepropertymimeType?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
sizeBytespropertysizeBytes: numberPublic property; its type, readonly modifier and optionality are shown in the signature.
storageRefpropertystorageRef: ArtifactStorageRefPublic property; its type, readonly modifier and optionality are shown in the signature.