@capgo/capacitor-updater 3.3.12 → 4.0.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs.json CHANGED
@@ -5,134 +5,180 @@
5
5
  "docs": "",
6
6
  "tags": [],
7
7
  "methods": [
8
+ {
9
+ "name": "notifyAppReady",
10
+ "signature": "() => Promise<BundleInfo>",
11
+ "parameters": [],
12
+ "returns": "Promise<BundleInfo>",
13
+ "tags": [
14
+ {
15
+ "name": "returns",
16
+ "text": "an Promise resolved directly"
17
+ },
18
+ {
19
+ "name": "throws",
20
+ "text": "An error if the something went wrong"
21
+ }
22
+ ],
23
+ "docs": "Notify Capacitor Updater that the current bundle is working (a rollback will occur of this method is not called on every app launch)",
24
+ "complexTypes": [
25
+ "BundleInfo"
26
+ ],
27
+ "slug": "notifyappready"
28
+ },
8
29
  {
9
30
  "name": "download",
10
- "signature": "(options: { url: string; }) => Promise<{ version: string; }>",
31
+ "signature": "(options: { url: string; version?: string; }) => Promise<BundleInfo>",
11
32
  "parameters": [
12
33
  {
13
34
  "name": "options",
14
35
  "docs": "",
15
- "type": "{ url: string; }"
36
+ "type": "{ url: string; version?: string | undefined; }"
16
37
  }
17
38
  ],
18
- "returns": "Promise<{ version: string; }>",
39
+ "returns": "Promise<BundleInfo>",
19
40
  "tags": [
20
41
  {
21
42
  "name": "returns",
22
- "text": "an Promise with version name of the downloaded version, version is generated by the plugin, it's a random string of 10 char length"
43
+ "text": "The {@link BundleInfo} for the specified version."
44
+ },
45
+ {
46
+ "name": "param",
47
+ "text": "url The URL of the bundle zip file (e.g: dist.zip) to be downloaded. (This can be any URL. E.g: Amazon S3, a github tag, any other place you've hosted your bundle.)"
23
48
  },
24
49
  {
25
50
  "name": "param",
26
- "text": "url The URL where download the version, it can be S3 github tag or whatever, it should be a zip file"
51
+ "text": "version (optional) set the version code/name of this bundle/version"
52
+ },
53
+ {
54
+ "name": "example",
55
+ "text": "https://example.com/versions/{version}/dist.zip"
27
56
  }
28
57
  ],
29
- "docs": "Download a new version from the provided URL, it should be a zip file, with files inside or with a unique folder inside with all your files",
30
- "complexTypes": [],
58
+ "docs": "Download a new version from the provided URL, it should be a zip file, with files inside or with a unique id inside with all your files",
59
+ "complexTypes": [
60
+ "BundleInfo"
61
+ ],
31
62
  "slug": "download"
32
63
  },
33
64
  {
34
- "name": "set",
35
- "signature": "(options: { version: string; versionName?: string; }) => Promise<void>",
65
+ "name": "next",
66
+ "signature": "(options: { id: string; }) => Promise<BundleInfo>",
36
67
  "parameters": [
37
68
  {
38
69
  "name": "options",
39
70
  "docs": "",
40
- "type": "{ version: string; versionName?: string | undefined; }"
71
+ "type": "{ id: string; }"
41
72
  }
42
73
  ],
43
- "returns": "Promise<void>",
74
+ "returns": "Promise<BundleInfo>",
44
75
  "tags": [
45
76
  {
46
77
  "name": "returns",
47
- "text": "an empty Promise when the version is set, if there are no index.html or no version folder throw an error"
78
+ "text": "The {@link BundleInfo} for the specified bundle id."
48
79
  },
49
80
  {
50
81
  "name": "param",
51
- "text": "version The version name to set as current version"
82
+ "text": "id The bundle id to set as current, next time the app is reloaded. See {@link BundleInfo.id}"
83
+ },
84
+ {
85
+ "name": "throws",
86
+ "text": "An error if there are is no index.html file inside the version folder."
52
87
  }
53
88
  ],
54
- "docs": "Set version as current version, set will return an error if there are is no index.html file inside the version folder. `versionName` is optional and it's a custom value that will be saved for you",
55
- "complexTypes": [],
56
- "slug": "set"
89
+ "docs": "Set the next bundle to be used when the app is reloaded.",
90
+ "complexTypes": [
91
+ "BundleInfo"
92
+ ],
93
+ "slug": "next"
57
94
  },
58
95
  {
59
- "name": "getId",
60
- "signature": "() => Promise<{ id: string; }>",
61
- "parameters": [],
62
- "returns": "Promise<{ id: string; }>",
63
- "tags": [
96
+ "name": "set",
97
+ "signature": "(options: { id: string; }) => Promise<void>",
98
+ "parameters": [
64
99
  {
65
- "name": "returns",
66
- "text": "an Promise with id for this device"
100
+ "name": "options",
101
+ "docs": "",
102
+ "type": "{ id: string; }"
67
103
  }
68
104
  ],
69
- "docs": "Get unique ID used to identify device into auto update server",
70
- "complexTypes": [],
71
- "slug": "getid"
72
- },
73
- {
74
- "name": "getPluginVersion",
75
- "signature": "() => Promise<{ version: string; }>",
76
- "parameters": [],
77
- "returns": "Promise<{ version: string; }>",
105
+ "returns": "Promise<void>",
78
106
  "tags": [
107
+ {
108
+ "name": "param",
109
+ "text": "id The bundle id to set as current. See {@link BundleInfo.id}"
110
+ },
79
111
  {
80
112
  "name": "returns",
81
- "text": "an Promise with version for this device"
113
+ "text": "An empty promise."
114
+ },
115
+ {
116
+ "name": "throws",
117
+ "text": "An error if there are is no index.html file inside the version folder."
82
118
  }
83
119
  ],
84
- "docs": "Get plugin version used in native code",
120
+ "docs": "Set the current bundle and immediately reloads the app.",
85
121
  "complexTypes": [],
86
- "slug": "getpluginversion"
122
+ "slug": "set"
87
123
  },
88
124
  {
89
125
  "name": "delete",
90
- "signature": "(options: { version: string; }) => Promise<void>",
126
+ "signature": "(options: { id: string; }) => Promise<void>",
91
127
  "parameters": [
92
128
  {
93
129
  "name": "options",
94
130
  "docs": "",
95
- "type": "{ version: string; }"
131
+ "type": "{ id: string; }"
96
132
  }
97
133
  ],
98
134
  "returns": "Promise<void>",
99
135
  "tags": [
100
136
  {
101
137
  "name": "returns",
102
- "text": "an empty Promise when the version is delete, otherwise throw an error"
138
+ "text": "an empty Promise when the bundle is deleted"
103
139
  },
104
140
  {
105
141
  "name": "param",
106
- "text": "version The version name to delete"
142
+ "text": "id The bundle id to delete (note, this is the bundle id, NOT the version name)"
143
+ },
144
+ {
145
+ "name": "throws",
146
+ "text": "An error if the something went wrong"
107
147
  }
108
148
  ],
109
- "docs": "Delete version in storage",
149
+ "docs": "Delete bundle in storage",
110
150
  "complexTypes": [],
111
151
  "slug": "delete"
112
152
  },
113
153
  {
114
154
  "name": "list",
115
- "signature": "() => Promise<{ versions: string[]; }>",
155
+ "signature": "() => Promise<{ bundles: BundleInfo[]; }>",
116
156
  "parameters": [],
117
- "returns": "Promise<{ versions: string[]; }>",
157
+ "returns": "Promise<{ bundles: BundleInfo[]; }>",
118
158
  "tags": [
119
159
  {
120
160
  "name": "returns",
121
161
  "text": "an Promise witht the version list"
162
+ },
163
+ {
164
+ "name": "throws",
165
+ "text": "An error if the something went wrong"
122
166
  }
123
167
  ],
124
168
  "docs": "Get all available versions",
125
- "complexTypes": [],
169
+ "complexTypes": [
170
+ "BundleInfo"
171
+ ],
126
172
  "slug": "list"
127
173
  },
128
174
  {
129
175
  "name": "reset",
130
- "signature": "(options?: { toAutoUpdate?: boolean | undefined; } | undefined) => Promise<void>",
176
+ "signature": "(options?: { toLastSuccessful?: boolean | undefined; } | undefined) => Promise<void>",
131
177
  "parameters": [
132
178
  {
133
179
  "name": "options",
134
180
  "docs": "",
135
- "type": "{ toAutoUpdate?: boolean | undefined; } | undefined"
181
+ "type": "{ toLastSuccessful?: boolean | undefined; } | undefined"
136
182
  }
137
183
  ],
138
184
  "returns": "Promise<void>",
@@ -143,7 +189,11 @@
143
189
  },
144
190
  {
145
191
  "name": "param",
146
- "text": "toAutoUpdate [false] if yes it reset to to the last AutoUpdate version instead of `builtin`"
192
+ "text": "toLastSuccessful [false] if yes it reset to to the last successfully loaded bundle instead of `builtin`"
193
+ },
194
+ {
195
+ "name": "throws",
196
+ "text": "An error if the something went wrong"
147
197
  }
148
198
  ],
149
199
  "docs": "Set the `builtin` version (the one sent to Apple store / Google play store ) as current version",
@@ -152,17 +202,23 @@
152
202
  },
