@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,218 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.runConformanceSuite = runConformanceSuite;
7
+ /**
8
+ * The shared conformance suite.
9
+ *
10
+ * The executable definition of what an engine adapter must do. Run against the
11
+ * real engine and against the fake, it is what backs the claim that testing
12
+ * with fakes proves something about production — if the two ever diverge, this
13
+ * is where it shows up rather than on a user's device.
14
+ *
15
+ * Written as a plain async function rather than a Jest suite so it can be
16
+ * driven from the demo app on a real device as well as from continuous
17
+ * integration.
18
+ */
19
+
20
+ const TONE = {
21
+ toneId: 'conformance',
22
+ version: 1,
23
+ android: {
24
+ channelId: 'conformance.v1',
25
+ importance: 'default',
26
+ vibration: false,
27
+ badge: false,
28
+ bypassDnd: false,
29
+ name: 'Fixture tone',
30
+ loopSound: false,
31
+ alarmCategory: false
32
+ },
33
+ ios: {
34
+ categoryId: 'conformance',
35
+ interruptionLevel: 'active',
36
+ badge: false,
37
+ repeatRefused: false
38
+ }
39
+ };
40
+ async function runConformanceSuite(adapter, options = {}) {
41
+ const now = options.now ?? (() => Date.now());
42
+ const prefix = options.prefix ?? 'conformance';
43
+ const checks = [];
44
+ const check = async (name, run) => {
45
+ try {
46
+ const outcome = await run();
47
+ checks.push(outcome === true ? {
48
+ name,
49
+ passed: true
50
+ } : {
51
+ name,
52
+ passed: false,
53
+ detail: typeof outcome === 'string' ? outcome : 'returned false'
54
+ });
55
+ } catch (error) {
56
+ checks.push({
57
+ name,
58
+ passed: false,
59
+ detail: error instanceof Error ? error.message : String(error)
60
+ });
61
+ }
62
+ };
63
+ const id = suffix => `${prefix}:${suffix}`;
64
+ const at = now() + 3_600_000;
65
+ const schedule = (suffix, overrides = {}) => adapter.schedule({
66
+ request: {
67
+ id: id(suffix),
68
+ content: {
69
+ title: `Conformance ${suffix}`,
70
+ body: 'Suite entry'
71
+ },
72
+ tone: 'conformance',
73
+ moment: {
74
+ at
75
+ },
76
+ ...overrides
77
+ },
78
+ resolvedAt: at,
79
+ tone: TONE,
80
+ approximate: false
81
+ });
82
+
83
+ // Start clean so a previous run cannot mask a failure.
84
+ await adapter.cancelAll();
85
+ await check('reports its capabilities', async () => {
86
+ const capabilities = await adapter.getCapabilities();
87
+ return capabilities.pendingCeiling > 0 || `pendingCeiling must be positive, got ${capabilities.pendingCeiling}`;
88
+ });
89
+ await check('schedules and reads back an entry', async () => {
90
+ await schedule('a');
91
+ const pending = await adapter.getPending();
92
+ return pending.some(entry => entry.id === id('a')) || 'scheduled entry was not returned';
93
+ });
94
+ await check('returns enough detail to diff, not merely to count', async () => {
95
+ const [entry] = (await adapter.getPending()).filter(e => e.id === id('a'));
96
+ if (entry === undefined) return 'entry missing';
97
+ return entry.content.title.length > 0 && entry.resolvedAt > 0 && entry.anchoring !== undefined || 'entry lacked content, instant, or anchoring mode';
98
+ });
99
+ await check('replaces rather than duplicates on the same identifier', async () => {
100
+ await schedule('a', {
101
+ content: {
102
+ title: 'Replaced',
103
+ body: 'Newer'
104
+ }
105
+ });
106
+ const matching = (await adapter.getPending()).filter(entry => entry.id === id('a'));
107
+ return matching.length === 1 || `expected exactly 1 entry, found ${matching.length}`;
108
+ });
109
+ await check('round-trips a routing payload unchanged', async () => {
110
+ await schedule('routing', {
111
+ routing: {
112
+ screen: 'task',
113
+ nested: {
114
+ deep: true
115
+ }
116
+ }
117
+ });
118
+ const entry = (await adapter.getPending()).find(e => e.id === id('routing'));
119
+ return JSON.stringify(entry?.routing) === JSON.stringify({
120
+ screen: 'task',
121
+ nested: {
122
+ deep: true
123
+ }
124
+ }) || `routing payload changed: ${JSON.stringify(entry?.routing)}`;
125
+ });
126
+ await check('preserves the anchoring mode it was given', async () => {
127
+ await schedule('absolute', {
128
+ moment: {
129
+ at,
130
+ anchoring: 'absolute'
131
+ }
132
+ });
133
+ const entry = (await adapter.getPending()).find(e => e.id === id('absolute'));
134
+ return entry?.anchoring === 'absolute' || `expected absolute, got ${entry?.anchoring}`;
135
+ });
136
+ await check('cancels one entry without touching the others', async () => {
137
+ const before = (await adapter.getPending()).length;
138
+ await adapter.cancel(id('a'));
139
+ const after = await adapter.getPending();
140
+ return after.length === before - 1 && !after.some(entry => entry.id === id('a')) || 'cancel removed the wrong number of entries';
141
+ });
142
+ await check('cancelling something absent is harmless', async () => {
143
+ await adapter.cancel(id('never-existed'));
144
+ return true;
145
+ });
146
+ await check('reports permission state without throwing', async () => {
147
+ const state = await adapter.getPermission('display');
148
+ return ['notAsked', 'granted', 'denied', 'permanentlyDenied', 'provisional', 'notRequired'].includes(state) || `unexpected permission state: ${state}`;
149
+ });
150
+ await check('reports background restrictions, admitting unknown', async () => {
151
+ const report = await adapter.getRestrictions();
152
+ return ['unrestricted', 'restricted', 'unknown'].includes(report.batteryOptimization) || `unexpected restriction status: ${report.batteryOptimization}`;
153
+ });
154
+ await check('returns pending entries in ascending delivery order', async () => {
155
+ const pending = await adapter.getPending();
156
+ const instants = pending.map(entry => entry.resolvedAt);
157
+ const sorted = [...instants].sort((x, y) => x - y);
158
+ return JSON.stringify(instants) === JSON.stringify(sorted) || 'entries were not time-ordered';
159
+ });
160
+ await check('cancelAll leaves nothing behind', async () => {
161
+ await adapter.cancelAll();
162
+ const pending = await adapter.getPending();
163
+ return pending.length === 0 || `${pending.length} entries survived cancelAll`;
164
+ });
165
+
166
+ // --- Repeat expiry -------------------------------------------------------
167
+ // A substituted engine must be checked on these, not trusted: every one of
168
+ // them is a way to end up with a device that will not stop ringing, or with
169
+ // a consumer cancelling an artifact it was never meant to see.
170
+
171
+ await check('answers whether it can repeat an alert, rather than guessing', async () => {
172
+ const capabilities = await adapter.getCapabilities();
173
+ return typeof capabilities.supportsRepeatingAlert === 'boolean' || 'supportsRepeatingAlert was not a boolean';
174
+ });
175
+ await check('reports a repeating alert it cannot honour', async () => {
176
+ const capabilities = await adapter.getCapabilities();
177
+ if (capabilities.supportsRepeatingAlert) return true;
178
+
179
+ // A partially emulated repeat is worse than an honest refusal: the
180
+ // consumer believes the alarm is bounded when nothing bounds it.
181
+ const repeating = {
182
+ ...TONE,
183
+ android: {
184
+ ...TONE.android,
185
+ loopSound: true,
186
+ repeatForMs: 900_000
187
+ },
188
+ ios: {
189
+ ...TONE.ios,
190
+ repeatRefused: true
191
+ }
192
+ };
193
+ return repeating.ios.repeatRefused || 'refusal was not recorded on the resolved tone';
194
+ });
195
+ await check('keeps stop markers out of the consumer-visible pending set', async () => {
196
+ const stops = await adapter.listRepeatStops();
197
+ const pending = await adapter.getPending();
198
+ const leaked = pending.filter(entry => stops.some(stop => stop.markerId === entry.id));
199
+ return leaked.length === 0 || `${leaked.length} package-owned marker(s) were reported as consumer notifications`;
200
+ });
201
+ await check('silencing a notification that is gone is an answer, not a failure', async () => {
202
+ // The ordinary case after the user has handled it. An engine that throws
203
+ // here turns the commonest path into an error.
204
+ const silenced = await adapter.silenceDelivered(id('never-displayed'));
205
+ return silenced === false || 'reported silencing a notification it was not displaying';
206
+ });
207
+ await check('says whether a background delivery handler is registered', async () => {
208
+ return typeof adapter.hasBackgroundDeliveryHandler() === 'boolean' || 'hasBackgroundDeliveryHandler was not a boolean';
209
+ });
210
+ const passed = checks.filter(entry => entry.passed).length;
211
+ return {
212
+ adapter: adapter.name,
213
+ checks,
214
+ passed,
215
+ failed: checks.length - passed
216
+ };
217
+ }
218
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TONE","toneId","version","android","channelId","importance","vibration","badge","bypassDnd","name","loopSound","alarmCategory","ios","categoryId","interruptionLevel","repeatRefused","runConformanceSuite","adapter","options","now","Date","prefix","checks","check","run","outcome","push","passed","detail","error","Error","message","String","id","suffix","at","schedule","overrides","request","content","title","body","tone","moment","resolvedAt","approximate","cancelAll","capabilities","getCapabilities","pendingCeiling","pending","getPending","some","entry","filter","e","undefined","length","anchoring","matching","routing","screen","nested","deep","find","JSON","stringify","before","cancel","after","state","getPermission","includes","report","getRestrictions","batteryOptimization","instants","map","sorted","sort","x","y","supportsRepeatingAlert","repeating","repeatForMs","stops","listRepeatStops","leaked","stop","markerId","silenced","silenceDelivered","hasBackgroundDeliveryHandler","failed"],"sourceRoot":"../../../../src","sources":["testing/conformance/index.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAMA,IAAkB,GAAG;EAC1BC,MAAM,EAAE,aAAa;EACrBC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE;IACRC,SAAS,EAAE,gBAAgB;IAC3BC,UAAU,EAAE,SAAS;IACrBC,SAAS,EAAE,KAAK;IAChBC,KAAK,EAAE,KAAK;IACZC,SAAS,EAAE,KAAK;IAChBC,IAAI,EAAE,cAAc;IACpBC,SAAS,EAAE,KAAK;IAChBC,aAAa,EAAE;EAChB,CAAC;EACDC,GAAG,EAAE;IACJC,UAAU,EAAE,aAAa;IACzBC,iBAAiB,EAAE,QAAQ;IAC3BP,KAAK,EAAE,KAAK;IACZQ,aAA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DAAgD;EAElD,CAAC,CAAC;EAEF,MAAMjE,MAAM,GAAGL,MAAM,CAACgC,MAAM,CAACD,KAAK,IAAIA,KAAK,CAAC1B,MAAM,CAAC,CAAC8B,MAAM;EAE1D,OAAO;IACNxC,OAAO,EAAEA,OAAO,CAACR,IAAI;IACrBa,MAAM;IACNK,MAAM;IACNkE,MAAM,EAAEvE,MAAM,CAACmC,MAAM,GAAG9B;EACzB,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,338 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createFakeEngine = createFakeEngine;
7
+ var _marker = require("../repeat/marker.js");
8
+ var _codec = require("../engine/codec.js");
9
+ /**
10
+ * In-memory engine for tests.
11
+ *
12
+ * Exists so every decision path is provable with no device, no emulator, and
13
+ * no live provider. Its controls simulate the conditions that are otherwise
14
+ * only reachable on hardware: virtual time, time-zone travel, permission
15
+ * transitions, process death, boot-restoration gaps, and platform truncation.
16
+ */
17
+
18
+ /** Every platform operation the engine was asked to perform, in order. */
19
+
20
+ /** A notification the fake has delivered to the tray. */
21
+
22
+ function createFakeEngine(options = {}) {
23
+ const scheduled = new Map();
24
+ const channels = new Map();
25
+ const loops = new Map();
26
+ const stops = new Map();
27
+ const tray = new Map();
28
+ let operations = [];
29
+ let listeners = [];
30
+ let deliveryListeners = [];
31
+ let backgroundHandler;
32
+ let backgroundInteractionHandler;
33
+ let initialInteraction;
34
+ let currentTime = options.now ?? Date.UTC(2026, 0, 1, 12, 0, 0);
35
+ let currentZone = options.timeZone ?? 'UTC';
36
+ const permissions = {
37
+ display: options.initialPermissions?.display ?? 'notAsked',
38
+ exactAlarm: options.initialPermissions?.exactAlarm ?? 'notAsked'
39
+ };
40
+ let restrictions = {
41
+ batteryOptimization: 'unrestricted',
42
+ autoStart: 'unrestricted',
43
+ readAt: currentTime
44
+ };
45
+ const capabilities = {
46
+ pendingCeiling: options.pendingCeiling ?? 64,
47
+ supportsExactAlarms: options.supportsExactAlarms ?? true,
48
+ supportsChannels: true,
49
+ supportsTextInputActions: true,
50
+ supportsDoNotDisturbBypass: options.supportsDoNotDisturbBypass ?? true,
51
+ supportsRepeatingAlert: options.supportsRepeatingAlert ?? true,
52
+ backgroundWindowMs: options.backgroundWindowMs ?? 30_000
53
+ };
54
+ const record = (kind, id) => {
55
+ operations.push({
56
+ kind,
57
+ id,
58
+ at: currentTime
59
+ });
60
+ };
61
+
62
+ // Through the same data-bag codec the real engine uses, so a field the device
63
+ // would lose is lost here too rather than hidden by a verbatim copy.
64
+ const toPendingEntry = request => {
65
+ const metadata = (0, _codec.unpackData)((0, _codec.packData)(request));
66
+ return {
67
+ id: request.request.id,
68
+ resolvedAt: request.resolvedAt,
69
+ content: request.request.content,
70
+ ...metadata,
71
+ // The fake models the device clock's zone directly instead of trusting
72
+ // the caller's, which is how re-anchoring tests simulate a zone change.
73
+ anchoringGeneration: metadata.anchoring === 'wallClock' ? currentZone : undefined
74
+ };
75
+ };
76
+ return {
77
+ name: 'fake',
78
+ async getCapabilities() {
79
+ return capabilities;
80
+ },
81
+ async schedule(request) {
82
+ record('schedule', request.request.id);
83
+ scheduled.set(request.request.id, toPendingEntry(request));
84
+ loops.set(request.request.id, request.tone.android.loopSound);
85
+ if (request.repeatStop !== undefined) {
86
+ stops.set(request.request.id, request.repeatStop);
87
+ }
88
+ },
89
+ async cancel(id) {
90
+ record('cancel', id);
91
+ scheduled.delete(id);
92
+ loops.delete(id);
93
+ stops.delete(id);
94
+ tray.delete(id);
95
+ },
96
+ async cancelMany(ids) {
97
+ for (const id of ids) {
98
+ record('cancel', id);
99
+ scheduled.delete(id);
100
+ loops.delete(id);
101
+ stops.delete(id);
102
+ tray.delete(id);
103
+ }
104
+ },
105
+ async cancelAll() {
106
+ record('cancelAll');
107
+ scheduled.clear();
108
+ loops.clear();
109
+ stops.clear();
110
+ tray.clear();
111
+ },
112
+ async getPending() {
113
+ // Stop markers are package-owned artifacts, not user notifications. A
114
+ // consumer diffing the device against its own intent must never see one.
115
+ return [...scheduled.values()].filter(entry => !(0, _marker.isRepeatStopId)(entry.id)).sort((a, b) => a.resolvedAt - b.resolvedAt);
116
+ },
117
+ async declareTone(tone) {
118
+ record('declareTone', tone.android.channelId);
119
+ const existing = channels.get(tone.android.channelId);
120
+ if (existing === undefined) {
121
+ channels.set(tone.android.channelId, {
122
+ name: tone.android.name,
123
+ description: tone.android.description
124
+ });
125
+ return 'created';
126
+ }
127
+
128
+ // Android freezes importance, sound, vibration and DND once a channel
129
+ // exists, but re-declaring updates the name and description. The fake
130
+ // mirrors exactly that: labels move, everything else is ignored — which
131
+ // is what makes a label correction free for the user.
132
+ if (existing.name === tone.android.name && existing.description === tone.android.description) {
133
+ return 'unchanged';
134
+ }
135
+ channels.set(tone.android.channelId, {
136
+ name: tone.android.name,
137
+ description: tone.android.description
138
+ });
139
+ return 'labelsRefreshed';
140
+ },
141
+ async retireTone(channelId) {
142
+ record('retireTone', channelId);
143
+ return channels.delete(channelId);
144
+ },
145
+ async declareGroups(_groups) {
146
+ // Groups are presentational; the fake accepts them without recording.
147
+ },
148
+ async listDeclaredChannels() {
149
+ return [...channels.keys()];
150
+ },
151
+ async getPermission(kind) {
152
+ return permissions[kind];
153
+ },
154
+ async requestPermission(kind) {
155
+ if (permissions[kind] === 'notAsked') {
156
+ permissions[kind] = 'granted';
157
+ }
158
+ return permissions[kind];
159
+ },
160
+ async openSettings(_kind) {
161
+ // No-op: the fake cannot open a settings screen, and pretending it did would be a lie.
162
+ },
163
+ async getRestrictions() {
164
+ return {
165
+ ...restrictions,
166
+ readAt: currentTime
167
+ };
168
+ },
169
+ subscribeToInteractions(handler) {
170
+ listeners.push(handler);
171
+ return () => {
172
+ listeners = listeners.filter(l => l !== handler);
173
+ };
174
+ },
175
+ async takeInitialInteraction() {
176
+ const event = initialInteraction;
177
+ initialInteraction = undefined;
178
+ return event;
179
+ },
180
+ async silenceDelivered(id) {
181
+ record('silence', id);
182
+ const entry = tray.get(id);
183
+ // Absent is the ordinary case, not an error: the user handled it before
184
+ // the window ran out.
185
+ if (entry === undefined) return false;
186
+
187
+ // Replaced in place, never removed. A notification that vanished is a
188
+ // worse outcome than one that never sounded.
189
+ tray.set(id, {
190
+ ...entry,
191
+ alerting: false
192
+ });
193
+ return true;
194
+ },
195
+ async listRepeatStops() {
196
+ return [...stops.values()].filter(stop => scheduled.has(stop.markerId));
197
+ },
198
+ subscribeToDeliveries(handler) {
199
+ deliveryListeners.push(handler);
200
+ return () => {
201
+ deliveryListeners = deliveryListeners.filter(l => l !== handler);
202
+ };
203
+ },
204
+ registerBackgroundDeliveryHandler(handler, onInteraction) {
205
+ backgroundHandler = handler;
206
+ backgroundInteractionHandler = onInteraction;
207
+ },
208
+ hasBackgroundDeliveryHandler() {
209
+ return backgroundHandler !== undefined;
210
+ },
211
+ // --- FakeControls ------------------------------------------------------
212
+
213
+ get operations() {
214
+ return operations;
215
+ },
216
+ clearOperations() {
217
+ operations = [];
218
+ },
219
+ now() {
220
+ return currentTime;
221
+ },
222
+ advanceTime(ms) {
223
+ currentTime += ms;
224
+ },
225
+ setTime(epochMs) {
226
+ currentTime = epochMs;
227
+ },
228
+ timeZone() {
229
+ return currentZone;
230
+ },
231
+ setTimeZone(zone) {
232
+ currentZone = zone;
233
+ },
234
+ setPermission(kind, state) {
235
+ permissions[kind] = state;
236
+ },
237
+ setRestrictions(report) {
238
+ restrictions = {
239
+ ...restrictions,
240
+ ...report
241
+ };
242
+ },
243
+ applyPlatformCeiling() {
244
+ const ordered = [...scheduled.values()].sort((a, b) => a.resolvedAt - b.resolvedAt);
245
+ const dropped = ordered.slice(capabilities.pendingCeiling);
246
+ for (const entry of dropped) {
247
+ scheduled.delete(entry.id);
248
+ }
249
+ return dropped.map(entry => entry.id);
250
+ },
251
+ simulateProcessDeath() {
252
+ // Scheduled notifications live in the OS and survive; in-process
253
+ // listeners do not. The background handler does survive, because on a
254
+ // real device it is registered at module scope and the platform starts
255
+ // a fresh process to run it — which is the entire reason repeat expiry
256
+ // depends on it rather than on a foreground subscription.
257
+ listeners = [];
258
+ deliveryListeners = [];
259
+ operations = [];
260
+ },
261
+ simulateBootGap(ids) {
262
+ for (const id of ids) {
263
+ scheduled.delete(id);
264
+ }
265
+ },
266
+ async emitBackgroundInteraction(event) {
267
+ const background = {
268
+ ...event,
269
+ appState: 'background'
270
+ };
271
+ if (listeners.length > 0) {
272
+ for (const listener of [...listeners]) listener(background);
273
+ return;
274
+ }
275
+ await backgroundInteractionHandler?.(background);
276
+ },
277
+ emitInteraction(event) {
278
+ for (const listener of listeners) {
279
+ listener(event);
280
+ }
281
+ },
282
+ queueInitialInteraction(event) {
283
+ initialInteraction = event;
284
+ },
285
+ channelLabels(channelId) {
286
+ return channels.get(channelId);
287
+ },
288
+ isAlerting(id) {
289
+ return tray.get(id)?.alerting ?? false;
290
+ },
291
+ displayed() {
292
+ return [...tray.entries()].map(([id, entry]) => ({
293
+ id,
294
+ tone: entry.tone,
295
+ alerting: entry.alerting,
296
+ deliveredAt: entry.deliveredAt
297
+ }));
298
+ },
299
+ async deliverDue() {
300
+ const due = [...scheduled.values()].filter(entry => entry.resolvedAt <= currentTime).sort((a, b) => a.resolvedAt - b.resolvedAt);
301
+ const delivered = [];
302
+ for (const entry of due) {
303
+ scheduled.delete(entry.id);
304
+ const stop = stops.get(entry.id);
305
+ if (stop === undefined) {
306
+ // A real notification: it lands in the tray and, if its tone
307
+ // repeats, keeps sounding until something stops it.
308
+ tray.set(entry.id, {
309
+ tone: entry.tone,
310
+ alerting: loops.get(entry.id) ?? false,
311
+ deliveredAt: currentTime
312
+ });
313
+ }
314
+ const event = {
315
+ notificationId: entry.id,
316
+ occurredAt: currentTime,
317
+ repeatStop: stop
318
+ };
319
+
320
+ // Foreground listeners when the process is alive, the background
321
+ // handler when it is not — the same fork a real device makes.
322
+ if (deliveryListeners.length > 0) {
323
+ for (const listener of deliveryListeners) {
324
+ listener(event);
325
+ }
326
+ } else if (backgroundHandler !== undefined) {
327
+ await backgroundHandler(event);
328
+ }
329
+ delivered.push(entry.id);
330
+ }
331
+ return delivered;
332
+ },
333
+ handleDisplayed(id) {
334
+ tray.delete(id);
335
+ }
336
+ };
337
+ }
338
+ //# sourceMappingURL=fake-engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_marker","require","_codec","createFakeEngine","options","scheduled","Map","channels","loops","stops","tray","operations","listeners","deliveryListeners","backgroundHandler","backgroundInteractionHandler","initialInteraction","currentTime","now","Date","UTC","currentZone","timeZone","permissions","display","initialPermissions","exactAlarm","restrictions","batteryOptimization","autoStart","readAt","capabilities","pendingCeiling","supportsExactAlarms","supportsChannels","supportsTextInputActions","supportsDoNotDisturbBypass","supportsRepeatingAlert","backgroundWindowMs","record","kind","id","push","at","toPendingEntry","request","metadata","unpackData","packData","resolvedAt","content","anchoringGeneration","anchoring","undefined","name","getCapabilities","schedule","set","tone","android","loopSound","repeatStop","cancel","delete","cancelMany","ids","cancelAll","clear","getPending","values","filter","entry","isRepeatStopId","sort","a","b","declareTone","channelId","existing","get","description","retireTone","declareGroups","_groups","listDeclaredChannels","keys","getPermission","requestPermission","openSettings","_kind","getRestrictions","subscribeToInteractions","handler","l","takeInitialInteraction","event","silenceDelivered","alerting","listRepeatStops","stop","has","markerId","subscribeToDeliveries","registerBackgroundDeliveryHandler","onInteraction","hasBackgroundDeliveryHandler","clearOperations","advanceTime","ms","setTime","epochMs","setTimeZone","zone","setPermission","state","setRestrictions","report","applyPlatformCeiling","ordered","dropped","slice","map","simulateProcessDeath","simulateBootGap","emitBackgroundInteraction","background","appState","length","listener","emitInteraction","queueInitialInteraction","channelLabels","isAlerting","displayed","entries","deliveredAt","deliverDue","due","delivered","notificationId","occurredAt","handleDisplayed"],"sourceRoot":"../../../src","sources":["testing/fake-engine.ts"],"mappings":";;;;;;AAqBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAtBA;AACA;AACA;AACA;AACA;AACA;AACA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