@chipmobilesdk/rn-notification 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (647) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +8 -6
  3. package/lib/commonjs/advanced.js +139 -0
  4. package/lib/commonjs/advanced.js.map +1 -0
  5. package/lib/commonjs/channel/migrate.js +246 -0
  6. package/lib/commonjs/channel/migrate.js.map +1 -0
  7. package/lib/commonjs/channel/tone-map.js +120 -0
  8. package/lib/commonjs/channel/tone-map.js.map +1 -0
  9. package/lib/commonjs/channel/validate-tone.js +61 -0
  10. package/lib/commonjs/channel/validate-tone.js.map +1 -0
  11. package/lib/commonjs/contract/channel.js +52 -0
  12. package/lib/commonjs/contract/channel.js.map +1 -0
  13. package/lib/commonjs/contract/diagnostics.js +25 -0
  14. package/lib/commonjs/contract/diagnostics.js.map +1 -0
  15. package/lib/commonjs/contract/errors.js +126 -0
  16. package/lib/commonjs/contract/errors.js.map +1 -0
  17. package/lib/commonjs/contract/hash.js +35 -0
  18. package/lib/commonjs/contract/hash.js.map +1 -0
  19. package/lib/commonjs/contract/index.js +94 -0
  20. package/lib/commonjs/contract/index.js.map +1 -0
  21. package/lib/commonjs/contract/interaction.js +37 -0
  22. package/lib/commonjs/contract/interaction.js.map +1 -0
  23. package/lib/commonjs/contract/notification.js +42 -0
  24. package/lib/commonjs/contract/notification.js.map +1 -0
  25. package/lib/commonjs/contract/permission.js +2 -0
  26. package/lib/commonjs/contract/permission.js.map +1 -0
  27. package/lib/commonjs/contract/reconcile.js +6 -0
  28. package/lib/commonjs/contract/reconcile.js.map +1 -0
  29. package/lib/commonjs/contract/recurrence.js +53 -0
  30. package/lib/commonjs/contract/recurrence.js.map +1 -0
  31. package/lib/commonjs/diagnostics/burst.js +89 -0
  32. package/lib/commonjs/diagnostics/burst.js.map +1 -0
  33. package/lib/commonjs/diagnostics/events.js +63 -0
  34. package/lib/commonjs/diagnostics/events.js.map +1 -0
  35. package/lib/commonjs/diagnostics/redact.js +48 -0
  36. package/lib/commonjs/diagnostics/redact.js.map +1 -0
  37. package/lib/commonjs/diagnostics/snapshot.js +68 -0
  38. package/lib/commonjs/diagnostics/snapshot.js.map +1 -0
  39. package/lib/commonjs/engine/adapter.js +6 -0
  40. package/lib/commonjs/engine/adapter.js.map +1 -0
  41. package/lib/commonjs/engine/codec.js +84 -0
  42. package/lib/commonjs/engine/codec.js.map +1 -0
  43. package/lib/commonjs/engine/notify-kit/events.js +148 -0
  44. package/lib/commonjs/engine/notify-kit/events.js.map +1 -0
  45. package/lib/commonjs/engine/notify-kit/module.js +119 -0
  46. package/lib/commonjs/engine/notify-kit/module.js.map +1 -0
  47. package/lib/commonjs/engine/notify-kit/platform/android.js +159 -0
  48. package/lib/commonjs/engine/notify-kit/platform/android.js.map +1 -0
  49. package/lib/commonjs/engine/notify-kit/platform/index.js +57 -0
  50. package/lib/commonjs/engine/notify-kit/platform/index.js.map +1 -0
  51. package/lib/commonjs/engine/notify-kit/platform/ios.js +54 -0
  52. package/lib/commonjs/engine/notify-kit/platform/ios.js.map +1 -0
  53. package/lib/commonjs/engine/notify-kit/platform/types.js +6 -0
  54. package/lib/commonjs/engine/notify-kit/platform/types.js.map +1 -0
  55. package/lib/commonjs/engine/notify-kit-engine.js +260 -0
  56. package/lib/commonjs/engine/notify-kit-engine.js.map +1 -0
  57. package/lib/commonjs/index.js +367 -0
  58. package/lib/commonjs/index.js.map +1 -0
  59. package/lib/commonjs/initialize.js +187 -0
  60. package/lib/commonjs/initialize.js.map +1 -0
  61. package/lib/commonjs/interaction/index.js +120 -0
  62. package/lib/commonjs/interaction/index.js.map +1 -0
  63. package/lib/commonjs/maintenance/cycle.js +108 -0
  64. package/lib/commonjs/maintenance/cycle.js.map +1 -0
  65. package/lib/commonjs/maintenance/permission-refresh.js +39 -0
  66. package/lib/commonjs/maintenance/permission-refresh.js.map +1 -0
  67. package/lib/commonjs/maintenance/reanchor.js +99 -0
  68. package/lib/commonjs/maintenance/reanchor.js.map +1 -0
  69. package/lib/commonjs/maintenance/toggle.js +50 -0
  70. package/lib/commonjs/maintenance/toggle.js.map +1 -0
  71. package/lib/commonjs/maintenance/verify.js +70 -0
  72. package/lib/commonjs/maintenance/verify.js.map +1 -0
  73. package/lib/commonjs/maintenance/window-refresh.js +53 -0
  74. package/lib/commonjs/maintenance/window-refresh.js.map +1 -0
  75. package/lib/commonjs/notifications.js +161 -0
  76. package/lib/commonjs/notifications.js.map +1 -0
  77. package/lib/commonjs/package.json +1 -0
  78. package/lib/commonjs/permission/index.js +182 -0
  79. package/lib/commonjs/permission/index.js.map +1 -0
  80. package/lib/commonjs/permission/state.js +92 -0
  81. package/lib/commonjs/permission/state.js.map +1 -0
  82. package/lib/commonjs/push/envelope.js +141 -0
  83. package/lib/commonjs/push/envelope.js.map +1 -0
  84. package/lib/commonjs/push/fcm-provider.js +122 -0
  85. package/lib/commonjs/push/fcm-provider.js.map +1 -0
  86. package/lib/commonjs/push/gate.js +162 -0
  87. package/lib/commonjs/push/gate.js.map +1 -0
  88. package/lib/commonjs/push/index.js +47 -0
  89. package/lib/commonjs/push/index.js.map +1 -0
  90. package/lib/commonjs/push/instructions.js +101 -0
  91. package/lib/commonjs/push/instructions.js.map +1 -0
  92. package/lib/commonjs/push/provider-adapter.js +6 -0
  93. package/lib/commonjs/push/provider-adapter.js.map +1 -0
  94. package/lib/commonjs/push/signout.js +55 -0
  95. package/lib/commonjs/push/signout.js.map +1 -0
  96. package/lib/commonjs/reconcile/chunk.js +49 -0
  97. package/lib/commonjs/reconcile/chunk.js.map +1 -0
  98. package/lib/commonjs/reconcile/diff.js +105 -0
  99. package/lib/commonjs/reconcile/diff.js.map +1 -0
  100. package/lib/commonjs/reconcile/duplicates.js +60 -0
  101. package/lib/commonjs/reconcile/duplicates.js.map +1 -0
  102. package/lib/commonjs/reconcile/index.js +164 -0
  103. package/lib/commonjs/reconcile/index.js.map +1 -0
  104. package/lib/commonjs/reconcile/truncate.js +50 -0
  105. package/lib/commonjs/reconcile/truncate.js.map +1 -0
  106. package/lib/commonjs/recurrence/clock-guard.js +65 -0
  107. package/lib/commonjs/recurrence/clock-guard.js.map +1 -0
  108. package/lib/commonjs/recurrence/expand.js +254 -0
  109. package/lib/commonjs/recurrence/expand.js.map +1 -0
  110. package/lib/commonjs/recurrence/index.js +212 -0
  111. package/lib/commonjs/recurrence/index.js.map +1 -0
  112. package/lib/commonjs/repeat/expiry.js +41 -0
  113. package/lib/commonjs/repeat/expiry.js.map +1 -0
  114. package/lib/commonjs/repeat/index.js +100 -0
  115. package/lib/commonjs/repeat/index.js.map +1 -0
  116. package/lib/commonjs/repeat/marker.js +58 -0
  117. package/lib/commonjs/repeat/marker.js.map +1 -0
  118. package/lib/commonjs/repeat/place.js +83 -0
  119. package/lib/commonjs/repeat/place.js.map +1 -0
  120. package/lib/commonjs/schedule/anchor.js +243 -0
  121. package/lib/commonjs/schedule/anchor.js.map +1 -0
  122. package/lib/commonjs/schedule/index.js +142 -0
  123. package/lib/commonjs/schedule/index.js.map +1 -0
  124. package/lib/commonjs/schedule/partition.js +59 -0
  125. package/lib/commonjs/schedule/partition.js.map +1 -0
  126. package/lib/commonjs/schedule/resolve-moment.js +72 -0
  127. package/lib/commonjs/schedule/resolve-moment.js.map +1 -0
  128. package/lib/commonjs/schedule/validate-content.js +101 -0
  129. package/lib/commonjs/schedule/validate-content.js.map +1 -0
  130. package/lib/commonjs/schedule/validate-identifier.js +126 -0
  131. package/lib/commonjs/schedule/validate-identifier.js.map +1 -0
  132. package/lib/commonjs/schedule/writer.js +44 -0
  133. package/lib/commonjs/schedule/writer.js.map +1 -0
  134. package/lib/commonjs/state/caps.js +101 -0
  135. package/lib/commonjs/state/caps.js.map +1 -0
  136. package/lib/commonjs/state/dedup-ledger.js +39 -0
  137. package/lib/commonjs/state/dedup-ledger.js.map +1 -0
  138. package/lib/commonjs/state/interaction-buffer.js +98 -0
  139. package/lib/commonjs/state/interaction-buffer.js.map +1 -0
  140. package/lib/commonjs/state/mmkv-store.js +75 -0
  141. package/lib/commonjs/state/mmkv-store.js.map +1 -0
  142. package/lib/commonjs/state/permission-history.js +64 -0
  143. package/lib/commonjs/state/permission-history.js.map +1 -0
  144. package/lib/commonjs/state/record.js +269 -0
  145. package/lib/commonjs/state/record.js.map +1 -0
  146. package/lib/commonjs/state/reset.js +37 -0
  147. package/lib/commonjs/state/reset.js.map +1 -0
  148. package/lib/commonjs/state/series-ledger.js +71 -0
  149. package/lib/commonjs/state/series-ledger.js.map +1 -0
  150. package/lib/commonjs/state/store.js +39 -0
  151. package/lib/commonjs/state/store.js.map +1 -0
  152. package/lib/commonjs/testing/conformance/index.js +218 -0
  153. package/lib/commonjs/testing/conformance/index.js.map +1 -0
  154. package/lib/commonjs/testing/fake-engine.js +338 -0
  155. package/lib/commonjs/testing/fake-engine.js.map +1 -0
  156. package/lib/commonjs/testing/fake-provider.js +93 -0
  157. package/lib/commonjs/testing/fake-provider.js.map +1 -0
  158. package/lib/commonjs/testing/faults.js +59 -0
  159. package/lib/commonjs/testing/faults.js.map +1 -0
  160. package/lib/commonjs/testing/index.js +54 -0
  161. package/lib/commonjs/testing/index.js.map +1 -0
  162. package/lib/commonjs/testing/measure.js +298 -0
  163. package/lib/commonjs/testing/measure.js.map +1 -0
  164. package/lib/module/advanced.js +29 -0
  165. package/lib/module/advanced.js.map +1 -0
  166. package/lib/module/channel/migrate.js +242 -0
  167. package/lib/module/channel/migrate.js.map +1 -0
  168. package/lib/module/channel/tone-map.js +112 -0
  169. package/lib/module/channel/tone-map.js.map +1 -0
  170. package/lib/module/channel/validate-tone.js +57 -0
  171. package/lib/module/channel/validate-tone.js.map +1 -0
  172. package/lib/module/contract/channel.js +48 -0
  173. package/lib/module/contract/channel.js.map +1 -0
  174. package/lib/module/contract/diagnostics.js +21 -0
  175. package/lib/module/contract/diagnostics.js.map +1 -0
  176. package/lib/module/contract/errors.js +119 -0
  177. package/lib/module/contract/errors.js.map +1 -0
  178. package/lib/module/contract/hash.js +29 -0
  179. package/lib/module/contract/hash.js.map +1 -0
  180. package/lib/module/contract/index.js +13 -0
  181. package/lib/module/contract/index.js.map +1 -0
  182. package/lib/module/contract/interaction.js +33 -0
  183. package/lib/module/contract/interaction.js.map +1 -0
  184. package/lib/module/contract/notification.js +38 -0
  185. package/lib/module/contract/notification.js.map +1 -0
  186. package/lib/module/contract/permission.js +2 -0
  187. package/lib/module/contract/permission.js.map +1 -0
  188. package/lib/module/contract/reconcile.js +4 -0
  189. package/lib/module/contract/reconcile.js.map +1 -0
  190. package/lib/module/contract/recurrence.js +49 -0
  191. package/lib/module/contract/recurrence.js.map +1 -0
  192. package/lib/module/diagnostics/burst.js +85 -0
  193. package/lib/module/diagnostics/burst.js.map +1 -0
  194. package/lib/module/diagnostics/events.js +58 -0
  195. package/lib/module/diagnostics/events.js.map +1 -0
  196. package/lib/module/diagnostics/redact.js +44 -0
  197. package/lib/module/diagnostics/redact.js.map +1 -0
  198. package/lib/module/diagnostics/snapshot.js +64 -0
  199. package/lib/module/diagnostics/snapshot.js.map +1 -0
  200. package/lib/module/engine/adapter.js +4 -0
  201. package/lib/module/engine/adapter.js.map +1 -0
  202. package/lib/module/engine/codec.js +79 -0
  203. package/lib/module/engine/codec.js.map +1 -0
  204. package/lib/module/engine/notify-kit/events.js +139 -0
  205. package/lib/module/engine/notify-kit/events.js.map +1 -0
  206. package/lib/module/engine/notify-kit/module.js +113 -0
  207. package/lib/module/engine/notify-kit/module.js.map +1 -0
  208. package/lib/module/engine/notify-kit/platform/android.js +155 -0
  209. package/lib/module/engine/notify-kit/platform/android.js.map +1 -0
  210. package/lib/module/engine/notify-kit/platform/index.js +51 -0
  211. package/lib/module/engine/notify-kit/platform/index.js.map +1 -0
  212. package/lib/module/engine/notify-kit/platform/ios.js +49 -0
  213. package/lib/module/engine/notify-kit/platform/ios.js.map +1 -0
  214. package/lib/module/engine/notify-kit/platform/types.js +4 -0
  215. package/lib/module/engine/notify-kit/platform/types.js.map +1 -0
  216. package/lib/module/engine/notify-kit-engine.js +257 -0
  217. package/lib/module/engine/notify-kit-engine.js.map +1 -0
  218. package/lib/module/index.js +98 -0
  219. package/lib/module/index.js.map +1 -0
  220. package/lib/module/initialize.js +182 -0
  221. package/lib/module/initialize.js.map +1 -0
  222. package/lib/module/interaction/index.js +116 -0
  223. package/lib/module/interaction/index.js.map +1 -0
  224. package/lib/module/maintenance/cycle.js +102 -0
  225. package/lib/module/maintenance/cycle.js.map +1 -0
  226. package/lib/module/maintenance/permission-refresh.js +34 -0
  227. package/lib/module/maintenance/permission-refresh.js.map +1 -0
  228. package/lib/module/maintenance/reanchor.js +94 -0
  229. package/lib/module/maintenance/reanchor.js.map +1 -0
  230. package/lib/module/maintenance/toggle.js +45 -0
  231. package/lib/module/maintenance/toggle.js.map +1 -0
  232. package/lib/module/maintenance/verify.js +65 -0
  233. package/lib/module/maintenance/verify.js.map +1 -0
  234. package/lib/module/maintenance/window-refresh.js +48 -0
  235. package/lib/module/maintenance/window-refresh.js.map +1 -0
  236. package/lib/module/notifications.js +157 -0
  237. package/lib/module/notifications.js.map +1 -0
  238. package/lib/module/package.json +1 -0
  239. package/lib/module/permission/index.js +178 -0
  240. package/lib/module/permission/index.js.map +1 -0
  241. package/lib/module/permission/state.js +83 -0
  242. package/lib/module/permission/state.js.map +1 -0
  243. package/lib/module/push/envelope.js +137 -0
  244. package/lib/module/push/envelope.js.map +1 -0
  245. package/lib/module/push/fcm-provider.js +119 -0
  246. package/lib/module/push/fcm-provider.js.map +1 -0
  247. package/lib/module/push/gate.js +158 -0
  248. package/lib/module/push/gate.js.map +1 -0
  249. package/lib/module/push/index.js +16 -0
  250. package/lib/module/push/index.js.map +1 -0
  251. package/lib/module/push/instructions.js +97 -0
  252. package/lib/module/push/instructions.js.map +1 -0
  253. package/lib/module/push/provider-adapter.js +4 -0
  254. package/lib/module/push/provider-adapter.js.map +1 -0
  255. package/lib/module/push/signout.js +51 -0
  256. package/lib/module/push/signout.js.map +1 -0
  257. package/lib/module/reconcile/chunk.js +43 -0
  258. package/lib/module/reconcile/chunk.js.map +1 -0
  259. package/lib/module/reconcile/diff.js +101 -0
  260. package/lib/module/reconcile/diff.js.map +1 -0
  261. package/lib/module/reconcile/duplicates.js +56 -0
  262. package/lib/module/reconcile/duplicates.js.map +1 -0
  263. package/lib/module/reconcile/index.js +161 -0
  264. package/lib/module/reconcile/index.js.map +1 -0
  265. package/lib/module/reconcile/truncate.js +46 -0
  266. package/lib/module/reconcile/truncate.js.map +1 -0
  267. package/lib/module/recurrence/clock-guard.js +60 -0
  268. package/lib/module/recurrence/clock-guard.js.map +1 -0
  269. package/lib/module/recurrence/expand.js +248 -0
  270. package/lib/module/recurrence/expand.js.map +1 -0
  271. package/lib/module/recurrence/index.js +208 -0
  272. package/lib/module/recurrence/index.js.map +1 -0
  273. package/lib/module/repeat/expiry.js +37 -0
  274. package/lib/module/repeat/expiry.js.map +1 -0
  275. package/lib/module/repeat/index.js +67 -0
  276. package/lib/module/repeat/index.js.map +1 -0
  277. package/lib/module/repeat/marker.js +51 -0
  278. package/lib/module/repeat/marker.js.map +1 -0
  279. package/lib/module/repeat/place.js +79 -0
  280. package/lib/module/repeat/place.js.map +1 -0
  281. package/lib/module/schedule/anchor.js +234 -0
  282. package/lib/module/schedule/anchor.js.map +1 -0
  283. package/lib/module/schedule/index.js +137 -0
  284. package/lib/module/schedule/index.js.map +1 -0
  285. package/lib/module/schedule/partition.js +53 -0
  286. package/lib/module/schedule/partition.js.map +1 -0
  287. package/lib/module/schedule/resolve-moment.js +66 -0
  288. package/lib/module/schedule/resolve-moment.js.map +1 -0
  289. package/lib/module/schedule/validate-content.js +95 -0
  290. package/lib/module/schedule/validate-content.js.map +1 -0
  291. package/lib/module/schedule/validate-identifier.js +119 -0
  292. package/lib/module/schedule/validate-identifier.js.map +1 -0
  293. package/lib/module/schedule/writer.js +40 -0
  294. package/lib/module/schedule/writer.js.map +1 -0
  295. package/lib/module/state/caps.js +96 -0
  296. package/lib/module/state/caps.js.map +1 -0
  297. package/lib/module/state/dedup-ledger.js +34 -0
  298. package/lib/module/state/dedup-ledger.js.map +1 -0
  299. package/lib/module/state/interaction-buffer.js +92 -0
  300. package/lib/module/state/interaction-buffer.js.map +1 -0
  301. package/lib/module/state/mmkv-store.js +71 -0
  302. package/lib/module/state/mmkv-store.js.map +1 -0
  303. package/lib/module/state/permission-history.js +56 -0
  304. package/lib/module/state/permission-history.js.map +1 -0
  305. package/lib/module/state/record.js +264 -0
  306. package/lib/module/state/record.js.map +1 -0
  307. package/lib/module/state/reset.js +32 -0
  308. package/lib/module/state/reset.js.map +1 -0
  309. package/lib/module/state/series-ledger.js +62 -0
  310. package/lib/module/state/series-ledger.js.map +1 -0
  311. package/lib/module/state/store.js +35 -0
  312. package/lib/module/state/store.js.map +1 -0
  313. package/lib/module/testing/conformance/index.js +214 -0
  314. package/lib/module/testing/conformance/index.js.map +1 -0
  315. package/lib/module/testing/fake-engine.js +335 -0
  316. package/lib/module/testing/fake-engine.js.map +1 -0
  317. package/lib/module/testing/fake-provider.js +89 -0
  318. package/lib/module/testing/fake-provider.js.map +1 -0
  319. package/lib/module/testing/faults.js +55 -0
  320. package/lib/module/testing/faults.js.map +1 -0
  321. package/lib/module/testing/index.js +19 -0
  322. package/lib/module/testing/index.js.map +1 -0
  323. package/lib/module/testing/measure.js +294 -0
  324. package/lib/module/testing/measure.js.map +1 -0
  325. package/lib/typescript/commonjs/advanced.d.ts +36 -0
  326. package/lib/typescript/commonjs/advanced.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/channel/migrate.d.ts +38 -0
  328. package/lib/typescript/commonjs/channel/migrate.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/channel/tone-map.d.ts +34 -0
  330. package/lib/typescript/commonjs/channel/tone-map.d.ts.map +1 -0
  331. package/lib/typescript/commonjs/channel/validate-tone.d.ts +23 -0
  332. package/lib/typescript/commonjs/channel/validate-tone.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/contract/channel.d.ts +185 -0
  334. package/lib/typescript/commonjs/contract/channel.d.ts.map +1 -0
  335. package/lib/typescript/commonjs/contract/diagnostics.d.ts +92 -0
  336. package/lib/typescript/commonjs/contract/diagnostics.d.ts.map +1 -0
  337. package/lib/typescript/commonjs/contract/errors.d.ts +91 -0
  338. package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/contract/hash.d.ts +14 -0
  340. package/lib/typescript/commonjs/contract/hash.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/contract/index.d.ts +10 -0
  342. package/lib/typescript/commonjs/contract/index.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/contract/interaction.d.ts +53 -0
  344. package/lib/typescript/commonjs/contract/interaction.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/contract/notification.d.ts +110 -0
  346. package/lib/typescript/commonjs/contract/notification.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/contract/permission.d.ts +49 -0
  348. package/lib/typescript/commonjs/contract/permission.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/contract/reconcile.d.ts +82 -0
  350. package/lib/typescript/commonjs/contract/reconcile.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/contract/recurrence.d.ts +118 -0
  352. package/lib/typescript/commonjs/contract/recurrence.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/diagnostics/burst.d.ts +39 -0
  354. package/lib/typescript/commonjs/diagnostics/burst.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/diagnostics/events.d.ts +28 -0
  356. package/lib/typescript/commonjs/diagnostics/events.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/diagnostics/redact.d.ts +22 -0
  358. package/lib/typescript/commonjs/diagnostics/redact.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/diagnostics/snapshot.d.ts +40 -0
  360. package/lib/typescript/commonjs/diagnostics/snapshot.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/engine/adapter.d.ts +172 -0
  362. package/lib/typescript/commonjs/engine/adapter.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/engine/codec.d.ts +20 -0
  364. package/lib/typescript/commonjs/engine/codec.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/engine/notify-kit/events.d.ts +37 -0
  366. package/lib/typescript/commonjs/engine/notify-kit/events.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/engine/notify-kit/module.d.ts +103 -0
  368. package/lib/typescript/commonjs/engine/notify-kit/module.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/engine/notify-kit/platform/android.d.ts +3 -0
  370. package/lib/typescript/commonjs/engine/notify-kit/platform/android.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/engine/notify-kit/platform/index.d.ts +12 -0
  372. package/lib/typescript/commonjs/engine/notify-kit/platform/index.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/engine/notify-kit/platform/ios.d.ts +3 -0
  374. package/lib/typescript/commonjs/engine/notify-kit/platform/ios.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/engine/notify-kit/platform/types.d.ts +33 -0
  376. package/lib/typescript/commonjs/engine/notify-kit/platform/types.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/engine/notify-kit-engine.d.ts +25 -0
  378. package/lib/typescript/commonjs/engine/notify-kit-engine.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/index.d.ts +106 -0
  380. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/initialize.d.ts +74 -0
  382. package/lib/typescript/commonjs/initialize.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/interaction/index.d.ts +53 -0
  384. package/lib/typescript/commonjs/interaction/index.d.ts.map +1 -0
  385. package/lib/typescript/commonjs/maintenance/cycle.d.ts +77 -0
  386. package/lib/typescript/commonjs/maintenance/cycle.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/maintenance/permission-refresh.d.ts +19 -0
  388. package/lib/typescript/commonjs/maintenance/permission-refresh.d.ts.map +1 -0
  389. package/lib/typescript/commonjs/maintenance/reanchor.d.ts +26 -0
  390. package/lib/typescript/commonjs/maintenance/reanchor.d.ts.map +1 -0
  391. package/lib/typescript/commonjs/maintenance/toggle.d.ts +35 -0
  392. package/lib/typescript/commonjs/maintenance/toggle.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/maintenance/verify.d.ts +32 -0
  394. package/lib/typescript/commonjs/maintenance/verify.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/maintenance/window-refresh.d.ts +29 -0
  396. package/lib/typescript/commonjs/maintenance/window-refresh.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/notifications.d.ts +78 -0
  398. package/lib/typescript/commonjs/notifications.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/package.json +1 -0
  400. package/lib/typescript/commonjs/permission/index.d.ts +57 -0
  401. package/lib/typescript/commonjs/permission/index.d.ts.map +1 -0
  402. package/lib/typescript/commonjs/permission/state.d.ts +41 -0
  403. package/lib/typescript/commonjs/permission/state.d.ts.map +1 -0
  404. package/lib/typescript/commonjs/push/envelope.d.ts +33 -0
  405. package/lib/typescript/commonjs/push/envelope.d.ts.map +1 -0
  406. package/lib/typescript/commonjs/push/fcm-provider.d.ts +43 -0
  407. package/lib/typescript/commonjs/push/fcm-provider.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/push/gate.d.ts +57 -0
  409. package/lib/typescript/commonjs/push/gate.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/push/index.d.ts +19 -0
  411. package/lib/typescript/commonjs/push/index.d.ts.map +1 -0
  412. package/lib/typescript/commonjs/push/instructions.d.ts +45 -0
  413. package/lib/typescript/commonjs/push/instructions.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/push/provider-adapter.d.ts +50 -0
  415. package/lib/typescript/commonjs/push/provider-adapter.d.ts.map +1 -0
  416. package/lib/typescript/commonjs/push/signout.d.ts +33 -0
  417. package/lib/typescript/commonjs/push/signout.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/reconcile/chunk.d.ts +24 -0
  419. package/lib/typescript/commonjs/reconcile/chunk.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/reconcile/diff.d.ts +54 -0
  421. package/lib/typescript/commonjs/reconcile/diff.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/reconcile/duplicates.d.ts +32 -0
  423. package/lib/typescript/commonjs/reconcile/duplicates.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/reconcile/index.d.ts +35 -0
  425. package/lib/typescript/commonjs/reconcile/index.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/reconcile/truncate.d.ts +26 -0
  427. package/lib/typescript/commonjs/reconcile/truncate.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/recurrence/clock-guard.d.ts +37 -0
  429. package/lib/typescript/commonjs/recurrence/clock-guard.d.ts.map +1 -0
  430. package/lib/typescript/commonjs/recurrence/expand.d.ts +75 -0
  431. package/lib/typescript/commonjs/recurrence/expand.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/recurrence/index.d.ts +40 -0
  433. package/lib/typescript/commonjs/recurrence/index.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/repeat/expiry.d.ts +23 -0
  435. package/lib/typescript/commonjs/repeat/expiry.d.ts.map +1 -0
  436. package/lib/typescript/commonjs/repeat/index.d.ts +49 -0
  437. package/lib/typescript/commonjs/repeat/index.d.ts.map +1 -0
  438. package/lib/typescript/commonjs/repeat/marker.d.ts +36 -0
  439. package/lib/typescript/commonjs/repeat/marker.d.ts.map +1 -0
  440. package/lib/typescript/commonjs/repeat/place.d.ts +39 -0
  441. package/lib/typescript/commonjs/repeat/place.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/schedule/anchor.d.ts +118 -0
  443. package/lib/typescript/commonjs/schedule/anchor.d.ts.map +1 -0
  444. package/lib/typescript/commonjs/schedule/index.d.ts +40 -0
  445. package/lib/typescript/commonjs/schedule/index.d.ts.map +1 -0
  446. package/lib/typescript/commonjs/schedule/partition.d.ts +29 -0
  447. package/lib/typescript/commonjs/schedule/partition.d.ts.map +1 -0
  448. package/lib/typescript/commonjs/schedule/resolve-moment.d.ts +35 -0
  449. package/lib/typescript/commonjs/schedule/resolve-moment.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/schedule/validate-content.d.ts +42 -0
  451. package/lib/typescript/commonjs/schedule/validate-content.d.ts.map +1 -0
  452. package/lib/typescript/commonjs/schedule/validate-identifier.d.ts +30 -0
  453. package/lib/typescript/commonjs/schedule/validate-identifier.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/schedule/writer.d.ts +36 -0
  455. package/lib/typescript/commonjs/schedule/writer.d.ts.map +1 -0
  456. package/lib/typescript/commonjs/state/caps.d.ts +51 -0
  457. package/lib/typescript/commonjs/state/caps.d.ts.map +1 -0
  458. package/lib/typescript/commonjs/state/dedup-ledger.d.ts +21 -0
  459. package/lib/typescript/commonjs/state/dedup-ledger.d.ts.map +1 -0
  460. package/lib/typescript/commonjs/state/interaction-buffer.d.ts +30 -0
  461. package/lib/typescript/commonjs/state/interaction-buffer.d.ts.map +1 -0
  462. package/lib/typescript/commonjs/state/mmkv-store.d.ts +33 -0
  463. package/lib/typescript/commonjs/state/mmkv-store.d.ts.map +1 -0
  464. package/lib/typescript/commonjs/state/permission-history.d.ts +20 -0
  465. package/lib/typescript/commonjs/state/permission-history.d.ts.map +1 -0
  466. package/lib/typescript/commonjs/state/record.d.ts +134 -0
  467. package/lib/typescript/commonjs/state/record.d.ts.map +1 -0
  468. package/lib/typescript/commonjs/state/reset.d.ts +22 -0
  469. package/lib/typescript/commonjs/state/reset.d.ts.map +1 -0
  470. package/lib/typescript/commonjs/state/series-ledger.d.ts +47 -0
  471. package/lib/typescript/commonjs/state/series-ledger.d.ts.map +1 -0
  472. package/lib/typescript/commonjs/state/store.d.ts +20 -0
  473. package/lib/typescript/commonjs/state/store.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/testing/conformance/index.d.ts +32 -0
  475. package/lib/typescript/commonjs/testing/conformance/index.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/testing/fake-engine.d.ts +91 -0
  477. package/lib/typescript/commonjs/testing/fake-engine.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/testing/fake-provider.d.ts +35 -0
  479. package/lib/typescript/commonjs/testing/fake-provider.d.ts.map +1 -0
  480. package/lib/typescript/commonjs/testing/faults.d.ts +38 -0
  481. package/lib/typescript/commonjs/testing/faults.d.ts.map +1 -0
  482. package/lib/typescript/commonjs/testing/index.d.ts +22 -0
  483. package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/testing/measure.d.ts +59 -0
  485. package/lib/typescript/commonjs/testing/measure.d.ts.map +1 -0
  486. package/lib/typescript/module/advanced.d.ts +36 -0
  487. package/lib/typescript/module/advanced.d.ts.map +1 -0
  488. package/lib/typescript/module/channel/migrate.d.ts +38 -0
  489. package/lib/typescript/module/channel/migrate.d.ts.map +1 -0
  490. package/lib/typescript/module/channel/tone-map.d.ts +34 -0
  491. package/lib/typescript/module/channel/tone-map.d.ts.map +1 -0
  492. package/lib/typescript/module/channel/validate-tone.d.ts +23 -0
  493. package/lib/typescript/module/channel/validate-tone.d.ts.map +1 -0
  494. package/lib/typescript/module/contract/channel.d.ts +185 -0
  495. package/lib/typescript/module/contract/channel.d.ts.map +1 -0
  496. package/lib/typescript/module/contract/diagnostics.d.ts +92 -0
  497. package/lib/typescript/module/contract/diagnostics.d.ts.map +1 -0
  498. package/lib/typescript/module/contract/errors.d.ts +91 -0
  499. package/lib/typescript/module/contract/errors.d.ts.map +1 -0
  500. package/lib/typescript/module/contract/hash.d.ts +14 -0
  501. package/lib/typescript/module/contract/hash.d.ts.map +1 -0
  502. package/lib/typescript/module/contract/index.d.ts +10 -0
  503. package/lib/typescript/module/contract/index.d.ts.map +1 -0
  504. package/lib/typescript/module/contract/interaction.d.ts +53 -0
  505. package/lib/typescript/module/contract/interaction.d.ts.map +1 -0
  506. package/lib/typescript/module/contract/notification.d.ts +110 -0
  507. package/lib/typescript/module/contract/notification.d.ts.map +1 -0
  508. package/lib/typescript/module/contract/permission.d.ts +49 -0
  509. package/lib/typescript/module/contract/permission.d.ts.map +1 -0
  510. package/lib/typescript/module/contract/reconcile.d.ts +82 -0
  511. package/lib/typescript/module/contract/reconcile.d.ts.map +1 -0
  512. package/lib/typescript/module/contract/recurrence.d.ts +118 -0
  513. package/lib/typescript/module/contract/recurrence.d.ts.map +1 -0
  514. package/lib/typescript/module/diagnostics/burst.d.ts +39 -0
  515. package/lib/typescript/module/diagnostics/burst.d.ts.map +1 -0
  516. package/lib/typescript/module/diagnostics/events.d.ts +28 -0
  517. package/lib/typescript/module/diagnostics/events.d.ts.map +1 -0
  518. package/lib/typescript/module/diagnostics/redact.d.ts +22 -0
  519. package/lib/typescript/module/diagnostics/redact.d.ts.map +1 -0
  520. package/lib/typescript/module/diagnostics/snapshot.d.ts +40 -0
  521. package/lib/typescript/module/diagnostics/snapshot.d.ts.map +1 -0
  522. package/lib/typescript/module/engine/adapter.d.ts +172 -0
  523. package/lib/typescript/module/engine/adapter.d.ts.map +1 -0
  524. package/lib/typescript/module/engine/codec.d.ts +20 -0
  525. package/lib/typescript/module/engine/codec.d.ts.map +1 -0
  526. package/lib/typescript/module/engine/notify-kit/events.d.ts +37 -0
  527. package/lib/typescript/module/engine/notify-kit/events.d.ts.map +1 -0
  528. package/lib/typescript/module/engine/notify-kit/module.d.ts +103 -0
  529. package/lib/typescript/module/engine/notify-kit/module.d.ts.map +1 -0
  530. package/lib/typescript/module/engine/notify-kit/platform/android.d.ts +3 -0
  531. package/lib/typescript/module/engine/notify-kit/platform/android.d.ts.map +1 -0
  532. package/lib/typescript/module/engine/notify-kit/platform/index.d.ts +12 -0
  533. package/lib/typescript/module/engine/notify-kit/platform/index.d.ts.map +1 -0
  534. package/lib/typescript/module/engine/notify-kit/platform/ios.d.ts +3 -0
  535. package/lib/typescript/module/engine/notify-kit/platform/ios.d.ts.map +1 -0
  536. package/lib/typescript/module/engine/notify-kit/platform/types.d.ts +33 -0
  537. package/lib/typescript/module/engine/notify-kit/platform/types.d.ts.map +1 -0
  538. package/lib/typescript/module/engine/notify-kit-engine.d.ts +25 -0
  539. package/lib/typescript/module/engine/notify-kit-engine.d.ts.map +1 -0
  540. package/lib/typescript/module/index.d.ts +106 -0
  541. package/lib/typescript/module/index.d.ts.map +1 -0
  542. package/lib/typescript/module/initialize.d.ts +74 -0
  543. package/lib/typescript/module/initialize.d.ts.map +1 -0
  544. package/lib/typescript/module/interaction/index.d.ts +53 -0
  545. package/lib/typescript/module/interaction/index.d.ts.map +1 -0
  546. package/lib/typescript/module/maintenance/cycle.d.ts +77 -0
  547. package/lib/typescript/module/maintenance/cycle.d.ts.map +1 -0
  548. package/lib/typescript/module/maintenance/permission-refresh.d.ts +19 -0
  549. package/lib/typescript/module/maintenance/permission-refresh.d.ts.map +1 -0
  550. package/lib/typescript/module/maintenance/reanchor.d.ts +26 -0
  551. package/lib/typescript/module/maintenance/reanchor.d.ts.map +1 -0
  552. package/lib/typescript/module/maintenance/toggle.d.ts +35 -0
  553. package/lib/typescript/module/maintenance/toggle.d.ts.map +1 -0
  554. package/lib/typescript/module/maintenance/verify.d.ts +32 -0
  555. package/lib/typescript/module/maintenance/verify.d.ts.map +1 -0
  556. package/lib/typescript/module/maintenance/window-refresh.d.ts +29 -0
  557. package/lib/typescript/module/maintenance/window-refresh.d.ts.map +1 -0
  558. package/lib/typescript/module/notifications.d.ts +78 -0
  559. package/lib/typescript/module/notifications.d.ts.map +1 -0
  560. package/lib/typescript/module/package.json +1 -0
  561. package/lib/typescript/module/permission/index.d.ts +57 -0
  562. package/lib/typescript/module/permission/index.d.ts.map +1 -0
  563. package/lib/typescript/module/permission/state.d.ts +41 -0
  564. package/lib/typescript/module/permission/state.d.ts.map +1 -0
  565. package/lib/typescript/module/push/envelope.d.ts +33 -0
  566. package/lib/typescript/module/push/envelope.d.ts.map +1 -0
  567. package/lib/typescript/module/push/fcm-provider.d.ts +43 -0
  568. package/lib/typescript/module/push/fcm-provider.d.ts.map +1 -0
  569. package/lib/typescript/module/push/gate.d.ts +57 -0
  570. package/lib/typescript/module/push/gate.d.ts.map +1 -0
  571. package/lib/typescript/module/push/index.d.ts +19 -0
  572. package/lib/typescript/module/push/index.d.ts.map +1 -0
  573. package/lib/typescript/module/push/instructions.d.ts +45 -0
  574. package/lib/typescript/module/push/instructions.d.ts.map +1 -0
  575. package/lib/typescript/module/push/provider-adapter.d.ts +50 -0
  576. package/lib/typescript/module/push/provider-adapter.d.ts.map +1 -0
  577. package/lib/typescript/module/push/signout.d.ts +33 -0
  578. package/lib/typescript/module/push/signout.d.ts.map +1 -0
  579. package/lib/typescript/module/reconcile/chunk.d.ts +24 -0
  580. package/lib/typescript/module/reconcile/chunk.d.ts.map +1 -0
  581. package/lib/typescript/module/reconcile/diff.d.ts +54 -0
  582. package/lib/typescript/module/reconcile/diff.d.ts.map +1 -0
  583. package/lib/typescript/module/reconcile/duplicates.d.ts +32 -0
  584. package/lib/typescript/module/reconcile/duplicates.d.ts.map +1 -0
  585. package/lib/typescript/module/reconcile/index.d.ts +35 -0
  586. package/lib/typescript/module/reconcile/index.d.ts.map +1 -0
  587. package/lib/typescript/module/reconcile/truncate.d.ts +26 -0
  588. package/lib/typescript/module/reconcile/truncate.d.ts.map +1 -0
  589. package/lib/typescript/module/recurrence/clock-guard.d.ts +37 -0
  590. package/lib/typescript/module/recurrence/clock-guard.d.ts.map +1 -0
  591. package/lib/typescript/module/recurrence/expand.d.ts +75 -0
  592. package/lib/typescript/module/recurrence/expand.d.ts.map +1 -0
  593. package/lib/typescript/module/recurrence/index.d.ts +40 -0
  594. package/lib/typescript/module/recurrence/index.d.ts.map +1 -0
  595. package/lib/typescript/module/repeat/expiry.d.ts +23 -0
  596. package/lib/typescript/module/repeat/expiry.d.ts.map +1 -0
  597. package/lib/typescript/module/repeat/index.d.ts +49 -0
  598. package/lib/typescript/module/repeat/index.d.ts.map +1 -0
  599. package/lib/typescript/module/repeat/marker.d.ts +36 -0
  600. package/lib/typescript/module/repeat/marker.d.ts.map +1 -0
  601. package/lib/typescript/module/repeat/place.d.ts +39 -0
  602. package/lib/typescript/module/repeat/place.d.ts.map +1 -0
  603. package/lib/typescript/module/schedule/anchor.d.ts +118 -0
  604. package/lib/typescript/module/schedule/anchor.d.ts.map +1 -0
  605. package/lib/typescript/module/schedule/index.d.ts +40 -0
  606. package/lib/typescript/module/schedule/index.d.ts.map +1 -0
  607. package/lib/typescript/module/schedule/partition.d.ts +29 -0
  608. package/lib/typescript/module/schedule/partition.d.ts.map +1 -0
  609. package/lib/typescript/module/schedule/resolve-moment.d.ts +35 -0
  610. package/lib/typescript/module/schedule/resolve-moment.d.ts.map +1 -0
  611. package/lib/typescript/module/schedule/validate-content.d.ts +42 -0
  612. package/lib/typescript/module/schedule/validate-content.d.ts.map +1 -0
  613. package/lib/typescript/module/schedule/validate-identifier.d.ts +30 -0
  614. package/lib/typescript/module/schedule/validate-identifier.d.ts.map +1 -0
  615. package/lib/typescript/module/schedule/writer.d.ts +36 -0
  616. package/lib/typescript/module/schedule/writer.d.ts.map +1 -0
  617. package/lib/typescript/module/state/caps.d.ts +51 -0
  618. package/lib/typescript/module/state/caps.d.ts.map +1 -0
  619. package/lib/typescript/module/state/dedup-ledger.d.ts +21 -0
  620. package/lib/typescript/module/state/dedup-ledger.d.ts.map +1 -0
  621. package/lib/typescript/module/state/interaction-buffer.d.ts +30 -0
  622. package/lib/typescript/module/state/interaction-buffer.d.ts.map +1 -0
  623. package/lib/typescript/module/state/mmkv-store.d.ts +33 -0
  624. package/lib/typescript/module/state/mmkv-store.d.ts.map +1 -0
  625. package/lib/typescript/module/state/permission-history.d.ts +20 -0
  626. package/lib/typescript/module/state/permission-history.d.ts.map +1 -0
  627. package/lib/typescript/module/state/record.d.ts +134 -0
  628. package/lib/typescript/module/state/record.d.ts.map +1 -0
  629. package/lib/typescript/module/state/reset.d.ts +22 -0
  630. package/lib/typescript/module/state/reset.d.ts.map +1 -0
  631. package/lib/typescript/module/state/series-ledger.d.ts +47 -0
  632. package/lib/typescript/module/state/series-ledger.d.ts.map +1 -0
  633. package/lib/typescript/module/state/store.d.ts +20 -0
  634. package/lib/typescript/module/state/store.d.ts.map +1 -0
  635. package/lib/typescript/module/testing/conformance/index.d.ts +32 -0
  636. package/lib/typescript/module/testing/conformance/index.d.ts.map +1 -0
  637. package/lib/typescript/module/testing/fake-engine.d.ts +91 -0
  638. package/lib/typescript/module/testing/fake-engine.d.ts.map +1 -0
  639. package/lib/typescript/module/testing/fake-provider.d.ts +35 -0
  640. package/lib/typescript/module/testing/fake-provider.d.ts.map +1 -0
  641. package/lib/typescript/module/testing/faults.d.ts +38 -0
  642. package/lib/typescript/module/testing/faults.d.ts.map +1 -0
  643. package/lib/typescript/module/testing/index.d.ts +22 -0
  644. package/lib/typescript/module/testing/index.d.ts.map +1 -0
  645. package/lib/typescript/module/testing/measure.d.ts +59 -0
  646. package/lib/typescript/module/testing/measure.d.ts.map +1 -0
  647. package/package.json +72 -26
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Reconciliation types.
3
+ *
4
+ * A caller hands over the complete set its data currently implies; the package
5
+ * computes the minimal operation set that makes the device match. Running it
6
+ * twice with unchanged input performs zero platform operations — that
7
+ * idempotence is the package's central testable promise.
8
+ */
9
+ import type { NotificationRequest } from './notification.js';
10
+ export interface ReconcileInput {
11
+ /**
12
+ * Bounds what may be cancelled. Notifications outside this domain are never
13
+ * touched, including those scheduled by other parts of the app or by other
14
+ * libraries.
15
+ */
16
+ readonly domain: string;
17
+ readonly desired: readonly NotificationRequest[];
18
+ /**
19
+ * When false (the default), push-created notifications are left alone rather
20
+ * than cancelled for being absent from a locally-computed desired set.
21
+ */
22
+ readonly includePushCreated?: boolean;
23
+ }
24
+ /** Why a desired entry was refused rather than applied. */
25
+ export interface RejectedEntry {
26
+ readonly id: string;
27
+ readonly code: string;
28
+ readonly reason: string;
29
+ /** How many times this identifier appeared in the desired set. */
30
+ readonly occurrences: number;
31
+ /**
32
+ * True when a notification already scheduled under this identifier was left
33
+ * in place. Stated explicitly so a rejection is never misread as a
34
+ * cancellation.
35
+ */
36
+ readonly existingLeftInPlace: boolean;
37
+ }
38
+ /** What was dropped for exceeding the platform's pending ceiling. */
39
+ export interface TruncationReport {
40
+ readonly ceiling: number;
41
+ readonly droppedCount: number;
42
+ readonly droppedIds: readonly string[];
43
+ /**
44
+ * Dropped entries are not lost — they are re-evaluated at each window
45
+ * refresh as nearer entries deliver.
46
+ */
47
+ readonly reEvaluatedOnNextRefresh: true;
48
+ }
49
+ export interface ReconcileResult {
50
+ readonly domain: string;
51
+ readonly created: readonly string[];
52
+ readonly replaced: readonly string[];
53
+ readonly cancelled: readonly string[];
54
+ readonly unchanged: readonly string[];
55
+ readonly rejected: readonly RejectedEntry[];
56
+ readonly truncated?: TruncationReport;
57
+ /** Total platform operations issued. Zero on a no-change pass. */
58
+ readonly operationCount: number;
59
+ readonly durationMs: number;
60
+ }
61
+ /** A discrepancy between what the package expects and what the platform holds. */
62
+ export interface PendingDiscrepancy {
63
+ /** Expected from the series ledger or last reconciliation, but absent. */
64
+ readonly missing: readonly string[];
65
+ /** Present on the platform but not recognized by the package. */
66
+ readonly unrecognized: readonly string[];
67
+ readonly detectedAt: number;
68
+ }
69
+ /** Outcome of one automatic maintenance cycle. */
70
+ export interface MaintenanceResult {
71
+ readonly ranAt: number;
72
+ readonly windowRefreshed: boolean;
73
+ readonly occurrencesScheduled: number;
74
+ readonly reAnchored: number;
75
+ readonly timeZoneChanged: boolean;
76
+ readonly permissionChanged: boolean;
77
+ /** Detected and reported only — never repaired. */
78
+ readonly discrepancy?: PendingDiscrepancy;
79
+ readonly operationCount: number;
80
+ readonly durationMs: number;
81
+ }
82
+ //# sourceMappingURL=reconcile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../../src/contract/reconcile.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAA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cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAED,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B;AAED,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,mDAAmD;IACnD,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC5B"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Recurrence declaration types.
3
+ *
4
+ * A caller declares a rule once; the package expands it inside a finite
5
+ * lookahead window. No caller ever writes an expansion loop, and no unbounded
6
+ * series is ever handed to the platform.
7
+ */
8
+ import type { AnchoringMode, NotificationContent, Action, RoutingPayload } from './notification.js';
9
+ /** Days of the week, `0` = Sunday, matching `Date.prototype.getDay`. */
10
+ export type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
11
+ /** Every day at the declared clock time. */
12
+ export interface DailyPattern {
13
+ readonly kind: 'daily';
14
+ readonly hour: number;
15
+ readonly minute: number;
16
+ /** Fire every `interval` days. Defaults to 1. */
17
+ readonly interval?: number;
18
+ }
19
+ /** Selected weekdays at the declared clock time. */
20
+ export interface WeeklyPattern {
21
+ readonly kind: 'weekly';
22
+ readonly weekdays: readonly Weekday[];
23
+ readonly hour: number;
24
+ readonly minute: number;
25
+ /** Fire every `interval` weeks. Defaults to 1. */
26
+ readonly interval?: number;
27
+ }
28
+ /**
29
+ * A fixed day of the month at the declared clock time.
30
+ *
31
+ * Months shorter than `dayOfMonth` are skipped rather than clamped: a caller
32
+ * asking for the 31st means the 31st, and inventing the 28th would be the
33
+ * package deciding something it was not asked to decide.
34
+ */
35
+ export interface MonthlyByDayPattern {
36
+ readonly kind: 'monthlyByDay';
37
+ readonly dayOfMonth: number;
38
+ readonly hour: number;
39
+ readonly minute: number;
40
+ /** Fire every `interval` months. Defaults to 1. */
41
+ readonly interval?: number;
42
+ }
43
+ export type RecurrencePattern = DailyPattern | WeeklyPattern | MonthlyByDayPattern;
44
+ /** When a series stops producing occurrences. */
45
+ export type EndCondition = {
46
+ readonly kind: 'unbounded';
47
+ } | {
48
+ readonly kind: 'untilDate';
49
+ readonly until: number;
50
+ } | {
51
+ readonly kind: 'count';
52
+ readonly count: number;
53
+ };
54
+ /** Content shared by every occurrence of a series. Identity and moment are derived. */
55
+ export interface OccurrenceTemplate {
56
+ readonly content: NotificationContent;
57
+ readonly tone: string;
58
+ readonly routing?: RoutingPayload;
59
+ readonly actions?: readonly Action[];
60
+ readonly ownerTag?: string;
61
+ readonly groupTag?: string;
62
+ }
63
+ export interface RecurrenceRule {
64
+ /** Stable series identifier, subject to the same charset rules as a notification id. */
65
+ readonly id: string;
66
+ readonly pattern: RecurrencePattern;
67
+ /**
68
+ * Declared once for the whole series and inherited by every occurrence.
69
+ * A series may not mix modes. Defaults to `wallClock`.
70
+ */
71
+ readonly anchoring?: AnchoringMode;
72
+ /** The instant from which occurrences are generated. Defaults to now. */
73
+ readonly startAt?: number;
74
+ readonly end: EndCondition;
75
+ readonly template: OccurrenceTemplate;
76
+ }
77
+ /**
78
+ * How far ahead occurrences are registered with the platform.
79
+ *
80
+ * Bounded by both a duration and a count because either alone fails: a duration
81
+ * alone lets a frequent series exhaust the platform ceiling, and a count alone
82
+ * leaves an annual series scheduled a decade out.
83
+ */
84
+ export interface LookaheadConfig {
85
+ readonly days: number;
86
+ readonly occurrencesPerSeries: number;
87
+ }
88
+ export declare const DEFAULT_LOOKAHEAD: LookaheadConfig;
89
+ /** Bounds on consumer adjustment, because the platform ceiling is not negotiable. */
90
+ export declare const LOOKAHEAD_BOUNDS: {
91
+ readonly minDays: 1;
92
+ readonly maxDays: 365;
93
+ readonly minOccurrences: 1;
94
+ readonly maxOccurrences: 64;
95
+ };
96
+ export interface SeriesResult {
97
+ readonly seriesId: string;
98
+ /** Occurrences registered with the platform in this pass. */
99
+ readonly scheduled: number;
100
+ /** The horizon expansion reached, in epoch milliseconds. */
101
+ readonly expandedThrough: number;
102
+ /** True when the series has produced its final occurrence. */
103
+ readonly exhausted: boolean;
104
+ /**
105
+ * Upcoming occurrences of this series removed because the expansion no longer
106
+ * produces them — identifiers from before 0.4.0, or slots the rule dropped.
107
+ * Added in 0.4.0.
108
+ */
109
+ readonly cancelled?: readonly string[];
110
+ }
111
+ export interface SeriesSummary {
112
+ readonly seriesId: string;
113
+ readonly anchoring: AnchoringMode;
114
+ readonly expandedThrough: number;
115
+ readonly pendingOccurrences: number;
116
+ readonly exhausted: boolean;
117
+ }
118
+ //# sourceMappingURL=recurrence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recurrence.d.ts","sourceRoot":"","sources":["../../../../src/contract/recurrence.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,mBAAgB,CAAC;AAEjG,wEAAwE;AACxE,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEhD,4CAA4C;AAC5C,MAA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AW,aAAa;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC5B"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Burst detection.
3
+ *
4
+ * Both platforms apply undocumented delivery rate limits and will silently drop
5
+ * or delay past them — which is exactly the invisible failure this package
6
+ * exists to eliminate. So volume is watched and reported.
7
+ *
8
+ * It is **not** acted upon. Nothing is throttled, delayed, coalesced, or
9
+ * dropped: deciding which of a user's notifications to suppress is a product
10
+ * decision the package has no basis to make. Noticing that something abnormal
11
+ * is happening is one it can.
12
+ *
13
+ * Counters are in memory only. A burst is a live condition, and persisting it
14
+ * would expand the state contract for no diagnostic gain.
15
+ */
16
+ import type { BurstThreshold } from '../contract/diagnostics.js';
17
+ export interface BurstDetectorDependencies {
18
+ readonly threshold?: BurstThreshold;
19
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
20
+ }
21
+ export interface BurstStatus {
22
+ readonly ownerTag: string;
23
+ readonly lastMinute: number;
24
+ readonly lastHour: number;
25
+ readonly exceeded: boolean;
26
+ }
27
+ export declare function createBurstDetector(deps?: BurstDetectorDependencies): {
28
+ /**
29
+ * Records one presented notification and reports if the threshold is crossed.
30
+ *
31
+ * Always returns after recording — the caller delivers regardless of what
32
+ * this says.
33
+ */
34
+ record(now: number, ownerTag?: string): BurstStatus;
35
+ status(now: number, ownerTag?: string): BurstStatus;
36
+ reset(): void;
37
+ };
38
+ export type BurstDetector = ReturnType<typeof createBurstDetector>;
39
+ //# sourceMappingURL=burst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"burst.d.ts","sourceRoot":"","sources":["../../../../src/diagnostics/burst.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAAyB,CAAC;AAO9D,MAAM,WAAW,yBAAyB;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,IAAI,GAAE,yBAA8B;IAetE;;;;;OAKG;gBACS,MAAM,sBAAmB,WAAW;gBAyBpC,MAAM,sBAAmB,WAAW;aAYvC,IAAI;EAKd;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The structured event stream.
3
+ *
4
+ * With no sink attached the package emits nothing and buffers nothing. A
5
+ * library that writes to the console in production has decided something for
6
+ * its consumer; this one routes events wherever the app already sends its logs,
7
+ * or stays silent.
8
+ */
9
+ import type { DiagnosticSeverity, EventSink } from '../contract/diagnostics.js';
10
+ import type { DiagnosticCode } from '../contract/errors.js';
11
+ export interface EmitterOptions {
12
+ readonly sink?: EventSink;
13
+ readonly verbose?: boolean;
14
+ readonly now?: () => number;
15
+ }
16
+ export declare class DiagnosticEmitter {
17
+ private sink?;
18
+ private verbose;
19
+ private readonly now;
20
+ constructor(options?: EmitterOptions);
21
+ setSink(sink: EventSink | undefined): void;
22
+ setVerbose(verbose: boolean): void;
23
+ get hasSink(): boolean;
24
+ emit(code: DiagnosticCode, message: string, context?: Readonly<Record<string, unknown>>, severity?: DiagnosticSeverity): void;
25
+ /** Lifecycle transitions that are not failures: scheduled, delivered, reconciled. */
26
+ info(code: DiagnosticCode, message: string, context?: Readonly<Record<string, unknown>>): void;
27
+ }
28
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/diagnostics/events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAmB,kBAAkB,EAAE,SAAS,EAAE,MAAM,4BAAyB,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAoB,CAAC;AAIzD,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CAC5B;AAID,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAY;IACzB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;gBAEvB,OAAO,GAAE,cAAmB;IAMxC,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAI1C,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIlC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,CACH,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC3C,QAAQ,CAAC,EAAE,kBAAkB,GAC3B,IAAI;IAwBP,qFAAqF;IACrF,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI;CAG9F"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Content redaction for diagnostics.
3
+ *
4
+ * A notification library that logs notification bodies has turned a diagnostic
5
+ * aid into a privacy incident. Nothing content-bearing reaches an event unless
6
+ * verbose diagnostics is explicitly enabled — and that setting is documented as
7
+ * unsuitable for production.
8
+ *
9
+ * Values are replaced by their *shape* — a length, a type, a character position
10
+ * — which is what actually helps someone debug a validation failure anyway.
11
+ */
12
+ /**
13
+ * Strips content values from a diagnostic context.
14
+ *
15
+ * Recurses so a nested `{ request: { content: { body } } }` is caught — a
16
+ * top-level-only scrub is the kind of redaction that leaks the first time
17
+ * anyone nests a payload.
18
+ */
19
+ export declare function redactContext(context: Readonly<Record<string, unknown>> | undefined, verbose: boolean): Readonly<Record<string, unknown>> | undefined;
20
+ /** True when a key would be redacted. Exported so tests can assert the policy directly. */
21
+ export declare function isRedactedKey(key: string): boolean;
22
+ //# sourceMappingURL=redact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../../../src/diagnostics/redact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2BH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,EACtD,OAAO,EAAE,OAAO,GACd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAE/C;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAElD"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * The state snapshot.
3
+ *
4
+ * The readable answer to "why didn't it arrive?" — assembled in one place so
5
+ * that question can be answered without attaching a native debugger.
6
+ *
7
+ * The push token appears as **presence only**. Its value is never exposed here
8
+ * or anywhere else, because a snapshot is the thing most likely to be pasted
9
+ * into a bug report.
10
+ */
11
+ import type { StateSnapshot } from '../contract/diagnostics.js';
12
+ import type { PermissionReport, RestrictionReport } from '../contract/permission.js';
13
+ import type { MaintenanceResult, ReconcileResult } from '../contract/reconcile.js';
14
+ import type { NotificationEngineAdapter } from '../engine/adapter.js';
15
+ import type { StateManager } from '../state/record.js';
16
+ export interface SnapshotDependencies {
17
+ readonly engine: NotificationEngineAdapter;
18
+ readonly state: StateManager;
19
+ readonly now: () => number;
20
+ readonly permissions: () => Promise<PermissionReport>;
21
+ readonly restrictions: () => Promise<RestrictionReport>;
22
+ readonly appliedTones: () => readonly {
23
+ readonly toneId: string;
24
+ readonly appliedVersion: number;
25
+ }[];
26
+ readonly lastReconcile: () => ReconcileResult | undefined;
27
+ readonly lastMaintenance: () => MaintenanceResult | undefined;
28
+ /** Presence only — never the value. */
29
+ readonly hasPushToken: () => boolean;
30
+ /**
31
+ * Whether verbose diagnostics are on. Off (the default), pending entries carry
32
+ * the shape of their content and routing (`[string:12]`), not the values.
33
+ */
34
+ readonly verbose?: () => boolean;
35
+ }
36
+ export declare function createSnapshot(deps: SnapshotDependencies): {
37
+ capture(): Promise<StateSnapshot>;
38
+ };
39
+ export type Snapshot = ReturnType<typeof createSnapshot>;
40
+ //# sourceMappingURL=snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../../src/diagnostics/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAAwB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAsB,eAAe,EAAE,MAAM,0BAAuB,CAAC;AACpG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAiB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACtD,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,MAAM,SAAS;QACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;KAChC,EAAE,CAAC;IACJ,QAAQ,CAAC,aAAa,EAAE,MAAM,eAAe,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,eAAe,EAAE,MAAM,iBAAiB,GAAG,SAAS,CAAC;IAC9D,uCAAuC;IACvC,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;CACjC;AA0BD,wBAAgB,cAAc,CAAC,IAAI,EAAE,oBAAoB;eAEtC,OAAO,CAAC,aAAa,CAAC;EA8BxC;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * The port every local notification engine satisfies.
3
+ *
4
+ * No engine type appears in any signature here. That is what makes the engine
5
+ * replaceable — and it has already been exercised once, when the archived
6
+ * Notifee was swapped for its maintained fork with no consumer impact.
7
+ */
8
+ import type { PendingEntry, NotificationRequest } from '../contract/notification.js';
9
+ import type { PermissionKind, PermissionState, RestrictionReport } from '../contract/permission.js';
10
+ import type { ResolvedTone, ChannelGroup } from '../contract/channel.js';
11
+ import type { InteractionEvent, Unsubscribe } from '../contract/interaction.js';
12
+ /** A request whose anchoring has already been resolved to a firing instant. */
13
+ export interface EngineScheduleRequest {
14
+ readonly request: NotificationRequest;
15
+ /** The absolute instant the platform should fire, after anchoring resolution. */
16
+ readonly resolvedAt: number;
17
+ /** Resolved platform channel and category for the request's tone. */
18
+ readonly tone: ResolvedTone;
19
+ /**
20
+ * The IANA time zone this moment was anchored against.
21
+ *
22
+ * Carried explicitly because the adapter has to round-trip it through the
23
+ * platform data bag — `getPending` must report it (FR-010) so a consumer can
24
+ * detect the one case re-anchoring cannot fix (FR-007c). Absent for
25
+ * absolute-instant moments, which are never anchored to a zone at all.
26
+ */
27
+ readonly anchoringGeneration?: string;
28
+ /** True when exact-alarm capability is unavailable and approximate mode applies. */
29
+ readonly approximate: boolean;
30
+ readonly seriesId?: string;
31
+ readonly pushCreated?: boolean;
32
+ /**
33
+ * Marks this request as a package-owned stop marker rather than a consumer
34
+ * notification.
35
+ *
36
+ * Carried here rather than smuggled through `ownerTag` or `routing` so it can
37
+ * never collide with a value a consumer owns, and so the adapter can keep
38
+ * markers out of `getPending` without inspecting consumer data.
39
+ */
40
+ readonly repeatStop?: RepeatStop;
41
+ }
42
+ export interface EngineCapabilities {
43
+ /** iOS holds only the 64 soonest pending notifications and silently drops the rest. */
44
+ readonly pendingCeiling: number;
45
+ readonly supportsExactAlarms: boolean;
46
+ readonly supportsChannels: boolean;
47
+ readonly supportsTextInputActions: boolean;
48
+ readonly supportsDoNotDisturbBypass: boolean;
49
+ /**
50
+ * Whether a notification's alert sound can be made to repeat until handled.
51
+ *
52
+ * Decides two things: whether a refused repeat is reported to the caller, and
53
+ * whether a stop marker is placed at all. Where this is false no marker is
54
+ * created, so the platform's pending ceiling is untouched by the feature.
55
+ */
56
+ readonly supportsRepeatingAlert: boolean;
57
+ /** Milliseconds a background action or silent payload may run for. */
58
+ readonly backgroundWindowMs: number;
59
+ }
60
+ /**
61
+ * What applying a tone declaration actually did.
62
+ *
63
+ * A boolean cannot carry this: a caller has to tell a label correction from a
64
+ * newly created channel from a no-op, and reporting a refresh as a creation
65
+ * would make every apply look like a write.
66
+ */
67
+ export type ToneDeclarationOutcome = 'created' | 'labelsRefreshed' | 'unchanged';
68
+ /**
69
+ * A package-owned artifact scheduled to end a repeating alert.
70
+ *
71
+ * Never a consumer notification. It exists because no platform offers "stop the
72
+ * sound at time T but keep the notification", so something has to run at T.
73
+ */
74
+ export interface RepeatStop {
75
+ readonly markerId: string;
76
+ /** The consumer notification whose alert this stops. */
77
+ readonly targetId: string;
78
+ readonly dueAt: number;
79
+ }
80
+ /** A notification arriving, as opposed to a user acting on one. */
81
+ export interface DeliveryEvent {
82
+ readonly notificationId: string;
83
+ readonly occurredAt: number;
84
+ /** Present when this delivery is a package-owned stop marker rather than a real notification. */
85
+ readonly repeatStop?: RepeatStop;
86
+ }
87
+ export interface NotificationEngineAdapter {
88
+ readonly name: string;
89
+ getCapabilities(): Promise<EngineCapabilities>;
90
+ /** Scheduling an existing identifier replaces it; exactly one entry results. */
91
+ schedule(request: EngineScheduleRequest): Promise<void>;
92
+ cancel(id: string): Promise<void>;
93
+ cancelMany(ids: readonly string[]): Promise<void>;
94
+ cancelAll(): Promise<void>;
95
+ /** Full detail, so callers can diff rather than merely count. */
96
+ getPending(): Promise<readonly PendingEntry[]>;
97
+ /**
98
+ * The identifiers of pending entries, without their payloads (NOT-08).
99
+ * Optional: an engine without a cheap way to list them leaves it out and the
100
+ * package reads `getPending()` instead.
101
+ */
102
+ pendingIds?(): Promise<readonly string[]>;
103
+ /**
104
+ * Applies a channel or category declaration.
105
+ *
106
+ * Must return `labelsRefreshed` only when a label actually changed. Returning
107
+ * it unconditionally would turn every apply into a write and quietly break
108
+ * the zero-operation guarantee reconciliation idempotence rests on.
109
+ */
110
+ declareTone(tone: ResolvedTone): Promise<ToneDeclarationOutcome>;
111
+ /** Removes a retired channel. Returns true when one was actually removed. */
112
+ retireTone(channelId: string): Promise<boolean>;
113
+ declareGroups(groups: readonly ChannelGroup[]): Promise<void>;
114
+ /** Channel ids the platform currently holds, which re-declaration cannot reveal. */
115
+ listDeclaredChannels(): Promise<readonly string[]>;
116
+ /**
117
+ * Runs `work` with the declared channels read once and kept current as `work`
118
+ * declares and retires them (NOT-08). Optional; without it each declaration
119
+ * reads the channel list itself.
120
+ */
121
+ withChannelSnapshot?<T>(work: () => Promise<T>): Promise<T>;
122
+ getPermission(kind: PermissionKind): Promise<PermissionState>;
123
+ requestPermission(kind: PermissionKind): Promise<PermissionState>;
124
+ openSettings(kind: PermissionKind): Promise<void>;
125
+ getRestrictions(): Promise<RestrictionReport>;
126
+ /** Interactions arriving before a handler registers are the caller's problem to buffer, not the engine's. */
127
+ subscribeToInteractions(handler: (event: InteractionEvent) => void): Unsubscribe;
128
+ /** Any interaction that launched the app, consumed exactly once. */
129
+ takeInitialInteraction(): Promise<InteractionEvent | undefined>;
130
+ /**
131
+ * Stops a delivered notification's repeating alert without removing it.
132
+ *
133
+ * Re-posts the notification under the same identifier with the alert
134
+ * suppressed. The same identifier means the same tray slot, so it replaces in
135
+ * place: the sound stops and the notification stays. Cancelling instead would
136
+ * be worse than never alerting at all — the user comes home to a silent phone
137
+ * and no idea what they missed.
138
+ *
139
+ * Returns false when the notification is no longer displayed, which is the
140
+ * ordinary case once the user has handled it.
141
+ */
142
+ silenceDelivered(id: string): Promise<boolean>;
143
+ /** Package-owned stop markers currently scheduled. Never consumer notifications. */
144
+ listRepeatStops(): Promise<readonly RepeatStop[]>;
145
+ /**
146
+ * Deliveries, as distinct from interactions.
147
+ *
148
+ * `subscribeToInteractions` deliberately discards delivery events, because
149
+ * reporting an arrival as a tap would cancel a notification the user never
150
+ * touched. Repeat expiry needs exactly the events that filter throws away, so
151
+ * it gets its own subscription rather than loosening that one.
152
+ */
153
+ subscribeToDeliveries(handler: (event: DeliveryEvent) => void): Unsubscribe;
154
+ /**
155
+ * Registers the handler that runs when the app process is not alive.
156
+ *
157
+ * Must be called at module scope, outside the React tree, because that is
158
+ * where the engine registers its headless task. The package cannot do this on
159
+ * a consumer's behalf, which is why it is a documented setup step rather than
160
+ * an internal detail — and why its absence is reported rather than guessed at.
161
+ */
162
+ registerBackgroundDeliveryHandler(handler: (event: DeliveryEvent) => Promise<void>,
163
+ /**
164
+ * Taps, actions and dismissals that arrive while the app is not in front
165
+ * (0.6.0). The engine has one background handler per process, so interactions
166
+ * travel through this registration too; without it they were dropped.
167
+ */
168
+ onInteraction?: (event: InteractionEvent) => Promise<void>): void;
169
+ /** Whether a background delivery handler has been registered in this process. */
170
+ hasBackgroundDeliveryHandler(): boolean;
171
+ }
172
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/engine/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA0B,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,2BAAwB,CAAC;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,4BAAyB,CAAC;AAE7E,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,iFAAiF;IACjF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACtC,oFAAoF;IACpF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,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AAC;IAEhE;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE/C,oFAAoF;IACpF,eAAe,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;IAElD;;;;;;;OAOG;IACH,qBAAqB,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,GAAG,WAAW,CAAC;IAE5E;;;;;;;OAOG;IACH,iCAAiC,CAChC,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC;IAChD;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,GACxD,IAAI,CAAC;IAER,iFAAiF;IACjF,4BAA4B,IAAI,OAAO,CAAC;CACxC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The metadata codec for a notification's platform data bag.
3
+ *
4
+ * Anchoring, series origin, tags, routing and actions have no engine
5
+ * equivalent, and `getPending` must return them (FR-010) or a consumer cannot
6
+ * diff against intent. They travel as strings in the free-form data bag, which
7
+ * is the one field both platforms carry through unchanged.
8
+ *
9
+ * Shared by the real engine and the fake. When the fake stored requests
10
+ * verbatim it could not lose a field the real engine lost — `actions` never
11
+ * came back from a device, so every reconcile replaced every notification that
12
+ * had them, and the fake-backed tests never saw it.
13
+ */
14
+ import type { EngineScheduleRequest } from './adapter.js';
15
+ import type { PendingEntry } from '../contract/notification.js';
16
+ /** Everything `getPending` reports that only the data bag can carry. */
17
+ export type PackedMetadata = Pick<PendingEntry, 'anchoring' | 'anchoringGeneration' | 'tone' | 'routing' | 'actions' | 'ownerTag' | 'groupTag' | 'seriesId' | 'mayBeDelayed' | 'pushCreated'>;
18
+ export declare function packData(request: EngineScheduleRequest): Record<string, string>;
19
+ export declare function unpackData(data: Record<string, string>): PackedMetadata;
20
+ //# sourceMappingURL=codec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../../src/engine/codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAW,CAAC;AACvD,OAAO,KAAK,EAAyB,YAAY,EAAkB,MAAM,6BAA0B,CAAC;AAEpG,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,IAAI,CAChC,YAAY,EACV,WAAW,GACX,qBAAqB,GACrB,MAAM,GACN,SAAS,GACT,SAAS,GACT,UAAU,GACV,UAAU,GACV,UAAU,GACV,cAAc,GACd,aAAa,CACf,CAAC;AAEF,wBAAgB,QAAQ,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA8B/E;AAYD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,cAAc,CAcvE"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Reading what the engine hands back: pending entries, interactions, deliveries
3
+ * and authorization values, turned into the package's own shapes.
4
+ *
5
+ * Pure functions of the raw value and a clock, so they are testable without an
6
+ * engine and shared by the foreground, background and cold-start paths.
7
+ */
8
+ import type { PendingEntry } from '../../contract/notification.js';
9
+ import type { PermissionState } from '../../contract/permission.js';
10
+ import type { InteractionEvent } from '../../contract/interaction.js';
11
+ import type { DeliveryEvent, RepeatStop } from '../adapter.js';
12
+ type Raw = Record<string, unknown>;
13
+ /** Reads a stop marker back out of a pending entry's data bag, if it is one. */
14
+ export declare function unpackRepeatStop(id: string, data: Record<string, string>): RepeatStop | undefined;
15
+ export declare function unpackEntry(raw: Raw, now: () => number): PendingEntry | undefined;
16
+ /** Every stop marker among the engine's pending triggers. */
17
+ export declare function unpackRepeatStops(raw: readonly Raw[]): RepeatStop[];
18
+ /**
19
+ * An interaction, or undefined for anything that is not one.
20
+ *
21
+ * Only a dismissal or a press is an interaction. Everything else the engine
22
+ * emits on this channel — delivery, trigger creation, channel blocking — is not,
23
+ * and reporting it as one would cancel a notification the user never touched.
24
+ */
25
+ export declare function toInteraction(raw: Raw, now: () => number): InteractionEvent | undefined;
26
+ /** A delivery, or undefined for anything that is not one. */
27
+ export declare function toDelivery(raw: Raw, now: () => number): DeliveryEvent | undefined;
28
+ /**
29
+ * Maps engine authorization values onto our six-state model.
30
+ *
31
+ * `notAsked` and `denied` must stay distinguishable — being able to read state
32
+ * without prompting is worthless if the two collapse. `provisional` is its own
33
+ * state on both edges, never folded into granted or denied.
34
+ */
35
+ export declare function toPermissionState(raw: unknown): PermissionState;
36
+ export {};
37
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/engine/notify-kit/events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA4B,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAY,CAAC;AAS5D,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAMnC,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,GAAG,SAAS,CAMjG;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,GAAG,YAAY,GAAG,SAAS,CAgBjF;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,GAAG,EAAE,GAAG,UAAU,EAAE,CAUnE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,GAAG,gBAAgB,GAAG,SAAS,CA2CvF;AAED,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,MAAM,GAAG,aAAa,GAAG,SAAS,CAYjF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,CAc/D"}