@prismicio/types-internal
Version:
Prismic types for Custom Types and Prismic Data
79 lines (78 loc) • 3.78 kB
TypeScript
import * as t from "io-ts";
import type { LegacyContentCtx, WithTypes } from "../../LegacyContentCtx";
export declare const EmbedContentType = "EmbedContent";
export declare const isEmbedContent: (u: unknown) => u is {
embed_url: string;
type: string;
} & {
version?: string | number | null;
title?: string | null | undefined;
author_name?: string | null | undefined;
author_url?: string | null | undefined;
provider_name?: string | null | undefined;
provider_url?: string | null | undefined;
cache_age?: string | number | null;
thumbnail_url?: string | null | undefined;
thumbnail_width?: number | null | undefined;
thumbnail_height?: number | null | undefined;
html?: string | null | undefined;
} & {
__TYPE__: "EmbedContent";
all: unknown;
};
export declare const EmbedContentLegacy: t.ExactC<t.IntersectionC<[t.TypeC<{
embed_url: t.StringC;
type: t.StringC;
}>, t.PartialC<{
version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
}>]>>;
export declare type EmbedLegacy = t.TypeOf<typeof EmbedContentLegacy>;
export declare const EmbedLegacy: (ctx: LegacyContentCtx) => t.Type<{
embed_url: string;
type: string;
} & {
version?: string | number | null;
title?: string | null | undefined;
author_name?: string | null | undefined;
author_url?: string | null | undefined;
provider_name?: string | null | undefined;
provider_url?: string | null | undefined;
cache_age?: string | number | null;
thumbnail_url?: string | null | undefined;
thumbnail_width?: number | null | undefined;
thumbnail_height?: number | null | undefined;
html?: string | null | undefined;
} & {
__TYPE__: "EmbedContent";
all: unknown;
}, WithTypes<unknown>, unknown>;
export declare const EmbedContent: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
embed_url: t.StringC;
type: t.StringC;
}>, t.PartialC<{
version: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
title: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
author_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
author_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
provider_name: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
provider_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
cache_age: t.UnionC<[t.StringC, t.NumberC, t.NullC]>;
thumbnail_url: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
thumbnail_width: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
}>]>>, t.ExactC<t.TypeC<{
__TYPE__: t.LiteralC<"EmbedContent">;
all: t.UnknownC;
}>>]>;
export declare type EmbedContent = t.TypeOf<typeof EmbedContent>;