New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@prismicio/client

Package Overview
Dependencies
Maintainers
24
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismicio/client - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1-alpha.0

21

dist/buildQueryURL.d.ts

@@ -128,14 +128,14 @@ /**

*
* @remarks Strings and arrays of strings are deprecated as of
* `@prismicio/client@7.0.0`. Please migrate to the more explicit
* array of objects.
*
* @remarks
* Strings and arrays of strings are deprecated as of
* `@prismicio/client@7.0.0`. Please migrate to the more explicit array of
* objects.
* @example
*
* ```typescript
* buildQueryURL(endpoint,{
* orderings: [
* { field: "my.product.price", direction: "desc" },
* { field: "my.product.title" },
* ],
* buildQueryURL(endpoint, {
* orderings: [
* { field: "my.product.price", direction: "desc" },
* { field: "my.product.title" },
* ],
* });

@@ -185,3 +185,4 @@ * ```

/**
* @deprecated Renamed to `filters`. Ensure the value is an array of filters, not a single, non-array filter.
* @deprecated Renamed to `filters`. Ensure the value is an array of filters,
* not a single, non-array filter.
*/

@@ -188,0 +189,0 @@ predicates?: string | string[];

@@ -59,3 +59,4 @@ import type { Query } from "./types/api/query";

*
* See: \<https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\>
* See:
* [https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
*/

@@ -101,2 +102,12 @@ signal?: AbortSignalLike;

/**
* Options or a function that returns options provided to the client's `fetch()`
* on all network requests. These options will be merged with internally
* required options. They can also be overriden on a per-query basis using the
* query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided. This
* function can be asynchronous.
*/
export type RequestInitLikeOrThunk = RequestInitLike | ((url: string, init?: RequestInitLike) => RequestInitLike | undefined | Promise<RequestInitLike | undefined>);
/**
* Configuration for clients that determine how content is queried.

@@ -117,4 +128,4 @@ */

/**
* A list of route resolver objects that define how a document's `url` property
* is resolved.
* A list of route resolver objects that define how a document's `url`
* property is resolved.
*

@@ -145,8 +156,13 @@ * {@link https://prismic.io/docs/route-resolver}

/**
* Options provided to the client's `fetch()` on all network requests.
* These options will be merged with internally required options. They
* can also be overriden on a per-query basis using the query's
* `fetchOptions` parameter.
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
fetchOptions?: RequestInitLike;
fetchOptions?: RequestInitLikeOrThunk;
};

@@ -158,8 +174,13 @@ /**

/**
* Options provided to the client's `fetch()` on all network requests.
* These options will be merged with internally required options. They
* can also be overriden on a per-query basis using the query's
* `fetchOptions` parameter.
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
fetchOptions?: RequestInitLike;
fetchOptions?: RequestInitLikeOrThunk;
/**

@@ -169,11 +190,5 @@ * An `AbortSignal` provided by an `AbortController`. This allows the network

*
* {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}
*
* @deprecated Move the `signal` parameter into `fetchOptions.signal`:
*
* ```typescript
* client.getByUID("page", "home",{
* fetchOptions: { signal }
* });
* ```
* @see \<https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\>
*/

@@ -290,4 +305,15 @@ signal?: AbortSignalLike;

fetchFn: FetchLike;
fetchOptions?: RequestInitLike;
/**
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
fetchOptions?: RequestInitLikeOrThunk;
/**
* Default parameters that will be sent with each query. These parameters can

@@ -389,2 +415,3 @@ * be overridden on each query if needed.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param params - Parameters to filter, sort, and paginate results.

@@ -406,2 +433,3 @@ *

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param params - Parameters to filter, sort, and paginate results. @returns

@@ -429,2 +457,3 @@ * The first result of the query, if any.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param params - Parameters to filter, sort, and paginate results.

@@ -450,2 +479,3 @@ *

* @typeParam TDocument- Type of the Prismic document returned.
*
* @param id - ID of the document.

@@ -476,2 +506,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param ids - A list of document IDs.

@@ -505,2 +536,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param ids - A list of document IDs.

@@ -528,2 +560,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -556,2 +589,3 @@ * @param uid - UID of the document.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -587,2 +621,3 @@ * @param uids - A list of document UIDs.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -611,2 +646,3 @@ * @param uids - A list of document UIDs.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the singleton custom type.

@@ -632,2 +668,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the custom type.

@@ -653,2 +690,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the custom type.

@@ -673,2 +711,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tag - The tag that must be included on a document.

@@ -693,2 +732,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tag - The tag that must be included on a document.

@@ -711,2 +751,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -732,2 +773,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -751,2 +793,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -774,2 +817,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -971,2 +1015,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @returns The `fetch()` Response for the request.
*
* @experimental

@@ -990,2 +1035,3 @@ */

* @returns The repository form.
*
* @throws If a matching form cannot be found.

@@ -1024,2 +1070,3 @@ */

* @typeParam T - The JSON response.
*
* @param url - URL to the resource to fetch.

@@ -1026,0 +1073,0 @@ * @param params - Prismic REST API parameters for the network request.

@@ -89,2 +89,13 @@ var __defProp = Object.defineProperty;

__publicField(this, "fetchFn");
/**
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
__publicField(this, "fetchOptions");

@@ -219,2 +230,3 @@ /**

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param params - Parameters to filter, sort, and paginate results.

@@ -239,2 +251,3 @@ *

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param params - Parameters to filter, sort, and paginate results. @returns

@@ -275,2 +288,3 @@ * The first result of the query, if any.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param params - Parameters to filter, sort, and paginate results.

@@ -314,2 +328,3 @@ *

* @typeParam TDocument- Type of the Prismic document returned.
*
* @param id - ID of the document.

@@ -342,2 +357,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param ids - A list of document IDs.

@@ -373,2 +389,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param ids - A list of document IDs.

@@ -398,2 +415,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -431,2 +449,3 @@ * @param uid - UID of the document.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -467,2 +486,3 @@ * @param uids - A list of document UIDs.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -496,2 +516,3 @@ * @param uids - A list of document UIDs.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the singleton custom type.

@@ -519,2 +540,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the custom type.

@@ -542,2 +564,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the custom type.

@@ -564,2 +587,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tag - The tag that must be included on a document.

@@ -586,2 +610,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tag - The tag that must be included on a document.

@@ -606,2 +631,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -629,2 +655,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -650,2 +677,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -675,2 +703,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -976,2 +1005,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @returns The `fetch()` Response for the request.
*
* @experimental

@@ -1042,2 +1072,3 @@ */

* @returns The repository form.
*
* @throws If a matching form cannot be found.

@@ -1117,2 +1148,3 @@ */

* @typeParam T - The JSON response.
*
* @param url - URL to the resource to fetch.

@@ -1124,11 +1156,12 @@ * @param params - Prismic REST API parameters for the network request.

async fetch(url, params = {}) {
var _a, _b, _c, _d;
const paramsFetchOptions = await castThunk(params.fetchOptions)(url);
const thisFetchOptions = await castThunk(this.fetchOptions)(url, paramsFetchOptions);
const requestInit = {
...this.fetchOptions,
...params.fetchOptions,
...paramsFetchOptions,
...thisFetchOptions,
headers: {
...(_a = this.fetchOptions) == null ? void 0 : _a.headers,
...(_b = params.fetchOptions) == null ? void 0 : _b.headers
...paramsFetchOptions == null ? void 0 : paramsFetchOptions.headers,
...thisFetchOptions == null ? void 0 : thisFetchOptions.headers
},
signal: ((_c = params.fetchOptions) == null ? void 0 : _c.signal) || params.signal || ((_d = this.fetchOptions) == null ? void 0 : _d.signal)
signal: (paramsFetchOptions == null ? void 0 : paramsFetchOptions.signal) || params.signal || (thisFetchOptions == null ? void 0 : thisFetchOptions.signal)
};

@@ -1135,0 +1168,0 @@ let job;

export declare const filter: {
/**
* The `at` filter checks that the path matches the described value
* exactly. It takes a single value for a field or an array (only for tags).
* The `at` filter checks that the path matches the described value exactly.
* It takes a single value for a field or an array (only for tags).
*

@@ -17,4 +17,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#at}

/**
* The `any` filter takes an array of values. It works exactly the same way
* as the `at` operator, but checks whether the fragment matches any of the
* The `any` filter takes an array of values. It works exactly the same way as
* the `at` operator, but checks whether the fragment matches any of the
* values in the array.

@@ -26,5 +26,5 @@ *

/**
* The `in` filter is used specifically to retrieve an array of documents
* by their IDs or UIDs. This filter is much more efficient at this than
* the any filter.
* The `in` filter is used specifically to retrieve an array of documents by
* their IDs or UIDs. This filter is much more efficient at this than the any
* filter.
*

@@ -46,5 +46,5 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#in}

/**
* The `has` filter checks whether a fragment has a value. It will return
* all the documents of the specified type that contain a value for the
* specified field.
* The `has` filter checks whether a fragment has a value. It will return all
* the documents of the specified type that contain a value for the specified
* field.
*

@@ -71,4 +71,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#has}

/**
* The `geopoint.near` filter checks that the value in the path is within
* the radius of the given coordinates.
* The `geopoint.near` filter checks that the value in the path is within the
* radius of the given coordinates.
*

@@ -88,4 +88,4 @@ * This filter will only work for a geopoint field.

/**
* The `number.gt` filter checks that the value in the number field is
* greater than the value passed into the filter.
* The `number.gt` filter checks that the value in the number field is greater
* than the value passed into the filter.
*

@@ -96,4 +96,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#numbergreaterthan}

/**
* The `number.inRange` filter checks that the value in the path is within
* the two values passed into the filter.
* The `number.inRange` filter checks that the value in the path is within the
* two values passed into the filter.
*

@@ -104,4 +104,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#numberinrange}

/**
* The `date.after` filter checks that the value in the path is after the
* date value passed into the filter.
* The `date.after` filter checks that the value in the path is after the date
* value passed into the filter.
*

@@ -119,4 +119,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.between` filter checks that the value in the path is within
* the date values passed into the filter.
* The `date.between` filter checks that the value in the path is within the
* date values passed into the filter.
*

@@ -127,4 +127,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month` filter checks that the value in the path is
* equal to the day of the month passed into the filter.
* The `date.day-of-month` filter checks that the value in the path is equal
* to the day of the month passed into the filter.
*

@@ -135,4 +135,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month-after` filter checks that the value in the path
* is after the day of the month passed into the filter.
* The `date.day-of-month-after` filter checks that the value in the path is
* after the day of the month passed into the filter.
*

@@ -143,4 +143,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month-before` filter checks that the value in the path
* is before the day of the month passed into the filter.
* The `date.day-of-month-before` filter checks that the value in the path is
* before the day of the month passed into the filter.
*

@@ -151,4 +151,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-week` filter checks that the value in the path is equal
* to the day of the week passed into the filter.
* The `date.day-of-week` filter checks that the value in the path is equal to
* the day of the week passed into the filter.
*

@@ -180,4 +180,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.month-after` filter checks that the value in the path occurs
* in any month after the value passed into the filter.
* The `date.month-after` filter checks that the value in the path occurs in
* any month after the value passed into the filter.
*

@@ -188,4 +188,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.month-before` filter checks that the value in the path occurs
* in any month before the value passed into the filter.
* The `date.month-before` filter checks that the value in the path occurs in
* any month before the value passed into the filter.
*

@@ -196,4 +196,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.year` filter checks that the value in the path occurs in the
* year value passed into the filter.
* The `date.year` filter checks that the value in the path occurs in the year
* value passed into the filter.
*

@@ -204,4 +204,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.hour` filter checks that the value in the path occurs within
* the hour value passed into the filter.
* The `date.hour` filter checks that the value in the path occurs within the
* hour value passed into the filter.
*

@@ -212,4 +212,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.hour-after` filter checks that the value in the path occurs
* after the hour value passed into the filter.
* The `date.hour-after` filter checks that the value in the path occurs after
* the hour value passed into the filter.
*

@@ -216,0 +216,0 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

@@ -37,4 +37,4 @@ const formatValue = (value) => {

/**
* The `at` filter checks that the path matches the described value
* exactly. It takes a single value for a field or an array (only for tags).
* The `at` filter checks that the path matches the described value exactly.
* It takes a single value for a field or an array (only for tags).
*

@@ -52,4 +52,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#at}

/**
* The `any` filter takes an array of values. It works exactly the same way
* as the `at` operator, but checks whether the fragment matches any of the
* The `any` filter takes an array of values. It works exactly the same way as
* the `at` operator, but checks whether the fragment matches any of the
* values in the array.

@@ -61,5 +61,5 @@ *

/**
* The `in` filter is used specifically to retrieve an array of documents
* by their IDs or UIDs. This filter is much more efficient at this than
* the any filter.
* The `in` filter is used specifically to retrieve an array of documents by
* their IDs or UIDs. This filter is much more efficient at this than the any
* filter.
*

@@ -81,5 +81,5 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#in}

/**
* The `has` filter checks whether a fragment has a value. It will return
* all the documents of the specified type that contain a value for the
* specified field.
* The `has` filter checks whether a fragment has a value. It will return all
* the documents of the specified type that contain a value for the specified
* field.
*

@@ -106,4 +106,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#has}

/**
* The `geopoint.near` filter checks that the value in the path is within
* the radius of the given coordinates.
* The `geopoint.near` filter checks that the value in the path is within the
* radius of the given coordinates.
*

@@ -123,4 +123,4 @@ * This filter will only work for a geopoint field.

/**
* The `number.gt` filter checks that the value in the number field is
* greater than the value passed into the filter.
* The `number.gt` filter checks that the value in the number field is greater
* than the value passed into the filter.
*

@@ -131,4 +131,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#numbergreaterthan}

/**
* The `number.inRange` filter checks that the value in the path is within
* the two values passed into the filter.
* The `number.inRange` filter checks that the value in the path is within the
* two values passed into the filter.
*

@@ -139,4 +139,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#numberinrange}

/**
* The `date.after` filter checks that the value in the path is after the
* date value passed into the filter.
* The `date.after` filter checks that the value in the path is after the date
* value passed into the filter.
*

@@ -154,4 +154,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.between` filter checks that the value in the path is within
* the date values passed into the filter.
* The `date.between` filter checks that the value in the path is within the
* date values passed into the filter.
*

@@ -162,4 +162,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month` filter checks that the value in the path is
* equal to the day of the month passed into the filter.
* The `date.day-of-month` filter checks that the value in the path is equal
* to the day of the month passed into the filter.
*

@@ -170,4 +170,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month-after` filter checks that the value in the path
* is after the day of the month passed into the filter.
* The `date.day-of-month-after` filter checks that the value in the path is
* after the day of the month passed into the filter.
*

@@ -178,4 +178,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month-before` filter checks that the value in the path
* is before the day of the month passed into the filter.
* The `date.day-of-month-before` filter checks that the value in the path is
* before the day of the month passed into the filter.
*

@@ -186,4 +186,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-week` filter checks that the value in the path is equal
* to the day of the week passed into the filter.
* The `date.day-of-week` filter checks that the value in the path is equal to
* the day of the week passed into the filter.
*

@@ -215,4 +215,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.month-after` filter checks that the value in the path occurs
* in any month after the value passed into the filter.
* The `date.month-after` filter checks that the value in the path occurs in
* any month after the value passed into the filter.
*

@@ -223,4 +223,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.month-before` filter checks that the value in the path occurs
* in any month before the value passed into the filter.
* The `date.month-before` filter checks that the value in the path occurs in
* any month before the value passed into the filter.
*

@@ -231,4 +231,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.year` filter checks that the value in the path occurs in the
* year value passed into the filter.
* The `date.year` filter checks that the value in the path occurs in the year
* value passed into the filter.
*

@@ -239,4 +239,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.hour` filter checks that the value in the path occurs within
* the hour value passed into the filter.
* The `date.hour` filter checks that the value in the path occurs within the
* hour value passed into the filter.
*

@@ -247,4 +247,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.hour-after` filter checks that the value in the path occurs
* after the hour value passed into the filter.
* The `date.hour-after` filter checks that the value in the path occurs after
* the hour value passed into the filter.
*

@@ -251,0 +251,0 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

@@ -5,2 +5,3 @@ /**

* @typeParam RepositoryName - Name of the Prismic repository.
*
* @param repositoryName - Name of the repository.

@@ -7,0 +8,0 @@ *

@@ -5,7 +5,9 @@ /**

* @typeParam RepositoryName - Name of the Prismic repository.
*
* @param repositoryName - Name of the repository.
*
* @returns The repository's Prismic Rest API V2 endpoint
*
* @throws {@link Error} Thrown if an invalid repository name is provided.
*/
export declare const getRepositoryEndpoint: <RepositoryName extends string>(repositoryName: RepositoryName) => `https://${RepositoryName}.cdn.prismic.io/api/v2`;

@@ -10,2 +10,3 @@ /**

* @returns The Prismic repository's name.
*
* @throws {@link Error} Thrown if an invalid Prismic Rest API V2 endpoint is

@@ -12,0 +13,0 @@ * provided.

@@ -11,3 +11,3 @@ /**

* import Script from "next/script";
* import * as prismic from '@prismicio/client'
* import * as prismic from "@prismicio/client";
*

@@ -14,0 +14,0 @@ * export default function RootLayout({

@@ -13,2 +13,3 @@ import type { DateField } from "../types/value/date";

* @returns A Date object, null if provided date is falsy
*
* @see Templating date field from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#date-and-timestamp}

@@ -15,0 +16,0 @@ */

@@ -54,3 +54,4 @@ import { RichTextFunctionSerializer, RichTextMapSerializer, RichTextMapSerializerFunction } from "@prismicio/richtext";

/**
* 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
*

@@ -66,8 +67,9 @@ * @see {@link HTMLRichTextMapSerializer} and {@link HTMLRichTextFunctionSerializer}

/**
* An optional link resolver function to resolve links.
* Without it you're expected to use the `routes` options from the API.
* An optional link resolver function to resolve links. Without it you're
* expected to use the `routes` options from the API.
*/
linkResolver?: LinkResolverFunction | null;
/**
* 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
*/

@@ -91,2 +93,11 @@ serializer?: HTMLRichTextSerializer | null;

*
* @example
*
* ```ts
* asHTML(field);
* asHTML(field, { linkResolver });
* asHTML(field, { serializer });
* asHTML(field, { linkResolver, serializer });
* ```
*
* @param richTextField - A rich text or title field from Prismic

@@ -96,2 +107,3 @@ * @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}

@@ -103,19 +115,13 @@ */

*
* @deprecated Use object-style configuration instead.
*
* @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
* to the default serializer
* @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}
*
* @deprecated Use object-style configuration instead.
*
* ```ts
* asHTML(field);
* asHTML(field, { linkResolver });
* asHTML(field, { serializer });
* asHTML(field, { linkResolver, serializer });
* ```
*/

@@ -122,0 +128,0 @@ <Field extends RichTextField | null | undefined>(richTextField: Field, ...config: AsHTMLDeprecatedTupleConfig): AsHTMLReturnType<Field>;

@@ -13,2 +13,3 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship";

* @returns Resolved URL
*
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver}

