diff --git a/docs/api/cozy-client/classes/CozyLink.md b/docs/api/cozy-client/classes/CozyLink.md index ce4ace3801..ad48952f95 100644 --- a/docs/api/cozy-client/classes/CozyLink.md +++ b/docs/api/cozy-client/classes/CozyLink.md @@ -29,9 +29,9 @@ ## Methods -### persistData +### persistCozyData -▸ **persistData**(`data`, `forward`): `void` +▸ **persistCozyData**(`data`, `forward`): `void` *Parameters* diff --git a/docs/api/cozy-client/classes/FlagshipLink.md b/docs/api/cozy-client/classes/FlagshipLink.md index f45a9368f7..e1147b5552 100644 --- a/docs/api/cozy-client/classes/FlagshipLink.md +++ b/docs/api/cozy-client/classes/FlagshipLink.md @@ -19,8 +19,6 @@ | Name | Type | Description | | :------ | :------ | :------ | | `[options]` | `Object` | Options | -| `[options].client` | `any` | - | -| `[options].stackClient` | `any` | - | | `[options].webviewIntent` | `WebviewService` | - | *Overrides* @@ -29,33 +27,23 @@ *Defined in* -[packages/cozy-client/src/FlagshipLink.js:11](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L11) +[packages/cozy-client/src/FlagshipLink.js:8](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L8) ## Properties -### stackClient - -• **stackClient**: `any` - -*Defined in* - -[packages/cozy-client/src/FlagshipLink.js:18](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L18) - -*** - ### webviewIntent • **webviewIntent**: `WebviewService` *Defined in* -[packages/cozy-client/src/FlagshipLink.js:19](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L19) +[packages/cozy-client/src/FlagshipLink.js:10](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L10) ## Methods -### persistData +### persistCozyData -▸ **persistData**(`data`, `forward`): `Promise`<`void`> +▸ **persistCozyData**(`data`, `forward`): `Promise`<`void`> *Parameters* @@ -70,11 +58,11 @@ *Overrides* -[CozyLink](CozyLink.md).[persistData](CozyLink.md#persistdata) +[CozyLink](CozyLink.md).[persistCozyData](CozyLink.md#persistcozydata) *Defined in* -[packages/cozy-client/src/FlagshipLink.js:34](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L34) +[packages/cozy-client/src/FlagshipLink.js:25](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L25) *** @@ -94,7 +82,7 @@ *Defined in* -[packages/cozy-client/src/FlagshipLink.js:22](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L22) +[packages/cozy-client/src/FlagshipLink.js:13](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L13) *** @@ -120,7 +108,7 @@ *Defined in* -[packages/cozy-client/src/FlagshipLink.js:30](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L30) +[packages/cozy-client/src/FlagshipLink.js:21](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L21) *** @@ -134,4 +122,4 @@ *Defined in* -[packages/cozy-client/src/FlagshipLink.js:26](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L26) +[packages/cozy-client/src/FlagshipLink.js:17](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/FlagshipLink.js#L17) diff --git a/docs/api/cozy-client/classes/StackLink.md b/docs/api/cozy-client/classes/StackLink.md index 5bdcd6533b..45f4530f4f 100644 --- a/docs/api/cozy-client/classes/StackLink.md +++ b/docs/api/cozy-client/classes/StackLink.md @@ -94,9 +94,9 @@ Transfers queries and mutations to a remote stack *** -### persistData +### persistCozyData -▸ **persistData**(`data`, `forward`): `Promise`<`any`> +▸ **persistCozyData**(`data`, `forward`): `Promise`<`any`> *Parameters* @@ -111,7 +111,7 @@ Transfers queries and mutations to a remote stack *Overrides* -[CozyLink](CozyLink.md).[persistData](CozyLink.md#persistdata) +[CozyLink](CozyLink.md).[persistCozyData](CozyLink.md#persistcozydata) *Defined in* diff --git a/docs/api/cozy-pouch-link/classes/PouchLink.md b/docs/api/cozy-pouch-link/classes/PouchLink.md index 6402d9c84d..db60627986 100644 --- a/docs/api/cozy-pouch-link/classes/PouchLink.md +++ b/docs/api/cozy-pouch-link/classes/PouchLink.md @@ -32,7 +32,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:87](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L87) +[cozy-pouch-link/src/CozyPouchLink.js:87](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L87) ## Properties @@ -42,7 +42,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:141](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L141) +[cozy-pouch-link/src/CozyPouchLink.js:140](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L140) *** @@ -52,7 +52,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:97](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L97) +[cozy-pouch-link/src/CozyPouchLink.js:97](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L97) *** @@ -62,17 +62,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:98](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L98) - -*** - -### ignoreWarmup - -• **ignoreWarmup**: `any` - -*Defined in* - -[CozyPouchLink.js:103](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L103) +[cozy-pouch-link/src/CozyPouchLink.js:98](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L98) *** @@ -82,7 +72,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:99](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L99) +[cozy-pouch-link/src/CozyPouchLink.js:99](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L99) *** @@ -92,7 +82,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:91](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L91) +[cozy-pouch-link/src/CozyPouchLink.js:91](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L91) *** @@ -102,7 +92,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:211](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L211) +[cozy-pouch-link/src/CozyPouchLink.js:210](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L210) *** @@ -112,7 +102,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:106](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L106) +[cozy-pouch-link/src/CozyPouchLink.js:105](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L105) *** @@ -122,7 +112,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:100](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L100) +[cozy-pouch-link/src/CozyPouchLink.js:100](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L100) ## Methods @@ -142,7 +132,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:670](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L670) +[cozy-pouch-link/src/CozyPouchLink.js:661](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L661) *** @@ -162,7 +152,7 @@ CozyLink.constructor *Defined in* -[CozyPouchLink.js:631](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L631) +[cozy-pouch-link/src/CozyPouchLink.js:622](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L622) *** @@ -188,7 +178,7 @@ Create the PouchDB index if not existing *Defined in* -[CozyPouchLink.js:468](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L468) +[cozy-pouch-link/src/CozyPouchLink.js:467](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L467) *** @@ -209,7 +199,7 @@ Create the PouchDB index if not existing *Defined in* -[CozyPouchLink.js:674](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L674) +[cozy-pouch-link/src/CozyPouchLink.js:665](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L665) *** @@ -229,7 +219,7 @@ Create the PouchDB index if not existing *Defined in* -[CozyPouchLink.js:659](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L659) +[cozy-pouch-link/src/CozyPouchLink.js:650](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L650) *** @@ -251,7 +241,7 @@ Create the PouchDB index if not existing *Defined in* -[CozyPouchLink.js:601](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L601) +[cozy-pouch-link/src/CozyPouchLink.js:592](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L592) *** @@ -271,7 +261,7 @@ Create the PouchDB index if not existing *Defined in* -[CozyPouchLink.js:532](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L532) +[cozy-pouch-link/src/CozyPouchLink.js:531](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L531) *** @@ -295,7 +285,7 @@ Retrieve the PouchDB index if exist, undefined otherwise *Defined in* -[CozyPouchLink.js:492](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L492) +[cozy-pouch-link/src/CozyPouchLink.js:491](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L491) *** @@ -315,7 +305,7 @@ Retrieve the PouchDB index if exist, undefined otherwise *Defined in* -[CozyPouchLink.js:328](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L328) +[cozy-pouch-link/src/CozyPouchLink.js:327](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L327) *** @@ -335,7 +325,7 @@ Retrieve the PouchDB index if exist, undefined otherwise *Defined in* -[CozyPouchLink.js:121](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L121) +[cozy-pouch-link/src/CozyPouchLink.js:120](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L120) *** @@ -355,7 +345,7 @@ Retrieve the PouchDB index if exist, undefined otherwise *Defined in* -[CozyPouchLink.js:324](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L324) +[cozy-pouch-link/src/CozyPouchLink.js:323](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L323) *** @@ -375,7 +365,7 @@ Retrieve the PouchDB index if exist, undefined otherwise *Defined in* -[CozyPouchLink.js:265](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L265) +[cozy-pouch-link/src/CozyPouchLink.js:264](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L264) *** @@ -395,7 +385,7 @@ Retrieve the PouchDB index if exist, undefined otherwise *Defined in* -[CozyPouchLink.js:260](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L260) +[cozy-pouch-link/src/CozyPouchLink.js:259](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L259) *** @@ -421,7 +411,7 @@ Emits an event (pouchlink:sync:end) when the sync (all doctypes) is done *Defined in* -[CozyPouchLink.js:246](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L246) +[cozy-pouch-link/src/CozyPouchLink.js:245](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L245) *** @@ -441,7 +431,7 @@ Emits an event (pouchlink:sync:end) when the sync (all doctypes) is done *Defined in* -[CozyPouchLink.js:454](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L454) +[cozy-pouch-link/src/CozyPouchLink.js:453](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L453) *** @@ -471,7 +461,7 @@ Migrate the current adapter *Defined in* -[CozyPouchLink.js:155](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L155) +[cozy-pouch-link/src/CozyPouchLink.js:154](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L154) *** @@ -496,7 +486,7 @@ the need to wait for the warmup *Defined in* -[CozyPouchLink.js:440](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L440) +[cozy-pouch-link/src/CozyPouchLink.js:439](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L439) *** @@ -510,7 +500,7 @@ the need to wait for the warmup *Defined in* -[CozyPouchLink.js:174](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L174) +[cozy-pouch-link/src/CozyPouchLink.js:173](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L173) *** @@ -530,7 +520,32 @@ the need to wait for the warmup *Defined in* -[CozyPouchLink.js:304](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L304) +[cozy-pouch-link/src/CozyPouchLink.js:303](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L303) + +*** + +### persistCozyData + +▸ **persistCozyData**(`data`, `forward`): `void` + +*Parameters* + +| Name | Type | +| :------ | :------ | +| `data` | `any` | +| `forward` | `any` | + +*Returns* + +`void` + +*Inherited from* + +CozyLink.persistCozyData + +*Defined in* + +[cozy-client/types/CozyLink.d.ts:4](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/types/CozyLink.d.ts#L4) *** @@ -549,13 +564,9 @@ the need to wait for the warmup `Promise`<`void`> -*Overrides* - -CozyLink.persistData - *Defined in* -[CozyPouchLink.js:395](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L395) +[cozy-pouch-link/src/CozyPouchLink.js:394](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L394) *** @@ -575,7 +586,7 @@ CozyLink.persistData *Defined in* -[CozyPouchLink.js:140](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L140) +[cozy-pouch-link/src/CozyPouchLink.js:139](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L139) *** @@ -601,7 +612,7 @@ CozyLink.request *Defined in* -[CozyPouchLink.js:347](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L347) +[cozy-pouch-link/src/CozyPouchLink.js:346](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L346) *** @@ -615,7 +626,7 @@ CozyLink.request *Defined in* -[CozyPouchLink.js:230](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L230) +[cozy-pouch-link/src/CozyPouchLink.js:229](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L229) *** @@ -634,7 +645,7 @@ Emits pouchlink:sync:start event when the replication begins *Defined in* -[CozyPouchLink.js:279](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L279) +[cozy-pouch-link/src/CozyPouchLink.js:278](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L278) *** @@ -653,7 +664,7 @@ Emits pouchlink:sync:stop event *Defined in* -[CozyPouchLink.js:296](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L296) +[cozy-pouch-link/src/CozyPouchLink.js:295](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L295) *** @@ -673,7 +684,7 @@ Emits pouchlink:sync:stop event *Defined in* -[CozyPouchLink.js:332](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L332) +[cozy-pouch-link/src/CozyPouchLink.js:331](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L331) *** @@ -687,7 +698,7 @@ Emits pouchlink:sync:stop event *Defined in* -[CozyPouchLink.js:696](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L696) +[cozy-pouch-link/src/CozyPouchLink.js:687](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L687) *** @@ -707,7 +718,7 @@ Emits pouchlink:sync:stop event *Defined in* -[CozyPouchLink.js:636](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L636) +[cozy-pouch-link/src/CozyPouchLink.js:627](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L627) *** @@ -727,7 +738,7 @@ Emits pouchlink:sync:stop event *Defined in* -[CozyPouchLink.js:641](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L641) +[cozy-pouch-link/src/CozyPouchLink.js:632](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L632) *** @@ -752,4 +763,4 @@ The adapter name *Defined in* -[CozyPouchLink.js:116](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L116) +[cozy-pouch-link/src/CozyPouchLink.js:115](https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L115) diff --git a/packages/cozy-client/types/CozyClient.d.ts b/packages/cozy-client/types/CozyClient.d.ts index 106e61903f..89845ac3b0 100644 --- a/packages/cozy-client/types/CozyClient.d.ts +++ b/packages/cozy-client/types/CozyClient.d.ts @@ -40,10 +40,6 @@ export type CozyClientDocument = { * - When true the document should NOT be replicated to the remote database */ cozyLocalOnly?: boolean; - /** - * - When true the document has been retrieved from a local PouchDB - */ - cozyFromPouch?: boolean; }; export type ClientOptions = { client?: object; diff --git a/packages/cozy-client/types/CozyLink.d.ts b/packages/cozy-client/types/CozyLink.d.ts index bf6173d9c0..5d229867d8 100644 --- a/packages/cozy-client/types/CozyLink.d.ts +++ b/packages/cozy-client/types/CozyLink.d.ts @@ -1,6 +1,6 @@ export default class CozyLink { constructor(requestHandler: any, persistHandler: any); request(operation: any, result: any, forward: any): void; - persistData(data: any, forward: any): void; + persistCozyData(data: any, forward: any): void; } export function chain(links: any): any; diff --git a/packages/cozy-client/types/FlagshipLink.d.ts b/packages/cozy-client/types/FlagshipLink.d.ts index 4dfbc56053..3b3e389fa8 100644 --- a/packages/cozy-client/types/FlagshipLink.d.ts +++ b/packages/cozy-client/types/FlagshipLink.d.ts @@ -1,16 +1,11 @@ export default class FlagshipLink extends CozyLink { /** * @param {object} [options] - Options - * @param {object} [options.stackClient] - A StackClient - * @param {object} [options.client] - A StackClient (deprecated) * @param {import('cozy-intent').WebviewService} [options.webviewIntent] - The webview's intent reference */ - constructor({ client, stackClient, webviewIntent }?: { - stackClient: object; - client: object; + constructor({ webviewIntent }?: { webviewIntent: import('cozy-intent').WebviewService; }); - stackClient: any; webviewIntent: import("cozy-intent").WebviewService; registerClient(client: any): void; reset(): void; diff --git a/packages/cozy-client/types/types.d.ts b/packages/cozy-client/types/types.d.ts index a9a9c792c0..f9253f8642 100644 --- a/packages/cozy-client/types/types.d.ts +++ b/packages/cozy-client/types/types.d.ts @@ -758,10 +758,6 @@ export type CozyClientDocument = { * - When true the document should NOT be replicated to the remote database */ cozyLocalOnly?: boolean; - /** - * - When true the document has been retrieved from a local PouchDB - */ - cozyFromPouch?: boolean; }; /** * - A io.cozy.files document's metadata diff --git a/packages/cozy-pouch-link/types/CozyPouchLink.d.ts b/packages/cozy-pouch-link/types/CozyPouchLink.d.ts index edac36c855..b972a56b36 100644 --- a/packages/cozy-pouch-link/types/CozyPouchLink.d.ts +++ b/packages/cozy-pouch-link/types/CozyPouchLink.d.ts @@ -60,7 +60,6 @@ declare class PouchLink extends CozyLink { doctypesReplicationOptions: Record; indexes: {}; storage: PouchLocalStorage; - ignoreWarmup: any; /** @type {Record} - Stores replication states per doctype */ replicationStatus: Record; getReplicationURL(doctype: any): string; @@ -132,6 +131,7 @@ declare class PouchLink extends CozyLink { getSyncInfo(doctype: any): import("./types").SyncInfo; getPouch(doctype: any): any; supportsOperation(operation: any): boolean; + persistData(data: any, forward?: (operation: any, result?: any) => void): Promise; /** * Retrieve the existing document from Pouch * diff --git a/packages/cozy-pouch-link/types/helpers.d.ts b/packages/cozy-pouch-link/types/helpers.d.ts index 81dc61d84d..f533cb7334 100644 --- a/packages/cozy-pouch-link/types/helpers.d.ts +++ b/packages/cozy-pouch-link/types/helpers.d.ts @@ -8,4 +8,9 @@ declare namespace helpers { function isDesignDocument(doc: any): boolean; function isDeletedDocument(doc: any): any; function insertBulkDocs(db: any, docs: any): Promise; + function normalizeFindSelector({ selector, sort, indexedFields }: { + selector: any; + sort: any; + indexedFields: any; + }): any; } diff --git a/packages/cozy-pouch-link/types/jsonapi.d.ts b/packages/cozy-pouch-link/types/jsonapi.d.ts index 6dcd082731..886261a900 100644 --- a/packages/cozy-pouch-link/types/jsonapi.d.ts +++ b/packages/cozy-pouch-link/types/jsonapi.d.ts @@ -1,5 +1,10 @@ export function normalizeDoc(doc: any, doctype: any, client: any): any; -export function fromPouchResult(res: any, withRows: any, doctype: any, client: any): { +export function fromPouchResult({ res, withRows, doctype, client }: { + res: any; + withRows: any; + doctype: any; + client: any; +}): { data: any; meta?: undefined; skip?: undefined; diff --git a/packages/cozy-pouch-link/types/startReplication.d.ts b/packages/cozy-pouch-link/types/startReplication.d.ts index 44ff8eb07b..5b769edb96 100644 --- a/packages/cozy-pouch-link/types/startReplication.d.ts +++ b/packages/cozy-pouch-link/types/startReplication.d.ts @@ -4,4 +4,9 @@ export function startReplication(pouch: object, replicationOptions: { doctype: string; warmupQueries: import('cozy-client/types/types').Query[]; }, getReplicationURL: Function, storage: import('./localStorage').PouchLocalStorage): import('./types').CancelablePromise; -export function replicateAllDocs(db: object, baseUrl: string, doctype: string, storage: import('./localStorage').PouchLocalStorage): Promise; +export function replicateAllDocs({ db, baseUrl, doctype, storage }: { + db: object; + baseUrl: string; + doctype: string; + storage: import('./localStorage').PouchLocalStorage; +}): Promise;