@capawesome/capacitor-live-update 6.7.2 → 7.0.0-dev.1765885034

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.
Files changed (56) hide show
  1. package/CapawesomeCapacitorLiveUpdate.podspec +3 -3
  2. package/Package.swift +32 -0
  3. package/README.md +419 -83
  4. package/android/build.gradle +12 -12
  5. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +758 -273
  6. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateConfig.java +29 -27
  7. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateHttpClient.java +40 -7
  8. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +212 -68
  9. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePreferences.java +52 -3
  10. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +27 -0
  11. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/events/DownloadBundleProgressEvent.java +32 -0
  12. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/{results/GetBundleResult.java → events/NextBundleSetEvent.java} +9 -7
  13. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/DownloadBundleOptions.java +16 -1
  14. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetConfigOptions.java +19 -0
  15. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SyncOptions.java +4 -0
  16. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/FetchLatestBundleResult.java +29 -1
  17. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBlockedBundlesResult.java +27 -0
  18. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetConfigResult.java +40 -0
  19. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetDownloadedBundlesResult.java +27 -0
  20. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/IsSyncingResult.java +26 -0
  21. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/ReadyResult.java +32 -0
  22. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/interfaces/DownloadProgressCallback.java +5 -0
  23. package/dist/docs.json +630 -103
  24. package/dist/esm/definitions.d.ts +365 -39
  25. package/dist/esm/definitions.js.map +1 -1
  26. package/dist/esm/index.js +1 -1
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/web.d.ts +9 -2
  29. package/dist/esm/web.js +21 -0
  30. package/dist/esm/web.js.map +1 -1
  31. package/dist/plugin.cjs.js +22 -3
  32. package/dist/plugin.cjs.js.map +1 -1
  33. package/dist/plugin.js +22 -3
  34. package/dist/plugin.js.map +1 -1
  35. package/ios/Plugin/Classes/Events/DownloadBundleProgressEvent.swift +25 -0
  36. package/ios/Plugin/Classes/{Results/GetBundleResult.swift → Events/NextBundleSetEvent.swift} +3 -3
  37. package/ios/Plugin/Classes/Options/DownloadBundleOptions.swift +7 -1
  38. package/ios/Plugin/Classes/Options/SetConfigOptions.swift +14 -0
  39. package/ios/Plugin/Classes/Options/SyncOptions.swift +4 -0
  40. package/ios/Plugin/Classes/Results/{FetchLatestBundle.swift → FetchLatestBundleResult.swift} +16 -1
  41. package/ios/Plugin/Classes/Results/GetBlockedBundlesResult.swift +16 -0
  42. package/ios/Plugin/Classes/Results/GetConfigResult.swift +19 -0
  43. package/ios/Plugin/Classes/Results/GetDownloadedBundlesResult.swift +16 -0
  44. package/ios/Plugin/Classes/Results/IsSyncingResult.swift +16 -0
  45. package/ios/Plugin/Classes/Results/ReadyResult.swift +22 -0
  46. package/ios/Plugin/LiveUpdate.swift +370 -151
  47. package/ios/Plugin/LiveUpdateConfig.swift +4 -4
  48. package/ios/Plugin/LiveUpdateHttpClient.swift +10 -4
  49. package/ios/Plugin/LiveUpdatePlugin.swift +138 -35
  50. package/ios/Plugin/LiveUpdatePreferences.swift +56 -14
  51. package/ios/Plugin/Protocols/Api/GetLatestBundleResponse.swift +3 -0
  52. package/package.json +19 -20
  53. package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetBundleOptions.java +0 -18
  54. package/ios/Plugin/Classes/Options/SetBundleOptions.swift +0 -14
  55. package/ios/Plugin/LiveUpdatePlugin.h +0 -10
  56. package/ios/Plugin/LiveUpdatePlugin.m +0 -27
package/dist/docs.json CHANGED
@@ -5,6 +5,21 @@
5
5
  "docs": "",
6
6
  "tags": [],
7
7
  "methods": [
8
+ {
9
+ "name": "clearBlockedBundles",
10
+ "signature": "() => Promise<void>",
11
+ "parameters": [],
12
+ "returns": "Promise<void>",
13
+ "tags": [
14
+ {
15
+ "name": "since",
16
+ "text": "7.4.0"
17
+ }
18
+ ],
19
+ "docs": "Clear all blocked bundles from the blocked list.\n\nThis removes all bundle identifiers that were automatically blocked\ndue to rollbacks when `autoBlockRolledBackBundles` is enabled.\n\nOnly available on Android and iOS.",
20
+ "complexTypes": [],
21
+ "slug": "clearblockedbundles"
22
+ },
8
23
  {
9
24
  "name": "deleteBundle",
10
25
  "signature": "(options: DeleteBundleOptions) => Promise<void>",
@@ -76,25 +91,21 @@
76
91
  "slug": "fetchlatestbundle"
77
92
  },
78
93
  {
79
- "name": "getBundle",
80
- "signature": "() => Promise<GetBundleResult>",
94
+ "name": "getBlockedBundles",
95
+ "signature": "() => Promise<GetBlockedBundlesResult>",
81
96
  "parameters": [],
82
- "returns": "Promise<GetBundleResult>",
97
+ "returns": "Promise<GetBlockedBundlesResult>",
83
98
  "tags": [
84
99
  {
85
100
  "name": "since",
86
- "text": "5.0.0"
87
- },
88
- {
89
- "name": "deprecated",
90
- "text": "Use `getCurrentBundle()` instead."
101
+ "text": "7.4.0"
91
102
  }
92
103
  ],
93
- "docs": "Get the active bundle identifier.\n\nOnly available on Android and iOS.",
104
+ "docs": "Get all blocked bundle identifiers.\n\nReturns the list of bundle identifiers that were automatically blocked\ndue to rollbacks when `autoBlockRolledBackBundles` is enabled.\n\nOnly available on Android and iOS.",
94
105
  "complexTypes": [
95
- "GetBundleResult"
106
+ "GetBlockedBundlesResult"
96
107
  ],
97
- "slug": "getbundle"
108
+ "slug": "getblockedbundles"
98
109
  },
99
110
  {
100
111
  "name": "getBundles",
@@ -105,6 +116,10 @@
105
116
  {
106
117
  "name": "since",
107
118
  "text": "5.0.0"
119
+ },
120
+ {
121
+ "name": "deprecated",
122
+ "text": "Use `getDownloadedBundles()` instead."
108
123
  }
109
124
  ],
110
125
  "docs": "Get all identifiers of bundles that have been downloaded.\n\nOnly available on Android and iOS.",
@@ -130,6 +145,40 @@
130
145
  ],