@@ -22,4 +23,4 @@ */

/**
* An optional link resolver function. Without it, you are
* expected to use the `routes` options from the API.
* An optional link resolver function. Without it, you are expected to use
* the `routes` options from the API.
*/

@@ -42,9 +43,19 @@ linkResolver?: LinkResolverFunction<LinkResolverFunctionReturnType> | null;

*
* @example
*
* ```ts
* asLink(field);
* asLink(field, { linkResolver });
* ```
*
* @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`
* @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}

@@ -57,19 +68,17 @@ * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}

*
* @deprecated Use object-style configuration instead.
*
* @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
* expected to use the `routes` options from the API
*
* @returns Resolved URL or, if the provided link field or document is empty, `null`
* @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}
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}
*
* @deprecated Use object-style configuration instead.
*
* ```ts
* asLink(field);
* asLink(field, { linkResolver });
* ```
*/

@@ -76,0 +85,0 @@ <LinkResolverFunctionReturnType = string | null | undefined, Field extends LinkField | PrismicDocument | null | undefined = LinkField | PrismicDocument | null | undefined>(linkFieldOrDocument: Field, ...config: AsLinkDeprecatedTupleConfig<LinkResolverFunctionReturnType>): AsLinkReturnType<LinkResolverFunctionReturnType, Field>;

@@ -28,13 +28,18 @@ 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"`.
* 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
* type
* @typeParam Field - Link field or Prismic document to resolve to link attributes
* @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 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
* @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}

