@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,89 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createBurstDetector = createBurstDetector;
7
+ var _diagnostics = require("../contract/diagnostics.js");
8
+ var _errors = require("../contract/errors.js");
9
+ /**
10
+ * Burst detection.
11
+ *
12
+ * Both platforms apply undocumented delivery rate limits and will silently drop
13
+ * or delay past them — which is exactly the invisible failure this package
14
+ * exists to eliminate. So volume is watched and reported.
15
+ *
16
+ * It is **not** acted upon. Nothing is throttled, delayed, coalesced, or
17
+ * dropped: deciding which of a user's notifications to suppress is a product
18
+ * decision the package has no basis to make. Noticing that something abnormal
19
+ * is happening is one it can.
20
+ *
21
+ * Counters are in memory only. A burst is a live condition, and persisting it
22
+ * would expand the state contract for no diagnostic gain.
23
+ */
24
+
25
+ const MINUTE_MS = 60_000;
26
+ const HOUR_MS = 60 * MINUTE_MS;
27
+ function createBurstDetector(deps = {}) {
28
+ const threshold = deps.threshold ?? _diagnostics.DEFAULT_BURST_THRESHOLD;
29
+ const emit = deps.emit ?? (() => {});
30
+ /** Per owner tag, because one busy account should not implicate another. */
31
+ const timestamps = new Map();
32
+ /** Prevents one sustained burst producing a diagnostic per notification. */
33
+ const reportedAt = new Map();
34
+ const prune = (tag, now) => {
35
+ const kept = (timestamps.get(tag) ?? []).filter(at => now - at <= HOUR_MS);
36
+ timestamps.set(tag, kept);
37
+ return kept;
38
+ };
39
+ return {
40
+ /**
41
+ * Records one presented notification and reports if the threshold is crossed.
42
+ *
43
+ * Always returns after recording — the caller delivers regardless of what
44
+ * this says.
45
+ */
46
+ record(now, ownerTag = '*') {
47
+ const kept = prune(ownerTag, now);
48
+ kept.push(now);
49
+ const lastMinute = kept.filter(at => now - at <= MINUTE_MS).length;
50
+ const lastHour = kept.length;
51
+ const exceeded = lastMinute > threshold.perMinute || lastHour > threshold.perHour;
52
+ if (exceeded) {
53
+ const last = reportedAt.get(ownerTag) ?? 0;
54
+ // One report per minute per tag; a sustained burst is one condition,
55
+ // not a hundred.
56
+ if (now - last >= MINUTE_MS) {
57
+ reportedAt.set(ownerTag, now);
58
+ emit(_errors.DIAGNOSTIC_CODES.BURST_THRESHOLD_EXCEEDED, `Abnormal notification volume: ${lastMinute} in the last minute and ${lastHour} in the last hour (thresholds ${threshold.perMinute}/minute, ${threshold.perHour}/hour). Every notification was still delivered — the package throttles nothing.`, {
59
+ ownerTag,
60
+ lastMinute,
61
+ lastHour,
62
+ threshold
63
+ });
64
+ }
65
+ }
66
+ return {
67
+ ownerTag,
68
+ lastMinute,
69
+ lastHour,
70
+ exceeded
71
+ };
72
+ },
73
+ status(now, ownerTag = '*') {
74
+ const kept = prune(ownerTag, now);
75
+ const lastMinute = kept.filter(at => now - at <= MINUTE_MS).length;
76
+ return {
77
+ ownerTag,
78
+ lastMinute,
79
+ lastHour: kept.length,
80
+ exceeded: lastMinute > threshold.perMinute || kept.length > threshold.perHour
81
+ };
82
+ },
83
+ reset() {
84
+ timestamps.clear();
85
+ reportedAt.clear();
86
+ }
87
+ };
88
+ }
89
+ //# sourceMappingURL=burst.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_diagnostics","require","_errors","MINUTE_MS","HOUR_MS","createBurstDetector","deps","threshold","DEFAULT_BURST_THRESHOLD","emit","timestamps","Map","reportedAt","prune","tag","now","kept","get","filter","at","set","record","ownerTag","push","lastMinute","length","lastHour","exceeded","perMinute","perHour","last","DIAGNOSTIC_CODES","BURST_THRESHOLD_EXCEEDED","status","reset","clear"],"sourceRoot":"../../../src","sources":["diagnostics/burst.ts"],"mappings":";;;;;;AAiBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAME,SAAS,GAAG,MAAM;AACxB,MAAMC,OAAO,GAAG,EAAE,GAAGD,SAAS;AAcvB,SAASE,mBAAmBA,CAACC,IAA+B,GAAG,CAAC,CAAC,EAAE;EACzE,MAAMC,SAAS,GAAGD,IAAI,CAACC,SAAS,IAAIC,oCAAuB;EAC3D,MAAMC,IAAI,GAAGH,IAAI,CAACG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;EACpC;EACA,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAmB,CAAC;EAC9C;EACA,MAAMC,UAAU,GAAG,IAAID,GAAG,CAAiB,CAAC;EAE5C,MAAME,KAAK,GAAGA,CAACC,GAAW,EAAEC,GAAW,KAAe;IACrD,MAAMC,IAAI,GAAG,CAACN,UAAU,CAACO,GAAG,CAACH,GAAG,CAAC,IAAI,EAAE,EAAEI,MAAM,CAACC,EAAE,IAAIJ,GAAG,GAAGI,EAAE,IAAIf,OAAO,CAAC;IAC1EM,UAAU,CAACU,GAAG,CAACN,GAAG,EAAEE,IAAI,CAAC;IACzB,OAAOA,IAAI;EACZ,CAAC;EAED,OAAO;IACN;AACF;AACA;AACA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M;MAElE,OAAO;QACNH,QAAQ;QACRE,UAAU;QACVE,QAAQ,EAAEV,IAAI,CAACS,MAAM;QACrBE,QAAQ,EAAEH,UAAU,GAAGjB,SAAS,CAACqB,SAAS,IAAIZ,IAAI,CAACS,MAAM,GAAGlB,SAAS,CAACsB;MACvE,CAAC;IACF,CAAC;IAEDK,KAAKA,CAAA,EAAS;MACbxB,UAAU,CAACyB,KAAK,CAAC,CAAC;MAClBvB,UAAU,CAACuB,KAAK,CAAC,CAAC;IACnB;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DiagnosticEmitter = void 0;
7
+ var _rnCore = require("@chipmobilesdk/rn-core");
8
+ var _errors = require("../contract/errors.js");
9
+ var _redact = require("./redact.js");
10
+ /**
11
+ * The structured event stream.
12
+ *
13
+ * With no sink attached the package emits nothing and buffers nothing. A
14
+ * library that writes to the console in production has decided something for
15
+ * its consumer; this one routes events wherever the app already sends its logs,
16
+ * or stays silent.
17
+ */
18
+
19
+ const channel = (0, _rnCore.createDiagnosticChannel)('rn-notification');
20
+ class DiagnosticEmitter {
21
+ constructor(options = {}) {
22
+ this.sink = options.sink;
23
+ this.verbose = options.verbose ?? false;
24
+ this.now = options.now ?? (() => Date.now());
25
+ }
26
+ setSink(sink) {
27
+ this.sink = sink;
28
+ }
29
+ setVerbose(verbose) {
30
+ this.verbose = verbose;
31
+ }
32
+ get hasSink() {
33
+ return this.sink !== undefined;
34
+ }
35
+ emit(code, message, context, severity) {
36
+ const resolvedSeverity = severity ?? ((0, _errors.isNonFailure)(code) ? 'info' : 'error');
37
+ // The app's SDK sinks (`installSdkSink`, CORE-08) never get content, even
38
+ // with verbose diagnostics on: verbose is for this package's own sink.
39
+ channel.emit(code, resolvedSeverity, (0, _redact.redactContext)(context, false));
40
+
41
+ // No sink means no work at all — not a buffer that grows until one appears.
42
+ if (this.sink === undefined) return;
43
+ const event = {
44
+ code,
45
+ severity: resolvedSeverity,
46
+ message,
47
+ at: this.now(),
48
+ context: (0, _redact.redactContext)(context, this.verbose)
49
+ };
50
+ try {
51
+ this.sink(event);
52
+ } catch {
53
+ // A failing sink is the consumer's problem and must never become ours.
54
+ }
55
+ }
56
+
57
+ /** Lifecycle transitions that are not failures: scheduled, delivered, reconciled. */
58
+ info(code, message, context) {
59
+ this.emit(code, message, context, 'info');
60
+ }
61
+ }
62
+ exports.DiagnosticEmitter = DiagnosticEmitter;
63
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_rnCore","require","_errors","_redact","channel","createDiagnosticChannel","DiagnosticEmitter","constructor","options","sink","verbose","now","Date","setSink","setVerbose","hasSink","undefined","emit","code","message","context","severity","resolvedSeverity","isNonFailure","redactContext","event","at","info","exports"],"sourceRoot":"../../../src","sources":["diagnostics/events.ts"],"mappings":";;;;;;AASA,IAAAA,OAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA,MAAMG,OAAO,GAAG,IAAAC,+BAAuB,EAAiB,iBAAiB,CAAC;AAEnE,MAAMC,iBAAiB,CAAC;EAK9BC,WAAWA,CAACC,OAAuB,GAAG,CAAC,CAAC,EAAE;IACzC,IAAI,CAACC,IAAI,GAAGD,OAAO,CAACC,IAAI;IACxB,IAAI,CAACC,OAAO,GAAGF,OAAO,CAACE,OAAO,IAAI,KAAK;IACvC,IAAI,CAACC,GAAG,GAAGH,OAAO,CAACG,GAAG,KAAK,MAAMC,IAAI,CAACD,GAAG,CAAC,CAAC,CAAC;EAC7C;EAEAE,OAAOA,CAACJ,IAA2B,EAAQ;IAC1C,IAAI,CAACA,IAAI,GAAGA,IAAI;EACjB;EAEAK,UAAUA,CAACJ,OAAgB,EAAQ;IAClC,IAAI,CAACA,OAAO,GAAGA,OAAO;EACvB;EAEA,IAAIK,OAAOA,CAAA,EAAY;IACtB,OAAO,IAAI,CAACN,IAAI,KAAKO,SAAS;EAC/B;EAEAC,IAAIA,CACHC,IAAoB,EACpBC,OAAe,EACfC,OAA2C,EAC3CC,QAA6B,EACtB;IACP,MAAMC,gBAAgB,GAAGD,QAAQ,KAAK,IAAAE,oBAAY,EAACL,IAAI,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC;IAC5E;IACA;IACAd,OAAO,CAACa,IAAI,CAACC,IAAI,EAAEI,gBAAgB,EAAE,IAAAE,qBAAa,EAACJ,OAAO,EAAE,KAAK,CAAC,CAAC;;IAEnE;IACA,IAAI,IAAI,CAACX,IAAI,KAAKO,SAAS,EAAE;IAE7B,MAAMS,KAAsB,GAAG;MAC9BP,IAAI;MACJG,QAAQ,EAAEC,gBAAgB;MAC1BH,OAAO;MACPO,EAAE,EAAE,IAAI,CAACf,GAAG,CAAC,CAAC;MACdS,OAAO,EAAE,IAAAI,qBAAa,EAACJ,OAAO,EAAE,IAAI,CAACV,OAAO;IAC7C,CAAC;IAED,IAAI;MACH,IAAI,CAACD,IAAI,CAACgB,KAAK,CAAC;IACjB,CAAC,CAAC,MAAM;MACP;IAAA;EAEF;;EAEA;EACAE,IAAIA,CAACT,IAAoB,EAAEC,OAAe,EAAEC,OAA2C,EAAQ;IAC9F,IAAI,CAACH,IAAI,CAACC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAE,MAAM,CAAC;EAC1C;AACD;AAACQ,OAAA,CAAAtB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isRedactedKey = isRedactedKey;
7
+ exports.redactContext = redactContext;
8
+ var _rnCore = require("@chipmobilesdk/rn-core");
9
+ /**
10
+ * Content redaction for diagnostics.
11
+ *
12
+ * A notification library that logs notification bodies has turned a diagnostic
13
+ * aid into a privacy incident. Nothing content-bearing reaches an event unless
14
+ * verbose diagnostics is explicitly enabled — and that setting is documented as
15
+ * unsuitable for production.
16
+ *
17
+ * Values are replaced by their *shape* — a length, a type, a character position
18
+ * — which is what actually helps someone debug a validation failure anyway.
19
+ */
20
+
21
+ /** Keys whose values are never emitted at any verbosity below verbose. */
22
+ const REDACTED_KEYS = new Set(['title', 'body', 'subtitle', 'content', 'routing', 'routingPayload', 'payload', 'token', 'pushToken', 'inputText', 'text', 'data']);
23
+
24
+ /**
25
+ * rn-core's redactor: the keys above are replaced by their shape (a length, a
26
+ * type), and every other string is pattern-redacted, so a token or an e-mail
27
+ * address under an innocent key such as `reason` does not get through either.
28
+ */
29
+ const redactor = (0, _rnCore.createRedactor)({
30
+ shapeKeys: REDACTED_KEYS
31
+ });
32
+
33
+ /**
34
+ * Strips content values from a diagnostic context.
35
+ *
36
+ * Recurses so a nested `{ request: { content: { body } } }` is caught — a
37
+ * top-level-only scrub is the kind of redaction that leaks the first time
38
+ * anyone nests a payload.
39
+ */
40
+ function redactContext(context, verbose) {
41
+ return verbose ? context : redactor.context(context);
42
+ }
43
+
44
+ /** True when a key would be redacted. Exported so tests can assert the policy directly. */
45
+ function isRedactedKey(key) {
46
+ return REDACTED_KEYS.has(key);
47
+ }
48
+ //# sourceMappingURL=redact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_rnCore","require","REDACTED_KEYS","Set","redactor","createRedactor","shapeKeys","redactContext","context","verbose","isRedactedKey","key","has"],"sourceRoot":"../../../src","sources":["diagnostics/redact.ts"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAC,CAC7B,OAAO,EACP,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,MAAM,EACN,MAAM,CACN,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAG,IAAAC,sBAAc,EAAC;EAAEC,SAAS,EAAEJ;AAAc,CAAC,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,aAAaA,CAC5BC,OAAsD,EACtDC,OAAgB,EACgC;EAChD,OAAOA,OAAO,GAAGD,OAAO,GAAGJ,QAAQ,CAACI,OAAO,CAACA,OAAO,CAAC;AACrD;;AAEA;AACO,SAASE,aAAaA,CAACC,GAAW,EAAW;EACnD,OAAOT,aAAa,CAACU,GAAG,CAACD,GAAG,CAAC;AAC9B","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createSnapshot = createSnapshot;
7
+ var _rnCore = require("@chipmobilesdk/rn-core");
8
+ /**
9
+ * The state snapshot.
10
+ *
11
+ * The readable answer to "why didn't it arrive?" — assembled in one place so
12
+ * that question can be answered without attaching a native debugger.
13
+ *
14
+ * The push token appears as **presence only**. Its value is never exposed here
15
+ * or anywhere else, because a snapshot is the thing most likely to be pasted
16
+ * into a bug report.
17
+ */
18
+
19
+ /**
20
+ * A pending entry with content replaced by its shape. A snapshot is the thing
21
+ * most likely to be pasted into a bug report, so it never carries notification
22
+ * text or routing values unless verbose diagnostics is on (NOT-14).
23
+ */
24
+ function withoutContent(entry) {
25
+ const {
26
+ content,
27
+ routing
28
+ } = entry;
29
+ return {
30
+ ...entry,
31
+ content: {
32
+ title: (0, _rnCore.describeShape)(content.title),
33
+ body: (0, _rnCore.describeShape)(content.body),
34
+ ...(content.subtitle === undefined ? {} : {
35
+ subtitle: (0, _rnCore.describeShape)(content.subtitle)
36
+ })
37
+ },
38
+ ...(routing === undefined ? {} : {
39
+ routing: Object.fromEntries(Object.entries(routing).map(([key, value]) => [key, (0, _rnCore.describeShape)(value)]))
40
+ })
41
+ };
42
+ }
43
+ function createSnapshot(deps) {
44
+ return {
45
+ async capture() {
46
+ const [permissions, restrictions, pending] = await Promise.all([deps.permissions(), deps.restrictions(), deps.engine.getPending()]);
47
+ const maintenance = deps.lastMaintenance();
48
+ const discrepancy = maintenance?.discrepancy;
49
+ return {
50
+ permissions,
51
+ restrictions,
52
+ tones: deps.appliedTones().map(tone => ({
53
+ id: tone.toneId,
54
+ appliedVersion: tone.appliedVersion
55
+ })),
56
+ pendingCount: pending.length,
57
+ pending: deps.verbose?.() ? pending : pending.map(entry => withoutContent(entry)),
58
+ lastReconcile: deps.lastReconcile(),
59
+ lastMaintenance: maintenance,
60
+ discrepancy,
61
+ stateHealth: deps.state.health(),
62
+ pushTokenPresent: deps.hasPushToken(),
63
+ capturedAt: deps.now()
64
+ };
65
+ }
66
+ };
67
+ }
68
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_rnCore","require","withoutContent","entry","content","routing","title","describeShape","body","subtitle","undefined","Object","fromEntries","entries","map","key","value","createSnapshot","deps","capture","permissions","restrictions","pending","Promise","all","engine","getPending","maintenance","lastMaintenance","discrepancy","tones","appliedTones","tone","id","toneId","appliedVersion","pendingCount","length","verbose","lastReconcile","stateHealth","state","health","pushTokenPresent","hasPushToken","capturedAt","now"],"sourceRoot":"../../../src","sources":["diagnostics/snapshot.ts"],"mappings":";;;;;;AAWA,IAAAA,OAAA,GAAAC,OAAA;AAXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgCA;AACA;AACA;AACA;AACA;AACA,SAASC,cAAcA,CAACC,KAAmB,EAAgB;EAC1D,MAAM;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAGF,KAAK;EAClC,OAAO;IACN,GAAGA,KAAK;IACRC,OAAO,EAAE;MACRE,KAAK,EAAE,IAAAC,qBAAa,EAACH,OAAO,CAACE,KAAK,CAAC;MACnCE,IAAI,EAAE,IAAAD,qBAAa,EAACH,OAAO,CAACI,IAAI,CAAC;MACj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C,KAAqB,CAAC,CAAC;QAC9DoC,aAAa,EAAErB,IAAI,CAACqB,aAAa,CAAC,CAAC;QACnCX,eAAe,EAAED,WAAW;QAC5BE,WAAW;QACXW,WAAW,EAAEtB,IAAI,CAACuB,KAAK,CAACC,MAAM,CAAC,CAAC;QAChCC,gBAAgB,EAAEzB,IAAI,CAAC0B,YAAY,CAAC,CAAC;QACrCC,UAAU,EAAE3B,IAAI,CAAC4B,GAAG,CAAC;MACtB,CAAC;IACF;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["engine/adapter.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.packData = packData;
7
+ exports.unpackData = unpackData;
8
+ /**
9
+ * The metadata codec for a notification's platform data bag.
10
+ *
11
+ * Anchoring, series origin, tags, routing and actions have no engine
12
+ * equivalent, and `getPending` must return them (FR-010) or a consumer cannot
13
+ * diff against intent. They travel as strings in the free-form data bag, which
14
+ * is the one field both platforms carry through unchanged.
15
+ *
16
+ * Shared by the real engine and the fake. When the fake stored requests
17
+ * verbatim it could not lose a field the real engine lost — `actions` never
18
+ * came back from a device, so every reconcile replaced every notification that
19
+ * had them, and the fake-backed tests never saw it.
20
+ */
21
+
22
+ /** Everything `getPending` reports that only the data bag can carry. */
23
+
24
+ function packData(request) {
25
+ return {
26
+ __cms_anchoring: request.request.moment.anchoring ?? 'wallClock',
27
+ // The IANA zone, not the tone. Storing the wrong value here does not merely
28
+ // mislabel an entry: the re-anchoring pass feeds it straight to
29
+ // Intl.DateTimeFormat, which throws a hard Hermes error on an invalid zone.
30
+ ...(request.anchoringGeneration !== undefined ? {
31
+ __cms_generation: request.anchoringGeneration
32
+ } : {}),
33
+ __cms_tone: request.request.tone,
34
+ __cms_approximate: String(request.approximate),
35
+ __cms_pushCreated: String(request.pushCreated ?? false),
36
+ ...(request.seriesId !== undefined ? {
37
+ __cms_series: request.seriesId
38
+ } : {}),
39
+ ...(request.request.ownerTag !== undefined ? {
40
+ __cms_owner: request.request.ownerTag
41
+ } : {}),
42
+ ...(request.request.groupTag !== undefined ? {
43
+ __cms_group: request.request.groupTag
44
+ } : {}),
45
+ ...(request.request.routing !== undefined ? {
46
+ __cms_routing: JSON.stringify(request.request.routing)
47
+ } : {}),
48
+ ...(request.request.actions !== undefined ? {
49
+ __cms_actions: JSON.stringify(request.request.actions)
50
+ } : {}),
51
+ // A stop marker's whole payload. It travels here rather than in `ownerTag`
52
+ // or `routing` so it can never collide with a value a consumer owns.
53
+ ...(request.repeatStop !== undefined ? {
54
+ __cms_stop_target: request.repeatStop.targetId,
55
+ __cms_stop_due: String(request.repeatStop.dueAt)
56
+ } : {})
57
+ };
58
+ }
59
+
60
+ /** A JSON field we cannot parse is reported as absent: the notification is still valid. */
61
+ function parseJson(raw) {
62
+ if (typeof raw !== 'string') return undefined;
63
+ try {
64
+ return JSON.parse(raw);
65
+ } catch {
66
+ return undefined;
67
+ }
68
+ }
69
+ function unpackData(data) {
70
+ const anchoring = data.__cms_anchoring === 'absolute' ? 'absolute' : 'wallClock';
71
+ return {
72
+ anchoring,
73
+ anchoringGeneration: anchoring === 'absolute' ? undefined : data.__cms_generation,
74
+ tone: data.__cms_tone ?? '',
75
+ routing: parseJson(data.__cms_routing),
76
+ actions: parseJson(data.__cms_actions),
77
+ ownerTag: data.__cms_owner,
78
+ groupTag: data.__cms_group,
79
+ seriesId: data.__cms_series,
80
+ mayBeDelayed: data.__cms_approximate === 'true',
81
+ pushCreated: data.__cms_pushCreated === 'true'
82
+ };
83
+ }
84
+ //# sourceMappingURL=codec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["packData","request","__cms_anchoring","moment","anchoring","anchoringGeneration","undefined","__cms_generation","__cms_tone","tone","__cms_approximate","String","approximate","__cms_pushCreated","pushCreated","seriesId","__cms_series","ownerTag","__cms_owner","groupTag","__cms_group","routing","__cms_routing","JSON","stringify","actions","__cms_actions","repeatStop","__cms_stop_target","targetId","__cms_stop_due","dueAt","parseJson","raw","parse","unpackData","data","mayBeDelayed"],"sourceRoot":"../../../src","sources":["engine/codec.ts"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;;AAeO,SAASA,QAAQA,CAACC,OAA8B,EAA0B;EAChF,OAAO;IACNC,eAAe,EAAED,OAAO,CAACA,OAAO,CAACE,MAAM,CAACC,SAAS,IAAI,WAAW;IAChE;IACA;IACA;IACA,IAAIH,OAAO,CAACI,mBAAmB,KAAKC,SAAS,GAC1C;MAAEC,gBAAgB,EAAEN,OAAO,CAACI;IAAoB,CAAC,GACjD,CAAC,CAAC,CAAC;IACNG,UAAU,EAAEP,OAAO,CAACA,OAAO,CAACQ,IAAI;IAChCC,iBAAiB,EAAEC,MAAM,CAACV,OAAO,CAACW,WAAW,CAAC;IAC9CC,iBAAiB,EAAEF,MAAM,CAACV,OAAO,CAACa,WAAW,IAAI,KAAK,CAAC;IACvD,IAAIb,OAAO,CAACc,QAAQ,KAAKT,SAAS,GAAG;MAAEU,YAAY,EAAEf,OAAO,CAACc;IAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7E,IAAId,OAAO,CAACA,OAAO,CAACgB,QAAQ,KAAKX,SAAS,GAAG;MAAEY,WAAW,EAAEjB,OAAO,CAACA,OAAO,CAACgB;IAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5F,IAAIhB,OAAO,CAACA,OAAO,CAACkB,QAAQ,KAAKb,SAAS,GAAG;MAAEc,WAAW,EAAEnB,OAAO,CAACA,OAAO,CAACkB;IAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5F,IAAIl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AEmB,IAAI,CAAClB,WAAW;IAC1BC,QAAQ,EAAEiB,IAAI,CAAChB,WAAW;IAC1BL,QAAQ,EAAEqB,IAAI,CAACpB,YAAY;IAC3BqB,YAAY,EAAED,IAAI,CAAC1B,iBAAiB,KAAK,MAAM;IAC/CI,WAAW,EAAEsB,IAAI,CAACvB,iBAAiB,KAAK;EACzC,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toDelivery = toDelivery;
7
+ exports.toInteraction = toInteraction;
8
+ exports.toPermissionState = toPermissionState;
9
+ exports.unpackEntry = unpackEntry;
10
+ exports.unpackRepeatStop = unpackRepeatStop;
11
+ exports.unpackRepeatStops = unpackRepeatStops;
12
+ var _marker = require("../../repeat/marker.js");
13
+ var _codec = require("../codec.js");
14
+ var _module = require("./module.js");
15
+ /**
16
+ * Reading what the engine hands back: pending entries, interactions, deliveries
17
+ * and authorization values, turned into the package's own shapes.
18
+ *
19
+ * Pure functions of the raw value and a clock, so they are testable without an
20
+ * engine and shared by the foreground, background and cold-start paths.
21
+ */
22
+
23
+ const bag = value => value ?? {};
24
+ const dataOf = notification => notification.data ?? {};
25
+
26
+ /** Reads a stop marker back out of a pending entry's data bag, if it is one. */
27
+ function unpackRepeatStop(id, data) {
28
+ if (!(0, _marker.isRepeatStopId)(id)) return undefined;
29
+ const targetId = data.__cms_stop_target;
30
+ const dueAt = Number.parseInt(data.__cms_stop_due ?? '', 10);
31
+ if (typeof targetId !== 'string' || !Number.isFinite(dueAt)) return undefined;
32
+ return {
33
+ markerId: id,
34
+ targetId,
35
+ dueAt
36
+ };
37
+ }
38
+ function unpackEntry(raw, now) {
39
+ const notification = bag(raw.notification);
40
+ const trigger = bag(raw.trigger);
41
+ const id = notification.id;
42
+ if (typeof id !== 'string') return undefined;
43
+ return {
44
+ id,
45
+ resolvedAt: typeof trigger.timestamp === 'number' ? trigger.timestamp : now(),
46
+ content: {
47
+ title: typeof notification.title === 'string' ? notification.title : '',
48
+ body: typeof notification.body === 'string' ? notification.body : '',
49
+ subtitle: typeof notification.subtitle === 'string' ? notification.subtitle : undefined
50
+ },
51
+ ...(0, _codec.unpackData)(dataOf(notification))
52
+ };
53
+ }
54
+
55
+ /** Every stop marker among the engine's pending triggers. */
56
+ function unpackRepeatStops(raw) {
57
+ const stops = [];
58
+ for (const entry of raw) {
59
+ const notification = bag(entry.notification);
60
+ const id = notification.id;
61
+ if (typeof id !== 'string') continue;
62
+ const stop = unpackRepeatStop(id, dataOf(notification));
63
+ if (stop !== undefined) stops.push(stop);
64
+ }
65
+ return stops;
66
+ }
67
+
68
+ /**
69
+ * An interaction, or undefined for anything that is not one.
70
+ *
71
+ * Only a dismissal or a press is an interaction. Everything else the engine
72
+ * emits on this channel — delivery, trigger creation, channel blocking — is not,
73
+ * and reporting it as one would cancel a notification the user never touched.
74
+ */
75
+ function toInteraction(raw, now) {
76
+ const eventType = raw.type;
77
+ if (eventType !== _module.EVENT_TYPE_DISMISSED && eventType !== _module.EVENT_TYPE_PRESS && eventType !== _module.EVENT_TYPE_ACTION_PRESS) {
78
+ return undefined;
79
+ }
80
+ const detail = bag(raw.detail);
81
+ const notification = bag(detail.notification);
82
+ const pressAction = bag(detail.pressAction);
83
+ const id = notification.id;
84
+ if (typeof id !== 'string') return undefined;
85
+ const data = dataOf(notification);
86
+ const actionId = typeof pressAction.id === 'string' ? pressAction.id : undefined;
87
+ // `default` is the engine's own press-action id for tapping the body, so it is
88
+ // a tap rather than a named action.
89
+ const isNamedAction = actionId !== undefined && actionId !== 'default';
90
+ let kind;
91
+ if (eventType === _module.EVENT_TYPE_DISMISSED) {
92
+ kind = 'dismiss';
93
+ } else if (isNamedAction) {
94
+ kind = 'action';
95
+ } else {
96
+ kind = 'tap';
97
+ }
98
+ return {
99
+ kind,
100
+ notificationId: id,
101
+ actionId: isNamedAction ? actionId : undefined,
102
+ inputText: typeof detail.input === 'string' ? detail.input : undefined,
103
+ // The one decoder for the data bag, so routing is parsed the same way here
104
+ // and when reading the pending set back (NOT-18).
105
+ routing: (0, _codec.unpackData)(data).routing,
106
+ ownerTag: data.__cms_owner,
107
+ occurredAt: now(),
108
+ appState: 'foreground',
109
+ wasBuffered: false
110
+ };
111
+ }
112
+
113
+ /** A delivery, or undefined for anything that is not one. */
114
+ function toDelivery(raw, now) {
115
+ if (raw.type !== _module.EVENT_TYPE_DELIVERED) return undefined;
116
+ const notification = bag(bag(raw.detail).notification);
117
+ const id = notification.id;
118
+ if (typeof id !== 'string') return undefined;
119
+ return {
120
+ notificationId: id,
121
+ occurredAt: now(),
122
+ repeatStop: unpackRepeatStop(id, dataOf(notification))
123
+ };
124
+ }
125
+
126
+ /**
127
+ * Maps engine authorization values onto our six-state model.
128
+ *
129
+ * `notAsked` and `denied` must stay distinguishable — being able to read state
130
+ * without prompting is worthless if the two collapse. `provisional` is its own
131
+ * state on both edges, never folded into granted or denied.
132
+ */
133
+ function toPermissionState(raw) {
134
+ switch (raw) {
135
+ case 1:
136
+ case 'authorized':
137
+ return 'granted';
138
+ case 2:
139
+ case 'provisional':
140
+ return 'provisional';
141
+ case 0:
142
+ case 'denied':
143
+ return 'denied';
144
+ default:
145
+ return 'notAsked';
146
+ }
147
+ }
148
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_marker","require","_codec","_module","bag","value","dataOf","notification","data","unpackRepeatStop","id","isRepeatStopId","undefined","targetId","__cms_stop_target","dueAt","Number","parseInt","__cms_stop_due","isFinite","markerId","unpackEntry","raw","now","trigger","resolvedAt","timestamp","content","title","body","subtitle","unpackData","unpackRepeatStops","stops","entry","stop","push","toInteraction","eventType","type","EVENT_TYPE_DISMISSED","EVENT_TYPE_PRESS","EVENT_TYPE_ACTION_PRESS","detail","pressAction","actionId","isNamedAction","kind","notificationId","inputText","input","routing","ownerTag","__cms_owner","occurredAt","appState","wasBuffered","toDelivery","EVENT_TYPE_DELIV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