@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,141 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IMPLEMENTED_PAYLOAD_VERSION = void 0;
7
+ exports.normalizeEnvelope = normalizeEnvelope;
8
+ var _errors = require("../contract/errors.js");
9
+ /**
10
+ * Payload normalization.
11
+ *
12
+ * Every provider's payload is reduced to one envelope shape before it reaches
13
+ * the consumer, so changing provider costs consumer code nothing.
14
+ *
15
+ * Version handling is best-effort: a payload declaring a version this build
16
+ * does not implement is still processed, honouring the fields it understands
17
+ * and ignoring the rest. Servers deploy ahead of app adoption and old app
18
+ * versions live on devices for months, so gating every server-side change on
19
+ * app rollout is the more expensive failure.
20
+ *
21
+ * That is only safe under an append-only discipline — a released field's
22
+ * meaning must never be repurposed. The version-skew diagnostic exists so a
23
+ * misprocessing incident is traceable to the skew rather than investigated as a
24
+ * logic defect.
25
+ */
26
+
27
+ /** The contract version this build implements. */
28
+ const IMPLEMENTED_PAYLOAD_VERSION = exports.IMPLEMENTED_PAYLOAD_VERSION = 1;
29
+ const KINDS = new Set(['display', 'data', 'schedule', 'cancel']);
30
+ function asRecord(value) {
31
+ return typeof value === 'object' && value !== null && !Array.isArray(value) ? value : undefined;
32
+ }
33
+
34
+ /**
35
+ * Text, or nothing.
36
+ *
37
+ * Deliberately not `String(value)`: an object coerces to the literal string
38
+ * "[object Object]", which would be rendered to the user as a notification
39
+ * title. A field that is not text is treated as absent.
40
+ */
41
+ function asText(value) {
42
+ if (typeof value === 'string') return value;
43
+ if (typeof value === 'number' && Number.isFinite(value)) return String(value);
44
+ return undefined;
45
+ }
46
+
47
+ /** An epoch instant from either a number or an ISO-8601 string. */
48
+ function asInstant(value) {
49
+ if (typeof value === 'number' && Number.isFinite(value)) return value;
50
+ if (typeof value === 'string') return Date.parse(value);
51
+ return Number.NaN;
52
+ }
53
+
54
+ /** Extracts and validates the contract version, which every payload must declare. */
55
+ function readVersion(body) {
56
+ const raw = body.v;
57
+ const version = typeof raw === 'number' ? raw : Number.parseInt(asText(raw) ?? '', 10);
58
+ if (!Number.isInteger(version) || version < 1) {
59
+ throw new _errors.NotificationError(_errors.DIAGNOSTIC_CODES.PAYLOAD_MALFORMED, 'Push payload carries no usable contract version. Every payload must declare `v` from the first release.', {
60
+ received: typeof raw
61
+ });
62
+ }
63
+ return version;
64
+ }
65
+ function readKind(body) {
66
+ const kind = asText(body.kind);
67
+ if (kind === undefined || !KINDS.has(kind)) {
68
+ throw new _errors.NotificationError(_errors.DIAGNOSTIC_CODES.PAYLOAD_MALFORMED, `Push payload declares unknown kind "${kind ?? ''}".`, {
69
+ kind
70
+ });
71
+ }
72
+ return kind;
73
+ }
74
+ function readId(body) {
75
+ const id = asText(body.id);
76
+ if (id === undefined || id.length === 0) {
77
+ throw new _errors.NotificationError(_errors.DIAGNOSTIC_CODES.PAYLOAD_MALFORMED, 'Push payload carries no identifier.');
78
+ }
79
+ return id;
80
+ }
81
+ function readContent(body) {
82
+ const content = asRecord(body.content);
83
+ if (content === undefined) return undefined;
84
+ return {
85
+ title: asText(content.title) ?? '',
86
+ body: asText(content.body) ?? '',
87
+ subtitle: asText(content.subtitle)
88
+ };
89
+ }
90
+ function readMoment(body) {
91
+ const moment = asRecord(body.moment);
92
+ if (moment === undefined) return undefined;
93
+ return {
94
+ at: asInstant(moment.at),
95
+ anchoring: moment.anchoring === 'absolute' ? 'absolute' : 'wallClock'
96
+ };
97
+ }
98
+ /**
99
+ * Normalizes a raw provider payload.
100
+ *
101
+ * Throws only for a **structurally unparseable** payload — a broken message.
102
+ * An unrecognized version is a healthy message from a newer contract and must
103
+ * never collapse into the same condition.
104
+ */
105
+ function normalizeEnvelope(raw, receivedAt) {
106
+ const record = asRecord(raw);
107
+ if (record === undefined) {
108
+ throw new _errors.NotificationError(_errors.DIAGNOSTIC_CODES.PAYLOAD_MALFORMED, 'Push payload is not an object and cannot be interpreted.', {
109
+ received: Array.isArray(raw) ? 'array' : typeof raw
110
+ });
111
+ }
112
+
113
+ // Providers deliver the payload under a data bag; accept either shape so the
114
+ // adapter does not have to reshape before handing it over.
115
+ const body = asRecord(record.data) ?? record;
116
+ const version = readVersion(body);
117
+ const kind = readKind(body);
118
+ const id = readId(body);
119
+ const versionSkew = version !== IMPLEMENTED_PAYLOAD_VERSION;
120
+ return {
121
+ versionSkew,
122
+ envelope: {
123
+ version,
124
+ kind,
125
+ id,
126
+ ownerTag: asText(body.ownerTag),
127
+ content: readContent(body),
128
+ tone: asText(body.tone),
129
+ moment: readMoment(body),
130
+ routing: asRecord(body.routing),
131
+ // Falls back to the identifier, so a server that omits it still gets
132
+ // de-duplication rather than silently losing it.
133
+ dedupId: asText(body.dedupId) ?? id,
134
+ receivedAt,
135
+ versionSkew
136
+ // Fields this build does not understand are simply not read — that is
137
+ // what best-effort processing means in practice.
138
+ }
139
+ };
140
+ }
141
+ //# sourceMappingURL=envelope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","IMPLEMENTED_PAYLOAD_VERSION","exports","KINDS","Set","asRecord","value","Array","isArray","undefined","asText","Number","isFinite","String","asInstant","Date","parse","NaN","readVersion","body","raw","v","version","parseInt","isInteger","NotificationError","DIAGNOSTIC_CODES","PAYLOAD_MALFORMED","received","readKind","kind","has","readId","id","length","readContent","content","title","subtitle","readMoment","moment","at","anchoring","normalizeEnvelope","receivedAt","record","data","versionSkew","envelope","ownerTag","tone","routing","dedupId"],"sourceRoot":"../../../src","sources":["push/envelope.ts"],"mappings":";;;;;;;AAmBA,IAAAA,OAAA,GAAAC,OAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACO,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,CAAC;AAE5C,MAAME,KAAK,GAAG,IAAIC,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAEhE,SAASC,QAAQA,CAACC,KAAc,EAAuC;EACtE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,GACvEA,KAAK,GACNG,SAAS;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,MAAMA,CAACJ,KAAc,EAAsB;EACnD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIK,MAAM,CAACC,QAAQ,CAACN,KAAK,CAAC,EAAE,OAAOO,MAAM,CAACP,KAAK,CAAC;EAC7E,OAAOG,SAAS;AACjB;;AAEA;AACA,SAASK,SAASA,CAACR,KAAc,EAAU;EAC1C,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIK,MAAM,CAACC,QAAQ,CAACN,KAAK,CAAC,EAAE,OAAOA,KAAK;EACrE,IAAI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AAC;EACjC,MAAMW,IAAI,GAAGD,QAAQ,CAACV,IAAI,CAAC;EAC3B,MAAMc,EAAE,GAAGD,MAAM,CAACb,IAAI,CAAC;EACvB,MAAM4B,WAAW,GAAGzB,OAAO,KAAKrB,2BAA2B;EAE3D,OAAO;IACN8C,WAAW;IACXC,QAAQ,EAAE;MACT1B,OAAO;MACPQ,IAAI;MACJG,EAAE;MACFgB,QAAQ,EAAEvC,MAAM,CAACS,IAAI,CAAC8B,QAAQ,CAAC;MAC/Bb,OAAO,EAAED,WAAW,CAAChB,IAAI,CAAC;MAC1B+B,IAAI,EAAExC,MAAM,CAACS,IAAI,CAAC+B,IAAI,CAAC;MACvBV,MAAM,EAAED,UAAU,CAACpB,IAAI,CAAC;MACxBgC,OAAO,EAAE9C,QAAQ,CAACc,IAAI,CAACgC,OAAO,CAAC;MAC/B;MACA;MACAC,OAAO,EAAE1C,MAAM,CAACS,IAAI,CAACiC,OAAO,CAAC,IAAInB,EAAE;MACnCW,UAAU;MACVG;MACA;MACA;IACD;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createFcmProvider = createFcmProvider;
7
+ var _rnCore = require("@chipmobilesdk/rn-core");
8
+ /**
9
+ * The Firebase Cloud Messaging provider.
10
+ *
11
+ * Every `@react-native-firebase/messaging` import is confined to this file, so
12
+ * the rest of the package — and every consuming app — stays free of provider
13
+ * types. Substituting a provider is an adapter swap, not a rewrite.
14
+ *
15
+ * The module is required **lazily**. That matters more here than for the
16
+ * engine: messaging is an *optional* peer dependency, and an app that never
17
+ * enables push must not fail at import time for a package it deliberately did
18
+ * not install.
19
+ */
20
+
21
+ /** Minimal shape used from the SDK, so its full surface never leaks into typing. */
22
+
23
+ const messagingPeer = (0, _rnCore.lazyPeer)('@react-native-firebase/messaging', () => {
24
+ // Inside `try`, so Metro bundles an app that leaves this optional peer out.
25
+ try {
26
+ return require('@react-native-firebase/messaging');
27
+ } catch (cause) {
28
+ throw cause;
29
+ }
30
+ });
31
+ function loadMessaging() {
32
+ // Absent optional peer, or missing native module: reported as unavailability
33
+ // through the normal path rather than thrown at import.
34
+ const result = messagingPeer.get();
35
+ return result.ok ? result.module.default : undefined;
36
+ }
37
+ function createFcmProvider(options = {}) {
38
+ let cached = options.module;
39
+ let resolved = options.module !== undefined;
40
+ const messaging = () => {
41
+ if (!resolved) {
42
+ cached = loadMessaging();
43
+ resolved = true;
44
+ }
45
+ return cached?.();
46
+ };
47
+ if (options.onBackgroundMessage !== undefined) {
48
+ messaging()?.setBackgroundMessageHandler(options.onBackgroundMessage);
49
+ }
50
+ return {
51
+ name: '@react-native-firebase/messaging',
52
+ async getAvailability() {
53
+ const instance = messaging();
54
+
55
+ // A device without Google Play Services, or an app that never installed
56
+ // the optional peer. Either way the local path is unaffected.
57
+ if (instance === undefined) return 'unavailable';
58
+
59
+ // Asked without registering: fetching a token here would create an FCM
60
+ // registration (and an APNs one on iOS) just to answer a yes-or-no
61
+ // question, before the app asked for permission (NOT-24).
62
+ try {
63
+ if (instance.isDeviceRegisteredForRemoteMessages === true) {
64
+ return 'available';
65
+ }
66
+ if (instance.hasPermission !== undefined) {
67
+ // Messaging is present; whether it may deliver is the permission's
68
+ // question, and that is answered without registering anything.
69
+ await instance.hasPermission();
70
+ return 'available';
71
+ }
72
+ return 'unknown';
73
+ } catch {
74
+ // The SDK does not say why, so `unknown` rather than a guess.
75
+ return 'unknown';
76
+ }
77
+ },
78
+ async getToken() {
79
+ const instance = messaging();
80
+ if (instance === undefined) {
81
+ throw new Error('Push provider is unavailable on this device.');
82
+ }
83
+ // Resolves only once a genuine token exists; the gate never presents an
84
+ // empty value as if it were one.
85
+ return instance.getToken();
86
+ },
87
+ onTokenChange(handler) {
88
+ const instance = messaging();
89
+ if (instance === undefined) return () => undefined;
90
+ return instance.onTokenRefresh(handler);
91
+ },
92
+ async invalidateToken() {
93
+ const instance = messaging();
94
+ if (instance === undefined) return false;
95
+ try {
96
+ await instance.deleteToken();
97
+ return true;
98
+ } catch {
99
+ // Reported as a failed invalidation rather than assumed successful —
100
+ // the device may keep receiving the previous account's messages.
101
+ return false;
102
+ }
103
+ },
104
+ subscribeToMessages(handler) {
105
+ const instance = messaging();
106
+ if (instance === undefined) return () => undefined;
107
+
108
+ // Foreground only. Background delivery arrives through the handler the
109
+ // consumer registers at module scope, which the README documents.
110
+ return instance.onMessage(message => {
111
+ handler(message);
112
+ });
113
+ },
114
+ async takeInitialMessage() {
115
+ const instance = messaging();
116
+ if (instance === undefined) return undefined;
117
+ const message = await instance.getInitialNotification();
118
+ return message ?? undefined;
119
+ }
120
+ };
121
+ }
122
+ //# sourceMappingURL=fcm-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_rnCore","require","messagingPeer","lazyPeer","cause","loadMessaging","result","get","ok","module","default","undefined","createFcmProvider","options","cached","resolved","messaging","onBackgroundMessage","setBackgroundMessageHandler","name","getAvailability","instance","isDeviceRegisteredForRemoteMessages","hasPermission","getToken","Error","onTokenChange","handler","onTokenRefresh","invalidateToken","deleteToken","subscribeToMessages","onMessage","message","takeInitialMessage","getInitialNotification"],"sourceRoot":"../../../src","sources":["push/fcm-provider.ts"],"mappings":";;;;;;AAaA,IAAAA,OAAA,GAAAC,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;;AAiBA,MAAMC,aAAa,GAAG,IAAAC,gBAAQ,EAAC,kCAAkC,EAAE,MAAM;EACxE;EACA,IAAI;IACH,OAAOF,OAAO,CAAC,kCAAkC,CAAC;EACnD,CAAC,CAAC,OAAOG,KAAK,EAAE;IACf,MAAMA,KAAK;EACZ;AACD,CAAC,CAAC;AAEF,SAASC,aAAaA,CAAA,EAAgC;EACrD;EACA;EACA,MAAMC,MAAM,GAAGJ,aAAa,CAACK,GAAG,CAAC,CAAC;EAClC,OAAOD,MAAM,CAACE,EAAE,G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AQ,CAACG,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAEDE,aAAaA,CAACC,OAAgC,EAAe;MAC5D,MAAMN,QAAQ,GAAGL,SAAS,CAAC,CAAC;MAC5B,IAAIK,QAAQ,KAAKV,SAAS,EAAE,OAAO,MAAMA,SAAS;MAClD,OAAOU,QAAQ,CAACO,cAAc,CAACD,OAAO,CAAC;IACxC,CAAC;IAED,MAAME,eAAeA,CAAA,EAAqB;MACzC,MAAMR,QAAQ,GAAGL,SAAS,CAAC,CAAC;MAC5B,IAAIK,QAAQ,KAAKV,SAAS,EAAE,OAAO,KAAK;MAExC,IAAI;QACH,MAAMU,QAAQ,CAACS,WAAW,CAAC,CAAC;QAC5B,OAAO,IAAI;MACZ,CAAC,CAAC,MAAM;QACP;QACA;QACA,OAAO,KAAK;MACb;IACD,CAAC;IAEDC,mBAAmBA,CAACJ,OAA+B,EAAe;MACjE,MAAMN,QAAQ,GAAGL,SAAS,CAAC,CAAC;MAC5B,IAAIK,QAAQ,KAAKV,SAAS,EAAE,OAAO,MAAMA,SAAS;;MAElD;MACA;MACA,OAAOU,QAAQ,CAACW,SAAS,CAACC,OAAO,IAAI;QACpCN,OAAO,CAACM,OAAO,CAAC;MACjB,CAAC,CAAC;IACH,CAAC;IAED,MAAMC,kBAAkBA,CAAA,EAAiC;MACxD,MAAMb,QAAQ,GAAGL,SAAS,CAAC,CAAC;MAC5B,IAAIK,QAAQ,KAAKV,SAAS,EAAE,OAAOA,SAAS;MAE5C,MAAMsB,OAAO,GAAG,MAAMZ,QAAQ,CAACc,sBAAsB,CAAC,CAAC;MACvD,OAAOF,OAAO,IAAItB,SAAS;IAC5B;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createPushGate = createPushGate;
7
+ var _errors = require("../contract/errors.js");
8
+ var _envelope = require("./envelope.js");
9
+ var _dedupLedger = require("../state/dedup-ledger.js");
10
+ /**
11
+ * The push gate.
12
+ *
13
+ * Everything a consumer sees about push comes through here, in one normalized
14
+ * shape with zero provider types. Substituting a provider is therefore an
15
+ * adapter swap rather than a consumer rewrite.
16
+ *
17
+ * Two behaviours are deliberate and easy to get wrong. A push arriving in the
18
+ * **foreground is never auto-displayed** — presentation is the app's decision,
19
+ * and a library that decided for it would fight every consumer's design. And a
20
+ * malformed payload is **dropped safely**, because a broken message from a
21
+ * server must not be able to crash an installed app.
22
+ */
23
+
24
+ function createPushGate(deps) {
25
+ const emit = deps.emit ?? (() => {});
26
+ let handlers = [];
27
+ let subscription;
28
+ /** Every token subscription, so a second one does not leak the first (NOT-24). */
29
+ const tokenSubscriptions = new Set();
30
+ let deliveryChain = Promise.resolve();
31
+ const dispatch = envelope => {
32
+ deliveryChain = deliveryChain.then(async () => {
33
+ for (const handler of handlers) {
34
+ try {
35
+ await handler(envelope);
36
+ } catch {
37
+ // A consumer's handler failing must not stop the next payload.
38
+ }
39
+ }
40
+ });
41
+ };
42
+ const receive = raw => {
43
+ let normalized;
44
+ try {
45
+ normalized = (0, _envelope.normalizeEnvelope)(raw, deps.now());
46
+ } catch (error) {
47
+ // Dropped safely and recorded. A broken message must never crash the app
48
+ // or corrupt the local schedule.
49
+ emit(_errors.DIAGNOSTIC_CODES.PAYLOAD_MALFORMED, (0, _errors.isNotificationError)(error) ? error.message : 'Push payload could not be interpreted and was discarded.', (0, _errors.isNotificationError)(error) ? error.context : undefined);
50
+ return undefined;
51
+ }
52
+ const {
53
+ envelope,
54
+ versionSkew
55
+ } = normalized;
56
+ if (versionSkew) {
57
+ emit(_errors.DIAGNOSTIC_CODES.PAYLOAD_VERSION_SKEW, `Push payload declares contract version ${envelope.version}; this build implements ${_envelope.IMPLEMENTED_PAYLOAD_VERSION}. Processed best-effort — known fields honoured, unknown fields ignored.`, {
58
+ received: envelope.version,
59
+ implemented: _envelope.IMPLEMENTED_PAYLOAD_VERSION
60
+ });
61
+ }
62
+
63
+ // Deduplication survives process death, which is the case that matters:
64
+ // a redelivery usually arrives in a fresh process.
65
+ if ((0, _dedupLedger.recordSeen)(deps.state, envelope.dedupId, deps.now(), envelope.ownerTag)) {
66
+ emit(_errors.DIAGNOSTIC_CODES.PAYLOAD_DUPLICATE, 'Push payload was already handled and was suppressed.', {
67
+ dedupId: envelope.dedupId
68
+ });
69
+ return undefined;
70
+ }
71
+ dispatch(envelope);
72
+ return envelope;
73
+ };
74
+ return {
75
+ /** Reports whether platform push services exist, so degradation is controlled. */
76
+ async getAvailability() {
77
+ const availability = await deps.provider.getAvailability();
78
+ if (availability === 'unavailable') {
79
+ emit(_errors.DIAGNOSTIC_CODES.PUSH_UNAVAILABLE, 'Platform push services are unavailable on this device. The push path is disabled; the entire local notification path is unaffected.');
80
+ }
81
+ return availability;
82
+ },
83
+ /** Waits for a genuine token. Never returns a placeholder presented as one. */
84
+ async getToken() {
85
+ const token = await deps.provider.getToken();
86
+ if (typeof token !== 'string' || token.length === 0) {
87
+ emit(_errors.DIAGNOSTIC_CODES.TOKEN_UNAVAILABLE, 'The provider has no registration token yet. An empty value is never returned as if it were one.');
88
+ throw new Error('Push token is not yet available.');
89
+ }
90
+ // The token value itself is never logged.
91
+ return token;
92
+ },
93
+ onTokenChange(handler) {
94
+ const unsubscribe = deps.provider.onTokenChange(handler);
95
+ tokenSubscriptions.add(unsubscribe);
96
+ return () => {
97
+ if (tokenSubscriptions.delete(unsubscribe)) {
98
+ unsubscribe();
99
+ }
100
+ };
101
+ },
102
+ async invalidateToken() {
103
+ const ok = await deps.provider.invalidateToken();
104
+ if (!ok) {
105
+ emit(_errors.DIAGNOSTIC_CODES.TOKEN_INVALIDATION_FAILED, 'Token invalidation did not succeed. The device may keep receiving messages for the previous account.');
106
+ }
107
+ return ok;
108
+ },
109
+ /**
110
+ * Subscribes to inbound payloads.
111
+ *
112
+ * Nothing is displayed automatically — the consumer decides whether and how
113
+ * to present a foreground push.
114
+ */
115
+ onPushReceived(handler) {
116
+ handlers.push(handler);
117
+ subscription ??= deps.provider.subscribeToMessages(receive);
118
+ return () => {
119
+ handlers = handlers.filter(h => h !== handler);
120
+ };
121
+ },
122
+ /**
123
+ * Processes a payload delivered while the app was in the background, from
124
+ * the module-scope handler `setBackgroundMessageHandler` requires (NOT-24).
125
+ *
126
+ * The same normalization and the same persisted deduplication as a
127
+ * foreground payload, so a redelivery after the process restarted is
128
+ * suppressed rather than handled twice. Resolves once every handler has run.
129
+ */
130
+ async handleBackground(raw) {
131
+ const envelope = receive(raw);
132
+ await deliveryChain;
133
+ return envelope;
134
+ },
135
+ /** Processes the payload that launched the app, if any. */
136
+ async collectInitial() {
137
+ const raw = await deps.provider.takeInitialMessage();
138
+ return raw === undefined ? undefined : receive(raw);
139
+ },
140
+ /** Reports a specific cause rather than leaving a non-delivery unexplained. */
141
+ reportUndeliverable(cause, context) {
142
+ emit(_errors.DIAGNOSTIC_CODES.PUSH_UNDELIVERABLE, `A push could not be delivered or displayed: ${cause}.`, {
143
+ cause,
144
+ ...context
145
+ });
146
+ },
147
+ /** Exposed for tests and orderly shutdown. */
148
+ async flush() {
149
+ await deliveryChain;
150
+ },
151
+ dispose() {
152
+ subscription?.();
153
+ subscription = undefined;
154
+ for (const unsubscribe of tokenSubscriptions) {
155
+ unsubscribe();
156
+ }
157
+ tokenSubscriptions.clear();
158
+ handlers = [];
159
+ }
160
+ };
161
+ }
162
+ //# sourceMappingURL=gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","_envelope","_dedupLedger","createPushGate","deps","emit","handlers","subscription","tokenSubscriptions","Set","deliveryChain","Promise","resolve","dispatch","envelope","then","handler","receive","raw","normalized","normalizeEnvelope","now","error","DIAGNOSTIC_CODES","PAYLOAD_MALFORMED","isNotificationError","message","context","undefined","versionSkew","PAYLOAD_VERSION_SKEW","version","IMPLEMENTED_PAYLOAD_VERSION","received","implemented","recordSeen","state","dedupId","ownerTag","PAYLOAD_DUPLICATE","getAvailability","availability","provider","PUSH_UNAVAILABLE","getToken","token","length","TOKEN_UNAVAILABLE","Error","onTokenChange","unsubscribe","add","delete","invalidateToken","ok","TOKEN_INVALIDATION_FAILED","onPushReceived","push","subscribeToMessages","filter","h","handleBackground","collectInitial","takeInitialMessage","reportUndeliverable","cause","PUSH_UNDELIVERABLE","flush","dispose","clear"],"sourceRoot":"../../../src","sources":["push/gate.ts"],"mappings":";;;;;;AAiBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBO,SAASG,cAAcA,CAACC,IAA0B,EAAE;EAC1D,MAAMC,IAAI,GAAGD,IAAI,CAACC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;EACpC,IAAIC,QAAuB,GAAG,EAAE;EAChC,IAAIC,YAAqC;EACzC;EACA,MAAMC,kBAAkB,GAAG,IAAIC,GAAG,CAAc,CAAC;EACjD,IAAIC,aAA4B,GAAGC,OAAO,CAACC,OAAO,CAAC,CAAC;EAEpD,MAAMC,QAAQ,GAAIC,QAAsB,IAAW;IAClDJ,aAAa,GAAGA,aAAa,CAACK,IAAI,CAAC,YAAY;MAC9C,KAAK,MAAMC,OAAO,IAAIV,QAAQ,EAAE;QAC/B,IAAI;UACH,MAAMU,OAAO,CAACF,QAAQ,CAAC;QACxB,CAAC,CAAC,MAAM;UACP;QAAA;MAEF;IACD,CAAC,CAAC;EACH,CAAC;EAED,MAAMG,OAAO,GAAIC,GAAY,IAA+B;IAC3D,IAAIC,UAAU;IACd,IAAI;MACHA,UAAU,GAAG,IAAAC,2BAAiB,EAACF,GAAG,EAAEd,IAAI,CAACiB,GAAG,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,OAAOC,KAAK,EAAE;MACf;MACA;MACAjB,IAAI,CACHkB,wBAAgB,CAACC,iBAAiB,EAClC,IAAAC,2BAAmB,EAACH,K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OAAOI,QAAQ;IAChB,CAAC;IAED;IACA,MAAMgD,cAAcA,CAAA,EAAsC;MACzD,MAAM5C,GAAG,GAAG,MAAMd,IAAI,CAACsC,QAAQ,CAACqB,kBAAkB,CAAC,CAAC;MACpD,OAAO7C,GAAG,KAAKU,SAAS,GAAGA,SAAS,GAAGX,OAAO,CAACC,GAAG,CAAC;IACpD,CAAC;IAED;IACA8C,mBAAmBA,CAACC,KAAyB,EAAEtC,OAAiC,EAAQ;MACvFtB,IAAI,CACHkB,wBAAgB,CAAC2C,kBAAkB,EACnC,+CAA+CD,KAAK,GAAG,EACvD;QAAEA,KAAK;QAAE,GAAGtC;MAAQ,CACrB,CAAC;IACF,CAAC;IAED;IACA,MAAMwC,KAAKA,CAAA,EAAkB;MAC5B,MAAMzD,aAAa;IACpB,CAAC;IAED0D,OAAOA,CAAA,EAAS;MACf7D,YAAY,GAAG,CAAC;MAChBA,YAAY,GAAGqB,SAAS;MACxB,KAAK,MAAMsB,WAAW,IAAI1C,kBAAkB,EAAE;QAC7C0C,WAAW,CAAC,CAAC;MACd;MACA1C,kBAAkB,CAAC6D,KAAK,CAAC,CAAC;MAC1B/D,QAAQ,GAAG,EAAE;IACd;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "IMPLEMENTED_PAYLOAD_VERSION", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _envelope.IMPLEMENTED_PAYLOAD_VERSION;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "createFcmProvider", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _fcmProvider.createFcmProvider;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "createInstructionHandler", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _instructions.createInstructionHandler;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "createPushGate", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _gate.createPushGate;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "createSignOut", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _signout.createSignOut;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "normalizeEnvelope", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _envelope.normalizeEnvelope;
40
+ }
41
+ });
42
+ var _gate = require("./gate.js");
43
+ var _fcmProvider = require("./fcm-provider.js");
44
+ var _signout = require("./signout.js");
45
+ var _instructions = require("./instructions.js");
46
+ var _envelope = require("./envelope.js");
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_gate","require","_fcmProvider","_signout","_instructions","_envelope"],"sourceRoot":"../../../src","sources":["push/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,QAAA,GAAAF,OAAA;AAGA,IAAAG,aAAA,GAAAH,OAAA;AAOA,IAAAI,SAAA,GAAAJ,OAAA","ignoreList":[]}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createInstructionHandler = createInstructionHandler;
7
+ var _errors = require("../contract/errors.js");
8
+ /**
9
+ * Push-driven local scheduling.
10
+ *
11
+ * Where the two paths meet. A server can schedule or cancel a local
12
+ * notification, and it gets **no privileged path**: an instruction arriving by
13
+ * push passes exactly the same identifier validation, moment validation, tone
14
+ * resolution, and permission rules as a request from app code.
15
+ *
16
+ * That symmetry is the point. A server that could bypass validation would be
17
+ * able to put the device into a state the app itself could not produce, and no
18
+ * amount of local correctness would survive it.
19
+ */
20
+
21
+ function createInstructionHandler(deps) {
22
+ const emit = deps.emit ?? (() => {});
23
+
24
+ /**
25
+ * Whether a local schedule already covers this event.
26
+ *
27
+ * Local wins: it is the entry the device can present at the right moment with
28
+ * no network. A server that genuinely wants to override sends an explicit
29
+ * cancel followed by a schedule, which is unambiguous in a way "last write
30
+ * wins" is not.
31
+ */
32
+ const localAlreadyCovers = async id => {
33
+ const pending = await deps.engine.getPending();
34
+ const existing = pending.find(entry => entry.id === id);
35
+ return existing !== undefined && !existing.pushCreated;
36
+ };
37
+ return {
38
+ async handle(envelope) {
39
+ if (envelope.kind !== 'schedule' && envelope.kind !== 'cancel') {
40
+ return {
41
+ kind: 'ignored',
42
+ id: envelope.id
43
+ };
44
+ }
45
+ try {
46
+ if (envelope.kind === 'cancel') {
47
+ await deps.scheduler.cancel(envelope.id);
48
+ return {
49
+ kind: 'cancelled',
50
+ id: envelope.id
51
+ };
52
+ }
53
+ if (envelope.moment === undefined || envelope.content === undefined) {
54
+ throw Object.assign(new Error('A schedule instruction must carry both a moment and content.'), {
55
+ code: _errors.DIAGNOSTIC_CODES.PAYLOAD_MALFORMED
56
+ });
57
+ }
58
+ if (await localAlreadyCovers(envelope.id)) {
59
+ emit(_errors.DIAGNOSTIC_CODES.PAYLOAD_DUPLICATE, 'A local schedule already covers this event; the push instruction was suppressed so the user sees exactly one notification.', {
60
+ id: envelope.id
61
+ });
62
+ return {
63
+ kind: 'suppressed',
64
+ id: envelope.id,
65
+ reason: 'A local schedule already covers this event.'
66
+ };
67
+ }
68
+ const result = await deps.scheduler.schedule({
69
+ id: envelope.id,
70
+ content: envelope.content,
71
+ tone: envelope.tone ?? '',
72
+ moment: envelope.moment,
73
+ routing: envelope.routing,
74
+ ownerTag: envelope.ownerTag
75
+ }, {
76
+ pushCreated: true
77
+ });
78
+ return {
79
+ kind: 'scheduled',
80
+ id: envelope.id,
81
+ replaced: result.replaced
82
+ };
83
+ } catch (error) {
84
+ // Rejected under exactly the rules an app-initiated request would face,
85
+ // and recorded rather than swallowed.
86
+ const code = (0, _errors.isNotificationError)(error) ? error.code : error.code ?? 'UNKNOWN';
87
+ const reason = error instanceof Error ? error.message : String(error);
88
+ emit(code, `Push instruction rejected: ${reason}`, {
89
+ id: envelope.id
90
+ });
91
+ return {
92
+ kind: 'rejected',
93
+ id: envelope.id,
94
+ code,
95
+ reason
96
+ };
97
+ }
98
+ }
99
+ };
100
+ }
101
+ //# sourceMappingURL=instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","createInstructionHandler","deps","emit","localAlreadyCovers","id","pending","engine","getPending","existing","find","entry","undefined","pushCreated","handle","envelope","kind","scheduler","cancel","moment","content","Object","assign","Error","code","DIAGNOSTIC_CODES","PAYLOAD_MALFORMED","PAYLOAD_DUPLICATE","reason","result","schedule","tone","routing","ownerTag","replaced","error","isNotificationError","message","String"],"sourceRoot":"../../../src","sources":["push/instructions.ts"],"mappings":";;;;;;AAgBA,IAAAA,OAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBO,SAASC,wBAAwBA,CAACC,IAA6B,EAAE;EACvE,MAAMC,IAAI,GAAGD,IAAI,CAACC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;;EAEpC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAMC,kBAAkB,GAAG,MAAOC,EAAU,IAAuB;IAClE,MAAMC,OAAO,GAAG,MAAMJ,IAAI,CAACK,MAAM,CAACC,UAAU,CAAC,CAAC;IAC9C,MAAMC,QAAQ,GAAGH,OAAO,CAACI,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACN,EAAE,KAAKA,EAAE,CAAC;IACvD,OAAOI,QAAQ,KAAKG,SAAS,IAAI,CAACH,QAAQ,CAACI,WAAW;EACvD,CAAC;EAED,OAAO;IACN,MAAMC,MAAMA,CAACC,QAAsB,EAA+B;MACjE,IAAIA,QAAQ,CAACC,IAAI,KAAK,UAAU,IAAID,QAAQ,CAACC,IAAI,KAAK,QAAQ,EAAE;QAC/D,OAAO;UAAEA,IAAI,EAAE,SAAS;UAAEX,EAAE,EAAEU,QAAQ,CAACV;Q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B,QAAQ,EAAEL,MAAM,CAACK;QAAS,CAAC;MACzE,CAAC,CAAC,OAAOC,KAAK,EAAE;QACf;QACA;QACA,MAAMX,IAAI,GAAG,IAAAY,2BAAmB,EAACD,KAAK,CAAC,GACpCA,KAAK,CAACX,IAAI,GACRW,KAAK,CAAuBX,IAAI,IAAI,SAAU;QACnD,MAAMI,MAAM,GAAGO,KAAK,YAAYZ,KAAK,GAAGY,KAAK,CAACE,OAAO,GAAGC,MAAM,CAACH,KAAK,CAAC;QAErEhC,IAAI,CAACqB,IAAI,EAAE,8BAA8BI,MAAM,EAAE,EAAE;UAAEvB,EAAE,EAAEU,QAAQ,CAACV;QAAG,CAAC,CAAC;QACvE,OAAO;UAAEW,IAAI,EAAE,UAAU;UAAEX,EAAE,EAAEU,QAAQ,CAACV,EAAE;UAAEmB,IAAI;UAAEI;QAAO,CAAC;MAC3D;IACD;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=provider-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["push/provider-adapter.ts"],"mappings":"","ignoreList":[]}