@prismicio/types-internal
Version:
Prismic types for Custom Types and Prismic Data
197 lines (196 loc) • 6.78 kB
TypeScript
import * as t from "io-ts";
export declare const CustomTypes: t.Type<readonly (string | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
} | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
})[];
})[];
})[], readonly (string | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
} | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
})[];
})[];
})[], unknown>;
export declare const LinkFieldType = "Link";
export declare const LinkConfig: t.ExactC<t.PartialC<{
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
useAsTitle: t.BooleanC;
placeholder: t.StringC;
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.Type<readonly (string | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
} | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
})[];
})[];
})[], readonly (string | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
} | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
})[];
})[];
})[], unknown>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
allowText: t.BooleanC;
/**
* `repeat` property is used to allow multiple links to be added.
* `undefined` means that the field is not repeatable (hence repeat = false).
*/
repeat: t.BooleanC;
/**
* `variants` allows an option to be picked from a list (e.g. "primary"). To
* be considered, the list must have at least one item.
*/
variants: t.ArrayC<t.StringC>;
}>>;
export declare type LinkConfig = t.TypeOf<typeof LinkConfig>;
export declare const Link: t.ExactC<t.IntersectionC<[t.TypeC<{
type: t.LiteralC<"Link">;
}>, t.PartialC<{
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
config: t.ExactC<t.PartialC<{
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
useAsTitle: t.BooleanC;
placeholder: t.StringC;
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
customtypes: t.Type<readonly (string | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
} | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
})[];
})[];
})[], readonly (string | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
} | {
id: string;
fields: readonly (string | {
id: string;
customtypes: readonly (string | {
id: string;
fields: readonly (string | {
id: string;
fields: readonly string[];
})[];
})[];
})[];
})[];
})[], unknown>;
masks: t.Type<readonly string[], object, unknown>;
tags: t.Type<readonly string[], object, unknown>;
allowTargetBlank: t.BooleanC;
allowText: t.BooleanC;
/**
* `repeat` property is used to allow multiple links to be added.
* `undefined` means that the field is not repeatable (hence repeat = false).
*/
repeat: t.BooleanC;
/**
* `variants` allows an option to be picked from a list (e.g. "primary"). To
* be considered, the list must have at least one item.
*/
variants: t.ArrayC<t.StringC>;
}>>;
}>]>>;
export declare type Link = t.TypeOf<typeof Link>;