@chipmobilesdk/rn-notification 0.5.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 (681) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/README.md +108 -16
  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 +74 -23
  648. package/skills/sdk-rn-notification/SKILL.md +6 -5
  649. package/src/advanced.ts +35 -0
  650. package/src/channel/migrate.ts +176 -158
  651. package/src/channel/tone-map.ts +2 -10
  652. package/src/contract/errors.ts +7 -0
  653. package/src/contract/hash.ts +26 -0
  654. package/src/engine/adapter.ts +21 -1
  655. package/src/engine/notify-kit/events.ts +155 -0
  656. package/src/engine/notify-kit/module.ts +148 -0
  657. package/src/engine/notify-kit/platform/android.ts +172 -0
  658. package/src/engine/notify-kit/platform/index.ts +55 -0
  659. package/src/engine/notify-kit/platform/ios.ts +54 -0
  660. package/src/engine/notify-kit/platform/types.ts +40 -0
  661. package/src/engine/notify-kit-engine.ts +96 -477
  662. package/src/index.ts +9 -0
  663. package/src/notifications.ts +195 -0
  664. package/src/permission/index.ts +65 -4
  665. package/src/push/fcm-provider.ts +14 -4
  666. package/src/push/gate.ts +27 -5
  667. package/src/reconcile/diff.ts +38 -27
  668. package/src/reconcile/index.ts +13 -4
  669. package/src/recurrence/index.ts +2 -1
  670. package/src/repeat/expiry.ts +2 -6
  671. package/src/repeat/index.ts +45 -1
  672. package/src/repeat/marker.ts +1 -22
  673. package/src/repeat/place.ts +74 -35
  674. package/src/schedule/index.ts +10 -4
  675. package/src/schedule/partition.ts +0 -19
  676. package/src/schedule/validate-identifier.ts +8 -6
  677. package/src/schedule/writer.ts +13 -4
  678. package/src/state/caps.ts +28 -3
  679. package/src/state/permission-history.ts +25 -0
  680. package/src/state/record.ts +110 -20
  681. package/src/testing/fake-engine.ts +17 -1
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Android: channels, exact alarms, battery optimisation, looping alerts.
5
+ */
6
+
7
+ import { toPermissionState } from "../events.js";
8
+ import { ANDROID_IMPORTANCE, BACKGROUND_WINDOW_MS, MARKER_CHANNEL_ID, compact } from "../module.js";
9
+ /** Android has no hard pending ceiling like iOS; this bound keeps behavior predictable. */
10
+ const ANDROID_PENDING_BUDGET = 500;
11
+ /** Android 13: the first version with a runtime display permission. */
12
+ const DISPLAY_PERMISSION_API = 33;
13
+ /** Android 12: the first version that gates exact alarms. */
14
+ const EXACT_ALARM_API = 31;
15
+ export function createAndroidPlatform({
16
+ engine,
17
+ apiLevel
18
+ }) {
19
+ let markerChannelReady = false;
20
+ /** The declared channels for the duration of one `withChannelSnapshot` (NOT-08). */
21
+ let channelSnapshot;
22
+ const declaredChannels = async () => channelSnapshot ?? engine().getChannels();
23
+ // An unknown API level is treated as current: gating is the safe assumption.
24
+ const atLeast = level => (apiLevel() ?? Number.POSITIVE_INFINITY) >= level;
25
+ return {
26
+ capabilities: () => ({
27
+ pendingCeiling: ANDROID_PENDING_BUDGET,
28
+ supportsExactAlarms: true,
29
+ supportsChannels: true,
30
+ supportsTextInputActions: true,
31
+ supportsDoNotDisturbBypass: true,
32
+ supportsRepeatingAlert: true,
33
+ backgroundWindowMs: BACKGROUND_WINDOW_MS
34
+ }),
35
+ /**
36
+ * Lazily rather than at initialization, so an app that never declares a
37
+ * repeating tone never grows an extra entry in the user's notification
38
+ * settings for a feature it does not use.
39
+ */
40
+ async ensureMarkerChannel() {
41
+ if (markerChannelReady) return;
42
+ await engine().createChannel({
43
+ id: MARKER_CHANNEL_ID,
44
+ name: 'Background maintenance',
45
+ description: 'Used briefly to end a repeating alert. Notifications here are removed immediately.',
46
+ importance: ANDROID_IMPORTANCE.min,
47
+ vibration: false,
48
+ badge: false
49
+ });
50
+ markerChannelReady = true;
51
+ },
52
+ async withChannelSnapshot(work) {
53
+ if (channelSnapshot !== undefined) {
54
+ return work();
55
+ }
56
+ channelSnapshot = await engine().getChannels();
57
+ try {
58
+ return await work();
59
+ } finally {
60
+ channelSnapshot = undefined;
61
+ }
62
+ },
63
+ async declareTone(tone) {
64
+ const existing = await declaredChannels();
65
+ const held = existing.find(channel => channel.id === tone.android.channelId);
66
+ const remember = () => {
67
+ channelSnapshot = channelSnapshot?.filter(channel => channel.id !== tone.android.channelId).concat({
68
+ id: tone.android.channelId,
69
+ name: tone.android.name,
70
+ description: tone.android.description
71
+ });
72
+ };
73
+ const payload = compact({
74
+ id: tone.android.channelId,
75
+ // The consumer's declared label, not the tone identifier. Passing the
76
+ // identifier here is what put a technical string in front of users on
77
+ // the one screen these labels exist to serve.
78
+ name: tone.android.name,
79
+ description: tone.android.description,
80
+ importance: ANDROID_IMPORTANCE[tone.android.importance],
81
+ sound: tone.android.sound,
82
+ vibration: tone.android.vibration,
83
+ badge: tone.android.badge,
84
+ bypassDnd: tone.android.bypassDnd,
85
+ groupId: tone.android.groupId
86
+ });
87
+ if (held === undefined) {
88
+ await engine().createChannel(payload);
89
+ remember();
90
+ return 'created';
91
+ }
92
+ if (held.name === tone.android.name && held.description === tone.android.description) {
93
+ // Nothing to say to the platform. Skipping the call is what keeps an
94
+ // unchanged configuration genuinely free, which reconciliation
95
+ // idempotence depends on.
96
+ return 'unchanged';
97
+ }
98
+ // Android accepts a re-declaration of an existing channel and applies only
99
+ // the name and description, ignoring importance, sound, vibration and DND
100
+ // — because those belong to the user once the channel exists. That refusal
101
+ // is the guarantee: the platform declines to overwrite the user's settings.
102
+ await engine().createChannel(payload);
103
+ remember();
104
+ return 'labelsRefreshed';
105
+ },
106
+ async retireTone(channelId) {
107
+ const existing = await declaredChannels();
108
+ if (!existing.some(channel => channel.id === channelId)) return false;
109
+ await engine().deleteChannel(channelId);
110
+ channelSnapshot = channelSnapshot?.filter(channel => channel.id !== channelId);
111
+ return true;
112
+ },
113
+ async declareGroups(groups) {
114
+ for (const group of groups) {
115
+ await engine().createChannelGroup(compact({
116
+ id: group.id,
117
+ name: group.name,
118
+ description: group.description
119
+ }));
120
+ }
121
+ },
122
+ async listDeclaredChannels() {
123
+ return (await declaredChannels()).map(channel => channel.id);
124
+ },
125
+ permissionFrom(kind, settings) {
126
+ if (kind === 'display') {
127
+ // Android below 13 has no runtime display permission at all.
128
+ return atLeast(DISPLAY_PERMISSION_API) ? toPermissionState(settings.authorizationStatus) : 'notRequired';
129
+ }
130
+ // Before Android 12 the concept does not apply: "not required", not "denied".
131
+ if (!atLeast(EXACT_ALARM_API)) {
132
+ return 'notRequired';
133
+ }
134
+ const android = settings.android ?? {};
135
+ return android.alarm === 1 ? 'granted' : 'denied';
136
+ },
137
+ gatesExactAlarms: () => atLeast(EXACT_ALARM_API),
138
+ async restrictions(now) {
139
+ let batteryOptimization = 'unknown';
140
+ try {
141
+ batteryOptimization = (await engine().isBatteryOptimizationEnabled()) ? 'restricted' : 'unrestricted';
142
+ } catch {
143
+ batteryOptimization = 'unknown';
144
+ }
145
+ return {
146
+ batteryOptimization,
147
+ // No standard API exposes vendor auto-start policy, and guessing would
148
+ // be worse than admitting it. `unknown` is a first-class answer here.
149
+ autoStart: 'unknown',
150
+ readAt: now()
151
+ };
152
+ }
153
+ };
154
+ }
155
+ //# sourceMappingURL=android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["toPermissionState","ANDROID_IMPORTANCE","BACKGROUND_WINDOW_MS","MARKER_CHANNEL_ID","compact","ANDROID_PENDING_BUDGET","DISPLAY_PERMISSION_API","EXACT_ALARM_API","createAndroidPlatform","engine","apiLevel","markerChannelReady","channelSnapshot","declaredChannels","getChannels","atLeast","level","Number","POSITIVE_INFINITY","capabilities","pendingCeiling","supportsExactAlarms","supportsChannels","supportsTextInputActions","supportsDoNotDisturbBypass","supportsRepeatingAlert","backgroundWindowMs","ensureMarkerChannel","createChannel","id","name","description","importance","min","vibration","badge","withChannelSnapshot","work","undefined","declareTone","tone","existing","held","find","channel","android","channelId","remember","filter","concat","payload","sound","bypassDnd","groupId","retireTone","some","deleteChannel","declareGroups","groups","group","createChannelGroup","listDeclaredChannels","map","permissionFrom","kind","settings","authorizationStatus","alarm","gatesExactAlarms","restrictions","now","batteryOptimization","isBatteryOptimizationEnabled","autoStart","readAt"],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/android.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,iBAAiB,QAAQ,cAAW;AAC7C,SAASC,kBAAkB,EAAEC,oBAAoB,EAAEC,iBAAiB,EAAEC,OAAO,QAAQ,cAAW;AAGhG;AACA,MAAMC,sBAAsB,GAAG,GAAG;AAClC;AACA,MAAMC,sBAAsB,GAAG,EAAE;AACjC;AACA,MAAMC,eAAe,GAAG,EAAE;AAI1B,OAAO,SAASC,qBAAqBA,CAAC;EAAEC,MAAM;EAAEC;AAA0B,CAAC,EAAqB;EAC/F,IAAIC,kBAAkB,GAAG,KAAK;EAC9B;EACA,IAAIC,eAA8C;EAClD,MAAMC,gBAAgB,GAAG,MAAAA,CAAA,KACxBD,eAAe,IAAIH,MAAM,CAAC,CAAC,CAACK,WAAW,CAAC,CAAC;EAC1C;EACA,MAAMC,OAAO,GAAIC,KAAa,IAAc,CAACN,QAAQ,CAAC,CAAC,IAAIO,MAAM,CAACC,iBAAiB,KAAKF,KAAK;EAE7F,OAAO;IACNG,YAAY,EAAEA,CAAA,MAAO;MACpBC,cAAc,EAAEf,sBAAsB;MACt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AO,CAACsB,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,QAAQ;IAClD,CAAC;IAEDC,gBAAgB,EAAEA,CAAA,KAAMrD,OAAO,CAACR,eAAe,CAAC;IAEhD,MAAM8D,YAAYA,CAACC,GAAG,EAAE;MACvB,IAAIC,mBAA6D,GAAG,SAAS;MAC7E,IAAI;QACHA,mBAAmB,GAAG,CAAC,MAAM9D,MAAM,CAAC,CAAC,CAAC+D,4BAA4B,CAAC,CAAC,IACjE,YAAY,GACZ,cAAc;MAClB,CAAC,CAAC,MAAM;QACPD,mBAAmB,GAAG,SAAS;MAChC;MACA,OAAO;QACNA,mBAAmB;QACnB;QACA;QACAE,SAAS,EAAE,SAAS;QACpBC,MAAM,EAAEJ,GAAG,CAAC;MACb,CAAC;IACF;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The one place this package asks which platform it is on (IOS-08).
5
+ *
6
+ * rn-core's `currentPlatform()` decides the OS; the Android API level is read
7
+ * from React Native lazily, when asked, so the module loads without it.
8
+ */
9
+ import { currentPlatform, lazyPeer } from '@chipmobilesdk/rn-core';
10
+ import { createAndroidPlatform } from "./android.js";
11
+ import { createIosPlatform } from "./ios.js";
12
+ const reactNative = lazyPeer('react-native', () => {
13
+ try {
14
+ return require('react-native');
15
+ } catch (cause) {
16
+ throw cause;
17
+ }
18
+ });
19
+
20
+ /** The running OS and, on Android, its API level. */
21
+ export function detectPlatform() {
22
+ const os = currentPlatform();
23
+ if (os !== 'android') {
24
+ return {
25
+ os: os === 'ios' ? 'ios' : 'other'
26
+ };
27
+ }
28
+ const result = reactNative.get();
29
+ const version = result.ok ? result.module.Platform?.Version : undefined;
30
+ return {
31
+ os,
32
+ apiLevel: typeof version === 'number' ? version : undefined
33
+ };
34
+ }
35
+
36
+ /**
37
+ * The strategy for `platform`, or for the running one. Only Android gets the
38
+ * Android strategy; anywhere else nothing channel- or alarm-specific is called.
39
+ */
40
+ export function createNotifyKitPlatform(engine, platform) {
41
+ const os = platform?.os ?? detectPlatform().os;
42
+ if (os !== 'android') {
43
+ return createIosPlatform();
44
+ }
45
+ return createAndroidPlatform({
46
+ engine,
47
+ // Read when asked rather than once, so it follows the device (and a test).
48
+ apiLevel: () => platform ? platform.apiLevel : detectPlatform().apiLevel
49
+ });
50
+ }
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["currentPlatform","lazyPeer","createAndroidPlatform","createIosPlatform","reactNative","require","cause","detectPlatform","os","result","get","version","ok","module","Platform","Version","undefined","apiLevel","createNotifyKitPlatform","engine","platform"],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,QAAQ,QAAQ,wBAAwB;AAIlE,SAASC,qBAAqB,QAAQ,cAAW;AACjD,SAASC,iBAAiB,QAAQ,UAAO;AAOzC,MAAMC,WAAW,GAAGH,QAAQ,CAAmB,cAAc,EAAE,MAAM;EACpE,IAAI;IACH,OAAOI,OAAO,CAAC,cAAc,CAAC;EAC/B,CAAC,CAAC,OAAOC,KAAK,EAAE;IACf,MAAMA,KAAK;EACZ;AACD,CAAC,CAAC;;AAEF;AACA,OAAO,SAASC,cAAcA,CAAA,EAAiB;EAC9C,MAAMC,EAAE,GAAGR,eAAe,CAAC,CAAC;EAC5B,IAAIQ,EAAE,KAAK,SAAS,EAAE;IACrB,OAAO;MAAEA,EAAE,EAAEA,EAAE,KAAK,KAAK,GAAG,KAAK,GAAG;IAAQ,CAAC;EAC9C;EACA,MAAMC,MAAM,GAAGL,WAAW,CAACM,GAAG,CAAC,CAAC;EAChC,MAAMC,OAAO,GAAGF,MAAM,CAACG,EAAE,GAAGH,MAAM,CAACI,MAAM,CAACC,QAAQ,EAAEC,OAAO,GAAGC,SAAS;EACvE,OAAO;IAAER,EAAE;IAAES,QAAQ,EAAE,OAAON,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGK;EAAU,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASE,uBAAuBA,CACtCC,MAA6B,EAC7BC,QAAuB,EACH;EACpB,MAAMZ,EAAE,GAAGY,QAAQ,EAAEZ,EAAE,IAAID,cAAc,CAAC,CAAC,CAACC,EAAE;EAC9C,IAAIA,EAAE,KAAK,SAAS,EAAE;IACrB,OAAOL,iBAAiB,CAAC,CAAC;EAC3B;EACA,OAAOD,qBAAqB,CAAC;IAC5BiB,MAAM;IACN;IACAF,QAAQ,EAAEA,CAAA,KAAOG,QAAQ,GAAGA,QAAQ,CAACH,QAAQ,GAAGV,cAAc,CAAC,CAAC,CAACU;EAClE,CAAC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * iOS: no channels, no exact-alarm gate, a hard ceiling of 64 pending
5
+ * notifications. Categories are declared per request rather than up front.
6
+ */
7
+ import { toPermissionState } from "../events.js";
8
+ import { BACKGROUND_WINDOW_MS } from "../module.js";
9
+ /**
10
+ * iOS keeps only the 64 soonest pending notifications and silently discards the
11
+ * rest. This number is the entire reason truncation must be computed and
12
+ * reported by the package rather than left to the platform.
13
+ */
14
+ const IOS_PENDING_CEILING = 64;
15
+ export function createIosPlatform() {
16
+ return {
17
+ capabilities: () => ({
18
+ pendingCeiling: IOS_PENDING_CEILING,
19
+ supportsExactAlarms: false,
20
+ supportsChannels: false,
21
+ supportsTextInputActions: true,
22
+ supportsDoNotDisturbBypass: false,
23
+ // iOS exposes no looping-sound API. The one alert level that overrides the
24
+ // mute switch is entitlement-gated by Apple, and does not loop either — so
25
+ // there is nothing to partially support, and a partial emulation would be
26
+ // worse than an honest refusal.
27
+ supportsRepeatingAlert: false,
28
+ backgroundWindowMs: BACKGROUND_WINDOW_MS
29
+ }),
30
+ // No marker is ever placed where alerts cannot repeat.
31
+ async ensureMarkerChannel() {},
32
+ withChannelSnapshot: work => work(),
33
+ // Categories are declared at request time rather than up front.
34
+ declareTone: async () => 'unchanged',
35
+ retireTone: async () => false,
36
+ async declareGroups() {},
37
+ listDeclaredChannels: async () => [],
38
+ permissionFrom: (kind, settings) =>
39
+ // Exact alarms are an Android concept: "not required", not "denied".
40
+ kind === 'display' ? toPermissionState(settings.authorizationStatus) : 'notRequired',
41
+ gatesExactAlarms: () => false,
42
+ restrictions: async now => ({
43
+ batteryOptimization: 'unrestricted',
44
+ autoStart: 'unrestricted',
45
+ readAt: now()
46
+ })
47
+ };
48
+ }
49
+ //# sourceMappingURL=ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["toPermissionState","BACKGROUND_WINDOW_MS","IOS_PENDING_CEILING","createIosPlatform","capabilities","pendingCeiling","supportsExactAlarms","supportsChannels","supportsTextInputActions","supportsDoNotDisturbBypass","supportsRepeatingAlert","backgroundWindowMs","ensureMarkerChannel","withChannelSnapshot","work","declareTone","retireTone","declareGroups","listDeclaredChannels","permissionFrom","kind","settings","authorizationStatus","gatesExactAlarms","restrictions","now","batteryOptimization","autoStart","readAt"],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/ios.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,cAAW;AAC7C,SAASC,oBAAoB,QAAQ,cAAW;AAGhD;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG,EAAE;AAE9B,OAAO,SAASC,iBAAiBA,CAAA,EAAsB;EACtD,OAAO;IACNC,YAAY,EAAEA,CAAA,MAAO;MACpBC,cAAc,EAAEH,mBAAmB;MACnCI,mBAAmB,EAAE,KAAK;MAC1BC,gBAAgB,EAAE,KAAK;MACvBC,wBAAwB,EAAE,IAAI;MAC9BC,0BAA0B,EAAE,KAAK;MACjC;MACA;MACA;MACA;MACAC,sBAAsB,EAAE,KAAK;MAC7BC,kBAAkB,EAAEV;IACrB,CAAC,CAAC;IAEF;IACA,MAAMW,mBAAmBA,CAAA,EAAG,CAAC,CAAC;IAE9BC,mBAAmB,EAAEC,IAAI,IAAIA,IAAI,CAAC,CAAC;IACnC;IACAC,WAAW,EAAE,MAAAA,CAAA,KAAY,WAAW;IACpCC,UAAU,EAAE,MAAAA,CAAA,KAAY,KAAK;IAC7B,MAAMC,aAAaA,CAAA,EAAG,CAAC,CAAC;IACxBC,oBAAoB,EAAE,MAAAA,CAAA,KAAY,EAAE;IAEpCC,cAAc,EAAEA,CAACC,IAAI,EAAEC,QAAQ;IAC9B;IACAD,IAAI,KAAK,SAAS,GAAGpB,iBAAiB,CAACqB,QAAQ,CAACC,mBAAmB,CAAC,GAAG,aAAa;IAErFC,gBAAgB,EAAEA,CAAA,KAAM,KAAK;IAE7BC,YAAY,EAAE,MAAMC,GAAG,KAAK;MAC3BC,mBAAmB,EAAE,cAAc;MACnCC,SAAS,EAAE,cAAc;MACzBC,MAAM,EAAEH,GAAG,CAAC;IACb,CAAC;EACF,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The `react-native-notify-kit` engine implementation.
5
+ *
6
+ * Nothing above this adapter knows which engine is in use — which is what
7
+ * allowed the original Notifee choice to be swapped for its maintained fork
8
+ * without touching a requirement, a test, or a line of consumer code.
9
+ *
10
+ * This file is what both platforms share: scheduling, cancelling, reading the
11
+ * pending set, and routing events. The engine module and its constants live in
12
+ * `notify-kit/module.ts`, decoding in `notify-kit/events.ts`, and everything
13
+ * that differs between Android and iOS in `notify-kit/platform/` — chosen once
14
+ * when the engine is created (NOT-18, IOS-08).
15
+ */
16
+
17
+ import { isRepeatStopId } from "../repeat/marker.js";
18
+ import { packData } from "./codec.js";
19
+ import { DIAGNOSTIC_CODES, NotificationError } from "../contract/errors.js";
20
+ import { toDelivery, toInteraction, toPermissionState, unpackEntry, unpackRepeatStops } from "./notify-kit/events.js";
21
+ import { ALARM_TYPE_EXACT_AND_ALLOW_WHILE_IDLE, ALARM_TYPE_INEXACT_AND_ALLOW_WHILE_IDLE, ANDROID_CATEGORY_ALARM, ANDROID_IMPORTANCE, MARKER_CHANNEL_ID, TRIGGER_TYPE_TIMESTAMP, compact, loadEngine } from "./notify-kit/module.js";
22
+ import { createNotifyKitPlatform } from "./notify-kit/platform/index.js";
23
+
24
+ /**
25
+ * Whether this *process* has a background delivery handler.
26
+ *
27
+ * Module scope, not adapter instance state. The engine registers one headless
28
+ * task per process, so registering through any adapter registers it for all of
29
+ * them. Keeping the flag per instance made an app that had wired the handler up
30
+ * correctly report that it had not — which is worse than not reporting at all,
31
+ * because the warning tells the consumer to fix something that is not broken.
32
+ */
33
+ let backgroundHandlerRegistered = false;
34
+ /**
35
+ * Interaction subscribers alive in this process, across engine instances: the
36
+ * one registered at module scope in `index.js` and the one the app's runtime
37
+ * uses are different instances, and a background interaction has to reach the
38
+ * runtime's subscribers when there are any (NOT-10).
39
+ */
40
+ const liveInteractionListeners = new Set();
41
+ export function createNotifyKitEngine(options = {}) {
42
+ let cached = options.module;
43
+ const engine = () => cached ??= loadEngine();
44
+ const now = options.now ?? (() => Date.now());
45
+ const platform = createNotifyKitPlatform(engine, options.platform);
46
+ const getPermission = async kind => platform.permissionFrom(kind, await engine().getNotificationSettings());
47
+ return {
48
+ name: 'react-native-notify-kit',
49
+ withChannelSnapshot: work => platform.withChannelSnapshot(work),
50
+ async pendingIds() {
51
+ const module = engine();
52
+ if (module.getTriggerNotificationIds) {
53
+ return module.getTriggerNotificationIds();
54
+ }
55
+ return (await module.getTriggerNotifications()).flatMap(raw => {
56
+ const id = raw.notification?.id;
57
+ return typeof id === 'string' ? [id] : [];
58
+ });
59
+ },
60
+ getCapabilities: async () => platform.capabilities(),
61
+ async schedule(request) {
62
+ const actions = request.request.actions?.map(action => compact({
63
+ title: action.title,
64
+ pressAction: compact({
65
+ id: action.id,
66
+ launchActivity: action.mode === 'foreground' ? 'default' : undefined
67
+ }),
68
+ input: action.input === undefined ? undefined : compact({
69
+ placeholder: action.input.placeholder
70
+ })
71
+ }));
72
+ const isMarker = request.repeatStop !== undefined;
73
+ if (isMarker) {
74
+ await platform.ensureMarkerChannel();
75
+ }
76
+ await engine().createTriggerNotification(compact({
77
+ id: request.request.id,
78
+ title: request.request.content.title,
79
+ body: request.request.content.body,
80
+ subtitle: request.request.content.subtitle,
81
+ data: packData(request),
82
+ android: compact({
83
+ // A marker gets the quietest channel the package owns rather than
84
+ // the consumer's tone. It exists to be delivered and removed, and
85
+ // borrowing the alarm's own channel would make it alarm too.
86
+ channelId: isMarker ? MARKER_CHANNEL_ID : request.tone.android.channelId,
87
+ // Numeric enum, not the string name — see ANDROID_IMPORTANCE.
88
+ importance: isMarker ? ANDROID_IMPORTANCE.min : ANDROID_IMPORTANCE[request.tone.android.importance],
89
+ sound: isMarker ? undefined : request.tone.android.sound,
90
+ groupId: isMarker ? undefined : request.tone.android.groupId,
91
+ // Per-notification, not channel configuration. That is what lets
92
+ // a consumer add a repeating alert to an existing tone without
93
+ // bumping its version and costing the user their settings.
94
+ loopSound: !isMarker && request.tone.android.loopSound ? true : undefined,
95
+ category: !isMarker && request.tone.android.alarmCategory ? ANDROID_CATEGORY_ALARM : undefined,
96
+ actions: isMarker ? undefined : actions
97
+ }),
98
+ ios: compact({
99
+ categoryId: request.tone.ios.categoryId,
100
+ // This one genuinely is a string union in the engine's types.
101
+ interruptionLevel: request.tone.ios.interruptionLevel,
102
+ sound: request.tone.ios.sound
103
+ })
104
+ }), {
105
+ type: TRIGGER_TYPE_TIMESTAMP,
106
+ timestamp: request.resolvedAt,
107
+ // Approximate mode is a degradation, not a failure: the notification
108
+ // is still scheduled and the caller is told it may arrive late.
109
+ alarmManager: {
110
+ allowWhileIdle: true,
111
+ type: request.approximate ? ALARM_TYPE_INEXACT_AND_ALLOW_WHILE_IDLE : ALARM_TYPE_EXACT_AND_ALLOW_WHILE_IDLE
112
+ }
113
+ });
114
+ },
115
+ async cancel(id) {
116
+ await engine().cancelNotification(id);
117
+ },
118
+ async cancelMany(ids) {
119
+ // Sequential rather than parallel: the engine bridges each call to
120
+ // native, and a burst of concurrent cancels is where duplicate-delivery
121
+ // races have historically appeared.
122
+ for (const id of ids) {
123
+ await engine().cancelNotification(id);
124
+ }
125
+ },
126
+ async cancelAll() {
127
+ await engine().cancelAllNotifications();
128
+ },
129
+ async getPending() {
130
+ const raw = await engine().getTriggerNotifications();
131
+ return raw.map(entry => unpackEntry(entry, now)).filter(entry => entry !== undefined)
132
+ // Stop markers are package-owned artifacts. A consumer diffing the
133
+ // device against its own intent would otherwise see a notification it
134
+ // never scheduled and, quite reasonably, cancel it.
135
+ .filter(entry => !isRepeatStopId(entry.id)).sort((a, b) => a.resolvedAt - b.resolvedAt);
136
+ },
137
+ declareTone: tone => platform.declareTone(tone),
138
+ retireTone: channelId => platform.retireTone(channelId),
139
+ declareGroups: groups => platform.declareGroups(groups),
140
+ listDeclaredChannels: () => platform.listDeclaredChannels(),
141
+ getPermission,
142
+ async requestPermission(kind) {
143
+ if (kind === 'display') {
144
+ const result = await engine().requestPermission();
145
+ return toPermissionState(result.authorizationStatus);
146
+ }
147
+ // Exact-alarm capability is granted only through system settings on the
148
+ // versions that gate it — there is no in-app dialog to present.
149
+ if (!platform.gatesExactAlarms()) {
150
+ return 'notRequired';
151
+ }
152
+ await engine().openAlarmPermissionSettings();
153
+ return getPermission('exactAlarm');
154
+ },
155
+ async openSettings(kind) {
156
+ if (kind === 'exactAlarm') {
157
+ if (!platform.gatesExactAlarms()) {
158
+ throw new NotificationError(DIAGNOSTIC_CODES.SETTINGS_UNAVAILABLE, 'No exact-alarm settings screen exists on this platform version.');
159
+ }
160
+ await engine().openAlarmPermissionSettings();
161
+ return;
162
+ }
163
+ await engine().openNotificationSettings();
164
+ },
165
+ getRestrictions: () => platform.restrictions(now),
166
+ subscribeToInteractions(handler) {
167
+ liveInteractionListeners.add(handler);
168
+ const unsubscribe = engine().onForegroundEvent(raw => {
169
+ const event = toInteraction(raw, now);
170
+ if (event !== undefined) handler(event);
171
+ });
172
+ return () => {
173
+ liveInteractionListeners.delete(handler);
174
+ unsubscribe();
175
+ };
176
+ },
177
+ async takeInitialInteraction() {
178
+ const raw = await engine().getInitialNotification();
179
+ if (raw === null) return undefined;
180
+ const event = toInteraction(raw, now);
181
+ // A cold-start tap arrives before any handler exists, so it is reported
182
+ // with the state that actually produced it.
183
+ return event === undefined ? undefined : {
184
+ ...event,
185
+ appState: 'coldStart'
186
+ };
187
+ },
188
+ async silenceDelivered(id) {
189
+ const displayed = await engine().getDisplayedNotifications();
190
+ const match = displayed.find(entry => {
191
+ const notification = entry.notification ?? entry;
192
+ return notification.id === id;
193
+ });
194
+
195
+ // Not displayed is the ordinary outcome, not a failure: the user handled
196
+ // it before the window ran out.
197
+ if (match === undefined) return false;
198
+ const notification = match.notification ?? match;
199
+ const android = notification.android ?? {};
200
+
201
+ // Re-posted under the *same* identifier, so it lands on the same tray
202
+ // slot and replaces in place. Cancelling instead would remove it, and a
203
+ // notification that vanished is worse than one that never sounded — the
204
+ // user comes home to a silent phone and no idea what they missed.
205
+ await engine().displayNotification({
206
+ ...notification,
207
+ android: {
208
+ ...android,
209
+ loopSound: false,
210
+ // Without this the replacement re-alerts once on its way to going
211
+ // quiet, which is a strange thing to do to someone who has already
212
+ // heard it for fifteen minutes.
213
+ onlyAlertOnce: true
214
+ }
215
+ });
216
+ return true;
217
+ },
218
+ async listRepeatStops() {
219
+ return unpackRepeatStops(await engine().getTriggerNotifications());
220
+ },
221
+ subscribeToDeliveries(handler) {
222
+ return engine().onForegroundEvent(raw => {
223
+ const event = toDelivery(raw, now);
224
+ if (event !== undefined) handler(event);
225
+ });
226
+ },
227
+ registerBackgroundDeliveryHandler(handler, onInteraction) {
228
+ engine().onBackgroundEvent(async raw => {
229
+ const delivery = toDelivery(raw, now);
230
+ if (delivery !== undefined) {
231
+ await handler(delivery);
232
+ return;
233
+ }
234
+ // A tap, an action or a dismissal while the app was not in front. Until
235
+ // 0.6.0 only deliveries were looked at here, so a background action
236
+ // ("Taken", "Snooze", an inline reply) never reached the app (NOT-10).
237
+ const interaction = toInteraction(raw, now);
238
+ if (interaction === undefined) return;
239
+ const event = {
240
+ ...interaction,
241
+ appState: 'background'
242
+ };
243
+ if (liveInteractionListeners.size > 0) {
244
+ // The app's runtime is alive: its handlers get it, as in the foreground.
245
+ for (const listener of [...liveInteractionListeners]) listener(event);
246
+ } else {
247
+ await onInteraction?.(event);
248
+ }
249
+ });
250
+ backgroundHandlerRegistered = true;
251
+ },
252
+ hasBackgroundDeliveryHandler() {
253
+ return backgroundHandlerRegistered;
254
+ }
255
+ };
256
+ }
257
+ //# sourceMappingURL=notify-kit-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isRepeatStopId","packData","DIAGNOSTIC_CODES","NotificationError","toDelivery","toInteraction","toPermissionState","unpackEntry","unpackRepeatStops","ALARM_TYPE_EXACT_AND_ALLOW_WHILE_IDLE","ALARM_TYPE_INEXACT_AND_ALLOW_WHILE_IDLE","ANDROID_CATEGORY_ALARM","ANDROID_IMPORTANCE","MARKER_CHANNEL_ID","TRIGGER_TYPE_TIMESTAMP","compact","loadEngine","createNotifyKitPlatform","backgroundHandlerRegistered","liveInteractionListeners","Set","createNotifyKitEngine","options","cached","module","engine","now","Date","platform","getPermission","kind","permissionFrom","getNotificationSettings","name","withChannelSnapshot","work","pendingIds","getTriggerNotificationIds","getTriggerNotifications","flatMap","raw","id","notification","getCapabilities","capabilities","schedule","request","actions","map","action","title","pressAction","launchActivity","mode","undefined","input","placeholder","isMarker","repeatStop","ensureMarkerChannel","createTriggerNotification","content","body","subtitle","data","android","channelId","tone","importance","min","sound","groupId","loopSound","category","alarmCategory","ios","categoryId","interruptionLevel","type","timestamp","resolvedAt","alarmManager","allowWhileIdle","approximate","cancel","cancelNotification","cancelMany","ids","cancelAll","cancelAllNotifications","getPending","entry","filter","sort","a","b","declareTone","retireTone","declareGroups","groups","listDeclaredChannels","requestPermission","result","authorizationStatus","gatesExactAlarms","openAlarmPermissionSettings","openSettings","SETTINGS_UNAVAILABLE","openNotificationSettings","getRestrictions","restrictions","subscribeToInteractions","handler","add","unsubscribe","onForegroundEvent","event","delete","takeInitialInteraction","getInitialNotification","appState","silenceDelivered","displayed","getDisplayedNotifications","match","find","displayNotification","onlyAlertOnce","listRepeatStops","subscribeToDeliveries","registerBackgroundDeliveryHandler","onInteraction","onBackgroundEvent","delivery","interaction","size","listener","hasBackgroundDeliveryHandler"],"sourceRoot":"../../../src","sources":["engine/notify-kit-engine.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SAASA,cAAc,QAAQ,qBAAkB;AACjD,SAASC,QAAQ,QAAQ,YAAS;AAIlC,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,uBAAoB;AAExE,SACCC,UAAU,EACVC,aAAa,EACbC,iBAAiB,EACjBC,WAAW,EACXC,iBAAiB,QACX,wBAAqB;AAC5B,SACCC,qCAAqC,EACrCC,uCAAuC,EACvCC,sBAAsB,EACtBC,kBAAkB,EAClBC,iBAAiB,EACjBC,sBAAsB,EACtBC,OAAO,EACPC,UAAU,QAEJ,wBAAqB;AAC5B,SAASC,uBAAuB,QAAQ,gCAAuB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,2BAA2B,GAAG,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,IAAIC,GAAG,CAAoC,CAAC;AAU7E,OAAO,SAASC,qBAAqBA,CACpCC,OAA+B,GAAG,CAAC,CAAC,EACR;EAC5B,IAAIC,MAAmC,GAAGD,OAAO,CAACE,MAAM;EACxD,MAAMC,MAAM,GAAGA,CAAA,KAAwBF,M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