@@ -41,0 +46,0 @@ * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}

@@ -25,2 +25,9 @@ import { RichTextField } from "../types/value/richText";

*
* @example
*
* ```ts
* asText(field);
* asText(field, { separator });
* ```
*
* @param richTextField - A rich text or title field from Prismic

@@ -30,2 +37,3 @@ * @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}

@@ -37,2 +45,4 @@ */

*
* @deprecated Use object-style configuration instead.
*
* @param richTextField - A rich text or title field from Prismic

@@ -42,10 +52,4 @@ * @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}
*
* @deprecated Use object-style configuration instead.
*
* ```ts
* asText(field);
* asText(field, { separator });
* ```
*/

@@ -52,0 +56,0 @@ <Field extends RichTextField | null | undefined>(richTextField: Field, ...config: AsTextDeprecatedTupleConfig): AsTextReturnType<Field>;

@@ -9,5 +9,7 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship";

* @typeParam TDocument - Specific interface of the provided document
*
* @param prismicDocument - A document coming from Prismic
*
* @returns The equivalent link field to use with `asLink()`
*
* @internal

@@ -14,0 +16,0 @@ */

@@ -48,3 +48,3 @@ import type { CustomTypeModelIntegrationField } from "./types/model/integration";

export * as cookie from "./cookie";
export type { AbortSignalLike, ClientConfig, CreateClient, FetchLike, HttpRequestLike, RequestInitLike, ResponseLike, } from "./createClient";
export type { AbortSignalLike, ClientConfig, CreateClient, FetchLike, HttpRequestLike, RequestInitLike, RequestInitLikeOrThunk, ResponseLike, } from "./createClient";
export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL";

