@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,12 @@
1
+ import type { PlatformInfo } from '../../../permission/state';
2
+ import type { NotifyKitModule } from '../module';
3
+ import type { NotifyKitPlatform } from './types';
4
+ export type { NotifyKitPlatform } from './types';
5
+ /** The running OS and, on Android, its API level. */
6
+ export declare function detectPlatform(): PlatformInfo;
7
+ /**
8
+ * The strategy for `platform`, or for the running one. Only Android gets the
9
+ * Android strategy; anywhere else nothing channel- or alarm-specific is called.
10
+ */
11
+ export declare function createNotifyKitPlatform(engine: () => NotifyKitModule, platform?: PlatformInfo): NotifyKitPlatform;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notify-kit/platform/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAYjD,qDAAqD;AACrD,wBAAgB,cAAc,IAAI,YAAY,CAQ7C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,MAAM,eAAe,EAC7B,QAAQ,CAAC,EAAE,YAAY,GACrB,iBAAiB,CAUnB"}
@@ -0,0 +1,3 @@
1
+ import type { NotifyKitPlatform } from './types';
2
+ export declare function createIosPlatform(): NotifyKitPlatform;
3
+ //# sourceMappingURL=ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ios.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notify-kit/platform/ios.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AASjD,wBAAgB,iBAAiB,IAAI,iBAAiB,CAsCrD"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * What differs between Android and iOS in the notify-kit engine (NOT-18, IOS-08).
3
+ *
4
+ * The engine picks one implementation when it is created and never branches on
5
+ * the OS again. Changing iOS behaviour touches `ios.ts` only, and the Android
6
+ * file that runs in production stays as it is.
7
+ */
8
+ import type { ChannelGroup, ResolvedTone } from '../../../contract/channel';
9
+ import type { PermissionKind, PermissionState, RestrictionReport } from '../../../contract/permission';
10
+ import type { EngineCapabilities, ToneDeclarationOutcome } from '../../adapter';
11
+ import type { NotifyKitModule } from '../module';
12
+ export interface NotifyKitPlatform {
13
+ capabilities(): EngineCapabilities;
14
+ /** Creates the channel stop markers are posted on, the first time one is needed. */
15
+ ensureMarkerChannel(): Promise<void>;
16
+ withChannelSnapshot<T>(work: () => Promise<T>): Promise<T>;
17
+ declareTone(tone: ResolvedTone): Promise<ToneDeclarationOutcome>;
18
+ retireTone(channelId: string): Promise<boolean>;
19
+ declareGroups(groups: readonly ChannelGroup[]): Promise<void>;
20
+ listDeclaredChannels(): Promise<readonly string[]>;
21
+ /** The state of `kind`, from the engine's settings as just read. */
22
+ permissionFrom(kind: PermissionKind, settings: Record<string, unknown>): PermissionState;
23
+ /** Whether exact alarms are a capability the user grants here. */
24
+ gatesExactAlarms(): boolean;
25
+ restrictions(now: () => number): Promise<RestrictionReport>;
26
+ }
27
+ export interface PlatformContext {
28
+ /** The engine module, resolved lazily. */
29
+ readonly engine: () => NotifyKitModule;
30
+ /** Android API level, read when asked; undefined elsewhere or when unknown. */
31
+ readonly apiLevel: () => number | undefined;
32
+ }
33
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/notify-kit/platform/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EACX,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IACjC,YAAY,IAAI,kBAAkB,CAAC;IACnC,oFAAoF;IACpF,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3D,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACjE,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,aAAa,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,oBAAoB,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IAEnD,oEAAoE;IACpE,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,CAAC;IACzF,kEAAkE;IAClE,gBAAgB,IAAI,OAAO,CAAC;IAC5B,YAAY,CAAC,GAAG,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC5D;AAED,MAAM,WAAW,eAAe;IAC/B,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,eAAe,CAAC;IACvC,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;CAC5C"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The `react-native-notify-kit` engine implementation.
3
+ *
4
+ * Nothing above this adapter knows which engine is in use — which is what
5
+ * allowed the original Notifee choice to be swapped for its maintained fork
6
+ * without touching a requirement, a test, or a line of consumer code.
7
+ *
8
+ * This file is what both platforms share: scheduling, cancelling, reading the
9
+ * pending set, and routing events. The engine module and its constants live in
10
+ * `notify-kit/module.ts`, decoding in `notify-kit/events.ts`, and everything
11
+ * that differs between Android and iOS in `notify-kit/platform/` — chosen once
12
+ * when the engine is created (NOT-18, IOS-08).
13
+ */
14
+ import type { NotificationEngineAdapter } from './adapter';
15
+ import type { PlatformInfo } from '../permission/state';
16
+ import { type NotifyKitModule } from './notify-kit/module';
17
+ export interface NotifyKitEngineOptions {
18
+ /** Injected in tests; production resolves the real module. */
19
+ readonly module?: NotifyKitModule;
20
+ readonly now?: () => number;
21
+ /** Defaults to the running platform. Injected to test one platform's behaviour. */
22
+ readonly platform?: PlatformInfo;
23
+ }
24
+ export declare function createNotifyKitEngine(options?: NotifyKitEngineOptions): NotificationEngineAdapter;
25
+ //# sourceMappingURL=notify-kit-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notify-kit-engine.d.ts","sourceRoot":"","sources":["../../../../src/engine/notify-kit-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACX,yBAAyB,EAIzB,MAAM,WAAW,CAAC;AAOnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQxD,OAAO,EASN,KAAK,eAAe,EACpB,MAAM,qBAAqB,CAAC;AAqB7B,MAAM,WAAW,sBAAsB;IACtC,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;CACjC;AAED,wBAAgB,qBAAqB,CACpC,OAAO,GAAE,sBAA2B,GAClC,yBAAyB,CAkQ3B"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * @chipmobilesdk/rn-notification
3
+ *
4
+ * Default entrypoint: scheduling, recurrence, reconciliation, permissions,
5
+ * channels, interaction, and diagnostics.
6
+ *
7
+ * Push lives behind `@chipmobilesdk/rn-notification/push` so an app that never
8
+ * enables it ships no provider code, no push permissions, and no entitlements.
9
+ * Test doubles live behind `@chipmobilesdk/rn-notification/testing` so they
10
+ * never reach a production bundle.
11
+ *
12
+ * No engine, provider, or storage type is reachable from here — that is what
13
+ * makes each of them replaceable.
14
+ */
15
+ export type { AnchoringMode, DeliveryMoment, NotificationContent, RoutingPayload, Action, NotificationRequest, PendingEntry, ScheduleResult, Weekday, DailyPattern, WeeklyPattern, MonthlyByDayPattern, RecurrencePattern, EndCondition, OccurrenceTemplate, RecurrenceRule, LookaheadConfig, SeriesResult, SeriesSummary, ReconcileInput, ReconcileResult, RejectedEntry, TruncationReport, PendingDiscrepancy, MaintenanceResult, PermissionKind, PermissionState, PermissionReport, PermissionCapability, RestrictionStatus, RestrictionReport, ToneUrgency, ToneSound, ToneRepeatAlert, ToneDeclaration, ChannelGroup, ChannelApplyResult, ResolvedTone, InteractionKind, AppStateAtInteraction, InteractionEvent, InteractionHandler, TargetMissingSignal, Unsubscribe, DiagnosticSeverity, DiagnosticEvent, EventSink, CollectionHealth, StateHealth, StateSnapshot, BurstThreshold, NotificationConfig, InitializeResult, } from './contract';
16
+ export { DEFAULT_ANCHORING_MODE, DEFAULT_LOOKAHEAD, REPEAT_ALERT_BOUNDS, LOOKAHEAD_BOUNDS, INTERACTION_BUFFER_LIMITS, MAX_ROUTING_PAYLOAD_BYTES, MAX_ACTIONS_PER_NOTIFICATION, DEFAULT_BURST_THRESHOLD, DIAGNOSTIC_CODES, ALL_DIAGNOSTIC_CODES, NotificationError, isNotificationError, isNonFailure, } from './contract';
17
+ export type { DiagnosticCode } from './contract';
18
+ /**
19
+ * The engine port. Exported so a consuming app can supply its own engine, which
20
+ * is the mechanism behind provider and engine substitution.
21
+ */
22
+ export type { NotificationEngineAdapter, DeliveryEvent, EngineCapabilities, EngineScheduleRequest, RepeatStop, ToneDeclarationOutcome, } from './engine/adapter';
23
+ /** The default engine. Consumers may substitute their own via the port above. */
24
+ export { createNotifyKitEngine } from './engine/notify-kit-engine';
25
+ /**
26
+ * The whole package, assembled (0.6.0): scheduler, reconciler, recurrence,
27
+ * permissions, channels, interactions, snapshot and maintenance, wired the way the
28
+ * package means them to be. Start here; the factories below are for an app that
29
+ * needs a different wiring, and are also exported from `./advanced`.
30
+ */
31
+ export { createNotifications } from './notifications';
32
+ export type { Notifications, NotificationsDependencies } from './notifications';
33
+ /** Initialization and the assembled runtime. */
34
+ export { initialize } from './initialize';
35
+ export type { RuntimeDependencies, NotificationRuntime } from './initialize';
36
+ /** Scheduling operations. */
37
+ export { createScheduler } from './schedule';
38
+ export type { Scheduler, ScheduleDependencies } from './schedule';
39
+ /** Reconciliation — always consumer-invoked, never automatic. */
40
+ export { createReconciler } from './reconcile';
41
+ export type { Reconciler, ReconcileDependencies } from './reconcile';
42
+ /** Recurrence — declare a rule once; the package maintains a bounded window. */
43
+ export { createRecurrence } from './recurrence';
44
+ export type { Recurrence, RecurrenceDependencies } from './recurrence';
45
+ export { occurrenceId } from './recurrence/expand';
46
+ /** Channels and tones — declared once, mapped to each platform, migrated on change. */
47
+ export { createChannels } from './channel/migrate';
48
+ export type { Channels, ChannelDependencies } from './channel/migrate';
49
+ export { channelIdFor, createToneResolver, parseChannelId, resolveTone } from './channel/tone-map';
50
+ export { validateToneDeclaration, validateToneDeclarations } from './channel/validate-tone';
51
+ /**
52
+ * Repeat expiry — what bounds an alert that repeats until it is handled.
53
+ *
54
+ * `registerBackgroundNotificationHandler` is the one piece a consumer wires up
55
+ * themselves, at module scope in `index.js`. An app that declares no repeating
56
+ * tone needs none of this.
57
+ */
58
+ export { createRepeatExpiryHandler, registerBackgroundNotificationHandler, REPEAT_STOP_PREFIX, } from './repeat';
59
+ export type { BackgroundHandlerRegistration, RepeatExpiryHandler, RepeatExpiryDependencies, } from './repeat';
60
+ /** Interaction routing — one handler for foreground, background, and cold start. */
61
+ export { createInteractions } from './interaction';
62
+ export type { Interactions, InteractionDependencies } from './interaction';
63
+ /** Observability — snapshot and burst detection. */
64
+ export { createSnapshot } from './diagnostics/snapshot';
65
+ export type { Snapshot, SnapshotDependencies } from './diagnostics/snapshot';
66
+ export { createBurstDetector } from './diagnostics/burst';
67
+ export type { BurstDetector, BurstStatus } from './diagnostics/burst';
68
+ export { DiagnosticEmitter } from './diagnostics/events';
69
+ /** Permission coordination — reading never prompts; a refusal never fails the caller. */
70
+ export { createPermissions } from './permission';
71
+ export type { Permissions, PermissionDependencies, PermissionChangeHandler } from './permission';
72
+ export { canDisplay, capabilityFor, isTerminal, shouldOfferSettings } from './permission/state';
73
+ export type { PlatformInfo } from './permission/state';
74
+ /** Maintenance steps, registered with the runtime's registry. */
75
+ export { createPermissionRefreshStep } from './maintenance/permission-refresh';
76
+ export { createReAnchorStep } from './maintenance/reanchor';
77
+ export { createVerifyStep } from './maintenance/verify';
78
+ export { createWindowRefreshStep } from './maintenance/window-refresh';
79
+ export type { MaintenanceStep, MaintenanceTrigger, MaintenanceContext } from './maintenance/cycle';
80
+ export { MaintenanceRegistry, MaintenanceScopeViolation } from './maintenance/cycle';
81
+ export { MaintenanceController } from './maintenance/toggle';
82
+ /** Public state controls — the only two ways a consumer may touch persisted state. */
83
+ export { resetState, clearOwner } from './state/reset';
84
+ export type { ResetOutcome } from './state/reset';
85
+ /**
86
+ * State plumbing. The record's *schema* stays private — a consumer can create
87
+ * and reset the store, but has no way to read or write what is inside it.
88
+ */
89
+ export { createMmkvStore } from './state/mmkv-store';
90
+ export { StateManager } from './state/record';
91
+ export type { StateStore } from './state/store';
92
+ /** Documented limits, exported so a consumer can validate before calling. */
93
+ export { MAX_IDENTIFIER_LENGTH } from './schedule/validate-identifier';
94
+ export { CONTENT_LIMITS } from './schedule/validate-content';
95
+ export { PAST_TOLERANCE_MS } from './schedule/resolve-moment';
96
+ /**
97
+ * Reads the platform time zone, which anchoring depends on.
98
+ *
99
+ * Exported because every consumer needs it and pure JavaScript cannot provide
100
+ * it reliably — `Intl.DateTimeFormat().resolvedOptions().timeZone` does not
101
+ * update when the device zone changes. Leaving consumers to write this
102
+ * themselves is how a subtly wrong version ends up in each of them.
103
+ */
104
+ export { createPlatformTimeZoneReader, isValidTimeZone } from './schedule/anchor';
105
+ export type { TimeZoneReader } from './schedule/anchor';
106
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Package initialization.
3
+ *
4
+ * Composes the parts that must be in place before the first schedule call:
5
+ * validate configuration, load persisted state, apply tone declarations, run
6
+ * any pending channel migration, and start the maintenance registry.
7
+ *
8
+ * Budgeted at 100 ms of app startup, which is why state loading is synchronous
9
+ * and tone declaration is the only platform round-trip.
10
+ *
11
+ * Automatic maintenance is started here too: whatever steps are registered on
12
+ * `runtime.registry` run when the app returns to the foreground, with the
13
+ * trigger reported as `timeZoneChange` when the device zone moved meanwhile.
14
+ * Until 0.4.0 nothing ever called `runAutomatic`, so "automatic" maintenance
15
+ * only ran when the app invoked it by hand.
16
+ */
17
+ import type { InitializeResult, NotificationConfig } from './contract/diagnostics';
18
+ import { type LookaheadConfig } from './contract/recurrence';
19
+ import type { MaintenanceResult } from './contract/reconcile';
20
+ import { DiagnosticEmitter } from './diagnostics/events';
21
+ import { MaintenanceRegistry } from './maintenance/cycle';
22
+ import { MaintenanceController } from './maintenance/toggle';
23
+ import { StateManager } from './state/record';
24
+ import type { StateStore } from './state/store';
25
+ import type { NotificationEngineAdapter } from './engine/adapter';
26
+ import { type Channels } from './channel/migrate';
27
+ import { type TimeZoneReader } from './schedule/anchor';
28
+ /** The slice of React Native's `AppState` the lifecycle observer uses. */
29
+ export interface AppStateSource {
30
+ addEventListener(type: 'change', listener: (state: string) => void): {
31
+ remove(): void;
32
+ };
33
+ }
34
+ export interface RuntimeDependencies {
35
+ readonly engine: NotificationEngineAdapter;
36
+ readonly store: StateStore;
37
+ readonly now?: () => number;
38
+ /** Injected in tests; defaults to rn-core's shared `appLifecycle()`. */
39
+ readonly appState?: AppStateSource;
40
+ /** Injected in tests; defaults to the platform zone reader. */
41
+ readonly timeZone?: TimeZoneReader;
42
+ }
43
+ /** Everything assembled at initialization, shared by the operation modules. */
44
+ export interface NotificationRuntime {
45
+ readonly engine: NotificationEngineAdapter;
46
+ readonly state: StateManager;
47
+ readonly emitter: DiagnosticEmitter;
48
+ readonly registry: MaintenanceRegistry;
49
+ readonly maintenance: MaintenanceController;
50
+ /** The channel module that applied `config.tones`. Added in 0.4.0. */
51
+ readonly channels: Channels;
52
+ readonly lookahead: LookaheadConfig;
53
+ readonly config: NotificationConfig;
54
+ readonly now: () => number;
55
+ /** The result of the latest automatic cycle, if one has run. Added in 0.4.0. */
56
+ readonly lastAutomaticMaintenance: () => MaintenanceResult | undefined;
57
+ /** Stops the lifecycle observer. Added in 0.4.0. */
58
+ dispose(): void;
59
+ }
60
+ /**
61
+ * Clamps the lookahead into its documented bounds.
62
+ *
63
+ * Bounded on adjustment because the platform ceiling is not negotiable: a
64
+ * consumer asking for a five-year window would silently exhaust the 64-entry
65
+ * iOS ceiling on the first frequent series.
66
+ */
67
+ export declare function resolveLookahead(partial: Partial<LookaheadConfig> | undefined): LookaheadConfig;
68
+ /** Fails before any platform call, so a bad configuration never half-applies. */
69
+ export declare function validateConfig(config: NotificationConfig): void;
70
+ export declare function initialize(config: NotificationConfig, deps: RuntimeDependencies): Promise<{
71
+ runtime: NotificationRuntime;
72
+ result: InitializeResult;
73
+ }>;
74
+ //# sourceMappingURL=initialize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../src/initialize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAuC,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtF,0EAA0E;AAC1E,MAAM,WAAW,cAAc;IAC9B,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE,CAAC;CACxF;AASD,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;IAC5C,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,wBAAwB,EAAE,MAAM,iBAAiB,GAAG,SAAS,CAAC;IACvE,oDAAoD;IACpD,OAAO,IAAI,IAAI,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,GAAG,eAAe,CAY/F;AAED,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAsC/D;AAED,wBAAsB,UAAU,CAC/B,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,mBAAmB,GACvB,OAAO,CAAC;IAAE,OAAO,EAAE,mBAAmB,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAC,CA8FrE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Interaction routing.
3
+ *
4
+ * One handler covers foreground, background, and cold start. The hard case is
5
+ * the last one: the tap happens before any JavaScript exists to receive it, so
6
+ * the event has to wait — durably — until a handler registers.
7
+ *
8
+ * Events are delivered in occurrence order and never dropped for want of a
9
+ * listener. After delivery the notification leaves the tray, because a
10
+ * notification the user has already acted on sitting there is noise.
11
+ */
12
+ import type { InteractionHandler, TargetMissingSignal, Unsubscribe } from '../contract/interaction';
13
+ import type { NotificationEngineAdapter } from '../engine/adapter';
14
+ import type { StateManager } from '../state/record';
15
+ export interface InteractionDependencies {
16
+ readonly engine: NotificationEngineAdapter;
17
+ readonly state: StateManager;
18
+ readonly now: () => number;
19
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
20
+ }
21
+ export declare function createInteractions(deps: InteractionDependencies): {
22
+ /**
23
+ * Registers a handler and immediately drains anything that was waiting.
24
+ *
25
+ * The drain is what makes a cold-start tap work: the event was persisted
26
+ * before this handler existed, possibly before this process existed.
27
+ */
28
+ onInteraction(handler: InteractionHandler): Unsubscribe;
29
+ /**
30
+ * Collects the interaction that launched the app, if any.
31
+ *
32
+ * Called once during startup. If no handler exists yet the event is
33
+ * buffered rather than discarded.
34
+ */
35
+ collectInitial(): Promise<void>;
36
+ /**
37
+ * Signals that a routing target no longer exists.
38
+ *
39
+ * The consumer chooses its own fallback screen. No platform error is ever
40
+ * shown to the user for this — a notification pointing at deleted data is
41
+ * an ordinary condition, not a crash.
42
+ */
43
+ reportTargetMissing(signal: TargetMissingSignal): void;
44
+ /** Reports that a background action exceeded the platform's execution window. */
45
+ reportBackgroundTimeout(notificationId: string, windowMs: number): void;
46
+ /** How many interactions are waiting for a handler. */
47
+ pendingCount(): number;
48
+ /** Settles outstanding deliveries. Exists for tests and orderly shutdown. */
49
+ flush(): Promise<void>;
50
+ dispose(): void;
51
+ };
52
+ export type Interactions = ReturnType<typeof createInteractions>;
53
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/interaction/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAEX,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,uBAAuB;IA2C9D;;;;;OAKG;2BACoB,kBAAkB,GAAG,WAAW;IAYvD;;;;;OAKG;sBACqB,OAAO,CAAC,IAAI,CAAC;IAMrC;;;;;;OAMG;gCACyB,mBAAmB,GAAG,IAAI;IAQtD,iFAAiF;4CACzC,MAAM,YAAY,MAAM,GAAG,IAAI;IAQvE,uDAAuD;oBACvC,MAAM;IAItB,6EAA6E;aAC9D,OAAO,CAAC,IAAI,CAAC;eAIjB,IAAI;EAMhB;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * The automatic maintenance cycle.
3
+ *
4
+ * Covers exactly what only the package can know — window refresh, recurrence
5
+ * expansion, wall-clock re-anchoring, pending-set verification, permission
6
+ * re-reads. Full desired-set reconciliation is never automatic, because only
7
+ * the consumer knows what its data implies and a package that guessed would
8
+ * cancel notifications it does not understand.
9
+ *
10
+ * Steps register themselves here rather than being wired in a fixed order. That
11
+ * is what lets scheduling, reconciliation, recurrence, and permissions each
12
+ * contribute a step without importing one another.
13
+ *
14
+ * The rule that makes automatic work safe: a step may act only on notifications
15
+ * the package owns, and may never cancel anything else. It is enforced here
16
+ * rather than trusted to each step.
17
+ */
18
+ import type { MaintenanceResult, PendingDiscrepancy } from '../contract/reconcile';
19
+ export type MaintenanceTrigger = 'foreground' | 'delivery' | 'timeZoneChange' | 'permissionChange' | 'explicit';
20
+ export interface MaintenanceContext {
21
+ readonly trigger: MaintenanceTrigger;
22
+ readonly now: number;
23
+ /**
24
+ * Identifiers the package owns — series occurrences and entries it created.
25
+ * A step may cancel only within this set.
26
+ */
27
+ readonly ownedIds: ReadonlySet<string>;
28
+ }
29
+ export interface StepOutcome {
30
+ readonly occurrencesScheduled?: number;
31
+ readonly reAnchored?: number;
32
+ readonly windowRefreshed?: boolean;
33
+ readonly timeZoneChanged?: boolean;
34
+ readonly permissionChanged?: boolean;
35
+ readonly discrepancy?: PendingDiscrepancy;
36
+ /** Platform operations issued. Zero on a no-change pass. */
37
+ readonly operationCount?: number;
38
+ /** Identifiers this step cancelled, checked against `ownedIds`. */
39
+ readonly cancelledIds?: readonly string[];
40
+ }
41
+ export interface MaintenanceStep {
42
+ readonly name: string;
43
+ /** Lower runs first. Re-anchoring must precede verification, or verification sees stale instants. */
44
+ readonly order: number;
45
+ run(context: MaintenanceContext): Promise<StepOutcome>;
46
+ }
47
+ export declare class MaintenanceScopeViolation extends Error {
48
+ readonly step: string;
49
+ readonly offendingIds: readonly string[];
50
+ constructor(step: string, offendingIds: readonly string[]);
51
+ }
52
+ export interface MaintenanceRegistryOptions {
53
+ /** Measures `durationMs`. `context.now` is the cycle's logical time and does not move. */
54
+ readonly clock?: () => number;
55
+ }
56
+ export declare class MaintenanceRegistry {
57
+ private steps;
58
+ private inFlight;
59
+ private readonly clock;
60
+ constructor(options?: MaintenanceRegistryOptions);
61
+ register(step: MaintenanceStep): () => void;
62
+ get registered(): readonly string[];
63
+ /**
64
+ * Runs every registered step in order.
65
+ *
66
+ * Overlapping cycles are joined rather than queued or dropped: a second
67
+ * caller arriving mid-cycle wants the work the running cycle is already
68
+ * doing, so it waits for that cycle and gets its result. It used to get an
69
+ * empty result at once. Since `initialize` started running a cycle on every
70
+ * foreground, an app that ran maintenance and then reconciled on the same
71
+ * event got that empty result and reconciled while the window refresh was
72
+ * still writing: a reminder the reconcile cancelled could be scheduled again.
73
+ */
74
+ run(context: MaintenanceContext): Promise<MaintenanceResult>;
75
+ private runSteps;
76
+ }
77
+ //# sourceMappingURL=cycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cycle.d.ts","sourceRoot":"","sources":["../../../../src/maintenance/cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEnF,MAAM,MAAM,kBAAkB,GAC7B,YAAY,GAAG,UAAU,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,UAAU,CAAC;AAEhF,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,4DAA4D;IAC5D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qGAAqG;IACrG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACvD;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;gBAE7B,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE;CAUzD;AAED,MAAM,WAAW,0BAA0B;IAC1C,0FAA0F;IAC1F,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CAC9B;AAED,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,QAAQ,CAA2C;IAC3D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;gBAEzB,OAAO,GAAE,0BAA+B;IAIpD,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,IAAI;IAQ3C,IAAI,UAAU,IAAI,SAAS,MAAM,EAAE,CAElC;IAED;;;;;;;;;;OAUG;IACH,GAAG,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;YAW9C,QAAQ;CAgCtB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The permission re-read maintenance step.
3
+ *
4
+ * The user can change permission in system settings while the app is
5
+ * backgrounded, and the platform does not tell anyone. Re-reading on foreground
6
+ * is the only way a consumer's interface avoids showing a stale answer.
7
+ *
8
+ * Runs last (order 30): permission state does not affect what the earlier steps
9
+ * expand or re-anchor, and reading it after they have run means the report
10
+ * reflects the device as the cycle leaves it.
11
+ */
12
+ import type { MaintenanceStep } from './cycle';
13
+ import type { Permissions } from '../permission';
14
+ export declare const PERMISSION_REFRESH_ORDER = 30;
15
+ export interface PermissionRefreshDependencies {
16
+ readonly permissions: Permissions;
17
+ }
18
+ export declare function createPermissionRefreshStep(deps: PermissionRefreshDependencies): MaintenanceStep;
19
+ //# sourceMappingURL=permission-refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission-refresh.d.ts","sourceRoot":"","sources":["../../../../src/maintenance/permission-refresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAmC,MAAM,SAAS,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;CAClC;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,6BAA6B,GAAG,eAAe,CAiBhG"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The re-anchoring maintenance step.
3
+ *
4
+ * Registers itself with the maintenance registry rather than being wired into
5
+ * a fixed sequence, which is what keeps scheduling independent of
6
+ * reconciliation, recurrence, and permissions despite all four contributing a
7
+ * step.
8
+ *
9
+ * Runs early (order 10) because verification compares firing instants: if
10
+ * verification ran first it would compare against instants re-anchoring is
11
+ * about to rewrite, and report discrepancies that do not exist.
12
+ */
13
+ import type { MaintenanceStep } from './cycle';
14
+ import type { NotificationEngineAdapter } from '../engine/adapter';
15
+ import type { ResolvedTone } from '../contract/channel';
16
+ import { type TimeZoneReader } from '../schedule/anchor';
17
+ export interface ReAnchorStepDependencies {
18
+ readonly engine: NotificationEngineAdapter;
19
+ readonly timeZone: TimeZoneReader;
20
+ readonly resolveTone: (toneId: string) => ResolvedTone | undefined;
21
+ readonly canScheduleExactly: () => boolean;
22
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
23
+ }
24
+ export declare const RE_ANCHOR_ORDER = 10;
25
+ export declare function createReAnchorStep(deps: ReAnchorStepDependencies): MaintenanceStep;
26
+ //# sourceMappingURL=reanchor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reanchor.d.ts","sourceRoot":"","sources":["../../../../src/maintenance/reanchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAmC,MAAM,SAAS,CAAC;AAChF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGvE,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;IACnE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,wBAAwB,GAAG,eAAe,CAuElF"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The automatic-maintenance switch.
3
+ *
4
+ * A package that acts on its own must offer a way to stop it — and a consumer
5
+ * that takes control must not lose a feature as the price. Disabling automatic
6
+ * maintenance leaves every operation explicitly invocable through
7
+ * `runMaintenance()`, producing identical device state.
8
+ */
9
+ import type { MaintenanceResult } from '../contract/reconcile';
10
+ import type { MaintenanceRegistry, MaintenanceTrigger } from './cycle';
11
+ export interface MaintenanceControllerOptions {
12
+ readonly registry: MaintenanceRegistry;
13
+ readonly now: () => number;
14
+ /**
15
+ * Identifiers the package owns at the start of a cycle. May read the device,
16
+ * since ownership is decided per pending occurrence, not per series.
17
+ */
18
+ readonly ownedIds: () => ReadonlySet<string> | Promise<ReadonlySet<string>>;
19
+ readonly enabled?: boolean;
20
+ }
21
+ export declare class MaintenanceController {
22
+ private enabled;
23
+ private readonly registry;
24
+ private readonly now;
25
+ private readonly ownedIds;
26
+ constructor(options: MaintenanceControllerOptions);
27
+ get isEnabled(): boolean;
28
+ setEnabled(enabled: boolean): void;
29
+ /** Called by lifecycle observers. A no-op when automatic maintenance is off. */
30
+ runAutomatic(trigger: Exclude<MaintenanceTrigger, 'explicit'>): Promise<MaintenanceResult | undefined>;
31
+ /** Always runs, regardless of the switch. This is what preserves capability parity. */
32
+ runExplicit(): Promise<MaintenanceResult>;
33
+ private execute;
34
+ }
35
+ //# sourceMappingURL=toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../src/maintenance/toggle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAsB,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE3F,MAAM,WAAW,4BAA4B;IAC5C,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,qBAAa,qBAAqB;IACjC,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2D;gBAExE,OAAO,EAAE,4BAA4B;IAOjD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIlC,gFAAgF;IAC1E,YAAY,CACjB,OAAO,EAAE,OAAO,CAAC,kBAAkB,EAAE,UAAU,CAAC,GAC9C,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAKzC,uFAAuF;IACjF,WAAW,IAAI,OAAO,CAAC,iBAAiB,CAAC;YAIjC,OAAO;CAQrB"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Pending-set verification.
3
+ *
4
+ * Engine boot restoration coverage varies by manufacturer, so after a restart
5
+ * the device may hold fewer notifications than the package expects. This step
6
+ * notices that.
7
+ *
8
+ * It **detects and reports only**. It never re-registers, cancels, or repairs
9
+ * anything — the package deliberately does not persist a desired set, so it
10
+ * cannot tell a restoration gap from an intentional consumer change. Guessing
11
+ * would mean either resurrecting notifications the user cancelled or deleting
12
+ * ones they still want. Repair is consumer-invoked reconciliation.
13
+ *
14
+ * Runs at order 20, after re-anchoring (order 10): re-anchoring rewrites firing
15
+ * instants, and verifying first would compare against instants that are about
16
+ * to change.
17
+ */
18
+ import type { MaintenanceStep } from './cycle';
19
+ import type { NotificationEngineAdapter } from '../engine/adapter';
20
+ export declare const VERIFY_ORDER = 20;
21
+ export interface VerifyStepDependencies {
22
+ readonly engine: NotificationEngineAdapter;
23
+ /**
24
+ * Identifiers the package expects the device to hold — the union of series
25
+ * occurrences and the last reconciliation's result. Absent expectations mean
26
+ * nothing to verify, which is different from expecting nothing.
27
+ */
28
+ readonly expectedIds: () => ReadonlySet<string> | undefined;
29
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
30
+ }
31
+ export declare function createVerifyStep(deps: VerifyStepDependencies): MaintenanceStep;
32
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/maintenance/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAmC,MAAM,SAAS,CAAC;AAChF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAInE,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,MAAM,WAAW,sBAAsB;IACtC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAC5D,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,eAAe,CA8C9E"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The window-refresh maintenance step.
3
+ *
4
+ * Runs at order 15 — after re-anchoring (10) so it expands against corrected
5
+ * instants, before verification (20) so verification sees the refreshed set
6
+ * rather than reporting occurrences the refresh was about to add.
7
+ *
8
+ * This step is the reason automatic maintenance exists at all: only the package
9
+ * knows when a series' horizon has moved, and it can act on that without ever
10
+ * needing a desired set from the consumer.
11
+ */
12
+ import type { MaintenanceStep } from './cycle';
13
+ import type { RecurrenceRule } from '../contract/recurrence';
14
+ import type { Recurrence } from '../recurrence';
15
+ export declare const WINDOW_REFRESH_ORDER = 15;
16
+ export interface WindowRefreshDependencies {
17
+ readonly recurrence: Recurrence;
18
+ /**
19
+ * Rules the consumer has registered, supplied as a lookup rather than stored.
20
+ *
21
+ * The ledger records what the package expanded; the rule itself belongs to
22
+ * the consumer, because persisting a rule would mean persisting its content
23
+ * template — and FR-096a forbids the package holding notification content.
24
+ */
25
+ readonly registeredRules: () => readonly RecurrenceRule[];
26
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
27
+ }
28
+ export declare function createWindowRefreshStep(deps: WindowRefreshDependencies): MaintenanceStep;
29
+ //# sourceMappingURL=window-refresh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-refresh.d.ts","sourceRoot":"","sources":["../../../../src/maintenance/window-refresh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAmC,MAAM,SAAS,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,SAAS,cAAc,EAAE,CAAC;IAC1D,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,yBAAyB,GAAG,eAAe,CAgCxF"}