UNPKG

@prismicio/types-internal

Version:
920 lines (919 loc) 25 kB
/** * LinkContent is a union of different link content types. * * Most link content types are built from a union of a filled and an unfilled version. * * Filled versions make sure that the important fields that make the link work * are present. They are also exported for when there's a need to ensure that * the link is filled when used in a specific context, e.g. links in rich text fields. * * Unfilled versions are used when the link is not filled yet but contains other * information like the text. * * There are some exceptions that don't have a filled version (e.g. MediaLink) * for when the exact subtype is not yet known. * * Unfilled versions all have a special `kind` property that is used to * determine the type of the link. For legacy reasons, filled versions don't * necessarily require this property or its type is loose (e.g. `string`). In * this cases, the type is determined based on a specific combination of the * rest of the link data. This is why the order of the subtypes in the union is * important and should be from the most specific to the least specific. A * battery of tests ensures that the correct type is inferred. */ import * as t from "io-ts"; import type { LegacyContentCtx, WithTypes } from "../../LegacyContentCtx"; export declare const ImageLinkType = "ImageLink"; export declare const FilledImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ImageLink">; }>>, t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.Type<"image", "image", unknown>; id: t.StringC; url: t.StringC; height: t.StringC; width: t.StringC; size: t.StringC; name: t.StringC; }>>, t.ExactC<t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>>]>]>; export declare type FilledImageLinkContent = t.TypeOf<typeof FilledImageLinkContent>; export declare const ImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ImageLink">; }>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.Type<"image", "image", unknown>; id: t.StringC; url: t.StringC; height: t.StringC; width: t.StringC; size: t.StringC; name: t.StringC; }>>, t.ExactC<t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>>]>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"image">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>; export declare type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>; export declare const FileLinkType = "FileLink"; export declare const FilledFileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"FileLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.Type<"file", "file", unknown>; id: t.StringC; url: t.StringC; name: t.StringC; size: t.StringC; }>, t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>]>>]>; export declare type FilledFileLinkContent = t.TypeOf<typeof FilledFileLinkContent>; export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"FileLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.Type<"file", "file", unknown>; id: t.StringC; url: t.StringC; name: t.StringC; size: t.StringC; }>, t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>]>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"file">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>; export declare type FileLinkContent = t.TypeOf<typeof FileLinkContent>; export declare const MediaLinkType = "MediaLink"; export declare const MediaLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"MediaLink">; }>>, t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.LiteralC<"media">; }>>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>; export declare type MediaLinkContent = t.TypeOf<typeof MediaLinkContent>; export declare const DocumentLinkType = "DocumentLink"; export declare const FilledDocumentLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"DocumentLink">; }>>, t.ExactC<t.TypeC<{ id: t.Type<string, string, unknown>; }>>]>; export declare type FilledDocumentLinkContent = t.TypeOf<typeof FilledDocumentLinkContent>; export declare const DocumentLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"DocumentLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{ id: t.Type<string, string, unknown>; }>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"document">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>; export declare type DocumentLinkContent = t.TypeOf<typeof DocumentLinkContent>; export declare const ExternalLinkType = "ExternalLink"; export declare const FilledExternalLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ExternalLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ url: t.StringC; }>, t.PartialC<{ kind: t.LiteralC<"web">; target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; preview: t.UnionC<[t.Type<{ title?: string; }, { title?: string; }, unknown>, t.NullC, t.UndefinedC]>; }>]>>]>; export declare type FilledExternalLinkContent = t.TypeOf<typeof FilledExternalLinkContent>; export declare const ExternalLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ExternalLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{ url: t.StringC; }>, t.PartialC<{ kind: t.LiteralC<"web">; target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; preview: t.UnionC<[t.Type<{ title?: string; }, { title?: string; }, unknown>, t.NullC, t.UndefinedC]>; }>]>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"web">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>; export declare type ExternalLinkContent = t.TypeOf<typeof ExternalLinkContent>; export declare const AnyLinkType = "AnyLink"; export declare const AnyLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"AnyLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.LiteralC<"any">; }>, t.PartialC<{ text: t.StringC; variant: t.StringC; }>]>>]>; export declare type AnyLinkContent = t.TypeOf<typeof AnyLinkContent>; export declare const LinkContentType = "LinkContent"; export declare const isLinkContent: (u: unknown) => u is { key: string; } & { __TYPE__: "LinkContent"; value: ({ __TYPE__: "ImageLink"; } & ((({ kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | { kind: "image"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "FileLink"; } & ((({ kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | { kind: "file"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "MediaLink"; } & { kind: "media"; } & { text?: string; variant?: string; }) | ({ __TYPE__: "DocumentLink"; } & (({ id: string; } | { kind: "document"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "ExternalLink"; } & ((({ url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }) | { kind: "web"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "AnyLink"; } & { kind: "any"; } & { text?: string; variant?: string; }); }; export declare const LinkLegacy: t.IntersectionC<[t.ExactC<t.TypeC<{ key: t.Type<string, string, unknown>; }>>, t.UnionC<[t.Type<{ __TYPE__: "ImageLink"; } & ((({ kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | { kind: "image"; }) & { text?: string; variant?: string; }), (({ kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | { kind: "image"; }) & { text?: string; variant?: string; }, unknown>, t.Type<{ __TYPE__: "FileLink"; } & ((({ kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | { kind: "file"; }) & { text?: string; variant?: string; }), (({ kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | { kind: "file"; }) & { text?: string; variant?: string; }, unknown>, t.Type<{ __TYPE__: "DocumentLink"; } & (({ id: string; } | { kind: "document"; }) & { text?: string; variant?: string; }), ({ id: string; } | { kind: "document"; }) & { text?: string; variant?: string; }, unknown>, t.Type<{ __TYPE__: "ExternalLink"; } & ((({ url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }) | { kind: "web"; }) & { text?: string; variant?: string; }), (({ url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }) | { kind: "web"; }) & { text?: string; variant?: string; }, unknown>, t.Type<{ __TYPE__: "MediaLink"; } & { kind: "media"; } & { text?: string; variant?: string; }, { kind: "media"; } & { text?: string; variant?: string; }, unknown>, t.Type<{ __TYPE__: "AnyLink"; } & { kind: "any"; } & { text?: string; variant?: string; }, { kind: "any"; } & { text?: string; variant?: string; }, unknown>]>]>; export declare const LinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{ key: string; } & { __TYPE__: "LinkContent"; value: ({ __TYPE__: "ImageLink"; } & ((({ kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | { kind: "image"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "FileLink"; } & ((({ kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | { kind: "file"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "MediaLink"; } & { kind: "media"; } & { text?: string; variant?: string; }) | ({ __TYPE__: "DocumentLink"; } & (({ id: string; } | { kind: "document"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "ExternalLink"; } & ((({ url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }) | { kind: "web"; }) & { text?: string; variant?: string; })) | ({ __TYPE__: "AnyLink"; } & { kind: "any"; } & { text?: string; variant?: string; }); }, WithTypes<{ key: string; } & (((({ kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | { kind: "image"; }) & { text?: string; variant?: string; }) | ((({ kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | { kind: "file"; }) & { text?: string; variant?: string; }) | ({ kind: "media"; } & { text?: string; variant?: string; }) | (({ id: string; } | { kind: "document"; }) & { text?: string; variant?: string; }) | ((({ url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }) | { kind: "web"; }) & { text?: string; variant?: string; }) | ({ kind: "any"; } & { text?: string; variant?: string; }))>, unknown>; export declare const Link: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ImageLink">; }>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.Type<"image", "image", unknown>; id: t.StringC; url: t.StringC; height: t.StringC; width: t.StringC; size: t.StringC; name: t.StringC; }>>, t.ExactC<t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>>]>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"image">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"FileLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.Type<"file", "file", unknown>; id: t.StringC; url: t.StringC; name: t.StringC; size: t.StringC; }>, t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>]>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"file">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"DocumentLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{ id: t.Type<string, string, unknown>; }>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"document">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ExternalLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{ url: t.StringC; }>, t.PartialC<{ kind: t.LiteralC<"web">; target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; preview: t.UnionC<[t.Type<{ title?: string; }, { title?: string; }, unknown>, t.NullC, t.UndefinedC]>; }>]>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"web">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"MediaLink">; }>>, t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.LiteralC<"media">; }>>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"AnyLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.LiteralC<"any">; }>, t.PartialC<{ text: t.StringC; variant: t.StringC; }>]>>]>]>; export declare const LinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ key: t.Type<string, string, unknown>; }>>, t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"LinkContent">; value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ImageLink">; }>>, t.IntersectionC<[t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.Type<"image", "image", unknown>; id: t.StringC; url: t.StringC; height: t.StringC; width: t.StringC; size: t.StringC; name: t.StringC; }>>, t.ExactC<t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>>]>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"image">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"FileLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.Type<"file", "file", unknown>; id: t.StringC; url: t.StringC; name: t.StringC; size: t.StringC; }>, t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>]>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"file">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"DocumentLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.TypeC<{ id: t.Type<string, string, unknown>; }>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"document">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ExternalLink">; }>>, t.IntersectionC<[t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{ url: t.StringC; }>, t.PartialC<{ kind: t.LiteralC<"web">; target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; preview: t.UnionC<[t.Type<{ title?: string; }, { title?: string; }, unknown>, t.NullC, t.UndefinedC]>; }>]>>, t.ExactC<t.TypeC<{ kind: t.LiteralC<"web">; }>>]>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"MediaLink">; }>>, t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.LiteralC<"media">; }>>, t.ExactC<t.PartialC<{ text: t.StringC; variant: t.StringC; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"AnyLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.LiteralC<"any">; }>, t.PartialC<{ text: t.StringC; variant: t.StringC; }>]>>]>]>; }>>]>; export declare type LinkContent = t.TypeOf<typeof LinkContent>; export declare type LinksTypes = LinkContent["__TYPE__"] | LinkContent["value"]["__TYPE__"]; export declare const isFilledLinkContent: (u: unknown) => u is { key: string; } & { __TYPE__: "LinkContent"; value: ({ __TYPE__: "ImageLink"; } & { kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | ({ __TYPE__: "FileLink"; } & { kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | ({ __TYPE__: "DocumentLink"; } & { id: string; }) | ({ __TYPE__: "ExternalLink"; } & { url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }); }; export declare const FilledLinkLegacy: t.UnionC<[t.Type<{ __TYPE__: "ImageLink"; } & { kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }, { kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }, unknown>, t.Type<{ __TYPE__: "FileLink"; } & { kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }, { kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }, unknown>, t.Type<{ __TYPE__: "DocumentLink"; } & { id: string; }, { id: string; }, unknown>, t.Type<{ __TYPE__: "ExternalLink"; } & { url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }, { url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }, unknown>]>; export declare const FilledLinkContentLegacy: (ctx: LegacyContentCtx) => t.Type<{ key: string; } & { __TYPE__: "LinkContent"; value: ({ __TYPE__: "ImageLink"; } & { kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | ({ __TYPE__: "FileLink"; } & { kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | ({ __TYPE__: "DocumentLink"; } & { id: string; }) | ({ __TYPE__: "ExternalLink"; } & { url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; }); }, WithTypes<({ kind: "image"; id: string; url: string; height: string; width: string; size: string; name: string; } & { date?: string | null | undefined; }) | ({ kind: "file"; id: string; url: string; name: string; size: string; } & { date?: string | null | undefined; }) | { id: string; } | ({ url: string; } & { kind?: "web"; target?: string | null | undefined; preview?: { title?: string; } | null | undefined; })>, unknown>; export declare const FilledLink: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ImageLink">; }>>, t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.Type<"image", "image", unknown>; id: t.StringC; url: t.StringC; height: t.StringC; width: t.StringC; size: t.StringC; name: t.StringC; }>>, t.ExactC<t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"FileLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.Type<"file", "file", unknown>; id: t.StringC; url: t.StringC; name: t.StringC; size: t.StringC; }>, t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"DocumentLink">; }>>, t.ExactC<t.TypeC<{ id: t.Type<string, string, unknown>; }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ExternalLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ url: t.StringC; }>, t.PartialC<{ kind: t.LiteralC<"web">; target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; preview: t.UnionC<[t.Type<{ title?: string; }, { title?: string; }, unknown>, t.NullC, t.UndefinedC]>; }>]>>]>]>; export declare const FilledLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{ key: t.Type<string, string, unknown>; }>>, t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"LinkContent">; value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ImageLink">; }>>, t.IntersectionC<[t.ExactC<t.TypeC<{ kind: t.Type<"image", "image", unknown>; id: t.StringC; url: t.StringC; height: t.StringC; width: t.StringC; size: t.StringC; name: t.StringC; }>>, t.ExactC<t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>>]>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"FileLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ kind: t.Type<"file", "file", unknown>; id: t.StringC; url: t.StringC; name: t.StringC; size: t.StringC; }>, t.PartialC<{ date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; }>]>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"DocumentLink">; }>>, t.ExactC<t.TypeC<{ id: t.Type<string, string, unknown>; }>>]>, t.IntersectionC<[t.ExactC<t.TypeC<{ __TYPE__: t.LiteralC<"ExternalLink">; }>>, t.ExactC<t.IntersectionC<[t.TypeC<{ url: t.StringC; }>, t.PartialC<{ kind: t.LiteralC<"web">; target: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>; preview: t.UnionC<[t.Type<{ title?: string; }, { title?: string; }, unknown>, t.NullC, t.UndefinedC]>; }>]>>]>]>; }>>]>; export declare type FilledLinkContent = t.TypeOf<typeof FilledLinkContent>;