131
146
  "slug": "getchannel"
132
147
  },
148
+ {
149
+ "name": "getConfig",
150
+ "signature": "() => Promise<GetConfigResult>",
151
+ "parameters": [],
152
+ "returns": "Promise<GetConfigResult>",
153
+ "tags": [
154
+ {
155
+ "name": "since",
156
+ "text": "7.4.0"
157
+ }
158
+ ],
159
+ "docs": "Get the runtime configuration.\n\nReturns the current plugin configuration including any runtime\noverrides set via `setConfig()`.\n\nOnly available on Android and iOS.",
160
+ "complexTypes": [
161
+ "GetConfigResult"
162
+ ],
163
+ "slug": "getconfig"
164
+ },
165
+ {
166
+ "name": "getDownloadedBundles",
167
+ "signature": "() => Promise<GetDownloadedBundlesResult>",
168
+ "parameters": [],
169
+ "returns": "Promise<GetDownloadedBundlesResult>",
170
+ "tags": [
171
+ {
172
+ "name": "since",
173
+ "text": "7.4.0"
174
+ }
175
+ ],
176
+ "docs": "Get all identifiers of bundles that have been downloaded.\n\nOnly available on Android and iOS.",
177
+ "complexTypes": [
178
+ "GetDownloadedBundlesResult"
179
+ ],
180
+ "slug": "getdownloadedbundles"
181
+ },
133
182
  {
134
183
  "name": "getCurrentBundle",
135
184
  "signature": "() => Promise<GetCurrentBundleResult>",
@@ -181,6 +230,23 @@
181
230
  ],
182
231
  "slug": "getdeviceid"
183
232
  },
233
+ {
234
+ "name": "isSyncing",
235
+ "signature": "() => Promise<IsSyncingResult>",
236
+ "parameters": [],
237
+ "returns": "Promise<IsSyncingResult>",
238
+ "tags": [
239
+ {
240
+ "name": "since",
241
+ "text": "7.4.0"
242
+ }
243
+ ],
244
+ "docs": "Check whether a sync operation is currently in progress.\n\nOnly available on Android and iOS.",
245
+ "complexTypes": [
246
+ "IsSyncingResult"
247
+ ],
248
+ "slug": "issyncing"
249
+ },
184
250
  {
185
251
  "name": "getNextBundle",
186
252
  "signature": "() => Promise<GetNextBundleResult>",
@@ -209,7 +275,7 @@
209
275
  "text": "5.0.0"
210
276
  }
211
277
  ],
212
- "docs": "Get the version code of the app.\n\nOnly available on Android and iOS.",
278
+ "docs": "Get the version code of the app.\n\nOn **Android**, this is the `versionCode` from the `android/app/build.gradle` file.\nOn **iOS**, this is the `CFBundleVersion` from the `Info.plist` file.\n\nOnly available on Android and iOS.",
213
279
  "complexTypes": [
214
280
  "GetVersionCodeResult"
215
281
  ],
@@ -226,7 +292,7 @@
226
292
  "text": "5.0.0"
227
293
  }
228
294
  ],
229
- "docs": "Get the version name of the app.\n\nOnly available on Android and iOS.",
295
+ "docs": "Get the version name of the app.\n\nOn **Android**, this is the `versionName` from the `android/app/build.gradle` file.\nOn **iOS**, this is the `CFBundleShortVersionString` from the `Info.plist` file.\n\nOnly available on Android and iOS.",
230
296
  "complexTypes": [
231
297
  "GetVersionNameResult"
232
298
  ],
@@ -234,9 +300,9 @@
234
300
  },
235
301
  {
236
302
  "name": "ready",
237
- "signature": "() => Promise<void>",
303
+ "signature": "() => Promise<ReadyResult>",
238
304
  "parameters": [],
239
- "returns": "Promise<void>",
305
+ "returns": "Promise<ReadyResult>",
240
306
  "tags": [
241
307
  {
242
308
  "name": "since",
@@ -244,7 +310,9 @@
244
310
  }
245
311
  ],
246
312
  "docs": "Notify the plugin that the app is ready to use and no rollback is needed.\n\n**Attention**: This method should be called as soon as the app is ready to use\nto prevent the app from being reset to the default bundle.\n\nOnly available on Android and iOS.",
247
- "complexTypes": [],
313
+ "complexTypes": [
314
+ "ReadyResult"
315
+ ],
248
316
  "slug": "ready"
249
317
  },
250
318
  {
@@ -278,13 +346,28 @@
278
346
  "slug": "reset"
279
347
  },
