@capawesome/capacitor-live-update 7.3.0 → 7.4.0
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/README.md +216 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdate.java +519 -246
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdateHttpClient.java +33 -5
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePlugin.java +134 -3
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/LiveUpdatePreferences.java +25 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/api/GetLatestBundleResponse.java +2 -2
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/options/SetConfigOptions.java +19 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetBlockedBundlesResult.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetConfigResult.java +40 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/GetDownloadedBundlesResult.java +27 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/liveupdate/classes/results/IsSyncingResult.java +26 -0
- package/dist/docs.json +319 -0
- package/dist/esm/definitions.d.ts +165 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +8 -1
- package/dist/esm/web.js +21 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +21 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +21 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Classes/Options/SetConfigOptions.swift +14 -0
- package/ios/Plugin/Classes/Results/GetBlockedBundlesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/GetConfigResult.swift +19 -0
- package/ios/Plugin/Classes/Results/GetDownloadedBundlesResult.swift +16 -0
- package/ios/Plugin/Classes/Results/IsSyncingResult.swift +16 -0
- package/ios/Plugin/LiveUpdate.swift +77 -4
- package/ios/Plugin/LiveUpdatePlugin.swift +78 -1
- package/ios/Plugin/LiveUpdatePreferences.swift +44 -2
- package/package.json +1 -1
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>",
|
|
@@ -75,6 +90,23 @@
|
|
|
75
90
|
],
|
|
76
91
|
"slug": "fetchlatestbundle"
|
|
77
92
|
},
|
|
93
|
+
{
|
|
94
|
+
"name": "getBlockedBundles",
|
|
95
|
+
"signature": "() => Promise<GetBlockedBundlesResult>",
|
|
96
|
+
"parameters": [],
|
|
97
|
+
"returns": "Promise<GetBlockedBundlesResult>",
|
|
98
|
+
"tags": [
|
|
99
|
+
{
|
|
100
|
+
"name": "since",
|
|
101
|
+
"text": "7.4.0"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
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.",
|
|
105
|
+
"complexTypes": [
|
|
106
|
+
"GetBlockedBundlesResult"
|
|
107
|
+
],
|
|
108
|
+
"slug": "getblockedbundles"
|
|
109
|
+
},
|
|
78
110
|
{
|
|
79
111
|
"name": "getBundles",
|
|
80
112
|
"signature": "() => Promise<GetBundlesResult>",
|
|
@@ -84,6 +116,10 @@
|
|
|
84
116
|
{
|
|
85
117
|
"name": "since",
|
|
86
118
|
"text": "5.0.0"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "deprecated",
|
|
122
|
+
"text": "Use `getDownloadedBundles()` instead."
|
|
87
123
|
}
|
|
88
124
|
],
|
|
89
125
|
"docs": "Get all identifiers of bundles that have been downloaded.\n\nOnly available on Android and iOS.",
|
|
@@ -109,6 +145,40 @@
|
|
|
109
145
|
],
|
|
110
146
|
"slug": "getchannel"
|
|
111
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
|
+
},
|
|
112
182
|
{
|
|
113
183
|
"name": "getCurrentBundle",
|
|
114
184
|
"signature": "() => Promise<GetCurrentBundleResult>",
|
|
@@ -160,6 +230,23 @@
|
|
|
160
230
|
],
|
|
161
231
|
"slug": "getdeviceid"
|
|
162
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
|
+
},
|
|
163
250
|
{
|
|
164
251
|
"name": "getNextBundle",
|
|
165
252
|
"signature": "() => Promise<GetNextBundleResult>",
|
|
@@ -258,6 +345,21 @@
|
|
|
258
345
|
"complexTypes": [],
|
|
259
346
|
"slug": "reset"
|
|
260
347
|
},
|
|
348
|
+
{
|
|
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
|
+
},
|
|
261
363
|
{
|
|
262
364
|
"name": "setChannel",
|
|
263
365
|
"signature": "(options: SetChannelOptions) => Promise<void>",
|
|
@@ -281,6 +383,29 @@
|
|
|
281
383
|
],
|
|
282
384
|
"slug": "setchannel"
|
|
283
385
|
},
|
|
386
|
+
{
|
|
387
|
+
"name": "setConfig",
|
|
388
|
+
"signature": "(options: SetConfigOptions) => Promise<void>",
|
|
389
|
+
"parameters": [
|
|
390
|
+
{
|
|
391
|
+
"name": "options",
|
|
392
|
+
"docs": "",
|
|
393
|
+
"type": "SetConfigOptions"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"returns": "Promise<void>",
|
|
397
|
+
"tags": [
|
|
398
|
+
{
|
|
399
|
+
"name": "since",
|
|
400
|
+
"text": "7.4.0"
|
|
401
|
+
}
|
|
402
|
+
],
|
|
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.",
|
|
404
|
+
"complexTypes": [
|
|
405
|
+
"SetConfigOptions"
|
|
406
|
+
],
|
|
407
|
+
"slug": "setconfig"
|
|
408
|
+
},
|
|
284
409
|
{
|
|
285
410
|
"name": "setCustomId",
|
|
286
411
|
"signature": "(options: SetCustomIdOptions) => Promise<void>",
|
|
@@ -409,6 +534,35 @@
|
|
|
409
534
|
],
|
|
410
535
|
"slug": "addlistenernextbundleset-"
|
|
411
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
|
+
},
|
|
412
566
|
{
|
|
413
567
|
"name": "removeAllListeners",
|
|
414
568
|
"signature": "() => Promise<void>",
|
|
@@ -659,6 +813,32 @@
|
|
|
659
813
|
}
|
|
660
814
|
]
|
|
661
815
|
},
|
|
816
|
+
{
|
|
817
|
+
"name": "GetBlockedBundlesResult",
|
|
818
|
+
"slug": "getblockedbundlesresult",
|
|
819
|
+
"docs": "",
|
|
820
|
+
"tags": [
|
|
821
|
+
{
|
|
822
|
+
"text": "7.4.0",
|
|
823
|
+
"name": "since"
|
|
824
|
+
}
|
|
825
|
+
],
|
|
826
|
+
"methods": [],
|
|
827
|
+
"properties": [
|
|
828
|
+
{
|
|
829
|
+
"name": "bundleIds",
|
|
830
|
+
"tags": [
|
|
831
|
+
{
|
|
832
|
+
"text": "7.4.0",
|
|
833
|
+
"name": "since"
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"docs": "An array of unique identifiers of all blocked bundles.",
|
|
837
|
+
"complexTypes": [],
|
|
838
|
+
"type": "string[]"
|
|
839
|
+
}
|
|
840
|
+
]
|
|
841
|
+
},
|
|
662
842
|
{
|
|
663
843
|
"name": "GetBundlesResult",
|
|
664
844
|
"slug": "getbundlesresult",
|
|
@@ -715,6 +895,78 @@
|
|
|
715
895
|
}
|
|
716
896
|
]
|
|
717
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
|
+
},
|
|
718
970
|
{
|
|
719
971
|
"name": "GetCurrentBundleResult",
|
|
720
972
|
"slug": "getcurrentbundleresult",
|
|
@@ -801,6 +1053,32 @@
|
|
|
801
1053
|
}
|
|
802
1054
|
]
|
|
803
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
|
+
},
|
|
804
1082
|
{
|
|
805
1083
|
"name": "GetNextBundleResult",
|
|
806
1084
|
"slug": "getnextbundleresult",
|
|
@@ -963,6 +1241,36 @@
|
|
|
963
1241
|
}
|
|
964
1242
|
]
|
|
965
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
|
+
},
|
|
966
1274
|
{
|
|
967
1275
|
"name": "SetCustomIdOptions",
|
|
968
1276
|
"slug": "setcustomidoptions",
|
|
@@ -1211,6 +1519,17 @@
|
|
|
1211
1519
|
]
|
|
1212
1520
|
}
|
|
1213
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
|
+
]
|
|
1214
1533
|
}
|
|
1215
1534
|
],
|
|
1216
1535
|
"pluginConfigs": [
|
|
@@ -102,6 +102,17 @@ declare module '@capacitor/cli' {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
export interface LiveUpdatePlugin {
|
|
105
|
+
/**
|
|
106
|
+
* Clear all blocked bundles from the blocked list.
|
|
107
|
+
*
|
|
108
|
+
* This removes all bundle identifiers that were automatically blocked
|
|
109
|
+
* due to rollbacks when `autoBlockRolledBackBundles` is enabled.
|
|
110
|
+
*
|
|
111
|
+
* Only available on Android and iOS.
|
|
112
|
+
*
|
|
113
|
+
* @since 7.4.0
|
|
114
|
+
*/
|
|
115
|
+
clearBlockedBundles(): Promise<void>;
|
|
105
116
|
/**
|
|
106
117
|
* Delete a bundle from the app.
|
|
107
118
|
*
|
|
@@ -126,12 +137,24 @@ export interface LiveUpdatePlugin {
|
|
|
126
137
|
* @since 6.6.0
|
|
127
138
|
*/
|
|
128
139
|
fetchLatestBundle(options?: FetchLatestBundleOptions): Promise<FetchLatestBundleResult>;
|
|
140
|
+
/**
|
|
141
|
+
* Get all blocked bundle identifiers.
|
|
142
|
+
*
|
|
143
|
+
* Returns the list of bundle identifiers that were automatically blocked
|
|
144
|
+
* due to rollbacks when `autoBlockRolledBackBundles` is enabled.
|
|
145
|
+
*
|
|
146
|
+
* Only available on Android and iOS.
|
|
147
|
+
*
|
|
148
|
+
* @since 7.4.0
|
|
149
|
+
*/
|
|
150
|
+
getBlockedBundles(): Promise<GetBlockedBundlesResult>;
|
|
129
151
|
/**
|
|
130
152
|
* Get all identifiers of bundles that have been downloaded.
|
|
131
153
|
*
|
|
132
154
|
* Only available on Android and iOS.
|
|
133
155
|
*
|
|
134
156
|
* @since 5.0.0
|
|
157
|
+
* @deprecated Use `getDownloadedBundles()` instead.
|
|
135
158
|
*/
|
|
136
159
|
getBundles(): Promise<GetBundlesResult>;
|
|
137
160
|
/**
|
|
@@ -142,6 +165,25 @@ export interface LiveUpdatePlugin {
|
|
|
142
165
|
* @since 5.0.0
|
|
143
166
|
*/
|
|
144
167
|
getChannel(): Promise<GetChannelResult>;
|
|
168
|
+
/**
|
|
169
|
+
* Get the runtime configuration.
|
|
170
|
+
*
|
|
171
|
+
* Returns the current plugin configuration including any runtime
|
|
172
|
+
* overrides set via `setConfig()`.
|
|
173
|
+
*
|
|
174
|
+
* Only available on Android and iOS.
|
|
175
|
+
*
|
|
176
|
+
* @since 7.4.0
|
|
177
|
+
*/
|
|
178
|
+
getConfig(): Promise<GetConfigResult>;
|
|
179
|
+
/**
|
|
180
|
+
* Get all identifiers of bundles that have been downloaded.
|
|
181
|
+
*
|
|
182
|
+
* Only available on Android and iOS.
|
|
183
|
+
*
|
|
184
|
+
* @since 7.4.0
|
|
185
|
+
*/
|
|
186
|
+
getDownloadedBundles(): Promise<GetDownloadedBundlesResult>;
|
|
145
187
|
/**
|
|
146
188
|
* Get the bundle identifier of the current bundle.
|
|
147
189
|
* The current bundle is the bundle that is currently used by the app.
|
|
@@ -167,6 +209,14 @@ export interface LiveUpdatePlugin {
|
|
|
167
209
|
* @since 5.0.0
|
|
168
210
|
*/
|
|
169
211
|
getDeviceId(): Promise<GetDeviceIdResult>;
|
|
212
|
+
/**
|
|
213
|
+
* Check whether a sync operation is currently in progress.
|
|
214
|
+
*
|
|
215
|
+
* Only available on Android and iOS.
|
|
216
|
+
*
|
|
217
|
+
* @since 7.4.0
|
|
218
|
+
*/
|
|
219
|
+
isSyncing(): Promise<IsSyncingResult>;
|
|
170
220
|
/**
|
|
171
221
|
* Get the bundle identifier of the next bundle.
|
|
172
222
|
* The next bundle is the bundle that will be used after calling `reload()`
|
|
@@ -228,6 +278,17 @@ export interface LiveUpdatePlugin {
|
|
|
228
278
|
* @since 5.0.0
|
|
229
279
|
*/
|
|
230
280
|
reset(): Promise<void>;
|
|
281
|
+
/**
|
|
282
|
+
* Reset the runtime configuration to the values from the Capacitor config file.
|
|
283
|
+
*
|
|
284
|
+
* This clears any runtime configuration set via `setConfig()`.
|
|
285
|
+
* The changes take effect immediately.
|
|
286
|
+
*
|
|
287
|
+
* Only available on Android and iOS.
|
|
288
|
+
*
|
|
289
|
+
* @since 7.4.0
|
|
290
|
+
*/
|
|
291
|
+
resetConfig(): Promise<void>;
|
|
231
292
|
/**
|
|
232
293
|
* Set the channel to use for the update.
|
|
233
294
|
*
|
|
@@ -236,6 +297,21 @@ export interface LiveUpdatePlugin {
|
|
|
236
297
|
* @since 5.0.0
|
|
237
298
|
*/
|
|
238
299
|
setChannel(options: SetChannelOptions): Promise<void>;
|
|
300
|
+
/**
|
|
301
|
+
* Set the runtime configuration.
|
|
302
|
+
*
|
|
303
|
+
* This allows updating plugin configuration options at runtime.
|
|
304
|
+
* The changes are persisted across app restarts and take effect immediately.
|
|
305
|
+
*
|
|
306
|
+
* **Important:** Runtime configuration is automatically reset to default values
|
|
307
|
+
* whenever the native app is updated to a new version. This ensures that
|
|
308
|
+
* configuration from previous versions doesn't persist after an app update.
|
|
309
|
+
*
|
|
310
|
+
* Only available on Android and iOS.
|
|
311
|
+
*
|
|
312
|
+
* @since 7.4.0
|
|
313
|
+
*/
|
|
314
|
+
setConfig(options: SetConfigOptions): Promise<void>;
|
|
239
315
|
/**
|
|
240
316
|
* Set the custom identifier of the device.
|
|
241
317
|
*
|
|
@@ -283,6 +359,21 @@ export interface LiveUpdatePlugin {
|
|
|
283
359
|
* @since 7.3.0
|
|
284
360
|
*/
|
|
285
361
|
addListener(eventName: 'nextBundleSet', listenerFunc: NextBundleSetListener): Promise<PluginListenerHandle>;
|
|
362
|
+
/**
|
|
363
|
+
* Listen for when the app is reloaded.
|
|
364
|
+
*
|
|
365
|
+
* This event is triggered after the `reload()` method is called
|
|
366
|
+
* and the app has been reloaded.
|
|
367
|
+
*
|
|
368
|
+
* **Note:** To verify whether an update was successfully applied after a reload,
|
|
369
|
+
* use the `ready()` method instead. The `ready()` method provides detailed information
|
|
370
|
+
* about the current bundle, previous bundle, and whether a rollback occurred.
|
|
371
|
+
*
|
|
372
|
+
* Only available on Android and iOS.
|
|
373
|
+
*
|
|
374
|
+
* @since 7.4.0
|
|
375
|
+
*/
|
|
376
|
+
addListener(eventName: 'reloaded', listenerFunc: ReloadedListener): Promise<PluginListenerHandle>;
|
|
286
377
|
/**
|
|
287
378
|
* Remove all listeners for this plugin.
|
|
288
379
|
*
|
|
@@ -436,6 +527,17 @@ export interface GetBundleResult {
|
|
|
436
527
|
*/
|
|
437
528
|
bundleId: string | null;
|
|
438
529
|
}
|
|
530
|
+
/**
|
|
531
|
+
* @since 7.4.0
|
|
532
|
+
*/
|
|
533
|
+
export interface GetBlockedBundlesResult {
|
|
534
|
+
/**
|
|
535
|
+
* An array of unique identifiers of all blocked bundles.
|
|
536
|
+
*
|
|
537
|
+
* @since 7.4.0
|
|
538
|
+
*/
|
|
539
|
+
bundleIds: string[];
|
|
540
|
+
}
|
|
439
541
|
/**
|
|
440
542
|
* @since 5.0.0
|
|
441
543
|
*/
|
|
@@ -447,6 +549,17 @@ export interface GetBundlesResult {
|
|
|
447
549
|
*/
|
|
448
550
|
bundleIds: string[];
|
|
449
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
* @since 7.4.0
|
|
554
|
+
*/
|
|
555
|
+
export interface GetDownloadedBundlesResult {
|
|
556
|
+
/**
|
|
557
|
+
* An array of unique identifiers of all downloaded bundles.
|
|
558
|
+
*
|
|
559
|
+
* @since 7.4.0
|
|
560
|
+
*/
|
|
561
|
+
bundleIds: string[];
|
|
562
|
+
}
|
|
450
563
|
/**
|
|
451
564
|
* @since 5.0.0
|
|
452
565
|
*/
|
|
@@ -461,6 +574,27 @@ export interface GetChannelResult {
|
|
|
461
574
|
*/
|
|
462
575
|
channel: string | null;
|
|
463
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* @since 7.4.0
|
|
579
|
+
*/
|
|
580
|
+
export interface GetConfigResult {
|
|
581
|
+
/**
|
|
582
|
+
* The app ID used to identify the app.
|
|
583
|
+
*
|
|
584
|
+
* If `null`, no app ID is configured.
|
|
585
|
+
*
|
|
586
|
+
* @since 7.4.0
|
|
587
|
+
* @example '6e351b4f-69a7-415e-a057-4567df7ffe94'
|
|
588
|
+
*/
|
|
589
|
+
appId: string | null;
|
|
590
|
+
/**
|
|
591
|
+
* The auto-update strategy for live updates.
|
|
592
|
+
*
|
|
593
|
+
* @since 7.4.0
|
|
594
|
+
* @example 'background'
|
|
595
|
+
*/
|
|
596
|
+
autoUpdateStrategy: 'none' | 'background';
|
|
597
|
+
}
|
|
464
598
|
/**
|
|
465
599
|
* @since 6.7.0
|
|
466
600
|
*/
|
|
@@ -490,6 +624,17 @@ export interface GetDeviceIdResult {
|
|
|
490
624
|
*/
|
|
491
625
|
deviceId: string;
|
|
492
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* @since 7.4.0
|
|
629
|
+
*/
|
|
630
|
+
export interface IsSyncingResult {
|
|
631
|
+
/**
|
|
632
|
+
* Whether a sync operation is currently in progress.
|
|
633
|
+
*
|
|
634
|
+
* @since 7.4.0
|
|
635
|
+
*/
|
|
636
|
+
syncing: boolean;
|
|
637
|
+
}
|
|
493
638
|
/**
|
|
494
639
|
* @since 6.7.0
|
|
495
640
|
*/
|
|
@@ -599,6 +744,20 @@ export interface SetChannelOptions {
|
|
|
599
744
|
*/
|
|
600
745
|
channel: string | null;
|
|
601
746
|
}
|
|
747
|
+
/**
|
|
748
|
+
* @since 7.4.0
|
|
749
|
+
*/
|
|
750
|
+
export interface SetConfigOptions {
|
|
751
|
+
/**
|
|
752
|
+
* The app ID used to identify the app.
|
|
753
|
+
*
|
|
754
|
+
* Set `null` to reset to the value from the Capacitor config file.
|
|
755
|
+
*
|
|
756
|
+
* @since 7.4.0
|
|
757
|
+
* @example '6e351b4f-69a7-415e-a057-4567df7ffe94'
|
|
758
|
+
*/
|
|
759
|
+
appId?: string | null;
|
|
760
|
+
}
|
|
602
761
|
/**
|
|
603
762
|
* @since 5.0.0
|
|
604
763
|
*/
|
|
@@ -710,3 +869,9 @@ export interface NextBundleSetEvent {
|
|
|
710
869
|
*/
|
|
711
870
|
bundleId: string | null;
|
|
712
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* Listener for when the app is reloaded.
|
|
874
|
+
*
|
|
875
|
+
* @since 7.4.0
|
|
876
|
+
*/
|
|
877
|
+
export declare type ReloadedListener = () => void;
|