@appzung/react-native-code-push 10.0.1 → 10.1.1

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 (268) hide show
  1. package/README.md +3 -3
  2. package/android/app/src/main/java/com/appzung/codepush/react/CodePush.java +3 -0
  3. package/android/app/src/main/java/com/appzung/codepush/react/CodePushNativeModule.java +14 -0
  4. package/ios/CodePush/CodePush.h +1 -0
  5. package/ios/CodePush/CodePush.m +64 -13
  6. package/ios/CodePush/CodePushConfig.m +4 -0
  7. package/lib/commonjs/CodePush.js +6 -2
  8. package/lib/commonjs/CodePush.js.map +1 -1
  9. package/lib/commonjs/allowRestart.js +2 -0
  10. package/lib/commonjs/allowRestart.js.map +1 -1
  11. package/lib/commonjs/checkForUpdates.js +23 -25
  12. package/lib/commonjs/checkForUpdates.js.map +1 -1
  13. package/lib/commonjs/clearUpdates.js +2 -1
  14. package/lib/commonjs/clearUpdates.js.map +1 -1
  15. package/lib/commonjs/disallowRestart.js +2 -0
  16. package/lib/commonjs/disallowRestart.js.map +1 -1
  17. package/lib/commonjs/enums/CheckFrequency.enum.js +2 -2
  18. package/lib/commonjs/enums/InstallMode.enum.js +7 -3
  19. package/lib/commonjs/enums/InstallMode.enum.js.map +1 -1
  20. package/lib/commonjs/enums/SyncStatus.enum.js +7 -7
  21. package/lib/commonjs/enums/UpdateState.enum.js +7 -6
  22. package/lib/commonjs/enums/UpdateState.enum.js.map +1 -1
  23. package/lib/commonjs/getClientUniqueId.js +16 -0
  24. package/lib/commonjs/getClientUniqueId.js.map +1 -0
  25. package/lib/commonjs/index.js +34 -13
  26. package/lib/commonjs/index.js.map +1 -1
  27. package/lib/commonjs/internals/CodePushApiSdk.errors.js +26 -0
  28. package/lib/commonjs/internals/CodePushApiSdk.errors.js.map +1 -0
  29. package/lib/commonjs/internals/CodePushApiSdk.js +100 -0
  30. package/lib/commonjs/internals/CodePushApiSdk.js.map +1 -0
  31. package/lib/commonjs/{enums/DeploymentStatus.enum.js → internals/CodePushApiSdk.types.js} +3 -2
  32. package/lib/commonjs/internals/CodePushApiSdk.types.js.map +1 -0
  33. package/lib/commonjs/internals/RemotePackageImplementation.js +6 -5
  34. package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -1
  35. package/lib/commonjs/internals/getConfiguration.js +4 -0
  36. package/lib/commonjs/internals/getConfiguration.js.map +1 -1
  37. package/lib/commonjs/internals/utils/fetchRetry.js +59 -0
  38. package/lib/commonjs/internals/utils/fetchRetry.js.map +1 -0
  39. package/lib/commonjs/internals/utils/queryStringify.js +25 -0
  40. package/lib/commonjs/internals/utils/queryStringify.js.map +1 -0
  41. package/lib/commonjs/internals/utils/requestFetchAdapter.js +33 -0
  42. package/lib/commonjs/internals/utils/requestFetchAdapter.js.map +1 -0
  43. package/lib/commonjs/internals/version.js +1 -1
  44. package/lib/commonjs/notifyAppReady.js +11 -9
  45. package/lib/commonjs/notifyAppReady.js.map +1 -1
  46. package/lib/commonjs/resetClientUniqueId.js +18 -0
  47. package/lib/commonjs/resetClientUniqueId.js.map +1 -0
  48. package/lib/commonjs/restartApp.js +2 -0
  49. package/lib/commonjs/restartApp.js.map +1 -1
  50. package/lib/commonjs/sync.js +5 -3
  51. package/lib/commonjs/sync.js.map +1 -1
  52. package/lib/module/CodePush.js +6 -2
  53. package/lib/module/CodePush.js.map +1 -1
  54. package/lib/module/allowRestart.js +2 -0
  55. package/lib/module/allowRestart.js.map +1 -1
  56. package/lib/module/checkForUpdates.js +23 -25
  57. package/lib/module/checkForUpdates.js.map +1 -1
  58. package/lib/module/clearUpdates.js +2 -1
  59. package/lib/module/clearUpdates.js.map +1 -1
  60. package/lib/module/disallowRestart.js +2 -0
  61. package/lib/module/disallowRestart.js.map +1 -1
  62. package/lib/module/enums/CheckFrequency.enum.js +2 -2
  63. package/lib/module/enums/InstallMode.enum.js +7 -3
  64. package/lib/module/enums/InstallMode.enum.js.map +1 -1
  65. package/lib/module/enums/SyncStatus.enum.js +7 -7
  66. package/lib/module/enums/UpdateState.enum.js +7 -6
  67. package/lib/module/enums/UpdateState.enum.js.map +1 -1
  68. package/lib/module/getClientUniqueId.js +12 -0
  69. package/lib/module/getClientUniqueId.js.map +1 -0
  70. package/lib/module/index.js +3 -1
  71. package/lib/module/index.js.map +1 -1
  72. package/lib/module/internals/CodePushApiSdk.errors.js +20 -0
  73. package/lib/module/internals/CodePushApiSdk.errors.js.map +1 -0
  74. package/lib/module/internals/CodePushApiSdk.js +96 -0
  75. package/lib/module/internals/CodePushApiSdk.js.map +1 -0
  76. package/lib/module/{enums/DeploymentStatus.enum.js → internals/CodePushApiSdk.types.js} +2 -1
  77. package/lib/module/internals/CodePushApiSdk.types.js.map +1 -0
  78. package/lib/module/internals/RemotePackageImplementation.js +6 -5
  79. package/lib/module/internals/RemotePackageImplementation.js.map +1 -1
  80. package/lib/module/internals/getConfiguration.js +3 -0
  81. package/lib/module/internals/getConfiguration.js.map +1 -1
  82. package/lib/module/internals/utils/fetchRetry.js +55 -0
  83. package/lib/module/internals/utils/fetchRetry.js.map +1 -0
  84. package/lib/module/internals/utils/queryStringify.js +21 -0
  85. package/lib/module/internals/utils/queryStringify.js.map +1 -0
  86. package/lib/module/internals/utils/requestFetchAdapter.js +29 -0
  87. package/lib/module/internals/utils/requestFetchAdapter.js.map +1 -0
  88. package/lib/module/internals/version.js +1 -1
  89. package/lib/module/notifyAppReady.js +11 -9
  90. package/lib/module/notifyAppReady.js.map +1 -1
  91. package/lib/module/resetClientUniqueId.js +14 -0
  92. package/lib/module/resetClientUniqueId.js.map +1 -0
  93. package/lib/module/restartApp.js +2 -0
  94. package/lib/module/restartApp.js.map +1 -1
  95. package/lib/module/sync.js +5 -3
  96. package/lib/module/sync.js.map +1 -1
  97. package/lib/typescript/commonjs/src/CodePush.d.ts +10 -5
  98. package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/src/allowRestart.d.ts +2 -0
  100. package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/src/clearUpdates.d.ts +2 -1
  103. package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/src/disallowRestart.d.ts +2 -0
  105. package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +2 -2
  107. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +7 -3
  108. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +7 -7
  110. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +7 -6
  111. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/src/getClientUniqueId.d.ts +5 -0
  113. package/lib/typescript/commonjs/src/getClientUniqueId.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/src/index.d.ts +3 -1
  115. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts +13 -0
  117. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.errors.d.ts +9 -0
  119. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.errors.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts +101 -0
  121. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +1 -0
  123. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +2 -2
  125. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +1 -0
  127. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/src/internals/types.d.ts +2 -2
  129. package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/src/internals/utils/fetchRetry.d.ts +9 -0
  131. package/lib/typescript/commonjs/src/internals/utils/fetchRetry.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/src/internals/utils/queryStringify.d.ts +4 -0
  133. package/lib/typescript/commonjs/src/internals/utils/queryStringify.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/src/internals/utils/requestFetchAdapter.d.ts +3 -0
  135. package/lib/typescript/commonjs/src/internals/utils/requestFetchAdapter.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/src/internals/version.d.ts +1 -1
  137. package/lib/typescript/commonjs/src/notifyAppReady.d.ts +2 -0
  138. package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/src/resetClientUniqueId.d.ts +5 -0
  140. package/lib/typescript/commonjs/src/resetClientUniqueId.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/src/restartApp.d.ts +2 -0
  142. package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/src/sync.d.ts +3 -1
  144. package/lib/typescript/commonjs/src/sync.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/src/types.d.ts +72 -29
  146. package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
  147. package/lib/typescript/module/src/CodePush.d.ts +10 -5
  148. package/lib/typescript/module/src/CodePush.d.ts.map +1 -1
  149. package/lib/typescript/module/src/allowRestart.d.ts +2 -0
  150. package/lib/typescript/module/src/allowRestart.d.ts.map +1 -1
  151. package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -1
  152. package/lib/typescript/module/src/clearUpdates.d.ts +2 -1
  153. package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -1
  154. package/lib/typescript/module/src/disallowRestart.d.ts +2 -0
  155. package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -1
  156. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +2 -2
  157. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +7 -3
  158. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -1
  159. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +7 -7
  160. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +7 -6
  161. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -1
  162. package/lib/typescript/module/src/getClientUniqueId.d.ts +5 -0
  163. package/lib/typescript/module/src/getClientUniqueId.d.ts.map +1 -0
  164. package/lib/typescript/module/src/index.d.ts +3 -1
  165. package/lib/typescript/module/src/index.d.ts.map +1 -1
  166. package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts +13 -0
  167. package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts.map +1 -0
  168. package/lib/typescript/module/src/internals/CodePushApiSdk.errors.d.ts +9 -0
  169. package/lib/typescript/module/src/internals/CodePushApiSdk.errors.d.ts.map +1 -0
  170. package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts +101 -0
  171. package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts.map +1 -0
  172. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +1 -0
  173. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
  174. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +2 -2
  175. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -1
  176. package/lib/typescript/module/src/internals/getConfiguration.d.ts +1 -0
  177. package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -1
  178. package/lib/typescript/module/src/internals/types.d.ts +2 -2
  179. package/lib/typescript/module/src/internals/types.d.ts.map +1 -1
  180. package/lib/typescript/module/src/internals/utils/fetchRetry.d.ts +9 -0
  181. package/lib/typescript/module/src/internals/utils/fetchRetry.d.ts.map +1 -0
  182. package/lib/typescript/module/src/internals/utils/queryStringify.d.ts +4 -0
  183. package/lib/typescript/module/src/internals/utils/queryStringify.d.ts.map +1 -0
  184. package/lib/typescript/module/src/internals/utils/requestFetchAdapter.d.ts +3 -0
  185. package/lib/typescript/module/src/internals/utils/requestFetchAdapter.d.ts.map +1 -0
  186. package/lib/typescript/module/src/internals/version.d.ts +1 -1
  187. package/lib/typescript/module/src/notifyAppReady.d.ts +2 -0
  188. package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -1
  189. package/lib/typescript/module/src/resetClientUniqueId.d.ts +5 -0
  190. package/lib/typescript/module/src/resetClientUniqueId.d.ts.map +1 -0
  191. package/lib/typescript/module/src/restartApp.d.ts +2 -0
  192. package/lib/typescript/module/src/restartApp.d.ts.map +1 -1
  193. package/lib/typescript/module/src/sync.d.ts +3 -1
  194. package/lib/typescript/module/src/sync.d.ts.map +1 -1
  195. package/lib/typescript/module/src/types.d.ts +72 -29
  196. package/lib/typescript/module/src/types.d.ts.map +1 -1
  197. package/package.json +6 -4
  198. package/src/CodePush.tsx +12 -5
  199. package/src/allowRestart.ts +2 -0
  200. package/src/checkForUpdates.ts +24 -23
  201. package/src/clearUpdates.ts +2 -1
  202. package/src/disallowRestart.ts +2 -0
  203. package/src/enums/CheckFrequency.enum.ts +2 -2
  204. package/src/enums/InstallMode.enum.ts +7 -3
  205. package/src/enums/SyncStatus.enum.ts +7 -7
  206. package/src/enums/UpdateState.enum.ts +7 -6
  207. package/src/getClientUniqueId.ts +9 -0
  208. package/src/index.ts +3 -1
  209. package/src/internals/CodePushApiSdk.errors.ts +22 -0
  210. package/src/internals/CodePushApiSdk.ts +133 -0
  211. package/src/internals/CodePushApiSdk.types.ts +115 -0
  212. package/src/internals/RNAppZungCodePushModuleSpec.ts +1 -0
  213. package/src/internals/RemotePackageImplementation.ts +8 -7
  214. package/src/internals/getConfiguration.ts +4 -0
  215. package/src/internals/types.ts +2 -2
  216. package/src/internals/utils/fetchRetry.ts +72 -0
  217. package/src/internals/utils/queryStringify.ts +22 -0
  218. package/src/internals/utils/requestFetchAdapter.ts +28 -0
  219. package/src/internals/version.ts +1 -1
  220. package/src/notifyAppReady.ts +12 -13
  221. package/src/resetClientUniqueId.ts +11 -0
  222. package/src/restartApp.ts +2 -0
  223. package/src/sync.ts +5 -3
  224. package/src/types.ts +72 -29
  225. package/typedoc.json +9 -0
  226. package/docs/advanced-usage.md +0 -56
  227. package/docs/api-android.md +0 -22
  228. package/docs/api-ios.md +0 -19
  229. package/docs/api-js.md +0 -557
  230. package/docs/code-signing.md +0 -62
  231. package/docs/migrating-to-v10.md +0 -31
  232. package/docs/setup-android.md +0 -81
  233. package/docs/setup-ios.md +0 -108
  234. package/docs/setup-windows.md +0 -55
  235. package/lib/commonjs/enums/DeploymentStatus.enum.js.map +0 -1
  236. package/lib/commonjs/internals/AcquisitionSdk.js +0 -9
  237. package/lib/commonjs/internals/AcquisitionSdk.js.map +0 -1
  238. package/lib/commonjs/internals/getPromisifiedSdk.js +0 -49
  239. package/lib/commonjs/internals/getPromisifiedSdk.js.map +0 -1
  240. package/lib/commonjs/internals/utils/request-fetch-adapter.js +0 -50
  241. package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +0 -1
  242. package/lib/module/enums/DeploymentStatus.enum.js.map +0 -1
  243. package/lib/module/internals/AcquisitionSdk.js +0 -5
  244. package/lib/module/internals/AcquisitionSdk.js.map +0 -1
  245. package/lib/module/internals/getPromisifiedSdk.js +0 -45
  246. package/lib/module/internals/getPromisifiedSdk.js.map +0 -1
  247. package/lib/module/internals/utils/request-fetch-adapter.js +0 -46
  248. package/lib/module/internals/utils/request-fetch-adapter.js.map +0 -1
  249. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +0 -14
  250. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +0 -1
  251. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +0 -3
  252. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +0 -1
  253. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +0 -13
  254. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +0 -1
  255. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +0 -3
  256. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +0 -1
  257. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +0 -14
  258. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +0 -1
  259. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +0 -3
  260. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +0 -1
  261. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +0 -13
  262. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +0 -1
  263. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +0 -3
  264. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +0 -1
  265. package/src/enums/DeploymentStatus.enum.ts +0 -14
  266. package/src/internals/AcquisitionSdk.ts +0 -3
  267. package/src/internals/getPromisifiedSdk.ts +0 -72
  268. package/src/internals/utils/request-fetch-adapter.ts +0 -58