153
203
  {
154
204
  "name": "current",
155
- "signature": "() => Promise<{ current: string; currentNative: string; }>",
205
+ "signature": "() => Promise<{ bundle: BundleInfo; native: string; }>",
156
206
  "parameters": [],
157
- "returns": "Promise<{ current: string; currentNative: string; }>",
207
+ "returns": "Promise<{ bundle: BundleInfo; native: string; }>",
158
208
  "tags": [
159
209
  {
160
210
  "name": "returns",
161
- "text": "an Promise with the current version name"
211
+ "text": "an Promise with the current bundle info"
212
+ },
213
+ {
214
+ "name": "throws",
215
+ "text": "An error if the something went wrong"
162
216
  }
163
217
  ],
164
- "docs": "Get the current version, if none are set it returns `builtin`, currentNative is the original version install on the device",
165
- "complexTypes": [],
218
+ "docs": "Get the current bundle, if none are set it returns `builtin`, currentNative is the original bundle installed on the device",
219
+ "complexTypes": [
220
+ "BundleInfo"
221
+ ],
166
222
  "slug": "current"
167
223
  },
168
224
  {
@@ -174,6 +230,10 @@
174
230
  {
175
231
  "name": "returns",
176
232
  "text": "an Promise resolved when the view is reloaded"
233
+ },
234
+ {
235
+ "name": "throws",
236
+ "text": "An error if the something went wrong"
177
237
  }
178
238
  ],
