diff --git a/docs/api/cozy-client/classes/CozyClient.md b/docs/api/cozy-client/classes/CozyClient.md index 22e902acbb..3a2349f736 100644 --- a/docs/api/cozy-client/classes/CozyClient.md +++ b/docs/api/cozy-client/classes/CozyClient.md @@ -1310,7 +1310,7 @@ executes its query when mounted if no fetch policy has been indicated. ### queryAll -▸ **queryAll**(`queryDefinition`, `options?`): `Promise`<`any`> +▸ **queryAll**(`queryDefinition`, `options?`): `Promise`<`CozyClientDocument`\[]> Will fetch all documents for a `queryDefinition`, automatically fetching more documents if the total of documents is superior to the pagination limit. Can @@ -1325,7 +1325,7 @@ result in a lot of network requests. *Returns* -`Promise`<`any`> +`Promise`<`CozyClientDocument`\[]> All documents matching the query diff --git a/packages/cozy-client/src/CozyClient.js b/packages/cozy-client/src/CozyClient.js index 118b94a866..cbbe3b92c6 100644 --- a/packages/cozy-client/src/CozyClient.js +++ b/packages/cozy-client/src/CozyClient.js @@ -994,7 +994,7 @@ client.query(Q('io.cozy.bills'))`) * * @param {QueryDefinition} queryDefinition - Definition to be executed * @param {QueryOptions} [options] - Options - * @returns {Promise} All documents matching the query + * @returns {Promise} All documents matching the query */ async queryAll(queryDefinition, options = {}) { const queryId = diff --git a/packages/cozy-client/types/CozyClient.d.ts b/packages/cozy-client/types/CozyClient.d.ts index 0f202409e8..2072584dbe 100644 --- a/packages/cozy-client/types/CozyClient.d.ts +++ b/packages/cozy-client/types/CozyClient.d.ts @@ -426,9 +426,9 @@ declare class CozyClient { * * @param {QueryDefinition} queryDefinition - Definition to be executed * @param {QueryOptions} [options] - Options - * @returns {Promise} All documents matching the query + * @returns {Promise} All documents matching the query */ - queryAll(queryDefinition: QueryDefinition, options?: QueryOptions): Promise; + queryAll(queryDefinition: QueryDefinition, options?: QueryOptions): Promise; watchQuery(...args: any[]): ObservableQuery; makeObservableQuery(queryDefinition: any, options?: {}): ObservableQuery; /**