280
348
  {
281
- "name": "setBundle",
282
- "signature": "(options: SetBundleOptions) => Promise<void>",
349
+ "name": "resetConfig",
350
+ "signature": "() => Promise<void>",
351
+ "parameters": [],
352
+ "returns": "Promise<void>",
353
+ "tags": [
354
+ {
355
+ "name": "since",
356
+ "text": "7.4.0"
357
+ }
358
+ ],
359
+ "docs": "Reset the runtime configuration to the values from the Capacitor config file.\n\nThis clears any runtime configuration set via `setConfig()`.\nThe changes take effect immediately.\n\nOnly available on Android and iOS.",
360
+ "complexTypes": [],
361
+ "slug": "resetconfig"
362
+ },
363
+ {
364
+ "name": "setChannel",
365
+ "signature": "(options: SetChannelOptions) => Promise<void>",
283
366
  "parameters": [
284
367
  {
285
368
  "name": "options",
286
369
  "docs": "",
287
- "type": "SetBundleOptions"
370
+ "type": "SetChannelOptions"
288
371
  }
289
372
  ],
290
373
  "returns": "Promise<void>",
@@ -292,40 +375,36 @@
292
375
  {
293
376
  "name": "since",
294
377
  "text": "5.0.0"
295
- },
296
- {
297
- "name": "deprecated",
298
- "text": "Use `setNextBundle()` instead."
299
378
  }
300
379
  ],
301
- "docs": "Set the next bundle to use for the app.\n\nCall `reload()` or restart the app to apply the changes.\n\nOnly available on Android and iOS.",
380
+ "docs": "Set the channel to use for the update.\n\nOnly available on Android and iOS.",
302
381
  "complexTypes": [
303
- "SetBundleOptions"
382
+ "SetChannelOptions"
304
383
  ],
305
- "slug": "setbundle"
384
+ "slug": "setchannel"
306
385
  },
307
386
  {
308
- "name": "setChannel",
309
- "signature": "(options: SetChannelOptions) => Promise<void>",
387
+ "name": "setConfig",
388
+ "signature": "(options: SetConfigOptions) => Promise<void>",
310
389
  "parameters": [
311
390
  {
312
391
  "name": "options",
313
392
  "docs": "",
314
- "type": "SetChannelOptions"
393
+ "type": "SetConfigOptions"
315
394
  }
316
395
  ],
317
396
  "returns": "Promise<void>",
318
397
  "tags": [
319
398
  {
320
399
  "name": "since",
321
- "text": "5.0.0"
400
+ "text": "7.4.0"
322
401
  }
323
402
  ],
324
- "docs": "Set the channel to use for the update.\n\nOnly available on Android and iOS.",
403
+ "docs": "Set the runtime configuration.\n\nThis allows updating plugin configuration options at runtime.\nThe changes are persisted across app restarts and take effect immediately.\n\n**Important:** Runtime configuration is automatically reset to default values\nwhenever the native app is updated to a new version. This ensures that\nconfiguration from previous versions doesn't persist after an app update.\n\nOnly available on Android and iOS.",
325
404
  "complexTypes": [
326
- "SetChannelOptions"
405
+ "SetConfigOptions"
327
406
  ],
328
- "slug": "setchannel"
407
+ "slug": "setconfig"
329
408
  },
330
409
  {
331
410
  "name": "setCustomId",
@@ -396,6 +475,108 @@
396
475
  "SyncOptions"
397
476
  ],
398
477
  "slug": "sync"
478
+ },
479
+ {
480
+ "name": "addListener",
481
+ "signature": "(eventName: 'downloadBundleProgress', listenerFunc: DownloadBundleProgressListener) => Promise<PluginListenerHandle>",
482
+ "parameters": [
483
+ {
484
+ "name": "eventName",
485
+ "docs": "",
486
+ "type": "'downloadBundleProgress'"
487
+ },
488
+ {
489
+ "name": "listenerFunc",
490
+ "docs": "",
491
+ "type": "DownloadBundleProgressListener"
492
+ }
493
+ ],
494
+ "returns": "Promise<PluginListenerHandle>",
495
+ "tags": [
496
+ {
497
+ "name": "since",
498
+ "text": "7.0.0"
499
+ }
500
+ ],
501
+ "docs": "Listen for the download progress of a bundle.\n\nOnly available on Android and iOS.",
502
+ "complexTypes": [
503
+ "PluginListenerHandle",
504
+ "DownloadBundleProgressListener"
505
+ ],
506
+ "slug": "addlistenerdownloadbundleprogress-"
507
+ },
508
+ {
509
+ "name": "addListener",
510
+ "signature": "(eventName: 'nextBundleSet', listenerFunc: NextBundleSetListener) => Promise<PluginListenerHandle>",
511
+ "parameters": [
512
+ {
513
+ "name": "eventName",
514
+ "docs": "",
515
+ "type": "'nextBundleSet'"
516
+ },
517
+ {
518
+ "name": "listenerFunc",
519
+ "docs": "",
520
+ "type": "NextBundleSetListener"
521
+ }
522
+ ],
523
+ "returns": "Promise<PluginListenerHandle>",
524
+ "tags": [
525
+ {
526
+ "name": "since",
527
+ "text": "7.3.0"
528
+ }
529
+ ],
530
+ "docs": "Listen for when a bundle is set as the next bundle.\n\nThis event is triggered whenever a bundle is set to be used on the next app restart,\neither through automatic updates or manual calls to `setNextBundle()`.\n\nOnly available on Android and iOS.",
531
+ "complexTypes": [
532
+ "PluginListenerHandle",
533
+ "NextBundleSetListener"
534
+ ],
535
+ "slug": "addlistenernextbundleset-"
536
+ },
537
+ {
538
+ "name": "addListener",
539
+ "signature": "(eventName: 'reloaded', listenerFunc: ReloadedListener) => Promise<PluginListenerHandle>",
540
+ "parameters": [
541
+ {
542
+ "name": "eventName",
543
+ "docs": "",
544
+ "type": "'reloaded'"
545
+ },
546
+ {
547
+ "name": "listenerFunc",
548
+ "docs": "",
549
+ "type": "ReloadedListener"
550
+ }
551
+ ],
552
+ "returns": "Promise<PluginListenerHandle>",
553
+ "tags": [
554
+ {
555
+ "name": "since",
556
+ "text": "7.4.0"
557
+ }
558
+ ],
559
+ "docs": "Listen for when the app is reloaded.\n\nThis event is triggered after the `reload()` method is called\nand the app has been reloaded.\n\n**Note:** To verify whether an update was successfully applied after a reload,\nuse the `ready()` method instead. The `ready()` method provides detailed information\nabout the current bundle, previous bundle, and whether a rollback occurred.\n\nOnly available on Android and iOS.",
560
+ "complexTypes": [
561
+ "PluginListenerHandle",
562
+ "ReloadedListener"
563
+ ],
564
+ "slug": "addlistenerreloaded-"
565
+ },
566
+ {
567
+ "name": "removeAllListeners",
568
+ "signature": "() => Promise<void>",
569
+ "parameters": [],
570
+ "returns": "Promise<void>",
571
+ "tags": [
572
+ {
573
+ "name": "since",
574
+ "text": "7.2.0"
575
+ }
576
+ ],
577
+ "docs": "Remove all listeners for this plugin.",
578
+ "complexTypes": [],
579
+ "slug": "removealllisteners"
399
580
  }