179
239
  "docs": "Reload the view",
@@ -181,64 +241,64 @@
181
241
  "slug": "reload"
182
242
  },
183
243
  {
184
- "name": "versionName",
185
- "signature": "() => Promise<{ versionName: string; }>",
186
- "parameters": [],
187
- "returns": "Promise<{ versionName: string; }>",
188
- "tags": [
244
+ "name": "setDelay",
245
+ "signature": "(options: { delay: boolean; }) => Promise<void>",
246
+ "parameters": [
189
247
  {
190
- "name": "returns",
191
- "text": "an Promise witht the current versionName"
248
+ "name": "options",
249
+ "docs": "",
250
+ "type": "{ delay: boolean; }"
192
251
  }
193
252
  ],
194
- "docs": "Get the version name, if it was set during the set phase",
195
- "complexTypes": [],
196
- "slug": "versionname"
197
- },
198
- {
199
- "name": "notifyAppReady",
200
- "signature": "() => Promise<void>",
201
- "parameters": [],
202
253
  "returns": "Promise<void>",
203
254
  "tags": [
204
255
  {
205
256
  "name": "returns",
206
257
  "text": "an Promise resolved directly"
258
+ },
259
+ {
260
+ "name": "throws",
261
+ "text": "An error if the something went wrong"
262
+ },
263
+ {
264
+ "name": "since",
265
+ "text": "4.0.0"
207
266
  }
208
267
  ],
209
- "docs": "Notify native plugin that the update is working, only in auto-update",
268
+ "docs": "Set delay to skip updates in the next time the app goes into the background",
210
269
  "complexTypes": [],
211
- "slug": "notifyappready"
270
+ "slug": "setdelay"
212
271
  },
213
272
  {
214
- "name": "delayUpdate",
215
- "signature": "() => Promise<void>",
216
- "parameters": [],
217
- "returns": "Promise<void>",
218
- "tags": [
273
+ "name": "getLatest",
274
+ "signature": "(options: { delay: boolean; }) => Promise<latestVersion>",
275
+ "parameters": [
219
276
  {
220
- "name": "returns",
221
- "text": "an Promise resolved directly"
277
+ "name": "options",
278
+ "docs": "",
279
+ "type": "{ delay: boolean; }"
222
280
  }
223
281
  ],
224
- "docs": "Skip updates in the next time the app goes into the background, only in auto-update",
225
- "complexTypes": [],
226
- "slug": "delayupdate"
227
- },
228
- {
229
- "name": "cancelDelay",
230
- "signature": "() => Promise<void>",
231
- "parameters": [],
232
- "returns": "Promise<void>",
282
+ "returns": "Promise<latestVersion>",
233
283
  "tags": [
234
284
  {
235
285
  "name": "returns",
236
- "text": "an Promise resolved directly"
286
+ "text": "an Promise resolved when url is loaded"
287
+ },
288
+ {
289
+ "name": "throws",
290
+ "text": "An error if the something went wrong"
291
+ },
292
+ {
293
+ "name": "since",
294
+ "text": "4.0.0"
237
295
  }
238
296
  ],
239
- "docs": "allow update in the next time the app goes into the background, only in auto-update",
240
- "complexTypes": [],
241
- "slug": "canceldelay"
297
+ "docs": "Get Latest version available from update Url",
298
+ "complexTypes": [
299
+ "latestVersion"
300
+ ],
301
+ "slug": "getlatest"
242
302
  },
243
303
  {
244
304
  "name": "addListener",
@@ -269,6 +329,35 @@
269
329
  ],
270
330
  "slug": "addlistenerdownload"
271
331
  },
332
+ {
333
+ "name": "addListener",
334
+ "signature": "(eventName: 'downloadComplete', listenerFunc: DownloadCompleteListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
335
+ "parameters": [
336
+ {
337
+ "name": "eventName",
338
+ "docs": "",
339
+ "type": "'downloadComplete'"
340
+ },
341
+ {
342
+ "name": "listenerFunc",
343
+ "docs": "",
344
+ "type": "DownloadCompleteListener"
345
+ }
346
+ ],
347
+ "returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
348
+ "tags": [
349
+ {
350
+ "name": "since",
351
+ "text": "4.0.0"
352
+ }
353
+ ],
354
+ "docs": "Listen for download event in the App, let you know when the download is started, loading and finished",
355
+ "complexTypes": [
356
+ "PluginListenerHandle",
357
+ "DownloadCompleteListener"
358
+ ],
359
+ "slug": "addlistenerdownloadcomplete"
360
+ },
272
361
  {
273
362
  "name": "addListener",
274
363
  "signature": "(eventName: 'majorAvailable', listenerFunc: MajorAvailableListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
@@ -300,17 +389,17 @@
300
389
  },
301
390
  {
302
391
  "name": "addListener",
303
- "signature": "(eventName: 'updateAvailable', listenerFunc: UpdateAvailableListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
392
+ "signature": "(eventName: 'updateFailed', listenerFunc: UpdateFailedListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
304
393
  "parameters": [
305
394
  {
306
395
  "name": "eventName",
307
396
  "docs": "",
308
- "type": "'updateAvailable'"
397
+ "type": "'updateFailed'"
309
398
  },
310
399
  {
311
400
  "name": "listenerFunc",
312
401
  "docs": "",
313
- "type": "UpdateAvailableListener"
402
+ "type": "UpdateFailedListener"
314
403
  }
315
404
  ],
316
405
  "returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
@@ -323,9 +412,66 @@
323
412
  "docs": "Listen for update event in the App, let you know when update is ready to install at next app start",
324
413
  "complexTypes": [
325
414
  "PluginListenerHandle",
326
- "UpdateAvailableListener"
415
+ "UpdateFailedListener"
416
+ ],
417
+ "slug": "addlistenerupdatefailed"
418
+ },
419
+ {
420
+ "name": "getId",
421
+ "signature": "() => Promise<{ id: string; }>",
422
+ "parameters": [],
423
+ "returns": "Promise<{ id: string; }>",
424
+ "tags": [
425
+ {
426
+ "name": "returns",
427
+ "text": "an Promise with id for this device"
428
+ },
429
+ {
430
+ "name": "throws",
431
+ "text": "An error if the something went wrong"
432
+ }
433
+ ],
434
+ "docs": "Get unique ID used to identify device (sent to auto update server)",
435
+ "complexTypes": [],
436
+ "slug": "getid"
437
+ },
438
+ {
439
+ "name": "getPluginVersion",
440
+ "signature": "() => Promise<{ version: string; }>",
441
+ "parameters": [],
442
+ "returns": "Promise<{ version: string; }>",
443
+ "tags": [
444
+ {
445
+ "name": "returns",
446
+ "text": "an Promise with version for this device"
447
+ },
448
+ {
449
+ "name": "throws",
450
+ "text": "An error if the something went wrong"
451
+ }
327
452
  ],
328
- "slug": "addlistenerupdateavailable"
453
+ "docs": "Get the native Capacitor Updater plugin version (sent to auto update server)",
454
+ "complexTypes": [],
455
+ "slug": "getpluginversion"
456
+ },
457
+ {
458
+ "name": "isAutoUpdateEnabled",
459
+ "signature": "() => Promise<{ enabled: boolean; }>",
460
+ "parameters": [],
461
+ "returns": "Promise<{ enabled: boolean; }>",
462
+ "tags": [
463
+ {
464
+ "name": "returns",
465
+ "text": "The status for auto update."
466
+ },
467
+ {
468
+ "name": "throws",
469
+ "text": "An error if the something went wrong"
470
+ }
471
+ ],
472
+ "docs": "Get the state of auto update config. This will return `false` in manual mode.",
473
+ "complexTypes": [],
474
+ "slug": "isautoupdateenabled"
329
475
  },
330
476
  {
331
477
  "name": "addListener",
@@ -364,15 +510,139 @@
364
510
  "properties": [],
365
511
  "importObject": [
366
512
  "PluginListenerHandle",
513
+ "\"@capacitor/cli\"",
367
514
  "DownloadEvent",
368
515
  "MajorAvailableEvent",
369
- "UpdateAvailableEvent",
516
+ "DownloadCompleteEvent",
517
+ "UpdateFailedEvent",
518
+ "latestVersion",
519
+ "BundleInfo",
520
+ "BundleStatus",
370
521
  "DownloadChangeListener",
522
+ "DownloadCompleteListener",
371
523
  "MajorAvailableListener",
372
- "UpdateAvailableListener"
524
+ "UpdateFailedListener"
373
525
  ]
374
526
  },
375
527
  "interfaces": [
528
+ {
529
+ "name": "BundleInfo",
530
+ "slug": "bundleinfo",
531
+ "docs": "",
532
+ "tags": [],
533
+ "methods": [],
534
+ "properties": [
535
+ {
536
+ "name": "id",
537
+ "tags": [],
538
+ "docs": "",
539
+ "complexTypes": [],
540
+ "type": "string"
541
+ },
542
+ {
543
+ "name": "version",
544
+ "tags": [],
545
+ "docs": "",
546
+ "complexTypes": [],
547
+ "type": "string"
548
+ },
549
+ {
550
+ "name": "downloaded",
551
+ "tags": [],
552
+ "docs": "",
553
+ "complexTypes": [],
554
+ "type": "string"
555
+ },
556
+ {
557
+ "name": "status",
558
+ "tags": [],
559
+ "docs": "",
560
+ "complexTypes": [
561
+ "BundleStatus"
562
+ ],
563
+ "type": "BundleStatus"
564
+ }
565
+ ],
566
+ "importObject": [
567
+ "PluginListenerHandle",
568
+ "\"@capacitor/cli\"",
569
+ "DownloadEvent",
570
+ "MajorAvailableEvent",
571
+ "DownloadCompleteEvent",
572
+ "UpdateFailedEvent",
573
+ "latestVersion",
574
+ "BundleStatus",
575
+ "DownloadChangeListener",
576
+ "DownloadCompleteListener",
577
+ "MajorAvailableListener",
578
+ "UpdateFailedListener",
579
+ "CapacitorUpdaterPlugin"
580
+ ]
581
+ },
582
+ {
583
+ "name": "latestVersion",
584
+ "slug": "latestversion",
585
+ "docs": "",
586
+ "tags": [],
587
+ "methods": [],
588
+ "properties": [
589
+ {
590
+ "name": "version",
591
+ "tags": [
592
+ {
593
+ "text": "4.0.0",
594
+ "name": "since"
595
+ }
596
+ ],
597
+ "docs": "Res of getLatest method",
598
+ "complexTypes": [],
599
+ "type": "string"
600
+ },
601
+ {
602
+ "name": "major",
603
+ "tags": [],
604
+ "docs": "",
605
+ "complexTypes": [],
606
+ "type": "boolean | undefined"
607
+ },
608
+ {
609
+ "name": "message",
610
+ "tags": [],
611
+ "docs": "",
612
+ "complexTypes": [],
613
+ "type": "string | undefined"
614
+ },
615
+ {
616
+ "name": "old",
617
+ "tags": [],
618
+ "docs": "",
619
+ "complexTypes": [],
620
+ "type": "string | undefined"
621
+ },
622
+ {
623
+ "name": "url",
624
+ "tags": [],
625
+ "docs": "",
626
+ "complexTypes": [],
627
+ "type": "string | undefined"
628
+ }
629
+ ],
630
+ "importObject": [
631
+ "PluginListenerHandle",
632
+ "\"@capacitor/cli\"",
633
+ "DownloadEvent",
634
+ "MajorAvailableEvent",
635
+ "DownloadCompleteEvent",
636
+ "UpdateFailedEvent",
637
+ "BundleInfo",
638
+ "BundleStatus",
639
+ "DownloadChangeListener",
640
+ "DownloadCompleteListener",
641
+ "MajorAvailableListener",
642
+ "UpdateFailedListener",
643
+ "CapacitorUpdaterPlugin"
644
+ ]
645
+ },
376
646
  {
377
647
  "name": "PluginListenerHandle",
378
648
  "slug": "pluginlistenerhandle",
@@ -412,22 +682,75 @@
412
682
  "name": "percent",
413
683
  "tags": [
414
684
  {
415
- "text": "2.0.11",
685
+ "text": "4.0.0",
416
686
  "name": "since"
417
687
  }
418
688
  ],
419
689
  "docs": "Current status of download, between 0 and 100.",
420
690
  "complexTypes": [],
421
691
  "type": "number"
692
+ },
693
+ {
694
+ "name": "bundle",
695
+ "tags": [],
696
+ "docs": "",
697
+ "complexTypes": [
698
+ "BundleInfo"
699
+ ],
700
+ "type": "BundleInfo"
422
701
  }
423
702
  ],
424
703
  "importObject": [
425
704
  "PluginListenerHandle",
705
+ "\"@capacitor/cli\"",
426
706
  "MajorAvailableEvent",
427
- "UpdateAvailableEvent",
707
+ "DownloadCompleteEvent",
708
+ "UpdateFailedEvent",
709
+ "latestVersion",
710
+ "BundleInfo",
711
+ "BundleStatus",
428
712
  "DownloadChangeListener",
713
+ "DownloadCompleteListener",
429
714
  "MajorAvailableListener",
430
- "UpdateAvailableListener",
715
+ "UpdateFailedListener",
716
+ "CapacitorUpdaterPlugin"
717
+ ]
718
+ },
719
+ {
720
+ "name": "DownloadCompleteEvent",
721
+ "slug": "downloadcompleteevent",
722
+ "docs": "",
723
+ "tags": [],
724
+ "methods": [],
725
+ "properties": [
726
+ {
727
+ "name": "bundle",
728
+ "tags": [
729
+ {
730
+ "text": "4.0.0",
731
+ "name": "since"
732
+ }
733
+ ],
734
+ "docs": "Emit when a new update is available.",
735
+ "complexTypes": [
736
+ "BundleInfo"
737
+ ],
738
+ "type": "BundleInfo"
739
+ }
740
+ ],
741
+ "importObject": [
742
+ "PluginListenerHandle",
743
+ "\"@capacitor/cli\"",
744
+ "DownloadEvent",
745
+ "MajorAvailableEvent",
746
+ "UpdateFailedEvent",
747
+ "latestVersion",
748
+ "BundleInfo",
749
+ "BundleStatus",
750
+ "DownloadChangeListener",
751
+ "DownloadCompleteListener",
752
+ "MajorAvailableListener",
753
+ "UpdateFailedListener",
431
754
  "CapacitorUpdaterPlugin"
432
755
  ]
433
756
  },
