@prismicio/client
Advanced tools
Comparing version 6.4.2 to 6.4.3
@@ -603,3 +603,3 @@ import * as prismicT from '@prismicio/types'; | ||
*/ | ||
getAllByIDs<TDocument extends prismicT.PrismicDocument>(ids: string[], params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<TDocument[]>; | ||
getAllByIDs<TDocument extends prismicT.PrismicDocument>(ids: string[], params?: Partial<BuildQueryURLArgs> & GetAllParams & FetchParams): Promise<TDocument[]>; | ||
/** | ||
@@ -677,3 +677,3 @@ * Queries a document from the Prismic repository with a specific UID and Custom Type. | ||
*/ | ||
getAllByUIDs<TDocument extends prismicT.PrismicDocument>(documentType: string, uids: string[], params?: Partial<BuildQueryURLArgs> & FetchParams): Promise<TDocument[]>; | ||
getAllByUIDs<TDocument extends prismicT.PrismicDocument>(documentType: string, uids: string[], params?: Partial<BuildQueryURLArgs> & GetAllParams & FetchParams): Promise<TDocument[]>; | ||
/** | ||
@@ -736,3 +736,3 @@ * Queries a singleton document from the Prismic repository for a specific Custom Type. | ||
*/ | ||
getAllByType<TDocument extends prismicT.PrismicDocument>(documentType: string, params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams): Promise<TDocument[]>; | ||
getAllByType<TDocument extends prismicT.PrismicDocument>(documentType: string, params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>; | ||
/** | ||
@@ -773,3 +773,3 @@ * Queries documents from the Prismic repository with a specific tag. | ||
*/ | ||
getAllByTag<TDocument extends prismicT.PrismicDocument>(tag: string, params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams): Promise<TDocument[]>; | ||
getAllByTag<TDocument extends prismicT.PrismicDocument>(tag: string, params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>; | ||
/** | ||
@@ -810,3 +810,3 @@ * Queries documents from the Prismic repository with specific tags. A | ||
*/ | ||
getAllByEveryTag<TDocument extends prismicT.PrismicDocument>(tags: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams): Promise<TDocument[]>; | ||
getAllByEveryTag<TDocument extends prismicT.PrismicDocument>(tags: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>; | ||
/** | ||
@@ -847,3 +847,3 @@ * Queries documents from the Prismic repository with specific tags. A | ||
*/ | ||
getAllBySomeTags<TDocument extends prismicT.PrismicDocument>(tags: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams): Promise<TDocument[]>; | ||
getAllBySomeTags<TDocument extends prismicT.PrismicDocument>(tags: string[], params?: Partial<Omit<BuildQueryURLArgs, "page">> & GetAllParams & FetchParams): Promise<TDocument[]>; | ||
/** | ||
@@ -972,3 +972,3 @@ * Returns metadata about the Prismic repository, such as its refs, releases, | ||
* | ||
* @param id - The ID of the Release. | ||
* @param releaseID - The ID of the Release. | ||
*/ | ||
@@ -989,3 +989,3 @@ queryContentFromReleaseByID(releaseID: string): void; | ||
* | ||
* @param label - The label of the Release. | ||
* @param releaseLabel - The label of the Release. | ||
*/ | ||
@@ -992,0 +992,0 @@ queryContentFromReleaseByLabel(releaseLabel: string): void; |
@@ -294,3 +294,3 @@ import * as prismicH from '@prismicio/helpers'; | ||
...actualParams, | ||
pageSize: actualParams.pageSize || ((_a = this.defaultParams) == null ? void 0 : _a.pageSize) || MAX_PAGE_SIZE | ||
pageSize: Math.min(limit, actualParams.pageSize || ((_a = this.defaultParams) == null ? void 0 : _a.pageSize) || MAX_PAGE_SIZE) | ||
}; | ||
@@ -297,0 +297,0 @@ const documents = []; |
{ | ||
"name": "@prismicio/client", | ||
"version": "6.4.2", | ||
"version": "6.4.3", | ||
"description": "The official JavaScript + TypeScript client library for Prismic", | ||
@@ -57,21 +57,21 @@ "keywords": [ | ||
"@types/sinon": "^10.0.11", | ||
"@typescript-eslint/eslint-plugin": "^5.16.0", | ||
"@typescript-eslint/parser": "^5.16.0", | ||
"@typescript-eslint/eslint-plugin": "^5.19.0", | ||
"@typescript-eslint/parser": "^5.19.0", | ||
"abort-controller": "^3.0.0", | ||
"ava": "^4.1.0", | ||
"ava": "^4.2.0", | ||
"esbuild-register": "^3.3.2", | ||
"eslint": "^8.11.0", | ||
"eslint": "^8.13.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-tsdoc": "^0.2.14", | ||
"eslint-plugin-tsdoc": "^0.2.16", | ||
"msw": "^0.39.2", | ||
"node-fetch": "^3.2.3", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.6.0", | ||
"prettier-plugin-jsdoc": "^0.3.31", | ||
"sinon": "^13.0.1", | ||
"prettier": "^2.6.2", | ||
"prettier-plugin-jsdoc": "^0.3.38", | ||
"sinon": "^13.0.2", | ||
"siroc": "^0.16.0", | ||
"size-limit": "^7.0.8", | ||
"standard-version": "^9.3.2", | ||
"typescript": "^4.6.2" | ||
"typescript": "^4.6.3" | ||
}, | ||
@@ -78,0 +78,0 @@ "engines": { |
@@ -221,3 +221,3 @@ import * as prismicT from "@prismicio/types"; | ||
* | ||
* @param documentType - Document tags to filter queried content. | ||
* @param tags - Document tags to filter queried content. | ||
* | ||
@@ -233,3 +233,3 @@ * @returns A predicate that can be used in a Prismic REST API V2 request. | ||
* | ||
* @param documentType - Document tags to filter queried content. | ||
* @param tags - Document tags to filter queried content. | ||
* | ||
@@ -552,4 +552,6 @@ * @returns A predicate that can be used in a Prismic REST API V2 request. | ||
...actualParams, | ||
pageSize: | ||
pageSize: Math.min( | ||
limit, | ||
actualParams.pageSize || this.defaultParams?.pageSize || MAX_PAGE_SIZE, | ||
), | ||
}; | ||
@@ -664,3 +666,3 @@ | ||
ids: string[], | ||
params?: Partial<BuildQueryURLArgs> & FetchParams, | ||
params?: Partial<BuildQueryURLArgs> & GetAllParams & FetchParams, | ||
): Promise<TDocument[]> { | ||
@@ -771,3 +773,3 @@ return await this.dangerouslyGetAll<TDocument>( | ||
uids: string[], | ||
params?: Partial<BuildQueryURLArgs> & FetchParams, | ||
params?: Partial<BuildQueryURLArgs> & GetAllParams & FetchParams, | ||
): Promise<TDocument[]> { | ||
@@ -857,3 +859,5 @@ return await this.dangerouslyGetAll<TDocument>( | ||
documentType: string, | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams, | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & | ||
GetAllParams & | ||
FetchParams, | ||
): Promise<TDocument[]> { | ||
@@ -910,3 +914,5 @@ return await this.dangerouslyGetAll<TDocument>( | ||
tag: string, | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams, | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & | ||
GetAllParams & | ||
FetchParams, | ||
): Promise<TDocument[]> { | ||
@@ -963,3 +969,5 @@ return await this.dangerouslyGetAll<TDocument>( | ||
tags: string[], | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams, | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & | ||
GetAllParams & | ||
FetchParams, | ||
): Promise<TDocument[]> { | ||
@@ -1016,3 +1024,5 @@ return await this.dangerouslyGetAll<TDocument>( | ||
tags: string[], | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & FetchParams, | ||
params?: Partial<Omit<BuildQueryURLArgs, "page">> & | ||
GetAllParams & | ||
FetchParams, | ||
): Promise<TDocument[]> { | ||
@@ -1270,3 +1280,3 @@ return await this.dangerouslyGetAll<TDocument>( | ||
* | ||
* @param id - The ID of the Release. | ||
* @param releaseID - The ID of the Release. | ||
*/ | ||
@@ -1294,3 +1304,3 @@ queryContentFromReleaseByID(releaseID: string): void { | ||
* | ||
* @param label - The label of the Release. | ||
* @param releaseLabel - The label of the Release. | ||
*/ | ||
@@ -1297,0 +1307,0 @@ queryContentFromReleaseByLabel(releaseLabel: string): void { |
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
412100
4976