400
581
  ],
401
582
  "properties": []
@@ -470,7 +651,7 @@
470
651
  "name": "example"
471
652
  }
472
653
  ],
473
- "docs": "The unique identifier of the bundle.",
654
+ "docs": "The unique identifier of the bundle.\n\n**Attention**: The value `public` is reserved and cannot be used as a bundle identifier.",
474
655
  "complexTypes": [],
475
656
  "type": "string"
476
657
  },
@@ -478,15 +659,23 @@
478
659
  "name": "checksum",
479
660
  "tags": [
480
661
  {
481
- "text": "6.1.0",
662
+ "text": "7.1.0",
482
663
  "name": "since"
483
- },
664
+ }
665
+ ],
666
+ "docs": "The checksum of the self-hosted bundle as a SHA-256 hash\nin base64 format to verify the integrity of the bundle.\n\n**Attention**: Only supported for the `zip` artifact type.",
667
+ "complexTypes": [],
668
+ "type": "string | undefined"
669
+ },
670
+ {
671
+ "name": "signature",
672
+ "tags": [
484
673
  {
485
- "text": "The server should return a `X-Checksum` header instead.",
486
- "name": "deprecated"
674
+ "text": "7.1.0",
675
+ "name": "since"
487
676
  }
488
677
  ],
489
- "docs": "The checksum of the bundle to verify the integrity of the ZIP file.\n\nMust be a SHA-256 hash in base64 format.",
678
+ "docs": "The signature of the self-hosted bundle as a signed SHA-256 hash\nin base64 format to verify the integrity of the bundle.\n\n**Attention**: Only supported for the `zip` artifact type.",
490
679
  "complexTypes": [],
491
680
  "type": "string | undefined"
492
681
  },
@@ -502,7 +691,7 @@
502
691
  "name": "example"
503
692
  }
504
693
  ],
505
- "docs": "The URL of the bundle to download.\n\nFor the `zip` artifact type, the URL must point to a ZIP file.\nFor the `manifest` artifact type, the URL serves as the base URL\nto download the individual files. For example, if the URL is\n`https://example.com/download`, the plugin will download the file\nwith the href `index.html` from `https://example.com/download?href=index.html`.\n\nTo **verify the integrity** of the file, the server must return\na `X-Checksum` header with the SHA-256 hash in base64 format.\n\nTo **verify the signature** of the file, the server must return\na `X-Signature` header with the signed SHA-256 hash in base64 format.",
694
+ "docs": "The URL of the bundle to download.\n\nFor the `zip` artifact type, the URL must point to a ZIP file.\nFor the `manifest` artifact type, the URL serves as the base URL\nto download the individual files. For example, if the URL is\n`https://example.com/download`, the plugin will download the file\nwith the href `index.html` from `https://example.com/download?href=index.html`.\n\nTo **verify the integrity** of the file, the server should return\na `X-Checksum` header with the SHA-256 hash in base64 format.\n\nTo **verify the signature** of the file, the server should return\na `X-Signature` header with the signed SHA-256 hash in base64 format.",
506
695
  "complexTypes": [],
507
696
  "type": "string"
508
697
  }
@@ -544,6 +733,34 @@
544
733
  "complexTypes": [],
545
734
  "type": "string | null"
546
735
  },