@@ -442,7 +765,7 @@
442
765
  "name": "version",
443
766
  "tags": [
444
767
  {
445
- "text": "2.3.0",
768
+ "text": "4.0.0",
446
769
  "name": "since"
447
770
  }
448
771
  ],
@@ -453,47 +776,84 @@
453
776
  ],
454
777
  "importObject": [
455
778
  "PluginListenerHandle",
779
+ "\"@capacitor/cli\"",
456
780
  "DownloadEvent",
457
- "UpdateAvailableEvent",
781
+ "DownloadCompleteEvent",
782
+ "UpdateFailedEvent",
783
+ "latestVersion",
784
+ "BundleInfo",
785
+ "BundleStatus",
458
786
  "DownloadChangeListener",
787
+ "DownloadCompleteListener",
459
788
  "MajorAvailableListener",
460
- "UpdateAvailableListener",
789
+ "UpdateFailedListener",
461
790
  "CapacitorUpdaterPlugin"
462
791
  ]
463
792
  },
464
793
  {
465
- "name": "UpdateAvailableEvent",
466
- "slug": "updateavailableevent",
794
+ "name": "UpdateFailedEvent",
795
+ "slug": "updatefailedevent",
467
796
  "docs": "",
468
797
  "tags": [],
469
798
  "methods": [],
470
799
  "properties": [
471
800
  {
472
- "name": "version",
801
+ "name": "bundle",
473
802
  "tags": [
474
803
  {
475
- "text": "3.0.0",
804
+ "text": "4.0.0",
476
805
  "name": "since"
477
806
  }
478
807
  ],
479
- "docs": "Emit when a new update is available.",
480
- "complexTypes": [],
481
- "type": "string"
808
+ "docs": "Emit when a update failed to install.",
809
+ "complexTypes": [
810
+ "BundleInfo"
811
+ ],
812
+ "type": "BundleInfo"
482
813
  }
483
814
  ],
484
815
  "importObject": [
485
816
  "PluginListenerHandle",
817
+ "\"@capacitor/cli\"",
486
818
  "DownloadEvent",
487
819
  "MajorAvailableEvent",
820
+ "DownloadCompleteEvent",
821
+ "latestVersion",
822
+ "BundleInfo",
823
+ "BundleStatus",
488
824
  "DownloadChangeListener",
825
+ "DownloadCompleteListener",
489
826
  "MajorAvailableListener",
490
- "UpdateAvailableListener",
827
+ "UpdateFailedListener",
491
828
  "CapacitorUpdaterPlugin"
492
829
  ]
493
830
  }