@@ -4,16 +4,20 @@
4
4
  export declare enum InstallMode {
5
5
  /**
6
6
  * Indicates that you want to install the update and restart the app immediately.
7
+ *
8
+ * This value is appropriate for debugging scenarios as well as when displaying an update prompt to the user, since they would expect to see the changes immediately after accepting the installation. Additionally, this mode can be used to enforce mandatory updates, since it removes the potentially undesired latency between the update installation and the next time the end user restarts or resumes the app.
7
9
  */
8
10
  IMMEDIATE,
9
11
  /**
10
12
  * Indicates that you want to install the update, but not forcibly restart the app.
13
+ *
14
+ * When the app is "naturally" restarted (due the OS or end user killing it), the update will be seamlessly picked up. This value is appropriate when performing silent updates, since it would likely be disruptive to the end user if the app suddenly restarted out of nowhere, since they wouldn't have realized an update was even downloaded. This is the default mode used for both the `sync` and `LocalPackage.install` methods.
11
15
  */
12
16
  ON_NEXT_RESTART,
13
17
  /**
14
- * Indicates that you want to install the update, but don't want to restart the app until the next time
15
- * the end user resumes it from the background. This way, you don't disrupt their current session,
16
- * but you can get the update in front of them sooner than having to wait for the next natural restart.
18
+ * Indicates that you want to install the update, but don't want to restart the app until the next time the end user resumes it from the background.
19
+ *
20
+ * This way, you don't disrupt their current session,but you can get the update in front of them sooner than having to wait for the next natural restart.
17
21
  * This value is appropriate for silent installs that can be applied on resume in a non-invasive way.
18
22
  */
19
23
  ON_NEXT_RESUME,
@@ -1 +1 @@
1
- {"version":3,"file":"InstallMode.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/InstallMode.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,SAAqF;IAErF;;OAEG;IACH,eAA+F;IAE/F;;;;;OAKG;IACH,cAA6F;IAE7F;;;;OAIG;IACH,eAA+F;CAChG"}
1
+ {"version":3,"file":"InstallMode.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/InstallMode.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,WAAW;IACrB;;;;OAIG;IACH,SAAqF;IAErF;;;;OAIG;IACH,eAA+F;IAE/F;;;;;OAKG;IACH,cAA6F;IAE7F;;;;OAIG;IACH,eAA+F;CAChG"}
@@ -3,26 +3,26 @@
3
3
  */
4
4
  export declare enum SyncStatus {
5
5
  /**
6
- * The app is up-to-date with the CodePush server.
6
+ * The app is fully up-to-date with the configured release channel.
7
7
  */
8
8
  UP_TO_DATE = 0,
9
9
  /**
10
10
  * An available update has been installed and will be run either immediately after the
11
- * syncStatusChangedCallback function returns or the next time the app resumes/restarts,
12
- * depending on the InstallMode specified in SyncOptions
11
+ * `syncStatusChangedCallback` function returns or the next time the app resumes/restarts,
12
+ * depending on the `InstallMode` specified in `SyncOptions`
13
13
  */
14
14
  UPDATE_INSTALLED = 1,
15
15
  /**
16
16
  * The app had an optional update which the end user chose to ignore.
17
- * (This is only applicable when the updateDialog is used)
17
+ * (This is only applicable when the `updateDialog` is used)
18
18
  */
19
19
  UPDATE_IGNORED = 2,
20
20
  /**
21
- * The sync operation encountered an unknown error.
21
+ * The `sync` operation encountered an unknown error.
22
22
  */
23
23
  UNKNOWN_ERROR = 3,
24
24
  /**
25
- * There is an ongoing sync operation running which prevents the current call from being executed.
25
+ * There is an ongoing `sync` operation running which prevents the current call from being executed.
26
26
  */
27
27
  SYNC_IN_PROGRESS = 4,
28
28
  /**
@@ -31,7 +31,7 @@ export declare enum SyncStatus {
31
31
  CHECKING_FOR_UPDATE = 5,
32
32
  /**
33
33
  * An update is available, and a confirmation dialog was shown
34
- * to the end user. (This is only applicable when the updateDialog is used)
34
+ * to the end user. (This is only applicable when the `updateDialog` is used)
35
35
  */
36
36
  AWAITING_USER_ACTION = 6,
37
37
  /**
@@ -3,18 +3,19 @@
3
3
  */
4
4
  export declare enum UpdateState {
5
5
  /**
6
- * Indicates that an update represents the
7
- * version of the app that is currently running.
6
+ * Indicates that an update represents the version of the app that is currently running.
7
+ *
8
+ * This can be useful for identifying attributes about the app, for scenarios such as displaying the release description in a "what's new?" dialog or reporting the latest version to an analytics and/or crash reporting service.
8
9
  */
9
10
  RUNNING,
10
11
  /**
11
- * Indicates than an update has been installed, but the
12
- * app hasn't been restarted yet in order to apply it.
12
+ * Indicates than an update has been installed, but the app hasn't been restarted yet in order to apply it.
13
+ *
14
+ * This can be useful for determining whether there is a pending update, which you may want to force a programmatic restart (via `restartApp`) in order to apply.
13
15
  */
14
16
  PENDING,
15
17
  /**
16
- * Indicates than an update represents the latest available
17
- * release, and can be either currently running or pending.
18
+ * Indicates than an update represents the latest available release, and can be either currently running or pending.
18
19
  */
19
20
  LATEST
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateState.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/UpdateState.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,WAAW;IACrB;;;OAGG;IACH,OAAiF;IAEjF;;;OAGG;IACH,OAAiF;IAEjF;;;OAGG;IACH,MAA+E;CAChF"}
1
+ {"version":3,"file":"UpdateState.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/UpdateState.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,WAAW;IACrB;;;;OAIG;IACH,OAAiF;IAEjF;;;;OAIG;IACH,OAAiF;IAEjF;;OAEG;IACH,MAA+E;CAChF"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Gets the client's unique ID set by the module. You may also see `resetClientUniqueId`.
3
+ */
4
+ export declare const getClientUniqueId: () => Promise<string>;
5
+ //# sourceMappingURL=getClientUniqueId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClientUniqueId.d.ts","sourceRoot":"","sources":["../../../../src/getClientUniqueId.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,iBAAiB,uBAG7B,CAAC"}
@@ -8,10 +8,12 @@ export * from './getUpdateMetadata';
8
8
  export * from './notifyAppReady';
9
9
  export * from './restartApp';
10
10
  export * from './sync';
11
+ export * from './getClientUniqueId';
12
+ export * from './resetClientUniqueId';
11
13
  export * from './types';
12
14
  export * from './enums/SyncStatus.enum';
13
15
  export * from './enums/InstallMode.enum';
14
16
  export * from './enums/UpdateState.enum';
15
- export * from './enums/DeploymentStatus.enum';
17
+ export { DeploymentStatus } from './internals/CodePushApiSdk.types';
16
18
  export * from './enums/CheckFrequency.enum';
17
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AAEvB,cAAc,SAAS,CAAC;AAExB,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,SAAS,CAAC;AAExB,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type ApiSdkConfiguration, type ApiSdkDeployReportPackageInfo, type ApiSdkDownloadReportPackageInfo, type ApiSdkNativeUpdateNotification, type ApiSdkQueryUpdatePackageInfo, type ApiSdkRemotePackage, DeploymentStatus, type Http } from './CodePushApiSdk.types';
2
+ export declare class CodePushApiSdk {
3
+ private readonly httpRequester;
4
+ private configuration;
5
+ constructor(httpRequester: Http.Requester, configuration: ApiSdkConfiguration);
6
+ queryUpdateWithCurrentPackage(currentPackageInfo: ApiSdkQueryUpdatePackageInfo): Promise<ApiSdkRemotePackage | ApiSdkNativeUpdateNotification | null>;
7
+ reportStatusDeploy(deployedPackageInfo: {
8
+ package: ApiSdkDeployReportPackageInfo;
9
+ status: DeploymentStatus;
10
+ } | null, previousLabelOrAppVersion: string | null, previousDeploymentKey: string | null): Promise<void>;
11
+ reportStatusDownload(downloadedPackage: ApiSdkDownloadReportPackageInfo): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=CodePushApiSdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodePushApiSdk.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EAGxB,gBAAgB,EAChB,KAAK,IAAI,EAGV,MAAM,wBAAwB,CAAC;AAKhC,qBAAa,cAAc;IAIvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAHhC,OAAO,CAAC,aAAa,CAAsB;gBAGxB,aAAa,EAAE,IAAI,CAAC,SAAS,EAC9C,aAAa,EAAE,mBAAmB;IAS9B,6BAA6B,CACjC,kBAAkB,EAAE,4BAA4B,GAC/C,OAAO,CAAC,mBAAmB,GAAG,8BAA8B,GAAG,IAAI,CAAC;IAgDjE,kBAAkB,CACtB,mBAAmB,EAAE;QAAE,OAAO,EAAE,6BAA6B,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAA;KAAE,GAAG,IAAI,EAChG,yBAAyB,EAAE,MAAM,GAAG,IAAI,EACxC,qBAAqB,EAAE,MAAM,GAAG,IAAI,GACnC,OAAO,CAAC,IAAI,CAAC;IA8BV,oBAAoB,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;CAe9F"}
@@ -0,0 +1,9 @@
1
+ export declare class CodePushError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ export declare class CodePushHttpError extends CodePushError {
5
+ readonly url: string;
6
+ readonly statusCode: number;
7
+ constructor(url: string, statusCode: number, message: string);
8
+ }
9
+ //# sourceMappingURL=CodePushApiSdk.errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodePushApiSdk.errors.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.errors.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,iBAAkB,SAAQ,aAAa;IAEhD,QAAQ,CAAC,GAAG,EAAE,MAAM;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM;gBADlB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAC3B,OAAO,EAAE,MAAM;CAUlB"}
@@ -0,0 +1,101 @@
1
+ export interface ApiSdkQueryUpdatePackageInfo {
2
+ appVersion: string;
3
+ label?: string;
4
+ packageHash?: string;
5
+ }
6
+ export interface ApiSdkDeployReportPackageInfo {
7
+ label: string;
8
+ appVersion: string;
9
+ }
10
+ export interface ApiSdkDownloadReportPackageInfo {
11
+ label: string;
12
+ }
13
+ export interface ApiSdkRemotePackage {
14
+ releaseChannelPublicId: string;
15
+ label: string;
16
+ appVersion: string;
17
+ description: string;
18
+ isMandatory: boolean;
19
+ packageSize: number;
20
+ packageHash: string;
21
+ downloadUrl: string;
22
+ }
23
+ export interface ApiSdkNativeUpdateNotification {
24
+ updateAppVersion: true;
25
+ appVersion: string;
26
+ }
27
+ export declare namespace Http {
28
+ interface Response {
29
+ statusCode: number;
30
+ body?: string;
31
+ }
32
+ interface Requester {
33
+ request(verb: 'GET' | 'POST', url: string, requestBody?: string | object | null): Promise<Response>;
34
+ }
35
+ }
36
+ export interface ApiSdkConfiguration {
37
+ appVersion: string;
38
+ clientUniqueId: string;
39
+ releaseChannelPublicId: string;
40
+ serverUrl: string;
41
+ ignoreAppVersion?: boolean;
42
+ }
43
+ /**
44
+ * Indicates the status of a deployment (after installing and restarting).
45
+ */
46
+ export declare enum DeploymentStatus {
47
+ /**
48
+ * The deployment failed (and was rolled back).
49
+ */
50
+ FAILED = "DeploymentFailed",
51
+ /**
52
+ * The deployment succeeded.
53
+ */
54
+ SUCCEEDED = "DeploymentSucceeded"
55
+ }
56
+ export interface ReportDeployInput {
57
+ deployment_key: string;
58
+ app_version: string;
59
+ status?: DeploymentStatus;
60
+ label?: string;
61
+ client_unique_id?: string;
62
+ previous_label_or_app_version?: string;
63
+ previous_deployment_key?: string;
64
+ }
65
+ export interface ReportDownloadInput {
66
+ deployment_key: string;
67
+ label: string;
68
+ client_unique_id?: string;
69
+ }
70
+ export interface CheckUpdateRequestInput {
71
+ deployment_key: string;
72
+ app_version: string;
73
+ package_hash?: string;
74
+ label?: string;
75
+ client_unique_id?: string;
76
+ is_companion?: boolean;
77
+ previous_label_or_app_version?: string;
78
+ previous_deployment_key?: string;
79
+ }
80
+ export interface CheckUpdateResponse {
81
+ update_info: {
82
+ is_available: true;
83
+ target_binary_range: string;
84
+ description: string;
85
+ is_disabled: boolean;
86
+ is_mandatory: boolean;
87
+ rollout: number;
88
+ download_url: string;
89
+ package_size: number;
90
+ package_hash: string;
91
+ label: string;
92
+ should_run_binary_version: boolean;
93
+ update_app_version: boolean;
94
+ } | {
95
+ is_available: false;
96
+ should_run_binary_version: boolean;
97
+ target_binary_range: string;
98
+ update_app_version?: boolean;
99
+ };
100
+ }
101
+ //# sourceMappingURL=CodePushApiSdk.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodePushApiSdk.types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CA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B,CAAC;CACP"}
@@ -16,6 +16,7 @@ export interface Spec extends TurboModule {
16
16
  codePushUpdateStateRunning: number;
17
17
  };
18
18
  getConfiguration(): Promise<Configuration>;
19
+ resetClientUniqueId(): Promise<string>;
19
20
  getUpdateMetadata(updateState: UpdateState): Promise<OmitFunctions<LocalPackage>>;
20
21
  installUpdate(localPackage: OmitFunctions<LocalPackage>, installMode: InstallMode, minimumBackgroundDuration: number): Promise<void>;
21
22
  downloadUpdate(remotePackage: OmitFunctions<RemotePackage>, notifyProgress: boolean): Promise<OmitFunctions<LocalPackage>>;
@@ -1 +1 @@
1
- {"version":3,"file":"RNAppZungCodePushModuleSpec.d.ts","sourceRoot":"","sources":["../../../../../src/internals/RNAppZungCodePushModuleSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEhF,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,YAAY,IAAI;QACd,4BAA4B,EAAE,MAAM,CAAC;QACrC,gCAAgC,EAAE,MAAM,CAAC;QACzC,+BAA+B,EAAE,MAAM,CAAC;QACxC,gCAAgC,EAAE,MAAM,CAAC;QAEzC,yBAAyB,EAAE,MAAM,CAAC;QAClC,0BAA0B,EAAE,MAAM,CAAC;QACnC,0BAA0B,EAAE,MAAM,CAAC;KACpC,CAAC;IAE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CAAC,YAAY,CAAC,CAAC,CAAC;IAExC,UAAU,CAAC,qBAAqB,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB,YAAY,IAAI,IAAI,CAAC;IAErB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAC5C,oBAAoB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IACvD,wBAAwB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAE3D,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAErD,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD"}
@@ -1,7 +1,7 @@
1
- import type { Package } from 'code-push/script/acquisition-sdk';
2
1
  import type { DownloadProgressCallback, LocalPackage, RemotePackage } from '../types';
2
+ import type { ApiSdkDownloadReportPackageInfo } from './CodePushApiSdk.types';
3
3
  export declare class RemotePackageImpl implements RemotePackage {
4
- constructor(remotePackageData: Omit<RemotePackage, 'download'>, reportStatusDownload?: (downloadedPackage: Package) => Promise<void>);
4
+ constructor(remotePackageData: Omit<RemotePackage, 'download'>, reportStatusDownload: (downloadedPackage: ApiSdkDownloadReportPackageInfo) => Promise<void>);
5
5
  download: (downloadProgressCallback?: DownloadProgressCallback) => Promise<LocalPackage>;
6
6
  appVersion: string;
7
7
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"RemotePackageImplementation.d.ts","sourceRoot":"","sources":["../../../../../src/internals/RemotePackageImplementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKtF,qBAAa,iBAAkB,YAAW,aAAa;gBAEnD,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EAClD,oBAAoB,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC;IA6CtE,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzF,UAAU,EAAG,MAAM,CAAC;IACpB,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,aAAa,EAAG,OAAO,CAAC;IACxB,UAAU,EAAG,OAAO,CAAC;IACrB,WAAW,EAAG,OAAO,CAAC;IACtB,SAAS,UAAS;IAClB,KAAK,EAAG,MAAM,CAAC;IACf,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,sBAAsB,EAAG,MAAM,CAAC;CACjC"}
1
+ {"version":3,"file":"RemotePackageImplementation.d.ts","sourceRoot":"","sources":["../../../../../src/internals/RemotePackageImplementation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAK9E,qBAAa,iBAAkB,YAAW,aAAa;gBAEnD,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EAClD,oBAAoB,EAAE,CAAC,iBAAiB,EAAE,+BAA+B,KAAK,OAAO,CAAC,IAAI,CAAC;IA8C7F,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzF,UAAU,EAAG,MAAM,CAAC;IACpB,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,aAAa,EAAG,OAAO,CAAC;IACxB,UAAU,EAAG,OAAO,CAAC;IACrB,WAAW,EAAG,OAAO,CAAC;IACtB,SAAS,UAAS;IAClB,KAAK,EAAG,MAAM,CAAC;IACf,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,sBAAsB,EAAG,MAAM,CAAC;CACjC"}
@@ -1,3 +1,4 @@
1
1
  import type { Configuration } from './types';
2
2
  export declare function getConfiguration(): Promise<Configuration>;
3
+ export declare function reloadCachedConfiguration(): Promise<void>;
3
4
  //# sourceMappingURL=getConfiguration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getConfiguration.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getConfiguration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,wBAAsB,gBAAgB,2BAMrC"}
1
+ {"version":3,"file":"getConfiguration.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getConfiguration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,wBAAsB,gBAAgB,2BAMrC;AAED,wBAAsB,yBAAyB,kBAE9C"}
@@ -1,5 +1,5 @@
1
- import type { Configuration as BaseConfiguration } from 'code-push/script/acquisition-sdk';
2
- export interface Configuration extends BaseConfiguration {
1
+ import type { ApiSdkConfiguration } from './CodePushApiSdk.types';
2
+ export interface Configuration extends ApiSdkConfiguration {
3
3
  releaseChannelPublicId: string;
4
4
  packageHash?: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE3F,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,qBAAqB,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,GAAG,KAAK;CAClD,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACxD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,qBAAqB,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,GAAG,KAAK;CAClD,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare function fetchRetry(url: string, options?: FetchRetryOptions, attempt?: number): Promise<Response>;
2
+ interface FetchRetryOptions extends RequestInit {
3
+ maxRetries?: number;
4
+ initialBackoff?: number;
5
+ backoffMultiplier?: number;
6
+ maxRetryDelay?: number;
7
+ }
8
+ export {};
9
+ //# sourceMappingURL=fetchRetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/fetchRetry.ts"],"names":[],"mappings":"AAAA,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,EAAE,OAAO,SAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAwC7G;AAED,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,4 @@
1
+ export declare function queryStringify(object: {
2
+ [key: string]: any;
3
+ }): string;
4
+ //# sourceMappingURL=queryStringify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryStringify.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/queryStringify.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,MAAM,CAqBrE"}
@@ -0,0 +1,3 @@
1
+ import type { Http } from '../CodePushApiSdk.types';
2
+ export declare const requestFetchAdapter: Http.Requester;
3
+ //# sourceMappingURL=requestFetchAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestFetchAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/requestFetchAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAIpD,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,SAuBtC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "10.0.1";
1
+ export declare const version = "10.1.1";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import type { StatusReport } from './types';
2
2
  /**
3
3
  * Notifies the CodePush runtime that an installed update is considered successful.
4
+ *
5
+ * If you are manually checking for and installing updates (i.e. not using the `sync` method to handle it all for you), then this method **MUST** be called; otherwise CodePush will treat the update as failed and rollback to the previous version when the app next restarts.
4
6
  */
5
7
  export declare const notifyAppReady: () => Promise<void | StatusReport>;
6
8
  //# sourceMappingURL=notifyAppReady.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notifyAppReady.d.ts","sourceRoot":"","sources":["../../../../src/notifyAppReady.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,cAAc,oCAYvB,CAAC"}
1
+ {"version":3,"file":"notifyAppReady.d.ts","sourceRoot":"","sources":["../../../../src/notifyAppReady.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,cAAc,oCAYvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Resets the client's unique ID. You may use this in some GDPR compliance scenarios. Note that this will create a new MAU if a new request is sent later.
3
+ */
4
+ export declare const resetClientUniqueId: () => Promise<string>;
5
+ //# sourceMappingURL=resetClientUniqueId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resetClientUniqueId.d.ts","sourceRoot":"","sources":["../../../../src/resetClientUniqueId.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,mBAAmB,uBAI/B,CAAC"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Immediately restarts the app.
3
3
  *
4
+ * If there is an update pending, it will be immediately displayed to the end user. Otherwise, calling this method simply has the same behavior as the end user killing and restarting the process.
5
+ *
4
6
  * @param onlyIfUpdateIsPending Indicates whether you want the restart to no-op if there isn't currently a pending update.
5
7
  */
6
8
  export declare function restartApp(onlyIfUpdateIsPending?: boolean): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"restartApp.d.ts","sourceRoot":"","sources":["../../../../src/restartApp.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,qBAAqB,UAAQ,iBAE7D"}
1
+ {"version":3,"file":"restartApp.d.ts","sourceRoot":"","sources":["../../../../src/restartApp.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,qBAAqB,UAAQ,iBAE7D"}
@@ -8,10 +8,12 @@ export declare const DEFAULT_UPDATE_DIALOG: UpdateDialog;
8
8
  /**
9
9
  * Allows checking for an update, downloading it and installing it, all with a single call.
10
10
  *
11
+ * Unless you need custom UI and/or behavior, we recommend most developers to use this method when integrating CodePush into their apps, if they are not using the `withCodePush` HOC.
12
+ *
11
13
  * @param options Options used to configure the end-user update experience (e.g. show a prompt?, install the update immediately?).
12
14
  * @param syncStatusChangedCallback An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise.
13
15
  * @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded.
14
16
  * @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch
15
17
  */
16
- export declare const sync: (options?: SyncOptions, syncStatusChangeCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback) => Promise<SyncStatus>;
18
+ export declare const sync: (options?: SyncOptions, syncStatusChangedCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback) => Promise<SyncStatus>;
17
19
  //# sourceMappingURL=sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,OAAO,KAAK,EACV,wBAAwB,EACxB,mCAAmC,EACnC,WAAW,EACX,yBAAyB,EACzB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YASnC,CAAC;AAgLF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,aAUH,WAAW,6BACM,yBAAyB,6BACzB,wBAAwB,wCACb,mCAAmC,KACxE,OAAO,CAAC,UAAU,CA4CnB,CAAC"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,OAAO,KAAK,EACV,wBAAwB,EACxB,mCAAmC,EACnC,WAAW,EACX,yBAAyB,EACzB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YASnC,CAAC;AAgLF;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,aAUH,WAAW,8BACO,yBAAyB,6BAC1B,wBAAwB,wCACb,mCAAmC,KACxE,OAAO,CAAC,UAAU,CA4CnB,CAAC"}