736
+ {
737
+ "name": "checksum",
738
+ "tags": [
739
+ {
740
+ "text": "7.1.0",
741
+ "name": "since"
742
+ }
743
+ ],
744
+ "docs": "The checksum of the latest bundle if the bundle is self-hosted.\n\nIf the bundle is hosted on Capawesome Cloud, the checksum will be\nreturned as response header when downloading the bundle.",
745
+ "complexTypes": [],
746
+ "type": "string | undefined"
747
+ },
748
+ {
749
+ "name": "customProperties",
750
+ "tags": [
751
+ {
752
+ "text": "7.0.0",
753
+ "name": "since"
754
+ },
755
+ {
756
+ "text": "{ \"key\": \"value\" }",
757
+ "name": "example"
758
+ }
759
+ ],
760
+ "docs": "Custom properties that are associated with the latest bundle.",
761
+ "complexTypes": [],
762
+ "type": "{ [key: string]: string; } | undefined"
763
+ },
547
764
  {
548
765
  "name": "downloadUrl",
549
766
  "tags": [
@@ -555,6 +772,18 @@
555
772
  "docs": "The URL of the latest bundle to download.\nPass this URL to the `downloadBundle(...)` method to download the bundle.",
556
773
  "complexTypes": [],
557
774
  "type": "string | undefined"
775
+ },
776
+ {
777
+ "name": "signature",
778
+ "tags": [
779
+ {
780
+ "text": "7.1.0",
781
+ "name": "since"
782
+ }
783
+ ],
784
+ "docs": "The signature of the latest bundle if the bundle is self-hosted.\n\nIf the bundle is hosted on Capawesome Cloud, the signature will be\nreturned as response header when downloading the bundle.",
785
+ "complexTypes": [],
786
+ "type": "string | undefined"
558
787
  }
559
788
  ]
560
789
  },
@@ -585,32 +814,28 @@
585
814
  ]
586
815
  },
587
816
  {
588
- "name": "GetBundleResult",
589
- "slug": "getbundleresult",
817
+ "name": "GetBlockedBundlesResult",
818
+ "slug": "getblockedbundlesresult",
590
819
  "docs": "",
591
820
  "tags": [
592
821
  {
593
- "text": "5.0.0",
822
+ "text": "7.4.0",
594
823
  "name": "since"
595
824
  }
596
825
  ],
597
826
  "methods": [],
598
827
  "properties": [
599
828
  {
600
- "name": "bundleId",
829
+ "name": "bundleIds",
601
830
  "tags": [
602
831
  {
603
- "text": "5.0.0",
832
+ "text": "7.4.0",
604
833
  "name": "since"
605
- },
606
- {
607
- "text": "'1.0.0'",
608
- "name": "example"
609
834
  }
610
835
  ],
611
- "docs": "The unique identifier of the active bundle.\n\nIf `null`, the default bundle is being used.",
836
+ "docs": "An array of unique identifiers of all blocked bundles.",
612
837
  "complexTypes": [],
613
- "type": "string | null"
838
+ "type": "string[]"
614
839
  }
615
840
  ]
616
841
  },
@@ -670,6 +895,78 @@
670
895
  }
671
896
  ]
672
897
  },
898
+ {
899
+ "name": "GetConfigResult",
900
+ "slug": "getconfigresult",
901
+ "docs": "",
902
+ "tags": [
903
+ {
904
+ "text": "7.4.0",
905
+ "name": "since"
906
+ }
907
+ ],
908
+ "methods": [],
909
+ "properties": [
910
+ {
911
+ "name": "appId",
912
+ "tags": [
913
+ {
914
+ "text": "7.4.0",
915
+ "name": "since"
916
+ },
917
+ {
918
+ "text": "'6e351b4f-69a7-415e-a057-4567df7ffe94'",
919
+ "name": "example"
920
+ }
921
+ ],
922
+ "docs": "The app ID used to identify the app.\n\nIf `null`, no app ID is configured.",
923
+ "complexTypes": [],
924
+ "type": "string | null"
925
+ },
926
+ {
927
+ "name": "autoUpdateStrategy",
928
+ "tags": [
929
+ {
930
+ "text": "7.4.0",
931
+ "name": "since"
932
+ },
933
+ {
934
+ "text": "'background'",
935
+ "name": "example"
936
+ }
937
+ ],
938
+ "docs": "The auto-update strategy for live updates.",
939
+ "complexTypes": [],
940
+ "type": "'none' | 'background'"
941
+ }
942
+ ]
943
+ },
944
+ {
945
+ "name": "GetDownloadedBundlesResult",
946
+ "slug": "getdownloadedbundlesresult",
947
+ "docs": "",
948
+ "tags": [
949
+ {
950
+ "text": "7.4.0",
951
+ "name": "since"
952
+ }
953
+ ],
954
+ "methods": [],
955
+ "properties": [
956
+ {
957
+ "name": "bundleIds",
958
+ "tags": [
959
+ {
960
+ "text": "7.4.0",
961
+ "name": "since"
962
+ }
963
+ ],
964
+ "docs": "An array of unique identifiers of all downloaded bundles.",
965
+ "complexTypes": [],
966
+ "type": "string[]"
967
+ }
968
+ ]
969
+ },
673
970
  {
674
971
  "name": "GetCurrentBundleResult",
675
972
  "slug": "getcurrentbundleresult",
@@ -756,6 +1053,32 @@
756
1053
  }
757
1054
  ]
758
1055
  },
1056
+ {
1057
+ "name": "IsSyncingResult",
1058
+ "slug": "issyncingresult",
1059
+ "docs": "",
1060
+ "tags": [
1061
+ {
1062
+ "text": "7.4.0",
1063
+ "name": "since"
1064
+ }
1065
+ ],
1066
+ "methods": [],
1067
+ "properties": [
1068
+ {
1069
+ "name": "syncing",
1070
+ "tags": [
1071
+ {
1072
+ "text": "7.4.0",
1073
+ "name": "since"
1074
+ }
1075
+ ],
1076
+ "docs": "Whether a sync operation is currently in progress.",
1077
+ "complexTypes": [],
1078
+ "type": "boolean"
1079
+ }
1080
+ ]
1081
+ },
759
1082
  {
760
1083
  "name": "GetNextBundleResult",
761
1084
  "slug": "getnextbundleresult",
@@ -843,32 +1166,52 @@
843
1166
  ]