@@ -51,0 +51,0 @@ export { asDate } from "./helpers/asDate";

@@ -5,8 +5,8 @@ interface WithFilters {

/**
* Adds one or more filters to an object with a `filters` property.
* Appended filters are added to the end of the existing list.
* Adds one or more filters to an object with a `filters` property. Appended
* filters are added to the end of the existing list.
*
* @typeParam T - Object to which filters will be append.
* @param objWithFilters - Object to append filters on the `filters`
* property.
*
* @param objWithFilters - Object to append filters on the `filters` property.
* @param filters - One or more filters to append.

@@ -13,0 +13,0 @@ *

@@ -7,2 +7,3 @@ /**

* @typeParam A - Element of the array.
*
* @param a - Value to ensure is an array.

@@ -9,0 +10,0 @@ *

@@ -6,2 +6,3 @@ /**

* @typeParam A - Value returned by the thunk.
*
* @param a - Value to ensure is a thunk.

@@ -11,2 +12,2 @@ *

*/
export declare const castThunk: <A>(a: A | (() => A)) => () => A;
export declare const castThunk: <A, TArgs extends any[]>(a: A | ((...args: TArgs) => A)) => (...args: TArgs) => A;
/**
* Creates a filter to filter content by document tags. All tags are required
* on the document.
* Creates a filter to filter content by document tags. All tags are required on
* the document.
*

@@ -5,0 +5,0 @@ * @param tags - Document tags to filter queried content.

@@ -8,4 +8,5 @@ import { Ref } from "../types/api/ref";

* @returns The master ref from the list.
*
* @throws If a matching ref cannot be found.
*/
export declare const findMasterRef: (refs: Ref[]) => Ref;

@@ -7,8 +7,9 @@ import { Ref } from "../types/api/ref";

* @param refs - A list of refs to search.
* @param filter - A function that determines if a ref from the list matches
* the criteria.
* @param filter - A function that determines if a ref from the list matches the
* criteria.
*
* @returns The first matching ref.
*
* @throws If a matching ref cannot be found.
*/
export declare const findRef: (refs: Ref[], filter: (ref: Ref) => boolean) => Ref;

@@ -9,4 +9,5 @@ import { Ref } from "../types/api/ref";

* @returns The ref with a matching ID from the list.
*
* @throws If a matching ref cannot be found.
*/
export declare const findRefByID: (refs: Ref[], id: string) => Ref;

@@ -9,4 +9,5 @@ import { Ref } from "../types/api/ref";

* @returns The ref with a matching label from the list.
*
* @throws If a matching ref cannot be found.
*/
export declare const findRefByLabel: (refs: Ref[], label: string) => Ref;

@@ -1,2 +0,2 @@

const version = "7.0.0";
const version = "7.0.1-alpha.0";
export {

@@ -3,0 +3,0 @@ version

@@ -7,2 +7,3 @@ import { PrismicDocument } from "../value/document";

* @typeParam Document - The type(s) of Prismic document that can be returned.
*
* @see More details on querying: {@link https://prismic.io/docs/api}

@@ -9,0 +10,0 @@ */

@@ -7,2 +7,3 @@ import { Ref } from "./ref";

* This is an alias for `Ref`.
*
* @see {@link Ref}

@@ -9,0 +10,0 @@ * @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}

@@ -6,4 +6,5 @@ /**

* @typeParam Tag - Tags that are returned by the Tags API.
*
* @see More details on the Tags API: {@link https://prismic.io/docs/tags-api-technical-reference}
*/
export type Tags<Tag extends string = string> = Tag[];

@@ -6,4 +6,3 @@ import type { CustomTypeModelFieldType } from "./types";

*
* More details:
* {@link https://prismic.io/docs/content-relationship}
* More details: {@link https://prismic.io/docs/content-relationship}
*/

@@ -10,0 +9,0 @@ export interface CustomTypeModelContentRelationshipField<CustomTypeIDs extends string = string, Tags extends string = string> {

@@ -5,4 +5,3 @@ import type { CustomTypeModelFieldType } from "./types";

*
* More details:
* {@link https://prismic.io/docs/link}
* More details: {@link https://prismic.io/docs/link}
*/

@@ -21,4 +20,3 @@ export interface CustomTypeModelLinkField {

*
* More details:
* {@link https://prismic.io/docs/link}
* More details: {@link https://prismic.io/docs/link}
*/

@@ -25,0 +23,0 @@ export declare const CustomTypeModelLinkSelectType: {

@@ -6,4 +6,3 @@ import type { CustomTypeModelFieldType } from "./types";

*
* More details:
* {@link https://prismic.io/docs/media}
* More details: {@link https://prismic.io/docs/media}
*/

@@ -10,0 +9,0 @@ export interface CustomTypeModelLinkToMediaField {

@@ -6,4 +6,5 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/color}
*/
export type ColorField<State extends FieldState = FieldState> = State extends "empty" ? null : `#${string}`;

@@ -6,4 +6,5 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/date}
*/
export type DateField<State extends FieldState = FieldState> = State extends "empty" ? null : `${number}-${number}-${number}`;

@@ -161,2 +161,3 @@ import type { EmptyObjectField, FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/embed}

@@ -163,0 +164,0 @@ */

@@ -6,2 +6,3 @@ import type { EmptyObjectField, FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/geopoint}

@@ -8,0 +9,0 @@ */

@@ -7,2 +7,3 @@ import type { FieldState, Simplify } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see {@link ImageField} for a full image field type.

@@ -35,4 +36,5 @@ */

* @typeParam State - State of the field which determines its shape.
*
* @see Image field documentation: {@link https://prismic.io/docs/image}
*/
export type ImageField<ThumbnailNames extends string | null = never, State extends FieldState = FieldState> = Simplify<State extends "filled" ? ImageFieldImage<State> & Record<Extract<ThumbnailNames, string>, ImageFieldImage<State>> : ImageFieldImage<State> & Record<Extract<ThumbnailNames, string>, ImageFieldImage<State>>>;

@@ -7,4 +7,5 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/integration-fields}
*/
export type IntegrationField<Data extends Record<string, unknown> = Record<string, unknown>, State extends FieldState = FieldState> = State extends "empty" ? null : Data;

@@ -6,4 +6,5 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/key-text}
*/
export type KeyTextField<State extends FieldState = FieldState> = State extends "empty" ? null | "" : string;

@@ -6,4 +6,5 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/number}
*/
export type NumberField<State extends FieldState = FieldState> = State extends "empty" ? null : number;

@@ -7,4 +7,5 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/select}
*/
export type SelectField<Enum extends string = string, State extends FieldState = FieldState> = State extends "empty" ? null : Enum;

@@ -36,2 +36,3 @@ import type { BooleanField } from "./boolean";

* @typeParam T - The type to simplify.
*
* @see https://github.com/sindresorhus/type-fest/blob/cbd7ec510bd136ac045bbc74e391ee686b8a9a2f/source/simplify.d.ts

@@ -38,0 +39,0 @@ */

{
"name": "@prismicio/client",
"version": "7.0.0",
"version": "7.0.1-alpha.0",
"description": "The official JavaScript + TypeScript client library for Prismic",

@@ -46,4 +46,4 @@ "keywords": [

"release:dry": "standard-version --dry-run",
"release:alpha": "npm run test && standard-version --release-as major --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha",
"release:alpha:dry": "standard-version --release-as major --prerelease alpha --dry-run",
"release:alpha": "npm run test && standard-version --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha",
"release:alpha:dry": "standard-version --prerelease alpha --dry-run",
"lint": "eslint --ext .js,.ts .",

@@ -50,0 +50,0 @@ "types": "tsc --noEmit",

@@ -159,14 +159,14 @@ import { castArray } from "./lib/castArray";

*
* @remarks Strings and arrays of strings are deprecated as of
* `@prismicio/client@7.0.0`. Please migrate to the more explicit
* array of objects.
*
* @remarks
* Strings and arrays of strings are deprecated as of
* `@prismicio/client@7.0.0`. Please migrate to the more explicit array of
* objects.
* @example
*
* ```typescript
* buildQueryURL(endpoint,{
* orderings: [
* { field: "my.product.price", direction: "desc" },
* { field: "my.product.title" },
* ],
* buildQueryURL(endpoint, {
* orderings: [
* { field: "my.product.price", direction: "desc" },
* { field: "my.product.title" },
* ],
* });

@@ -223,3 +223,4 @@ * ```

/**
* @deprecated Renamed to `filters`. Ensure the value is an array of filters, not a single, non-array filter.
* @deprecated Renamed to `filters`. Ensure the value is an array of filters,
* not a single, non-array filter.
*/

@@ -226,0 +227,0 @@ predicates?: string | string[];

@@ -109,3 +109,4 @@ import { appendFilters } from "./lib/appendFilters";

*
* See: \<https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\>
* See:
* [https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
*/

@@ -221,2 +222,18 @@ // NOTE: `AbortSignalLike` is `any`! It is left as `AbortSignalLike`

/**
* Options or a function that returns options provided to the client's `fetch()`
* on all network requests. These options will be merged with internally
* required options. They can also be overriden on a per-query basis using the
* query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided. This
* function can be asynchronous.
*/
export type RequestInitLikeOrThunk =
| RequestInitLike
| ((
url: string,
init?: RequestInitLike,
) => RequestInitLike | undefined | Promise<RequestInitLike | undefined>);
/**
* Configuration for clients that determine how content is queried.

@@ -239,4 +256,4 @@ */

/**
* A list of route resolver objects that define how a document's `url` property
* is resolved.
* A list of route resolver objects that define how a document's `url`
* property is resolved.
*

@@ -274,8 +291,13 @@ * {@link https://prismic.io/docs/route-resolver}

/**
* Options provided to the client's `fetch()` on all network requests.
* These options will be merged with internally required options. They
* can also be overriden on a per-query basis using the query's
* `fetchOptions` parameter.
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
fetchOptions?: RequestInitLike;
fetchOptions?: RequestInitLikeOrThunk;
};

@@ -288,8 +310,13 @@

/**
* Options provided to the client's `fetch()` on all network requests.
* These options will be merged with internally required options. They
* can also be overriden on a per-query basis using the query's
* `fetchOptions` parameter.
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
fetchOptions?: RequestInitLike;
fetchOptions?: RequestInitLikeOrThunk;

@@ -300,11 +327,5 @@ /**

*
* {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal}
*
* @deprecated Move the `signal` parameter into `fetchOptions.signal`:
*
* ```typescript
* client.getByUID("page", "home",{
* fetchOptions: { signal }
* });
* ```
* @see \<https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal\>
*/

@@ -448,3 +469,14 @@ signal?: AbortSignalLike;

fetchOptions?: RequestInitLike;
/**
* Options or a function that returns options provided to the client's
* `fetch()` on all network requests. These options will be merged with
* internally required options. They can also be overriden on a per-query
* basis using the query's `fetchOptions` parameter.
*
* If the options must be determined on-demand, a function can be provided.
* This function can be asynchronous.
*
* @experimental
*/
fetchOptions?: RequestInitLikeOrThunk;

@@ -637,2 +669,3 @@ /**

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param params - Parameters to filter, sort, and paginate results.

@@ -661,2 +694,3 @@ *

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param params - Parameters to filter, sort, and paginate results. @returns

@@ -702,2 +736,3 @@ * The first result of the query, if any.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param params - Parameters to filter, sort, and paginate results.

@@ -756,2 +791,3 @@ *

* @typeParam TDocument- Type of the Prismic document returned.
*
* @param id - ID of the document.

@@ -790,2 +826,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param ids - A list of document IDs.

@@ -827,2 +864,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param ids - A list of document IDs.

@@ -858,2 +896,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -901,2 +940,3 @@ * @param uid - UID of the document.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -947,2 +987,3 @@ * @param uids - A list of document UIDs.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the document's custom type.

@@ -988,2 +1029,3 @@ * @param uids - A list of document UIDs.

* @typeParam TDocument - Type of the Prismic document returned.
*
* @param documentType - The API ID of the singleton custom type.

@@ -1020,2 +1062,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the custom type.

@@ -1052,2 +1095,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param documentType - The API ID of the custom type.

@@ -1085,2 +1129,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tag - The tag that must be included on a document.

@@ -1113,2 +1158,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tag - The tag that must be included on a document.

@@ -1141,2 +1187,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -1170,2 +1217,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -1199,2 +1247,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -1230,2 +1279,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @typeParam TDocument - Type of Prismic documents returned.
*
* @param tags - A list of tags that must be included on a document.

@@ -1601,2 +1651,3 @@ * @param params - Parameters to filter, sort, and paginate the results.

* @returns The `fetch()` Response for the request.
*
* @experimental

@@ -1696,2 +1747,3 @@ */

* @returns The repository form.
*
* @throws If a matching form cannot be found.

@@ -1795,2 +1847,3 @@ */

* @typeParam T - The JSON response.
*
* @param url - URL to the resource to fetch.

@@ -1805,13 +1858,17 @@ * @param params - Prismic REST API parameters for the network request.

): Promise<T> {
const paramsFetchOptions = await castThunk(params.fetchOptions)(url);
const thisFetchOptions = await castThunk(this.fetchOptions)(
url,
paramsFetchOptions,
);
const requestInit: RequestInitLike = {
...this.fetchOptions,
...params.fetchOptions,
...paramsFetchOptions,
...thisFetchOptions,
headers: {
...this.fetchOptions?.headers,
...params.fetchOptions?.headers,
...paramsFetchOptions?.headers,
...thisFetchOptions?.headers,
},
signal:
params.fetchOptions?.signal ||
params.signal ||
this.fetchOptions?.signal,
paramsFetchOptions?.signal || params.signal || thisFetchOptions?.signal,
};

@@ -1818,0 +1875,0 @@

@@ -33,6 +33,6 @@ /**

/**
* Creates a filter builder function for filters with a path and
* arguments.
* Creates a filter builder function for filters with a path and arguments.
*
* @typeParam Args - Arguments for the filter.
*
* @param name - Name of the filter used in the resulting string.

@@ -77,4 +77,4 @@ *

/**
* Creates a filter builder function for filters with only arguments and
* no path.
* Creates a filter builder function for filters with only arguments and no
* path.
*

@@ -100,4 +100,4 @@ * @param name - Name of the filter used in the resulting string.

/**
* The `at` filter checks that the path matches the described value
* exactly. It takes a single value for a field or an array (only for tags).
* The `at` filter checks that the path matches the described value exactly.
* It takes a single value for a field or an array (only for tags).
*

@@ -121,4 +121,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#at}

/**
* The `any` filter takes an array of values. It works exactly the same way
* as the `at` operator, but checks whether the fragment matches any of the
* The `any` filter takes an array of values. It works exactly the same way as
* the `at` operator, but checks whether the fragment matches any of the
* values in the array.

@@ -133,5 +133,5 @@ *

/**
* The `in` filter is used specifically to retrieve an array of documents
* by their IDs or UIDs. This filter is much more efficient at this than
* the any filter.
* The `in` filter is used specifically to retrieve an array of documents by
* their IDs or UIDs. This filter is much more efficient at this than the any
* filter.
*

@@ -155,5 +155,5 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#in}

/**
* The `has` filter checks whether a fragment has a value. It will return
* all the documents of the specified type that contain a value for the
* specified field.
* The `has` filter checks whether a fragment has a value. It will return all
* the documents of the specified type that contain a value for the specified
* field.
*

@@ -183,4 +183,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#has}

/**
* The `geopoint.near` filter checks that the value in the path is within
* the radius of the given coordinates.
* The `geopoint.near` filter checks that the value in the path is within the
* radius of the given coordinates.
*

@@ -205,4 +205,4 @@ * This filter will only work for a geopoint field.

/**
* The `number.gt` filter checks that the value in the number field is
* greater than the value passed into the filter.
* The `number.gt` filter checks that the value in the number field is greater
* than the value passed into the filter.
*

@@ -214,4 +214,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#numbergreaterthan}

/**
* The `number.inRange` filter checks that the value in the path is within
* the two values passed into the filter.
* The `number.inRange` filter checks that the value in the path is within the
* two values passed into the filter.
*

@@ -226,4 +226,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#numberinrange}

/**
* The `date.after` filter checks that the value in the path is after the
* date value passed into the filter.
* The `date.after` filter checks that the value in the path is after the date
* value passed into the filter.
*

@@ -243,4 +243,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.between` filter checks that the value in the path is within
* the date values passed into the filter.
* The `date.between` filter checks that the value in the path is within the
* date values passed into the filter.
*

@@ -255,4 +255,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month` filter checks that the value in the path is
* equal to the day of the month passed into the filter.
* The `date.day-of-month` filter checks that the value in the path is equal
* to the day of the month passed into the filter.
*

@@ -264,4 +264,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month-after` filter checks that the value in the path
* is after the day of the month passed into the filter.
* The `date.day-of-month-after` filter checks that the value in the path is
* after the day of the month passed into the filter.
*

@@ -275,4 +275,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-month-before` filter checks that the value in the path
* is before the day of the month passed into the filter.
* The `date.day-of-month-before` filter checks that the value in the path is
* before the day of the month passed into the filter.
*

@@ -286,4 +286,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.day-of-week` filter checks that the value in the path is equal
* to the day of the week passed into the filter.
* The `date.day-of-week` filter checks that the value in the path is equal to
* the day of the week passed into the filter.
*

@@ -323,4 +323,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.month-after` filter checks that the value in the path occurs
* in any month after the value passed into the filter.
* The `date.month-after` filter checks that the value in the path occurs in
* any month after the value passed into the filter.
*

@@ -333,4 +333,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.month-before` filter checks that the value in the path occurs
* in any month before the value passed into the filter.
* The `date.month-before` filter checks that the value in the path occurs in
* any month before the value passed into the filter.
*

@@ -343,4 +343,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.year` filter checks that the value in the path occurs in the
* year value passed into the filter.
* The `date.year` filter checks that the value in the path occurs in the year
* value passed into the filter.
*

@@ -352,4 +352,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.hour` filter checks that the value in the path occurs within
* the hour value passed into the filter.
* The `date.hour` filter checks that the value in the path occurs within the
* hour value passed into the filter.
*

@@ -361,4 +361,4 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

/**
* The `date.hour-after` filter checks that the value in the path occurs
* after the hour value passed into the filter.
* The `date.hour-after` filter checks that the value in the path occurs after
* the hour value passed into the filter.
*

@@ -365,0 +365,0 @@ * {@link https://prismic.io/docs/rest-api-technical-reference#date-filters}

@@ -9,2 +9,3 @@ import { PrismicError } from "./errors/PrismicError";

* @typeParam RepositoryName - Name of the Prismic repository.
*
* @param repositoryName - Name of the repository.

@@ -11,0 +12,0 @@ *

@@ -9,5 +9,7 @@ import { PrismicError } from "./errors/PrismicError";

* @typeParam RepositoryName - Name of the Prismic repository.
*
* @param repositoryName - Name of the repository.
*
* @returns The repository's Prismic Rest API V2 endpoint
*
* @throws {@link Error} Thrown if an invalid repository name is provided.

@@ -14,0 +16,0 @@ */

@@ -12,2 +12,3 @@ import { PrismicError } from "./errors/PrismicError";

* @returns The Prismic repository's name.
*
* @throws {@link Error} Thrown if an invalid Prismic Rest API V2 endpoint is

@@ -14,0 +15,0 @@ * provided.

@@ -15,3 +15,3 @@ import { PrismicError } from "./errors/PrismicError";

* import Script from "next/script";
* import * as prismic from '@prismicio/client'
* import * as prismic from "@prismicio/client";
*

@@ -18,0 +18,0 @@ * export default function RootLayout({

@@ -17,2 +17,3 @@ import type { DateField } from "../types/value/date";

* @returns A Date object, null if provided date is falsy
*
* @see Templating date field from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#date-and-timestamp}

@@ -19,0 +20,0 @@ */

@@ -109,3 +109,4 @@ import {

/**
* 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
*

@@ -120,4 +121,4 @@ * @see {@link HTMLRichTextMapSerializer} and {@link HTMLRichTextFunctionSerializer}

/**
* Creates a default HTML rich text serializer with a given link resolver providing
* sensible and safe defaults for every node type
* Creates a default HTML rich text serializer with a given link resolver
* providing sensible and safe defaults for every node type
*

@@ -210,4 +211,4 @@ * @internal

/**
* An optional link resolver function to resolve links.
* Without it you're expected to use the `routes` options from the API.
* An optional link resolver function to resolve links. Without it you're
* expected to use the `routes` options from the API.
*/

@@ -217,3 +218,4 @@ linkResolver?: LinkResolverFunction | null;

/**
* 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
*/

@@ -243,2 +245,11 @@ serializer?: HTMLRichTextSerializer | null;

*
* @example
*
* ```ts
* asHTML(field);
* asHTML(field, { linkResolver });
* asHTML(field, { serializer });
* asHTML(field, { linkResolver, serializer });
* ```
*
* @param richTextField - A rich text or title field from Prismic

@@ -248,2 +259,3 @@ * @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}

@@ -259,19 +271,13 @@ */

*
* @deprecated Use object-style configuration instead.
*
* @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
* to the default serializer
* @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}
*
* @deprecated Use object-style configuration instead.
*
* ```ts
* asHTML(field);
* asHTML(field, { linkResolver });
* asHTML(field, { serializer });
* asHTML(field, { linkResolver, serializer });
* ```
*/

@@ -278,0 +284,0 @@ <Field extends RichTextField | null | undefined>(

@@ -16,2 +16,3 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship";

* @returns Resolved URL
*
* @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver}

@@ -29,4 +30,4 @@ */

/**
* An optional link resolver function. Without it, you are
* expected to use the `routes` options from the API.
* An optional link resolver function. Without it, you are expected to use
* the `routes` options from the API.
*/

@@ -69,9 +70,19 @@ linkResolver?: LinkResolverFunction<LinkResolverFunctionReturnType> | null;

*
* @example
*
* ```ts
* asLink(field);
* asLink(field, { linkResolver });
* ```
*
* @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`
* @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}

@@ -95,19 +106,17 @@ * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}

*
* @deprecated Use object-style configuration instead.
*
* @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
* expected to use the `routes` options from the API
*
* @returns Resolved URL or, if the provided link field or document is empty, `null`
* @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}
* @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}
*
* @deprecated Use object-style configuration instead.
*
* ```ts
* asLink(field);
* asLink(field, { linkResolver });
* ```
*/

@@ -114,0 +123,0 @@ <

@@ -69,13 +69,18 @@ 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"`.
* 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
* type
* @typeParam Field - Link field or Prismic document to resolve to link attributes
* @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 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
* @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}

@@ -82,0 +87,0 @@ * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}

@@ -33,2 +33,9 @@ import { asText as baseAsText } from "@prismicio/richtext";

*
* @example
*
* ```ts
* asText(field);
* asText(field, { separator });
* ```
*
* @param richTextField - A rich text or title field from Prismic

@@ -38,2 +45,3 @@ * @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}

@@ -49,2 +57,4 @@ */

*
* @deprecated Use object-style configuration instead.
*
* @param richTextField - A rich text or title field from Prismic

@@ -54,10 +64,4 @@ * @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}
*
* @deprecated Use object-style configuration instead.
*
* ```ts
* asText(field);
* asText(field, { separator });
* ```
*/

@@ -64,0 +68,0 @@ <Field extends RichTextField | null | undefined>(

@@ -13,5 +13,7 @@ import type { FilledContentRelationshipField } from "../types/value/contentRelationship";

* @typeParam TDocument - Specific interface of the provided document
*
* @param prismicDocument - A document coming from Prismic
*
* @returns The equivalent link field to use with `asLink()`
*
* @internal

@@ -18,0 +20,0 @@ */

@@ -49,2 +49,3 @@ // Imports are used for deprecations.

RequestInitLike,
RequestInitLikeOrThunk,
ResponseLike,

@@ -51,0 +52,0 @@ } from "./createClient";

@@ -8,8 +8,8 @@ import { castArray } from "./castArray";

/**
* Adds one or more filters to an object with a `filters` property.
* Appended filters are added to the end of the existing list.
* Adds one or more filters to an object with a `filters` property. Appended
* filters are added to the end of the existing list.
*
* @typeParam T - Object to which filters will be append.
* @param objWithFilters - Object to append filters on the `filters`
* property.
*
* @param objWithFilters - Object to append filters on the `filters` property.
* @param filters - One or more filters to append.

@@ -16,0 +16,0 @@ *

@@ -7,2 +7,3 @@ /**

* @typeParam A - Element of the array.
*
* @param a - Value to ensure is an array.

@@ -9,0 +10,0 @@ *

@@ -6,2 +6,3 @@ /**

* @typeParam A - Value returned by the thunk.
*
* @param a - Value to ensure is a thunk.

@@ -11,4 +12,10 @@ *

*/
export const castThunk = <A>(a: A | (() => A)): (() => A) => {
return typeof a === "function" ? (a as () => A) : () => a;
export const castThunk = <
A,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
TArgs extends any[],
>(
a: A | ((...args: TArgs) => A),
): ((...args: TArgs) => A) => {
return typeof a === "function" ? (a as (...args: TArgs) => A) : () => a;
};

@@ -6,4 +6,4 @@ import { filter } from "../filter";

/**
* Creates a filter to filter content by document tags. All tags are required
* on the document.
* Creates a filter to filter content by document tags. All tags are required on
* the document.
*

@@ -10,0 +10,0 @@ * @param tags - Document tags to filter queried content.

@@ -11,2 +11,3 @@ import { Ref } from "../types/api/ref";

* @returns The master ref from the list.
*
* @throws If a matching ref cannot be found.

@@ -13,0 +14,0 @@ */

@@ -10,6 +10,7 @@ import { Ref } from "../types/api/ref";

* @param refs - A list of refs to search.
* @param filter - A function that determines if a ref from the list matches
* the criteria.
* @param filter - A function that determines if a ref from the list matches the
* criteria.
*
* @returns The first matching ref.
*
* @throws If a matching ref cannot be found.

@@ -16,0 +17,0 @@ */

@@ -12,2 +12,3 @@ import { Ref } from "../types/api/ref";

* @returns The ref with a matching ID from the list.
*
* @throws If a matching ref cannot be found.

@@ -14,0 +15,0 @@ */

@@ -12,2 +12,3 @@ import { Ref } from "../types/api/ref";

* @returns The ref with a matching label from the list.
*
* @throws If a matching ref cannot be found.

@@ -14,0 +15,0 @@ */

@@ -8,2 +8,3 @@ import { PrismicDocument } from "../value/document";

* @typeParam Document - The type(s) of Prismic document that can be returned.
*
* @see More details on querying: {@link https://prismic.io/docs/api}

@@ -10,0 +11,0 @@ */

@@ -8,2 +8,3 @@ import { Ref } from "./ref";

* This is an alias for `Ref`.
*
* @see {@link Ref}

@@ -10,0 +11,0 @@ * @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}

@@ -6,4 +6,5 @@ /**

* @typeParam Tag - Tags that are returned by the Tags API.
*
* @see More details on the Tags API: {@link https://prismic.io/docs/tags-api-technical-reference}
*/
export type Tags<Tag extends string = string> = Tag[];

@@ -8,4 +8,3 @@ import type { CustomTypeModelFieldType } from "./types";

*
* More details:
* {@link https://prismic.io/docs/content-relationship}
* More details: {@link https://prismic.io/docs/content-relationship}
*/

@@ -12,0 +11,0 @@ export interface CustomTypeModelContentRelationshipField<

@@ -6,4 +6,3 @@ import type { CustomTypeModelFieldType } from "./types";

*
* More details:
* {@link https://prismic.io/docs/link}
* More details: {@link https://prismic.io/docs/link}
*/

@@ -25,4 +24,3 @@ export interface CustomTypeModelLinkField {

*
* More details:
* {@link https://prismic.io/docs/link}
* More details: {@link https://prismic.io/docs/link}
*/

@@ -29,0 +27,0 @@ export const CustomTypeModelLinkSelectType = {

@@ -8,4 +8,3 @@ import type { CustomTypeModelFieldType } from "./types";

*
* More details:
* {@link https://prismic.io/docs/media}
* More details: {@link https://prismic.io/docs/media}
*/

@@ -12,0 +11,0 @@ export interface CustomTypeModelLinkToMediaField {

@@ -7,2 +7,3 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/color}

@@ -9,0 +10,0 @@ */

@@ -7,2 +7,3 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/date}

@@ -9,0 +10,0 @@ */

@@ -186,2 +186,3 @@ import type { EmptyObjectField, FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/embed}

@@ -188,0 +189,0 @@ */

@@ -7,2 +7,3 @@ import type { EmptyObjectField, FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/geopoint}

@@ -9,0 +10,0 @@ */

@@ -8,2 +8,3 @@ import type { FieldState, Simplify } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see {@link ImageField} for a full image field type.

@@ -40,2 +41,3 @@ */

* @typeParam State - State of the field which determines its shape.
*
* @see Image field documentation: {@link https://prismic.io/docs/image}

@@ -42,0 +44,0 @@ */

@@ -8,2 +8,3 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/integration-fields}

@@ -10,0 +11,0 @@ */

@@ -7,2 +7,3 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/key-text}

@@ -9,0 +10,0 @@ */

@@ -7,2 +7,3 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/number}

@@ -9,0 +10,0 @@ */

@@ -8,2 +8,3 @@ import type { FieldState } from "./types";

* @typeParam State - State of the field which determines its shape.
*
* @see More details: {@link https://prismic.io/docs/select}

@@ -10,0 +11,0 @@ */

@@ -56,4 +56,5 @@ import type { BooleanField } from "./boolean";

* @typeParam T - The type to simplify.
*
* @see https://github.com/sindresorhus/type-fest/blob/cbd7ec510bd136ac045bbc74e391ee686b8a9a2f/source/simplify.d.ts
*/
export type Simplify<T> = { [P in keyof T]: T[P] };

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc