@chipmobilesdk/rn-notification 0.6.0 → 0.7.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.
Files changed (647) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +8 -6
  3. package/lib/commonjs/advanced.js +139 -0
  4. package/lib/commonjs/advanced.js.map +1 -0
  5. package/lib/commonjs/channel/migrate.js +246 -0
  6. package/lib/commonjs/channel/migrate.js.map +1 -0
  7. package/lib/commonjs/channel/tone-map.js +120 -0
  8. package/lib/commonjs/channel/tone-map.js.map +1 -0
  9. package/lib/commonjs/channel/validate-tone.js +61 -0
  10. package/lib/commonjs/channel/validate-tone.js.map +1 -0
  11. package/lib/commonjs/contract/channel.js +52 -0
  12. package/lib/commonjs/contract/channel.js.map +1 -0
  13. package/lib/commonjs/contract/diagnostics.js +25 -0
  14. package/lib/commonjs/contract/diagnostics.js.map +1 -0
  15. package/lib/commonjs/contract/errors.js +126 -0
  16. package/lib/commonjs/contract/errors.js.map +1 -0
  17. package/lib/commonjs/contract/hash.js +35 -0
  18. package/lib/commonjs/contract/hash.js.map +1 -0
  19. package/lib/commonjs/contract/index.js +94 -0
  20. package/lib/commonjs/contract/index.js.map +1 -0
  21. package/lib/commonjs/contract/interaction.js +37 -0
  22. package/lib/commonjs/contract/interaction.js.map +1 -0
  23. package/lib/commonjs/contract/notification.js +42 -0
  24. package/lib/commonjs/contract/notification.js.map +1 -0
  25. package/lib/commonjs/contract/permission.js +2 -0
  26. package/lib/commonjs/contract/permission.js.map +1 -0
  27. package/lib/commonjs/contract/reconcile.js +6 -0
  28. package/lib/commonjs/contract/reconcile.js.map +1 -0
  29. package/lib/commonjs/contract/recurrence.js +53 -0
  30. package/lib/commonjs/contract/recurrence.js.map +1 -0
  31. package/lib/commonjs/diagnostics/burst.js +89 -0
  32. package/lib/commonjs/diagnostics/burst.js.map +1 -0
  33. package/lib/commonjs/diagnostics/events.js +63 -0
  34. package/lib/commonjs/diagnostics/events.js.map +1 -0
  35. package/lib/commonjs/diagnostics/redact.js +48 -0
  36. package/lib/commonjs/diagnostics/redact.js.map +1 -0
  37. package/lib/commonjs/diagnostics/snapshot.js +68 -0
  38. package/lib/commonjs/diagnostics/snapshot.js.map +1 -0
  39. package/lib/commonjs/engine/adapter.js +6 -0
  40. package/lib/commonjs/engine/adapter.js.map +1 -0
  41. package/lib/commonjs/engine/codec.js +84 -0
  42. package/lib/commonjs/engine/codec.js.map +1 -0
  43. package/lib/commonjs/engine/notify-kit/events.js +148 -0
  44. package/lib/commonjs/engine/notify-kit/events.js.map +1 -0
  45. package/lib/commonjs/engine/notify-kit/module.js +119 -0
  46. package/lib/commonjs/engine/notify-kit/module.js.map +1 -0
  47. package/lib/commonjs/engine/notify-kit/platform/android.js +159 -0
  48. package/lib/commonjs/engine/notify-kit/platform/android.js.map +1 -0
  49. package/lib/commonjs/engine/notify-kit/platform/index.js +57 -0
  50. package/lib/commonjs/engine/notify-kit/platform/index.js.map +1 -0
  51. package/lib/commonjs/engine/notify-kit/platform/ios.js +54 -0
  52. package/lib/commonjs/engine/notify-kit/platform/ios.js.map +1 -0
  53. package/lib/commonjs/engine/notify-kit/platform/types.js +6 -0
  54. package/lib/commonjs/engine/notify-kit/platform/types.js.map +1 -0
  55. package/lib/commonjs/engine/notify-kit-engine.js +260 -0
  56. package/lib/commonjs/engine/notify-kit-engine.js.map +1 -0
  57. package/lib/commonjs/index.js +367 -0
  58. package/lib/commonjs/index.js.map +1 -0
  59. package/lib/commonjs/initialize.js +187 -0
  60. package/lib/commonjs/initialize.js.map +1 -0
  61. package/lib/commonjs/interaction/index.js +120 -0
  62. package/lib/commonjs/interaction/index.js.map +1 -0
  63. package/lib/commonjs/maintenance/cycle.js +108 -0
  64. package/lib/commonjs/maintenance/cycle.js.map +1 -0
  65. package/lib/commonjs/maintenance/permission-refresh.js +39 -0
  66. package/lib/commonjs/maintenance/permission-refresh.js.map +1 -0
  67. package/lib/commonjs/maintenance/reanchor.js +99 -0
  68. package/lib/commonjs/maintenance/reanchor.js.map +1 -0
  69. package/lib/commonjs/maintenance/toggle.js +50 -0
  70. package/lib/commonjs/maintenance/toggle.js.map +1 -0
  71. package/lib/commonjs/maintenance/verify.js +70 -0
  72. package/lib/commonjs/maintenance/verify.js.map +1 -0
  73. package/lib/commonjs/maintenance/window-refresh.js +53 -0
  74. package/lib/commonjs/maintenance/window-refresh.js.map +1 -0
  75. package/lib/commonjs/notifications.js +161 -0
  76. package/lib/commonjs/notifications.js.map +1 -0
  77. package/lib/commonjs/package.json +1 -0
  78. package/lib/commonjs/permission/index.js +182 -0
  79. package/lib/commonjs/permission/index.js.map +1 -0
  80. package/lib/commonjs/permission/state.js +92 -0
  81. package/lib/commonjs/permission/state.js.map +1 -0
  82. package/lib/commonjs/push/envelope.js +141 -0
  83. package/lib/commonjs/push/envelope.js.map +1 -0
  84. package/lib/commonjs/push/fcm-provider.js +122 -0
  85. package/lib/commonjs/push/fcm-provider.js.map +1 -0
  86. package/lib/commonjs/push/gate.js +162 -0
  87. package/lib/commonjs/push/gate.js.map +1 -0
  88. package/lib/commonjs/push/index.js +47 -0
  89. package/lib/commonjs/push/index.js.map +1 -0
  90. package/lib/commonjs/push/instructions.js +101 -0
  91. package/lib/commonjs/push/instructions.js.map +1 -0
  92. package/lib/commonjs/push/provider-adapter.js +6 -0
  93. package/lib/commonjs/push/provider-adapter.js.map +1 -0
  94. package/lib/commonjs/push/signout.js +55 -0
  95. package/lib/commonjs/push/signout.js.map +1 -0
  96. package/lib/commonjs/reconcile/chunk.js +49 -0
  97. package/lib/commonjs/reconcile/chunk.js.map +1 -0
  98. package/lib/commonjs/reconcile/diff.js +105 -0
  99. package/lib/commonjs/reconcile/diff.js.map +1 -0
  100. package/lib/commonjs/reconcile/duplicates.js +60 -0
  101. package/lib/commonjs/reconcile/duplicates.js.map +1 -0
  102. package/lib/commonjs/reconcile/index.js +164 -0
  103. package/lib/commonjs/reconcile/index.js.map +1 -0
  104. package/lib/commonjs/reconcile/truncate.js +50 -0
  105. package/lib/commonjs/reconcile/truncate.js.map +1 -0
  106. package/lib/commonjs/recurrence/clock-guard.js +65 -0
  107. package/lib/commonjs/recurrence/clock-guard.js.map +1 -0
  108. package/lib/commonjs/recurrence/expand.js +254 -0
  109. package/lib/commonjs/recurrence/expand.js.map +1 -0
  110. package/lib/commonjs/recurrence/index.js +212 -0
  111. package/lib/commonjs/recurrence/index.js.map +1 -0
  112. package/lib/commonjs/repeat/expiry.js +41 -0
  113. package/lib/commonjs/repeat/expiry.js.map +1 -0
  114. package/lib/commonjs/repeat/index.js +100 -0
  115. package/lib/commonjs/repeat/index.js.map +1 -0
  116. package/lib/commonjs/repeat/marker.js +58 -0
  117. package/lib/commonjs/repeat/marker.js.map +1 -0
  118. package/lib/commonjs/repeat/place.js +83 -0
  119. package/lib/commonjs/repeat/place.js.map +1 -0
  120. package/lib/commonjs/schedule/anchor.js +243 -0
  121. package/lib/commonjs/schedule/anchor.js.map +1 -0
  122. package/lib/commonjs/schedule/index.js +142 -0
  123. package/lib/commonjs/schedule/index.js.map +1 -0
  124. package/lib/commonjs/schedule/partition.js +59 -0
  125. package/lib/commonjs/schedule/partition.js.map +1 -0
  126. package/lib/commonjs/schedule/resolve-moment.js +72 -0
  127. package/lib/commonjs/schedule/resolve-moment.js.map +1 -0
  128. package/lib/commonjs/schedule/validate-content.js +101 -0
  129. package/lib/commonjs/schedule/validate-content.js.map +1 -0
  130. package/lib/commonjs/schedule/validate-identifier.js +126 -0
  131. package/lib/commonjs/schedule/validate-identifier.js.map +1 -0
  132. package/lib/commonjs/schedule/writer.js +44 -0
  133. package/lib/commonjs/schedule/writer.js.map +1 -0
  134. package/lib/commonjs/state/caps.js +101 -0
  135. package/lib/commonjs/state/caps.js.map +1 -0
  136. package/lib/commonjs/state/dedup-ledger.js +39 -0
  137. package/lib/commonjs/state/dedup-ledger.js.map +1 -0
  138. package/lib/commonjs/state/interaction-buffer.js +98 -0
  139. package/lib/commonjs/state/interaction-buffer.js.map +1 -0
  140. package/lib/commonjs/state/mmkv-store.js +75 -0
  141. package/lib/commonjs/state/mmkv-store.js.map +1 -0
  142. package/lib/commonjs/state/permission-history.js +64 -0
  143. package/lib/commonjs/state/permission-history.js.map +1 -0
  144. package/lib/commonjs/state/record.js +269 -0
  145. package/lib/commonjs/state/record.js.map +1 -0
  146. package/lib/commonjs/state/reset.js +37 -0
  147. package/lib/commonjs/state/reset.js.map +1 -0
  148. package/lib/commonjs/state/series-ledger.js +71 -0
  149. package/lib/commonjs/state/series-ledger.js.map +1 -0
  150. package/lib/commonjs/state/store.js +39 -0
  151. package/lib/commonjs/state/store.js.map +1 -0
  152. package/lib/commonjs/testing/conformance/index.js +218 -0
  153. package/lib/commonjs/testing/conformance/index.js.map +1 -0
  154. package/lib/commonjs/testing/fake-engine.js +338 -0
  155. package/lib/commonjs/testing/fake-engine.js.map +1 -0
  156. package/lib/commonjs/testing/fake-provider.js +93 -0
  157. package/lib/commonjs/testing/fake-provider.js.map +1 -0
  158. package/lib/commonjs/testing/faults.js +59 -0
  159. package/lib/commonjs/testing/faults.js.map +1 -0
  160. package/lib/commonjs/testing/index.js +54 -0
  161. package/lib/commonjs/testing/index.js.map +1 -0
  162. package/lib/commonjs/testing/measure.js +298 -0
  163. package/lib/commonjs/testing/measure.js.map +1 -0
  164. package/lib/module/advanced.js +29 -0
  165. package/lib/module/advanced.js.map +1 -0
  166. package/lib/module/channel/migrate.js +242 -0
  167. package/lib/module/channel/migrate.js.map +1 -0
  168. package/lib/module/channel/tone-map.js +112 -0
  169. package/lib/module/channel/tone-map.js.map +1 -0
  170. package/lib/module/channel/validate-tone.js +57 -0
  171. package/lib/module/channel/validate-tone.js.map +1 -0
  172. package/lib/module/contract/channel.js +48 -0
  173. package/lib/module/contract/channel.js.map +1 -0
  174. package/lib/module/contract/diagnostics.js +21 -0
  175. package/lib/module/contract/diagnostics.js.map +1 -0
  176. package/lib/module/contract/errors.js +119 -0
  177. package/lib/module/contract/errors.js.map +1 -0
  178. package/lib/module/contract/hash.js +29 -0
  179. package/lib/module/contract/hash.js.map +1 -0
  180. package/lib/module/contract/index.js +13 -0
  181. package/lib/module/contract/index.js.map +1 -0
  182. package/lib/module/contract/interaction.js +33 -0
  183. package/lib/module/contract/interaction.js.map +1 -0
  184. package/lib/module/contract/notification.js +38 -0
  185. package/lib/module/contract/notification.js.map +1 -0
  186. package/lib/module/contract/permission.js +2 -0
  187. package/lib/module/contract/permission.js.map +1 -0
  188. package/lib/module/contract/reconcile.js +4 -0
  189. package/lib/module/contract/reconcile.js.map +1 -0
  190. package/lib/module/contract/recurrence.js +49 -0
  191. package/lib/module/contract/recurrence.js.map +1 -0
  192. package/lib/module/diagnostics/burst.js +85 -0
  193. package/lib/module/diagnostics/burst.js.map +1 -0
  194. package/lib/module/diagnostics/events.js +58 -0
  195. package/lib/module/diagnostics/events.js.map +1 -0
  196. package/lib/module/diagnostics/redact.js +44 -0
  197. package/lib/module/diagnostics/redact.js.map +1 -0
  198. package/lib/module/diagnostics/snapshot.js +64 -0
  199. package/lib/module/diagnostics/snapshot.js.map +1 -0
  200. package/lib/module/engine/adapter.js +4 -0
  201. package/lib/module/engine/adapter.js.map +1 -0
  202. package/lib/module/engine/codec.js +79 -0
  203. package/lib/module/engine/codec.js.map +1 -0
  204. package/lib/module/engine/notify-kit/events.js +139 -0
  205. package/lib/module/engine/notify-kit/events.js.map +1 -0
  206. package/lib/module/engine/notify-kit/module.js +113 -0
  207. package/lib/module/engine/notify-kit/module.js.map +1 -0
  208. package/lib/module/engine/notify-kit/platform/android.js +155 -0
  209. package/lib/module/engine/notify-kit/platform/android.js.map +1 -0
  210. package/lib/module/engine/notify-kit/platform/index.js +51 -0
  211. package/lib/module/engine/notify-kit/platform/index.js.map +1 -0
  212. package/lib/module/engine/notify-kit/platform/ios.js +49 -0
  213. package/lib/module/engine/notify-kit/platform/ios.js.map +1 -0
  214. package/lib/module/engine/notify-kit/platform/types.js +4 -0
  215. package/lib/module/engine/notify-kit/platform/types.js.map +1 -0
  216. package/lib/module/engine/notify-kit-engine.js +257 -0
  217. package/lib/module/engine/notify-kit-engine.js.map +1 -0
  218. package/lib/module/index.js +98 -0
  219. package/lib/module/index.js.map +1 -0
  220. package/lib/module/initialize.js +182 -0
  221. package/lib/module/initialize.js.map +1 -0
  222. package/lib/module/interaction/index.js +116 -0
  223. package/lib/module/interaction/index.js.map +1 -0
  224. package/lib/module/maintenance/cycle.js +102 -0
  225. package/lib/module/maintenance/cycle.js.map +1 -0
  226. package/lib/module/maintenance/permission-refresh.js +34 -0
  227. package/lib/module/maintenance/permission-refresh.js.map +1 -0
  228. package/lib/module/maintenance/reanchor.js +94 -0
  229. package/lib/module/maintenance/reanchor.js.map +1 -0
  230. package/lib/module/maintenance/toggle.js +45 -0
  231. package/lib/module/maintenance/toggle.js.map +1 -0
  232. package/lib/module/maintenance/verify.js +65 -0
  233. package/lib/module/maintenance/verify.js.map +1 -0
  234. package/lib/module/maintenance/window-refresh.js +48 -0
  235. package/lib/module/maintenance/window-refresh.js.map +1 -0
  236. package/lib/module/notifications.js +157 -0
  237. package/lib/module/notifications.js.map +1 -0
  238. package/lib/module/package.json +1 -0
  239. package/lib/module/permission/index.js +178 -0
  240. package/lib/module/permission/index.js.map +1 -0
  241. package/lib/module/permission/state.js +83 -0
  242. package/lib/module/permission/state.js.map +1 -0
  243. package/lib/module/push/envelope.js +137 -0
  244. package/lib/module/push/envelope.js.map +1 -0
  245. package/lib/module/push/fcm-provider.js +119 -0
  246. package/lib/module/push/fcm-provider.js.map +1 -0
  247. package/lib/module/push/gate.js +158 -0
  248. package/lib/module/push/gate.js.map +1 -0
  249. package/lib/module/push/index.js +16 -0
  250. package/lib/module/push/index.js.map +1 -0
  251. package/lib/module/push/instructions.js +97 -0
  252. package/lib/module/push/instructions.js.map +1 -0
  253. package/lib/module/push/provider-adapter.js +4 -0
  254. package/lib/module/push/provider-adapter.js.map +1 -0
  255. package/lib/module/push/signout.js +51 -0
  256. package/lib/module/push/signout.js.map +1 -0
  257. package/lib/module/reconcile/chunk.js +43 -0
  258. package/lib/module/reconcile/chunk.js.map +1 -0
  259. package/lib/module/reconcile/diff.js +101 -0
  260. package/lib/module/reconcile/diff.js.map +1 -0
  261. package/lib/module/reconcile/duplicates.js +56 -0
  262. package/lib/module/reconcile/duplicates.js.map +1 -0
  263. package/lib/module/reconcile/index.js +161 -0
  264. package/lib/module/reconcile/index.js.map +1 -0
  265. package/lib/module/reconcile/truncate.js +46 -0
  266. package/lib/module/reconcile/truncate.js.map +1 -0
  267. package/lib/module/recurrence/clock-guard.js +60 -0
  268. package/lib/module/recurrence/clock-guard.js.map +1 -0
  269. package/lib/module/recurrence/expand.js +248 -0
  270. package/lib/module/recurrence/expand.js.map +1 -0
  271. package/lib/module/recurrence/index.js +208 -0
  272. package/lib/module/recurrence/index.js.map +1 -0
  273. package/lib/module/repeat/expiry.js +37 -0
  274. package/lib/module/repeat/expiry.js.map +1 -0
  275. package/lib/module/repeat/index.js +67 -0
  276. package/lib/module/repeat/index.js.map +1 -0
  277. package/lib/module/repeat/marker.js +51 -0
  278. package/lib/module/repeat/marker.js.map +1 -0
  279. package/lib/module/repeat/place.js +79 -0
  280. package/lib/module/repeat/place.js.map +1 -0
  281. package/lib/module/schedule/anchor.js +234 -0
  282. package/lib/module/schedule/anchor.js.map +1 -0
  283. package/lib/module/schedule/index.js +137 -0
  284. package/lib/module/schedule/index.js.map +1 -0
  285. package/lib/module/schedule/partition.js +53 -0
  286. package/lib/module/schedule/partition.js.map +1 -0
  287. package/lib/module/schedule/resolve-moment.js +66 -0
  288. package/lib/module/schedule/resolve-moment.js.map +1 -0
  289. package/lib/module/schedule/validate-content.js +95 -0
  290. package/lib/module/schedule/validate-content.js.map +1 -0
  291. package/lib/module/schedule/validate-identifier.js +119 -0
  292. package/lib/module/schedule/validate-identifier.js.map +1 -0
  293. package/lib/module/schedule/writer.js +40 -0
  294. package/lib/module/schedule/writer.js.map +1 -0
  295. package/lib/module/state/caps.js +96 -0
  296. package/lib/module/state/caps.js.map +1 -0
  297. package/lib/module/state/dedup-ledger.js +34 -0
  298. package/lib/module/state/dedup-ledger.js.map +1 -0
  299. package/lib/module/state/interaction-buffer.js +92 -0
  300. package/lib/module/state/interaction-buffer.js.map +1 -0
  301. package/lib/module/state/mmkv-store.js +71 -0
  302. package/lib/module/state/mmkv-store.js.map +1 -0
  303. package/lib/module/state/permission-history.js +56 -0
  304. package/lib/module/state/permission-history.js.map +1 -0
  305. package/lib/module/state/record.js +264 -0
  306. package/lib/module/state/record.js.map +1 -0
  307. package/lib/module/state/reset.js +32 -0
  308. package/lib/module/state/reset.js.map +1 -0
  309. package/lib/module/state/series-ledger.js +62 -0
  310. package/lib/module/state/series-ledger.js.map +1 -0
  311. package/lib/module/state/store.js +35 -0
  312. package/lib/module/state/store.js.map +1 -0
  313. package/lib/module/testing/conformance/index.js +214 -0
  314. package/lib/module/testing/conformance/index.js.map +1 -0
  315. package/lib/module/testing/fake-engine.js +335 -0
  316. package/lib/module/testing/fake-engine.js.map +1 -0
  317. package/lib/module/testing/fake-provider.js +89 -0
  318. package/lib/module/testing/fake-provider.js.map +1 -0
  319. package/lib/module/testing/faults.js +55 -0
  320. package/lib/module/testing/faults.js.map +1 -0
  321. package/lib/module/testing/index.js +19 -0
  322. package/lib/module/testing/index.js.map +1 -0
  323. package/lib/module/testing/measure.js +294 -0
  324. package/lib/module/testing/measure.js.map +1 -0
  325. package/lib/typescript/commonjs/advanced.d.ts +36 -0
  326. package/lib/typescript/commonjs/advanced.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/channel/migrate.d.ts +38 -0
  328. package/lib/typescript/commonjs/channel/migrate.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/channel/tone-map.d.ts +34 -0
  330. package/lib/typescript/commonjs/channel/tone-map.d.ts.map +1 -0
  331. package/lib/typescript/commonjs/channel/validate-tone.d.ts +23 -0
  332. package/lib/typescript/commonjs/channel/validate-tone.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/contract/channel.d.ts +185 -0
  334. package/lib/typescript/commonjs/contract/channel.d.ts.map +1 -0
  335. package/lib/typescript/commonjs/contract/diagnostics.d.ts +92 -0
  336. package/lib/typescript/commonjs/contract/diagnostics.d.ts.map +1 -0
  337. package/lib/typescript/commonjs/contract/errors.d.ts +91 -0
  338. package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/contract/hash.d.ts +14 -0
  340. package/lib/typescript/commonjs/contract/hash.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/contract/index.d.ts +10 -0
  342. package/lib/typescript/commonjs/contract/index.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/contract/interaction.d.ts +53 -0
  344. package/lib/typescript/commonjs/contract/interaction.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/contract/notification.d.ts +110 -0
  346. package/lib/typescript/commonjs/contract/notification.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/contract/permission.d.ts +49 -0
  348. package/lib/typescript/commonjs/contract/permission.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/contract/reconcile.d.ts +82 -0
  350. package/lib/typescript/commonjs/contract/reconcile.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/contract/recurrence.d.ts +118 -0
  352. package/lib/typescript/commonjs/contract/recurrence.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/diagnostics/burst.d.ts +39 -0
  354. package/lib/typescript/commonjs/diagnostics/burst.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/diagnostics/events.d.ts +28 -0
  356. package/lib/typescript/commonjs/diagnostics/events.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/diagnostics/redact.d.ts +22 -0
  358. package/lib/typescript/commonjs/diagnostics/redact.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/diagnostics/snapshot.d.ts +40 -0
  360. package/lib/typescript/commonjs/diagnostics/snapshot.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/engine/adapter.d.ts +172 -0
  362. package/lib/typescript/commonjs/engine/adapter.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/engine/codec.d.ts +20 -0
  364. package/lib/typescript/commonjs/engine/codec.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/engine/notify-kit/events.d.ts +37 -0
  366. package/lib/typescript/commonjs/engine/notify-kit/events.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/engine/notify-kit/module.d.ts +103 -0
  368. package/lib/typescript/commonjs/engine/notify-kit/module.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/engine/notify-kit/platform/android.d.ts +3 -0
  370. package/lib/typescript/commonjs/engine/notify-kit/platform/android.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/engine/notify-kit/platform/index.d.ts +12 -0
  372. package/lib/typescript/commonjs/engine/notify-kit/platform/index.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/engine/notify-kit/platform/ios.d.ts +3 -0
  374. package/lib/typescript/commonjs/engine/notify-kit/platform/ios.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/engine/notify-kit/platform/types.d.ts +33 -0
  376. package/lib/typescript/commonjs/engine/notify-kit/platform/types.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/engine/notify-kit-engine.d.ts +25 -0
  378. package/lib/typescript/commonjs/engine/notify-kit-engine.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/index.d.ts +106 -0
  380. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/initialize.d.ts +74 -0
  382. package/lib/typescript/commonjs/initialize.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/interaction/index.d.ts +53 -0
  384. package/lib/typescript/commonjs/interaction/index.d.ts.map +1 -0
  385. package/lib/typescript/commonjs/maintenance/cycle.d.ts +77 -0
  386. package/lib/typescript/commonjs/maintenance/cycle.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/maintenance/permission-refresh.d.ts +19 -0
  388. package/lib/typescript/commonjs/maintenance/permission-refresh.d.ts.map +1 -0
  389. package/lib/typescript/commonjs/maintenance/reanchor.d.ts +26 -0
  390. package/lib/typescript/commonjs/maintenance/reanchor.d.ts.map +1 -0
  391. package/lib/typescript/commonjs/maintenance/toggle.d.ts +35 -0
  392. package/lib/typescript/commonjs/maintenance/toggle.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/maintenance/verify.d.ts +32 -0
  394. package/lib/typescript/commonjs/maintenance/verify.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/maintenance/window-refresh.d.ts +29 -0
  396. package/lib/typescript/commonjs/maintenance/window-refresh.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/notifications.d.ts +78 -0
  398. package/lib/typescript/commonjs/notifications.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/package.json +1 -0
  400. package/lib/typescript/commonjs/permission/index.d.ts +57 -0
  401. package/lib/typescript/commonjs/permission/index.d.ts.map +1 -0
  402. package/lib/typescript/commonjs/permission/state.d.ts +41 -0
  403. package/lib/typescript/commonjs/permission/state.d.ts.map +1 -0
  404. package/lib/typescript/commonjs/push/envelope.d.ts +33 -0
  405. package/lib/typescript/commonjs/push/envelope.d.ts.map +1 -0
  406. package/lib/typescript/commonjs/push/fcm-provider.d.ts +43 -0
  407. package/lib/typescript/commonjs/push/fcm-provider.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/push/gate.d.ts +57 -0
  409. package/lib/typescript/commonjs/push/gate.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/push/index.d.ts +19 -0
  411. package/lib/typescript/commonjs/push/index.d.ts.map +1 -0
  412. package/lib/typescript/commonjs/push/instructions.d.ts +45 -0
  413. package/lib/typescript/commonjs/push/instructions.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/push/provider-adapter.d.ts +50 -0
  415. package/lib/typescript/commonjs/push/provider-adapter.d.ts.map +1 -0
  416. package/lib/typescript/commonjs/push/signout.d.ts +33 -0
  417. package/lib/typescript/commonjs/push/signout.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/reconcile/chunk.d.ts +24 -0
  419. package/lib/typescript/commonjs/reconcile/chunk.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/reconcile/diff.d.ts +54 -0
  421. package/lib/typescript/commonjs/reconcile/diff.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/reconcile/duplicates.d.ts +32 -0
  423. package/lib/typescript/commonjs/reconcile/duplicates.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/reconcile/index.d.ts +35 -0
  425. package/lib/typescript/commonjs/reconcile/index.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/reconcile/truncate.d.ts +26 -0
  427. package/lib/typescript/commonjs/reconcile/truncate.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/recurrence/clock-guard.d.ts +37 -0
  429. package/lib/typescript/commonjs/recurrence/clock-guard.d.ts.map +1 -0
  430. package/lib/typescript/commonjs/recurrence/expand.d.ts +75 -0
  431. package/lib/typescript/commonjs/recurrence/expand.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/recurrence/index.d.ts +40 -0
  433. package/lib/typescript/commonjs/recurrence/index.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/repeat/expiry.d.ts +23 -0
  435. package/lib/typescript/commonjs/repeat/expiry.d.ts.map +1 -0
  436. package/lib/typescript/commonjs/repeat/index.d.ts +49 -0
  437. package/lib/typescript/commonjs/repeat/index.d.ts.map +1 -0
  438. package/lib/typescript/commonjs/repeat/marker.d.ts +36 -0
  439. package/lib/typescript/commonjs/repeat/marker.d.ts.map +1 -0
  440. package/lib/typescript/commonjs/repeat/place.d.ts +39 -0
  441. package/lib/typescript/commonjs/repeat/place.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/schedule/anchor.d.ts +118 -0
  443. package/lib/typescript/commonjs/schedule/anchor.d.ts.map +1 -0
  444. package/lib/typescript/commonjs/schedule/index.d.ts +40 -0
  445. package/lib/typescript/commonjs/schedule/index.d.ts.map +1 -0
  446. package/lib/typescript/commonjs/schedule/partition.d.ts +29 -0
  447. package/lib/typescript/commonjs/schedule/partition.d.ts.map +1 -0
  448. package/lib/typescript/commonjs/schedule/resolve-moment.d.ts +35 -0
  449. package/lib/typescript/commonjs/schedule/resolve-moment.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/schedule/validate-content.d.ts +42 -0
  451. package/lib/typescript/commonjs/schedule/validate-content.d.ts.map +1 -0
  452. package/lib/typescript/commonjs/schedule/validate-identifier.d.ts +30 -0
  453. package/lib/typescript/commonjs/schedule/validate-identifier.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/schedule/writer.d.ts +36 -0
  455. package/lib/typescript/commonjs/schedule/writer.d.ts.map +1 -0
  456. package/lib/typescript/commonjs/state/caps.d.ts +51 -0
  457. package/lib/typescript/commonjs/state/caps.d.ts.map +1 -0
  458. package/lib/typescript/commonjs/state/dedup-ledger.d.ts +21 -0
  459. package/lib/typescript/commonjs/state/dedup-ledger.d.ts.map +1 -0
  460. package/lib/typescript/commonjs/state/interaction-buffer.d.ts +30 -0
  461. package/lib/typescript/commonjs/state/interaction-buffer.d.ts.map +1 -0
  462. package/lib/typescript/commonjs/state/mmkv-store.d.ts +33 -0
  463. package/lib/typescript/commonjs/state/mmkv-store.d.ts.map +1 -0
  464. package/lib/typescript/commonjs/state/permission-history.d.ts +20 -0
  465. package/lib/typescript/commonjs/state/permission-history.d.ts.map +1 -0
  466. package/lib/typescript/commonjs/state/record.d.ts +134 -0
  467. package/lib/typescript/commonjs/state/record.d.ts.map +1 -0
  468. package/lib/typescript/commonjs/state/reset.d.ts +22 -0
  469. package/lib/typescript/commonjs/state/reset.d.ts.map +1 -0
  470. package/lib/typescript/commonjs/state/series-ledger.d.ts +47 -0
  471. package/lib/typescript/commonjs/state/series-ledger.d.ts.map +1 -0
  472. package/lib/typescript/commonjs/state/store.d.ts +20 -0
  473. package/lib/typescript/commonjs/state/store.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/testing/conformance/index.d.ts +32 -0
  475. package/lib/typescript/commonjs/testing/conformance/index.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/testing/fake-engine.d.ts +91 -0
  477. package/lib/typescript/commonjs/testing/fake-engine.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/testing/fake-provider.d.ts +35 -0
  479. package/lib/typescript/commonjs/testing/fake-provider.d.ts.map +1 -0
  480. package/lib/typescript/commonjs/testing/faults.d.ts +38 -0
  481. package/lib/typescript/commonjs/testing/faults.d.ts.map +1 -0
  482. package/lib/typescript/commonjs/testing/index.d.ts +22 -0
  483. package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/testing/measure.d.ts +59 -0
  485. package/lib/typescript/commonjs/testing/measure.d.ts.map +1 -0
  486. package/lib/typescript/module/advanced.d.ts +36 -0
  487. package/lib/typescript/module/advanced.d.ts.map +1 -0
  488. package/lib/typescript/module/channel/migrate.d.ts +38 -0
  489. package/lib/typescript/module/channel/migrate.d.ts.map +1 -0
  490. package/lib/typescript/module/channel/tone-map.d.ts +34 -0
  491. package/lib/typescript/module/channel/tone-map.d.ts.map +1 -0
  492. package/lib/typescript/module/channel/validate-tone.d.ts +23 -0
  493. package/lib/typescript/module/channel/validate-tone.d.ts.map +1 -0
  494. package/lib/typescript/module/contract/channel.d.ts +185 -0
  495. package/lib/typescript/module/contract/channel.d.ts.map +1 -0
  496. package/lib/typescript/module/contract/diagnostics.d.ts +92 -0
  497. package/lib/typescript/module/contract/diagnostics.d.ts.map +1 -0
  498. package/lib/typescript/module/contract/errors.d.ts +91 -0
  499. package/lib/typescript/module/contract/errors.d.ts.map +1 -0
  500. package/lib/typescript/module/contract/hash.d.ts +14 -0
  501. package/lib/typescript/module/contract/hash.d.ts.map +1 -0
  502. package/lib/typescript/module/contract/index.d.ts +10 -0
  503. package/lib/typescript/module/contract/index.d.ts.map +1 -0
  504. package/lib/typescript/module/contract/interaction.d.ts +53 -0
  505. package/lib/typescript/module/contract/interaction.d.ts.map +1 -0
  506. package/lib/typescript/module/contract/notification.d.ts +110 -0
  507. package/lib/typescript/module/contract/notification.d.ts.map +1 -0
  508. package/lib/typescript/module/contract/permission.d.ts +49 -0
  509. package/lib/typescript/module/contract/permission.d.ts.map +1 -0
  510. package/lib/typescript/module/contract/reconcile.d.ts +82 -0
  511. package/lib/typescript/module/contract/reconcile.d.ts.map +1 -0
  512. package/lib/typescript/module/contract/recurrence.d.ts +118 -0
  513. package/lib/typescript/module/contract/recurrence.d.ts.map +1 -0
  514. package/lib/typescript/module/diagnostics/burst.d.ts +39 -0
  515. package/lib/typescript/module/diagnostics/burst.d.ts.map +1 -0
  516. package/lib/typescript/module/diagnostics/events.d.ts +28 -0
  517. package/lib/typescript/module/diagnostics/events.d.ts.map +1 -0
  518. package/lib/typescript/module/diagnostics/redact.d.ts +22 -0
  519. package/lib/typescript/module/diagnostics/redact.d.ts.map +1 -0
  520. package/lib/typescript/module/diagnostics/snapshot.d.ts +40 -0
  521. package/lib/typescript/module/diagnostics/snapshot.d.ts.map +1 -0
  522. package/lib/typescript/module/engine/adapter.d.ts +172 -0
  523. package/lib/typescript/module/engine/adapter.d.ts.map +1 -0
  524. package/lib/typescript/module/engine/codec.d.ts +20 -0
  525. package/lib/typescript/module/engine/codec.d.ts.map +1 -0
  526. package/lib/typescript/module/engine/notify-kit/events.d.ts +37 -0
  527. package/lib/typescript/module/engine/notify-kit/events.d.ts.map +1 -0
  528. package/lib/typescript/module/engine/notify-kit/module.d.ts +103 -0
  529. package/lib/typescript/module/engine/notify-kit/module.d.ts.map +1 -0
  530. package/lib/typescript/module/engine/notify-kit/platform/android.d.ts +3 -0
  531. package/lib/typescript/module/engine/notify-kit/platform/android.d.ts.map +1 -0
  532. package/lib/typescript/module/engine/notify-kit/platform/index.d.ts +12 -0
  533. package/lib/typescript/module/engine/notify-kit/platform/index.d.ts.map +1 -0
  534. package/lib/typescript/module/engine/notify-kit/platform/ios.d.ts +3 -0
  535. package/lib/typescript/module/engine/notify-kit/platform/ios.d.ts.map +1 -0
  536. package/lib/typescript/module/engine/notify-kit/platform/types.d.ts +33 -0
  537. package/lib/typescript/module/engine/notify-kit/platform/types.d.ts.map +1 -0
  538. package/lib/typescript/module/engine/notify-kit-engine.d.ts +25 -0
  539. package/lib/typescript/module/engine/notify-kit-engine.d.ts.map +1 -0
  540. package/lib/typescript/module/index.d.ts +106 -0
  541. package/lib/typescript/module/index.d.ts.map +1 -0
  542. package/lib/typescript/module/initialize.d.ts +74 -0
  543. package/lib/typescript/module/initialize.d.ts.map +1 -0
  544. package/lib/typescript/module/interaction/index.d.ts +53 -0
  545. package/lib/typescript/module/interaction/index.d.ts.map +1 -0
  546. package/lib/typescript/module/maintenance/cycle.d.ts +77 -0
  547. package/lib/typescript/module/maintenance/cycle.d.ts.map +1 -0
  548. package/lib/typescript/module/maintenance/permission-refresh.d.ts +19 -0
  549. package/lib/typescript/module/maintenance/permission-refresh.d.ts.map +1 -0
  550. package/lib/typescript/module/maintenance/reanchor.d.ts +26 -0
  551. package/lib/typescript/module/maintenance/reanchor.d.ts.map +1 -0
  552. package/lib/typescript/module/maintenance/toggle.d.ts +35 -0
  553. package/lib/typescript/module/maintenance/toggle.d.ts.map +1 -0
  554. package/lib/typescript/module/maintenance/verify.d.ts +32 -0
  555. package/lib/typescript/module/maintenance/verify.d.ts.map +1 -0
  556. package/lib/typescript/module/maintenance/window-refresh.d.ts +29 -0
  557. package/lib/typescript/module/maintenance/window-refresh.d.ts.map +1 -0
  558. package/lib/typescript/module/notifications.d.ts +78 -0
  559. package/lib/typescript/module/notifications.d.ts.map +1 -0
  560. package/lib/typescript/module/package.json +1 -0
  561. package/lib/typescript/module/permission/index.d.ts +57 -0
  562. package/lib/typescript/module/permission/index.d.ts.map +1 -0
  563. package/lib/typescript/module/permission/state.d.ts +41 -0
  564. package/lib/typescript/module/permission/state.d.ts.map +1 -0
  565. package/lib/typescript/module/push/envelope.d.ts +33 -0
  566. package/lib/typescript/module/push/envelope.d.ts.map +1 -0
  567. package/lib/typescript/module/push/fcm-provider.d.ts +43 -0
  568. package/lib/typescript/module/push/fcm-provider.d.ts.map +1 -0
  569. package/lib/typescript/module/push/gate.d.ts +57 -0
  570. package/lib/typescript/module/push/gate.d.ts.map +1 -0
  571. package/lib/typescript/module/push/index.d.ts +19 -0
  572. package/lib/typescript/module/push/index.d.ts.map +1 -0
  573. package/lib/typescript/module/push/instructions.d.ts +45 -0
  574. package/lib/typescript/module/push/instructions.d.ts.map +1 -0
  575. package/lib/typescript/module/push/provider-adapter.d.ts +50 -0
  576. package/lib/typescript/module/push/provider-adapter.d.ts.map +1 -0
  577. package/lib/typescript/module/push/signout.d.ts +33 -0
  578. package/lib/typescript/module/push/signout.d.ts.map +1 -0
  579. package/lib/typescript/module/reconcile/chunk.d.ts +24 -0
  580. package/lib/typescript/module/reconcile/chunk.d.ts.map +1 -0
  581. package/lib/typescript/module/reconcile/diff.d.ts +54 -0
  582. package/lib/typescript/module/reconcile/diff.d.ts.map +1 -0
  583. package/lib/typescript/module/reconcile/duplicates.d.ts +32 -0
  584. package/lib/typescript/module/reconcile/duplicates.d.ts.map +1 -0
  585. package/lib/typescript/module/reconcile/index.d.ts +35 -0
  586. package/lib/typescript/module/reconcile/index.d.ts.map +1 -0
  587. package/lib/typescript/module/reconcile/truncate.d.ts +26 -0
  588. package/lib/typescript/module/reconcile/truncate.d.ts.map +1 -0
  589. package/lib/typescript/module/recurrence/clock-guard.d.ts +37 -0
  590. package/lib/typescript/module/recurrence/clock-guard.d.ts.map +1 -0
  591. package/lib/typescript/module/recurrence/expand.d.ts +75 -0
  592. package/lib/typescript/module/recurrence/expand.d.ts.map +1 -0
  593. package/lib/typescript/module/recurrence/index.d.ts +40 -0
  594. package/lib/typescript/module/recurrence/index.d.ts.map +1 -0
  595. package/lib/typescript/module/repeat/expiry.d.ts +23 -0
  596. package/lib/typescript/module/repeat/expiry.d.ts.map +1 -0
  597. package/lib/typescript/module/repeat/index.d.ts +49 -0
  598. package/lib/typescript/module/repeat/index.d.ts.map +1 -0
  599. package/lib/typescript/module/repeat/marker.d.ts +36 -0
  600. package/lib/typescript/module/repeat/marker.d.ts.map +1 -0
  601. package/lib/typescript/module/repeat/place.d.ts +39 -0
  602. package/lib/typescript/module/repeat/place.d.ts.map +1 -0
  603. package/lib/typescript/module/schedule/anchor.d.ts +118 -0
  604. package/lib/typescript/module/schedule/anchor.d.ts.map +1 -0
  605. package/lib/typescript/module/schedule/index.d.ts +40 -0
  606. package/lib/typescript/module/schedule/index.d.ts.map +1 -0
  607. package/lib/typescript/module/schedule/partition.d.ts +29 -0
  608. package/lib/typescript/module/schedule/partition.d.ts.map +1 -0
  609. package/lib/typescript/module/schedule/resolve-moment.d.ts +35 -0
  610. package/lib/typescript/module/schedule/resolve-moment.d.ts.map +1 -0
  611. package/lib/typescript/module/schedule/validate-content.d.ts +42 -0
  612. package/lib/typescript/module/schedule/validate-content.d.ts.map +1 -0
  613. package/lib/typescript/module/schedule/validate-identifier.d.ts +30 -0
  614. package/lib/typescript/module/schedule/validate-identifier.d.ts.map +1 -0
  615. package/lib/typescript/module/schedule/writer.d.ts +36 -0
  616. package/lib/typescript/module/schedule/writer.d.ts.map +1 -0
  617. package/lib/typescript/module/state/caps.d.ts +51 -0
  618. package/lib/typescript/module/state/caps.d.ts.map +1 -0
  619. package/lib/typescript/module/state/dedup-ledger.d.ts +21 -0
  620. package/lib/typescript/module/state/dedup-ledger.d.ts.map +1 -0
  621. package/lib/typescript/module/state/interaction-buffer.d.ts +30 -0
  622. package/lib/typescript/module/state/interaction-buffer.d.ts.map +1 -0
  623. package/lib/typescript/module/state/mmkv-store.d.ts +33 -0
  624. package/lib/typescript/module/state/mmkv-store.d.ts.map +1 -0
  625. package/lib/typescript/module/state/permission-history.d.ts +20 -0
  626. package/lib/typescript/module/state/permission-history.d.ts.map +1 -0
  627. package/lib/typescript/module/state/record.d.ts +134 -0
  628. package/lib/typescript/module/state/record.d.ts.map +1 -0
  629. package/lib/typescript/module/state/reset.d.ts +22 -0
  630. package/lib/typescript/module/state/reset.d.ts.map +1 -0
  631. package/lib/typescript/module/state/series-ledger.d.ts +47 -0
  632. package/lib/typescript/module/state/series-ledger.d.ts.map +1 -0
  633. package/lib/typescript/module/state/store.d.ts +20 -0
  634. package/lib/typescript/module/state/store.d.ts.map +1 -0
  635. package/lib/typescript/module/testing/conformance/index.d.ts +32 -0
  636. package/lib/typescript/module/testing/conformance/index.d.ts.map +1 -0
  637. package/lib/typescript/module/testing/fake-engine.d.ts +91 -0
  638. package/lib/typescript/module/testing/fake-engine.d.ts.map +1 -0
  639. package/lib/typescript/module/testing/fake-provider.d.ts +35 -0
  640. package/lib/typescript/module/testing/fake-provider.d.ts.map +1 -0
  641. package/lib/typescript/module/testing/faults.d.ts +38 -0
  642. package/lib/typescript/module/testing/faults.d.ts.map +1 -0
  643. package/lib/typescript/module/testing/index.d.ts +22 -0
  644. package/lib/typescript/module/testing/index.d.ts.map +1 -0
  645. package/lib/typescript/module/testing/measure.d.ts +59 -0
  646. package/lib/typescript/module/testing/measure.d.ts.map +1 -0
  647. package/package.json +72 -26
