@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,294 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * The PERF-001 measurement harness.
5
+ *
6
+ * Every budget in the specification, measured against the real code paths and
7
+ * reported as pass or fail with the number that produced the verdict. Written
8
+ * as a plain async function rather than a Jest suite so the same harness runs
9
+ * in continuous integration and from the demo app on a physical device — which
10
+ * matters, because PERF-003 forbids emulator numbers standing in as evidence.
11
+ *
12
+ * Five budgets are deliberately absent and reported as such: delivery accuracy,
13
+ * cold-start latency, startup delta and frame rate cannot be measured
14
+ * in-process. The first needs the OS to actually fire an alarm, the second a
15
+ * real process death. Pretending to measure them here would be worse than
16
+ * leaving the gap visible.
17
+ */
18
+
19
+ import { createScheduler } from "../schedule/index.js";
20
+ import { createReconciler } from "../reconcile/index.js";
21
+ import { createRecurrence } from "../recurrence/index.js";
22
+ import { createPermissions } from "../permission/index.js";
23
+ import { createReAnchorStep } from "../maintenance/reanchor.js";
24
+ import { MaintenanceRegistry } from "../maintenance/cycle.js";
25
+ import { StateManager } from "../state/record.js";
26
+ import { createMemoryStore } from "../state/store.js";
27
+ import { planReAnchor } from "../schedule/anchor.js";
28
+ import { recordSeen } from "../state/dedup-ledger.js";
29
+
30
+ /** Every budget PERF-001 states, in milliseconds unless the name says otherwise. */
31
+ export const PERF_BUDGETS = {
32
+ scheduleOne: 50,
33
+ readPending100: 200,
34
+ reconcileNoChange100: 150,
35
+ reconcile500With100Changes: 1_500,
36
+ maintenanceIdleCycle: 300,
37
+ windowRefresh32Series: 500,
38
+ reAnchor100: 1_000,
39
+ reAnchorNoChangeCheck: 20,
40
+ permissionRead: 50,
41
+ dedupCheck: 20,
42
+ interfaceThreadUnit: 16,
43
+ stateFootprintBytes: 1_048_576
44
+ };
45
+ const TONE = {
46
+ toneId: 'perf',
47
+ version: 1,
48
+ android: {
49
+ channelId: 'perf.v1',
50
+ importance: 'default',
51
+ vibration: false,
52
+ badge: false,
53
+ bypassDnd: false,
54
+ name: 'Fixture tone',
55
+ loopSound: false,
56
+ alarmCategory: false
57
+ },
58
+ ios: {
59
+ categoryId: 'perf',
60
+ interruptionLevel: 'active',
61
+ badge: false,
62
+ repeatRefused: false
63
+ }
64
+ };
65
+ export async function runMeasurementHarness(engine, options = {}) {
66
+ const clock = options.clock ?? (() => Date.now());
67
+ const prefix = options.prefix ?? 'perf';
68
+ const measurements = [];
69
+ const now = () => Date.now();
70
+ const zone = 'UTC';
71
+ const state = new StateManager({
72
+ store: createMemoryStore(),
73
+ now
74
+ });
75
+ const resolveTone = () => TONE;
76
+ const record = (name, label, measured, operationCount) => {
77
+ const budget = PERF_BUDGETS[name];
78
+ // A budget that also demands zero operations fails on either count.
79
+ const opsOk = operationCount === undefined || operationCount === 0;
80
+ measurements.push({
81
+ name,
82
+ label,
83
+ measured,
84
+ budget,
85
+ unit: name === 'stateFootprintBytes' ? 'bytes' : 'ms',
86
+ passed: measured <= budget && opsOk,
87
+ operationCount
88
+ });
89
+ };
90
+
91
+ /** Median of three, so one scheduler hiccup does not decide a verdict. */
92
+ const timeOf = async run => {
93
+ const samples = [];
94
+ for (let i = 0; i < 3; i += 1) {
95
+ const started = clock();
96
+ await run();
97
+ samples.push(clock() - started);
98
+ }
99
+ return samples.sort((a, b) => a - b)[1];
100
+ };
101
+ const request = (id, at) => ({
102
+ id: `${prefix}:${id}`,
103
+ content: {
104
+ title: id,
105
+ body: 'Measurement harness entry'
106
+ },
107
+ tone: 'perf',
108
+ moment: {
109
+ at
110
+ },
111
+ groupTag: prefix
112
+ });
113
+ const scheduler = createScheduler({
114
+ engine,
115
+ resolveTone,
116
+ timeZone: () => zone,
117
+ now,
118
+ canScheduleExactly: () => true
119
+ });
120
+ await engine.cancelAll();
121
+
122
+ // --- Scheduling -----------------------------------------------------------
123
+
124
+ record('scheduleOne', 'Single schedule operation', await timeOf(() => scheduler.schedule(request('single', now() + 3_600_000))));
125
+ for (let i = 0; i < 100; i += 1) {
126
+ await scheduler.schedule(request(`bulk:${i}`, now() + (i + 1) * 60_000));
127
+ }
128
+ record('readPending100', 'Read pending set of 100', await timeOf(() => scheduler.getPending()));
129
+
130
+ // --- Reconciliation -------------------------------------------------------
131
+
132
+ const reconciler = createReconciler({
133
+ engine,
134
+ resolveTone,
135
+ timeZone: () => zone,
136
+ now,
137
+ canScheduleExactly: () => true
138
+ });
139
+ const hundred = Array.from({
140
+ length: 100
141
+ }, (_, i) => request(`recon:${i}`, now() + (i + 1) * 60_000));
142
+ await reconciler.reconcile({
143
+ domain: prefix,
144
+ desired: hundred
145
+ });
146
+ let noChangeOps = 0;
147
+ const noChangeMs = await timeOf(async () => {
148
+ const result = await reconciler.reconcile({
149
+ domain: prefix,
150
+ desired: hundred
151
+ });
152
+ noChangeOps = result.operationCount;
153
+ });
154
+ record('reconcileNoChange100', 'No-change reconcile over 100', noChangeMs, noChangeOps);
155
+ const fiveHundred = Array.from({
156
+ length: 500
157
+ }, (_, i) => request(`recon:${i}`, now() + (i + 1) * 60_000));
158
+ await reconciler.reconcile({
159
+ domain: prefix,
160
+ desired: fiveHundred
161
+ });
162
+ const changed = fiveHundred.map((entry, i) => i < 100 ? {
163
+ ...entry,
164
+ content: {
165
+ title: `changed-${i}`,
166
+ body: entry.content.body
167
+ }
168
+ } : entry);
169
+ record('reconcile500With100Changes', '500-entry reconcile with 100 changes', await timeOf(() => reconciler.reconcile({
170
+ domain: prefix,
171
+ desired: changed
172
+ })));
173
+
174
+ // --- Re-anchoring ---------------------------------------------------------
175
+
176
+ const pending = await engine.getPending();
177
+ record('reAnchorNoChangeCheck', 'Re-anchor check with no zone change', await timeOf(async () => planReAnchor(pending, zone)), planReAnchor(pending, zone).rewrites.length);
178
+ const context = {
179
+ trigger: 'foreground',
180
+ now: now(),
181
+ ownedIds: new Set()
182
+ };
183
+ const travelled = createReAnchorStep({
184
+ engine,
185
+ timeZone: () => 'Asia/Tokyo',
186
+ resolveTone,
187
+ canScheduleExactly: () => true
188
+ });
189
+ record('reAnchor100', 'Re-anchor after a zone change', await timeOf(() => travelled.run(context)));
190
+
191
+ // --- Maintenance ----------------------------------------------------------
192
+
193
+ const registry = new MaintenanceRegistry();
194
+ registry.register(createReAnchorStep({
195
+ engine,
196
+ timeZone: () => zone,
197
+ resolveTone,
198
+ canScheduleExactly: () => true
199
+ }));
200
+ let idleOps = 0;
201
+ const idleMs = await timeOf(async () => {
202
+ const result = await registry.run({
203
+ ...context,
204
+ now: now()
205
+ });
206
+ idleOps = result.operationCount;
207
+ });
208
+ record('maintenanceIdleCycle', 'Idle maintenance cycle', idleMs, idleOps);
209
+
210
+ // --- Recurrence -----------------------------------------------------------
211
+
212
+ const recurrence = createRecurrence({
213
+ engine,
214
+ state,
215
+ resolveTone,
216
+ timeZone: () => zone,
217
+ now,
218
+ lookahead: {
219
+ days: 60,
220
+ occurrencesPerSeries: 32
221
+ },
222
+ canScheduleExactly: () => true
223
+ });
224
+ const series = Array.from({
225
+ length: 32
226
+ }, (_, i) => ({
227
+ id: `${prefix}:series:${i}`,
228
+ pattern: {
229
+ kind: 'daily',
230
+ hour: i % 24,
231
+ minute: 0
232
+ },
233
+ end: {
234
+ kind: 'count',
235
+ count: 2
236
+ },
237
+ template: {
238
+ content: {
239
+ title: `Series ${i}`,
240
+ body: 'Measurement harness series'
241
+ },
242
+ tone: 'perf',
243
+ groupTag: prefix
244
+ }
245
+ }));
246
+ for (const rule of series) {
247
+ await recurrence.registerSeries(rule);
248
+ }
249
+ record('windowRefresh32Series', 'Window refresh across 32 series', await timeOf(async () => {
250
+ for (const rule of series) {
251
+ await recurrence.refreshSeries(rule);
252
+ }
253
+ }));
254
+
255
+ // --- Permissions ----------------------------------------------------------
256
+
257
+ const permissions = createPermissions({
258
+ engine,
259
+ state,
260
+ platform: {
261
+ os: 'android',
262
+ apiLevel: 34
263
+ },
264
+ now
265
+ });
266
+ record('permissionRead', 'Read all permission states', await timeOf(() => permissions.getPermissions()));
267
+
268
+ // --- Deduplication and footprint -----------------------------------------
269
+
270
+ for (let i = 0; i < 400; i += 1) {
271
+ recordSeen(state, `${prefix}:dedup:${i}`, now());
272
+ }
273
+ record('dedupCheck', 'Deduplication ledger check', await timeOf(async () => recordSeen(state, `${prefix}:dedup:probe`, now())));
274
+ record('stateFootprintBytes', 'Persisted state on disk at caps', state.health().approximateBytes);
275
+
276
+ // The interface-thread ceiling is a property of one chunked unit of work, not
277
+ // of a whole pass, so it is measured per entry rather than per reconcile.
278
+ const chunkMs = await timeOf(() => reconciler.reconcile({
279
+ domain: prefix,
280
+ desired: hundred.slice(0, 25)
281
+ }));
282
+ record('interfaceThreadUnit', 'Single chunked unit of reconcile work', chunkMs / 25);
283
+ await engine.cancelAll();
284
+ const passed = measurements.filter(measurement => measurement.passed).length;
285
+ return {
286
+ measurements,
287
+ passed,
288
+ failed: measurements.length - passed,
289
+ // Stated rather than silently omitted — these need real hardware.
290
+ requiresDevice: ['Delivery accuracy, exact mode (60 s) — needs the OS to fire a real alarm', 'Delivery accuracy, approximate mode (15 min) — needs a device under no vendor restriction', 'Cold-start tap to handler (500 ms) — needs a real process death and relaunch', 'App startup delta (100 ms) — needs a real cold start', 'Sustained frame rate during reconcile (55 fps) — needs a rendering device'],
291
+ ranAt: now()
292
+ };
293
+ }
294
+ //# sourceMappingURL=measure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createScheduler","createReconciler","createRecurrence","createPermissions","createReAnchorStep","MaintenanceRegistry","StateManager","createMemoryStore","planReAnchor","recordSeen","PERF_BUDGETS","scheduleOne","readPending100","reconcileNoChange100","reconcile500With100Changes","maintenanceIdleCycle","windowRefresh32Series","reAnchor100","reAnchorNoChangeCheck","permissionRead","dedupCheck","interfaceThreadUnit","stateFootprintBytes","TONE","toneId","version","android","channelId","importance","vibration","badge","bypassDnd","name","loopSound","alarmCategory","ios","categoryId","interruptionLevel","repeatRefused","runMeasurementHarness","engine","options","clock","Date","now","prefix","measurements","zone","state","store","resolveTone","record","label","measured","operationCount","budget","opsOk","undefined","push","unit","passed","timeOf","run","samples","i","started","sort","a","b","request","id","at","content","title","body","tone","moment","groupTag","scheduler","timeZone","canScheduleExactly","cancelAll","schedule","getPending","reconciler","hundred","Array","from","length","_","reconcile","domain","desired","noChangeOps","noChangeMs","result","fiveHundred","changed","map","entry","pending","rewrites","context","trigger","ownedIds","Set","travelled","registry","register","idleOps","idleMs","recurrence","lookahead","days","occurrencesPerSeries","series","pattern","kind","hour","minute","end","count","template","rule","registerSeries","refreshSeries","permissions","platform","os","apiLevel","getPermissions","health","approximateBytes","chunkMs","slice","filter","measurement","failed","requiresDevice","ranAt"],"sourceRoot":"../../../src","sources":["testing/measure.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,SAASA,eAAe,QAAQ,sBAAa;AAC7C,SAASC,gBAAgB,QAAQ,uBAAc;AAC/C,SAASC,gBAAgB,QAAQ,wBAAe;AAChD,SAASC,iBAAiB,QAAQ,wBAAe;AACjD,SAASC,kBAAkB,QAAQ,4BA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,uCAAuC,EAAEkF,OAAO,GAAG,EAAE,CAAC;EAEpF,MAAM7F,MAAM,CAACyC,SAAS,CAAC,CAAC;EAExB,MAAMrB,MAAM,GAAGd,YAAY,CAACyF,MAAM,CAACC,WAAW,IAAIA,WAAW,CAAC5E,MAAM,CAAC,CAAC4B,MAAM;EAE5E,OAAO;IACN1C,YAAY;IACZc,MAAM;IACN6E,MAAM,EAAE3F,YAAY,CAAC0C,MAAM,GAAG5B,MAAM;IACpC;IACA8E,cAAc,EAAE,CACf,0EAA0E,EAC1E,2FAA2F,EAC3F,8EAA8E,EAC9E,sDAAsD,EACtD,2EAA2E,CAC3E;IACDC,KAAK,EAAE/F,GAAG,CAAC;EACZ,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * `@chipmobilesdk/rn-notification/advanced`: the individual factories, for an app
3
+ * that wires the package itself instead of using `createNotifications` (NOT-07).
4
+ *
5
+ * The package root still exports them too, for compatibility; new code that needs
6
+ * them should import from here, where they are documented as the advanced path.
7
+ */
8
+ export { initialize } from './initialize';
9
+ export type { NotificationRuntime, RuntimeDependencies } from './initialize';
10
+ export { createScheduler } from './schedule';
11
+ export type { Scheduler, ScheduleDependencies } from './schedule';
12
+ export { createReconciler } from './reconcile';
13
+ export type { Reconciler, ReconcileDependencies } from './reconcile';
14
+ export { createRecurrence } from './recurrence';
15
+ export type { Recurrence, RecurrenceDependencies } from './recurrence';
16
+ export { createChannels } from './channel/migrate';
17
+ export type { ChannelDependencies, Channels } from './channel/migrate';
18
+ export { createToneResolver } from './channel/tone-map';
19
+ export { createInteractions } from './interaction';
20
+ export type { InteractionDependencies, Interactions } from './interaction';
21
+ export { createSnapshot } from './diagnostics/snapshot';
22
+ export type { Snapshot, SnapshotDependencies } from './diagnostics/snapshot';
23
+ export { createBurstDetector } from './diagnostics/burst';
24
+ export { createPermissions } from './permission';
25
+ export type { PermissionDependencies, Permissions } from './permission';
26
+ export { createPermissionRefreshStep } from './maintenance/permission-refresh';
27
+ export { createReAnchorStep } from './maintenance/reanchor';
28
+ export { createVerifyStep } from './maintenance/verify';
29
+ export { createWindowRefreshStep } from './maintenance/window-refresh';
30
+ export { MaintenanceController } from './maintenance/toggle';
31
+ export { MaintenanceRegistry } from './maintenance/cycle';
32
+ export type { MaintenanceContext, MaintenanceStep, MaintenanceTrigger } from './maintenance/cycle';
33
+ export { StateManager } from './state/record';
34
+ export { createMmkvStore } from './state/mmkv-store';
35
+ export { createPlatformTimeZoneReader } from './schedule/anchor';
36
+ //# sourceMappingURL=advanced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced.d.ts","sourceRoot":"","sources":["../../../src/advanced.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,YAAY,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Channel declaration and migration.
3
+ *
4
+ * Android channels are immutable once created: declaring a channel whose id
5
+ * already exists silently keeps the original configuration. That single fact is
6
+ * why changing a tone is a **migration** rather than an assignment, and why
7
+ * this package keeps its own ledger — the platform will not tell you which
8
+ * version of a channel a device already holds.
9
+ *
10
+ * Migration creates the new channel, re-homes notifications still pointing at
11
+ * the old one, and only then retires it. That order matters: retiring first
12
+ * would leave live notifications attached to a channel that no longer exists.
13
+ */
14
+ import type { ChannelApplyResult, ChannelGroup, ToneDeclaration } from '../contract/channel';
15
+ import type { NotificationEngineAdapter } from '../engine/adapter';
16
+ import type { StateManager } from '../state/record';
17
+ export interface ChannelDependencies {
18
+ readonly engine: NotificationEngineAdapter;
19
+ readonly state: StateManager;
20
+ readonly now: () => number;
21
+ readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
22
+ }
23
+ export declare function createChannels(deps: ChannelDependencies): {
24
+ /**
25
+ * Applies a tone configuration, migrating any tone whose version moved.
26
+ *
27
+ * Applying an unchanged configuration performs no work at all: no channel
28
+ * is recreated and no migration is triggered.
29
+ */
30
+ apply(tones: readonly ToneDeclaration[], groups?: readonly ChannelGroup[]): Promise<ChannelApplyResult>;
31
+ /** Which version of each tone this device actually holds. */
32
+ appliedVersions(): readonly {
33
+ readonly toneId: string;
34
+ readonly appliedVersion: number;
35
+ }[];
36
+ };
37
+ export type Channels = ReturnType<typeof createChannels>;
38
+ //# sourceMappingURL=migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../../src/channel/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,iBAAiB,CAAC;AAMpE,MAAM,WAAW,mBAAmB;IACnC,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;AA2CD,wBAAgB,cAAc,CAAC,IAAI,EAAE,mBAAmB;IA4LtD;;;;;OAKG;iBAEK,SAAS,eAAe,EAAE,WACzB,SAAS,YAAY,EAAE,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAO9B,6DAA6D;uBAC1C,SAAS;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;KAAE,EAAE;EAO3F;AAoBD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Tone-to-platform mapping.
3
+ *
4
+ * A tone is declared once and realized on each platform here, so consumer code
5
+ * contains zero platform branches. The two platforms model urgency differently
6
+ * — Android by channel importance, iOS by interruption level — and reconciling
7
+ * that difference is exactly the work this package exists to absorb.
8
+ *
9
+ * The channel id carries the tone version. Android channels are immutable once
10
+ * created and re-declaration is silently ignored, so a configuration change has
11
+ * to produce a *new* channel or it will never reach a device that already holds
12
+ * the old one.
13
+ */
14
+ import type { ResolvedTone, ToneDeclaration } from '../contract/channel';
15
+ /** Channel id for a tone at a given version. Stable, derived, never random. */
16
+ export declare function channelIdFor(toneId: string, version: number): string;
17
+ /** Extracts the tone and version encoded in a channel id, if it is one of ours. */
18
+ export declare function parseChannelId(channelId: string): {
19
+ readonly toneId: string;
20
+ readonly version: number;
21
+ } | undefined;
22
+ export declare function resolveTone(tone: ToneDeclaration): ResolvedTone;
23
+ /**
24
+ * A stable fingerprint of a tone's user-visible labels.
25
+ *
26
+ * Lets an unchanged configuration skip the platform entirely, which is what
27
+ * keeps "re-applying changes nothing" literally true rather than merely
28
+ * approximately true. A hash rather than the labels themselves, so persisted
29
+ * state continues to hold no consumer-supplied text.
30
+ */
31
+ export declare function toneLabelFingerprint(tone: ToneDeclaration): string;
32
+ /** Builds a lookup over a declared configuration. */
33
+ export declare function createToneResolver(tones: readonly ToneDeclaration[]): (toneId: string) => ResolvedTone | undefined;
34
+ //# sourceMappingURL=tone-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tone-map.d.ts","sourceRoot":"","sources":["../../../../src/channel/tone-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AA0BtF,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAC7B,SAAS,EAAE,MAAM,GACf;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAQnE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,CAsC/D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAOlE;AAED,qDAAqD;AACrD,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,SAAS,eAAe,EAAE,GAC/B,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAG9C"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Tone declaration validation.
3
+ *
4
+ * Runs before the first engine call, like every other validation in this
5
+ * package: a rejected declaration must leave the device exactly as it was.
6
+ *
7
+ * Only the new alert attributes are checked here. The rest of a tone has always
8
+ * been validated by the platform's own charset and shape rules, and duplicating
9
+ * those would create two sources of truth for the same constraint.
10
+ */
11
+ import type { ToneDeclaration } from '../contract/channel';
12
+ /**
13
+ * Throws when a tone's repeating alert is unusable.
14
+ *
15
+ * The type already forbids a repeat without a duration. What it cannot forbid
16
+ * is a duration of zero, a fractional millisecond, or an hour and a half — and
17
+ * an alert that repeats for an unchecked span is the failure this whole feature
18
+ * exists to prevent.
19
+ */
20
+ export declare function validateToneDeclaration(tone: ToneDeclaration): void;
21
+ /** Validates a whole configuration before any of it is applied. */
22
+ export declare function validateToneDeclarations(tones: readonly ToneDeclaration[]): void;
23
+ //# sourceMappingURL=validate-tone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-tone.d.ts","sourceRoot":"","sources":["../../../../src/channel/validate-tone.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CA8BnE;AAED,mEAAmE;AACnE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,GAAG,IAAI,CAIhF"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Channel, category, and tone declaration types.
3
+ *
4
+ * A tone is declared once and mapped by the package to each platform's
5
+ * equivalent concepts, so consumer code contains no platform branches.
6
+ *
7
+ * Two tones must never be merged into one: channel configuration belongs to
8
+ * the user, and collapsing two tones collapses two independent user choices.
9
+ */
10
+ /** How insistently a notification asks for attention. */
11
+ export type ToneUrgency = 'min' | 'low' | 'default' | 'high' | 'max';
12
+ export interface ToneSound {
13
+ /** Consumer-supplied resource name, resolved by the platform. */
14
+ readonly name?: string;
15
+ /** When false, the tone is silent. Defaults to true. */
16
+ readonly enabled?: boolean;
17
+ }
18
+ /**
19
+ * A repeating alert and the bound on how long it may repeat.
20
+ *
21
+ * The two are one object rather than two fields because an unbounded repeating
22
+ * alert must be *unrepresentable*, not merely discouraged. A boolean `repeat`
23
+ * beside an optional duration would make the dangerous state the easiest one to
24
+ * write, and the dangerous state here is a phone that keeps sounding until its
25
+ * owner comes home to it.
26
+ */
27
+ export interface ToneRepeatAlert {
28
+ /**
29
+ * How long the alert may keep repeating, measured from delivery.
30
+ *
31
+ * Required. Bounded by REPEAT_ALERT_BOUNDS, which is enforced at declaration
32
+ * time — a type can forbid an absent duration but not a zero one.
33
+ */
34
+ readonly forMs: number;
35
+ }
36
+ /**
37
+ * The declarable range for a repeating alert.
38
+ *
39
+ * The floor exists because a repeat shorter than a minute is indistinguishable
40
+ * from a single chime and buys nothing for the complexity it costs. The ceiling
41
+ * exists because an hour is already past the point where a person who has not
42
+ * responded is going to.
43
+ */
44
+ export declare const REPEAT_ALERT_BOUNDS: {
45
+ readonly minMs: 60000;
46
+ readonly maxMs: 3600000;
47
+ };
48
+ export interface ToneDeclaration {
49
+ /** Stable tone identifier, subject to the same charset rules as a notification id. */
50
+ readonly id: string;
51
+ /** Human-readable name shown in system settings. */
52
+ readonly name: string;
53
+ readonly description?: string;
54
+ readonly urgency: ToneUrgency;
55
+ readonly sound?: ToneSound;
56
+ readonly vibration?: boolean;
57
+ readonly badge?: boolean;
58
+ /** Optional grouping in system settings. */
59
+ readonly groupId?: string;
60
+ /**
61
+ * Request the platform's Do Not Disturb bypass. Honoured where the platform
62
+ * permits it and reported honestly where it does not. This is *not* an
63
+ * override of the device's silent mode, which is out of scope.
64
+ */
65
+ readonly bypassDoNotDisturb?: boolean;
66
+ /**
67
+ * Present when the alert sound should repeat until the user handles the
68
+ * notification, rather than sounding once.
69
+ *
70
+ * Realized per notification rather than as channel configuration, so adding
71
+ * or changing it never obliges a consumer to bump `version`. Honoured where
72
+ * the platform permits it and reported through `repeatUnavailable` where it
73
+ * does not.
74
+ */
75
+ readonly repeatAlert?: ToneRepeatAlert;
76
+ /**
77
+ * Ask the platform to treat notifications on this tone as time-sensitive
78
+ * alerts. Like `repeatAlert`, realized per notification, so it needs no
79
+ * version bump.
80
+ */
81
+ readonly timeSensitive?: boolean;
82
+ /**
83
+ * Incremented by the consumer when a field the platform freezes changes:
84
+ * `urgency`, `sound`, `vibration`, `badge`, `groupId`, or
85
+ * `bypassDoNotDisturb`.
86
+ *
87
+ * Android freezes those once a channel exists, so changing one is a
88
+ * migration rather than an assignment, and this version is what makes the
89
+ * migration detectable.
90
+ *
91
+ * `name`, `description`, `repeatAlert`, and `timeSensitive` are deliberately
92
+ * *not* on that list. Android updates a channel's labels in place, and the
93
+ * two alert attributes are realized per notification — so none of them needs
94
+ * a bump. This matters: a bump means a new channel, and a new channel means
95
+ * the user loses every setting they adjusted. Nobody should have to pay that
96
+ * to correct a typo.
97
+ */
98
+ readonly version: number;
99
+ }
100
+ export interface ChannelGroup {
101
+ readonly id: string;
102
+ readonly name: string;
103
+ readonly description?: string;
104
+ }
105
+ /** What a tone resolves to on each platform. Internal to the engine adapter. */
106
+ export interface ResolvedTone {
107
+ readonly toneId: string;
108
+ readonly version: number;
109
+ readonly android: {
110
+ /** Platform channel id, derived from tone id and version so a change creates a new channel. */
111
+ readonly channelId: string;
112
+ /**
113
+ * The channel's user-visible name.
114
+ *
115
+ * Required rather than optional on purpose. Its absence is what let the
116
+ * adapter fall back to the tone id, so users read a technical identifier
117
+ * on the one screen these strings exist to serve. A type that permits no
118
+ * name permits that bug back.
119
+ */
120
+ readonly name: string;
121
+ /** The channel's user-visible description. */
122
+ readonly description?: string;
123
+ readonly importance: 'none' | 'min' | 'low' | 'default' | 'high';
124
+ readonly sound?: string;
125
+ readonly vibration: boolean;
126
+ readonly badge: boolean;
127
+ readonly bypassDnd: boolean;
128
+ readonly groupId?: string;
129
+ /** Repeat the alert sound until handled. Per notification, not channel configuration. */
130
+ readonly loopSound: boolean;
131
+ /** Mark the notification as an alarm-category alert. Per notification. */
132
+ readonly alarmCategory: boolean;
133
+ /** How long repetition may continue, so the adapter knows when to place the stop marker. */
134
+ readonly repeatForMs?: number;
135
+ };
136
+ readonly ios: {
137
+ readonly categoryId: string;
138
+ readonly interruptionLevel: 'passive' | 'active' | 'timeSensitive' | 'critical';
139
+ readonly sound?: string;
140
+ readonly badge: boolean;
141
+ /**
142
+ * True when a repeating alert was declared and iOS will not honour it.
143
+ *
144
+ * iOS has no looping-sound API, and the one level that overrides the mute
145
+ * switch is entitlement-gated and does not loop either. Recording the
146
+ * refusal as data rather than as a comment is what lets `apply()` report
147
+ * it instead of dropping it silently.
148
+ */
149
+ readonly repeatRefused: boolean;
150
+ };
151
+ }
152
+ /**
153
+ * Outcome of applying a channel configuration, including any migration performed.
154
+ *
155
+ * A tone appears in exactly one of `created`, `migrated`, `labelsRefreshed`, and
156
+ * `unchanged`. The `*Unavailable` arrays are orthogonal and may accompany any of
157
+ * them: a platform refusing an attribute says nothing about whether the tone was
158
+ * newly created.
159
+ */
160
+ export interface ChannelApplyResult {
161
+ readonly created: readonly string[];
162
+ readonly migrated: readonly {
163
+ readonly toneId: string;
164
+ readonly from: number;
165
+ readonly to: number;
166
+ }[];
167
+ /**
168
+ * Tones whose name or description was updated in place on a channel that
169
+ * already existed. No channel was recreated and no user setting was reset —
170
+ * the platform itself refuses to overwrite the rest of the configuration,
171
+ * which is what makes a label correction free.
172
+ */
173
+ readonly labelsRefreshed: readonly string[];
174
+ readonly retired: readonly string[];
175
+ /** Notifications moved to the new channel during migration. */
176
+ readonly reHomed: readonly string[];
177
+ /** Notifications cancelled because they could not be re-homed. */
178
+ readonly cancelled: readonly string[];
179
+ /** Tones whose requested DND bypass the platform refused. */
180
+ readonly bypassUnavailable: readonly string[];
181
+ /** Tones whose requested repeating alert the platform refused. */
182
+ readonly repeatUnavailable: readonly string[];
183
+ readonly unchanged: readonly string[];
184
+ }
185
+ //# sourceMappingURL=channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/contract/channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,CAAC;AAErE,MAAM,WAAW,SAAS;IACzB,iEAAiE;IACjE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;OA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