diff --git a/docs/api/cozy-client/README.md b/docs/api/cozy-client/README.md index 92d11c4b3..7950db15f 100644 --- a/docs/api/cozy-client/README.md +++ b/docs/api/cozy-client/README.md @@ -92,7 +92,7 @@ cozy-client *Defined in* -packages/cozy-client/src/performances/defaultPerformanceApi.js:2 +[packages/cozy-client/src/performances/defaultPerformanceApi.js:2](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/performances/defaultPerformanceApi.js#L2) *** @@ -163,7 +163,7 @@ This hook manages the state during the saving of a document *Defined in* -packages/cozy-client/src/performances/webPerformanceApi.js:42 +[packages/cozy-client/src/performances/webPerformanceApi.js:42](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/performances/webPerformanceApi.js#L42) ## Functions diff --git a/docs/api/cozy-client/classes/CozyClient.md b/docs/api/cozy-client/classes/CozyClient.md index 2c678bb8d..812999034 100644 --- a/docs/api/cozy-client/classes/CozyClient.md +++ b/docs/api/cozy-client/classes/CozyClient.md @@ -1564,13 +1564,14 @@ Contains the fetched token and the client information. ### requestMutation -▸ **requestMutation**(`definition`): `any` +▸ **requestMutation**(`definition`, `options`): `any` *Parameters* | Name | Type | | :------ | :------ | | `definition` | `any` | +| `options` | `any` | *Returns* diff --git a/docs/api/cozy-client/classes/CozyLink.md b/docs/api/cozy-client/classes/CozyLink.md index 9c8abfae5..f423852b6 100644 --- a/docs/api/cozy-client/classes/CozyLink.md +++ b/docs/api/cozy-client/classes/CozyLink.md @@ -48,13 +48,13 @@ Persist the given data into the links storage *Defined in* -[packages/cozy-client/src/CozyLink.js:31](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/CozyLink.js#L31) +[packages/cozy-client/src/CozyLink.js:32](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/CozyLink.js#L32) *** ### request -▸ **request**(`operation`, `result`, `forward`): `Promise`<`any`> +▸ **request**(`operation`, `options`, `result`, `forward`): `Promise`<`any`> Request the given operation from the link @@ -63,6 +63,7 @@ Request the given operation from the link | Name | Type | Description | | :------ | :------ | :------ | | `operation` | `any` | The operation to request | +| `options` | `any` | The request options | | `result` | `any` | The result from the previous request of the chain | | `forward` | `any` | The next request of the chain | @@ -72,7 +73,7 @@ Request the given operation from the link *Defined in* -[packages/cozy-client/src/CozyLink.js:20](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/CozyLink.js#L20) +[packages/cozy-client/src/CozyLink.js:21](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/CozyLink.js#L21) *** @@ -88,4 +89,4 @@ Reset the link data *Defined in* -[packages/cozy-client/src/CozyLink.js:40](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/CozyLink.js#L40) +[packages/cozy-client/src/CozyLink.js:41](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/CozyLink.js#L41) diff --git a/docs/api/cozy-client/classes/StackLink.md b/docs/api/cozy-client/classes/StackLink.md index 26ec8a6a3..3cfc62da2 100644 --- a/docs/api/cozy-client/classes/StackLink.md +++ b/docs/api/cozy-client/classes/StackLink.md @@ -64,13 +64,14 @@ Transfers queries and mutations to a remote stack ### executeMutation -▸ **executeMutation**(`mutation`, `result`, `forward`): `Promise`<`any`> +▸ **executeMutation**(`mutation`, `options`, `result`, `forward`): `Promise`<`any`> *Parameters* | Name | Type | | :------ | :------ | | `mutation` | `any` | +| `options` | `any` | | `result` | `any` | | `forward` | `any` | @@ -153,7 +154,7 @@ Persist the given data into the links storage ### request -▸ **request**(`operation`, `result`, `forward`): `Promise`<`any`> +▸ **request**(`operation`, `options`, `result`, `forward`): `Promise`<`any`> Request the given operation from the link @@ -162,6 +163,7 @@ Request the given operation from the link | Name | Type | | :------ | :------ | | `operation` | `any` | +| `options` | `any` | | `result` | `any` | | `forward` | `any` | diff --git a/docs/api/cozy-client/classes/WebFlagshipLink.md b/docs/api/cozy-client/classes/WebFlagshipLink.md index b405fc2b3..ec4d67352 100644 --- a/docs/api/cozy-client/classes/WebFlagshipLink.md +++ b/docs/api/cozy-client/classes/WebFlagshipLink.md @@ -90,7 +90,7 @@ Persist the given data into the links storage ### request -▸ **request**(`operation`, `result`, `forward`): `Promise`<`boolean`> +▸ **request**(`operation`, `options`, `result`, `forward`): `Promise`<`boolean`> Request the given operation from the link @@ -99,6 +99,7 @@ Request the given operation from the link | Name | Type | | :------ | :------ | | `operation` | `any` | +| `options` | `any` | | `result` | `any` | | `forward` | `any` | diff --git a/docs/api/cozy-pouch-link/classes/PouchLink.md b/docs/api/cozy-pouch-link/classes/PouchLink.md index d1e270a8b..5bb307fcc 100644 --- a/docs/api/cozy-pouch-link/classes/PouchLink.md +++ b/docs/api/cozy-pouch-link/classes/PouchLink.md @@ -255,13 +255,14 @@ Create the PouchDB index if not existing ### executeMutation -▸ **executeMutation**(`mutation`, `result`, `forward`): `Promise`<`any`> +▸ **executeMutation**(`mutation`, `options`, `result`, `forward`): `Promise`<`any`> *Parameters* | Name | Type | | :------ | :------ | | `mutation` | `any` | +| `options` | `any` | | `result` | `any` | | `forward` | `any` | @@ -652,13 +653,14 @@ CozyLink.persistCozyData ### request -▸ **request**(`operation`, `result?`, `forward?`): `Promise`<`any`> +▸ **request**(`operation`, `options`, `result?`, `forward?`): `Promise`<`any`> *Parameters* | Name | Type | Default value | | :------ | :------ | :------ | | `operation` | `any` | `undefined` | +| `options` | `any` | `undefined` | | `result` | `any` | `null` | | `forward` | (`operation`: `any`, `result`: `any`) => `void` | `doNothing` | diff --git a/packages/cozy-client/types/CozyClient.d.ts b/packages/cozy-client/types/CozyClient.d.ts index f4b4c33e5..eb34049ed 100644 --- a/packages/cozy-client/types/CozyClient.d.ts +++ b/packages/cozy-client/types/CozyClient.d.ts @@ -535,7 +535,7 @@ declare class CozyClient { * @private */ private fetchRelationships; - requestMutation(definition: any): any; + requestMutation(definition: any, options: any): any; getIncludesRelationships(queryDefinition: any): import("lodash").Dictionary; /** * Returns documents with their relationships resolved according to their schema. diff --git a/packages/cozy-client/types/CozyLink.d.ts b/packages/cozy-client/types/CozyLink.d.ts index 27dda27f5..f952627cc 100644 --- a/packages/cozy-client/types/CozyLink.d.ts +++ b/packages/cozy-client/types/CozyLink.d.ts @@ -4,11 +4,12 @@ export default class CozyLink { * Request the given operation from the link * * @param {any} operation - The operation to request + * @param {any} options - The request options * @param {any} result - The result from the previous request of the chain * @param {any} forward - The next request of the chain * @returns {Promise} */ - request(operation: any, result: any, forward: any): Promise; + request(operation: any, options: any, result: any, forward: any): Promise; /** * Persist the given data into the links storage * diff --git a/packages/cozy-client/types/StackLink.d.ts b/packages/cozy-client/types/StackLink.d.ts index 6f0a7ebe8..070bd4785 100644 --- a/packages/cozy-client/types/StackLink.d.ts +++ b/packages/cozy-client/types/StackLink.d.ts @@ -27,7 +27,7 @@ export default class StackLink extends CozyLink { * @returns {Promise} */ executeQuery(query: QueryDefinition): Promise; - executeMutation(mutation: any, result: any, forward: any): Promise; + executeMutation(mutation: any, options: any, result: any, forward: any): Promise; } export type StackLinkOptions = { /** diff --git a/packages/cozy-pouch-link/types/CozyPouchLink.d.ts b/packages/cozy-pouch-link/types/CozyPouchLink.d.ts index 1564f051d..5a29423de 100644 --- a/packages/cozy-pouch-link/types/CozyPouchLink.d.ts +++ b/packages/cozy-pouch-link/types/CozyPouchLink.d.ts @@ -275,7 +275,7 @@ declare class PouchLink extends CozyLink { skip: any; next: boolean; }>; - executeMutation(mutation: any, result: any, forward: any): Promise; + executeMutation(mutation: any, options: any, result: any, forward: any): Promise; createDocument(mutation: any): Promise; updateDocument(mutation: any): Promise; updateDocuments(mutation: any): Promise;