@appzung/react-native-code-push 11.0.0-rc2 → 11.0.0-rc4

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 (294) hide show
  1. package/README.md +10 -10
  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/docs/advanced-usage.md +15 -0
  5. package/docs/api-js/README.md +55 -0
  6. package/docs/api-js/enumerations/CheckFrequency.md +33 -0
  7. package/docs/api-js/enumerations/DeploymentStatus.md +25 -0
  8. package/docs/api-js/enumerations/InstallMode.md +50 -0
  9. package/docs/api-js/enumerations/SyncStatus.md +85 -0
  10. package/docs/api-js/enumerations/UpdateState.md +37 -0
  11. package/docs/api-js/functions/allowRestart.md +17 -0
  12. package/docs/api-js/functions/checkForUpdate.md +29 -0
  13. package/docs/api-js/functions/clearUpdates.md +19 -0
  14. package/docs/api-js/functions/disallowRestart.md +17 -0
  15. package/docs/api-js/functions/getClientUniqueId.md +15 -0
  16. package/docs/api-js/functions/getUpdateMetadata.md +23 -0
  17. package/docs/api-js/functions/notifyAppReady.md +17 -0
  18. package/docs/api-js/functions/resetClientUniqueId.md +15 -0
  19. package/docs/api-js/functions/restartApp.md +25 -0
  20. package/docs/api-js/functions/sync.md +43 -0
  21. package/docs/api-js/functions/withCodePush.md +65 -0
  22. package/docs/api-js/interfaces/CodePushOptions.md +118 -0
  23. package/docs/api-js/interfaces/DownloadProgress.md +23 -0
  24. package/docs/api-js/interfaces/LocalPackage.md +171 -0
  25. package/docs/api-js/interfaces/Package.md +98 -0
  26. package/docs/api-js/interfaces/RemotePackage.md +169 -0
  27. package/docs/api-js/interfaces/RollbackRetryOptions.md +28 -0
  28. package/docs/api-js/interfaces/StatusReport.md +47 -0
  29. package/docs/api-js/interfaces/SyncOptions.md +80 -0
  30. package/docs/api-js/interfaces/UpdateDialog.md +89 -0
  31. package/docs/api-js/type-aliases/DownloadProgressCallback.md +21 -0
  32. package/docs/api-js/type-aliases/HandleBinaryVersionMismatchCallback.md +23 -0
  33. package/docs/api-js/type-aliases/SyncStatusChangedCallback.md +23 -0
  34. package/docs/api-js/variables/DEFAULT_UPDATE_DIALOG.md +12 -0
  35. package/docs/code-signing.md +2 -0
  36. package/docs/setup-android.md +1 -2
  37. package/docs/setup-ios.md +1 -1
  38. package/ios/CodePush/CodePush.h +1 -0
  39. package/ios/CodePush/CodePush.m +7 -0
  40. package/ios/CodePush/CodePushConfig.m +4 -0
  41. package/lib/commonjs/CodePush.js +6 -2
  42. package/lib/commonjs/CodePush.js.map +1 -1
  43. package/lib/commonjs/allowRestart.js +2 -0
  44. package/lib/commonjs/allowRestart.js.map +1 -1
  45. package/lib/commonjs/checkForUpdates.js +23 -25
  46. package/lib/commonjs/checkForUpdates.js.map +1 -1
  47. package/lib/commonjs/clearUpdates.js +2 -1
  48. package/lib/commonjs/clearUpdates.js.map +1 -1
  49. package/lib/commonjs/disallowRestart.js +2 -0
  50. package/lib/commonjs/disallowRestart.js.map +1 -1
  51. package/lib/commonjs/enums/CheckFrequency.enum.js +2 -2
  52. package/lib/commonjs/enums/InstallMode.enum.js +7 -3
  53. package/lib/commonjs/enums/InstallMode.enum.js.map +1 -1
  54. package/lib/commonjs/enums/SyncStatus.enum.js +7 -7
  55. package/lib/commonjs/enums/UpdateState.enum.js +7 -6
  56. package/lib/commonjs/enums/UpdateState.enum.js.map +1 -1
  57. package/lib/commonjs/getClientUniqueId.js +16 -0
  58. package/lib/commonjs/getClientUniqueId.js.map +1 -0
  59. package/lib/commonjs/index.js +34 -13
  60. package/lib/commonjs/index.js.map +1 -1
  61. package/lib/commonjs/internals/CodePushApiSdk.errors.js +26 -0
  62. package/lib/commonjs/internals/CodePushApiSdk.errors.js.map +1 -0
  63. package/lib/commonjs/internals/CodePushApiSdk.js +100 -0
  64. package/lib/commonjs/internals/CodePushApiSdk.js.map +1 -0
  65. package/lib/commonjs/{enums/DeploymentStatus.enum.js → internals/CodePushApiSdk.types.js} +3 -2
  66. package/lib/commonjs/internals/CodePushApiSdk.types.js.map +1 -0
  67. package/lib/commonjs/internals/RemotePackageImplementation.js +6 -5
  68. package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -1
  69. package/lib/commonjs/internals/getConfiguration.js +4 -0
  70. package/lib/commonjs/internals/getConfiguration.js.map +1 -1
  71. package/lib/commonjs/internals/utils/fetchRetry.js +59 -0
  72. package/lib/commonjs/internals/utils/fetchRetry.js.map +1 -0
  73. package/lib/commonjs/internals/utils/queryStringify.js +25 -0
  74. package/lib/commonjs/internals/utils/queryStringify.js.map +1 -0
  75. package/lib/commonjs/internals/utils/requestFetchAdapter.js +33 -0
  76. package/lib/commonjs/internals/utils/requestFetchAdapter.js.map +1 -0
  77. package/lib/commonjs/internals/version.js +1 -1
  78. package/lib/commonjs/notifyAppReady.js +11 -9
  79. package/lib/commonjs/notifyAppReady.js.map +1 -1
  80. package/lib/commonjs/resetClientUniqueId.js +18 -0
  81. package/lib/commonjs/resetClientUniqueId.js.map +1 -0
  82. package/lib/commonjs/restartApp.js +2 -0
  83. package/lib/commonjs/restartApp.js.map +1 -1
  84. package/lib/commonjs/sync.js +5 -3
  85. package/lib/commonjs/sync.js.map +1 -1
  86. package/lib/module/CodePush.js +6 -2
  87. package/lib/module/CodePush.js.map +1 -1
  88. package/lib/module/allowRestart.js +2 -0
  89. package/lib/module/allowRestart.js.map +1 -1
  90. package/lib/module/checkForUpdates.js +23 -25
  91. package/lib/module/checkForUpdates.js.map +1 -1
  92. package/lib/module/clearUpdates.js +2 -1
  93. package/lib/module/clearUpdates.js.map +1 -1
  94. package/lib/module/disallowRestart.js +2 -0
  95. package/lib/module/disallowRestart.js.map +1 -1
  96. package/lib/module/enums/CheckFrequency.enum.js +2 -2
  97. package/lib/module/enums/InstallMode.enum.js +7 -3
  98. package/lib/module/enums/InstallMode.enum.js.map +1 -1
  99. package/lib/module/enums/SyncStatus.enum.js +7 -7
  100. package/lib/module/enums/UpdateState.enum.js +7 -6
  101. package/lib/module/enums/UpdateState.enum.js.map +1 -1
  102. package/lib/module/getClientUniqueId.js +12 -0
  103. package/lib/module/getClientUniqueId.js.map +1 -0
  104. package/lib/module/index.js +3 -1
  105. package/lib/module/index.js.map +1 -1
  106. package/lib/module/internals/CodePushApiSdk.errors.js +20 -0
  107. package/lib/module/internals/CodePushApiSdk.errors.js.map +1 -0
  108. package/lib/module/internals/CodePushApiSdk.js +96 -0
  109. package/lib/module/internals/CodePushApiSdk.js.map +1 -0
  110. package/lib/module/{enums/DeploymentStatus.enum.js → internals/CodePushApiSdk.types.js} +2 -1
  111. package/lib/module/internals/CodePushApiSdk.types.js.map +1 -0
  112. package/lib/module/internals/RemotePackageImplementation.js +6 -5
  113. package/lib/module/internals/RemotePackageImplementation.js.map +1 -1
  114. package/lib/module/internals/getConfiguration.js +3 -0
  115. package/lib/module/internals/getConfiguration.js.map +1 -1
  116. package/lib/module/internals/utils/fetchRetry.js +55 -0
  117. package/lib/module/internals/utils/fetchRetry.js.map +1 -0
  118. package/lib/module/internals/utils/queryStringify.js +21 -0
  119. package/lib/module/internals/utils/queryStringify.js.map +1 -0
  120. package/lib/module/internals/utils/requestFetchAdapter.js +29 -0
  121. package/lib/module/internals/utils/requestFetchAdapter.js.map +1 -0
  122. package/lib/module/internals/version.js +1 -1
  123. package/lib/module/notifyAppReady.js +11 -9
  124. package/lib/module/notifyAppReady.js.map +1 -1
  125. package/lib/module/resetClientUniqueId.js +14 -0
  126. package/lib/module/resetClientUniqueId.js.map +1 -0
  127. package/lib/module/restartApp.js +2 -0
  128. package/lib/module/restartApp.js.map +1 -1
  129. package/lib/module/sync.js +5 -3
  130. package/lib/module/sync.js.map +1 -1
  131. package/lib/typescript/commonjs/src/CodePush.d.ts +10 -5
  132. package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/src/allowRestart.d.ts +2 -0
  134. package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/src/clearUpdates.d.ts +2 -1
  137. package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/src/disallowRestart.d.ts +2 -0
  139. package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +2 -2
  141. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +7 -3
  142. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +7 -7
  144. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +7 -6
  145. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/src/getClientUniqueId.d.ts +5 -0
  147. package/lib/typescript/commonjs/src/getClientUniqueId.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/src/index.d.ts +3 -1
  149. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts +13 -0
  151. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.errors.d.ts +9 -0
  153. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.errors.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts +101 -0
  155. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +1 -0
  157. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
  158. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +2 -2
  159. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +1 -0
  161. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/src/internals/types.d.ts +2 -2
  163. package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/src/internals/utils/fetchRetry.d.ts +9 -0
  165. package/lib/typescript/commonjs/src/internals/utils/fetchRetry.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/src/internals/utils/queryStringify.d.ts +4 -0
  167. package/lib/typescript/commonjs/src/internals/utils/queryStringify.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/src/internals/utils/requestFetchAdapter.d.ts +3 -0
  169. package/lib/typescript/commonjs/src/internals/utils/requestFetchAdapter.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/internals/version.d.ts +1 -1
  171. package/lib/typescript/commonjs/src/notifyAppReady.d.ts +2 -0
  172. package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/src/resetClientUniqueId.d.ts +5 -0
  174. package/lib/typescript/commonjs/src/resetClientUniqueId.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/src/restartApp.d.ts +2 -0
  176. package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/src/sync.d.ts +3 -1
  178. package/lib/typescript/commonjs/src/sync.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/src/types.d.ts +72 -29
  180. package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
  181. package/lib/typescript/module/src/CodePush.d.ts +10 -5
  182. package/lib/typescript/module/src/CodePush.d.ts.map +1 -1
  183. package/lib/typescript/module/src/allowRestart.d.ts +2 -0
  184. package/lib/typescript/module/src/allowRestart.d.ts.map +1 -1
  185. package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -1
  186. package/lib/typescript/module/src/clearUpdates.d.ts +2 -1
  187. package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -1
  188. package/lib/typescript/module/src/disallowRestart.d.ts +2 -0
  189. package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -1
  190. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +2 -2
  191. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +7 -3
  192. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -1
  193. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +7 -7
  194. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +7 -6
  195. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -1
  196. package/lib/typescript/module/src/getClientUniqueId.d.ts +5 -0
  197. package/lib/typescript/module/src/getClientUniqueId.d.ts.map +1 -0
  198. package/lib/typescript/module/src/index.d.ts +3 -1
  199. package/lib/typescript/module/src/index.d.ts.map +1 -1
  200. package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts +13 -0
  201. package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts.map +1 -0
  202. package/lib/typescript/module/src/internals/CodePushApiSdk.errors.d.ts +9 -0
  203. package/lib/typescript/module/src/internals/CodePushApiSdk.errors.d.ts.map +1 -0
  204. package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts +101 -0
  205. package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts.map +1 -0
  206. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +1 -0
  207. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
  208. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +2 -2
  209. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -1
  210. package/lib/typescript/module/src/internals/getConfiguration.d.ts +1 -0
  211. package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -1
  212. package/lib/typescript/module/src/internals/types.d.ts +2 -2
  213. package/lib/typescript/module/src/internals/types.d.ts.map +1 -1
  214. package/lib/typescript/module/src/internals/utils/fetchRetry.d.ts +9 -0
  215. package/lib/typescript/module/src/internals/utils/fetchRetry.d.ts.map +1 -0
  216. package/lib/typescript/module/src/internals/utils/queryStringify.d.ts +4 -0
  217. package/lib/typescript/module/src/internals/utils/queryStringify.d.ts.map +1 -0
  218. package/lib/typescript/module/src/internals/utils/requestFetchAdapter.d.ts +3 -0
  219. package/lib/typescript/module/src/internals/utils/requestFetchAdapter.d.ts.map +1 -0
  220. package/lib/typescript/module/src/internals/version.d.ts +1 -1
  221. package/lib/typescript/module/src/notifyAppReady.d.ts +2 -0
  222. package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -1
  223. package/lib/typescript/module/src/resetClientUniqueId.d.ts +5 -0
  224. package/lib/typescript/module/src/resetClientUniqueId.d.ts.map +1 -0
  225. package/lib/typescript/module/src/restartApp.d.ts +2 -0
  226. package/lib/typescript/module/src/restartApp.d.ts.map +1 -1
  227. package/lib/typescript/module/src/sync.d.ts +3 -1
  228. package/lib/typescript/module/src/sync.d.ts.map +1 -1
  229. package/lib/typescript/module/src/types.d.ts +72 -29
  230. package/lib/typescript/module/src/types.d.ts.map +1 -1
  231. package/package.json +6 -4
  232. package/src/CodePush.tsx +12 -5
  233. package/src/allowRestart.ts +2 -0
  234. package/src/checkForUpdates.ts +24 -23
  235. package/src/clearUpdates.ts +2 -1
  236. package/src/disallowRestart.ts +2 -0
  237. package/src/enums/CheckFrequency.enum.ts +2 -2
  238. package/src/enums/InstallMode.enum.ts +7 -3
  239. package/src/enums/SyncStatus.enum.ts +7 -7
  240. package/src/enums/UpdateState.enum.ts +7 -6
  241. package/src/getClientUniqueId.ts +9 -0
  242. package/src/index.ts +3 -1
  243. package/src/internals/CodePushApiSdk.errors.ts +22 -0
  244. package/src/internals/CodePushApiSdk.ts +133 -0
  245. package/src/internals/CodePushApiSdk.types.ts +115 -0
  246. package/src/internals/RNAppZungCodePushModuleSpec.ts +1 -0
  247. package/src/internals/RemotePackageImplementation.ts +8 -7
  248. package/src/internals/getConfiguration.ts +4 -0
  249. package/src/internals/types.ts +2 -2
  250. package/src/internals/utils/fetchRetry.ts +72 -0
  251. package/src/internals/utils/queryStringify.ts +22 -0
  252. package/src/internals/utils/requestFetchAdapter.ts +28 -0
  253. package/src/internals/version.ts +1 -1
  254. package/src/notifyAppReady.ts +12 -13
  255. package/src/resetClientUniqueId.ts +11 -0
  256. package/src/restartApp.ts +2 -0
  257. package/src/sync.ts +5 -3
  258. package/src/types.ts +72 -29
  259. package/typedoc.json +9 -0
  260. package/docs/api-js.md +0 -557
  261. package/lib/commonjs/enums/DeploymentStatus.enum.js.map +0 -1
  262. package/lib/commonjs/internals/AcquisitionSdk.js +0 -9
  263. package/lib/commonjs/internals/AcquisitionSdk.js.map +0 -1
  264. package/lib/commonjs/internals/getPromisifiedSdk.js +0 -49
  265. package/lib/commonjs/internals/getPromisifiedSdk.js.map +0 -1
  266. package/lib/commonjs/internals/utils/request-fetch-adapter.js +0 -50
  267. package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +0 -1
  268. package/lib/module/enums/DeploymentStatus.enum.js.map +0 -1
  269. package/lib/module/internals/AcquisitionSdk.js +0 -5
  270. package/lib/module/internals/AcquisitionSdk.js.map +0 -1
  271. package/lib/module/internals/getPromisifiedSdk.js +0 -45
  272. package/lib/module/internals/getPromisifiedSdk.js.map +0 -1
  273. package/lib/module/internals/utils/request-fetch-adapter.js +0 -46
  274. package/lib/module/internals/utils/request-fetch-adapter.js.map +0 -1
  275. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +0 -14
  276. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +0 -1
  277. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +0 -3
  278. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +0 -1
  279. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +0 -13
  280. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +0 -1
  281. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +0 -3
  282. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +0 -1
  283. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +0 -14
  284. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +0 -1
  285. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +0 -3
  286. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +0 -1
  287. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +0 -13
  288. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +0 -1
  289. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +0 -3
  290. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +0 -1
  291. package/src/enums/DeploymentStatus.enum.ts +0 -14
  292. package/src/internals/AcquisitionSdk.ts +0 -3
  293. package/src/internals/getPromisifiedSdk.ts +0 -72
  294. package/src/internals/utils/request-fetch-adapter.ts +0 -58
