UNPKG

@composedb/devtools

Version:

Development tools for ComposeDB projects.

22 lines (21 loc) 1.46 kB
import type { ModelRelationViewDefinitionV2, ModelViewDefinitionV2 } from '@ceramicnetwork/stream-model'; import type { StreamRef } from '@ceramicnetwork/streamid'; import type { RuntimeRelation, RuntimeViewField } from '@composedb/types'; /** @internal */ export declare function streamIDToString(id: StreamRef | string): string; /** @internal */ export declare function applyMap<M extends Record<string, unknown>, V extends M[keyof M] = M[keyof M], R = unknown>(inputs: M, callFunc: (input: V) => R): Record<keyof M, R>; /** @internal */ export declare function promiseMap<M extends Record<string, unknown>, V extends M[keyof M] = M[keyof M], R = unknown>(inputs: M, callFunc: (input: V) => Promise<R>): Promise<Record<keyof M, R>>; /** @internal */ export declare function sortKeys<T extends Record<string, unknown>>(object: T): T; /** @internal */ export declare function isRelationViewDefinition(view: ModelViewDefinitionV2): view is ModelRelationViewDefinitionV2; /** @internal */ export declare function assertRelationViewDefinition(view: ModelViewDefinitionV2): asserts view is ModelRelationViewDefinitionV2; /** @internal */ export declare function viewDefinitionToRuntimeRelation(view: ModelViewDefinitionV2): RuntimeRelation; /** @internal */ export declare function viewDefinitionToRuntime(view: ModelViewDefinitionV2): RuntimeViewField; /** @internal */ export declare function viewRuntimeToModel(field: RuntimeViewField): ModelViewDefinitionV2;