@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
38 lines (37 loc) • 2.01 kB
TypeScript
import { MaybeRefOrGetter } from 'vue';
export type SchemaValue = unknown;
export type SchemaValues = Record<string, SchemaValue>;
export declare const prefectKinds: readonly ["none", "json", "jinja", "workspace_variable"], isPrefectKind: (value: unknown) => value is "none" | "json" | "jinja" | "workspace_variable";
export type PrefectKind = typeof prefectKinds[number];
export declare function getPrefectKindFromValue(source: MaybeRefOrGetter<SchemaValue>): PrefectKind;
type BasePrefectKindValue<TKind extends PrefectKind = PrefectKind, TRest extends Record<string, unknown> = Record<string, unknown>> = {
__prefect_kind: TKind;
} & TRest;
export type PrefectKindValue = PrefectKindNull | PrefectKindJinja | PrefectKindJson | PrefectKindWorkspaceVariable;
export declare function isPrefectKindValue<T extends PrefectKind = PrefectKind>(value: unknown, kind?: T): value is PrefectKindValue & {
__prefect_kind: T;
};
export type PrefectKindNull = BasePrefectKindValue<'none', {
value: unknown;
}>;
export declare function isPrefectKindNull(value: unknown): value is PrefectKindNull;
export type PrefectKindJson = BasePrefectKindValue<'json', {
value?: string;
}>;
export declare function isPrefectKindJson(value: unknown): value is PrefectKindJson;
export type PrefectKindJinja = BasePrefectKindValue<'jinja', {
template?: string;
}>;
export declare function isPrefectKindJinja(value: unknown): value is PrefectKindJinja;
export type PrefectKindWorkspaceVariable = BasePrefectKindValue<'workspace_variable', {
variable_name?: string;
}>;
export declare function isPrefectKindWorkspaceVariable(value: unknown): value is PrefectKindWorkspaceVariable;
export type BlockDocumentReferenceValue = {
$ref: {
block_document_id: string;
};
};
export declare function isBlockDocumentReferenceValue(value: unknown): value is BlockDocumentReferenceValue;
export declare function asBlockDocumentReferenceValue(value: unknown): BlockDocumentReferenceValue | undefined;
export {};