844
1167
  },
845
1168
  {
846
- "name": "SetBundleOptions",
847
- "slug": "setbundleoptions",
1169
+ "name": "ReadyResult",
1170
+ "slug": "readyresult",
848
1171
  "docs": "",
849
1172
  "tags": [
850
1173
  {
851
- "text": "5.0.0",
1174
+ "text": "7.0.0",
852
1175
  "name": "since"
853
1176
  }
854
1177
  ],
855
1178
  "methods": [],
856
1179
  "properties": [
857
1180
  {
858
- "name": "bundleId",
1181
+ "name": "previousBundleId",
859
1182
  "tags": [
860
1183
  {
861
- "text": "5.0.0",
1184
+ "text": "7.0.0",
862
1185
  "name": "since"
863
- },
1186
+ }
1187
+ ],
1188
+ "docs": "The identifier of the previous bundle used.\n\nIf `null`, the default bundle was used.",
1189
+ "complexTypes": [],
1190
+ "type": "string | null"
1191
+ },
1192
+ {
1193
+ "name": "currentBundleId",
1194
+ "tags": [
864
1195
  {
865
- "text": "'1.0.0'",
866
- "name": "example"
1196
+ "text": "7.0.0",
1197
+ "name": "since"
867
1198
  }
868
1199
  ],
869
- "docs": "The unique identifier of the bundle to use.",
1200
+ "docs": "The identifier of the current bundle used.\n\nIf `null`, the default bundle is being used.",
870
1201
  "complexTypes": [],
871
- "type": "string"
1202
+ "type": "string | null"
1203
+ },
1204
+ {
1205
+ "name": "rollback",
1206
+ "tags": [
1207
+ {
1208
+ "text": "7.0.0",
1209
+ "name": "since"
1210
+ }
1211
+ ],
1212
+ "docs": "Whether or not the app was reset to the default bundle.",
1213
+ "complexTypes": [],
1214
+ "type": "boolean"
872
1215
  }
873
1216
  ]
874
1217
  },
@@ -898,6 +1241,36 @@
898
1241
  }
899
1242
  ]
900
1243
  },
1244
+ {
1245
+ "name": "SetConfigOptions",
1246
+ "slug": "setconfigoptions",
1247
+ "docs": "",
1248
+ "tags": [
1249
+ {
1250
+ "text": "7.4.0",
1251
+ "name": "since"
1252
+ }
1253
+ ],
1254
+ "methods": [],
1255
+ "properties": [
1256
+ {
1257
+ "name": "appId",
1258
+ "tags": [
1259
+ {
1260
+ "text": "7.4.0",
1261
+ "name": "since"
1262
+ },
1263
+ {
1264
+ "text": "'6e351b4f-69a7-415e-a057-4567df7ffe94'",
1265
+ "name": "example"
1266
+ }
1267
+ ],
1268
+ "docs": "The app ID used to identify the app.\n\nSet `null` to reset to the value from the Capacitor config file.",
1269
+ "complexTypes": [],
1270
+ "type": "string | null | undefined"
1271
+ }
1272
+ ]
1273
+ },
901
1274
  {
902
1275
  "name": "SetCustomIdOptions",
903
1276
  "slug": "setcustomidoptions",
@@ -1005,10 +1378,160 @@
1005
1378
  "type": "string | undefined"
1006
1379
  }
1007
1380
  ]
1381
+ },
1382
+ {
1383
+ "name": "PluginListenerHandle",
1384
+ "slug": "pluginlistenerhandle",
1385
+ "docs": "",
1386
+ "tags": [],
1387
+ "methods": [],
1388
+ "properties": [
1389
+ {
1390
+ "name": "remove",
1391
+ "tags": [],
1392
+ "docs": "",
1393
+ "complexTypes": [],
1394
+ "type": "() => Promise<void>"
1395
+ }
1396
+ ]
1397
+ },
1398
+ {
1399
+ "name": "DownloadBundleProgressEvent",
1400
+ "slug": "downloadbundleprogressevent",
1401
+ "docs": "Event that is triggered when the download progress of a bundle changes.",
1402
+ "tags": [
1403
+ {
1404
+ "text": "7.0.0",
1405
+ "name": "since"
1406
+ }
1407
+ ],
1408
+ "methods": [],
1409
+ "properties": [
1410
+ {
1411
+ "name": "bundleId",
1412
+ "tags": [
1413
+ {
1414
+ "text": "7.0.0",
1415
+ "name": "since"
1416
+ }
1417
+ ],
1418
+ "docs": "The unique identifier of the bundle that is being downloaded.",
1419
+ "complexTypes": [],
1420
+ "type": "string"
1421
+ },
1422
+ {
1423
+ "name": "downloadedBytes",
1424
+ "tags": [
1425
+ {
1426
+ "text": "7.0.0",
1427
+ "name": "since"
1428
+ }
1429
+ ],
1430
+ "docs": "The number of bytes that have been downloaded.",
1431
+ "complexTypes": [],
1432
+ "type": "number"
1433
+ },
1434
+ {
1435
+ "name": "progress",
1436
+ "tags": [
1437
+ {
1438
+ "text": "7.0.0",
1439
+ "name": "since"
1440
+ },
1441
+ {
1442
+ "text": "0.5",
1443
+ "name": "example"
1444
+ }
1445
+ ],
1446
+ "docs": "The progress of the download in percent as a value between `0` and `1`.",
1447
+ "complexTypes": [],
1448
+ "type": "number"
1449
+ },
1450
+ {
1451
+ "name": "totalBytes",
1452
+ "tags": [
1453
+ {
1454
+ "text": "7.0.0",
1455
+ "name": "since"
1456
+ }
1457
+ ],
1458
+ "docs": "The total number of bytes to download.",
1459
+ "complexTypes": [],
1460
+ "type": "number"
1461
+ }
1462
+ ]
1463
+ },
1464
+ {
1465
+ "name": "NextBundleSetEvent",
1466
+ "slug": "nextbundlesetevent",
1467
+ "docs": "Event that is triggered when a bundle is set as the next bundle.",
1468
+ "tags": [
1469
+ {
1470
+ "text": "7.3.0",
1471
+ "name": "since"
1472
+ }
1473
+ ],
1474
+ "methods": [],
1475
+ "properties": [
1476
+ {
1477
+ "name": "bundleId",
1478
+ "tags": [
1479
+ {
1480
+ "text": "7.3.0",
1481
+ "name": "since"
1482
+ },
1483
+ {
1484
+ "text": "'1.0.0'",
1485
+ "name": "example"
1486
+ }
1487
+ ],
1488
+ "docs": "The unique identifier of the bundle that is set as the next bundle.\n\nIf `null`, the default bundle will be used.",
1489
+ "complexTypes": [],
1490
+ "type": "string | null"
1491
+ }
1492
+ ]
1008
1493
  }
