@prismicio/client
Advanced tools
Comparing version 7.0.0-alpha.5 to 7.0.0
@@ -38,3 +38,3 @@ /** | ||
/** | ||
* The Custom Type of the document. | ||
* The custom type of the document. | ||
*/ | ||
@@ -154,4 +154,4 @@ type: string; | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -174,3 +174,3 @@ * | ||
/** | ||
* Ref used to populate Integration Fields with the latest content. | ||
* Ref used to populate integration fields with the latest content. | ||
* | ||
@@ -177,0 +177,0 @@ * {@link https://prismic.io/docs/integration-fields} |
@@ -115,3 +115,3 @@ import type { Query } from "./types/api/query"; | ||
/** | ||
* A list of Route Resolver objects that define how a document's `url` field | ||
* A list of route resolver objects that define how a document's `url` property | ||
* is resolved. | ||
@@ -124,4 +124,4 @@ * | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -198,3 +198,3 @@ * | ||
/** | ||
* A fallback URL if the Link Resolver does not return a value. | ||
* A fallback URL if the link resolver does not return a value. | ||
*/ | ||
@@ -266,3 +266,3 @@ defaultURL: string; | ||
/** | ||
* A list of Route Resolver objects that define how a document's `url` field | ||
* A list of route resolver objects that define how a document's `url` field | ||
* is resolved. | ||
@@ -275,4 +275,4 @@ * | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -437,3 +437,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -460,3 +460,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -489,3 +489,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -509,3 +509,3 @@ * | ||
* Queries a document from the Prismic repository with a specific UID and | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -516,3 +516,3 @@ * @remarks | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -525,3 +525,3 @@ * | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uid - UID of the document. | ||
@@ -542,3 +542,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -554,3 +554,3 @@ * | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uids - A list of document UIDs. | ||
@@ -565,3 +565,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* Queries all documents from the Prismic repository with specific UIDs and | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -575,3 +575,3 @@ * This method may make multiple network requests to query all matching | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -587,3 +587,3 @@ * | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uids - A list of document UIDs. | ||
@@ -597,3 +597,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* Queries a singleton document from the Prismic repository for a specific | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -603,3 +603,3 @@ * @remarks | ||
* instance. For example, a repository may be configured to contain just one | ||
* Settings document. This is in contrast to a repeatable Custom Type which | ||
* Settings document. This is in contrast to a repeatable custom type which | ||
* allows multiple instances of itself. | ||
@@ -613,6 +613,6 @@ * @example | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the singleton Custom Type. | ||
* @param documentType - The API ID of the singleton custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns The singleton document for the Custom Type, if a matching document | ||
* @returns The singleton document for the custom type, if a matching document | ||
* exists. | ||
@@ -622,6 +622,6 @@ */ | ||
/** | ||
* Queries documents from the Prismic repository for a specific Custom Type. | ||
* Queries documents from the Prismic repository for a specific custom type. | ||
* | ||
* Use `getAllByType` instead if you need to query all documents for a | ||
* specific Custom Type. | ||
* specific custom type. | ||
* | ||
@@ -635,6 +635,6 @@ * @example | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the Custom Type. | ||
* @param documentType - The API ID of the custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns A paginated response containing documents of the Custom Type. | ||
* @returns A paginated response containing documents of the custom type. | ||
*/ | ||
@@ -656,6 +656,6 @@ getByType<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<Query<ExtractDocumentType<TDocument, TDocumentType>>>; | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the Custom Type. | ||
* @param documentType - The API ID of the custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns A list of all documents of the Custom Type. | ||
* @returns A list of all documents of the custom type. | ||
*/ | ||
@@ -662,0 +662,0 @@ getAllByType<TDocument extends TDocuments, TDocumentType extends TDocument["type"] = TDocument["type"]>(documentType: TDocumentType, params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<ExtractDocumentType<TDocument, TDocumentType>[]>; |
@@ -68,3 +68,3 @@ var __defProp = Object.defineProperty; | ||
/** | ||
* A list of Route Resolver objects that define how a document's `url` field | ||
* A list of route resolver objects that define how a document's `url` field | ||
* is resolved. | ||
@@ -77,4 +77,4 @@ * | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -304,3 +304,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -329,3 +329,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -360,3 +360,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -382,3 +382,3 @@ * | ||
* Queries a document from the Prismic repository with a specific UID and | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -389,3 +389,3 @@ * @remarks | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -398,3 +398,3 @@ * | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uid - UID of the document. | ||
@@ -420,3 +420,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -432,3 +432,3 @@ * | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uids - A list of document UIDs. | ||
@@ -448,3 +448,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* Queries all documents from the Prismic repository with specific UIDs and | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -458,3 +458,3 @@ * This method may make multiple network requests to query all matching | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -470,3 +470,3 @@ * | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uids - A list of document UIDs. | ||
@@ -485,3 +485,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* Queries a singleton document from the Prismic repository for a specific | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -491,3 +491,3 @@ * @remarks | ||
* instance. For example, a repository may be configured to contain just one | ||
* Settings document. This is in contrast to a repeatable Custom Type which | ||
* Settings document. This is in contrast to a repeatable custom type which | ||
* allows multiple instances of itself. | ||
@@ -501,6 +501,6 @@ * @example | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the singleton Custom Type. | ||
* @param documentType - The API ID of the singleton custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns The singleton document for the Custom Type, if a matching document | ||
* @returns The singleton document for the custom type, if a matching document | ||
* exists. | ||
@@ -512,6 +512,6 @@ */ | ||
/** | ||
* Queries documents from the Prismic repository for a specific Custom Type. | ||
* Queries documents from the Prismic repository for a specific custom type. | ||
* | ||
* Use `getAllByType` instead if you need to query all documents for a | ||
* specific Custom Type. | ||
* specific custom type. | ||
* | ||
@@ -525,6 +525,6 @@ * @example | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the Custom Type. | ||
* @param documentType - The API ID of the custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns A paginated response containing documents of the Custom Type. | ||
* @returns A paginated response containing documents of the custom type. | ||
*/ | ||
@@ -548,6 +548,6 @@ async getByType(documentType, params) { | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the Custom Type. | ||
* @param documentType - The API ID of the custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns A list of all documents of the Custom Type. | ||
* @returns A list of all documents of the custom type. | ||
*/ | ||
@@ -554,0 +554,0 @@ async getAllByType(documentType, params) { |
@@ -71,3 +71,3 @@ export declare const filter: { | ||
* | ||
* This filter will only work for a GeoPoint field. | ||
* This filter will only work for a geopoint field. | ||
* | ||
@@ -74,0 +74,0 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#geopointnear} |
@@ -105,3 +105,3 @@ const formatValue = (value) => { | ||
* | ||
* This filter will only work for a GeoPoint field. | ||
* This filter will only work for a geopoint field. | ||
* | ||
@@ -108,0 +108,0 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#geopointnear} |
@@ -8,5 +8,5 @@ import type { DateField } from "../types/value/date"; | ||
/** | ||
* Transforms a Date or Timestamp field into a JavaScript Date object | ||
* Transforms a date or timestamp field into a JavaScript Date object | ||
* | ||
* @param dateOrTimestampField - A Date or Timestamp field from Prismic | ||
* @param dateOrTimestampField - A date or timestamp field from Prismic | ||
* | ||
@@ -13,0 +13,0 @@ * @returns A Date object, null if provided date is falsy |
@@ -5,3 +5,3 @@ import { RichTextFunctionSerializer, RichTextMapSerializer, RichTextMapSerializerFunction } from "@prismicio/richtext"; | ||
/** | ||
* Serializes a node from a Rich Text or Title field with a function to HTML. | ||
* Serializes a node from a rich text or title field with a function to HTML. | ||
* | ||
@@ -12,7 +12,7 @@ * Unlike a typical `@prismicio/richtext` function serializer, this serializer | ||
* | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
export type HTMLRichTextFunctionSerializer = (type: Parameters<RichTextFunctionSerializer<string>>[0], node: Parameters<RichTextFunctionSerializer<string>>[1], text: Parameters<RichTextFunctionSerializer<string>>[2], children: Parameters<RichTextFunctionSerializer<string>>[3][number], key: Parameters<RichTextFunctionSerializer<string>>[4]) => string | null | undefined; | ||
/** | ||
* Serializes a node from a Rich Text or Title field with a map to HTML | ||
* Serializes a node from a rich text or title field with a map to HTML | ||
* | ||
@@ -23,3 +23,3 @@ * Unlike a typical `@prismicio/richtext` map serializer, this serializer | ||
* | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -39,3 +39,3 @@ export type HTMLRichTextMapSerializer = { | ||
* | ||
* @typeParam BlockName - The serializer's Rich Text block type. | ||
* @typeParam BlockName - The serializer's rich text block type. | ||
*/ | ||
@@ -58,6 +58,6 @@ type HTMLRichTextMapSerializerFunction<BlockType extends keyof RichTextMapSerializer<string>> = RichTextMapSerializerFunction<string, ExtractNodeGeneric<RichTextMapSerializer<string>[BlockType]>, ExtractTextTypeGeneric<RichTextMapSerializer<string>[BlockType]>>; | ||
/** | ||
* Serializes a node from a Rich Text or Title field with a map or a function to HTML | ||
* Serializes a node from a rich text or title field with a map or a function to HTML | ||
* | ||
* @see {@link HTMLRichTextMapSerializer} and {@link HTMLRichTextFunctionSerializer} | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -75,3 +75,3 @@ export type HTMLRichTextSerializer = HTMLRichTextMapSerializer | HTMLRichTextFunctionSerializer; | ||
/** | ||
* An optional Rich Text Serializer, unhandled cases will fallback to the default serializer | ||
* An optional rich text serializer, unhandled cases will fallback to the default serializer | ||
*/ | ||
@@ -93,22 +93,22 @@ serializer?: HTMLRichTextSerializer | null; | ||
/** | ||
* Serializes a Rich Text or Title field to an HTML string. | ||
* Serializes a rich text or title field to an HTML string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param config - Configuration that determines the output of `asHTML()` | ||
* | ||
* @returns HTML equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns HTML equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
<Field extends RichTextField | null | undefined>(richTextField: Field, config?: AsHTMLConfig): AsHTMLReturnType<Field>; | ||
/** | ||
* Serializes a Rich Text or Title field to an HTML string. | ||
* Serializes a rich text or title field to an HTML string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param linkResolver - An optional link resolver function to resolve links, | ||
* without it you're expected to use the `routes` options from the API | ||
* @param serializer - An optional Rich Text Serializer, unhandled cases will fallback | ||
* @param serializer - An optional rich text serializer, unhandled cases will fallback | ||
* to the default serializer | ||
* | ||
* @returns HTML equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns HTML equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* | ||
@@ -115,0 +115,0 @@ * @deprecated Use object-style configuration instead. |
@@ -12,7 +12,7 @@ import { BuildPixelDensitySrcSetParams } from "imgix-url-builder"; | ||
/** | ||
* The Image field's image URL with Imgix URL parameters (if given). | ||
* The image field's image URL with Imgix URL parameters (if given). | ||
*/ | ||
src: string; | ||
/** | ||
* A pixel-densitye-based `srcset` attribute value for the Image field's | ||
* A pixel-densitye-based `srcset` attribute value for the image field's | ||
* image with Imgix URL parameters (if given). | ||
@@ -23,3 +23,3 @@ */ | ||
/** | ||
* Creates a pixel-density-based `srcset` from an Image field with optional | ||
* Creates a pixel-density-based `srcset` from an image field with optional | ||
* image transformations (via Imgix URL parameters). | ||
@@ -49,4 +49,4 @@ * | ||
* | ||
* @returns A `srcset` attribute value for the Image field with Imgix URL | ||
* parameters (if given). If the Image field is empty, `null` is returned. | ||
* @returns A `srcset` attribute value for the image field with Imgix URL | ||
* parameters (if given). If the image field is empty, `null` is returned. | ||
* @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering | ||
@@ -53,0 +53,0 @@ */ |
@@ -8,3 +8,3 @@ import { ImgixURLParams } from "imgix-url-builder"; | ||
/** | ||
* Returns the URL of an Image field with optional image transformations (via | ||
* Returns the URL of an image field with optional image transformations (via | ||
* Imgix URL parameters). | ||
@@ -23,4 +23,4 @@ * | ||
* | ||
* @returns The Image field's image URL with transformations applied (if given). | ||
* If the Image field is empty, `null` is returned. | ||
* @returns The image field's image URL with transformations applied (if given). | ||
* If the image field is empty, `null` is returned. | ||
* @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering | ||
@@ -27,0 +27,0 @@ */ |
@@ -8,7 +8,7 @@ import { BuildWidthSrcSetParams } from "imgix-url-builder"; | ||
/** | ||
* The Image field's image URL with Imgix URL parameters (if given). | ||
* The image field's image URL with Imgix URL parameters (if given). | ||
*/ | ||
src: string; | ||
/** | ||
* A width-based `srcset` attribute value for the Image field's image with | ||
* A width-based `srcset` attribute value for the image field's image with | ||
* Imgix URL parameters (if given). | ||
@@ -25,3 +25,3 @@ */ | ||
/** | ||
* Creates a width-based `srcset` from an Image field with optional image | ||
* Creates a width-based `srcset` from an image field with optional image | ||
* transformations (via Imgix URL parameters). | ||
@@ -32,3 +32,3 @@ * | ||
* | ||
* If the Image field contains responsive views, each responsive view can be | ||
* If the image field contains responsive views, each responsive view can be | ||
* used as a width in the resulting `srcset` by passing `"thumbnails"` as the | ||
@@ -58,4 +58,4 @@ * `widths` parameter. | ||
* | ||
* @returns A `srcset` attribute value for the Image field with Imgix URL | ||
* parameters (if given). If the Image field is empty, `null` is returned. | ||
* @returns A `srcset` attribute value for the image field with Imgix URL | ||
* parameters (if given). If the image field is empty, `null` is returned. | ||
* @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering | ||
@@ -62,0 +62,0 @@ */ |
@@ -6,7 +6,7 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship"; | ||
/** | ||
* Resolves a Link to a Prismic document to a URL | ||
* Resolves a link to a Prismic document to a URL | ||
* | ||
* @typeParam ReturnType - Return type of your link resolver function, useful if | ||
* you prefer to return a complex object | ||
* @param linkToDocumentField - A document Link Field to resolve | ||
* @param linkToDocumentField - A document link field to resolve | ||
* | ||
@@ -22,3 +22,3 @@ * @returns Resolved URL | ||
/** | ||
* An optional Link Resolver function. Without it, you are | ||
* An optional link resolver function. Without it, you are | ||
* expected to use the `routes` options from the API. | ||
@@ -40,12 +40,12 @@ */ | ||
/** | ||
* Resolves any type of Link field or Prismic document to a URL. | ||
* Resolves any type of link field or Prismic document to a URL. | ||
* | ||
* @typeParam LinkResolverFunctionReturnType - Link Resolver function return | ||
* @typeParam LinkResolverFunctionReturnType - link resolver function return | ||
* type | ||
* @typeParam Field - Link field or Prismic document to resolve to a URL | ||
* @param linkFieldOrDocument - Any kind of Link field or a document to resolve | ||
* @param linkFieldOrDocument - Any kind of link field or a document to resolve | ||
* @param config - Configuration that determines the output of `asLink()` | ||
* | ||
* @returns Resolved URL or, if the provided Link field or document is empty, `null` | ||
* @see Prismic Link Resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @returns Resolved URL or, if the provided link field or document is empty, `null` | ||
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} | ||
@@ -55,13 +55,13 @@ */ | ||
/** | ||
* Resolves any type of Link field or Prismic document to a URL. | ||
* Resolves any type of link field or Prismic document to a URL. | ||
* | ||
* @typeParam LinkResolverFunctionReturnType - Link Resolver function return | ||
* @typeParam LinkResolverFunctionReturnType - link resolver function return | ||
* type | ||
* @typeParam Field - Link field or Prismic document to resolve to a URL | ||
* @param linkFieldOrDocument - Any kind of Link field or a document to resolve | ||
* @param linkResolver - An optional Link Resolver function. Without it, you are | ||
* @param linkFieldOrDocument - Any kind of link field or a document to resolve | ||
* @param linkResolver - An optional link resolver function. Without it, you are | ||
* expected to use the `routes` options from the API | ||
* | ||
* @returns Resolved URL or, if the provided Link field or document is empty, `null` | ||
* @see Prismic Link Resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @returns Resolved URL or, if the provided link field or document is empty, `null` | ||
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} | ||
@@ -68,0 +68,0 @@ * |
@@ -28,14 +28,14 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship"; | ||
/** | ||
* Resolves any type of Link field or Prismic document to a set of link attributes. The attributes are designed to be passed to link HTML elements, like `<a>`. | ||
* Resolves any type of link field or Prismic document to a set of link attributes. The attributes are designed to be passed to link HTML elements, like `<a>`. | ||
* | ||
* If a resolved URL is external (i.e. starts with a protocol like `https://`), `rel` is returned as `"noreferrer"`. | ||
* | ||
* @typeParam LinkResolverFunctionReturnType - Link Resolver function return | ||
* @typeParam LinkResolverFunctionReturnType - link resolver function return | ||
* type | ||
* @typeParam Field - Link field or Prismic document to resolve to link attributes | ||
* @param linkFieldOrDocument - Any kind of Link field or a document to resolve | ||
* @param linkFieldOrDocument - Any kind of link field or a document to resolve | ||
* @param config - Configuration that determines the output of `asLinkAttrs()` | ||
* | ||
* @returns Resolved set of link attributes or, if the provided Link field or document is empty, and empty object | ||
* @see Prismic Link Resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @returns Resolved set of link attributes or, if the provided link field or document is empty, and empty object | ||
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} | ||
@@ -42,0 +42,0 @@ */ |
@@ -23,19 +23,19 @@ import { RichTextField } from "../types/value/richText"; | ||
/** | ||
* Serializes a Rich Text or Title field to a plain text string. | ||
* Serializes a rich text or title field to a plain text string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param config - Configuration that determines the output of `asText()` | ||
* | ||
* @returns Plain text equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns Plain text equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
<Field extends RichTextField | null | undefined>(richTextField: Field, config?: AsTextConfig): AsTextReturnType<Field>; | ||
/** | ||
* Serializes a Rich Text or Title field to a plain text string. | ||
* Serializes a rich text or title field to a plain text string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param separator - Separator used to join each element, defaults to a space | ||
* | ||
* @returns Plain text equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns Plain text equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* | ||
@@ -42,0 +42,0 @@ * @deprecated Use object-style configuration instead. |
@@ -8,3 +8,3 @@ import type { ColorField } from "../types/value/color"; | ||
import type { ImageField, ImageFieldImage } from "../types/value/image"; | ||
import type { IntegrationFields } from "../types/value/integrationFields"; | ||
import type { IntegrationField } from "../types/value/integration"; | ||
import type { KeyTextField } from "../types/value/keyText"; | ||
@@ -23,5 +23,5 @@ import type { LinkField } from "../types/value/link"; | ||
/** | ||
* Determines if a Rich Text field is filled. | ||
* Determines if a rich text field is filled. | ||
* | ||
* @param field - Rich Text field to check. | ||
* @param field - rich text field to check. | ||
* | ||
@@ -32,3 +32,3 @@ * @returns `true` if `field` is filled, `false` otherwise. | ||
/** | ||
* Determines if a Title field is filled. | ||
* Determines if a title field is filled. | ||
* | ||
@@ -51,3 +51,3 @@ * @param field - Title field to check. | ||
/** | ||
* Determines if an Image field is filled. | ||
* Determines if an image field is filled. | ||
* | ||
@@ -60,3 +60,3 @@ * @param field - Image field to check. | ||
/** | ||
* Determines if a Link field is filled. | ||
* Determines if a link field is filled. | ||
* | ||
@@ -69,5 +69,5 @@ * @param field - Link field to check. | ||
/** | ||
* Determines if a Link to Media field is filled. | ||
* Determines if a link to media field is filled. | ||
* | ||
* @param field - Link to Media field to check. | ||
* @param field - Link to media field to check. | ||
* | ||
@@ -78,3 +78,3 @@ * @returns `true` if `field` is filled, `false` otherwise. | ||
/** | ||
* Determines if a Content Relationship field is filled. | ||
* Determines if a content relationship field is filled. | ||
* | ||
@@ -87,3 +87,3 @@ * @param field - Content Relationship field to check. | ||
/** | ||
* Determines if a Date field is filled. | ||
* Determines if a date field is filled. | ||
* | ||
@@ -96,3 +96,3 @@ * @param field - Date field to check. | ||
/** | ||
* Determines if a Timestamp field is filled. | ||
* Determines if a timestamp field is filled. | ||
* | ||
@@ -105,3 +105,3 @@ * @param field - Timestamp field to check. | ||
/** | ||
* Determines if a Color field is filled. | ||
* Determines if a color field is filled. | ||
* | ||
@@ -114,3 +114,3 @@ * @param field - Color field to check. | ||
/** | ||
* Determines if a Number field is filled. | ||
* Determines if a number field is filled. | ||
* | ||
@@ -123,3 +123,3 @@ * @param field - Number field to check. | ||
/** | ||
* Determines if a Key Text field is filled. | ||
* Determines if a key text field is filled. | ||
* | ||
@@ -132,3 +132,3 @@ * @param field - Key Text field to check. | ||
/** | ||
* Determines if a Select field is filled. | ||
* Determines if a select field is filled. | ||
* | ||
@@ -141,3 +141,3 @@ * @param field - Select field to check. | ||
/** | ||
* Determines if an Embed field is filled. | ||
* Determines if an embed field is filled. | ||
* | ||
@@ -153,3 +153,3 @@ * @param field - Embed field to check. | ||
/** | ||
* Determines if a GeoPoint field is filled. | ||
* Determines if a geopoint field is filled. | ||
* | ||
@@ -165,10 +165,14 @@ * @param field - GeoPoint field to check. | ||
/** | ||
* Determines if an Integration Fields field is filled. | ||
* Determines if an integration field is filled. | ||
* | ||
* @param field - Integration Fields field to check. | ||
* @param field - Integration field to check. | ||
* | ||
* @returns `true` if `field` is filled, `false` otherwise. | ||
*/ | ||
export declare const integrationFields: <Data extends Record<string, unknown>>(field: IntegrationFields<Data> | undefined) => field is Data; | ||
export declare const integrationField: <Data extends Record<string, unknown>>(field: IntegrationField<Data> | undefined) => field is Data; | ||
/** | ||
* @deprecated Renamed to `integrationField`. | ||
*/ | ||
export declare const integrationFields: <Data extends Record<string, unknown>>(field: IntegrationField<Data> | undefined) => field is Data; | ||
/** | ||
* Determines if a Group has at least one item. | ||
@@ -175,0 +179,0 @@ * |
@@ -40,3 +40,4 @@ const isNonNullish = (input) => { | ||
}; | ||
const integrationFields = isNonNullish; | ||
const integrationField = isNonNullish; | ||
const integrationFields = integrationField; | ||
const group = (group2) => { | ||
@@ -57,2 +58,3 @@ return isNonNullish(group2) && isNonEmptyArray(group2); | ||
imageThumbnail, | ||
integrationField, | ||
integrationFields, | ||
@@ -59,0 +61,0 @@ keyText, |
@@ -0,1 +1,3 @@ | ||
import type { CustomTypeModelIntegrationField } from "./types/model/integration"; | ||
import type { IntegrationField } from "./types/value/integration"; | ||
import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML"; | ||
@@ -94,3 +96,7 @@ import { filter } from "./filter"; | ||
export type { GeoPointField } from "./types/value/geoPoint"; | ||
export type { IntegrationFields } from "./types/value/integrationFields"; | ||
/** | ||
* @deprecated Renamed to `IntegrationField` | ||
*/ | ||
type IntegrationFields = IntegrationField; | ||
export { IntegrationField, IntegrationFields }; | ||
export type { GroupField } from "./types/value/group"; | ||
@@ -122,3 +128,7 @@ export type { SliceZone } from "./types/value/sliceZone"; | ||
export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint"; | ||
export type { CustomTypeModelIntegrationFieldsField } from "./types/model/integrationFields"; | ||
/** | ||
* @deprecated Renamed to `CustomTypeModelIntegrationField`. | ||
*/ | ||
type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField; | ||
export { CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, }; | ||
export type { CustomTypeModelGroupField } from "./types/model/group"; | ||
@@ -125,0 +135,0 @@ export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone"; |
@@ -1,2 +0,2 @@ | ||
const version = "7.0.0-alpha.5"; | ||
const version = "7.0.0"; | ||
export { | ||
@@ -3,0 +3,0 @@ version |
@@ -16,3 +16,3 @@ import { Ref } from "./ref"; | ||
/** | ||
* An identifier used to query content with the latest Integration Fields | ||
* An identifier used to query content with the latest integration fields | ||
* data. | ||
@@ -28,3 +28,3 @@ */ | ||
/** | ||
* A list of the repository's Custom Type API IDs mapped to their | ||
* A list of the repository's custom type API IDs mapped to their | ||
* human-readable name. | ||
@@ -31,0 +31,0 @@ */ |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Boolean Custom Type field. | ||
* A boolean custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/boolean} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Color Custom Type field. | ||
* A color custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/color} |
import type { CustomTypeModelFieldType } from "./types"; | ||
import type { CustomTypeModelLinkSelectType } from "./link"; | ||
/** | ||
* A Content Relationship Custom Type field. | ||
* A content relationship custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: |
import { CustomTypeModelField } from "./types"; | ||
/** | ||
* A Prismic Custom Type model. | ||
* A Prismic custom type model. | ||
* | ||
* @typeParam ID - API ID of the Custom Type. | ||
* @typeParam Definition - The Custom Type's tabs and their fields. | ||
* @typeParam ID - API ID of the custom type. | ||
* @typeParam Definition - The custom type's tabs and their fields. | ||
*/ | ||
export interface CustomTypeModel<ID extends string = string, Definition extends CustomTypeModelDefinition = CustomTypeModelDefinition> { | ||
/** | ||
* The ID of the Custom Type model. | ||
* The ID of the custom type model. | ||
*/ | ||
id: ID; | ||
/** | ||
* The human readable name of the Custom Type Model. | ||
* The human readable name of the custom type model. | ||
*/ | ||
label: string | null | undefined; | ||
/** | ||
* Determines if more than one document for the Custom Type can be created. | ||
* Determines if more than one document for the custom type can be created. | ||
*/ | ||
repeatable: boolean; | ||
/** | ||
* The Custom Type model definition. | ||
* The custom type model definition. | ||
*/ | ||
json: Definition; | ||
/** | ||
* Determines if new documents for the Custom Type can be created. | ||
* Determines if new documents for the custom type can be created. | ||
*/ | ||
@@ -31,9 +31,9 @@ status: boolean; | ||
/** | ||
* A Prismic Custom Type's tabs and their fields. | ||
* A Prismic custom type's tabs and their fields. | ||
* | ||
* @typeParam TabName - Names of Custom Type tabs. | ||
* @typeParam TabName - Names of custom type tabs. | ||
*/ | ||
export type CustomTypeModelDefinition<TabName extends string = string> = Record<TabName, CustomTypeModelTab>; | ||
/** | ||
* A Custom Type's tab. Each tab can contain any number of fields but is limited | ||
* A custom type's tab. Each tab can contain any number of fields but is limited | ||
* to one Slice Zone. | ||
@@ -40,0 +40,0 @@ * |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Date Custom Type field. | ||
* A date custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/date} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* An Embed Custom Type field. | ||
* An embed custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/embed} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A GeoPoint Custom Type field. | ||
* A geopoint custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/geopoint} |
import type { CustomTypeModelFieldForGroup, CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Group Custom Type field. | ||
* A group custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/group} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* Dimension constraints for an Image Custom Type field. | ||
* Dimension constraints for an image custom type field. | ||
* | ||
@@ -12,3 +12,3 @@ * More details: {@link https://prismic.io/docs/image} | ||
/** | ||
* A thumbnail for an Image Custom Type field. | ||
* A thumbnail for an image custom type field. | ||
* | ||
@@ -21,3 +21,3 @@ * More details: {@link https://prismic.io/docs/image} | ||
/** | ||
* An Image Custom Type field. | ||
* An image custom type field. | ||
* | ||
@@ -24,0 +24,0 @@ * More details: {@link https://prismic.io/docs/image} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Key Text Custom Type field. | ||
* A key text custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/key-text} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Link Custom Type field. | ||
* A link custom type field. | ||
* | ||
@@ -18,3 +18,3 @@ * More details: | ||
/** | ||
* Type of a Link Custom Type field. | ||
* Type of a link custom type field. | ||
* | ||
@@ -21,0 +21,0 @@ * More details: |
import type { CustomTypeModelFieldType } from "./types"; | ||
import type { CustomTypeModelLinkSelectType } from "./link"; | ||
/** | ||
* A Link to Media Custom Type field. | ||
* A link to media custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Number Custom Type field. | ||
* A number custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/number} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Rich Text Custom Type field. | ||
* A rich text custom type field. | ||
* | ||
@@ -9,3 +9,3 @@ * More details: {@link https://prismic.io/docs/rich-text-title} | ||
/** | ||
* A Rich Text Custom Type field which supports multiple blocks of content. | ||
* A rich text custom type field which supports multiple blocks of content. | ||
* | ||
@@ -24,3 +24,3 @@ * More details: {@link https://prismic.io/docs/rich-text-title} | ||
/** | ||
* A Rich Text Custom Type field which supports one block of content. | ||
* A rich text custom type field which supports one block of content. | ||
* | ||
@@ -27,0 +27,0 @@ * More details: {@link https://prismic.io/docs/rich-text-title} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Select Custom Type field. | ||
* A select custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/select} |
import type { SharedSliceModelVariation } from "./sharedSliceVariation"; | ||
import type { CustomTypeModelSliceType } from "./sliceZone"; | ||
/** | ||
* A Prismic Shared Slice model. | ||
* A Prismic shared Slice model. | ||
* | ||
* More details: {@link https://prismic.io/docs/slice} | ||
* | ||
* @typeParam Variation - A variation for the Shared Slice. | ||
* @typeParam Variation - A variation for the shared Slice. | ||
*/ | ||
@@ -10,0 +10,0 @@ export interface SharedSliceModel<ID extends string = string, Variation extends SharedSliceModelVariation = SharedSliceModelVariation> { |
import type { CustomTypeModelFieldForGroup } from "./types"; | ||
/** | ||
* A Shared Slice variation. | ||
* A shared Slice variation. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/slice} |
@@ -5,3 +5,3 @@ import type { CustomTypeModelFieldForGroup } from "./types"; | ||
/** | ||
* A Slice for a Custom Type. | ||
* A Slice for a custom type. | ||
* | ||
@@ -8,0 +8,0 @@ * More details: {@link https://prismic.io/docs/slice} |
import type { CustomTypeModelFieldType } from "./types"; | ||
import type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "./slice"; | ||
/** | ||
* A Slice Zone Custom Type field. | ||
* A Slice Zone custom type field. | ||
* | ||
@@ -35,3 +35,3 @@ * More details: {@link https://prismic.io/docs/slice} | ||
/** | ||
* A Shared Slice for a Custom Type. | ||
* A shared Slice for a custom type. | ||
* | ||
@@ -38,0 +38,0 @@ * More details: {@link https://prismic.io/docs/slice} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Timestamp Custom Type field. | ||
* A timestamp custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/timestamp} |
import { CustomTypeModelRichTextSingleField } from "./richText"; | ||
/** | ||
* A Title Custom Type field. | ||
* A title custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/rich-text-title} |
@@ -9,3 +9,3 @@ import type { CustomTypeModelBooleanField } from "./boolean"; | ||
import type { CustomTypeModelImageField } from "./image"; | ||
import type { CustomTypeModelIntegrationFieldsField } from "./integrationFields"; | ||
import type { CustomTypeModelIntegrationField } from "./integration"; | ||
import type { CustomTypeModelKeyTextField } from "./keyText"; | ||
@@ -24,3 +24,3 @@ import type { CustomTypeModelLinkField } from "./link"; | ||
/** | ||
* Type identifier for a Custom Type field. | ||
* Type identifier for a custom type field. | ||
*/ | ||
@@ -35,3 +35,3 @@ export declare const CustomTypeModelFieldType: { | ||
readonly Image: "Image"; | ||
readonly IntegrationFields: "IntegrationFields"; | ||
readonly Integration: "IntegrationFields"; | ||
readonly Link: "Link"; | ||
@@ -46,2 +46,6 @@ readonly Number: "Number"; | ||
/** | ||
* @deprecated - Renamed to `Integration`. | ||
*/ | ||
readonly IntegrationFields: "IntegrationFields"; | ||
/** | ||
* @deprecated - Legacy field type. Use `Number` instead. | ||
@@ -60,8 +64,8 @@ */ | ||
/** | ||
* A Custom Type field. | ||
* A custom type field. | ||
*/ | ||
export type CustomTypeModelField = CustomTypeModelUIDField | CustomTypeModelGroupField | CustomTypeModelSliceZoneField | CustomTypeModelFieldForGroup; | ||
/** | ||
* Any Custom Type field that is valid for a Group field. | ||
* Any custom type field that is valid for a group field. | ||
*/ | ||
export type CustomTypeModelFieldForGroup = CustomTypeModelBooleanField | CustomTypeModelColorField | CustomTypeModelDateField | CustomTypeModelEmbedField | CustomTypeModelGeoPointField | CustomTypeModelImageField | CustomTypeModelIntegrationFieldsField | CustomTypeModelContentRelationshipField | CustomTypeModelLinkField | CustomTypeModelLinkToMediaField | CustomTypeModelNumberField | CustomTypeModelRangeField | CustomTypeModelSelectField | CustomTypeModelRichTextField | CustomTypeModelTitleField | CustomTypeModelKeyTextField | CustomTypeModelTimestampField | CustomTypeModelSeparatorField; | ||
export type CustomTypeModelFieldForGroup = CustomTypeModelBooleanField | CustomTypeModelColorField | CustomTypeModelDateField | CustomTypeModelEmbedField | CustomTypeModelGeoPointField | CustomTypeModelImageField | CustomTypeModelIntegrationField | CustomTypeModelContentRelationshipField | CustomTypeModelLinkField | CustomTypeModelLinkToMediaField | CustomTypeModelNumberField | CustomTypeModelRangeField | CustomTypeModelSelectField | CustomTypeModelRichTextField | CustomTypeModelTitleField | CustomTypeModelKeyTextField | CustomTypeModelTimestampField | CustomTypeModelSeparatorField; |
@@ -9,3 +9,3 @@ const CustomTypeModelFieldType = { | ||
Image: "Image", | ||
IntegrationFields: "IntegrationFields", | ||
Integration: "IntegrationFields", | ||
Link: "Link", | ||
@@ -20,2 +20,6 @@ Number: "Number", | ||
/** | ||
* @deprecated - Renamed to `Integration`. | ||
*/ | ||
IntegrationFields: "IntegrationFields", | ||
/** | ||
* @deprecated - Legacy field type. Use `Number` instead. | ||
@@ -22,0 +26,0 @@ */ |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A UID Custom Type field. | ||
* A UID custom type field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/uid} |
/** | ||
* A Boolean field. | ||
* A boolean field. | ||
* | ||
@@ -4,0 +4,0 @@ * @see More details: {@link https://prismic.io/docs/boolean} |
import type { FieldState } from "./types"; | ||
/** | ||
* A Color field. | ||
* A color field. | ||
* | ||
@@ -5,0 +5,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -16,3 +16,3 @@ import type { AnyRegularField, FieldState } from "./types"; | ||
/** | ||
* Links that refer to Documents | ||
* Links that refer to documents | ||
*/ | ||
@@ -19,0 +19,0 @@ export interface FilledContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown> { |
import type { FieldState } from "./types"; | ||
/** | ||
* A Date field. | ||
* A date field. | ||
* | ||
@@ -5,0 +5,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -14,3 +14,3 @@ import { AnyRegularField } from "./types"; | ||
/** | ||
* Metadata for Prismic Document | ||
* Metadata for Prismic document | ||
*/ | ||
@@ -76,3 +76,3 @@ export interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> { | ||
* | ||
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types} | ||
* @see More details on custom types: {@link https://prismic.io/docs/custom-types} | ||
*/ | ||
@@ -89,3 +89,3 @@ export interface PrismicDocument<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> { | ||
* | ||
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types} | ||
* @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} | ||
@@ -107,3 +107,3 @@ */ | ||
* | ||
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types} | ||
* @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} | ||
@@ -110,0 +110,0 @@ */ |
@@ -157,3 +157,3 @@ import type { EmptyObjectField, FieldState } from "./types"; | ||
/** | ||
* An Embed field. | ||
* An embed field. | ||
* | ||
@@ -160,0 +160,0 @@ * @typeParam Data - Data provided by the URL's oEmbed provider. |
import type { EmptyObjectField, FieldState } from "./types"; | ||
/** | ||
* A Geopoint field. | ||
* A geopoint field. | ||
* | ||
@@ -5,0 +5,0 @@ * @typeParam State - State of the field which determines its shape. |
import type { AnyRegularField, FieldState } from "./types"; | ||
/** | ||
* A Group field. | ||
* A group field. | ||
* | ||
@@ -5,0 +5,0 @@ * More details: {@link https://prismic.io/docs/group} |
import type { FieldState, Simplify } from "./types"; | ||
/** | ||
* An individual image within an Image field. The base image and each thumbnail | ||
* An individual image within an image field. The base image and each thumbnail | ||
* uses this type. | ||
* | ||
* @typeParam State - State of the field which determines its shape. | ||
* @see {@link ImageField} for a full Image field type. | ||
* @see {@link ImageField} for a full image field type. | ||
*/ | ||
@@ -26,3 +26,3 @@ export type ImageFieldImage<State extends FieldState = FieldState> = State extends "empty" ? EmptyImageFieldImage : FilledImageFieldImage; | ||
/** | ||
* Image Field | ||
* An image field. | ||
* | ||
@@ -29,0 +29,0 @@ * **Note**: Passing `null` to the `ThumbnailNames` parameter is deprecated and |
import type { FieldState } from "./types"; | ||
/** | ||
* A Key text field | ||
* A key text field | ||
* | ||
@@ -5,0 +5,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -7,3 +7,3 @@ import type { AnyRegularField, FieldState } from "./types"; | ||
/** | ||
* Link Types | ||
* Link types | ||
*/ | ||
@@ -33,3 +33,3 @@ export declare const LinkType: { | ||
/** | ||
* Link Field | ||
* A link field. | ||
* | ||
@@ -36,0 +36,0 @@ * @typeParam TypeEnum - Type API ID of the document. |
import type { FieldState } from "./types"; | ||
import type { EmptyLinkField, LinkType } from "./link"; | ||
/** | ||
* Link field that points to media | ||
* A link field that points to media. | ||
* | ||
@@ -10,3 +10,3 @@ * @typeParam State - State of the field which determines its shape. | ||
/** | ||
* Link that points to media | ||
* A link that points to media. | ||
*/ | ||
@@ -13,0 +13,0 @@ export interface FilledLinkToMediaField { |
import type { FieldState } from "./types"; | ||
/** | ||
* A Number field | ||
* A number field. | ||
* | ||
@@ -5,0 +5,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -33,3 +33,3 @@ import type { FieldState } from "./types"; | ||
/** | ||
* Base to be extended by other RT Nodes. | ||
* Base to be extended by other rich text nodes. | ||
*/ | ||
@@ -41,3 +41,3 @@ export interface RTTextNodeBase { | ||
/** | ||
* Rich Text `heading1` node | ||
* Rich text `heading1` node | ||
*/ | ||
@@ -48,3 +48,3 @@ export interface RTHeading1Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading2` node | ||
* Rich text `heading2` node | ||
*/ | ||
@@ -55,3 +55,3 @@ export interface RTHeading2Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading3` node | ||
* Rich text `heading3` node | ||
*/ | ||
@@ -62,3 +62,3 @@ export interface RTHeading3Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading4` node | ||
* Rich text `heading4` node | ||
*/ | ||
@@ -69,3 +69,3 @@ export interface RTHeading4Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading5` node | ||
* Rich text `heading5` node | ||
*/ | ||
@@ -76,3 +76,3 @@ export interface RTHeading5Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading6` node | ||
* Rich text `heading6` node | ||
*/ | ||
@@ -83,3 +83,3 @@ export interface RTHeading6Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `paragraph` node | ||
* Rich text `paragraph` node | ||
*/ | ||
@@ -90,3 +90,3 @@ export interface RTParagraphNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `preformatted` node | ||
* Rich text `preformatted` node | ||
*/ | ||
@@ -97,3 +97,3 @@ export interface RTPreformattedNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `list-item` node | ||
* Rich text `list-item` node | ||
*/ | ||
@@ -104,3 +104,3 @@ export interface RTListItemNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `o-list-item` node for ordered lists | ||
* Rich text `o-list-item` node for ordered lists | ||
*/ | ||
@@ -118,3 +118,3 @@ export interface RTOListItemNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `strong` node | ||
* Rich text `strong` node | ||
*/ | ||
@@ -125,3 +125,3 @@ export interface RTStrongNode extends RTSpanNodeBase { | ||
/** | ||
* Rich Text `embed` node | ||
* Rich text `embed` node | ||
*/ | ||
@@ -132,3 +132,3 @@ export interface RTEmNode extends RTSpanNodeBase { | ||
/** | ||
* Rich Text `label` node | ||
* Rich text `label` node | ||
*/ | ||
@@ -142,3 +142,3 @@ export interface RTLabelNode extends RTSpanNodeBase { | ||
/** | ||
* Rich Text `image` nodes. They could link to other documents, external web | ||
* Rich text `image` nodes. They could link to other documents, external web | ||
* links and media fields | ||
@@ -158,3 +158,3 @@ */ | ||
/** | ||
* Rich Text `embed` node | ||
* Rich text `embed` node | ||
*/ | ||
@@ -166,3 +166,3 @@ export type RTEmbedNode = { | ||
/** | ||
* Rich Text `a` node | ||
* Rich text `a` node | ||
* | ||
@@ -176,3 +176,3 @@ * @see More details: {@link https://prismic.io/docs/rich-text-title#elements-and-styles} | ||
/** | ||
* Rich Text `list` node | ||
* Rich text `list` node | ||
*/ | ||
@@ -184,3 +184,3 @@ export interface RTListNode { | ||
/** | ||
* Rich Text o-lost node | ||
* Rich text o-lost node | ||
*/ | ||
@@ -192,3 +192,3 @@ export interface RTOListNode { | ||
/** | ||
* Rich Text `span` node | ||
* Rich text `span` node | ||
*/ | ||
@@ -199,3 +199,3 @@ export interface RTSpanNode extends RTTextNodeBase { | ||
/** | ||
* Nodes from a Rich Text Field | ||
* Nodes from a rich text field | ||
*/ | ||
@@ -208,18 +208,18 @@ export type RTNode = RTHeading1Node | RTHeading2Node | RTHeading3Node | RTHeading4Node | RTHeading5Node | RTHeading6Node | RTParagraphNode | RTPreformattedNode | RTListItemNode | RTOListItemNode | RTImageNode | RTEmbedNode; | ||
/** | ||
* Rich Text block nodes | ||
* Rich text block nodes | ||
*/ | ||
export type RTBlockNode = RTHeading1Node | RTHeading2Node | RTHeading3Node | RTHeading4Node | RTHeading5Node | RTHeading6Node | RTParagraphNode | RTPreformattedNode | RTListItemNode | RTOListItemNode | RTListNode | RTOListNode | RTImageNode | RTEmbedNode; | ||
/** | ||
* Inline Rich Text Nodes | ||
* Inline rich text nodes | ||
*/ | ||
export type RTInlineNode = RTStrongNode | RTEmNode | RTLabelNode | RTLinkNode; | ||
/** | ||
* All Rich Text nodes | ||
* All rich text nodes | ||
*/ | ||
export type RTAnyNode = RTBlockNode | RTInlineNode | RTSpanNode; | ||
/** | ||
* Rich Text Field | ||
* A rich text field. | ||
* | ||
* @see Rich Text field documentation: {@link https://prismic.io/docs/rich-text-title} | ||
* @see Rich text field documentation: {@link https://prismic.io/docs/rich-text-title} | ||
*/ | ||
export type RichTextField<State extends FieldState = FieldState> = State extends "empty" ? [] : [RTNode, ...RTNode[]]; |
import type { FieldState } from "./types"; | ||
/** | ||
* A Select field | ||
* A select field. | ||
* | ||
@@ -5,0 +5,0 @@ * @typeParam Enum - Selectable options for the field. |
import type { SharedSliceVariation } from "./sharedSliceVariation"; | ||
/** | ||
* Shared Slice | ||
* A shared Slice. | ||
* | ||
@@ -5,0 +5,0 @@ * @see More details: {@link https://prismic.io/docs/slice} |
import type { AnyRegularField } from "./types"; | ||
/** | ||
* A shared Slice variation. | ||
*/ | ||
export interface SharedSliceVariation<Variation = string, PrimaryFields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>, ItemsFields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>> { | ||
@@ -3,0 +6,0 @@ variation: Variation; |
import type { AnyRegularField } from "./types"; | ||
/** | ||
* Slice - Sections of your website | ||
* A Slice - sections of your webpages. | ||
* | ||
@@ -5,0 +5,0 @@ * @see More details: {@link https://prismic.io/docs/slice} |
import type { FieldState } from "./types"; | ||
import type { DateField } from "./date"; | ||
/** | ||
* Simple Timestamp Field | ||
* A timestamp field. | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam State - State of the field which determines its shape. |
import type { FieldState } from "./types"; | ||
import type { RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node } from "./richText"; | ||
/** | ||
* Title Field | ||
* A title field. | ||
* | ||
@@ -6,0 +6,0 @@ * @see Title field documentation: {@link https://prismic.io/docs/rich-text-title} |
@@ -8,3 +8,3 @@ import type { BooleanField } from "./boolean"; | ||
import type { ImageField } from "./image"; | ||
import type { IntegrationFields } from "./integrationFields"; | ||
import type { IntegrationField } from "./integration"; | ||
import type { KeyTextField } from "./keyText"; | ||
@@ -29,3 +29,3 @@ import type { LinkField } from "./link"; | ||
*/ | ||
export type AnyRegularField = TitleField | RichTextField | ImageField | ContentRelationshipField | LinkField | LinkToMediaField | EmbedField | DateField | TimestampField | ColorField | NumberField | KeyTextField | SelectField | BooleanField | GeoPointField | IntegrationFields; | ||
export type AnyRegularField = TitleField | RichTextField | ImageField | ContentRelationshipField | LinkField | LinkToMediaField | EmbedField | DateField | TimestampField | ColorField | NumberField | KeyTextField | SelectField | BooleanField | GeoPointField | IntegrationField; | ||
/** | ||
@@ -32,0 +32,0 @@ * Useful to flatten the type output to improve type hints shown in editors. And |
@@ -25,3 +25,3 @@ import { WebhookBodyBase, WebhookType } from "./types"; | ||
/** | ||
* Metadata representing a mask (also called a Custom Type). | ||
* Metadata representing a mask (also called a custom type). | ||
* | ||
@@ -28,0 +28,0 @@ * @see More details: {@link https://prismic.io/docs/custom-types} |
{ | ||
"name": "@prismicio/client", | ||
"version": "7.0.0-alpha.5", | ||
"version": "7.0.0", | ||
"description": "The official JavaScript + TypeScript client library for Prismic", | ||
@@ -61,3 +61,3 @@ "keywords": [ | ||
"@prismicio/mock": "^0.2.0", | ||
"@prismicio/types-internal": "^1.5.3", | ||
"@prismicio/types-internal": "2.0.0-alpha.11", | ||
"@size-limit/preset-small-lib": "^8.2.4", | ||
@@ -64,0 +64,0 @@ "@trivago/prettier-plugin-sort-imports": "^4.1.1", |
@@ -56,3 +56,3 @@ import { castArray } from "./lib/castArray"; | ||
/** | ||
* The Custom Type of the document. | ||
* The custom type of the document. | ||
*/ | ||
@@ -188,4 +188,4 @@ type: string; | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -210,3 +210,3 @@ * | ||
/** | ||
* Ref used to populate Integration Fields with the latest content. | ||
* Ref used to populate integration fields with the latest content. | ||
* | ||
@@ -213,0 +213,0 @@ * {@link https://prismic.io/docs/integration-fields} |
@@ -237,3 +237,3 @@ import { appendFilters } from "./lib/appendFilters"; | ||
/** | ||
* A list of Route Resolver objects that define how a document's `url` field | ||
* A list of route resolver objects that define how a document's `url` property | ||
* is resolved. | ||
@@ -247,4 +247,4 @@ * | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -332,3 +332,3 @@ * | ||
/** | ||
* A fallback URL if the Link Resolver does not return a value. | ||
* A fallback URL if the link resolver does not return a value. | ||
*/ | ||
@@ -421,3 +421,3 @@ defaultURL: string; | ||
/** | ||
* A list of Route Resolver objects that define how a document's `url` field | ||
* A list of route resolver objects that define how a document's `url` field | ||
* is resolved. | ||
@@ -431,4 +431,4 @@ * | ||
* The `brokenRoute` option allows you to define the route populated in the | ||
* `url` property for broken Link or Content Relationship fields. A broken | ||
* link is a Link or Content Relationship field whose linked document has been | ||
* `url` property for broken link or content relationship fields. A broken | ||
* link is a link or content relationship field whose linked document has been | ||
* unpublished or deleted. | ||
@@ -743,3 +743,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -774,3 +774,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -811,3 +811,3 @@ * | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -839,3 +839,3 @@ * | ||
* Queries a document from the Prismic repository with a specific UID and | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -846,3 +846,3 @@ * @remarks | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -855,3 +855,3 @@ * | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uid - UID of the document. | ||
@@ -887,3 +887,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -899,3 +899,3 @@ * | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uids - A list of document UIDs. | ||
@@ -925,3 +925,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* Queries all documents from the Prismic repository with specific UIDs and | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -935,3 +935,3 @@ * This method may make multiple network requests to query all matching | ||
* provided in the Prismic editor and is unique among all documents of its | ||
* Custom Type. | ||
* custom type. | ||
* @example | ||
@@ -947,3 +947,3 @@ * | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the document's Custom Type. | ||
* @param documentType - The API ID of the document's custom type. | ||
* @param uids - A list of document UIDs. | ||
@@ -974,3 +974,3 @@ * @param params - Parameters to filter, sort, and paginate the results. | ||
* Queries a singleton document from the Prismic repository for a specific | ||
* Custom Type. | ||
* custom type. | ||
* | ||
@@ -980,3 +980,3 @@ * @remarks | ||
* instance. For example, a repository may be configured to contain just one | ||
* Settings document. This is in contrast to a repeatable Custom Type which | ||
* Settings document. This is in contrast to a repeatable custom type which | ||
* allows multiple instances of itself. | ||
@@ -990,6 +990,6 @@ * @example | ||
* @typeParam TDocument - Type of the Prismic document returned. | ||
* @param documentType - The API ID of the singleton Custom Type. | ||
* @param documentType - The API ID of the singleton custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns The singleton document for the Custom Type, if a matching document | ||
* @returns The singleton document for the custom type, if a matching document | ||
* exists. | ||
@@ -1010,6 +1010,6 @@ */ | ||
/** | ||
* Queries documents from the Prismic repository for a specific Custom Type. | ||
* Queries documents from the Prismic repository for a specific custom type. | ||
* | ||
* Use `getAllByType` instead if you need to query all documents for a | ||
* specific Custom Type. | ||
* specific custom type. | ||
* | ||
@@ -1023,6 +1023,6 @@ * @example | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the Custom Type. | ||
* @param documentType - The API ID of the custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns A paginated response containing documents of the Custom Type. | ||
* @returns A paginated response containing documents of the custom type. | ||
*/ | ||
@@ -1055,6 +1055,6 @@ async getByType< | ||
* @typeParam TDocument - Type of Prismic documents returned. | ||
* @param documentType - The API ID of the Custom Type. | ||
* @param documentType - The API ID of the custom type. | ||
* @param params - Parameters to filter, sort, and paginate the results. | ||
* | ||
* @returns A list of all documents of the Custom Type. | ||
* @returns A list of all documents of the custom type. | ||
*/ | ||
@@ -1061,0 +1061,0 @@ async getAllByType< |
@@ -180,3 +180,3 @@ /** | ||
* | ||
* This filter will only work for a GeoPoint field. | ||
* This filter will only work for a geopoint field. | ||
* | ||
@@ -183,0 +183,0 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#geopointnear} |
@@ -12,5 +12,5 @@ import type { DateField } from "../types/value/date"; | ||
/** | ||
* Transforms a Date or Timestamp field into a JavaScript Date object | ||
* Transforms a date or timestamp field into a JavaScript Date object | ||
* | ||
* @param dateOrTimestampField - A Date or Timestamp field from Prismic | ||
* @param dateOrTimestampField - A date or timestamp field from Prismic | ||
* | ||
@@ -17,0 +17,0 @@ * @returns A Date object, null if provided date is falsy |
@@ -25,3 +25,3 @@ import { | ||
/** | ||
* Serializes a node from a Rich Text or Title field with a function to HTML. | ||
* Serializes a node from a rich text or title field with a function to HTML. | ||
* | ||
@@ -32,3 +32,3 @@ * Unlike a typical `@prismicio/richtext` function serializer, this serializer | ||
* | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -44,3 +44,3 @@ export type HTMLRichTextFunctionSerializer = ( | ||
/** | ||
* Serializes a node from a Rich Text or Title field with a map to HTML | ||
* Serializes a node from a rich text or title field with a map to HTML | ||
* | ||
@@ -51,3 +51,3 @@ * Unlike a typical `@prismicio/richtext` map serializer, this serializer | ||
* | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -70,3 +70,3 @@ export type HTMLRichTextMapSerializer = { | ||
* | ||
* @typeParam BlockName - The serializer's Rich Text block type. | ||
* @typeParam BlockName - The serializer's rich text block type. | ||
*/ | ||
@@ -114,6 +114,6 @@ type HTMLRichTextMapSerializerFunction< | ||
/** | ||
* Serializes a node from a Rich Text or Title field with a map or a function to HTML | ||
* Serializes a node from a rich text or title field with a map or a function to HTML | ||
* | ||
* @see {@link HTMLRichTextMapSerializer} and {@link HTMLRichTextFunctionSerializer} | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -125,3 +125,3 @@ export type HTMLRichTextSerializer = | ||
/** | ||
* Creates a default HTML Rich Text Serializer with a given Link Resolver providing | ||
* Creates a default HTML rich text serializer with a given link resolver providing | ||
* sensible and safe defaults for every node type | ||
@@ -221,3 +221,3 @@ * | ||
/** | ||
* An optional Rich Text Serializer, unhandled cases will fallback to the default serializer | ||
* An optional rich text serializer, unhandled cases will fallback to the default serializer | ||
*/ | ||
@@ -245,9 +245,9 @@ serializer?: HTMLRichTextSerializer | null; | ||
/** | ||
* Serializes a Rich Text or Title field to an HTML string. | ||
* Serializes a rich text or title field to an HTML string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param config - Configuration that determines the output of `asHTML()` | ||
* | ||
* @returns HTML equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns HTML equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -260,12 +260,12 @@ <Field extends RichTextField | null | undefined>( | ||
/** | ||
* Serializes a Rich Text or Title field to an HTML string. | ||
* Serializes a rich text or title field to an HTML string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param linkResolver - An optional link resolver function to resolve links, | ||
* without it you're expected to use the `routes` options from the API | ||
* @param serializer - An optional Rich Text Serializer, unhandled cases will fallback | ||
* @param serializer - An optional rich text serializer, unhandled cases will fallback | ||
* to the default serializer | ||
* | ||
* @returns HTML equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns HTML equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* | ||
@@ -272,0 +272,0 @@ * @deprecated Use object-style configuration instead. |
@@ -33,3 +33,3 @@ import { | ||
/** | ||
* The Image field's image URL with Imgix URL parameters (if given). | ||
* The image field's image URL with Imgix URL parameters (if given). | ||
*/ | ||
@@ -39,3 +39,3 @@ src: string; | ||
/** | ||
* A pixel-densitye-based `srcset` attribute value for the Image field's | ||
* A pixel-densitye-based `srcset` attribute value for the image field's | ||
* image with Imgix URL parameters (if given). | ||
@@ -48,3 +48,3 @@ */ | ||
/** | ||
* Creates a pixel-density-based `srcset` from an Image field with optional | ||
* Creates a pixel-density-based `srcset` from an image field with optional | ||
* image transformations (via Imgix URL parameters). | ||
@@ -74,4 +74,4 @@ * | ||
* | ||
* @returns A `srcset` attribute value for the Image field with Imgix URL | ||
* parameters (if given). If the Image field is empty, `null` is returned. | ||
* @returns A `srcset` attribute value for the image field with Imgix URL | ||
* parameters (if given). If the image field is empty, `null` is returned. | ||
* @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering | ||
@@ -78,0 +78,0 @@ */ |
@@ -14,3 +14,3 @@ import { ImgixURLParams, buildURL } from "imgix-url-builder"; | ||
/** | ||
* Returns the URL of an Image field with optional image transformations (via | ||
* Returns the URL of an image field with optional image transformations (via | ||
* Imgix URL parameters). | ||
@@ -29,4 +29,4 @@ * | ||
* | ||
* @returns The Image field's image URL with transformations applied (if given). | ||
* If the Image field is empty, `null` is returned. | ||
* @returns The image field's image URL with transformations applied (if given). | ||
* If the image field is empty, `null` is returned. | ||
* @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering | ||
@@ -33,0 +33,0 @@ */ |
@@ -24,3 +24,3 @@ import { | ||
/** | ||
* The Image field's image URL with Imgix URL parameters (if given). | ||
* The image field's image URL with Imgix URL parameters (if given). | ||
*/ | ||
@@ -30,3 +30,3 @@ src: string; | ||
/** | ||
* A width-based `srcset` attribute value for the Image field's image with | ||
* A width-based `srcset` attribute value for the image field's image with | ||
* Imgix URL parameters (if given). | ||
@@ -46,3 +46,3 @@ */ | ||
/** | ||
* Creates a width-based `srcset` from an Image field with optional image | ||
* Creates a width-based `srcset` from an image field with optional image | ||
* transformations (via Imgix URL parameters). | ||
@@ -53,3 +53,3 @@ * | ||
* | ||
* If the Image field contains responsive views, each responsive view can be | ||
* If the image field contains responsive views, each responsive view can be | ||
* used as a width in the resulting `srcset` by passing `"thumbnails"` as the | ||
@@ -79,4 +79,4 @@ * `widths` parameter. | ||
* | ||
* @returns A `srcset` attribute value for the Image field with Imgix URL | ||
* parameters (if given). If the Image field is empty, `null` is returned. | ||
* @returns A `srcset` attribute value for the image field with Imgix URL | ||
* parameters (if given). If the image field is empty, `null` is returned. | ||
* @see Imgix URL parameters reference: https://docs.imgix.com/apis/rendering | ||
@@ -83,0 +83,0 @@ */ |
@@ -9,7 +9,7 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship"; | ||
/** | ||
* Resolves a Link to a Prismic document to a URL | ||
* Resolves a link to a Prismic document to a URL | ||
* | ||
* @typeParam ReturnType - Return type of your link resolver function, useful if | ||
* you prefer to return a complex object | ||
* @param linkToDocumentField - A document Link Field to resolve | ||
* @param linkToDocumentField - A document link field to resolve | ||
* | ||
@@ -29,3 +29,3 @@ * @returns Resolved URL | ||
/** | ||
* An optional Link Resolver function. Without it, you are | ||
* An optional link resolver function. Without it, you are | ||
* expected to use the `routes` options from the API. | ||
@@ -67,12 +67,12 @@ */ | ||
/** | ||
* Resolves any type of Link field or Prismic document to a URL. | ||
* Resolves any type of link field or Prismic document to a URL. | ||
* | ||
* @typeParam LinkResolverFunctionReturnType - Link Resolver function return | ||
* @typeParam LinkResolverFunctionReturnType - link resolver function return | ||
* type | ||
* @typeParam Field - Link field or Prismic document to resolve to a URL | ||
* @param linkFieldOrDocument - Any kind of Link field or a document to resolve | ||
* @param linkFieldOrDocument - Any kind of link field or a document to resolve | ||
* @param config - Configuration that determines the output of `asLink()` | ||
* | ||
* @returns Resolved URL or, if the provided Link field or document is empty, `null` | ||
* @see Prismic Link Resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @returns Resolved URL or, if the provided link field or document is empty, `null` | ||
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} | ||
@@ -93,13 +93,13 @@ */ | ||
/** | ||
* Resolves any type of Link field or Prismic document to a URL. | ||
* Resolves any type of link field or Prismic document to a URL. | ||
* | ||
* @typeParam LinkResolverFunctionReturnType - Link Resolver function return | ||
* @typeParam LinkResolverFunctionReturnType - link resolver function return | ||
* type | ||
* @typeParam Field - Link field or Prismic document to resolve to a URL | ||
* @param linkFieldOrDocument - Any kind of Link field or a document to resolve | ||
* @param linkResolver - An optional Link Resolver function. Without it, you are | ||
* @param linkFieldOrDocument - Any kind of link field or a document to resolve | ||
* @param linkResolver - An optional link resolver function. Without it, you are | ||
* expected to use the `routes` options from the API | ||
* | ||
* @returns Resolved URL or, if the provided Link field or document is empty, `null` | ||
* @see Prismic Link Resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @returns Resolved URL or, if the provided link field or document is empty, `null` | ||
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} | ||
@@ -143,3 +143,3 @@ * | ||
// Converts document to Link Field if needed | ||
// Converts document to link field if needed | ||
const linkField = | ||
@@ -180,3 +180,3 @@ // prettier-ignore | ||
if ("id" in linkField && config.linkResolver) { | ||
// When using Link Resolver... | ||
// When using link resolver... | ||
const resolvedURL = config.linkResolver(linkField); | ||
@@ -193,3 +193,3 @@ | ||
if ("url" in linkField && linkField.url) { | ||
// When using Route Resolver... | ||
// When using route resolver... | ||
return linkField.url as AsLinkReturnType< | ||
@@ -201,3 +201,3 @@ LinkResolverFunctionReturnType, | ||
// When empty or Link Resolver and Route Resolver are not used... | ||
// When empty or link resolver and route resolver are not used... | ||
return null as AsLinkReturnType<LinkResolverFunctionReturnType, Field>; | ||
@@ -204,0 +204,0 @@ } |
@@ -69,14 +69,14 @@ import { isInternalURL } from "../lib/isInternalURL"; | ||
/** | ||
* Resolves any type of Link field or Prismic document to a set of link attributes. The attributes are designed to be passed to link HTML elements, like `<a>`. | ||
* Resolves any type of link field or Prismic document to a set of link attributes. The attributes are designed to be passed to link HTML elements, like `<a>`. | ||
* | ||
* If a resolved URL is external (i.e. starts with a protocol like `https://`), `rel` is returned as `"noreferrer"`. | ||
* | ||
* @typeParam LinkResolverFunctionReturnType - Link Resolver function return | ||
* @typeParam LinkResolverFunctionReturnType - link resolver function return | ||
* type | ||
* @typeParam Field - Link field or Prismic document to resolve to link attributes | ||
* @param linkFieldOrDocument - Any kind of Link field or a document to resolve | ||
* @param linkFieldOrDocument - Any kind of link field or a document to resolve | ||
* @param config - Configuration that determines the output of `asLinkAttrs()` | ||
* | ||
* @returns Resolved set of link attributes or, if the provided Link field or document is empty, and empty object | ||
* @see Prismic Link Resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @returns Resolved set of link attributes or, if the provided link field or document is empty, and empty object | ||
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver} | ||
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver} | ||
@@ -83,0 +83,0 @@ */ |
@@ -31,9 +31,9 @@ import { asText as baseAsText } from "@prismicio/richtext"; | ||
/** | ||
* Serializes a Rich Text or Title field to a plain text string. | ||
* Serializes a rich text or title field to a plain text string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param config - Configuration that determines the output of `asText()` | ||
* | ||
* @returns Plain text equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns Plain text equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
*/ | ||
@@ -46,9 +46,9 @@ <Field extends RichTextField | null | undefined>( | ||
/** | ||
* Serializes a Rich Text or Title field to a plain text string. | ||
* Serializes a rich text or title field to a plain text string. | ||
* | ||
* @param richTextField - A Rich Text or Title field from Prismic | ||
* @param richTextField - A rich text or title field from Prismic | ||
* @param separator - Separator used to join each element, defaults to a space | ||
* | ||
* @returns Plain text equivalent of the provided Rich Text or Title field | ||
* @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* @returns Plain text equivalent of the provided rich text or title field | ||
* @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title} | ||
* | ||
@@ -55,0 +55,0 @@ * @deprecated Use object-style configuration instead. |
@@ -35,3 +35,3 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship"; | ||
url: prismicDocument.url == null ? undefined : prismicDocument.url, | ||
slug: prismicDocument.slugs?.[0], // Slug field is not available with GraphQl | ||
slug: prismicDocument.slugs?.[0], // Slug field is not available with GraphQL | ||
// The REST API does not include a `data` property if the data | ||
@@ -38,0 +38,0 @@ // object is empty. |
@@ -8,3 +8,3 @@ import type { ColorField } from "../types/value/color"; | ||
import type { ImageField, ImageFieldImage } from "../types/value/image"; | ||
import type { IntegrationFields } from "../types/value/integrationFields"; | ||
import type { IntegrationField } from "../types/value/integration"; | ||
import type { KeyTextField } from "../types/value/keyText"; | ||
@@ -48,5 +48,5 @@ import type { LinkField } from "../types/value/link"; | ||
/** | ||
* Determines if a Rich Text field is filled. | ||
* Determines if a rich text field is filled. | ||
* | ||
* @param field - Rich Text field to check. | ||
* @param field - rich text field to check. | ||
* | ||
@@ -68,3 +68,3 @@ * @returns `true` if `field` is filled, `false` otherwise. | ||
/** | ||
* Determines if a Title field is filled. | ||
* Determines if a title field is filled. | ||
* | ||
@@ -93,3 +93,3 @@ * @param field - Title field to check. | ||
/** | ||
* Determines if an Image field is filled. | ||
* Determines if an image field is filled. | ||
* | ||
@@ -107,3 +107,3 @@ * @param field - Image field to check. | ||
/** | ||
* Determines if a Link field is filled. | ||
* Determines if a link field is filled. | ||
* | ||
@@ -127,5 +127,5 @@ * @param field - Link field to check. | ||
/** | ||
* Determines if a Link to Media field is filled. | ||
* Determines if a link to media field is filled. | ||
* | ||
* @param field - Link to Media field to check. | ||
* @param field - Link to media field to check. | ||
* | ||
@@ -139,3 +139,3 @@ * @returns `true` if `field` is filled, `false` otherwise. | ||
/** | ||
* Determines if a Content Relationship field is filled. | ||
* Determines if a content relationship field is filled. | ||
* | ||
@@ -165,3 +165,3 @@ * @param field - Content Relationship field to check. | ||
/** | ||
* Determines if a Date field is filled. | ||
* Determines if a date field is filled. | ||
* | ||
@@ -177,3 +177,3 @@ * @param field - Date field to check. | ||
/** | ||
* Determines if a Timestamp field is filled. | ||
* Determines if a timestamp field is filled. | ||
* | ||
@@ -189,3 +189,3 @@ * @param field - Timestamp field to check. | ||
/** | ||
* Determines if a Color field is filled. | ||
* Determines if a color field is filled. | ||
* | ||
@@ -201,3 +201,3 @@ * @param field - Color field to check. | ||
/** | ||
* Determines if a Number field is filled. | ||
* Determines if a number field is filled. | ||
* | ||
@@ -213,3 +213,3 @@ * @param field - Number field to check. | ||
/** | ||
* Determines if a Key Text field is filled. | ||
* Determines if a key text field is filled. | ||
* | ||
@@ -227,3 +227,3 @@ * @param field - Key Text field to check. | ||
/** | ||
* Determines if a Select field is filled. | ||
* Determines if a select field is filled. | ||
* | ||
@@ -239,3 +239,3 @@ * @param field - Select field to check. | ||
/** | ||
* Determines if an Embed field is filled. | ||
* Determines if an embed field is filled. | ||
* | ||
@@ -253,3 +253,3 @@ * @param field - Embed field to check. | ||
/** | ||
* Determines if a GeoPoint field is filled. | ||
* Determines if a geopoint field is filled. | ||
* | ||
@@ -267,13 +267,18 @@ * @param field - GeoPoint field to check. | ||
/** | ||
* Determines if an Integration Fields field is filled. | ||
* Determines if an integration field is filled. | ||
* | ||
* @param field - Integration Fields field to check. | ||
* @param field - Integration field to check. | ||
* | ||
* @returns `true` if `field` is filled, `false` otherwise. | ||
*/ | ||
export const integrationFields = isNonNullish as < | ||
export const integrationField = isNonNullish as < | ||
Data extends Record<string, unknown>, | ||
>( | ||
field: IntegrationFields<Data> | null | undefined, | ||
) => field is IntegrationFields<Data, "filled">; | ||
field: IntegrationField<Data> | null | undefined, | ||
) => field is IntegrationField<Data, "filled">; | ||
/** | ||
* @deprecated Renamed to `integrationField`. | ||
*/ | ||
// TODO: Remove when we remove support for deprecated `integrationFields` export. | ||
export const integrationFields = integrationField; | ||
@@ -280,0 +285,0 @@ /** |
@@ -1,2 +0,5 @@ | ||
// Use for deprecations. | ||
// Imports are used for deprecations. | ||
import type { CustomTypeModelIntegrationField } from "./types/model/integration"; | ||
import type { IntegrationField } from "./types/value/integration"; | ||
import type { | ||
@@ -199,3 +202,8 @@ HTMLRichTextFunctionSerializer, | ||
export type { IntegrationFields } from "./types/value/integrationFields"; | ||
/** | ||
* @deprecated Renamed to `IntegrationField` | ||
*/ | ||
// TODO: Remove when we remove support for deprecated `IntegrationFields` export. | ||
type IntegrationFields = IntegrationField; | ||
export { IntegrationField, IntegrationFields }; | ||
@@ -251,3 +259,11 @@ export type { GroupField } from "./types/value/group"; | ||
export type { CustomTypeModelIntegrationFieldsField } from "./types/model/integrationFields"; | ||
/** | ||
* @deprecated Renamed to `CustomTypeModelIntegrationField`. | ||
*/ | ||
// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export. | ||
type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField; | ||
export { | ||
CustomTypeModelIntegrationField, | ||
CustomTypeModelIntegrationFieldsField, | ||
}; | ||
export type { CustomTypeModelGroupField } from "./types/model/group"; | ||
@@ -254,0 +270,0 @@ export type { |
@@ -18,3 +18,3 @@ import { Ref } from "./ref"; | ||
/** | ||
* An identifier used to query content with the latest Integration Fields | ||
* An identifier used to query content with the latest integration fields | ||
* data. | ||
@@ -32,3 +32,3 @@ */ | ||
/** | ||
* A list of the repository's Custom Type API IDs mapped to their | ||
* A list of the repository's custom type API IDs mapped to their | ||
* human-readable name. | ||
@@ -35,0 +35,0 @@ */ |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Boolean Custom Type field. | ||
* A boolean custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/boolean} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Color Custom Type field. | ||
* A color custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/color} |
@@ -6,3 +6,3 @@ import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Content Relationship Custom Type field. | ||
* A content relationship custom type field. | ||
* | ||
@@ -9,0 +9,0 @@ * More details: |
import { CustomTypeModelField } from "./types"; | ||
/** | ||
* A Prismic Custom Type model. | ||
* A Prismic custom type model. | ||
* | ||
* @typeParam ID - API ID of the Custom Type. | ||
* @typeParam Definition - The Custom Type's tabs and their fields. | ||
* @typeParam ID - API ID of the custom type. | ||
* @typeParam Definition - The custom type's tabs and their fields. | ||
*/ | ||
@@ -14,3 +14,3 @@ export interface CustomTypeModel< | ||
/** | ||
* The ID of the Custom Type model. | ||
* The ID of the custom type model. | ||
*/ | ||
@@ -20,3 +20,3 @@ id: ID; | ||
/** | ||
* The human readable name of the Custom Type Model. | ||
* The human readable name of the custom type model. | ||
*/ | ||
@@ -27,3 +27,3 @@ // TODO: Revert to `label?: string | null` if `label` can be partial in: https://github.com/prismicio/prismic-types-internal/blob/HEAD/src/customtypes/CustomType.ts#L39 | ||
/** | ||
* Determines if more than one document for the Custom Type can be created. | ||
* Determines if more than one document for the custom type can be created. | ||
*/ | ||
@@ -33,3 +33,3 @@ repeatable: boolean; | ||
/** | ||
* The Custom Type model definition. | ||
* The custom type model definition. | ||
*/ | ||
@@ -39,3 +39,3 @@ json: Definition; | ||
/** | ||
* Determines if new documents for the Custom Type can be created. | ||
* Determines if new documents for the custom type can be created. | ||
*/ | ||
@@ -46,5 +46,5 @@ status: boolean; | ||
/** | ||
* A Prismic Custom Type's tabs and their fields. | ||
* A Prismic custom type's tabs and their fields. | ||
* | ||
* @typeParam TabName - Names of Custom Type tabs. | ||
* @typeParam TabName - Names of custom type tabs. | ||
*/ | ||
@@ -57,3 +57,3 @@ export type CustomTypeModelDefinition<TabName extends string = string> = Record< | ||
/** | ||
* A Custom Type's tab. Each tab can contain any number of fields but is limited | ||
* A custom type's tab. Each tab can contain any number of fields but is limited | ||
* to one Slice Zone. | ||
@@ -60,0 +60,0 @@ * |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Date Custom Type field. | ||
* A date custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/date} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* An Embed Custom Type field. | ||
* An embed custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/embed} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A GeoPoint Custom Type field. | ||
* A geopoint custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/geopoint} |
@@ -7,3 +7,3 @@ import type { | ||
/** | ||
* A Group Custom Type field. | ||
* A group custom type field. | ||
* | ||
@@ -10,0 +10,0 @@ * More details: {@link https://prismic.io/docs/group} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* Dimension constraints for an Image Custom Type field. | ||
* Dimension constraints for an image custom type field. | ||
* | ||
@@ -14,3 +14,3 @@ * More details: {@link https://prismic.io/docs/image} | ||
/** | ||
* A thumbnail for an Image Custom Type field. | ||
* A thumbnail for an image custom type field. | ||
* | ||
@@ -25,3 +25,3 @@ * More details: {@link https://prismic.io/docs/image} | ||
/** | ||
* An Image Custom Type field. | ||
* An image custom type field. | ||
* | ||
@@ -28,0 +28,0 @@ * More details: {@link https://prismic.io/docs/image} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Key Text Custom Type field. | ||
* A key text custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/key-text} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Link Custom Type field. | ||
* A link custom type field. | ||
* | ||
@@ -22,3 +22,3 @@ * More details: | ||
/** | ||
* Type of a Link Custom Type field. | ||
* Type of a link custom type field. | ||
* | ||
@@ -25,0 +25,0 @@ * More details: |
@@ -6,3 +6,3 @@ import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Link to Media Custom Type field. | ||
* A link to media custom type field. | ||
* | ||
@@ -9,0 +9,0 @@ * More details: |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Number Custom Type field. | ||
* A number custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/number} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Rich Text Custom Type field. | ||
* A rich text custom type field. | ||
* | ||
@@ -13,3 +13,3 @@ * More details: {@link https://prismic.io/docs/rich-text-title} | ||
/** | ||
* A Rich Text Custom Type field which supports multiple blocks of content. | ||
* A rich text custom type field which supports multiple blocks of content. | ||
* | ||
@@ -29,3 +29,3 @@ * More details: {@link https://prismic.io/docs/rich-text-title} | ||
/** | ||
* A Rich Text Custom Type field which supports one block of content. | ||
* A rich text custom type field which supports one block of content. | ||
* | ||
@@ -32,0 +32,0 @@ * More details: {@link https://prismic.io/docs/rich-text-title} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Select Custom Type field. | ||
* A select custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/select} |
@@ -5,7 +5,7 @@ import type { SharedSliceModelVariation } from "./sharedSliceVariation"; | ||
/** | ||
* A Prismic Shared Slice model. | ||
* A Prismic shared Slice model. | ||
* | ||
* More details: {@link https://prismic.io/docs/slice} | ||
* | ||
* @typeParam Variation - A variation for the Shared Slice. | ||
* @typeParam Variation - A variation for the shared Slice. | ||
*/ | ||
@@ -12,0 +12,0 @@ export interface SharedSliceModel< |
import type { CustomTypeModelFieldForGroup } from "./types"; | ||
/** | ||
* A Shared Slice variation. | ||
* A shared Slice variation. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/slice} |
@@ -7,3 +7,3 @@ import type { CustomTypeModelFieldForGroup } from "./types"; | ||
/** | ||
* A Slice for a Custom Type. | ||
* A Slice for a custom type. | ||
* | ||
@@ -10,0 +10,0 @@ * More details: {@link https://prismic.io/docs/slice} |
@@ -6,3 +6,3 @@ import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Slice Zone Custom Type field. | ||
* A Slice Zone custom type field. | ||
* | ||
@@ -55,3 +55,3 @@ * More details: {@link https://prismic.io/docs/slice} | ||
/** | ||
* A Shared Slice for a Custom Type. | ||
* A shared Slice for a custom type. | ||
* | ||
@@ -58,0 +58,0 @@ * More details: {@link https://prismic.io/docs/slice} |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A Timestamp Custom Type field. | ||
* A timestamp custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/timestamp} |
import { CustomTypeModelRichTextSingleField } from "./richText"; | ||
/** | ||
* A Title Custom Type field. | ||
* A title custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/rich-text-title} |
@@ -9,3 +9,3 @@ import type { CustomTypeModelBooleanField } from "./boolean"; | ||
import type { CustomTypeModelImageField } from "./image"; | ||
import type { CustomTypeModelIntegrationFieldsField } from "./integrationFields"; | ||
import type { CustomTypeModelIntegrationField } from "./integration"; | ||
import type { CustomTypeModelKeyTextField } from "./keyText"; | ||
@@ -25,3 +25,3 @@ import type { CustomTypeModelLinkField } from "./link"; | ||
/** | ||
* Type identifier for a Custom Type field. | ||
* Type identifier for a custom type field. | ||
*/ | ||
@@ -36,3 +36,3 @@ export const CustomTypeModelFieldType = { | ||
Image: "Image", | ||
IntegrationFields: "IntegrationFields", | ||
Integration: "IntegrationFields", | ||
Link: "Link", | ||
@@ -47,2 +47,6 @@ Number: "Number", | ||
/** | ||
* @deprecated - Renamed to `Integration`. | ||
*/ | ||
IntegrationFields: "IntegrationFields", | ||
/** | ||
* @deprecated - Legacy field type. Use `Number` instead. | ||
@@ -62,3 +66,3 @@ */ | ||
/** | ||
* A Custom Type field. | ||
* A custom type field. | ||
*/ | ||
@@ -72,3 +76,3 @@ export type CustomTypeModelField = | ||
/** | ||
* Any Custom Type field that is valid for a Group field. | ||
* Any custom type field that is valid for a group field. | ||
*/ | ||
@@ -82,3 +86,3 @@ export type CustomTypeModelFieldForGroup = | ||
| CustomTypeModelImageField | ||
| CustomTypeModelIntegrationFieldsField | ||
| CustomTypeModelIntegrationField | ||
| CustomTypeModelContentRelationshipField | ||
@@ -85,0 +89,0 @@ | CustomTypeModelLinkField |
import type { CustomTypeModelFieldType } from "./types"; | ||
/** | ||
* A UID Custom Type field. | ||
* A UID custom type field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/uid} |
/** | ||
* A Boolean field. | ||
* A boolean field. | ||
* | ||
@@ -4,0 +4,0 @@ * @see More details: {@link https://prismic.io/docs/boolean} |
import type { FieldState } from "./types"; | ||
/** | ||
* A Color field. | ||
* A color field. | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -28,3 +28,3 @@ import type { AnyRegularField, FieldState } from "./types"; | ||
/** | ||
* Links that refer to Documents | ||
* Links that refer to documents | ||
*/ | ||
@@ -31,0 +31,0 @@ export interface FilledContentRelationshipField< |
import type { FieldState } from "./types"; | ||
/** | ||
* A Date field. | ||
* A date field. | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -17,3 +17,3 @@ import { AnyRegularField } from "./types"; | ||
/** | ||
* Metadata for Prismic Document | ||
* Metadata for Prismic document | ||
*/ | ||
@@ -80,3 +80,3 @@ export interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> { | ||
* | ||
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types} | ||
* @see More details on custom types: {@link https://prismic.io/docs/custom-types} | ||
*/ | ||
@@ -102,3 +102,3 @@ export interface PrismicDocument< | ||
* | ||
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types} | ||
* @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} | ||
@@ -129,3 +129,3 @@ */ | ||
* | ||
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types} | ||
* @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} | ||
@@ -132,0 +132,0 @@ */ |
@@ -182,3 +182,3 @@ import type { EmptyObjectField, FieldState } from "./types"; | ||
/** | ||
* An Embed field. | ||
* An embed field. | ||
* | ||
@@ -185,0 +185,0 @@ * @typeParam Data - Data provided by the URL's oEmbed provider. |
import type { EmptyObjectField, FieldState } from "./types"; | ||
/** | ||
* A Geopoint field. | ||
* A geopoint field. | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam State - State of the field which determines its shape. |
import type { AnyRegularField, FieldState } from "./types"; | ||
/** | ||
* A Group field. | ||
* A group field. | ||
* | ||
@@ -6,0 +6,0 @@ * More details: {@link https://prismic.io/docs/group} |
import type { FieldState, Simplify } from "./types"; | ||
/** | ||
* An individual image within an Image field. The base image and each thumbnail | ||
* An individual image within an image field. The base image and each thumbnail | ||
* uses this type. | ||
* | ||
* @typeParam State - State of the field which determines its shape. | ||
* @see {@link ImageField} for a full Image field type. | ||
* @see {@link ImageField} for a full image field type. | ||
*/ | ||
@@ -31,3 +31,3 @@ export type ImageFieldImage<State extends FieldState = FieldState> = | ||
/** | ||
* Image Field | ||
* An image field. | ||
* | ||
@@ -49,3 +49,3 @@ * **Note**: Passing `null` to the `ThumbnailNames` parameter is deprecated and | ||
> = | ||
// Simplify is necessary. Without it, Group and Slice types break for | ||
// Simplify is necessary. Without it, group and Slice types break for | ||
// unknown reasons. If you know why, please update this comment with an | ||
@@ -52,0 +52,0 @@ // explanation. :) |
import type { FieldState } from "./types"; | ||
/** | ||
* A Key text field | ||
* A key text field | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -9,3 +9,3 @@ import type { AnyRegularField, FieldState } from "./types"; | ||
/** | ||
* Link Types | ||
* Link types | ||
*/ | ||
@@ -40,3 +40,3 @@ export const LinkType = { | ||
/** | ||
* Link Field | ||
* A link field. | ||
* | ||
@@ -43,0 +43,0 @@ * @typeParam TypeEnum - Type API ID of the document. |
@@ -6,3 +6,3 @@ import type { FieldState } from "./types"; | ||
/** | ||
* Link field that points to media | ||
* A link field that points to media. | ||
* | ||
@@ -17,3 +17,3 @@ * @typeParam State - State of the field which determines its shape. | ||
/** | ||
* Link that points to media | ||
* A link that points to media. | ||
*/ | ||
@@ -20,0 +20,0 @@ export interface FilledLinkToMediaField { |
import type { FieldState } from "./types"; | ||
/** | ||
* A Number field | ||
* A number field. | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -38,3 +38,3 @@ import type { FieldState } from "./types"; | ||
/** | ||
* Base to be extended by other RT Nodes. | ||
* Base to be extended by other rich text nodes. | ||
*/ | ||
@@ -47,3 +47,3 @@ export interface RTTextNodeBase { | ||
/** | ||
* Rich Text `heading1` node | ||
* Rich text `heading1` node | ||
*/ | ||
@@ -55,3 +55,3 @@ export interface RTHeading1Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading2` node | ||
* Rich text `heading2` node | ||
*/ | ||
@@ -63,3 +63,3 @@ export interface RTHeading2Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading3` node | ||
* Rich text `heading3` node | ||
*/ | ||
@@ -71,3 +71,3 @@ export interface RTHeading3Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading4` node | ||
* Rich text `heading4` node | ||
*/ | ||
@@ -79,3 +79,3 @@ export interface RTHeading4Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading5` node | ||
* Rich text `heading5` node | ||
*/ | ||
@@ -87,3 +87,3 @@ export interface RTHeading5Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `heading6` node | ||
* Rich text `heading6` node | ||
*/ | ||
@@ -95,3 +95,3 @@ export interface RTHeading6Node extends RTTextNodeBase { | ||
/** | ||
* Rich Text `paragraph` node | ||
* Rich text `paragraph` node | ||
*/ | ||
@@ -103,3 +103,3 @@ export interface RTParagraphNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `preformatted` node | ||
* Rich text `preformatted` node | ||
*/ | ||
@@ -111,3 +111,3 @@ export interface RTPreformattedNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `list-item` node | ||
* Rich text `list-item` node | ||
*/ | ||
@@ -119,3 +119,3 @@ export interface RTListItemNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `o-list-item` node for ordered lists | ||
* Rich text `o-list-item` node for ordered lists | ||
*/ | ||
@@ -136,3 +136,3 @@ export interface RTOListItemNode extends RTTextNodeBase { | ||
/** | ||
* Rich Text `strong` node | ||
* Rich text `strong` node | ||
*/ | ||
@@ -144,3 +144,3 @@ export interface RTStrongNode extends RTSpanNodeBase { | ||
/** | ||
* Rich Text `embed` node | ||
* Rich text `embed` node | ||
*/ | ||
@@ -152,3 +152,3 @@ export interface RTEmNode extends RTSpanNodeBase { | ||
/** | ||
* Rich Text `label` node | ||
* Rich text `label` node | ||
*/ | ||
@@ -165,3 +165,3 @@ export interface RTLabelNode extends RTSpanNodeBase { | ||
/** | ||
* Rich Text `image` nodes. They could link to other documents, external web | ||
* Rich text `image` nodes. They could link to other documents, external web | ||
* links and media fields | ||
@@ -185,3 +185,3 @@ */ | ||
/** | ||
* Rich Text `embed` node | ||
* Rich text `embed` node | ||
*/ | ||
@@ -196,3 +196,3 @@ export type RTEmbedNode = { | ||
/** | ||
* Rich Text `a` node | ||
* Rich text `a` node | ||
* | ||
@@ -212,3 +212,3 @@ * @see More details: {@link https://prismic.io/docs/rich-text-title#elements-and-styles} | ||
/** | ||
* Rich Text `list` node | ||
* Rich text `list` node | ||
*/ | ||
@@ -221,3 +221,3 @@ export interface RTListNode { | ||
/** | ||
* Rich Text o-lost node | ||
* Rich text o-lost node | ||
*/ | ||
@@ -231,3 +231,3 @@ export interface RTOListNode { | ||
/** | ||
* Rich Text `span` node | ||
* Rich text `span` node | ||
*/ | ||
@@ -241,3 +241,3 @@ export interface RTSpanNode extends RTTextNodeBase { | ||
/** | ||
* Nodes from a Rich Text Field | ||
* Nodes from a rich text field | ||
*/ | ||
@@ -274,3 +274,3 @@ export type RTNode = | ||
/** | ||
* Rich Text block nodes | ||
* Rich text block nodes | ||
*/ | ||
@@ -294,3 +294,3 @@ export type RTBlockNode = | ||
/** | ||
* Inline Rich Text Nodes | ||
* Inline rich text nodes | ||
*/ | ||
@@ -300,3 +300,3 @@ export type RTInlineNode = RTStrongNode | RTEmNode | RTLabelNode | RTLinkNode; | ||
/** | ||
* All Rich Text nodes | ||
* All rich text nodes | ||
*/ | ||
@@ -306,7 +306,7 @@ export type RTAnyNode = RTBlockNode | RTInlineNode | RTSpanNode; | ||
/** | ||
* Rich Text Field | ||
* A rich text field. | ||
* | ||
* @see Rich Text field documentation: {@link https://prismic.io/docs/rich-text-title} | ||
* @see Rich text field documentation: {@link https://prismic.io/docs/rich-text-title} | ||
*/ | ||
export type RichTextField<State extends FieldState = FieldState> = | ||
State extends "empty" ? [] : [RTNode, ...RTNode[]]; |
import type { FieldState } from "./types"; | ||
/** | ||
* A Select field | ||
* A select field. | ||
* | ||
@@ -6,0 +6,0 @@ * @typeParam Enum - Selectable options for the field. |
import type { SharedSliceVariation } from "./sharedSliceVariation"; | ||
/** | ||
* Shared Slice | ||
* A shared Slice. | ||
* | ||
@@ -6,0 +6,0 @@ * @see More details: {@link https://prismic.io/docs/slice} |
import type { AnyRegularField } from "./types"; | ||
/** | ||
* A shared Slice variation. | ||
*/ | ||
export interface SharedSliceVariation< | ||
@@ -4,0 +7,0 @@ Variation = string, |
import type { AnyRegularField } from "./types"; | ||
/** | ||
* Slice - Sections of your website | ||
* A Slice - sections of your webpages. | ||
* | ||
@@ -6,0 +6,0 @@ * @see More details: {@link https://prismic.io/docs/slice} |
@@ -6,3 +6,3 @@ import type { FieldState } from "./types"; | ||
/** | ||
* Simple Timestamp Field | ||
* A timestamp field. | ||
* | ||
@@ -9,0 +9,0 @@ * @typeParam State - State of the field which determines its shape. |
@@ -13,3 +13,3 @@ import type { FieldState } from "./types"; | ||
/** | ||
* Title Field | ||
* A title field. | ||
* | ||
@@ -16,0 +16,0 @@ * @see Title field documentation: {@link https://prismic.io/docs/rich-text-title} |
@@ -8,3 +8,3 @@ import type { BooleanField } from "./boolean"; | ||
import type { ImageField } from "./image"; | ||
import type { IntegrationFields } from "./integrationFields"; | ||
import type { IntegrationField } from "./integration"; | ||
import type { KeyTextField } from "./keyText"; | ||
@@ -48,3 +48,3 @@ import type { LinkField } from "./link"; | ||
| GeoPointField | ||
| IntegrationFields; | ||
| IntegrationField; | ||
@@ -51,0 +51,0 @@ /** |
@@ -28,3 +28,3 @@ import { WebhookBodyBase, WebhookType } from "./types"; | ||
/** | ||
* Metadata representing a mask (also called a Custom Type). | ||
* Metadata representing a mask (also called a custom type). | ||
* | ||
@@ -31,0 +31,0 @@ * @see More details: {@link https://prismic.io/docs/custom-types} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
978831
15269
1