@@ -0,0 +1,78 @@
1
+ /**
2
+ * One call that assembles the whole package (NOT-07).
3
+ *
4
+ * Until 0.5.0 an app wired a dozen factories itself — scheduler, reconciler,
5
+ * recurrence, permissions, channels, interactions, snapshot, maintenance steps
6
+ * — repeating the engine, tone resolver, clock and time-zone reader for each,
7
+ * and usually hard-coding `canScheduleExactly: () => true`. `createNotifications`
8
+ * does that wiring once, the way the package means it:
9
+ *
10
+ * - every part reports through the one redacting diagnostic emitter;
11
+ * - `canScheduleExactly` follows the exact-alarm permission the package last
12
+ * read, instead of a guess;
13
+ * - automatic maintenance has the standard steps registered (re-anchoring after
14
+ * a time-zone change, refreshing permissions, and refreshing recurrence
15
+ * windows when the app supplies its rules), so it does something on every
16
+ * return to the foreground.
17
+ *
18
+ * The individual factories stay exported for an app that needs a different
19
+ * wiring; they are also available from `@chipmobilesdk/rn-notification/advanced`.
20
+ */
21
+ import type { Channels } from './channel/migrate';
22
+ import type { InitializeResult, NotificationConfig } from './contract';
23
+ import type { MaintenanceResult } from './contract/reconcile';
24
+ import type { RecurrenceRule } from './contract/recurrence';
25
+ import { type Snapshot } from './diagnostics/snapshot';
26
+ import type { NotificationEngineAdapter } from './engine/adapter';
27
+ import { type NotificationRuntime } from './initialize';
28
+ import { type Interactions } from './interaction';
29
+ import { type Permissions } from './permission';
30
+ import type { PlatformInfo } from './permission/state';
31
+ import { type Reconciler } from './reconcile';
32
+ import { type Recurrence } from './recurrence';
33
+ import { type Scheduler } from './schedule';
34
+ import { type TimeZoneReader } from './schedule/anchor';
35
+ import type { StateStore } from './state/store';
36
+ export interface NotificationsDependencies {
37
+ /** Defaults to the notify-kit engine. Inject a fake in tests. */
38
+ readonly engine?: NotificationEngineAdapter;
39
+ /** Defaults to MMKV-backed state. */
40
+ readonly store?: StateStore;
41
+ readonly timeZone?: TimeZoneReader;
42
+ readonly now?: () => number;
43
+ /** Defaults to the running OS and, on Android, its API level. */
44
+ readonly platform?: PlatformInfo;
45
+ /**
46
+ * The recurrence rules the app has registered. With it, maintenance refreshes
47
+ * their windows on every foreground return; the package never stores a rule
48
+ * itself, because a rule carries notification content (FR-096a).
49
+ */
50
+ readonly recurrenceRules?: () => readonly RecurrenceRule[];
51
+ /** Whether the app holds a push token, for the snapshot. Presence only. */
52
+ readonly hasPushToken?: () => boolean;
53
+ }
54
+ export interface Notifications {
55
+ readonly scheduler: Scheduler;
56
+ readonly reconciler: Reconciler;
57
+ readonly recurrence: Recurrence;
58
+ readonly permissions: Permissions;
59
+ readonly channels: Channels;
60
+ readonly interactions: Interactions;
61
+ readonly snapshot: Snapshot;
62
+ /** State, diagnostics and the maintenance controller `initialize` assembled. */
63
+ readonly runtime: NotificationRuntime;
64
+ /** What initialization did: tones applied, migrations run, how long it took. */
65
+ readonly initialization: InitializeResult;
66
+ /** The time-zone reader every part schedules against. */
67
+ readonly timeZone: TimeZoneReader;
68
+ /** Handles a tap or action; a shortcut for `interactions.onInteraction`. */
69
+ onInteraction: Interactions['onInteraction'];
70
+ /** Runs maintenance now, whatever the app state. */
71
+ runMaintenance(): Promise<MaintenanceResult>;
72
+ /** Whether the exact-alarm capability is granted, as last read. */
73
+ canScheduleExactly(): boolean;
74
+ /** Stops the lifecycle observer and every listener. */
75
+ dispose(): void;
76
+ }
77
+ export declare function createNotifications(config: NotificationConfig, deps?: NotificationsDependencies): Promise<Notifications>;
78
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../src/notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAkB,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGvF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAGlE,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAItE,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,yBAAyB;IACzC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IAC5C,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,SAAS,cAAc,EAAE,CAAC;IAC3D,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,gFAAgF;IAChF,QAAQ,CAAC,cAAc,EAAE,gBAAgB,CAAC;IAC1C,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,4EAA4E;IAC5E,aAAa,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;IAC7C,oDAAoD;IACpD,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC7C,mEAAmE;IACnE,kBAAkB,IAAI,OAAO,CAAC;IAC9B,uDAAuD;IACvD,OAAO,IAAI,IAAI,CAAC;CAChB;AAOD,wBAAsB,mBAAmB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,IAAI,GAAE,yBAA8B,GAClC,OAAO,CAAC,aAAa,CAAC,CAkGxB"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Permission coordination.
3
+ *
4
+ * Two rules shape everything here. Reading state never prompts, so the consumer
5
+ * decides when the user is asked — a prompt at the wrong moment is a permanent
6
+ * denial. And a refusal never fails the caller's business operation: the user's
7
+ * actual work completes, and the lost capability is reported separately.
8
+ */
9
+ import type { PermissionKind, PermissionReport, PermissionState, RestrictionReport } from '../contract/permission';
10
+ import type { NotificationEngineAdapter } from '../engine/adapter';
11
+ import type { StateManager } from '../state/record';
12
+ import { type PlatformInfo } from './state';
13
+ export interface PermissionDependencies {
14
+ readonly engine: NotificationEngineAdapter;
15
+ readonly state: StateManager;
16
+ readonly platform: PlatformInfo;
17
+ readonly now: () => number;
18
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
19
+ /**
20
+ * Calls back when the app returns from the background. Defaults to rn-core's
21
+ * shared lifecycle; injected in tests.
22
+ */
23
+ readonly onForeground?: (listener: () => void) => () => void;
24
+ }
25
+ export type PermissionChangeHandler = (report: PermissionReport) => void;
26
+ export declare function createPermissions(deps: PermissionDependencies): {
27
+ /** Reads every permission state without triggering any dialog. */
28
+ getPermissions(): Promise<PermissionReport>;
29
+ /** Requested independently — an app may need one and not the other. */
30
+ requestDisplayPermission(ownerTag?: string): Promise<PermissionState>;
31
+ requestExactAlarmPermission(ownerTag?: string): Promise<PermissionState>;
32
+ /** Whether the package has ever asked — the platform cannot answer this. */
33
+ hasEverRequested(kind: PermissionKind, ownerTag?: string): boolean;
34
+ /**
35
+ * Opens the settings screen for one specific permission.
36
+ *
37
+ * Telling a user to "find it in settings" is how you lose them, so a
38
+ * platform with no reachable screen is an error rather than a silent no-op.
39
+ */
40
+ openSettings(kind: PermissionKind): Promise<void>;
41
+ onPermissionChange(handler: PermissionChangeHandler): () => void;
42
+ /**
43
+ * Manufacturer background restrictions, reported for information only.
44
+ *
45
+ * `unknown` is a first-class answer: some vendors stop apps in ways with no
46
+ * detection API, and guessing would be worse than admitting it. The package
47
+ * changes none of these settings on the user's behalf.
48
+ */
49
+ getBackgroundRestrictions(): Promise<RestrictionReport>;
50
+ /** Called by the permission-refresh maintenance step. */
51
+ refresh(): Promise<{
52
+ readonly report: PermissionReport;
53
+ readonly changed: boolean;
54
+ }>;
55
+ };
56
+ export type Permissions = ReturnType<typeof createPermissions>;
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/permission/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAiC,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAW3E,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAC3F;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAC7D;AAUD,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEzE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,sBAAsB;IA+G5D,kEAAkE;sBAC1C,OAAO,CAAC,gBAAgB,CAAC;IAMjD,uEAAuE;wCACnC,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;2CAI9B,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIxE,4EAA4E;2BACrD,cAAc,aAAa,MAAM,GAAG,OAAO;IAIlE;;;;;OAKG;uBACsB,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;gCAW3B,uBAAuB,GAAG,MAAM,IAAI;IAOhE;;;;;;OAMG;iCACgC,OAAO,CAAC,iBAAiB,CAAC;IAoB7D,yDAAyD;eACxC,OAAO,CAAC;QAAE,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;EAK3F;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The permission state model.
3
+ *
4
+ * Six states, never collapsed. The two that matter most are the ones a naive
5
+ * model loses: `notAsked` must stay distinguishable from `denied`, or reading
6
+ * state without prompting buys nothing; and `notRequired` must never be
7
+ * reported as `denied`, because a platform version with no such concept never
8
+ * refused anything.
9
+ */
10
+ import type { PermissionCapability, PermissionKind, PermissionState } from '../contract/permission';
11
+ /** Android runtime notification permission arrived in API 33. */
12
+ export declare const ANDROID_DISPLAY_PERMISSION_API = 33;
13
+ /** Android exact-alarm permission arrived in API 31. */
14
+ export declare const ANDROID_EXACT_ALARM_API = 31;
15
+ export interface PlatformInfo {
16
+ readonly os: 'ios' | 'android' | 'other';
17
+ /** Android API level. Ignored on iOS. */
18
+ readonly apiLevel?: number;
19
+ }
20
+ /**
21
+ * Whether a permission concept exists at all on this platform version.
22
+ *
23
+ * Returning `supported: false` is what lets `notRequired` be reported honestly
24
+ * rather than inventing a refusal.
25
+ */
26
+ export declare function capabilityFor(kind: PermissionKind, platform: PlatformInfo): PermissionCapability;
27
+ /** Normalizes a platform reading into the six-state model. */
28
+ export declare function normalizeState(kind: PermissionKind, raw: PermissionState, platform: PlatformInfo): PermissionState;
29
+ /**
30
+ * Whether a state means the package can still show notifications.
31
+ *
32
+ * `provisional` counts: iOS quiet delivery still reaches the user, just without
33
+ * interrupting them. Treating it as denied would suppress notifications the
34
+ * user is in fact receiving.
35
+ */
36
+ export declare function canDisplay(state: PermissionState): boolean;
37
+ /** Whether asking again could produce a dialog, or whether settings is the only route. */
38
+ export declare function isTerminal(state: PermissionState): boolean;
39
+ /** Whether the package has ever asked, which the platform cannot answer after the fact. */
40
+ export declare function shouldOfferSettings(state: PermissionState): boolean;
41
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/permission/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEpG,iEAAiE;AACjE,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,wDAAwD;AACxD,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,EAAE,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,GAAG,oBAAoB,CAchG;AAED,8DAA8D;AAC9D,wBAAgB,cAAc,CAC7B,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,eAAe,EACpB,QAAQ,EAAE,YAAY,GACpB,eAAe,CAKjB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAE1D;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAE1D;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAEnE"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Payload normalization.
3
+ *
4
+ * Every provider's payload is reduced to one envelope shape before it reaches
5
+ * the consumer, so changing provider costs consumer code nothing.
6
+ *
7
+ * Version handling is best-effort: a payload declaring a version this build
8
+ * does not implement is still processed, honouring the fields it understands
9
+ * and ignoring the rest. Servers deploy ahead of app adoption and old app
10
+ * versions live on devices for months, so gating every server-side change on
11
+ * app rollout is the more expensive failure.
12
+ *
13
+ * That is only safe under an append-only discipline — a released field's
14
+ * meaning must never be repurposed. The version-skew diagnostic exists so a
15
+ * misprocessing incident is traceable to the skew rather than investigated as a
16
+ * logic defect.
17
+ */
18
+ import type { PushEnvelope } from './provider-adapter';
19
+ /** The contract version this build implements. */
20
+ export declare const IMPLEMENTED_PAYLOAD_VERSION = 1;
21
+ export interface NormalizeResult {
22
+ readonly envelope: PushEnvelope;
23
+ readonly versionSkew: boolean;
24
+ }
25
+ /**
26
+ * Normalizes a raw provider payload.
27
+ *
28
+ * Throws only for a **structurally unparseable** payload — a broken message.
29
+ * An unrecognized version is a healthy message from a newer contract and must
30
+ * never collapse into the same condition.
31
+ */
32
+ export declare function normalizeEnvelope(raw: unknown, receivedAt: number): NormalizeResult;
33
+ //# sourceMappingURL=envelope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../../src/push/envelope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,kDAAkD;AAClD,eAAO,MAAM,2BAA2B,IAAI,CAAC;AA2F7C,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe,CAuCnF"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The Firebase Cloud Messaging provider.
3
+ *
4
+ * Every `@react-native-firebase/messaging` import is confined to this file, so
5
+ * the rest of the package — and every consuming app — stays free of provider
6
+ * types. Substituting a provider is an adapter swap, not a rewrite.
7
+ *
8
+ * The module is required **lazily**. That matters more here than for the
9
+ * engine: messaging is an *optional* peer dependency, and an app that never
10
+ * enables push must not fail at import time for a package it deliberately did
11
+ * not install.
12
+ */
13
+ import type { PushProviderAdapter } from './provider-adapter';
14
+ /** Minimal shape used from the SDK, so its full surface never leaks into typing. */
15
+ interface MessagingModule {
16
+ (): MessagingInstance;
17
+ AuthorizationStatus?: Record<string, number>;
18
+ }
19
+ interface MessagingInstance {
20
+ getToken(): Promise<string>;
21
+ deleteToken(): Promise<void>;
22
+ onTokenRefresh(handler: (token: string) => void): () => void;
23
+ onMessage(handler: (message: unknown) => Promise<void> | void): () => void;
24
+ setBackgroundMessageHandler(handler: (message: unknown) => Promise<void>): void;
25
+ getInitialNotification(): Promise<unknown | null>;
26
+ hasPermission?(): Promise<number>;
27
+ isDeviceRegisteredForRemoteMessages?: boolean;
28
+ }
29
+ export interface FcmProviderOptions {
30
+ /** Injected in tests; production resolves the real module. */
31
+ readonly module?: MessagingModule;
32
+ /**
33
+ * Registers the background message handler.
34
+ *
35
+ * Left to the consumer by default because the SDK requires it to be
36
+ * registered at module scope in `index.js`, outside React's lifecycle — a
37
+ * constraint the package documents rather than works around.
38
+ */
39
+ readonly onBackgroundMessage?: (message: unknown) => Promise<void>;
40
+ }
41
+ export declare function createFcmProvider(options?: FcmProviderOptions): PushProviderAdapter;
42
+ export {};
43
+ //# sourceMappingURL=fcm-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fcm-provider.d.ts","sourceRoot":"","sources":["../../../../src/push/fcm-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAoB,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGhF,oFAAoF;AACpF,UAAU,eAAe;IACxB,IAAI,iBAAiB,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED,UAAU,iBAAiB;IAC1B,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,cAAc,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAC7D,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,MAAM,IAAI,CAAC;IAC3E,2BAA2B,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChF,sBAAsB,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IAClD,aAAa,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,mCAAmC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAkBD,MAAM,WAAW,kBAAkB;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,kBAAuB,GAAG,mBAAmB,CA+FvF"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The push gate.
3
+ *
4
+ * Everything a consumer sees about push comes through here, in one normalized
5
+ * shape with zero provider types. Substituting a provider is therefore an
6
+ * adapter swap rather than a consumer rewrite.
7
+ *
8
+ * Two behaviours are deliberate and easy to get wrong. A push arriving in the
9
+ * **foreground is never auto-displayed** — presentation is the app's decision,
10
+ * and a library that decided for it would fight every consumer's design. And a
11
+ * malformed payload is **dropped safely**, because a broken message from a
12
+ * server must not be able to crash an installed app.
13
+ */
14
+ import type { PushEnvelope, PushProviderAdapter, PushAvailability } from './provider-adapter';
15
+ import type { StateManager } from '../state/record';
16
+ import type { Unsubscribe } from '../contract/interaction';
17
+ export type PushHandler = (envelope: PushEnvelope) => void | Promise<void>;
18
+ export interface PushGateDependencies {
19
+ readonly provider: PushProviderAdapter;
20
+ readonly state: StateManager;
21
+ readonly now: () => number;
22
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
23
+ }
24
+ export type UndeliverableCause = 'missingPermission' | 'expiredToken' | 'platformRestriction' | 'malformedPayload' | 'suspectedRateLimit';
25
+ export declare function createPushGate(deps: PushGateDependencies): {
26
+ /** Reports whether platform push services exist, so degradation is controlled. */
27
+ getAvailability(): Promise<PushAvailability>;
28
+ /** Waits for a genuine token. Never returns a placeholder presented as one. */
29
+ getToken(): Promise<string>;
30
+ onTokenChange(handler: (token: string) => void): Unsubscribe;
31
+ invalidateToken(): Promise<boolean>;
32
+ /**
33
+ * Subscribes to inbound payloads.
34
+ *
35
+ * Nothing is displayed automatically — the consumer decides whether and how
36
+ * to present a foreground push.
37
+ */
38
+ onPushReceived(handler: PushHandler): Unsubscribe;
39
+ /**
40
+ * Processes a payload delivered while the app was in the background, from
41
+ * the module-scope handler `setBackgroundMessageHandler` requires (NOT-24).
42
+ *
43
+ * The same normalization and the same persisted deduplication as a
44
+ * foreground payload, so a redelivery after the process restarted is
45
+ * suppressed rather than handled twice. Resolves once every handler has run.
46
+ */
47
+ handleBackground(raw: unknown): Promise<PushEnvelope | undefined>;
48
+ /** Processes the payload that launched the app, if any. */
49
+ collectInitial(): Promise<PushEnvelope | undefined>;
50
+ /** Reports a specific cause rather than leaving a non-delivery unexplained. */
51
+ reportUndeliverable(cause: UndeliverableCause, context?: Record<string, unknown>): void;
52
+ /** Exposed for tests and orderly shutdown. */
53
+ flush(): Promise<void>;
54
+ dispose(): void;
55
+ };
56
+ export type PushGate = ReturnType<typeof createPushGate>;
57
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../../../src/push/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,MAAM,MAAM,kBAAkB,GAC3B,mBAAmB,GACnB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,GAClB,oBAAoB,CAAC;AAExB,wBAAgB,cAAc,CAAC,IAAI,EAAE,oBAAoB;IA+DvD,kFAAkF;uBACzD,OAAO,CAAC,gBAAgB,CAAC;IAYlD,+EAA+E;gBAC7D,OAAO,CAAC,MAAM,CAAC;2BAcV,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,WAAW;uBAUnC,OAAO,CAAC,OAAO,CAAC;IAYzC;;;;;OAKG;4BACqB,WAAW,GAAG,WAAW;IASjD;;;;;;;OAOG;0BACyB,OAAO,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAMvE,2DAA2D;sBACnC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAKzD,+EAA+E;+BACpD,kBAAkB,YAAY,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAQvF,8CAA8C;aAC/B,OAAO,CAAC,IAAI,CAAC;eAIjB,IAAI;EAUhB;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Push surface: `@chipmobilesdk/rn-notification/push`
3
+ *
4
+ * Separate from the default entrypoint so an app that never imports this ships
5
+ * zero provider code, zero push permissions, and zero entitlements — and takes
6
+ * on none of the provider's data-collection declarations.
7
+ */
8
+ export { createPushGate } from './gate';
9
+ export type { PushGate, PushGateDependencies, PushHandler, UndeliverableCause } from './gate';
10
+ export { createFcmProvider } from './fcm-provider';
11
+ export type { FcmProviderOptions } from './fcm-provider';
12
+ export { createSignOut } from './signout';
13
+ export type { SignOut, SignOutDependencies, SignOutResult } from './signout';
14
+ export { createInstructionHandler } from './instructions';
15
+ export type { InstructionHandler, InstructionDependencies, InstructionOutcome, } from './instructions';
16
+ export { normalizeEnvelope, IMPLEMENTED_PAYLOAD_VERSION } from './envelope';
17
+ export type { NormalizeResult } from './envelope';
18
+ export type { PushProviderAdapter, PushEnvelope, PushConfig, PushAvailability, } from './provider-adapter';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/push/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,YAAY,EAAE,QAAQ,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,YAAY,EAAE,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,YAAY,EACX,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EACX,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,GAChB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Push-driven local scheduling.
3
+ *
4
+ * Where the two paths meet. A server can schedule or cancel a local
5
+ * notification, and it gets **no privileged path**: an instruction arriving by
6
+ * push passes exactly the same identifier validation, moment validation, tone
7
+ * resolution, and permission rules as a request from app code.
8
+ *
9
+ * That symmetry is the point. A server that could bypass validation would be
10
+ * able to put the device into a state the app itself could not produce, and no
11
+ * amount of local correctness would survive it.
12
+ */
13
+ import type { PushEnvelope } from './provider-adapter';
14
+ import type { Scheduler } from '../schedule';
15
+ import type { NotificationEngineAdapter } from '../engine/adapter';
16
+ export interface InstructionDependencies {
17
+ readonly scheduler: Scheduler;
18
+ readonly engine: NotificationEngineAdapter;
19
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
20
+ }
21
+ export type InstructionOutcome = {
22
+ readonly kind: 'scheduled';
23
+ readonly id: string;
24
+ readonly replaced: boolean;
25
+ } | {
26
+ readonly kind: 'cancelled';
27
+ readonly id: string;
28
+ } | {
29
+ readonly kind: 'suppressed';
30
+ readonly id: string;
31
+ readonly reason: string;
32
+ } | {
33
+ readonly kind: 'rejected';
34
+ readonly id: string;
35
+ readonly code: string;
36
+ readonly reason: string;
37
+ } | {
38
+ readonly kind: 'ignored';
39
+ readonly id: string;
40
+ };
41
+ export declare function createInstructionHandler(deps: InstructionDependencies): {
42
+ handle(envelope: PushEnvelope): Promise<InstructionOutcome>;
43
+ };
44
+ export type InstructionHandler = ReturnType<typeof createInstructionHandler>;
45
+ //# sourceMappingURL=instructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../../../src/push/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAGnE,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,MAAM,MAAM,kBAAkB,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAC/E;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC7E;IACA,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACvB,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,uBAAuB;qBAkB7C,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC;EAyDlE;AAED,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The port every push provider satisfies.
3
+ *
4
+ * No provider type appears in any signature, which is what makes swapping the
5
+ * provider cost the consumer nothing.
6
+ */
7
+ import type { RoutingPayload, NotificationContent } from '../contract/notification';
8
+ import type { Unsubscribe } from '../contract/interaction';
9
+ /** The single normalized shape every provider's payload is reduced to. */
10
+ export interface PushEnvelope {
11
+ /** Contract version carried by the payload. See contracts/push-payload.md. */
12
+ readonly version: number;
13
+ readonly kind: 'display' | 'data' | 'schedule' | 'cancel';
14
+ readonly id: string;
15
+ readonly ownerTag?: string;
16
+ readonly content?: NotificationContent;
17
+ readonly tone?: string;
18
+ readonly moment?: {
19
+ readonly at: number;
20
+ readonly anchoring?: 'wallClock' | 'absolute';
21
+ };
22
+ readonly routing?: RoutingPayload;
23
+ /** De-duplication key, falling back to `id` when absent. */
24
+ readonly dedupId: string;
25
+ readonly receivedAt: number;
26
+ /**
27
+ * True when the payload declared a version this build does not implement and
28
+ * was processed best-effort, honouring known fields and ignoring the rest.
29
+ */
30
+ readonly versionSkew: boolean;
31
+ }
32
+ export interface PushConfig {
33
+ /** Called when the provider reports a new or refreshed registration token. */
34
+ readonly onTokenChange?: (token: string) => void;
35
+ }
36
+ export type PushAvailability = 'available' | 'unavailable' | 'unknown';
37
+ export interface PushProviderAdapter {
38
+ readonly name: string;
39
+ /** Reports whether platform push services exist, so degradation is controlled rather than opaque. */
40
+ getAvailability(): Promise<PushAvailability>;
41
+ /** Waits for a genuine token. Never returns a placeholder presented as a token. */
42
+ getToken(): Promise<string>;
43
+ onTokenChange(handler: (token: string) => void): Unsubscribe;
44
+ invalidateToken(): Promise<boolean>;
45
+ /** Raw provider payloads, normalized by the gate rather than by the adapter. */
46
+ subscribeToMessages(handler: (raw: unknown) => void): Unsubscribe;
47
+ /** A payload that launched the app, consumed exactly once. */
48
+ takeInitialMessage(): Promise<unknown | undefined>;
49
+ }
50
+ //# sourceMappingURL=provider-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-adapter.d.ts","sourceRoot":"","sources":["../../../../src/push/provider-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,GAAG,UAAU,CAAA;KAAE,CAAC;IACzF,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,UAAU;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,qGAAqG;IACrG,eAAe,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7C,mFAAmF;IACnF,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,WAAW,CAAC;IAC7D,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpC,gFAAgF;IAChF,mBAAmB,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,GAAG,WAAW,CAAC;IAClE,8DAA8D;IAC9D,kBAAkB,IAAI,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACnD"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Sign-out cleanup.
3
+ *
4
+ * Three things must happen together, and the order matters: invalidate the
5
+ * token first so no further messages arrive for the account being left, then
6
+ * cancel its notifications, then clear its persisted state.
7
+ *
8
+ * Deliberately **scoped to one owner tag**. On a shared device, signing one
9
+ * account out must not clear another's deduplication history or cancel their
10
+ * reminders — and must not discard the channel migration ledger, which
11
+ * describes the device rather than any account.
12
+ */
13
+ import type { PushGate } from './gate';
14
+ import type { Scheduler } from '../schedule';
15
+ import type { StateManager } from '../state/record';
16
+ export interface SignOutDependencies {
17
+ readonly scheduler: Scheduler;
18
+ readonly state: StateManager;
19
+ /** Absent for a local-only app, which still needs the rest of the cleanup. */
20
+ readonly push?: PushGate;
21
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
22
+ }
23
+ export interface SignOutResult {
24
+ readonly ownerTag: string;
25
+ readonly tokenInvalidated: boolean;
26
+ readonly cancelledIds: readonly string[];
27
+ readonly clearedCollections: readonly string[];
28
+ }
29
+ export declare function createSignOut(deps: SignOutDependencies): {
30
+ signOut(ownerTag: string): Promise<SignOutResult>;
31
+ };
32
+ export type SignOut = ReturnType<typeof createSignOut>;
33
+ //# sourceMappingURL=signout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signout.d.ts","sourceRoot":"","sources":["../../../../src/push/signout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,mBAAmB;sBAE7B,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;EA2BxD;AAED,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Chunked application.
3
+ *
4
+ * A 500-entry reconciliation must not drop frames on a list screen, so work is
5
+ * applied in slices with a yield between them. No single slice may occupy the
6
+ * interface thread for more than 16 ms, which is what holds 60 fps while
7
+ * reconciliation is in flight.
8
+ */
9
+ export declare const DEFAULT_CHUNK_SIZE = 25;
10
+ /** Yields to the event loop so the interface thread can render between slices. */
11
+ export declare function yieldToEventLoop(): Promise<void>;
12
+ export interface ChunkOptions {
13
+ readonly size?: number;
14
+ readonly onYield?: () => Promise<void>;
15
+ }
16
+ /**
17
+ * Applies `work` to every item, yielding between chunks.
18
+ *
19
+ * Sequential within a chunk rather than parallel: these calls bridge to native,
20
+ * and a burst of concurrent scheduling is where duplicate-delivery races come
21
+ * from.
22
+ */
23
+ export declare function applyInChunks<T>(items: readonly T[], work: (item: T) => Promise<void>, options?: ChunkOptions): Promise<number>;
24
+ //# sourceMappingURL=chunk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../../../src/reconcile/chunk.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,kFAAkF;AAClF,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEhD;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,CAAC,EACpC,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,EAChC,OAAO,GAAE,YAAiB,GACxB,OAAO,CAAC,MAAM,CAAC,CAoBjB"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Desired-versus-device diffing.
3
+ *
4
+ * The package's central promise lives here: reconciling twice with unchanged
5
+ * input must produce **zero** platform operations on the second run. That is
6
+ * only true if "unchanged" is decided by comparing everything that would make
7
+ * the delivered notification different — miss a field and the second run
8
+ * rewrites entries needlessly; include a volatile one and it never settles.
9
+ *
10
+ * Anchoring mode is part of the comparison key deliberately. A mode change on
11
+ * the same identifier must force a replacement rather than read as unchanged,
12
+ * because the two modes resolve to different instants the moment a zone
13
+ * changes.
14
+ */
15
+ import type { NotificationRequest, PendingEntry } from '../contract/notification';
16
+ export type OperationKind = 'create' | 'replace' | 'cancel';
17
+ export interface DiffOperation {
18
+ readonly kind: OperationKind;
19
+ readonly id: string;
20
+ /** Present for create and replace. */
21
+ readonly request?: NotificationRequest;
22
+ /** The instant the entry should fire, after anchoring resolution. */
23
+ readonly resolvedAt?: number;
24
+ }
25
+ export interface DiffResult {
26
+ readonly operations: readonly DiffOperation[];
27
+ readonly unchanged: readonly string[];
28
+ }
29
+ export interface DiffInput {
30
+ readonly desired: readonly NotificationRequest[];
31
+ /** Resolved firing instant per desired identifier, after anchoring. */
32
+ readonly resolvedAt: ReadonlyMap<string, number>;
33
+ /** What the device currently holds, already narrowed to the caller's domain. */
34
+ readonly device: readonly PendingEntry[];
35
+ /**
36
+ * Identifiers that were rejected before diffing and must be left alone.
37
+ *
38
+ * Without this they would look like strays — present on the device, absent
39
+ * from the desired set — and be cancelled. But a rejection is not a
40
+ * cancellation: the package could not decide what the caller meant, so
41
+ * destroying the existing notification would be the worst available answer.
42
+ */
43
+ readonly protectedIds?: ReadonlySet<string>;
44
+ }
45
+ /**
46
+ * Computes the minimal operation set.
47
+ *
48
+ * Cancels are emitted before creates so an interrupted pass leaves a
49
+ * recoverable gap rather than a duplicate: a missing notification is fixed by
50
+ * the next reconcile, whereas two notifications for one subject is a defect the
51
+ * user sees.
52
+ */
53
+ export declare function diff(input: DiffInput): DiffResult;
54
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../src/reconcile/diff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElF,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IACvC,qEAAqE;IACrE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AA8DD,MAAM,WAAW,SAAS;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACjD,uEAAuE;IACvE,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC;;;;;;;OAOG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC5C;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAkCjD"}