494
831
  ],
495
832
  "enums": [],
496
833
  "typeAliases": [
834
+ {
835
+ "name": "BundleStatus",
836
+ "slug": "bundlestatus",
837
+ "docs": "",
838
+ "types": [
839
+ {
840
+ "text": "'success'",
841
+ "complexTypes": []
842
+ },
843
+ {
844
+ "text": "'error'",
845
+ "complexTypes": []
846
+ },
847
+ {
848
+ "text": "'pending'",
849
+ "complexTypes": []
850
+ },
851
+ {
852
+ "text": "'downloading'",
853
+ "complexTypes": []
854
+ }
855
+ ]
856
+ },
497
857
  {
498
858
  "name": "DownloadChangeListener",
499
859
  "slug": "downloadchangelistener",
@@ -507,6 +867,19 @@
507
867
  }
508
868
  ]
509
869
  },
870
+ {
871
+ "name": "DownloadCompleteListener",
872
+ "slug": "downloadcompletelistener",
873
+ "docs": "",
874
+ "types": [
875
+ {
876
+ "text": "(state: DownloadCompleteEvent): void",
877
+ "complexTypes": [
878
+ "DownloadCompleteEvent"
879
+ ]
880
+ }
881
+ ]
882
+ },
510
883
  {
511
884
  "name": "MajorAvailableListener",
512
885
  "slug": "majoravailablelistener",
@@ -521,18 +894,138 @@
521
894
  ]
