Skip to content

@codesoul-co/hypha-core / modules/artifact/store

模块用法

用于持久化并读取该边界的数据。Store 模块公开 26 常量、10 函数。

从包入口导入

ts
import {
  artifactByteRangeJsonSchema,
  artifactByteRangeSchema,
  artifactByteSourceSchema,
  artifactContentJsonSchema,
  artifactContentSchema,
  artifactCopyRequestJsonSchema,
  artifactCopyRequestSchema,
  artifactDownloadAccessJsonSchema,
} from '@codesoul-co/hypha-core';

// 完整导出列表见下方。

使用要点

  • 10 个函数是该模块的直接操作入口;每个 overload 的必需/可选参数与返回类型均在下方列出。
  • 26 个常量/枚举提供稳定值、Schema、Definition 或默认配置;应复用这些导出,避免在应用中复制内部值。

运行时校验示例

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

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = artifactByteRangeSchema.parse(input);

配置、网络请求或持久化数据等不可信输入应先通过 Runtime Schema,再传给只接受已校验契约的函数或类。

公共导出

Symbol种类签名说明
artifactByteRangeJsonSchema常量const artifactByteRangeJsonSchema: JsonSchemaArtifact Byte Range 的 JSON Schema。
artifactByteRangeSchema常量const artifactByteRangeSchema: z.ZodEffects<z.ZodObject<{ start: z.ZodNumber; endInclusive: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>Artifact Byte Range 的运行时 Schema。
artifactByteSourceSchema常量const artifactByteSourceSchema: z.ZodType<ArtifactByteSource, z.ZodTypeDef, ArtifactByteSource>Artifact Byte Source 的运行时 Schema。
artifactContentJsonSchema常量const artifactContentJsonSchema: JsonSchemaArtifact Content 的 JSON Schema。
artifactContentSchema常量const artifactContentSchema: z.ZodObject<{ stream: z.ZodType<AsyncIterable<Uint8Array<ArrayBufferLike>>, z.ZodTypeDef, AsyncIterable<Uint8Array<ArrayBufferLike>>>; contentHash: z.ZodString; sizeBytes: z.ZodNumber; mimeType: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; range: z.ZodOptional<z.ZodEffects<z.ZodObject<{ start: z.ZodNumber; endInclusive: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTyp...Artifact Content 的运行时 Schema。
artifactCopyRequestJsonSchema常量const artifactCopyRequestJsonSchema: JsonSchemaArtifact Copy Request 的 JSON Schema。
artifactCopyRequestSchema常量const artifactCopyRequestSchema: z.ZodObject<{ operationId: z.ZodString; source: z.ZodObject<{ storeId: z.ZodString; bucketOrNamespace: z.ZodOptional<z.ZodString>; objectKey: z.ZodString; versionId: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; encrypted: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { storeId: string; objectKey: string; versionId?: str...Artifact Copy Request 的运行时 Schema。
artifactDownloadAccessJsonSchema常量const artifactDownloadAccessJsonSchema: JsonSchemaArtifact Download Access 的 JSON Schema。
artifactDownloadAccessRequestExample常量const artifactDownloadAccessRequestExample: ArtifactDownloadAccessRequestArtifact Download Access Request 的有效示例值。
artifactDownloadAccessRequestJsonSchema常量const artifactDownloadAccessRequestJsonSchema: JsonSchemaArtifact Download Access Request 的 JSON Schema。
artifactDownloadAccessRequestSchema常量const artifactDownloadAccessRequestSchema: z.ZodObject<{ ref: z.ZodObject<{ storeId: z.ZodString; bucketOrNamespace: z.ZodOptional<z.ZodString>; objectKey: z.ZodString; versionId: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; encrypted: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { storeId: string; objectKey: string; versionId?: string | undefined; bu...Artifact Download Access Request 的运行时 Schema。
artifactDownloadAccessSchema常量const artifactDownloadAccessSchema: z.ZodObject<{ method: z.ZodLiteral<"GET">; url: z.ZodString; expiresAt: z.ZodString; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strict", z.ZodTypeAny, { expiresAt: string; method: "GET"; url: string; headers?: Record<string, string> | undefined; }, { expiresAt: string; method: "GET"; url: string; headers?: Record<string, string> | undefined; }>Artifact Download Access 的运行时 Schema。
artifactGetRequestExample常量const artifactGetRequestExample: ArtifactGetRequestArtifact Get Request 的有效示例值。
artifactGetRequestJsonSchema常量const artifactGetRequestJsonSchema: JsonSchemaArtifact Get Request 的 JSON Schema。
artifactGetRequestSchema常量const artifactGetRequestSchema: z.ZodObject<{ ref: z.ZodObject<{ storeId: z.ZodString; bucketOrNamespace: z.ZodOptional<z.ZodString>; objectKey: z.ZodString; versionId: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; encrypted: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNames...Artifact Get Request 的运行时 Schema。
artifactObjectKeySchema常量const artifactObjectKeySchema: z.ZodEffects<z.ZodString, string, string>Artifact Object Key 的运行时 Schema。
artifactObjectMetadataJsonSchema常量const artifactObjectMetadataJsonSchema: JsonSchemaArtifact Object Metadata 的 JSON Schema。
artifactObjectMetadataSchema常量const artifactObjectMetadataSchema: z.ZodObject<{ contentHash: z.ZodString; sizeBytes: z.ZodNumber; mimeType: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; lastModifiedAt: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strict", z.ZodTypeAny, { sizeBytes: number; contentHash: string; mimeType?: string | undefined; etag?: string | undefined; metadata?:...Artifact Object Metadata 的运行时 Schema。
artifactPutRequestExample常量const artifactPutRequestExample: ArtifactPutRequestArtifact Put Request 的有效示例值。
artifactPutRequestJsonSchema常量const artifactPutRequestJsonSchema: JsonSchemaArtifact Put Request 的 JSON Schema。
artifactPutRequestSchema常量const artifactPutRequestSchema: z.ZodObject<{ operationId: z.ZodString; objectKey: z.ZodEffects<z.ZodString, string, string>; content: z.ZodType<ArtifactByteSource, z.ZodTypeDef, ArtifactByteSource>; expectedContentHash: z.ZodOptional<z.ZodString>; sizeBytes: z.ZodOptional<z.ZodNumber>; mimeType: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; ifAbsent: z.ZodOptional<z.Z...Artifact Put Request 的运行时 Schema。
artifactStoreCapabilitiesExample常量const artifactStoreCapabilitiesExample: ArtifactStoreCapabilitiesArtifact Store Capabilities 的有效示例值。
artifactStoreCapabilitiesJsonSchema常量const artifactStoreCapabilitiesJsonSchema: JsonSchemaArtifact Store Capabilities 的 JSON Schema。
artifactStoreCapabilitiesSchema常量const artifactStoreCapabilitiesSchema: z.ZodObject<{ versioning: z.ZodBoolean; rangeRead: z.ZodBoolean; signedAccess: z.ZodBoolean; serverSideCopy: z.ZodBoolean; encryption: z.ZodBoolean; multipartUpload: z.ZodBoolean; contentAddressing: z.ZodBoolean; }, "strict", z.ZodTypeAny, { contentAddressing: boolean; versioning: boolean; rangeRead: boolean; signedAccess: boolean; serverSideCopy: boolean; encryption: boolean...Artifact Store Capabilities 的运行时 Schema。
artifactStoreContractJsonSchemas常量const artifactStoreContractJsonSchemas: Record<string, JsonSchema>modules/artifact/store 模块导出的 Artifact Store Contract JSON Schemas 常量。
artifactStreamSchema常量const artifactStreamSchema: z.ZodType<AsyncIterable<Uint8Array<ArrayBufferLike>>, z.ZodTypeDef, AsyncIterable<Uint8Array<ArrayBufferLike>>>Artifact Stream 的运行时 Schema。
isArtifactByteSource函数isArtifactByteSource(value: unknown): value is ArtifactByteSourceIs Artifact Byte Source 函数,提供 1 个公开调用签名;参数与返回类型见下表。
isArtifactStream函数isArtifactStream(value: unknown): value is AsyncIterable<Uint8Array>Is Artifact Stream 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactContent函数validateArtifactContent(input: unknown): ArtifactContentValidate Artifact Content 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactDownloadAccess函数validateArtifactDownloadAccess(input: unknown): ArtifactDownloadAccessValidate Artifact Download Access 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactDownloadAccessRequest函数validateArtifactDownloadAccessRequest(input: unknown): ArtifactDownloadAccessRequestValidate Artifact Download Access Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactGetRequest函数validateArtifactGetRequest(input: unknown): ArtifactGetRequestValidate Artifact Get Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactObjectMetadata函数validateArtifactObjectMetadata(input: unknown): ArtifactObjectMetadataValidate Artifact Object Metadata 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactPutRequest函数validateArtifactPutRequest(input: unknown): ArtifactPutRequestValidate Artifact Put Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactStorageRef函数validateArtifactStorageRef(input: unknown): { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }Validate Artifact Storage Ref 函数,提供 1 个公开调用签名;参数与返回类型见下表。
validateArtifactStoreCapabilities函数validateArtifactStoreCapabilities(input: unknown): ArtifactStoreCapabilitiesValidate Artifact Store Capabilities 函数,提供 1 个公开调用签名;参数与返回类型见下表。

artifactByteRangeJsonSchema

Artifact Byte Range 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactByteRangeJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactByteRangeJsonSchema: JsonSchema;

artifactByteRangeSchema

Artifact Byte Range 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactByteRangeSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactByteRangeSchema: z.ZodEffects<z.ZodObject<{ start: z.ZodNumber; endInclusive: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>;

artifactByteSourceSchema

Artifact Byte Source 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactByteSourceSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactByteSourceSchema: z.ZodType<ArtifactByteSource, z.ZodTypeDef, ArtifactByteSource>;

artifactContentJsonSchema

Artifact Content 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactContentJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactContentJsonSchema: JsonSchema;

artifactContentSchema

Artifact Content 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactContentSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactContentSchema: z.ZodObject<{ stream: z.ZodType<AsyncIterable<Uint8Array<ArrayBufferLike>>, z.ZodTypeDef, AsyncIterable<Uint8Array<ArrayBufferLike>>>; contentHash: z.ZodString; sizeBytes: z.ZodNumber; mimeType: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; range: z.ZodOptional<z.ZodEffects<z.ZodObject<{ start: z.ZodNumber; endInclusive: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>>; }, "strict", z.ZodTypeAny, { sizeBytes: number; contentHash: string; stream: AsyncIterable<Uint8Array<ArrayBufferLike>>; mimeType?: string | undefined; etag?: string | undefined; range?: { start: number; endInclusive?: number | undefined; } | undefined; }, { sizeBytes: number; contentHash: string; stream: AsyncIterable<Uint8Array<ArrayBufferLike>>; mimeType?: string | undefined; etag?: string | undefined; range?: { start: number; endInclusive?: number | undefined; } | undefined; }>;

artifactCopyRequestJsonSchema

Artifact Copy Request 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactCopyRequestJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactCopyRequestJsonSchema: JsonSchema;

artifactCopyRequestSchema

Artifact Copy Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactCopyRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactCopyRequestSchema: z.ZodObject<{ operationId: z.ZodString; source: z.ZodObject<{ storeId: z.ZodString; bucketOrNamespace: z.ZodOptional<z.ZodString>; objectKey: z.ZodString; versionId: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; encrypted: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }>; targetObjectKey: z.ZodEffects<z.ZodString, string, string>; ifAbsent: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { operationId: string; source: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }; targetObjectKey: string; ifAbsent?: boolean | undefined; }, { operationId: string; source: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }; targetObjectKey: string; ifAbsent?: boolean | undefined; }>;

artifactDownloadAccessJsonSchema

Artifact Download Access 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactDownloadAccessJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactDownloadAccessJsonSchema: JsonSchema;

artifactDownloadAccessRequestExample

Artifact Download Access Request 的有效示例值。

  • 种类: 常量
  • 导入: import { artifactDownloadAccessRequestExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactDownloadAccessRequestExample: ArtifactDownloadAccessRequest;

artifactDownloadAccessRequestJsonSchema

Artifact Download Access Request 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactDownloadAccessRequestJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactDownloadAccessRequestJsonSchema: JsonSchema;

artifactDownloadAccessRequestSchema

Artifact Download Access Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactDownloadAccessRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactDownloadAccessRequestSchema: z.ZodObject<{ ref: z.ZodObject<{ storeId: z.ZodString; bucketOrNamespace: z.ZodOptional<z.ZodString>; objectKey: z.ZodString; versionId: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; encrypted: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }>; expiresInSeconds: z.ZodNumber; responseMimeType: z.ZodOptional<z.ZodString>; responseFilename: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { ref: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }; expiresInSeconds: number; responseMimeType?: string | undefined; responseFilename?: string | undefined; }, { ref: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }; expiresInSeconds: number; responseMimeType?: string | undefined; responseFilename?: string | undefined; }>;

artifactDownloadAccessSchema

Artifact Download Access 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactDownloadAccessSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactDownloadAccessSchema: z.ZodObject<{ method: z.ZodLiteral<"GET">; url: z.ZodString; expiresAt: z.ZodString; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strict", z.ZodTypeAny, { expiresAt: string; method: "GET"; url: string; headers?: Record<string, string> | undefined; }, { expiresAt: string; method: "GET"; url: string; headers?: Record<string, string> | undefined; }>;

artifactGetRequestExample

Artifact Get Request 的有效示例值。

  • 种类: 常量
  • 导入: import { artifactGetRequestExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactGetRequestExample: ArtifactGetRequest;

artifactGetRequestJsonSchema

Artifact Get Request 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactGetRequestJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactGetRequestJsonSchema: JsonSchema;

artifactGetRequestSchema

Artifact Get Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactGetRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactGetRequestSchema: z.ZodObject<{ ref: z.ZodObject<{ storeId: z.ZodString; bucketOrNamespace: z.ZodOptional<z.ZodString>; objectKey: z.ZodString; versionId: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; encrypted: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }, { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }>; range: z.ZodOptional<z.ZodEffects<z.ZodObject<{ start: z.ZodNumber; endInclusive: z.ZodOptional<z.ZodNumber>; }, "strict", z.ZodTypeAny, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>, { start: number; endInclusive?: number | undefined; }, { start: number; endInclusive?: number | undefined; }>>; expectedContentHash: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { ref: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }; expectedContentHash?: string | undefined; range?: { start: number; endInclusive?: number | undefined; } | undefined; }, { ref: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }; expectedContentHash?: string | undefined; range?: { start: number; endInclusive?: number | undefined; } | undefined; }>;

artifactObjectKeySchema

Artifact Object Key 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactObjectKeySchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactObjectKeySchema: z.ZodEffects<z.ZodString, string, string>;

artifactObjectMetadataJsonSchema

Artifact Object Metadata 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactObjectMetadataJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactObjectMetadataJsonSchema: JsonSchema;

artifactObjectMetadataSchema

Artifact Object Metadata 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactObjectMetadataSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactObjectMetadataSchema: z.ZodObject<{ contentHash: z.ZodString; sizeBytes: z.ZodNumber; mimeType: z.ZodOptional<z.ZodString>; etag: z.ZodOptional<z.ZodString>; lastModifiedAt: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; }, "strict", z.ZodTypeAny, { sizeBytes: number; contentHash: string; mimeType?: string | undefined; etag?: string | undefined; metadata?: Record<string, string> | undefined; lastModifiedAt?: string | undefined; }, { sizeBytes: number; contentHash: string; mimeType?: string | undefined; etag?: string | undefined; metadata?: Record<string, string> | undefined; lastModifiedAt?: string | undefined; }>;

artifactPutRequestExample

Artifact Put Request 的有效示例值。

  • 种类: 常量
  • 导入: import { artifactPutRequestExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactPutRequestExample: ArtifactPutRequest;

artifactPutRequestJsonSchema

Artifact Put Request 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactPutRequestJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactPutRequestJsonSchema: JsonSchema;

artifactPutRequestSchema

Artifact Put Request 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactPutRequestSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactPutRequestSchema: z.ZodObject<{ operationId: z.ZodString; objectKey: z.ZodEffects<z.ZodString, string, string>; content: z.ZodType<ArtifactByteSource, z.ZodTypeDef, ArtifactByteSource>; expectedContentHash: z.ZodOptional<z.ZodString>; sizeBytes: z.ZodOptional<z.ZodNumber>; mimeType: z.ZodOptional<z.ZodString>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; ifAbsent: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { objectKey: string; operationId: string; content: ArtifactByteSource; mimeType?: string | undefined; sizeBytes?: number | undefined; metadata?: Record<string, string> | undefined; expectedContentHash?: string | undefined; ifAbsent?: boolean | undefined; }, { objectKey: string; operationId: string; content: ArtifactByteSource; mimeType?: string | undefined; sizeBytes?: number | undefined; metadata?: Record<string, string> | undefined; expectedContentHash?: string | undefined; ifAbsent?: boolean | undefined; }>;

artifactStoreCapabilitiesExample

Artifact Store Capabilities 的有效示例值。

  • 种类: 常量
  • 导入: import { artifactStoreCapabilitiesExample } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactStoreCapabilitiesExample: ArtifactStoreCapabilities;

artifactStoreCapabilitiesJsonSchema

Artifact Store Capabilities 的 JSON Schema。

  • 种类: 常量
  • 导入: import { artifactStoreCapabilitiesJsonSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactStoreCapabilitiesJsonSchema: JsonSchema;

artifactStoreCapabilitiesSchema

Artifact Store Capabilities 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactStoreCapabilitiesSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactStoreCapabilitiesSchema: z.ZodObject<{ versioning: z.ZodBoolean; rangeRead: z.ZodBoolean; signedAccess: z.ZodBoolean; serverSideCopy: z.ZodBoolean; encryption: z.ZodBoolean; multipartUpload: z.ZodBoolean; contentAddressing: z.ZodBoolean; }, "strict", z.ZodTypeAny, { contentAddressing: boolean; versioning: boolean; rangeRead: boolean; signedAccess: boolean; serverSideCopy: boolean; encryption: boolean; multipartUpload: boolean; }, { contentAddressing: boolean; versioning: boolean; rangeRead: boolean; signedAccess: boolean; serverSideCopy: boolean; encryption: boolean; multipartUpload: boolean; }>;

artifactStoreContractJsonSchemas

modules/artifact/store 模块导出的 Artifact Store Contract JSON Schemas 常量。

  • 种类: 常量
  • 导入: import { artifactStoreContractJsonSchemas } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactStoreContractJsonSchemas: Record<string, JsonSchema>;

artifactStreamSchema

Artifact Stream 的运行时 Schema。

  • 种类: 常量
  • 导入: import { artifactStreamSchema } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare const artifactStreamSchema: z.ZodType<AsyncIterable<Uint8Array<ArrayBufferLike>>, z.ZodTypeDef, AsyncIterable<Uint8Array<ArrayBufferLike>>>;

isArtifactByteSource

Is Artifact Byte Source 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { isArtifactByteSource } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function isArtifactByteSource(value: unknown): value is ArtifactByteSource;

调用签名

text
isArtifactByteSource(value: unknown): value is ArtifactByteSource

参数

参数类型必需说明
valueunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: value is ArtifactByteSource
  • 说明: 返回值契约由上述类型定义。

isArtifactStream

Is Artifact Stream 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { isArtifactStream } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function isArtifactStream(value: unknown): value is AsyncIterable<Uint8Array>;

调用签名

text
isArtifactStream(value: unknown): value is AsyncIterable<Uint8Array>

参数

参数类型必需说明
valueunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: value is AsyncIterable<Uint8Array<ArrayBufferLike>>
  • 说明: 返回值契约由上述类型定义。

validateArtifactContent

Validate Artifact Content 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactContent } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactContent(input: unknown): ArtifactContent;

调用签名

text
validateArtifactContent(input: unknown): ArtifactContent

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactContent
  • 说明: 返回值契约由上述类型定义。

validateArtifactDownloadAccess

Validate Artifact Download Access 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactDownloadAccess } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactDownloadAccess(input: unknown): ArtifactDownloadAccess;

调用签名

text
validateArtifactDownloadAccess(input: unknown): ArtifactDownloadAccess

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactDownloadAccess
  • 说明: 返回值契约由上述类型定义。

validateArtifactDownloadAccessRequest

Validate Artifact Download Access Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactDownloadAccessRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactDownloadAccessRequest(input: unknown): ArtifactDownloadAccessRequest;

调用签名

text
validateArtifactDownloadAccessRequest(input: unknown): ArtifactDownloadAccessRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactDownloadAccessRequest
  • 说明: 返回值契约由上述类型定义。

validateArtifactGetRequest

Validate Artifact Get Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactGetRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactGetRequest(input: unknown): ArtifactGetRequest;

调用签名

text
validateArtifactGetRequest(input: unknown): ArtifactGetRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactGetRequest
  • 说明: 返回值契约由上述类型定义。

validateArtifactObjectMetadata

Validate Artifact Object Metadata 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactObjectMetadata } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactObjectMetadata(input: unknown): ArtifactObjectMetadata;

调用签名

text
validateArtifactObjectMetadata(input: unknown): ArtifactObjectMetadata

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactObjectMetadata
  • 说明: 返回值契约由上述类型定义。

validateArtifactPutRequest

Validate Artifact Put Request 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactPutRequest } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactPutRequest(input: unknown): ArtifactPutRequest;

调用签名

text
validateArtifactPutRequest(input: unknown): ArtifactPutRequest

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactPutRequest
  • 说明: 返回值契约由上述类型定义。

validateArtifactStorageRef

Validate Artifact Storage Ref 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactStorageRef } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactStorageRef(input: unknown): {
    storeId: string;
    objectKey: string;
    versionId?: string | undefined;
    bucketOrNamespace?: string | undefined;
    etag?: string | undefined;
    region?: string | undefined;
    encrypted?: boolean | undefined;
};

调用签名

text
validateArtifactStorageRef(input: unknown): { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: { storeId: string; objectKey: string; versionId?: string | undefined; bucketOrNamespace?: string | undefined; etag?: string | undefined; region?: string | undefined; encrypted?: boolean | undefined; }
  • 说明: 返回值契约由上述类型定义。

validateArtifactStoreCapabilities

Validate Artifact Store Capabilities 函数,提供 1 个公开调用签名;参数与返回类型见下表。

  • 种类: 函数
  • 导入: import { validateArtifactStoreCapabilities } from '@codesoul-co/hypha-core';
  • 源码模块: modules/artifact/store

声明

text
export declare function validateArtifactStoreCapabilities(input: unknown): ArtifactStoreCapabilities;

调用签名

text
validateArtifactStoreCapabilities(input: unknown): ArtifactStoreCapabilities

参数

参数类型必需说明
inputunknown必需参数;接受的值由类型列定义。

返回值

  • 类型: ArtifactStoreCapabilities
  • 说明: 返回值契约由上述类型定义。