assertValidApiDatasetFUNCTION
Added in v1.0.1Source
Signature
export declare function assertValidApiDataset(
dataset: ApiReferenceDataset
): ApiReferenceDataset;API REFERENCE
Public API-reference generation and snapshot exports.
export declare function assertValidApiDataset(
dataset: ApiReferenceDataset
): ApiReferenceDataset;export declare function checksumValue(
value: unknown
): string;export declare function createApiDataset(
records: readonly {
breadcrumbs: readonly {
current: boolean;
href?: string;
label: string
}[];
categories: readonly {
collapsed: boolean;
id: string;
label: string;
order: number
}[];
declarations: readonly {
category?: string;
categoryId: string;
description?: string;
descriptionParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
examples?: readonly {
code: string;
language?: string;
name?: string
}[];
id: string;
introductionVersion?: string;
kind: "function" | "const" | "class" | "interface" | "type" | "variable" | "namespace" | "enum" | "alias";
link?: {
external: boolean;
href: string;
label?: string
};
name: string;
signature: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
}
}[];
displayName: string;
exportCount: number;
introductionVersion?: string;
language?: "typescript" | "cpp";
link?: {
external: boolean;
href: string;
label?: string
};
module: string;
packageDescription?: string;
packageExports?: readonly string[];
packageId: string;
packageName: string;
packagePrivate?: boolean;
packageSourceUrl?: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
};
summary?: string;
summaryParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
version: string
}[],
options: Pick<ApiReferenceDataset, "generatedAt" | "sourceRevision"> & { jsonSchemas?: readonly JsonSchemaReferenceRecord[] }
): ApiReferenceDataset;export declare function generateApiDataset(
options: ApiReferenceGenerationOptions
): Promise<ApiReferenceDataset>;Parse configured Doxygen XML trees into shared API-reference records.
export declare function generateDoxygenRecords(
options: DoxygenGenerationOptions
): Promise<readonly { breadcrumbs: readonly { current: boolean; href?: string; label: string }[]; categories: readonly { collapsed: boolean; id: string; label: string; order: number }[]; declarations: readonly { category?: string; categoryId: string; description?: string; descriptionParts?: readonly { code?: boolean; external?: boolean; href?: string; kind: "link" | "text"; text: string }[]; examples?: readonly { code: string; language?: string; name?: string }[]; id: string; introductionVersion?: string; kind: "function" | "const" | "class" | "interface" | "type" | "variable" | "namespace" | "enum" | "alias"; link?: { external: boolean; href: string; label?: string }; name: string; signature: string; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string } }[]; displayName: string; exportCount: number; introductionVersion?: string; language?: "typescript" | "cpp"; link?: { external: boolean; href: string; label?: string }; module: string; packageDescription?: string; packageExports?: readonly string[]; packageId: string; packageName: string; packagePrivate?: boolean; packageSourceUrl?: string; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; summary?: string; summaryParts?: readonly { code?: boolean; external?: boolean; href?: string; kind: "link" | "text"; text: string }[]; version: string }[]>;export declare function jsonSchemaReferenceToView(
record: JsonSchemaReferenceRecord
): JsonSchemaReferenceView;export declare function jsonSchemaToAgentDocument(
record: JsonSchemaReferenceRecord
): { content: string; context?: string; description?: string; id: string; kind: "article" | "api-module" | "json-schema" | "component"; metadata?: { [key: string]: unknown }; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; title: string; url: string; version?: string };export declare function readApiSnapshot(
path: string
): Effect<ApiReferenceDataset, ApiReferenceSnapshotError, ApiReferenceSnapshotStore>;export declare function recordToAgentDocument(
record: {
breadcrumbs: readonly {
current: boolean;
href?: string;
label: string
}[];
categories: readonly {
collapsed: boolean;
id: string;
label: string;
order: number
}[];
declarations: readonly {
category?: string;
categoryId: string;
description?: string;
descriptionParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
examples?: readonly {
code: string;
language?: string;
name?: string
}[];
id: string;
introductionVersion?: string;
kind: "function" | "const" | "class" | "interface" | "type" | "variable" | "namespace" | "enum" | "alias";
link?: {
external: boolean;
href: string;
label?: string
};
name: string;
signature: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
}
}[];
displayName: string;
exportCount: number;
introductionVersion?: string;
language?: "typescript" | "cpp";
link?: {
external: boolean;
href: string;
label?: string
};
module: string;
packageDescription?: string;
packageExports?: readonly string[];
packageId: string;
packageName: string;
packagePrivate?: boolean;
packageSourceUrl?: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
};
summary?: string;
summaryParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
version: string
}
): { content: string; context?: string; description?: string; id: string; kind: "article" | "api-module" | "json-schema" | "component"; metadata?: { [key: string]: unknown }; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; title: string; url: string; version?: string };export declare function recordToLlmDocument(
record: {
breadcrumbs: readonly {
current: boolean;
href?: string;
label: string
}[];
categories: readonly {
collapsed: boolean;
id: string;
label: string;
order: number
}[];
declarations: readonly {
category?: string;
categoryId: string;
description?: string;
descriptionParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
examples?: readonly {
code: string;
language?: string;
name?: string
}[];
id: string;
introductionVersion?: string;
kind: "function" | "const" | "class" | "interface" | "type" | "variable" | "namespace" | "enum" | "alias";
link?: {
external: boolean;
href: string;
label?: string
};
name: string;
signature: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
}
}[];
displayName: string;
exportCount: number;
introductionVersion?: string;
language?: "typescript" | "cpp";
link?: {
external: boolean;
href: string;
label?: string
};
module: string;
packageDescription?: string;
packageExports?: readonly string[];
packageId: string;
packageName: string;
packagePrivate?: boolean;
packageSourceUrl?: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
};
summary?: string;
summaryParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
version: string
}
): { content: string; context?: string; description?: string; id: string; kind: "article" | "api-module" | "json-schema" | "component"; metadata?: { [key: string]: unknown }; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; title: string; url: string; version?: string };export declare function stableStringify(
value: unknown
): string;export declare function validateApiDataset(
dataset: ApiReferenceDataset
): ApiReferenceValidationResult;export declare function validateApiRecords(
records: readonly {
breadcrumbs: readonly {
current: boolean;
href?: string;
label: string
}[];
categories: readonly {
collapsed: boolean;
id: string;
label: string;
order: number
}[];
declarations: readonly {
category?: string;
categoryId: string;
description?: string;
descriptionParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
examples?: readonly {
code: string;
language?: string;
name?: string
}[];
id: string;
introductionVersion?: string;
kind: "function" | "const" | "class" | "interface" | "type" | "variable" | "namespace" | "enum" | "alias";
link?: {
external: boolean;
href: string;
label?: string
};
name: string;
signature: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
}
}[];
displayName: string;
exportCount: number;
introductionVersion?: string;
language?: "typescript" | "cpp";
link?: {
external: boolean;
href: string;
label?: string
};
module: string;
packageDescription?: string;
packageExports?: readonly string[];
packageId: string;
packageName: string;
packagePrivate?: boolean;
packageSourceUrl?: string;
source?: {
endLine?: number;
file: string;
line?: number;
repositoryUrl: string;
revision: string
};
summary?: string;
summaryParts?: readonly {
code?: boolean;
external?: boolean;
href?: string;
kind: "link" | "text";
text: string
}[];
version: string
}[]
): ApiReferenceValidationResult;export declare function writeApiSnapshot(
path: string,
dataset: ApiReferenceDataset
): Effect<void, ApiReferenceSnapshotError, ApiReferenceSnapshotStore>;export declare class ApiReferenceError extends Error {
constructor(
message: string,
options?: ErrorOptions
): ApiReferenceError;
readonly _tag: string;
readonly ~effect/ErrorReporter/attributes?: ReadonlyRecord<string, unknown>;
readonly ~effect/ErrorReporter/ignore?: boolean;
readonly ~effect/ErrorReporter/severity?: Severity;
readonly ~effect/Runtime/errorExitCode?: number;
readonly ~effect/Runtime/errorReported?: boolean;
cause?: unknown;
message: string;
name: string;
stack?: string;
static stackTraceLimit: number;
captureStackTrace(
targetObject: object,
constructorOpt?: Function
): void;
prepareStackTrace(
err: Error,
stackTraces: CallSite[]
): any;
}export declare class ApiReferenceSnapshotError extends ApiReferenceError {
constructor(
path: string,
cause: unknown
): ApiReferenceSnapshotError;
readonly _tag: "ApiReferenceSnapshotError";
readonly ~effect/ErrorReporter/attributes?: ReadonlyRecord<string, unknown>;
readonly ~effect/ErrorReporter/ignore?: boolean;
readonly ~effect/ErrorReporter/severity?: Severity;
readonly ~effect/Runtime/errorExitCode?: number;
readonly ~effect/Runtime/errorReported?: boolean;
cause?: unknown;
message: string;
name: string;
readonly path: string;
stack?: string;
static stackTraceLimit: number;
captureStackTrace(
targetObject: object,
constructorOpt?: Function
): void;
prepareStackTrace(
err: Error,
stackTraces: CallSite[]
): any;
}export declare class ApiReferenceSnapshotStore extends Shape<"sorrell/docs-api-reference/ApiReferenceSnapshotStore", { publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> }, this> {
constructor(
_: never
): ApiReferenceSnapshotStore;
readonly ~effect/Context/Service: "~effect/Context/Service";
readonly key: "sorrell/docs-api-reference/ApiReferenceSnapshotStore";
Service: { publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> };
static [ignoreSymbol]?: {};
static [typeSymbol]?: unknown;
static [unifySymbol]?: EffectUnify<ServiceClass<ApiReferenceSnapshotStore, "sorrell/docs-api-reference/ApiReferenceSnapshotStore", { publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> }>>;
static readonly ~effect/Context/Service: "~effect/Context/Service";
static readonly ~effect/Effect: Variance<{ publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> }, never, ApiReferenceSnapshotStore>;
static Identifier: ApiReferenceSnapshotStore;
static readonly key: "sorrell/docs-api-reference/ApiReferenceSnapshotStore";
static readonly layer: Layer<ApiReferenceSnapshotStore, never, never>;
static readonly Service: { publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> };
[iterator](): EffectIterator<Effect<{ publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> }, never, ApiReferenceSnapshotStore>>;
[NodeInspectSymbol](): unknown;
context(
self: {
publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>;
restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError>
}
): Context<ApiReferenceSnapshotStore>;
of(
this: void,
self: {
publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>;
restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError>
}
): { publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>; restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>; write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError> };
pipe<A>(
this: A
): A;
toJSON(): unknown;
toString(): string;
use<A, E, R>(
f: (service: {
publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>;
restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError>
}) => Effect<A, E, R>
): Effect<A, E, ApiReferenceSnapshotStore | R>;
useSync<A>(
f: (service: {
publish: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
read: (path: string) => Effect<ApiReferenceDataset, ApiReferenceSnapshotError>;
restore: (source: string, target: string) => Effect<void, ApiReferenceSnapshotError>;
write: (path: string, dataset: ApiReferenceDataset) => Effect<void, ApiReferenceSnapshotError>
}) => A
): Effect<A, never, ApiReferenceSnapshotStore>;
}export declare class ApiReferenceValidationError extends ApiReferenceError {
constructor(
errors: readonly string[]
): ApiReferenceValidationError;
readonly _tag: "ApiReferenceValidationError";
readonly ~effect/ErrorReporter/attributes?: ReadonlyRecord<string, unknown>;
readonly ~effect/ErrorReporter/ignore?: boolean;
readonly ~effect/ErrorReporter/severity?: Severity;
readonly ~effect/Runtime/errorExitCode?: number;
readonly ~effect/Runtime/errorReported?: boolean;
cause?: unknown;
readonly errors: readonly string[];
message: string;
name: string;
stack?: string;
static stackTraceLimit: number;
captureStackTrace(
targetObject: object,
constructorOpt?: Function
): void;
prepareStackTrace(
err: Error,
stackTraces: CallSite[]
): any;
}export declare interface ApiReferenceDataset {
readonly checksum: string;
readonly generatedAt: string;
readonly jsonSchemas?: readonly JsonSchemaReferenceRecord[];
readonly records: readonly { breadcrumbs: readonly { current: boolean; href?: string; label: string }[]; categories: readonly { collapsed: boolean; id: string; label: string; order: number }[]; declarations: readonly { category?: string; categoryId: string; description?: string; descriptionParts?: readonly { code?: boolean; external?: boolean; href?: string; kind: "link" | "text"; text: string }[]; examples?: readonly { code: string; language?: string; name?: string }[]; id: string; introductionVersion?: string; kind: "function" | "const" | "class" | "interface" | "type" | "variable" | "namespace" | "enum" | "alias"; link?: { external: boolean; href: string; label?: string }; name: string; signature: string; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string } }[]; displayName: string; exportCount: number; introductionVersion?: string; language?: "typescript" | "cpp"; link?: { external: boolean; href: string; label?: string }; module: string; packageDescription?: string; packageExports?: readonly string[]; packageId: string; packageName: string; packagePrivate?: boolean; packageSourceUrl?: string; source?: { endLine?: number; file: string; line?: number; repositoryUrl: string; revision: string }; summary?: string; summaryParts?: readonly { code?: boolean; external?: boolean; href?: string; kind: "link" | "text"; text: string }[]; version: string }[];
readonly sourceRevision?: string;
readonly version: 1;
}export declare interface ApiReferenceGenerationOptions {
readonly doxygen?: readonly DoxygenProjectInput[];
readonly generatedAt?: string;
readonly jsonSchemas?: readonly JsonSchemaReferenceInput[];
readonly packages: readonly ApiReferencePackageInput[];
readonly referencePrefix?: string;
readonly repositoryRoot?: string;
readonly repositoryUrl?: string;
readonly revision?: string;
readonly sourceRoot?: string;
readonly typedoc?: Readonly<Record<string, unknown>>;
readonly unreal?: UnrealGenerationInput;
}export declare interface ApiReferencePackageInput {
readonly entryPoints: readonly string[];
readonly id: string;
readonly name: string;
readonly tsconfig?: string;
readonly version: string;
}export declare interface ApiReferenceValidationResult {
readonly errors: readonly string[];
readonly valid: boolean;
}export declare interface DoxygenProjectInput {
readonly id: string;
readonly name: string;
readonly version: string;
readonly xmlDirectory: string;
}export declare interface JsonSchemaReferenceInput {
readonly path: string;
readonly route: string;
}export declare interface JsonSchemaReferenceProperty {
readonly constraints: readonly { name: string; value: unknown }[];
readonly description?: string;
readonly name: string;
readonly reference?: { href: string; uri: string };
readonly required: boolean;
readonly type: string;
}export declare interface JsonSchemaReferenceRecord {
readonly definitions: readonly { name: string; schema: unknown }[];
readonly description?: string;
readonly path: string;
readonly route: string;
readonly schema: unknown;
readonly sourceUrl?: string;
readonly title: string;
}export declare interface JsonSchemaReferenceView {
readonly constraints: readonly { name: string; value: unknown }[];
readonly definitions: readonly { name: string; properties: readonly JsonSchemaReferenceProperty[]; schema: unknown }[];
readonly description?: string;
readonly formattedJson: string;
readonly properties: readonly JsonSchemaReferenceProperty[];
readonly title: string;
}export declare interface UnrealGenerationInput {
readonly plugins?: readonly UnrealPluginInput[];
readonly projects?: readonly UnrealProjectInput[];
}export declare interface UnrealPluginInput extends DoxygenProjectInput {
readonly descriptor: string;
readonly id: string;
readonly name: string;
readonly version: string;
readonly xmlDirectory: string;
}export declare interface UnrealProjectInput extends DoxygenProjectInput {
readonly descriptor: string;
readonly id: string;
readonly name: string;
readonly version: string;
readonly xmlDirectory: string;
}export declare type ApiReferenceAgentDocument = AgentDocument;export declare type ApiReferenceLlmDocument = ApiReferenceAgentDocument;