1009
1494
  ],
1010
1495
  "enums": [],
1011
- "typeAliases": [],
1496
+ "typeAliases": [
1497
+ {
1498
+ "name": "DownloadBundleProgressListener",
1499
+ "slug": "downloadbundleprogresslistener",
1500
+ "docs": "Listener for the download progress of a bundle.",
1501
+ "types": [
1502
+ {
1503
+ "text": "(event: DownloadBundleProgressEvent): void",
1504
+ "complexTypes": [
1505
+ "DownloadBundleProgressEvent"
1506
+ ]
1507
+ }
1508
+ ]
1509
+ },
1510
+ {
1511
+ "name": "NextBundleSetListener",
1512
+ "slug": "nextbundlesetlistener",
1513
+ "docs": "Listener for when a bundle is set as the next bundle.",
1514
+ "types": [
1515
+ {
1516
+ "text": "(event: NextBundleSetEvent): void",
1517
+ "complexTypes": [
1518
+ "NextBundleSetEvent"
1519
+ ]
1520
+ }
1521
+ ]
1522
+ },
1523
+ {
1524
+ "name": "ReloadedListener",
1525
+ "slug": "reloadedlistener",
1526
+ "docs": "Listener for when the app is reloaded.",
1527
+ "types": [
1528
+ {
1529
+ "text": "(): void",
1530
+ "complexTypes": []
1531
+ }
1532
+ ]
1533
+ }
1534
+ ],
1012
1535
  "pluginConfigs": [
1013
1536
  {
1014
1537
  "name": "LiveUpdate",
@@ -1026,15 +1549,15 @@
1026
1549
  "name": "example"
1027
1550
  }
1028
1551
  ],
1029
- "docs": "The app ID is used to identify the app when using [Capawesome Cloud](https://capawesome.io/cloud).\n\nThis is **NOT** the same as the app identifier (e.g. `com.example.app`).\nThis is a unique identifier generated by Capawesome Cloud (e.g. `6e351b4f-69a7-415e-a057-4567df7ffe94`).",
1552
+ "docs": "The app ID is used to identify the app when using [Capawesome Cloud](https://capawesome.io/cloud/).\n\nThis is **NOT** the same as the app identifier (e.g. `com.example.app`).\nThis is a unique identifier generated by Capawesome Cloud (e.g. `6e351b4f-69a7-415e-a057-4567df7ffe94`).",
1030
1553
  "complexTypes": [],
1031
1554
  "type": "string | undefined"
1032
1555
  },
1033
1556
  {
1034
- "name": "autoDeleteBundles",
1557
+ "name": "autoBlockRolledBackBundles",
1035
1558
  "tags": [
1036
1559
  {
1037
- "text": "5.0.0",
1560
+ "text": "7.3.0",
1038
1561
  "name": "since"
1039
1562
  },
1040
1563
  {
@@ -1042,81 +1565,77 @@
1042
1565
  "name": "default"
1043
1566
  }
1044
1567
  ],
1045
- "docs": "Whether or not to automatically delete unused bundles.\n\nWhen enabled, the plugin will automatically delete unused bundles after calling `ready()`.",
1568
+ "docs": "Whether or not to automatically block bundles that have been rolled back.\n\nWhen enabled, the plugin will automatically block bundles that caused a rollback\n(up to 100 bundles). When the limit is reached, the oldest blocked bundle is unblocked.\nBlocked bundles will be skipped in future sync operations.\n\n**Attention**: This option has no effect if `readyTimeout` is set to `0`.\n\nOnly available on Android and iOS.",
1046
1569
  "complexTypes": [],
1047
1570
  "type": "boolean | undefined"
1048
1571
  },