522
895
  },
523
896
  {
524
- "name": "UpdateAvailableListener",
525
- "slug": "updateavailablelistener",
897
+ "name": "UpdateFailedListener",
898
+ "slug": "updatefailedlistener",
526
899
  "docs": "",
527
900
  "types": [
528
901
  {
529
- "text": "(state: UpdateAvailableEvent): void",
902
+ "text": "(state: UpdateFailedEvent): void",
530
903
  "complexTypes": [
531
- "UpdateAvailableEvent"
904
+ "UpdateFailedEvent"
532
905
  ]
533
906
  }
534
907
  ]
535
908
  }
536
909
  ],
537
- "pluginConfigs": []
910
+ "pluginConfigs": [
911
+ {
912
+ "name": "CapacitorUpdater",
913
+ "slug": "capacitorupdater",
914
+ "properties": [
915
+ {
916
+ "name": "appReadyTimeout",
917
+ "tags": [
918
+ {
919
+ "text": "10000 // (10 seconds)",
920
+ "name": "default"
921
+ },
922
+ {
923
+ "text": "1000 // (1 second)",
924
+ "name": "example"
925
+ }
926
+ ],
927
+ "docs": "Configure the number of milliseconds the native plugin should wait before considering an update 'failed'.\n\nOnly available for Android and iOS.",
928
+ "complexTypes": [],
929
+ "type": "number | undefined"
930
+ },
931
+ {
932
+ "name": "autoDeleteFailed",
933
+ "tags": [
934
+ {
935
+ "text": "true",
936
+ "name": "default"
937
+ },
938
+ {
939
+ "text": "false",
940
+ "name": "example"
941
+ }
942
+ ],
943
+ "docs": "Configure whether the plugin should use automatically delete failed bundles.\n\nOnly available for Android and iOS.",
944
+ "complexTypes": [],
945
+ "type": "boolean | undefined"
946
+ },
947
+ {
948
+ "name": "autoDeletePrevious",
949
+ "tags": [
950
+ {
951
+ "text": "true",
952
+ "name": "default"
953
+ },
954
+ {
955
+ "text": "false",
956
+ "name": "example"
957
+ }
958
+ ],
959
+ "docs": "Configure whether the plugin should use automatically delete previous bundles after a successful update.\n\nOnly available for Android and iOS.",
960
+ "complexTypes": [],
961
+ "type": "boolean | undefined"
962
+ },
963
+ {
964
+ "name": "autoUpdate",
965
+ "tags": [
966
+ {
967
+ "text": "false",
968
+ "name": "default"
969
+ },
970
+ {
971
+ "text": "false",
972
+ "name": "example"
973
+ }
974
+ ],
975
+ "docs": "Configure whether the plugin should use Auto Update via an update server.\n\nOnly available for Android and iOS.",
976
+ "complexTypes": [],
977
+ "type": "boolean | undefined"
978
+ },
979
+ {
980
+ "name": "updateUrl",
981
+ "tags": [
982
+ {
983
+ "text": "https://capgo.app/api/auto_update",
984
+ "name": "default"
985
+ },
986
+ {
987
+ "text": "https://example.com/api/auto_update",
988
+ "name": "example"
989
+ }
990
+ ],
991
+ "docs": "Configure the URL / endpoint to which update checks are sent. \n\nOnly available for Android and iOS.",
992
+ "complexTypes": [],
993
+ "type": "string | undefined"
994
+ },
995
+ {
996
+ "name": "resetWhenUpdate",
997
+ "tags": [
998
+ {
999
+ "text": "true",
1000
+ "name": "default"
1001
+ },
1002
+ {
1003
+ "text": "false",
1004
+ "name": "example"
1005
+ }
1006
+ ],
1007
+ "docs": "Automatically delete previous downloaded bundles when a newer native app version is installed to the device.\n\nOnly available for Android and iOS.",
1008
+ "complexTypes": [],
1009
+ "type": "boolean | undefined"
1010
+ },
1011
+ {
1012
+ "name": "statsUrl",
1013
+ "tags": [
1014
+ {
1015
+ "text": "https://capgo.app/api/stats",
1016
+ "name": "default"
1017
+ },
1018
+ {
1019
+ "text": "https://example.com/api/stats",
1020
+ "name": "example"
1021
+ }
1022
+ ],
1023
+ "docs": "Configure the URL / endpoint to which update statistics are sent. \n\nOnly available for Android and iOS.",
1024
+ "complexTypes": [],
1025
+ "type": "string | undefined"
1026
+ }
1027
+ ],
1028
+ "docs": "These configuration values are available:"
1029
+ }
1030
+ ]
538
1031
  }