@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,159 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createAndroidPlatform = createAndroidPlatform;
7
+ var _events = require("../events.js");
8
+ var _module = require("../module.js");
9
+ /**
10
+ * Android: channels, exact alarms, battery optimisation, looping alerts.
11
+ */
12
+
13
+ /** Android has no hard pending ceiling like iOS; this bound keeps behavior predictable. */
14
+ const ANDROID_PENDING_BUDGET = 500;
15
+ /** Android 13: the first version with a runtime display permission. */
16
+ const DISPLAY_PERMISSION_API = 33;
17
+ /** Android 12: the first version that gates exact alarms. */
18
+ const EXACT_ALARM_API = 31;
19
+ function createAndroidPlatform({
20
+ engine,
21
+ apiLevel
22
+ }) {
23
+ let markerChannelReady = false;
24
+ /** The declared channels for the duration of one `withChannelSnapshot` (NOT-08). */
25
+ let channelSnapshot;
26
+ const declaredChannels = async () => channelSnapshot ?? engine().getChannels();
27
+ // An unknown API level is treated as current: gating is the safe assumption.
28
+ const atLeast = level => (apiLevel() ?? Number.POSITIVE_INFINITY) >= level;
29
+ return {
30
+ capabilities: () => ({
31
+ pendingCeiling: ANDROID_PENDING_BUDGET,
32
+ supportsExactAlarms: true,
33
+ supportsChannels: true,
34
+ supportsTextInputActions: true,
35
+ supportsDoNotDisturbBypass: true,
36
+ supportsRepeatingAlert: true,
37
+ backgroundWindowMs: _module.BACKGROUND_WINDOW_MS
38
+ }),
39
+ /**
40
+ * Lazily rather than at initialization, so an app that never declares a
41
+ * repeating tone never grows an extra entry in the user's notification
42
+ * settings for a feature it does not use.
43
+ */
44
+ async ensureMarkerChannel() {
45
+ if (markerChannelReady) return;
46
+ await engine().createChannel({
47
+ id: _module.MARKER_CHANNEL_ID,
48
+ name: 'Background maintenance',
49
+ description: 'Used briefly to end a repeating alert. Notifications here are removed immediately.',
50
+ importance: _module.ANDROID_IMPORTANCE.min,
51
+ vibration: false,
52
+ badge: false
53
+ });
54
+ markerChannelReady = true;
55
+ },
56
+ async withChannelSnapshot(work) {
57
+ if (channelSnapshot !== undefined) {
58
+ return work();
59
+ }
60
+ channelSnapshot = await engine().getChannels();
61
+ try {
62
+ return await work();
63
+ } finally {
64
+ channelSnapshot = undefined;
65
+ }
66
+ },
67
+ async declareTone(tone) {
68
+ const existing = await declaredChannels();
69
+ const held = existing.find(channel => channel.id === tone.android.channelId);
70
+ const remember = () => {
71
+ channelSnapshot = channelSnapshot?.filter(channel => channel.id !== tone.android.channelId).concat({
72
+ id: tone.android.channelId,
73
+ name: tone.android.name,
74
+ description: tone.android.description
75
+ });
76
+ };
77
+ const payload = (0, _module.compact)({
78
+ id: tone.android.channelId,
79
+ // The consumer's declared label, not the tone identifier. Passing the
80
+ // identifier here is what put a technical string in front of users on
81
+ // the one screen these labels exist to serve.
82
+ name: tone.android.name,
83
+ description: tone.android.description,
84
+ importance: _module.ANDROID_IMPORTANCE[tone.android.importance],
85
+ sound: tone.android.sound,
86
+ vibration: tone.android.vibration,
87
+ badge: tone.android.badge,
88
+ bypassDnd: tone.android.bypassDnd,
89
+ groupId: tone.android.groupId
90
+ });
91
+ if (held === undefined) {
92
+ await engine().createChannel(payload);
93
+ remember();
94
+ return 'created';
95
+ }
96
+ if (held.name === tone.android.name && held.description === tone.android.description) {
97
+ // Nothing to say to the platform. Skipping the call is what keeps an
98
+ // unchanged configuration genuinely free, which reconciliation
99
+ // idempotence depends on.
100
+ return 'unchanged';
101
+ }
102
+ // Android accepts a re-declaration of an existing channel and applies only
103
+ // the name and description, ignoring importance, sound, vibration and DND
104
+ // — because those belong to the user once the channel exists. That refusal
105
+ // is the guarantee: the platform declines to overwrite the user's settings.
106
+ await engine().createChannel(payload);
107
+ remember();
108
+ return 'labelsRefreshed';
109
+ },
110
+ async retireTone(channelId) {
111
+ const existing = await declaredChannels();
112
+ if (!existing.some(channel => channel.id === channelId)) return false;
113
+ await engine().deleteChannel(channelId);
114
+ channelSnapshot = channelSnapshot?.filter(channel => channel.id !== channelId);
115
+ return true;
116
+ },
117
+ async declareGroups(groups) {
118
+ for (const group of groups) {
119
+ await engine().createChannelGroup((0, _module.compact)({
120
+ id: group.id,
121
+ name: group.name,
122
+ description: group.description
123
+ }));
124
+ }
125
+ },
126
+ async listDeclaredChannels() {
127
+ return (await declaredChannels()).map(channel => channel.id);
128
+ },
129
+ permissionFrom(kind, settings) {
130
+ if (kind === 'display') {
131
+ // Android below 13 has no runtime display permission at all.
132
+ return atLeast(DISPLAY_PERMISSION_API) ? (0, _events.toPermissionState)(settings.authorizationStatus) : 'notRequired';
133
+ }
134
+ // Before Android 12 the concept does not apply: "not required", not "denied".
135
+ if (!atLeast(EXACT_ALARM_API)) {
136
+ return 'notRequired';
137
+ }
138
+ const android = settings.android ?? {};
139
+ return android.alarm === 1 ? 'granted' : 'denied';
140
+ },
141
+ gatesExactAlarms: () => atLeast(EXACT_ALARM_API),
142
+ async restrictions(now) {
143
+ let batteryOptimization = 'unknown';
144
+ try {
145
+ batteryOptimization = (await engine().isBatteryOptimizationEnabled()) ? 'restricted' : 'unrestricted';
146
+ } catch {
147
+ batteryOptimization = 'unknown';
148
+ }
149
+ return {
150
+ batteryOptimization,
151
+ // No standard API exposes vendor auto-start policy, and guessing would
152
+ // be worse than admitting it. `unknown` is a first-class answer here.
153
+ autoStart: 'unknown',
154
+ readAt: now()
155
+ };
156
+ }
157
+ };
158
+ }
159
+ //# sourceMappingURL=android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_events","require","_module","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","BACKGROUND_WINDOW_MS","ensureMarkerChannel","createChannel","id","MARKER_CHANNEL_ID","name","description","importance","ANDROID_IMPORTANCE","min","vibration","badge","withChannelSnapshot","work","undefined","declareTone","tone","existing","held","find","channel","android","channelId","remember","filter","concat","payload","compact","sound","bypassDnd","groupId","retireTone","some","deleteChannel","declareGroups","groups","group","createChannelGroup","listDeclaredChannels","map","permissionFrom","kind","settings","toPermissionState","authorizationStatus","alarm","gatesExactAlarms","restrictions","now","batteryOptimization","isBatteryOptimizationEnabled","autoStart","readAt"],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/android.ts"],"mappings":";;;;;;AAIA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AALA;AACA;AACA;;AAMA;AACA,MAAME,sBAAsB,GAAG,GAAG;AAClC;AACA,MAAMC,sBAAsB,GAAG,EAAE;AACjC;AACA,MAAMC,eAAe,GAAG,EAAE;AAInB,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,sBAA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,CAAC,CAA6B;MACnE,OAAOA,OAAO,CAACwB,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,QAAQ;IAClD,CAAC;IAEDC,gBAAgB,EAAEA,CAAA,KAAM1D,OAAO,CAACR,eAAe,CAAC;IAEhD,MAAMmE,YAAYA,CAACC,GAAG,EAAE;MACvB,IAAIC,mBAA6D,GAAG,SAAS;MAC7E,IAAI;QACHA,mBAAmB,GAAG,CAAC,MAAMnE,MAAM,CAAC,CAAC,CAACoE,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,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createNotifyKitPlatform = createNotifyKitPlatform;
7
+ exports.detectPlatform = detectPlatform;
8
+ var _rnCore = require("@chipmobilesdk/rn-core");
9
+ var _android = require("./android.js");
10
+ var _ios = require("./ios.js");
11
+ /**
12
+ * The one place this package asks which platform it is on (IOS-08).
13
+ *
14
+ * rn-core's `currentPlatform()` decides the OS; the Android API level is read
15
+ * from React Native lazily, when asked, so the module loads without it.
16
+ */
17
+
18
+ const reactNative = (0, _rnCore.lazyPeer)('react-native', () => {
19
+ try {
20
+ return require('react-native');
21
+ } catch (cause) {
22
+ throw cause;
23
+ }
24
+ });
25
+
26
+ /** The running OS and, on Android, its API level. */
27
+ function detectPlatform() {
28
+ const os = (0, _rnCore.currentPlatform)();
29
+ if (os !== 'android') {
30
+ return {
31
+ os: os === 'ios' ? 'ios' : 'other'
32
+ };
33
+ }
34
+ const result = reactNative.get();
35
+ const version = result.ok ? result.module.Platform?.Version : undefined;
36
+ return {
37
+ os,
38
+ apiLevel: typeof version === 'number' ? version : undefined
39
+ };
40
+ }
41
+
42
+ /**
43
+ * The strategy for `platform`, or for the running one. Only Android gets the
44
+ * Android strategy; anywhere else nothing channel- or alarm-specific is called.
45
+ */
46
+ function createNotifyKitPlatform(engine, platform) {
47
+ const os = platform?.os ?? detectPlatform().os;
48
+ if (os !== 'android') {
49
+ return (0, _ios.createIosPlatform)();
50
+ }
51
+ return (0, _android.createAndroidPlatform)({
52
+ engine,
53
+ // Read when asked rather than once, so it follows the device (and a test).
54
+ apiLevel: () => platform ? platform.apiLevel : detectPlatform().apiLevel
55
+ });
56
+ }
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_rnCore","require","_android","_ios","reactNative","lazyPeer","cause","detectPlatform","os","currentPlatform","result","get","version","ok","module","Platform","Version","undefined","apiLevel","createNotifyKitPlatform","engine","platform","createIosPlatform","createAndroidPlatform"],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/index.ts"],"mappings":";;;;;;;AAMA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AAXA;AACA;AACA;AACA;AACA;AACA;;AAaA,MAAMG,WAAW,GAAG,IAAAC,gBAAQ,EAAmB,cAAc,EAAE,MAAM;EACpE,IAAI;IACH,OAAOJ,OAAO,CAAC,cAAc,CAAC;EAC/B,CAAC,CAAC,OAAOK,KAAK,EAAE;IACf,MAAMA,KAAK;EACZ;AACD,CAAC,CAAC;;AAEF;AACO,SAASC,cAAcA,CAAA,EAAiB;EAC9C,MAAMC,EAAE,GAAG,IAAAC,uBAAe,EAAC,CAAC;EAC5B,IAAID,EAAE,KAAK,SAAS,EAAE;IACrB,OAAO;MAAEA,EAAE,EAAEA,EAAE,KAAK,KAAK,GAAG,KAAK,GAAG;IAAQ,CAAC;EAC9C;EACA,MAAME,MAAM,GAAGN,WAAW,CAACO,GAAG,CAAC,CAAC;EAChC,MAAMC,OAAO,GAAGF,MAAM,CAACG,EAAE,GAAGH,MAAM,CAACI,MAAM,CAACC,QAAQ,EAAEC,OAAO,GAAGC,SAAS;EACvE,OAAO;IAAET,EAAE;IAAEU,QAAQ,EAAE,OAAON,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGK;EAAU,CAAC;AAC3E;;AAEA;AACA;AACA;AACA;AACO,SAASE,uBAAuBA,CACtCC,MAA6B,EAC7BC,QAAuB,EACH;EACpB,MAAMb,EAAE,GAAGa,QAAQ,EAAEb,EAAE,IAAID,cAAc,CAAC,CAAC,CAACC,EAAE;EAC9C,IAAIA,EAAE,KAAK,SAAS,EAAE;IACrB,OAAO,IAAAc,sBAAiB,EAAC,CAAC;EAC3B;EACA,OAAO,IAAAC,8BAAqB,EAAC;IAC5BH,MAAM;IACN;IACAF,QAAQ,EAAEA,CAAA,KAAOG,QAAQ,GAAGA,QAAQ,CAACH,QAAQ,GAAGX,cAAc,CAAC,CAAC,CAACW;EAClE,CAAC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createIosPlatform = createIosPlatform;
7
+ var _events = require("../events.js");
8
+ var _module = require("../module.js");
9
+ /**
10
+ * iOS: no channels, no exact-alarm gate, a hard ceiling of 64 pending
11
+ * notifications. Categories are declared per request rather than up front.
12
+ */
13
+
14
+ /**
15
+ * iOS keeps only the 64 soonest pending notifications and silently discards the
16
+ * rest. This number is the entire reason truncation must be computed and
17
+ * reported by the package rather than left to the platform.
18
+ */
19
+ const IOS_PENDING_CEILING = 64;
20
+ function createIosPlatform() {
21
+ return {
22
+ capabilities: () => ({
23
+ pendingCeiling: IOS_PENDING_CEILING,
24
+ supportsExactAlarms: false,
25
+ supportsChannels: false,
26
+ supportsTextInputActions: true,
27
+ supportsDoNotDisturbBypass: false,
28
+ // iOS exposes no looping-sound API. The one alert level that overrides the
29
+ // mute switch is entitlement-gated by Apple, and does not loop either — so
30
+ // there is nothing to partially support, and a partial emulation would be
31
+ // worse than an honest refusal.
32
+ supportsRepeatingAlert: false,
33
+ backgroundWindowMs: _module.BACKGROUND_WINDOW_MS
34
+ }),
35
+ // No marker is ever placed where alerts cannot repeat.
36
+ async ensureMarkerChannel() {},
37
+ withChannelSnapshot: work => work(),
38
+ // Categories are declared at request time rather than up front.
39
+ declareTone: async () => 'unchanged',
40
+ retireTone: async () => false,
41
+ async declareGroups() {},
42
+ listDeclaredChannels: async () => [],
43
+ permissionFrom: (kind, settings) =>
44
+ // Exact alarms are an Android concept: "not required", not "denied".
45
+ kind === 'display' ? (0, _events.toPermissionState)(settings.authorizationStatus) : 'notRequired',
46
+ gatesExactAlarms: () => false,
47
+ restrictions: async now => ({
48
+ batteryOptimization: 'unrestricted',
49
+ autoStart: 'unrestricted',
50
+ readAt: now()
51
+ })
52
+ };
53
+ }
54
+ //# sourceMappingURL=ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_events","require","_module","IOS_PENDING_CEILING","createIosPlatform","capabilities","pendingCeiling","supportsExactAlarms","supportsChannels","supportsTextInputActions","supportsDoNotDisturbBypass","supportsRepeatingAlert","backgroundWindowMs","BACKGROUND_WINDOW_MS","ensureMarkerChannel","withChannelSnapshot","work","declareTone","retireTone","declareGroups","listDeclaredChannels","permissionFrom","kind","settings","toPermissionState","authorizationStatus","gatesExactAlarms","restrictions","now","batteryOptimization","autoStart","readAt"],"sourceRoot":"../../../../../src","sources":["engine/notify-kit/platform/ios.ts"],"mappings":";;;;;;AAIA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AALA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA,MAAME,mBAAmB,GAAG,EAAE;AAEvB,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,EAAEC;IACrB,CAAC,CAAC;IAEF;IACA,MAAMC,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,GAAG,IAAAE,yBAAiB,EAACD,QAAQ,CAACE,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,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# 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,260 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createNotifyKitEngine = createNotifyKitEngine;
7
+ var _marker = require("../repeat/marker.js");
8
+ var _codec = require("./codec.js");
9
+ var _errors = require("../contract/errors.js");
10
+ var _events = require("./notify-kit/events.js");
11
+ var _module = require("./notify-kit/module.js");
12
+ var _index = require("./notify-kit/platform/index.js");
13
+ /**
14
+ * The `react-native-notify-kit` engine implementation.
15
+ *
16
+ * Nothing above this adapter knows which engine is in use — which is what
17
+ * allowed the original Notifee choice to be swapped for its maintained fork
18
+ * without touching a requirement, a test, or a line of consumer code.
19
+ *
20
+ * This file is what both platforms share: scheduling, cancelling, reading the
21
+ * pending set, and routing events. The engine module and its constants live in
22
+ * `notify-kit/module.ts`, decoding in `notify-kit/events.ts`, and everything
23
+ * that differs between Android and iOS in `notify-kit/platform/` — chosen once
24
+ * when the engine is created (NOT-18, IOS-08).
25
+ */
26
+
27
+ /**
28
+ * Whether this *process* has a background delivery handler.
29
+ *
30
+ * Module scope, not adapter instance state. The engine registers one headless
31
+ * task per process, so registering through any adapter registers it for all of
32
+ * them. Keeping the flag per instance made an app that had wired the handler up
33
+ * correctly report that it had not — which is worse than not reporting at all,
34
+ * because the warning tells the consumer to fix something that is not broken.
35
+ */
36
+ let backgroundHandlerRegistered = false;
37
+ /**
38
+ * Interaction subscribers alive in this process, across engine instances: the
39
+ * one registered at module scope in `index.js` and the one the app's runtime
40
+ * uses are different instances, and a background interaction has to reach the
41
+ * runtime's subscribers when there are any (NOT-10).
42
+ */
43
+ const liveInteractionListeners = new Set();
44
+ function createNotifyKitEngine(options = {}) {
45
+ let cached = options.module;
46
+ const engine = () => cached ??= (0, _module.loadEngine)();
47
+ const now = options.now ?? (() => Date.now());
48
+ const platform = (0, _index.createNotifyKitPlatform)(engine, options.platform);
49
+ const getPermission = async kind => platform.permissionFrom(kind, await engine().getNotificationSettings());
50
+ return {
51
+ name: 'react-native-notify-kit',
52
+ withChannelSnapshot: work => platform.withChannelSnapshot(work),
53
+ async pendingIds() {
54
+ const module = engine();
55
+ if (module.getTriggerNotificationIds) {
56
+ return module.getTriggerNotificationIds();
57
+ }
58
+ return (await module.getTriggerNotifications()).flatMap(raw => {
59
+ const id = raw.notification?.id;
60
+ return typeof id === 'string' ? [id] : [];
61
+ });
62
+ },
63
+ getCapabilities: async () => platform.capabilities(),
64
+ async schedule(request) {
65
+ const actions = request.request.actions?.map(action => (0, _module.compact)({
66
+ title: action.title,
67
+ pressAction: (0, _module.compact)({
68
+ id: action.id,
69
+ launchActivity: action.mode === 'foreground' ? 'default' : undefined
70
+ }),
71
+ input: action.input === undefined ? undefined : (0, _module.compact)({
72
+ placeholder: action.input.placeholder
73
+ })
74
+ }));
75
+ const isMarker = request.repeatStop !== undefined;
76
+ if (isMarker) {
77
+ await platform.ensureMarkerChannel();
78
+ }
79
+ await engine().createTriggerNotification((0, _module.compact)({
80
+ id: request.request.id,
81
+ title: request.request.content.title,
82
+ body: request.request.content.body,
83
+ subtitle: request.request.content.subtitle,
84
+ data: (0, _codec.packData)(request),
85
+ android: (0, _module.compact)({
86
+ // A marker gets the quietest channel the package owns rather than
87
+ // the consumer's tone. It exists to be delivered and removed, and
88
+ // borrowing the alarm's own channel would make it alarm too.
89
+ channelId: isMarker ? _module.MARKER_CHANNEL_ID : request.tone.android.channelId,
90
+ // Numeric enum, not the string name — see ANDROID_IMPORTANCE.
91
+ importance: isMarker ? _module.ANDROID_IMPORTANCE.min : _module.ANDROID_IMPORTANCE[request.tone.android.importance],
92
+ sound: isMarker ? undefined : request.tone.android.sound,
93
+ groupId: isMarker ? undefined : request.tone.android.groupId,
94
+ // Per-notification, not channel configuration. That is what lets
95
+ // a consumer add a repeating alert to an existing tone without
96
+ // bumping its version and costing the user their settings.
97
+ loopSound: !isMarker && request.tone.android.loopSound ? true : undefined,
98
+ category: !isMarker && request.tone.android.alarmCategory ? _module.ANDROID_CATEGORY_ALARM : undefined,
99
+ actions: isMarker ? undefined : actions
100
+ }),
101
+ ios: (0, _module.compact)({
102
+ categoryId: request.tone.ios.categoryId,
103
+ // This one genuinely is a string union in the engine's types.
104
+ interruptionLevel: request.tone.ios.interruptionLevel,
105
+ sound: request.tone.ios.sound
106
+ })
107
+ }), {
108
+ type: _module.TRIGGER_TYPE_TIMESTAMP,
109
+ timestamp: request.resolvedAt,
110
+ // Approximate mode is a degradation, not a failure: the notification
111
+ // is still scheduled and the caller is told it may arrive late.
112
+ alarmManager: {
113
+ allowWhileIdle: true,
114
+ type: request.approximate ? _module.ALARM_TYPE_INEXACT_AND_ALLOW_WHILE_IDLE : _module.ALARM_TYPE_EXACT_AND_ALLOW_WHILE_IDLE
115
+ }
116
+ });
117
+ },
118
+ async cancel(id) {
119
+ await engine().cancelNotification(id);
120
+ },
121
+ async cancelMany(ids) {
122
+ // Sequential rather than parallel: the engine bridges each call to
123
+ // native, and a burst of concurrent cancels is where duplicate-delivery
124
+ // races have historically appeared.
125
+ for (const id of ids) {
126
+ await engine().cancelNotification(id);
127
+ }
128
+ },
129
+ async cancelAll() {
130
+ await engine().cancelAllNotifications();
131
+ },
132
+ async getPending() {
133
+ const raw = await engine().getTriggerNotifications();
134
+ return raw.map(entry => (0, _events.unpackEntry)(entry, now)).filter(entry => entry !== undefined)
135
+ // Stop markers are package-owned artifacts. A consumer diffing the
136
+ // device against its own intent would otherwise see a notification it
137
+ // never scheduled and, quite reasonably, cancel it.
138
+ .filter(entry => !(0, _marker.isRepeatStopId)(entry.id)).sort((a, b) => a.resolvedAt - b.resolvedAt);
139
+ },
140
+ declareTone: tone => platform.declareTone(tone),
141
+ retireTone: channelId => platform.retireTone(channelId),
142
+ declareGroups: groups => platform.declareGroups(groups),
143
+ listDeclaredChannels: () => platform.listDeclaredChannels(),
144
+ getPermission,
145
+ async requestPermission(kind) {
146
+ if (kind === 'display') {
147
+ const result = await engine().requestPermission();
148
+ return (0, _events.toPermissionState)(result.authorizationStatus);
149
+ }
150
+ // Exact-alarm capability is granted only through system settings on the
151
+ // versions that gate it — there is no in-app dialog to present.
152
+ if (!platform.gatesExactAlarms()) {
153
+ return 'notRequired';
154
+ }
155
+ await engine().openAlarmPermissionSettings();
156
+ return getPermission('exactAlarm');
157
+ },
158
+ async openSettings(kind) {
159
+ if (kind === 'exactAlarm') {
160
+ if (!platform.gatesExactAlarms()) {
161
+ throw new _errors.NotificationError(_errors.DIAGNOSTIC_CODES.SETTINGS_UNAVAILABLE, 'No exact-alarm settings screen exists on this platform version.');
162
+ }
163
+ await engine().openAlarmPermissionSettings();
164
+ return;
165
+ }
166
+ await engine().openNotificationSettings();
167
+ },
168
+ getRestrictions: () => platform.restrictions(now),
169
+ subscribeToInteractions(handler) {
170
+ liveInteractionListeners.add(handler);
171
+ const unsubscribe = engine().onForegroundEvent(raw => {
172
+ const event = (0, _events.toInteraction)(raw, now);
173
+ if (event !== undefined) handler(event);
174
+ });
175
+ return () => {
176
+ liveInteractionListeners.delete(handler);
177
+ unsubscribe();
178
+ };
179
+ },
180
+ async takeInitialInteraction() {
181
+ const raw = await engine().getInitialNotification();
182
+ if (raw === null) return undefined;
183
+ const event = (0, _events.toInteraction)(raw, now);
184
+ // A cold-start tap arrives before any handler exists, so it is reported
185
+ // with the state that actually produced it.
186
+ return event === undefined ? undefined : {
187
+ ...event,
188
+ appState: 'coldStart'
189
+ };
190
+ },
191
+ async silenceDelivered(id) {
192
+ const displayed = await engine().getDisplayedNotifications();
193
+ const match = displayed.find(entry => {
194
+ const notification = entry.notification ?? entry;
195
+ return notification.id === id;
196
+ });
197
+
198
+ // Not displayed is the ordinary outcome, not a failure: the user handled
199
+ // it before the window ran out.
200
+ if (match === undefined) return false;
201
+ const notification = match.notification ?? match;
202
+ const android = notification.android ?? {};
203
+
204
+ // Re-posted under the *same* identifier, so it lands on the same tray
205
+ // slot and replaces in place. Cancelling instead would remove it, and a
206
+ // notification that vanished is worse than one that never sounded — the
207
+ // user comes home to a silent phone and no idea what they missed.
208
+ await engine().displayNotification({
209
+ ...notification,
210
+ android: {
211
+ ...android,
212
+ loopSound: false,
213
+ // Without this the replacement re-alerts once on its way to going
214
+ // quiet, which is a strange thing to do to someone who has already
215
+ // heard it for fifteen minutes.
216
+ onlyAlertOnce: true
217
+ }
218
+ });
219
+ return true;
220
+ },
221
+ async listRepeatStops() {
222
+ return (0, _events.unpackRepeatStops)(await engine().getTriggerNotifications());
223
+ },
224
+ subscribeToDeliveries(handler) {
225
+ return engine().onForegroundEvent(raw => {
226
+ const event = (0, _events.toDelivery)(raw, now);
227
+ if (event !== undefined) handler(event);
228
+ });
229
+ },
230
+ registerBackgroundDeliveryHandler(handler, onInteraction) {
231
+ engine().onBackgroundEvent(async raw => {
232
+ const delivery = (0, _events.toDelivery)(raw, now);
233
+ if (delivery !== undefined) {
234
+ await handler(delivery);
235
+ return;
236
+ }
237
+ // A tap, an action or a dismissal while the app was not in front. Until
238
+ // 0.6.0 only deliveries were looked at here, so a background action
239
+ // ("Taken", "Snooze", an inline reply) never reached the app (NOT-10).
240
+ const interaction = (0, _events.toInteraction)(raw, now);
241
+ if (interaction === undefined) return;
242
+ const event = {
243
+ ...interaction,
244
+ appState: 'background'
245
+ };
246
+ if (liveInteractionListeners.size > 0) {
247
+ // The app's runtime is alive: its handlers get it, as in the foreground.
248
+ for (const listener of [...liveInteractionListeners]) listener(event);
249
+ } else {
250
+ await onInteraction?.(event);
251
+ }
252
+ });
253
+ backgroundHandlerRegistered = true;
254
+ },
255
+ hasBackgroundDeliveryHandler() {
256
+ return backgroundHandlerRegistered;
257
+ }
258
+ };
259
+ }
260
+ //# sourceMappingURL=notify-kit-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_marker","require","_codec","_errors","_events","_module","_index","backgroundHandlerRegistered","liveInteractionListeners","Set","createNotifyKitEngine","options","cached","module","engine","loadEngine","now","Date","platform","createNotifyKitPlatform","getPermission","kind","permissionFrom","getNotificationSettings","name","withChannelSnapshot","work","pendingIds","getTriggerNotificationIds","getTriggerNotifications","flatMap","raw","id","notification","getCapabilities","capabilities","schedule","request","actions","map","action","compact","title","pressAction","launchActivity","mode","undefined","input","placeholder","isMarker","repeatStop","ensureMarkerChannel","createTriggerNotification","content","body","subtitle","data","packData","android","channelId","MARKER_CHANNEL_ID","tone","importance","ANDROID_IMPORTANCE","min","sound","groupId","loopSound","category","alarmCategory","ANDROID_CATEGORY_ALARM","ios","categoryId","interruptionLevel","type","TRIGGER_TYPE_TIMESTAMP","timestamp","resolvedAt","alarmManager","allowWhileIdle","approximate","ALARM_TYPE_INEXACT_AND_ALLOW_WHILE_IDLE","ALARM_TYPE_EXACT_AND_ALLOW_WHILE_IDLE","cancel","cancelNotification","cancelMany","ids","cancelAll","cancelAllNotifications","getPending","entry","unpackEntry","filter","isRepeatStopId","sort","a","b","declareTone","retireTone","declareGroups","groups","listDeclaredChannels","requestPermission","result","toPermissionState","authorizationStatus","gatesExactAlarms","openAlarmPermissionSettings","openSettings","NotificationError","DIAGNOSTIC_CODES","SETTINGS_UNAVAILABLE","openNotificationSettings","getRestrictions","restrictions","subscribeToInteractions","handler","add","unsubscribe","onForegroundEvent","event","toInteraction","delete","takeInitialInteraction","getInitialNotification","appState","silenceDelivered","displayed","getDisplayedNotifications","match","find","displayNotification","onlyAlertOnce","listRepeatStops","unpackRepeatStops","subscribeToDeliveries","toDelivery","registerBackgroundDeliveryHandler","onInteraction","onBackgroundEvent","delivery","interaction","size","listener","hasBackgroundDeliveryHandler"],"sourceRoot":"../../../src","sources":["engine/notify-kit-engine.ts"],"mappings":";;;;;;AAoBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAIA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,OAAA,GAAAJ,OAAA;AAWA,IAAAK,MAAA,GAAAL,OAAA;AA7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIM,2BAA2B,GAAG,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,IAAIC,GAAG,CAAoC,CAAC;AAUtE,SAASC,qBAAqBA,C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