@@ -27,6 +27,7 @@ constructor - Initializes a new PouchLink
2727| ` opts ` | ` Object ` | - |
2828| ` opts.doctypes ` | ` string ` \[ ] | Doctypes to replicate |
2929| ` opts.doctypesReplicationOptions ` | ` any ` \[ ] | A mapping from doctypes to replication options. All pouch replication options can be used, as well as the "strategy" option that determines which way the replication is done (can be "sync", "fromRemote" or "toRemote") |
30+ | ` opts.platform ` | ` LinkPlatform ` | Platform specific adapters and methods |
3031| ` opts.replicationInterval ` | ` number ` | - |
3132
3233* Overrides*
@@ -35,7 +36,7 @@ CozyLink.constructor
3536
3637* Defined in*
3738
38- [ CozyPouchLink.js:84 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L84 )
39+ [ CozyPouchLink.js:81 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L81 )
3940
4041## Properties
4142
@@ -45,7 +46,7 @@ CozyLink.constructor
4546
4647* Defined in*
4748
48- [ CozyPouchLink.js:132 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L132 )
49+ [ CozyPouchLink.js:134 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L134 )
4950
5051***
5152
@@ -55,7 +56,7 @@ CozyLink.constructor
5556
5657* Defined in*
5758
58- [ CozyPouchLink.js:94 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L94 )
59+ [ CozyPouchLink.js:91 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L91 )
5960
6061***
6162
@@ -65,7 +66,7 @@ CozyLink.constructor
6566
6667* Defined in*
6768
68- [ CozyPouchLink.js:95 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L95 )
69+ [ CozyPouchLink.js:92 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L92 )
6970
7071***
7172
@@ -75,17 +76,17 @@ CozyLink.constructor
7576
7677* Defined in*
7778
78- [ CozyPouchLink.js:96 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L96 )
79+ [ CozyPouchLink.js:93 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L93 )
7980
8081***
8182
8283### options
8384
84- • ** options** : { ` replicationInterval ` : ` number ` } & { ` doctypes ` : ` string ` \[ ] ; ` doctypesReplicationOptions ` : ` any ` \[ ] ; ` replicationInterval ` : ` number ` }
85+ • ** options** : { ` replicationInterval ` : ` number ` } & { ` doctypes ` : ` string ` \[ ] ; ` doctypesReplicationOptions ` : ` any ` \[ ] ; ` platform ` : ` LinkPlatform ` ; ` replicationInterval ` : ` number ` }
8586
8687* Defined in*
8788
88- [ CozyPouchLink.js:88 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L88 )
89+ [ CozyPouchLink.js:85 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L85 )
8990
9091***
9192
@@ -95,7 +96,7 @@ CozyLink.constructor
9596
9697* Defined in*
9798
98- [ CozyPouchLink.js:202 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L202 )
99+ [ CozyPouchLink.js:204 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L204 )
99100
100101***
101102
@@ -107,6 +108,16 @@ CozyLink.constructor
107108
108109[ CozyPouchLink.js:99] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L99 )
109110
111+ ***
112+
113+ ### storage
114+
115+ • ** storage** : ` PouchLocalStorage `
116+
117+ * Defined in*
118+
119+ [ CozyPouchLink.js:94] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L94 )
120+
110121## Methods
111122
112123### addReferencesTo
@@ -125,7 +136,7 @@ CozyLink.constructor
125136
126137* Defined in*
127138
128- [ CozyPouchLink.js:563 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L563 )
139+ [ CozyPouchLink.js:567 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L567 )
129140
130141***
131142
@@ -145,7 +156,7 @@ CozyLink.constructor
145156
146157* Defined in*
147158
148- [ CozyPouchLink.js:524 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L524 )
159+ [ CozyPouchLink.js:528 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L528 )
149160
150161***
151162
@@ -166,7 +177,7 @@ CozyLink.constructor
166177
167178* Defined in*
168179
169- [ CozyPouchLink.js:567 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L567 )
180+ [ CozyPouchLink.js:571 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L571 )
170181
171182***
172183
@@ -186,7 +197,7 @@ CozyLink.constructor
186197
187198* Defined in*
188199
189- [ CozyPouchLink.js:552 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L552 )
200+ [ CozyPouchLink.js:556 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L556 )
190201
191202***
192203
@@ -207,7 +218,7 @@ CozyLink.constructor
207218
208219* Defined in*
209220
210- [ CozyPouchLink.js:423 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L423 )
221+ [ CozyPouchLink.js:427 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L427 )
211222
212223***
213224
@@ -229,7 +240,7 @@ CozyLink.constructor
229240
230241* Defined in*
231242
232- [ CozyPouchLink.js:495 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L495 )
243+ [ CozyPouchLink.js:499 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L499 )
233244
234245***
235246
@@ -249,7 +260,7 @@ CozyLink.constructor
249260
250261* Defined in*
251262
252- [ CozyPouchLink.js:441 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L441 )
263+ [ CozyPouchLink.js:445 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L445 )
253264
254265***
255266
@@ -269,7 +280,7 @@ CozyLink.constructor
269280
270281* Defined in*
271282
272- [ CozyPouchLink.js:317 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L317 )
283+ [ CozyPouchLink.js:321 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L321 )
273284
274285***
275286
@@ -289,7 +300,7 @@ CozyLink.constructor
289300
290301* Defined in*
291302
292- [ CozyPouchLink.js:112 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L112 )
303+ [ CozyPouchLink.js:114 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L114 )
293304
294305***
295306
@@ -309,7 +320,7 @@ CozyLink.constructor
309320
310321* Defined in*
311322
312- [ CozyPouchLink.js:313 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L313 )
323+ [ CozyPouchLink.js:317 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L317 )
313324
314325***
315326
@@ -329,7 +340,7 @@ CozyLink.constructor
329340
330341* Defined in*
331342
332- [ CozyPouchLink.js:254 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L254 )
343+ [ CozyPouchLink.js:258 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L258 )
333344
334345***
335346
@@ -349,7 +360,7 @@ CozyLink.constructor
349360
350361* Defined in*
351362
352- [ CozyPouchLink.js:249 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L249 )
363+ [ CozyPouchLink.js:253 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L253 )
353364
354365***
355366
@@ -375,7 +386,7 @@ Emits an event (pouchlink:sync:end) when the sync (all doctypes) is done
375386
376387* Defined in*
377388
378- [ CozyPouchLink.js:235 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L235 )
389+ [ CozyPouchLink.js:239 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L239 )
379390
380391***
381392
@@ -395,7 +406,7 @@ Emits an event (pouchlink:sync:end) when the sync (all doctypes) is done
395406
396407* Defined in*
397408
398- [ CozyPouchLink.js:405 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L405 )
409+ [ CozyPouchLink.js:409 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L409 )
399410
400411***
401412
@@ -416,7 +427,7 @@ Emits an event (pouchlink:sync:end) when the sync (all doctypes) is done
416427
417428* Defined in*
418429
419- [ CozyPouchLink.js:410 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L410 )
430+ [ CozyPouchLink.js:414 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L414 )
420431
421432***
422433
@@ -446,13 +457,13 @@ Migrate the current adapter
446457
447458* Defined in*
448459
449- [ CozyPouchLink.js:146 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L146 )
460+ [ CozyPouchLink.js:148 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L148 )
450461
451462***
452463
453464### needsToWaitWarmup
454465
455- ▸ ** needsToWaitWarmup** (` doctype ` ): ` boolean `
466+ ▸ ** needsToWaitWarmup** (` doctype ` ): ` Promise ` < ` boolean ` >
456467
457468Check if there is warmup queries for this doctype
458469and return if those queries are already warmed up or not
@@ -465,13 +476,13 @@ and return if those queries are already warmed up or not
465476
466477* Returns*
467478
468- ` boolean `
479+ ` Promise ` < ` boolean ` >
469480
470481the need to wait for the warmup
471482
472483* Defined in*
473484
474- [ CozyPouchLink.js:391 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L391 )
485+ [ CozyPouchLink.js:395 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L395 )
475486
476487***
477488
@@ -485,7 +496,7 @@ the need to wait for the warmup
485496
486497* Defined in*
487498
488- [ CozyPouchLink.js:165 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L165 )
499+ [ CozyPouchLink.js:167 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L167 )
489500
490501***
491502
@@ -505,7 +516,7 @@ the need to wait for the warmup
505516
506517* Defined in*
507518
508- [ CozyPouchLink.js:293 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L293 )
519+ [ CozyPouchLink.js:297 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L297 )
509520
510521***
511522
@@ -525,13 +536,13 @@ the need to wait for the warmup
525536
526537* Defined in*
527538
528- [ CozyPouchLink.js:131 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L131 )
539+ [ CozyPouchLink.js:133 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L133 )
529540
530541***
531542
532543### request
533544
534- ▸ ** request** (` operation ` , ` result? ` , ` forward? ` ): ` void ` | ` Promise ` <` any ` >
545+ ▸ ** request** (` operation ` , ` result? ` , ` forward? ` ): ` Promise ` <` any ` >
535546
536547* Parameters*
537548
@@ -543,15 +554,15 @@ the need to wait for the warmup
543554
544555* Returns*
545556
546- ` void ` | ` Promise ` <` any ` >
557+ ` Promise ` <` any ` >
547558
548559* Overrides*
549560
550561CozyLink.request
551562
552563* Defined in*
553564
554- [ CozyPouchLink.js:336 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L336 )
565+ [ CozyPouchLink.js:340 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L340 )
555566
556567***
557568
@@ -565,7 +576,7 @@ CozyLink.request
565576
566577* Defined in*
567578
568- [ CozyPouchLink.js:219 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L219 )
579+ [ CozyPouchLink.js:223 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L223 )
569580
570581***
571582
@@ -584,7 +595,7 @@ Emits pouchlink:sync:start event when the replication begins
584595
585596* Defined in*
586597
587- [ CozyPouchLink.js:268 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L268 )
598+ [ CozyPouchLink.js:272 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L272 )
588599
589600***
590601
@@ -603,7 +614,7 @@ Emits pouchlink:sync:stop event
603614
604615* Defined in*
605616
606- [ CozyPouchLink.js:285 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L285 )
617+ [ CozyPouchLink.js:289 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L289 )
607618
608619***
609620
@@ -623,7 +634,7 @@ Emits pouchlink:sync:stop event
623634
624635* Defined in*
625636
626- [ CozyPouchLink.js:321 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L321 )
637+ [ CozyPouchLink.js:325 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L325 )
627638
628639***
629640
@@ -637,7 +648,7 @@ Emits pouchlink:sync:stop event
637648
638649* Defined in*
639650
640- [ CozyPouchLink.js:589 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L589 )
651+ [ CozyPouchLink.js:593 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L593 )
641652
642653***
643654
@@ -657,7 +668,7 @@ Emits pouchlink:sync:stop event
657668
658669* Defined in*
659670
660- [ CozyPouchLink.js:529 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L529 )
671+ [ CozyPouchLink.js:533 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L533 )
661672
662673***
663674
@@ -677,23 +688,29 @@ Emits pouchlink:sync:stop event
677688
678689* Defined in*
679690
680- [ CozyPouchLink.js:534 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L534 )
691+ [ CozyPouchLink.js:538 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L538 )
681692
682693***
683694
684695### getPouchAdapterName
685696
686- ▸ ` Static ` ** getPouchAdapterName** (): ` string `
697+ ▸ ` Static ` ** getPouchAdapterName** (` localStorage ` ): ` Promise ` < ` string ` >
687698
688699Return the PouchDB adapter name.
689700Should be IndexedDB for newest adapters.
690701
702+ * Parameters*
703+
704+ | Name | Type | Description |
705+ | :------ | :------ | :------ |
706+ | ` localStorage ` | ` LocalStorage ` | Methods to access local storage |
707+
691708* Returns*
692709
693- ` string `
710+ ` Promise ` < ` string ` >
694711
695712The adapter name
696713
697714* Defined in*
698715
699- [ CozyPouchLink.js:108 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L108 )
716+ [ CozyPouchLink.js:109 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-pouch-link/src/CozyPouchLink.js#L109 )
0 commit comments