@@ -0,0 +1,65 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / withCodePush
6
+
7
+ # Function: withCodePush()
8
+
9
+ ## Call Signature
10
+
11
+ > **withCodePush**\<`P`\>(`component`): `ComponentType`
12
+
13
+ Wraps a React component inside a "higher order" React component that knows how to synchronize your app's JavaScript bundle and image assets when it is mounted.
14
+
15
+ Internally, the higher-order component calls `sync` inside its `componentDidMount` lifecycle handle, which in turns performs an update check, downloads the update if it exists and installs the update for you.
16
+
17
+ ### Type Parameters
18
+
19
+ • **P** _extends_ `object`
20
+
21
+ ### Parameters
22
+
23
+ #### component
24
+
25
+ `ComponentType`\<`P`\>
26
+
27
+ the React Component that will be decorated
28
+
29
+ ### Returns
30
+
31
+ `ComponentType`
32
+
33
+ ## Call Signature
34
+
35
+ > **withCodePush**\<`P`\>(`options`): (`component`) => `ComponentType`
36
+
37
+ Wraps a React component inside a "higher order" React component that knows how to synchronize your app's JavaScript bundle and image assets when it is mounted.
38
+
39
+ Internally, the higher-order component calls `sync` inside its `componentDidMount` lifecycle handle, which in turns performs an update check, downloads the update if it exists and installs the update for you.
40
+
41
+ ### Type Parameters
42
+
43
+ • **P** _extends_ `object`
44
+
45
+ ### Parameters
46
+
47
+ #### options
48
+
49
+ [`CodePushOptions`](../interfaces/CodePushOptions.md)
50
+
51
+ Options used to configure the end-user sync and update experience (e.g. when to check for updates?, show a prompt?, install the update immediately?).
52
+
53
+ ### Returns
54
+
55
+ `Function`
56
+
57
+ #### Parameters
58
+
59
+ ##### component
60
+
61
+ `ComponentType`\<`P`\>
62
+
63
+ #### Returns
64
+
65
+ `ComponentType`
@@ -0,0 +1,118 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / CodePushOptions
6
+
7
+ # Interface: CodePushOptions
8
+
9
+ ## Extends
10
+
11
+ - [`SyncOptions`](SyncOptions.md)
12
+
13
+ ## Properties
14
+
15
+ ### checkFrequency?
16
+
17
+ > `optional` **checkFrequency**: [`CheckFrequency`](../enumerations/CheckFrequency.md)
18
+
19
+ Specifies when you would like to synchronize updates with the CodePush server.
20
+
21
+ Defaults to CheckFrequency.ON_APP_START.
22
+
23
+ ---
24
+
25
+ ### ignoreFailedUpdates?
26
+
27
+ > `optional` **ignoreFailedUpdates**: `boolean`
28
+
29
+ #### Inherited from
30
+
31
+ [`SyncOptions`](SyncOptions.md).[`ignoreFailedUpdates`](SyncOptions.md#ignorefailedupdates)
32
+
33
+ ---
34
+
35
+ ### installMode?
36
+
37
+ > `optional` **installMode**: [`InstallMode`](../enumerations/InstallMode.md)
38
+
39
+ Specifies when you would like to install regular updates (i.e. those that aren't marked as mandatory).
40
+
41
+ Defaults to InstallMode.ON_NEXT_RESTART.
42
+
43
+ #### Inherited from
44
+
45
+ [`SyncOptions`](SyncOptions.md).[`installMode`](SyncOptions.md#installmode)
46
+
47
+ ---
48
+
49
+ ### mandatoryInstallMode?
50
+
51
+ > `optional` **mandatoryInstallMode**: [`InstallMode`](../enumerations/InstallMode.md)
52
+
53
+ Specifies when you would like to install updates which are marked as mandatory.
54
+
55
+ Defaults to InstallMode.IMMEDIATE.
56
+
57
+ #### Inherited from
58
+
59
+ [`SyncOptions`](SyncOptions.md).[`mandatoryInstallMode`](SyncOptions.md#mandatoryinstallmode)
60
+
61
+ ---
62
+
63
+ ### minimumBackgroundDuration?
64
+
65
+ > `optional` **minimumBackgroundDuration**: `number`
66
+
67
+ Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
68
+ only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME` or `InstallMode.ON_NEXT_SUSPEND`, and can be useful
69
+ for getting your update in front of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying
70
+ the update immediately after a resume or unless the app suspension is long enough to not matter, regardless how long it was in the background.
71
+
72
+ #### Inherited from
73
+
74
+ [`SyncOptions`](SyncOptions.md).[`minimumBackgroundDuration`](SyncOptions.md#minimumbackgroundduration)
75
+
76
+ ---
77
+
78
+ ### releaseChannelPublicId?
79
+
80
+ > `optional` **releaseChannelPublicId**: `string`
81
+
82
+ Specifies the release channel you want to query for an update against.
83
+
84
+ By default, this value is derived from the Info.plist file (iOS) and strings resources (Android), but this option allows you to override it from the JS-side if you need to dynamically use a different release channel for a specific call to sync.
85
+
86
+ #### Inherited from
87
+
88
+ [`SyncOptions`](SyncOptions.md).[`releaseChannelPublicId`](SyncOptions.md#releasechannelpublicid)
89
+
90
+ ---
91
+
92
+ ### rollbackRetryOptions?
93
+
94
+ > `optional` **rollbackRetryOptions**: `true` \| [`RollbackRetryOptions`](RollbackRetryOptions.md)
95
+
96
+ The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions specified in the options).
97
+
98
+ This defaults to null, which has the effect of disabling the retry mechanism.
99
+ Setting this to true will enable the retry mechanism with the default settings, and passing an object to this parameter allows enabling the rollback retry as well as overriding one or more of the default values.
100
+
101
+ #### Inherited from
102
+
103
+ [`SyncOptions`](SyncOptions.md).[`rollbackRetryOptions`](SyncOptions.md#rollbackretryoptions)
104
+
105
+ ---
106
+
107
+ ### updateDialog?
108
+
109
+ > `optional` **updateDialog**: `true` \| [`UpdateDialog`](UpdateDialog.md)
110
+
111
+ Used to determine whether a confirmation dialog should be displayed to the end user when an update is available, and if so, what strings to use.
112
+
113
+ Defaults to null, which has the effect of disabling the dialog completely.
114
+ Setting this to true will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as overriding one or more of the default strings.
115
+
116
+ #### Inherited from
117
+
118
+ [`SyncOptions`](SyncOptions.md).[`updateDialog`](SyncOptions.md#updatedialog)
@@ -0,0 +1,23 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / DownloadProgress
6
+
7
+ # Interface: DownloadProgress
8
+
9
+ ## Properties
10
+
11
+ ### receivedBytes
12
+
13
+ > **receivedBytes**: `number`
14
+
15
+ The number of bytes downloaded thus far.
16
+
17
+ ---
18
+
19
+ ### totalBytes
20
+
21
+ > **totalBytes**: `number`
22
+
23
+ The total number of bytes expected to be received for this update.
@@ -0,0 +1,171 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / LocalPackage
6
+
7
+ # Interface: LocalPackage
8
+
9
+ Represents a downloaded update that is either already running, or has been installed and is pending an app restart.
10
+
11
+ ## Extends
12
+
13
+ - [`Package`](Package.md)
14
+
15
+ ## Properties
16
+
17
+ ### appVersion
18
+
19
+ > **appVersion**: `string`
20
+
21
+ The app binary version that this update is dependent on. This is the value that was
22
+ specified via the --target-binary-version parameter when calling the CLI's release command.
23
+
24
+ #### Inherited from
25
+
26
+ [`Package`](Package.md).[`appVersion`](Package.md#appversion)
27
+
28
+ ---
29
+
30
+ ### description
31
+
32
+ > **description**: `string`
33
+
34
+ The description of the update. This is the same value that you specified in the CLI when you released the update.
35
+
36
+ #### Inherited from
37
+
38
+ [`Package`](Package.md).[`description`](Package.md#description)
39
+
40
+ ---
41
+
42
+ ### failedInstall
43
+
44
+ > **failedInstall**: `boolean`
45
+
46
+ Indicates whether this update has been previously installed but was rolled back.
47
+
48
+ The `sync` method will automatically ignore updates which have previously failed, so you only need to worry about this property if using `checkForUpdate`.
49
+
50
+ #### Inherited from
51
+
52
+ [`Package`](Package.md).[`failedInstall`](Package.md#failedinstall)
53
+
54
+ ---
55
+
56
+ ### isFirstRun
57
+
58
+ > **isFirstRun**: `boolean`
59
+
60
+ Indicates whether this is the first time the update has been run after being installed.
61
+
62
+ This is useful for determining whether you would like to show a "What's New?" UI to the end user after installing an update.
63
+
64
+ #### Inherited from
65
+
66
+ [`Package`](Package.md).[`isFirstRun`](Package.md#isfirstrun)
67
+
68
+ ---
69
+
70
+ ### isMandatory
71
+
72
+ > **isMandatory**: `boolean`
73
+
74
+ Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
75
+
76
+ #### Inherited from
77
+
78
+ [`Package`](Package.md).[`isMandatory`](Package.md#ismandatory)
79
+
80
+ ---
81
+
82
+ ### isPending
83
+
84
+ > **isPending**: `boolean`
85
+
86
+ Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
87
+ needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
88
+
89
+ #### Inherited from
90
+
91
+ [`Package`](Package.md).[`isPending`](Package.md#ispending)
92
+
93
+ ---
94
+
95
+ ### label
96
+
97
+ > **label**: `string`
98
+
99
+ The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
100
+
101
+ #### Inherited from
102
+
103
+ [`Package`](Package.md).[`label`](Package.md#label)
104
+
105
+ ---
106
+
107
+ ### packageHash
108
+
109
+ > **packageHash**: `string`
110
+
111
+ The SHA hash value of the update.
112
+
113
+ #### Inherited from
114
+
115
+ [`Package`](Package.md).[`packageHash`](Package.md#packagehash)
116
+
117
+ ---
118
+
119
+ ### packageSize
120
+
121
+ > **packageSize**: `number`
122
+
123
+ The size of the code contained within the update, in bytes.
124
+
125
+ #### Inherited from
126
+
127
+ [`Package`](Package.md).[`packageSize`](Package.md#packagesize)
128
+
129
+ ---
130
+
131
+ ### releaseChannelPublicId
132
+
133
+ > **releaseChannelPublicId**: `string`
134
+
135
+ The release channel public ID that was used to originally download this update.
136
+
137
+ #### Inherited from
138
+
139
+ [`Package`](Package.md).[`releaseChannelPublicId`](Package.md#releasechannelpublicid)
140
+
141
+ ## Methods
142
+
143
+ ### install()
144
+
145
+ > **install**(`installMode`?, `minimumBackgroundDuration`?, `onUpdateInstalled`?): `Promise`\<`void`\>
146
+
147
+ Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
148
+
149
+ #### Parameters
150
+
151
+ ##### installMode?
152
+
153
+ [`InstallMode`](../enumerations/InstallMode.md)
154
+
155
+ Indicates when you would like the update changes to take effect for the end-user.
156
+
157
+ ##### minimumBackgroundDuration?
158
+
159
+ `number`
160
+
161
+ For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified.
162
+
163
+ ##### onUpdateInstalled?
164
+
165
+ () => `void` \| `Promise`\<`void`\>
166
+
167
+ An optional promise called after app installation
168
+
169
+ #### Returns
170
+
171
+ `Promise`\<`void`\>
@@ -0,0 +1,98 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / Package
6
+
7
+ # Interface: Package
8
+
9
+ ## Extended by
10
+
11
+ - [`LocalPackage`](LocalPackage.md)
12
+ - [`RemotePackage`](RemotePackage.md)
13
+
14
+ ## Properties
15
+
16
+ ### appVersion
17
+
18
+ > **appVersion**: `string`
19
+
20
+ The app binary version that this update is dependent on. This is the value that was
21
+ specified via the --target-binary-version parameter when calling the CLI's release command.
22
+
23
+ ---
24
+
25
+ ### description
26
+
27
+ > **description**: `string`
28
+
29
+ The description of the update. This is the same value that you specified in the CLI when you released the update.
30
+
31
+ ---
32
+
33
+ ### failedInstall
34
+
35
+ > **failedInstall**: `boolean`
36
+
37
+ Indicates whether this update has been previously installed but was rolled back.
38
+
39
+ The `sync` method will automatically ignore updates which have previously failed, so you only need to worry about this property if using `checkForUpdate`.
40
+
41
+ ---
42
+
43
+ ### isFirstRun
44
+
45
+ > **isFirstRun**: `boolean`
46
+
47
+ Indicates whether this is the first time the update has been run after being installed.
48
+
49
+ This is useful for determining whether you would like to show a "What's New?" UI to the end user after installing an update.
50
+
51
+ ---
52
+
53
+ ### isMandatory
54
+
55
+ > **isMandatory**: `boolean`
56
+
57
+ Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
58
+
59
+ ---
60
+
61
+ ### isPending
62
+
63
+ > **isPending**: `boolean`
64
+
65
+ Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
66
+ needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
67
+
68
+ ---
69
+
70
+ ### label
71
+
72
+ > **label**: `string`
73
+
74
+ The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
75
+
76
+ ---
77
+
78
+ ### packageHash
79
+
80
+ > **packageHash**: `string`
81
+
82
+ The SHA hash value of the update.
83
+
84
+ ---
85
+
86
+ ### packageSize
87
+
88
+ > **packageSize**: `number`
89
+
90
+ The size of the code contained within the update, in bytes.
91
+
92
+ ---
93
+
94
+ ### releaseChannelPublicId
95
+
96
+ > **releaseChannelPublicId**: `string`
97
+
98
+ The release channel public ID that was used to originally download this update.
@@ -0,0 +1,169 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / RemotePackage
6
+
7
+ # Interface: RemotePackage
8
+
9
+ Represents an available update on the CodePush server that hasn't been downloaded yet.
10
+
11
+ ## Extends
12
+
13
+ - [`Package`](Package.md)
14
+
15
+ ## Properties
16
+
17
+ ### appVersion
18
+
19
+ > **appVersion**: `string`
20
+
21
+ The app binary version that this update is dependent on. This is the value that was
22
+ specified via the --target-binary-version parameter when calling the CLI's release command.
23
+
24
+ #### Inherited from
25
+
26
+ [`Package`](Package.md).[`appVersion`](Package.md#appversion)
27
+
28
+ ---
29
+
30
+ ### description
31
+
32
+ > **description**: `string`
33
+
34
+ The description of the update. This is the same value that you specified in the CLI when you released the update.
35
+
36
+ #### Inherited from
37
+
38
+ [`Package`](Package.md).[`description`](Package.md#description)
39
+
40
+ ---
41
+
42
+ ### downloadUrl
43
+
44
+ > **downloadUrl**: `string`
45
+
46
+ The URL at which the package is available for download.
47
+
48
+ This property is only needed for advanced usage, since the `download` method will automatically handle the acquisition of updates for you.
49
+
50
+ ---
51
+
52
+ ### failedInstall
53
+
54
+ > **failedInstall**: `boolean`
55
+
56
+ Indicates whether this update has been previously installed but was rolled back.
57
+
58
+ The `sync` method will automatically ignore updates which have previously failed, so you only need to worry about this property if using `checkForUpdate`.
59
+
60
+ #### Inherited from
61
+
62
+ [`Package`](Package.md).[`failedInstall`](Package.md#failedinstall)
63
+
64
+ ---
65
+
66
+ ### isFirstRun
67
+
68
+ > **isFirstRun**: `boolean`
69
+
70
+ Indicates whether this is the first time the update has been run after being installed.
71
+
72
+ This is useful for determining whether you would like to show a "What's New?" UI to the end user after installing an update.
73
+
74
+ #### Inherited from
75
+
76
+ [`Package`](Package.md).[`isFirstRun`](Package.md#isfirstrun)
77
+
78
+ ---
79
+
80
+ ### isMandatory
81
+
82
+ > **isMandatory**: `boolean`
83
+
84
+ Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
85
+
86
+ #### Inherited from
87
+
88
+ [`Package`](Package.md).[`isMandatory`](Package.md#ismandatory)
89
+
90
+ ---
91
+
92
+ ### isPending
93
+
94
+ > **isPending**: `boolean`
95
+
96
+ Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
97
+ needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
98
+
99
+ #### Inherited from
100
+
101
+ [`Package`](Package.md).[`isPending`](Package.md#ispending)
102
+
103
+ ---
104
+
105
+ ### label
106
+
107
+ > **label**: `string`
108
+
109
+ The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
110
+
111
+ #### Inherited from
112
+
113
+ [`Package`](Package.md).[`label`](Package.md#label)
114
+
115
+ ---
116
+
117
+ ### packageHash
118
+
119
+ > **packageHash**: `string`
120
+
121
+ The SHA hash value of the update.
122
+
123
+ #### Inherited from
124
+
125
+ [`Package`](Package.md).[`packageHash`](Package.md#packagehash)
126
+
127
+ ---
128
+
129
+ ### packageSize
130
+
131
+ > **packageSize**: `number`
132
+
133
+ The size of the code contained within the update, in bytes.
134
+
135
+ #### Inherited from
136
+
137
+ [`Package`](Package.md).[`packageSize`](Package.md#packagesize)
138
+
139
+ ---
140
+
141
+ ### releaseChannelPublicId
142
+
143
+ > **releaseChannelPublicId**: `string`
144
+
145
+ The release channel public ID that was used to originally download this update.
146
+
147
+ #### Inherited from
148
+
149
+ [`Package`](Package.md).[`releaseChannelPublicId`](Package.md#releasechannelpublicid)
150
+
151
+ ## Methods
152
+
153
+ ### download()
154
+
155
+ > **download**(`downloadProgressCallback`?): `Promise`\<[`LocalPackage`](LocalPackage.md)\>
156
+
157
+ Downloads the available update from the CodePush service.
158
+
159
+ #### Parameters
160
+
161
+ ##### downloadProgressCallback?
162
+
163
+ [`DownloadProgressCallback`](../type-aliases/DownloadProgressCallback.md)
164
+
165
+ An optional callback that allows tracking the progress of the update while it is being downloaded.
166
+
167
+ #### Returns
168
+
169
+ `Promise`\<[`LocalPackage`](LocalPackage.md)\>
@@ -0,0 +1,28 @@
1
+ [**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
2
+
3
+ ---
4
+
5
+ [@appzung/react-native-code-push](../README.md) / RollbackRetryOptions
6
+
7
+ # Interface: RollbackRetryOptions
8
+
9
+ ## Properties
10
+
11
+ ### delayInHours?
12
+
13
+ > `optional` **delayInHours**: `number`
14
+
15
+ Specifies the minimum time in hours that the app will wait after the latest rollback before attempting to reinstall same rolled-back package.
16
+
17
+ Defaults to `24`.
18
+
19
+ ---
20
+
21
+ ### maxRetryAttempts?
22
+
23
+ > `optional` **maxRetryAttempts**: `number`
24
+
25
+ Specifies the maximum number of retry attempts that the app can make before it stops trying.
26
+ Cannot be less than `1`.
27
+
28
+ Defaults to `1`.