import { GroupField } from "./group.js"; import { SliceZone } from "./sliceZone.js"; import { TimestampField } from "./timestamp.js"; import { AnyRegularField } from "./types.js"; //#region src/types/value/document.d.ts /** Document metadata for a translation of a Prismic document. */ interface AlternateLanguage { id: string; uid?: string; type: TypeEnum; lang: LangEnum; } /** Metadata for Prismic document */ interface PrismicDocumentHeader { /** * The unique identifier for the document. Guaranteed to be unique among all documents in the * Prismic repository. */ id: string; /** * The unique identifier for the document. Guaranteed to be unique among all Prismic documents of * the same type. */ uid: string | null; /** Url that refers to document. */ url: string | null; /** Type of the document. */ type: TypeEnum; /** Href for document. */ href: string; /** Tags associated with document. */ tags: string[]; /** The timestamp at which the document was first published. */ first_publication_date: TimestampField<"filled">; /** The timestamp at which the document was last published. */ last_publication_date: TimestampField<"filled">; /** * Slugs associated with document. * * @deprecated Slugs are a deprecated feature used before the UID field was * introduced. Migrate to the UID field. For more details, see * https://community.prismic.io/t/what-are-slugs/6493 */ slugs: string[]; /** Documents that are related to this document. */ linked_documents: unknown[]; /** Language of document. */ lang: LangEnum; /** Array to access alternate language versions for document. */ alternate_languages: AlternateLanguage[]; } /** * A Prismic document served through REST API v2. * * @see More details on custom types: {@link https://prismic.io/docs/custom-types} */ interface PrismicDocument = Record, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader { /** Data contained in the document. */ data: DataInterface; } /** * A Prismic document served through REST API v2. Does not contain a UID (a unique identifier). * * @see More details on custom types: {@link https://prismic.io/docs/custom-types} * @see More details on the UID field: {@link https://prismic.io/docs/uid} */ interface PrismicDocumentWithoutUID = Record, TypeEnum = string, LangEnum = string> extends PrismicDocument { /** * This document does not have a UID field. This property will always be `null`. * * The unique identifier for the document. Guaranteed to be unique among all Prismic documents of * the same type. */ uid: null; } /** * A Prismic document served through REST API v2. Contains a UID (a unique identifier). * * @see More details on custom types: {@link https://prismic.io/docs/custom-types} * @see More details on the UID field: {@link https://prismic.io/docs/uid} */ interface PrismicDocumentWithUID = Record, TypeEnum = string, LangEnum = string> extends PrismicDocument { /** * The unique identifier for the document. Guaranteed to be unique among all Prismic documents of * the same type. */ uid: string; } //#endregion export { AlternateLanguage, PrismicDocument, PrismicDocumentHeader, PrismicDocumentWithUID, PrismicDocumentWithoutUID }; //# sourceMappingURL=document.d.ts.map