1049
1572
  {
1050
- "name": "defaultChannel",
1573
+ "name": "autoDeleteBundles",
1051
1574
  "tags": [
1052
1575
  {
1053
- "text": "6.3.0",
1576
+ "text": "5.0.0",
1054
1577
  "name": "since"
1055
1578
  },
1056
1579
  {
1057
- "text": "'production'",
1058
- "name": "example"
1580
+ "text": "false",
1581
+ "name": "default"
1059
1582
  }
1060
1583
  ],
1061
- "docs": "The default channel of the app.",
1584
+ "docs": "Whether or not to automatically delete unused bundles.\n\nWhen enabled, the plugin will automatically delete unused bundles after calling `ready()`.",
1062
1585
  "complexTypes": [],
1063
- "type": "string | undefined"
1586
+ "type": "boolean | undefined"
1064
1587
  },
1065
1588
  {
1066
- "name": "enabled",
1589
+ "name": "autoUpdateStrategy",
1067
1590
  "tags": [
1068
1591
  {
1069
- "text": "5.0.0",
1592
+ "text": "7.3.0",
1070
1593
  "name": "since"
1071
1594
  },
1072
1595
  {
1073
- "text": "true",
1596
+ "text": "'none'",
1074
1597
  "name": "default"
1598
+ },
1599
+ {
1600
+ "text": "'background'",
1601
+ "name": "example"
1075
1602
  }
1076
1603
  ],
1077
- "docs": "Whether or not the plugin is enabled.",
1604
+ "docs": "The auto-update strategy for live updates.\n\n- `none`: Live updates will not be applied automatically.\n- `background`: Live updates will be automatically downloaded\nand applied in the background at app startup and when the app resumes\n(if the last check was more than 15 minutes ago).\n\nOnly available on Android and iOS.",
1078
1605
  "complexTypes": [],
1079
- "type": "boolean | undefined"
1606
+ "type": "'none' | 'background' | undefined"
1080
1607
  },
1081
1608
  {
1082
- "name": "httpTimeout",
1609
+ "name": "defaultChannel",
1083
1610
  "tags": [
1084
1611
  {
1085
- "text": "6.4.0",
1612
+ "text": "6.3.0",
1086
1613
  "name": "since"
1087
1614
  },
1088
1615
  {
1089
- "text": "60000",
1090
- "name": "default"
1616
+ "text": "'production'",
1617
+ "name": "example"
1091
1618
  }
1092
1619
  ],
1093
- "docs": "The timeout in milliseconds for HTTP requests.",
1620
+ "docs": "The default channel of the app.",
1094
1621
  "complexTypes": [],
1095
- "type": "number | undefined"
1622
+ "type": "string | undefined"
1096
1623
  },
1097
1624
  {
1098
- "name": "location",
1625
+ "name": "httpTimeout",
1099
1626
  "tags": [
1100
1627
  {
1101
- "text": "6.2.0",
1628
+ "text": "6.4.0",
1102
1629
  "name": "since"
1103
1630
  },
1104
1631
  {
1105
- "text": "'us'",
1632
+ "text": "60000",
1106
1633
  "name": "default"
1107
- },
1108
- {
1109
- "text": "'eu'",
1110
- "name": "example"
1111
- },
1112
- {
1113
- "text": "This option will be removed in the future.",
1114
- "name": "deprecated"
1115
1634
  }
1116
1635
  ],
1117
- "docs": "The location of the server to use when using [Capawesome Cloud](https://capawesome.io/cloud).",
1636
+ "docs": "The timeout in milliseconds for HTTP requests.",
1118
1637
  "complexTypes": [],
1119
- "type": "'us' | 'eu' | undefined"
1638
+ "type": "number | undefined"
1120
1639
  },
1121
1640
  {
1122
1641
  "name": "publicKey",
@@ -1142,29 +1661,37 @@
1142
1661
  "name": "since"
1143
1662
  },
1144
1663
  {
1145
- "text": "10000",
1664
+ "text": "0",
1146
1665
  "name": "default"
1666
+ },
1667
+ {
1668
+ "text": "10000",
1669
+ "name": "example"
1147
1670
  }
1148
1671
  ],
1149
- "docs": "The timeout in milliseconds to wait for the app to be ready before resetting to the default bundle.",
1672
+ "docs": "The timeout in milliseconds to wait for the app to be ready\nbefore resetting to the default bundle.\n\nIt is strongly **recommended** to configure this option (e.g. `10000` ms)\nso that the plugin can roll back to the default bundle in case of problems.\nIf configured, the plugin will wait for the app to call the `ready()`\nmethod before resetting to the default bundle.\n\nSet to `0` to disable the timeout.",
1150
1673
  "complexTypes": [],
1151
1674
  "type": "number | undefined"
1152
1675
  },
1153
1676
  {
1154
- "name": "resetOnUpdate",
1677
+ "name": "serverDomain",
1155
1678
  "tags": [
1156
1679
  {
1157
- "text": "5.0.0",
1680
+ "text": "7.0.0",
1158
1681
  "name": "since"
1159
1682
  },
1160
1683
  {
1161
- "text": "true",
1684
+ "text": "'api.cloud.capawesome.io'",
1162
1685
  "name": "default"
1686
+ },
1687
+ {
1688
+ "text": "'api.cloud.capawesome.eu'",
1689
+ "name": "example"
1163
1690
  }
1164
1691
  ],
1165
- "docs": "Whether or not the app should be reset to the default bundle during an update.",
1692
+ "docs": "The API domain of the [Capawesome Cloud](https://cloud.capawesome.io) server **without** scheme or path.",
1166
1693
  "complexTypes": [],
1167
- "type": "boolean | undefined"
1694
+ "type": "string | undefined"
1168
1695
  }
1169
1696
  ],
1170
1697
  "docs": ""