@chipmobilesdk/rn-notification 0.5.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.
- package/CHANGELOG.md +184 -0
- package/README.md +108 -16
- package/lib/commonjs/advanced.js +139 -0
- package/lib/commonjs/advanced.js.map +1 -0
- package/lib/commonjs/channel/migrate.js +246 -0
- package/lib/commonjs/channel/migrate.js.map +1 -0
- package/lib/commonjs/channel/tone-map.js +120 -0
- package/lib/commonjs/channel/tone-map.js.map +1 -0
- package/lib/commonjs/channel/validate-tone.js +61 -0
- package/lib/commonjs/channel/validate-tone.js.map +1 -0
- package/lib/commonjs/contract/channel.js +52 -0
- package/lib/commonjs/contract/channel.js.map +1 -0
- package/lib/commonjs/contract/diagnostics.js +25 -0
- package/lib/commonjs/contract/diagnostics.js.map +1 -0
- package/lib/commonjs/contract/errors.js +126 -0
- package/lib/commonjs/contract/errors.js.map +1 -0
- package/lib/commonjs/contract/hash.js +35 -0
- package/lib/commonjs/contract/hash.js.map +1 -0
- package/lib/commonjs/contract/index.js +94 -0
- package/lib/commonjs/contract/index.js.map +1 -0
- package/lib/commonjs/contract/interaction.js +37 -0
- package/lib/commonjs/contract/interaction.js.map +1 -0
- package/lib/commonjs/contract/notification.js +42 -0
- package/lib/commonjs/contract/notification.js.map +1 -0
- package/lib/commonjs/contract/permission.js +2 -0
- package/lib/commonjs/contract/permission.js.map +1 -0
- package/lib/commonjs/contract/reconcile.js +6 -0
- package/lib/commonjs/contract/reconcile.js.map +1 -0
- package/lib/commonjs/contract/recurrence.js +53 -0
- package/lib/commonjs/contract/recurrence.js.map +1 -0
- package/lib/commonjs/diagnostics/burst.js +89 -0
- package/lib/commonjs/diagnostics/burst.js.map +1 -0
- package/lib/commonjs/diagnostics/events.js +63 -0
- package/lib/commonjs/diagnostics/events.js.map +1 -0
- package/lib/commonjs/diagnostics/redact.js +48 -0
- package/lib/commonjs/diagnostics/redact.js.map +1 -0
- package/lib/commonjs/diagnostics/snapshot.js +68 -0
- package/lib/commonjs/diagnostics/snapshot.js.map +1 -0
- package/lib/commonjs/engine/adapter.js +6 -0
- package/lib/commonjs/engine/adapter.js.map +1 -0
- package/lib/commonjs/engine/codec.js +84 -0
- package/lib/commonjs/engine/codec.js.map +1 -0
- package/lib/commonjs/engine/notify-kit/events.js +148 -0
- package/lib/commonjs/engine/notify-kit/events.js.map +1 -0
- package/lib/commonjs/engine/notify-kit/module.js +119 -0
- package/lib/commonjs/engine/notify-kit/module.js.map +1 -0
- package/lib/commonjs/engine/notify-kit/platform/android.js +159 -0
- package/lib/commonjs/engine/notify-kit/platform/android.js.map +1 -0
- package/lib/commonjs/engine/notify-kit/platform/index.js +57 -0
- package/lib/commonjs/engine/notify-kit/platform/index.js.map +1 -0
- package/lib/commonjs/engine/notify-kit/platform/ios.js +54 -0
- package/lib/commonjs/engine/notify-kit/platform/ios.js.map +1 -0
- package/lib/commonjs/engine/notify-kit/platform/types.js +6 -0
- package/lib/commonjs/engine/notify-kit/platform/types.js.map +1 -0
- package/lib/commonjs/engine/notify-kit-engine.js +260 -0
- package/lib/commonjs/engine/notify-kit-engine.js.map +1 -0
- package/lib/commonjs/index.js +367 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/initialize.js +187 -0
- package/lib/commonjs/initialize.js.map +1 -0
- package/lib/commonjs/interaction/index.js +120 -0
- package/lib/commonjs/interaction/index.js.map +1 -0
- package/lib/commonjs/maintenance/cycle.js +108 -0
- package/lib/commonjs/maintenance/cycle.js.map +1 -0
- package/lib/commonjs/maintenance/permission-refresh.js +39 -0
- package/lib/commonjs/maintenance/permission-refresh.js.map +1 -0
- package/lib/commonjs/maintenance/reanchor.js +99 -0
- package/lib/commonjs/maintenance/reanchor.js.map +1 -0
- package/lib/commonjs/maintenance/toggle.js +50 -0
- package/lib/commonjs/maintenance/toggle.js.map +1 -0
- package/lib/commonjs/maintenance/verify.js +70 -0
- package/lib/commonjs/maintenance/verify.js.map +1 -0
- package/lib/commonjs/maintenance/window-refresh.js +53 -0
- package/lib/commonjs/maintenance/window-refresh.js.map +1 -0
- package/lib/commonjs/notifications.js +161 -0
- package/lib/commonjs/notifications.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/permission/index.js +182 -0
- package/lib/commonjs/permission/index.js.map +1 -0
- package/lib/commonjs/permission/state.js +92 -0
- package/lib/commonjs/permission/state.js.map +1 -0
- package/lib/commonjs/push/envelope.js +141 -0
- package/lib/commonjs/push/envelope.js.map +1 -0
- package/lib/commonjs/push/fcm-provider.js +122 -0
- package/lib/commonjs/push/fcm-provider.js.map +1 -0
- package/lib/commonjs/push/gate.js +162 -0
- package/lib/commonjs/push/gate.js.map +1 -0
- package/lib/commonjs/push/index.js +47 -0
- package/lib/commonjs/push/index.js.map +1 -0
- package/lib/commonjs/push/instructions.js +101 -0
- package/lib/commonjs/push/instructions.js.map +1 -0
- package/lib/commonjs/push/provider-adapter.js +6 -0
- package/lib/commonjs/push/provider-adapter.js.map +1 -0
- package/lib/commonjs/push/signout.js +55 -0
- package/lib/commonjs/push/signout.js.map +1 -0
- package/lib/commonjs/reconcile/chunk.js +49 -0
- package/lib/commonjs/reconcile/chunk.js.map +1 -0
- package/lib/commonjs/reconcile/diff.js +105 -0
- package/lib/commonjs/reconcile/diff.js.map +1 -0
- package/lib/commonjs/reconcile/duplicates.js +60 -0
- package/lib/commonjs/reconcile/duplicates.js.map +1 -0
- package/lib/commonjs/reconcile/index.js +164 -0
- package/lib/commonjs/reconcile/index.js.map +1 -0
- package/lib/commonjs/reconcile/truncate.js +50 -0
- package/lib/commonjs/reconcile/truncate.js.map +1 -0
- package/lib/commonjs/recurrence/clock-guard.js +65 -0
- package/lib/commonjs/recurrence/clock-guard.js.map +1 -0
- package/lib/commonjs/recurrence/expand.js +254 -0
- package/lib/commonjs/recurrence/expand.js.map +1 -0
- package/lib/commonjs/recurrence/index.js +212 -0
- package/lib/commonjs/recurrence/index.js.map +1 -0
- package/lib/commonjs/repeat/expiry.js +41 -0
- package/lib/commonjs/repeat/expiry.js.map +1 -0
- package/lib/commonjs/repeat/index.js +100 -0
- package/lib/commonjs/repeat/index.js.map +1 -0
- package/lib/commonjs/repeat/marker.js +58 -0
- package/lib/commonjs/repeat/marker.js.map +1 -0
- package/lib/commonjs/repeat/place.js +83 -0
- package/lib/commonjs/repeat/place.js.map +1 -0
- package/lib/commonjs/schedule/anchor.js +243 -0
- package/lib/commonjs/schedule/anchor.js.map +1 -0
- package/lib/commonjs/schedule/index.js +142 -0
- package/lib/commonjs/schedule/index.js.map +1 -0
- package/lib/commonjs/schedule/partition.js +59 -0
- package/lib/commonjs/schedule/partition.js.map +1 -0
- package/lib/commonjs/schedule/resolve-moment.js +72 -0
- package/lib/commonjs/schedule/resolve-moment.js.map +1 -0
- package/lib/commonjs/schedule/validate-content.js +101 -0
- package/lib/commonjs/schedule/validate-content.js.map +1 -0
- package/lib/commonjs/schedule/validate-identifier.js +126 -0
- package/lib/commonjs/schedule/validate-identifier.js.map +1 -0
- package/lib/commonjs/schedule/writer.js +44 -0
- package/lib/commonjs/schedule/writer.js.map +1 -0
- package/lib/commonjs/state/caps.js +101 -0
- package/lib/commonjs/state/caps.js.map +1 -0
- package/lib/commonjs/state/dedup-ledger.js +39 -0
- package/lib/commonjs/state/dedup-ledger.js.map +1 -0
- package/lib/commonjs/state/interaction-buffer.js +98 -0
- package/lib/commonjs/state/interaction-buffer.js.map +1 -0
- package/lib/commonjs/state/mmkv-store.js +75 -0
- package/lib/commonjs/state/mmkv-store.js.map +1 -0
- package/lib/commonjs/state/permission-history.js +64 -0
- package/lib/commonjs/state/permission-history.js.map +1 -0
- package/lib/commonjs/state/record.js +269 -0
- package/lib/commonjs/state/record.js.map +1 -0
- package/lib/commonjs/state/reset.js +37 -0
- package/lib/commonjs/state/reset.js.map +1 -0
- package/lib/commonjs/state/series-ledger.js +71 -0
- package/lib/commonjs/state/series-ledger.js.map +1 -0
- package/lib/commonjs/state/store.js +39 -0
- package/lib/commonjs/state/store.js.map +1 -0
- package/lib/commonjs/testing/conformance/index.js +218 -0
- package/lib/commonjs/testing/conformance/index.js.map +1 -0
- package/lib/commonjs/testing/fake-engine.js +338 -0
- package/lib/commonjs/testing/fake-engine.js.map +1 -0
- package/lib/commonjs/testing/fake-provider.js +93 -0
- package/lib/commonjs/testing/fake-provider.js.map +1 -0
- package/lib/commonjs/testing/faults.js +59 -0
- package/lib/commonjs/testing/faults.js.map +1 -0
- package/lib/commonjs/testing/index.js +54 -0
- package/lib/commonjs/testing/index.js.map +1 -0
- package/lib/commonjs/testing/measure.js +298 -0
- package/lib/commonjs/testing/measure.js.map +1 -0
- package/lib/module/advanced.js +29 -0
- package/lib/module/advanced.js.map +1 -0
- package/lib/module/channel/migrate.js +242 -0
- package/lib/module/channel/migrate.js.map +1 -0
- package/lib/module/channel/tone-map.js +112 -0
- package/lib/module/channel/tone-map.js.map +1 -0
- package/lib/module/channel/validate-tone.js +57 -0
- package/lib/module/channel/validate-tone.js.map +1 -0
- package/lib/module/contract/channel.js +48 -0
- package/lib/module/contract/channel.js.map +1 -0
- package/lib/module/contract/diagnostics.js +21 -0
- package/lib/module/contract/diagnostics.js.map +1 -0
- package/lib/module/contract/errors.js +119 -0
- package/lib/module/contract/errors.js.map +1 -0
- package/lib/module/contract/hash.js +29 -0
- package/lib/module/contract/hash.js.map +1 -0
- package/lib/module/contract/index.js +13 -0
- package/lib/module/contract/index.js.map +1 -0
- package/lib/module/contract/interaction.js +33 -0
- package/lib/module/contract/interaction.js.map +1 -0
- package/lib/module/contract/notification.js +38 -0
- package/lib/module/contract/notification.js.map +1 -0
- package/lib/module/contract/permission.js +2 -0
- package/lib/module/contract/permission.js.map +1 -0
- package/lib/module/contract/reconcile.js +4 -0
- package/lib/module/contract/reconcile.js.map +1 -0
- package/lib/module/contract/recurrence.js +49 -0
- package/lib/module/contract/recurrence.js.map +1 -0
- package/lib/module/diagnostics/burst.js +85 -0
- package/lib/module/diagnostics/burst.js.map +1 -0
- package/lib/module/diagnostics/events.js +58 -0
- package/lib/module/diagnostics/events.js.map +1 -0
- package/lib/module/diagnostics/redact.js +44 -0
- package/lib/module/diagnostics/redact.js.map +1 -0
- package/lib/module/diagnostics/snapshot.js +64 -0
- package/lib/module/diagnostics/snapshot.js.map +1 -0
- package/lib/module/engine/adapter.js +4 -0
- package/lib/module/engine/adapter.js.map +1 -0
- package/lib/module/engine/codec.js +79 -0
- package/lib/module/engine/codec.js.map +1 -0
- package/lib/module/engine/notify-kit/events.js +139 -0
- package/lib/module/engine/notify-kit/events.js.map +1 -0
- package/lib/module/engine/notify-kit/module.js +113 -0
- package/lib/module/engine/notify-kit/module.js.map +1 -0
- package/lib/module/engine/notify-kit/platform/android.js +155 -0
- package/lib/module/engine/notify-kit/platform/android.js.map +1 -0
- package/lib/module/engine/notify-kit/platform/index.js +51 -0
- package/lib/module/engine/notify-kit/platform/index.js.map +1 -0
- package/lib/module/engine/notify-kit/platform/ios.js +49 -0
- package/lib/module/engine/notify-kit/platform/ios.js.map +1 -0
- package/lib/module/engine/notify-kit/platform/types.js +4 -0
- package/lib/module/engine/notify-kit/platform/types.js.map +1 -0
- package/lib/module/engine/notify-kit-engine.js +257 -0
- package/lib/module/engine/notify-kit-engine.js.map +1 -0
- package/lib/module/index.js +98 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/initialize.js +182 -0
- package/lib/module/initialize.js.map +1 -0
- package/lib/module/interaction/index.js +116 -0
- package/lib/module/interaction/index.js.map +1 -0
- package/lib/module/maintenance/cycle.js +102 -0
- package/lib/module/maintenance/cycle.js.map +1 -0
- package/lib/module/maintenance/permission-refresh.js +34 -0
- package/lib/module/maintenance/permission-refresh.js.map +1 -0
- package/lib/module/maintenance/reanchor.js +94 -0
- package/lib/module/maintenance/reanchor.js.map +1 -0
- package/lib/module/maintenance/toggle.js +45 -0
- package/lib/module/maintenance/toggle.js.map +1 -0
- package/lib/module/maintenance/verify.js +65 -0
- package/lib/module/maintenance/verify.js.map +1 -0
- package/lib/module/maintenance/window-refresh.js +48 -0
- package/lib/module/maintenance/window-refresh.js.map +1 -0
- package/lib/module/notifications.js +157 -0
- package/lib/module/notifications.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/permission/index.js +178 -0
- package/lib/module/permission/index.js.map +1 -0
- package/lib/module/permission/state.js +83 -0
- package/lib/module/permission/state.js.map +1 -0
- package/lib/module/push/envelope.js +137 -0
- package/lib/module/push/envelope.js.map +1 -0
- package/lib/module/push/fcm-provider.js +119 -0
- package/lib/module/push/fcm-provider.js.map +1 -0
- package/lib/module/push/gate.js +158 -0
- package/lib/module/push/gate.js.map +1 -0
- package/lib/module/push/index.js +16 -0
- package/lib/module/push/index.js.map +1 -0
- package/lib/module/push/instructions.js +97 -0
- package/lib/module/push/instructions.js.map +1 -0
- package/lib/module/push/provider-adapter.js +4 -0
- package/lib/module/push/provider-adapter.js.map +1 -0
- package/lib/module/push/signout.js +51 -0
- package/lib/module/push/signout.js.map +1 -0
- package/lib/module/reconcile/chunk.js +43 -0
- package/lib/module/reconcile/chunk.js.map +1 -0
- package/lib/module/reconcile/diff.js +101 -0
- package/lib/module/reconcile/diff.js.map +1 -0
- package/lib/module/reconcile/duplicates.js +56 -0
- package/lib/module/reconcile/duplicates.js.map +1 -0
- package/lib/module/reconcile/index.js +161 -0
- package/lib/module/reconcile/index.js.map +1 -0
- package/lib/module/reconcile/truncate.js +46 -0
- package/lib/module/reconcile/truncate.js.map +1 -0
- package/lib/module/recurrence/clock-guard.js +60 -0
- package/lib/module/recurrence/clock-guard.js.map +1 -0
- package/lib/module/recurrence/expand.js +248 -0
- package/lib/module/recurrence/expand.js.map +1 -0
- package/lib/module/recurrence/index.js +208 -0
- package/lib/module/recurrence/index.js.map +1 -0
- package/lib/module/repeat/expiry.js +37 -0
- package/lib/module/repeat/expiry.js.map +1 -0
- package/lib/module/repeat/index.js +67 -0
- package/lib/module/repeat/index.js.map +1 -0
- package/lib/module/repeat/marker.js +51 -0
- package/lib/module/repeat/marker.js.map +1 -0
- package/lib/module/repeat/place.js +79 -0
- package/lib/module/repeat/place.js.map +1 -0
- package/lib/module/schedule/anchor.js +234 -0
- package/lib/module/schedule/anchor.js.map +1 -0
- package/lib/module/schedule/index.js +137 -0
- package/lib/module/schedule/index.js.map +1 -0
- package/lib/module/schedule/partition.js +53 -0
- package/lib/module/schedule/partition.js.map +1 -0
- package/lib/module/schedule/resolve-moment.js +66 -0
- package/lib/module/schedule/resolve-moment.js.map +1 -0
- package/lib/module/schedule/validate-content.js +95 -0
- package/lib/module/schedule/validate-content.js.map +1 -0
- package/lib/module/schedule/validate-identifier.js +119 -0
- package/lib/module/schedule/validate-identifier.js.map +1 -0
- package/lib/module/schedule/writer.js +40 -0
- package/lib/module/schedule/writer.js.map +1 -0
- package/lib/module/state/caps.js +96 -0
- package/lib/module/state/caps.js.map +1 -0
- package/lib/module/state/dedup-ledger.js +34 -0
- package/lib/module/state/dedup-ledger.js.map +1 -0
- package/lib/module/state/interaction-buffer.js +92 -0
- package/lib/module/state/interaction-buffer.js.map +1 -0
- package/lib/module/state/mmkv-store.js +71 -0
- package/lib/module/state/mmkv-store.js.map +1 -0
- package/lib/module/state/permission-history.js +56 -0
- package/lib/module/state/permission-history.js.map +1 -0
- package/lib/module/state/record.js +264 -0
- package/lib/module/state/record.js.map +1 -0
- package/lib/module/state/reset.js +32 -0
- package/lib/module/state/reset.js.map +1 -0
- package/lib/module/state/series-ledger.js +62 -0
- package/lib/module/state/series-ledger.js.map +1 -0
- package/lib/module/state/store.js +35 -0
- package/lib/module/state/store.js.map +1 -0
- package/lib/module/testing/conformance/index.js +214 -0
- package/lib/module/testing/conformance/index.js.map +1 -0
- package/lib/module/testing/fake-engine.js +335 -0
- package/lib/module/testing/fake-engine.js.map +1 -0
- package/lib/module/testing/fake-provider.js +89 -0
- package/lib/module/testing/fake-provider.js.map +1 -0
- package/lib/module/testing/faults.js +55 -0
- package/lib/module/testing/faults.js.map +1 -0
- package/lib/module/testing/index.js +19 -0
- package/lib/module/testing/index.js.map +1 -0
- package/lib/module/testing/measure.js +294 -0
- package/lib/module/testing/measure.js.map +1 -0
- package/lib/typescript/commonjs/advanced.d.ts +36 -0
- package/lib/typescript/commonjs/advanced.d.ts.map +1 -0
- package/lib/typescript/commonjs/channel/migrate.d.ts +38 -0
- package/lib/typescript/commonjs/channel/migrate.d.ts.map +1 -0
- package/lib/typescript/commonjs/channel/tone-map.d.ts +34 -0
- package/lib/typescript/commonjs/channel/tone-map.d.ts.map +1 -0
- package/lib/typescript/commonjs/channel/validate-tone.d.ts +23 -0
- package/lib/typescript/commonjs/channel/validate-tone.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/channel.d.ts +185 -0
- package/lib/typescript/commonjs/contract/channel.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/diagnostics.d.ts +92 -0
- package/lib/typescript/commonjs/contract/diagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/errors.d.ts +91 -0
- package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/hash.d.ts +14 -0
- package/lib/typescript/commonjs/contract/hash.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/index.d.ts +10 -0
- package/lib/typescript/commonjs/contract/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/interaction.d.ts +53 -0
- package/lib/typescript/commonjs/contract/interaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/notification.d.ts +110 -0
- package/lib/typescript/commonjs/contract/notification.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/permission.d.ts +49 -0
- package/lib/typescript/commonjs/contract/permission.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/reconcile.d.ts +82 -0
- package/lib/typescript/commonjs/contract/reconcile.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/recurrence.d.ts +118 -0
- package/lib/typescript/commonjs/contract/recurrence.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/burst.d.ts +39 -0
- package/lib/typescript/commonjs/diagnostics/burst.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/events.d.ts +28 -0
- package/lib/typescript/commonjs/diagnostics/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/redact.d.ts +22 -0
- package/lib/typescript/commonjs/diagnostics/redact.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/snapshot.d.ts +40 -0
- package/lib/typescript/commonjs/diagnostics/snapshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/adapter.d.ts +172 -0
- package/lib/typescript/commonjs/engine/adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/codec.d.ts +20 -0
- package/lib/typescript/commonjs/engine/codec.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit/events.d.ts +37 -0
- package/lib/typescript/commonjs/engine/notify-kit/events.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit/module.d.ts +103 -0
- package/lib/typescript/commonjs/engine/notify-kit/module.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/android.d.ts +3 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/android.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/index.d.ts +12 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/ios.d.ts +3 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/ios.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/types.d.ts +33 -0
- package/lib/typescript/commonjs/engine/notify-kit/platform/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/engine/notify-kit-engine.d.ts +25 -0
- package/lib/typescript/commonjs/engine/notify-kit-engine.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +106 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/initialize.d.ts +74 -0
- package/lib/typescript/commonjs/initialize.d.ts.map +1 -0
- package/lib/typescript/commonjs/interaction/index.d.ts +53 -0
- package/lib/typescript/commonjs/interaction/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/maintenance/cycle.d.ts +77 -0
- package/lib/typescript/commonjs/maintenance/cycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/maintenance/permission-refresh.d.ts +19 -0
- package/lib/typescript/commonjs/maintenance/permission-refresh.d.ts.map +1 -0
- package/lib/typescript/commonjs/maintenance/reanchor.d.ts +26 -0
- package/lib/typescript/commonjs/maintenance/reanchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/maintenance/toggle.d.ts +35 -0
- package/lib/typescript/commonjs/maintenance/toggle.d.ts.map +1 -0
- package/lib/typescript/commonjs/maintenance/verify.d.ts +32 -0
- package/lib/typescript/commonjs/maintenance/verify.d.ts.map +1 -0
- package/lib/typescript/commonjs/maintenance/window-refresh.d.ts +29 -0
- package/lib/typescript/commonjs/maintenance/window-refresh.d.ts.map +1 -0
- package/lib/typescript/commonjs/notifications.d.ts +78 -0
- package/lib/typescript/commonjs/notifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/permission/index.d.ts +57 -0
- package/lib/typescript/commonjs/permission/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/permission/state.d.ts +41 -0
- package/lib/typescript/commonjs/permission/state.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/envelope.d.ts +33 -0
- package/lib/typescript/commonjs/push/envelope.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/fcm-provider.d.ts +43 -0
- package/lib/typescript/commonjs/push/fcm-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/gate.d.ts +57 -0
- package/lib/typescript/commonjs/push/gate.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/index.d.ts +19 -0
- package/lib/typescript/commonjs/push/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/instructions.d.ts +45 -0
- package/lib/typescript/commonjs/push/instructions.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/provider-adapter.d.ts +50 -0
- package/lib/typescript/commonjs/push/provider-adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/push/signout.d.ts +33 -0
- package/lib/typescript/commonjs/push/signout.d.ts.map +1 -0
- package/lib/typescript/commonjs/reconcile/chunk.d.ts +24 -0
- package/lib/typescript/commonjs/reconcile/chunk.d.ts.map +1 -0
- package/lib/typescript/commonjs/reconcile/diff.d.ts +54 -0
- package/lib/typescript/commonjs/reconcile/diff.d.ts.map +1 -0
- package/lib/typescript/commonjs/reconcile/duplicates.d.ts +32 -0
- package/lib/typescript/commonjs/reconcile/duplicates.d.ts.map +1 -0
- package/lib/typescript/commonjs/reconcile/index.d.ts +35 -0
- package/lib/typescript/commonjs/reconcile/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/reconcile/truncate.d.ts +26 -0
- package/lib/typescript/commonjs/reconcile/truncate.d.ts.map +1 -0
- package/lib/typescript/commonjs/recurrence/clock-guard.d.ts +37 -0
- package/lib/typescript/commonjs/recurrence/clock-guard.d.ts.map +1 -0
- package/lib/typescript/commonjs/recurrence/expand.d.ts +75 -0
- package/lib/typescript/commonjs/recurrence/expand.d.ts.map +1 -0
- package/lib/typescript/commonjs/recurrence/index.d.ts +40 -0
- package/lib/typescript/commonjs/recurrence/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/repeat/expiry.d.ts +23 -0
- package/lib/typescript/commonjs/repeat/expiry.d.ts.map +1 -0
- package/lib/typescript/commonjs/repeat/index.d.ts +49 -0
- package/lib/typescript/commonjs/repeat/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/repeat/marker.d.ts +36 -0
- package/lib/typescript/commonjs/repeat/marker.d.ts.map +1 -0
- package/lib/typescript/commonjs/repeat/place.d.ts +39 -0
- package/lib/typescript/commonjs/repeat/place.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/anchor.d.ts +118 -0
- package/lib/typescript/commonjs/schedule/anchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/index.d.ts +40 -0
- package/lib/typescript/commonjs/schedule/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/partition.d.ts +29 -0
- package/lib/typescript/commonjs/schedule/partition.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/resolve-moment.d.ts +35 -0
- package/lib/typescript/commonjs/schedule/resolve-moment.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/validate-content.d.ts +42 -0
- package/lib/typescript/commonjs/schedule/validate-content.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/validate-identifier.d.ts +30 -0
- package/lib/typescript/commonjs/schedule/validate-identifier.d.ts.map +1 -0
- package/lib/typescript/commonjs/schedule/writer.d.ts +36 -0
- package/lib/typescript/commonjs/schedule/writer.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/caps.d.ts +51 -0
- package/lib/typescript/commonjs/state/caps.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/dedup-ledger.d.ts +21 -0
- package/lib/typescript/commonjs/state/dedup-ledger.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/interaction-buffer.d.ts +30 -0
- package/lib/typescript/commonjs/state/interaction-buffer.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/mmkv-store.d.ts +33 -0
- package/lib/typescript/commonjs/state/mmkv-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/permission-history.d.ts +20 -0
- package/lib/typescript/commonjs/state/permission-history.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/record.d.ts +134 -0
- package/lib/typescript/commonjs/state/record.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/reset.d.ts +22 -0
- package/lib/typescript/commonjs/state/reset.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/series-ledger.d.ts +47 -0
- package/lib/typescript/commonjs/state/series-ledger.d.ts.map +1 -0
- package/lib/typescript/commonjs/state/store.d.ts +20 -0
- package/lib/typescript/commonjs/state/store.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/index.d.ts +32 -0
- package/lib/typescript/commonjs/testing/conformance/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/fake-engine.d.ts +91 -0
- package/lib/typescript/commonjs/testing/fake-engine.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/fake-provider.d.ts +35 -0
- package/lib/typescript/commonjs/testing/fake-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/faults.d.ts +38 -0
- package/lib/typescript/commonjs/testing/faults.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/index.d.ts +22 -0
- package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/measure.d.ts +59 -0
- package/lib/typescript/commonjs/testing/measure.d.ts.map +1 -0
- package/lib/typescript/module/advanced.d.ts +36 -0
- package/lib/typescript/module/advanced.d.ts.map +1 -0
- package/lib/typescript/module/channel/migrate.d.ts +38 -0
- package/lib/typescript/module/channel/migrate.d.ts.map +1 -0
- package/lib/typescript/module/channel/tone-map.d.ts +34 -0
- package/lib/typescript/module/channel/tone-map.d.ts.map +1 -0
- package/lib/typescript/module/channel/validate-tone.d.ts +23 -0
- package/lib/typescript/module/channel/validate-tone.d.ts.map +1 -0
- package/lib/typescript/module/contract/channel.d.ts +185 -0
- package/lib/typescript/module/contract/channel.d.ts.map +1 -0
- package/lib/typescript/module/contract/diagnostics.d.ts +92 -0
- package/lib/typescript/module/contract/diagnostics.d.ts.map +1 -0
- package/lib/typescript/module/contract/errors.d.ts +91 -0
- package/lib/typescript/module/contract/errors.d.ts.map +1 -0
- package/lib/typescript/module/contract/hash.d.ts +14 -0
- package/lib/typescript/module/contract/hash.d.ts.map +1 -0
- package/lib/typescript/module/contract/index.d.ts +10 -0
- package/lib/typescript/module/contract/index.d.ts.map +1 -0
- package/lib/typescript/module/contract/interaction.d.ts +53 -0
- package/lib/typescript/module/contract/interaction.d.ts.map +1 -0
- package/lib/typescript/module/contract/notification.d.ts +110 -0
- package/lib/typescript/module/contract/notification.d.ts.map +1 -0
- package/lib/typescript/module/contract/permission.d.ts +49 -0
- package/lib/typescript/module/contract/permission.d.ts.map +1 -0
- package/lib/typescript/module/contract/reconcile.d.ts +82 -0
- package/lib/typescript/module/contract/reconcile.d.ts.map +1 -0
- package/lib/typescript/module/contract/recurrence.d.ts +118 -0
- package/lib/typescript/module/contract/recurrence.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/burst.d.ts +39 -0
- package/lib/typescript/module/diagnostics/burst.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/events.d.ts +28 -0
- package/lib/typescript/module/diagnostics/events.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/redact.d.ts +22 -0
- package/lib/typescript/module/diagnostics/redact.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/snapshot.d.ts +40 -0
- package/lib/typescript/module/diagnostics/snapshot.d.ts.map +1 -0
- package/lib/typescript/module/engine/adapter.d.ts +172 -0
- package/lib/typescript/module/engine/adapter.d.ts.map +1 -0
- package/lib/typescript/module/engine/codec.d.ts +20 -0
- package/lib/typescript/module/engine/codec.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit/events.d.ts +37 -0
- package/lib/typescript/module/engine/notify-kit/events.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit/module.d.ts +103 -0
- package/lib/typescript/module/engine/notify-kit/module.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit/platform/android.d.ts +3 -0
- package/lib/typescript/module/engine/notify-kit/platform/android.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit/platform/index.d.ts +12 -0
- package/lib/typescript/module/engine/notify-kit/platform/index.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit/platform/ios.d.ts +3 -0
- package/lib/typescript/module/engine/notify-kit/platform/ios.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit/platform/types.d.ts +33 -0
- package/lib/typescript/module/engine/notify-kit/platform/types.d.ts.map +1 -0
- package/lib/typescript/module/engine/notify-kit-engine.d.ts +25 -0
- package/lib/typescript/module/engine/notify-kit-engine.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +106 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/initialize.d.ts +74 -0
- package/lib/typescript/module/initialize.d.ts.map +1 -0
- package/lib/typescript/module/interaction/index.d.ts +53 -0
- package/lib/typescript/module/interaction/index.d.ts.map +1 -0
- package/lib/typescript/module/maintenance/cycle.d.ts +77 -0
- package/lib/typescript/module/maintenance/cycle.d.ts.map +1 -0
- package/lib/typescript/module/maintenance/permission-refresh.d.ts +19 -0
- package/lib/typescript/module/maintenance/permission-refresh.d.ts.map +1 -0
- package/lib/typescript/module/maintenance/reanchor.d.ts +26 -0
- package/lib/typescript/module/maintenance/reanchor.d.ts.map +1 -0
- package/lib/typescript/module/maintenance/toggle.d.ts +35 -0
- package/lib/typescript/module/maintenance/toggle.d.ts.map +1 -0
- package/lib/typescript/module/maintenance/verify.d.ts +32 -0
- package/lib/typescript/module/maintenance/verify.d.ts.map +1 -0
- package/lib/typescript/module/maintenance/window-refresh.d.ts +29 -0
- package/lib/typescript/module/maintenance/window-refresh.d.ts.map +1 -0
- package/lib/typescript/module/notifications.d.ts +78 -0
- package/lib/typescript/module/notifications.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/permission/index.d.ts +57 -0
- package/lib/typescript/module/permission/index.d.ts.map +1 -0
- package/lib/typescript/module/permission/state.d.ts +41 -0
- package/lib/typescript/module/permission/state.d.ts.map +1 -0
- package/lib/typescript/module/push/envelope.d.ts +33 -0
- package/lib/typescript/module/push/envelope.d.ts.map +1 -0
- package/lib/typescript/module/push/fcm-provider.d.ts +43 -0
- package/lib/typescript/module/push/fcm-provider.d.ts.map +1 -0
- package/lib/typescript/module/push/gate.d.ts +57 -0
- package/lib/typescript/module/push/gate.d.ts.map +1 -0
- package/lib/typescript/module/push/index.d.ts +19 -0
- package/lib/typescript/module/push/index.d.ts.map +1 -0
- package/lib/typescript/module/push/instructions.d.ts +45 -0
- package/lib/typescript/module/push/instructions.d.ts.map +1 -0
- package/lib/typescript/module/push/provider-adapter.d.ts +50 -0
- package/lib/typescript/module/push/provider-adapter.d.ts.map +1 -0
- package/lib/typescript/module/push/signout.d.ts +33 -0
- package/lib/typescript/module/push/signout.d.ts.map +1 -0
- package/lib/typescript/module/reconcile/chunk.d.ts +24 -0
- package/lib/typescript/module/reconcile/chunk.d.ts.map +1 -0
- package/lib/typescript/module/reconcile/diff.d.ts +54 -0
- package/lib/typescript/module/reconcile/diff.d.ts.map +1 -0
- package/lib/typescript/module/reconcile/duplicates.d.ts +32 -0
- package/lib/typescript/module/reconcile/duplicates.d.ts.map +1 -0
- package/lib/typescript/module/reconcile/index.d.ts +35 -0
- package/lib/typescript/module/reconcile/index.d.ts.map +1 -0
- package/lib/typescript/module/reconcile/truncate.d.ts +26 -0
- package/lib/typescript/module/reconcile/truncate.d.ts.map +1 -0
- package/lib/typescript/module/recurrence/clock-guard.d.ts +37 -0
- package/lib/typescript/module/recurrence/clock-guard.d.ts.map +1 -0
- package/lib/typescript/module/recurrence/expand.d.ts +75 -0
- package/lib/typescript/module/recurrence/expand.d.ts.map +1 -0
- package/lib/typescript/module/recurrence/index.d.ts +40 -0
- package/lib/typescript/module/recurrence/index.d.ts.map +1 -0
- package/lib/typescript/module/repeat/expiry.d.ts +23 -0
- package/lib/typescript/module/repeat/expiry.d.ts.map +1 -0
- package/lib/typescript/module/repeat/index.d.ts +49 -0
- package/lib/typescript/module/repeat/index.d.ts.map +1 -0
- package/lib/typescript/module/repeat/marker.d.ts +36 -0
- package/lib/typescript/module/repeat/marker.d.ts.map +1 -0
- package/lib/typescript/module/repeat/place.d.ts +39 -0
- package/lib/typescript/module/repeat/place.d.ts.map +1 -0
- package/lib/typescript/module/schedule/anchor.d.ts +118 -0
- package/lib/typescript/module/schedule/anchor.d.ts.map +1 -0
- package/lib/typescript/module/schedule/index.d.ts +40 -0
- package/lib/typescript/module/schedule/index.d.ts.map +1 -0
- package/lib/typescript/module/schedule/partition.d.ts +29 -0
- package/lib/typescript/module/schedule/partition.d.ts.map +1 -0
- package/lib/typescript/module/schedule/resolve-moment.d.ts +35 -0
- package/lib/typescript/module/schedule/resolve-moment.d.ts.map +1 -0
- package/lib/typescript/module/schedule/validate-content.d.ts +42 -0
- package/lib/typescript/module/schedule/validate-content.d.ts.map +1 -0
- package/lib/typescript/module/schedule/validate-identifier.d.ts +30 -0
- package/lib/typescript/module/schedule/validate-identifier.d.ts.map +1 -0
- package/lib/typescript/module/schedule/writer.d.ts +36 -0
- package/lib/typescript/module/schedule/writer.d.ts.map +1 -0
- package/lib/typescript/module/state/caps.d.ts +51 -0
- package/lib/typescript/module/state/caps.d.ts.map +1 -0
- package/lib/typescript/module/state/dedup-ledger.d.ts +21 -0
- package/lib/typescript/module/state/dedup-ledger.d.ts.map +1 -0
- package/lib/typescript/module/state/interaction-buffer.d.ts +30 -0
- package/lib/typescript/module/state/interaction-buffer.d.ts.map +1 -0
- package/lib/typescript/module/state/mmkv-store.d.ts +33 -0
- package/lib/typescript/module/state/mmkv-store.d.ts.map +1 -0
- package/lib/typescript/module/state/permission-history.d.ts +20 -0
- package/lib/typescript/module/state/permission-history.d.ts.map +1 -0
- package/lib/typescript/module/state/record.d.ts +134 -0
- package/lib/typescript/module/state/record.d.ts.map +1 -0
- package/lib/typescript/module/state/reset.d.ts +22 -0
- package/lib/typescript/module/state/reset.d.ts.map +1 -0
- package/lib/typescript/module/state/series-ledger.d.ts +47 -0
- package/lib/typescript/module/state/series-ledger.d.ts.map +1 -0
- package/lib/typescript/module/state/store.d.ts +20 -0
- package/lib/typescript/module/state/store.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/index.d.ts +32 -0
- package/lib/typescript/module/testing/conformance/index.d.ts.map +1 -0
- package/lib/typescript/module/testing/fake-engine.d.ts +91 -0
- package/lib/typescript/module/testing/fake-engine.d.ts.map +1 -0
- package/lib/typescript/module/testing/fake-provider.d.ts +35 -0
- package/lib/typescript/module/testing/fake-provider.d.ts.map +1 -0
- package/lib/typescript/module/testing/faults.d.ts +38 -0
- package/lib/typescript/module/testing/faults.d.ts.map +1 -0
- package/lib/typescript/module/testing/index.d.ts +22 -0
- package/lib/typescript/module/testing/index.d.ts.map +1 -0
- package/lib/typescript/module/testing/measure.d.ts +59 -0
- package/lib/typescript/module/testing/measure.d.ts.map +1 -0
- package/package.json +74 -23
- package/skills/sdk-rn-notification/SKILL.md +6 -5
- package/src/advanced.ts +35 -0
- package/src/channel/migrate.ts +176 -158
- package/src/channel/tone-map.ts +2 -10
- package/src/contract/errors.ts +7 -0
- package/src/contract/hash.ts +26 -0
- package/src/engine/adapter.ts +21 -1
- package/src/engine/notify-kit/events.ts +155 -0
- package/src/engine/notify-kit/module.ts +148 -0
- package/src/engine/notify-kit/platform/android.ts +172 -0
- package/src/engine/notify-kit/platform/index.ts +55 -0
- package/src/engine/notify-kit/platform/ios.ts +54 -0
- package/src/engine/notify-kit/platform/types.ts +40 -0
- package/src/engine/notify-kit-engine.ts +96 -477
- package/src/index.ts +9 -0
- package/src/notifications.ts +195 -0
- package/src/permission/index.ts +65 -4
- package/src/push/fcm-provider.ts +14 -4
- package/src/push/gate.ts +27 -5
- package/src/reconcile/diff.ts +38 -27
- package/src/reconcile/index.ts +13 -4
- package/src/recurrence/index.ts +2 -1
- package/src/repeat/expiry.ts +2 -6
- package/src/repeat/index.ts +45 -1
- package/src/repeat/marker.ts +1 -22
- package/src/repeat/place.ts +74 -35
- package/src/schedule/index.ts +10 -4
- package/src/schedule/partition.ts +0 -19
- package/src/schedule/validate-identifier.ts +8 -6
- package/src/schedule/writer.ts +13 -4
- package/src/state/caps.ts +28 -3
- package/src/state/permission-history.ts +25 -0
- package/src/state/record.ts +110 -20
- package/src/testing/fake-engine.ts +17 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time-zone anchoring and re-anchoring.
|
|
3
|
+
*
|
|
4
|
+
* Wall-clock is the default because reminders are wall-clock things: an 08:00
|
|
5
|
+
* reminder should stay 08:00 after the user crosses a time zone, and a caller
|
|
6
|
+
* who does not choose should get what their users expect rather than a silent
|
|
7
|
+
* shift.
|
|
8
|
+
*
|
|
9
|
+
* The cost is re-anchoring. When the device zone changes, every scheduled
|
|
10
|
+
* wall-clock entry must be rewritten to preserve the clock time it named, and
|
|
11
|
+
* every absolute entry must be left completely alone.
|
|
12
|
+
*
|
|
13
|
+
* The limit this cannot fix is stated rather than hidden: a wall-clock
|
|
14
|
+
* notification whose moment arrives while the app has not run since the zone
|
|
15
|
+
* changed fires at the previously anchored instant. The anchoring generation on
|
|
16
|
+
* each entry is what makes that detectable instead of invisible.
|
|
17
|
+
*/
|
|
18
|
+
import type { AnchoringMode, PendingEntry } from '../contract/notification.js';
|
|
19
|
+
/** Reads the platform time zone. Injected so the pure logic needs no native module. */
|
|
20
|
+
export type TimeZoneReader = () => string;
|
|
21
|
+
/**
|
|
22
|
+
* Resolves the platform zone via `react-native-localize`.
|
|
23
|
+
*
|
|
24
|
+
* Pure JavaScript is not sufficient here: `Intl.DateTimeFormat().resolvedOptions().timeZone`
|
|
25
|
+
* is documented in React Native as not reliably updating when the device zone
|
|
26
|
+
* changes, so it cannot back re-anchoring. Falls back to `Intl` only when the
|
|
27
|
+
* module is absent, which is better than failing outright.
|
|
28
|
+
*/
|
|
29
|
+
export declare function createPlatformTimeZoneReader(): TimeZoneReader;
|
|
30
|
+
/** The calendar fields a wall-clock moment actually names. */
|
|
31
|
+
export interface WallClockParts {
|
|
32
|
+
readonly year: number;
|
|
33
|
+
readonly month: number;
|
|
34
|
+
readonly day: number;
|
|
35
|
+
readonly hour: number;
|
|
36
|
+
readonly minute: number;
|
|
37
|
+
readonly second: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether a zone name is one the runtime can actually format against.
|
|
41
|
+
*
|
|
42
|
+
* Hermes throws a hard `JSRangeErrorException: Invalid timezone name!` for a
|
|
43
|
+
* bad zone, which kills the JavaScript thread rather than returning an error.
|
|
44
|
+
* A stored anchoring generation is data that can be wrong — a corrupted record,
|
|
45
|
+
* an entry written by an older build, or a defect like the one that stored a
|
|
46
|
+
* tone id here — so it must be checked before it reaches `Intl`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isValidTimeZone(timeZone: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Decomposes an instant into the clock reading it produces in a given zone.
|
|
51
|
+
*
|
|
52
|
+
* Falls back to UTC for an unusable zone rather than throwing: a bad stored
|
|
53
|
+
* value should degrade one entry's anchoring, not crash the app.
|
|
54
|
+
*/
|
|
55
|
+
export declare function partsInZone(instant: number, timeZone: string): WallClockParts;
|
|
56
|
+
/**
|
|
57
|
+
* Finds the instant at which a zone shows the given clock reading.
|
|
58
|
+
*
|
|
59
|
+
* Two passes, because the offset itself depends on the instant: the first guess
|
|
60
|
+
* uses the offset at the naive UTC interpretation, the second corrects for a
|
|
61
|
+
* daylight-saving boundary crossed by that guess.
|
|
62
|
+
*
|
|
63
|
+
* Daylight-saving resolution, per the documented rule:
|
|
64
|
+
* - a clock time that does not exist resolves **forward** to the next valid instant;
|
|
65
|
+
* - a clock time that occurs twice resolves to its **first** occurrence, so
|
|
66
|
+
* exactly one notification results rather than two.
|
|
67
|
+
*/
|
|
68
|
+
export declare function instantForParts(parts: WallClockParts, timeZone: string): number;
|
|
69
|
+
export interface AnchorInput {
|
|
70
|
+
readonly at: number;
|
|
71
|
+
readonly anchoring?: AnchoringMode;
|
|
72
|
+
}
|
|
73
|
+
export interface AnchoredMoment {
|
|
74
|
+
readonly resolvedAt: number;
|
|
75
|
+
readonly anchoring: AnchoringMode;
|
|
76
|
+
/** The zone this was anchored against. Absent for absolute-instant moments. */
|
|
77
|
+
readonly generation?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Resolves a caller-supplied moment into a firing instant.
|
|
81
|
+
*
|
|
82
|
+
* An absolute moment passes through untouched — that is the entire distinction.
|
|
83
|
+
*/
|
|
84
|
+
export declare function anchorMoment(input: AnchorInput, timeZone: string): AnchoredMoment;
|
|
85
|
+
export interface ReAnchorPlan {
|
|
86
|
+
/** Entries whose firing instant must be rewritten, with their new instant. */
|
|
87
|
+
readonly rewrites: readonly {
|
|
88
|
+
readonly entry: PendingEntry;
|
|
89
|
+
readonly resolvedAt: number;
|
|
90
|
+
}[];
|
|
91
|
+
readonly fromZone: string | undefined;
|
|
92
|
+
readonly toZone: string;
|
|
93
|
+
readonly zoneChanged: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Entries carrying an anchoring generation the runtime cannot interpret.
|
|
96
|
+
*
|
|
97
|
+
* Left alone rather than re-anchored against a guess. Reported so a corrupted
|
|
98
|
+
* or older-build record is visible instead of quietly producing wrong firing
|
|
99
|
+
* instants.
|
|
100
|
+
*/
|
|
101
|
+
readonly unreadableGeneration: readonly string[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Computes what a zone change requires.
|
|
105
|
+
*
|
|
106
|
+
* Returns an empty plan when the zone has not moved, which is what makes
|
|
107
|
+
* re-anchoring idempotent: the no-change check costs one comparison per entry
|
|
108
|
+
* and issues zero platform operations.
|
|
109
|
+
*/
|
|
110
|
+
export declare function planReAnchor(pending: readonly PendingEntry[], currentZone: string): ReAnchorPlan;
|
|
111
|
+
/**
|
|
112
|
+
* True when an entry was anchored against a zone the device has since left.
|
|
113
|
+
*
|
|
114
|
+
* This is the FR-007c condition: the entry will fire at its old instant, and a
|
|
115
|
+
* consumer can detect and explain that rather than being told nothing happened.
|
|
116
|
+
*/
|
|
117
|
+
export declare function isStaleAnchor(entry: PendingEntry, currentZone: string): boolean;
|
|
118
|
+
//# sourceMappingURL=anchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../../../src/schedule/anchor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,6BAA0B,CAAC;AAG5E,uFAAuF;AACvF,MAAM,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC;AAW1C;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,IAAI,cAAc,CAc7D;AAED,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIzD;AAaD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,CAsB7E;AAgBD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAkC/E;AAED,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,CAQjF;AAED,MAAM,WAAW,YAAY;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5F,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B;;;;;;OAMG;IACH,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;CACjD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,YAAY,CAsChG;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAM/E"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The scheduling operations.
|
|
3
|
+
*
|
|
4
|
+
* Validation runs in a fixed order and completes entirely before any platform
|
|
5
|
+
* call: identifier, tags, content, moment shape, tone, actions, routing size.
|
|
6
|
+
* A caller therefore never sees a native-level error surface through the
|
|
7
|
+
* package, and a rejected request leaves the device untouched.
|
|
8
|
+
*
|
|
9
|
+
* Scheduling an identifier that already has a notification **replaces** it.
|
|
10
|
+
* That is the defined semantic rather than a side effect, which is what lets a
|
|
11
|
+
* caller stop tracking whether it has already scheduled something.
|
|
12
|
+
*/
|
|
13
|
+
import type { NotificationRequest, PendingEntry, ScheduleResult } from '../contract/notification.js';
|
|
14
|
+
import type { ResolvedTone } from '../contract/channel.js';
|
|
15
|
+
import type { NotificationEngineAdapter } from '../engine/adapter.js';
|
|
16
|
+
import { type TimeZoneReader } from './anchor.js';
|
|
17
|
+
export interface ScheduleDependencies {
|
|
18
|
+
readonly engine: NotificationEngineAdapter;
|
|
19
|
+
readonly resolveTone: (toneId: string) => ResolvedTone | undefined;
|
|
20
|
+
readonly timeZone: TimeZoneReader;
|
|
21
|
+
readonly now: () => number;
|
|
22
|
+
/** False when exact-alarm capability is unavailable, forcing approximate mode. */
|
|
23
|
+
readonly canScheduleExactly: () => boolean;
|
|
24
|
+
readonly emit?: (code: string, message: string, context?: Record<string, unknown>) => void;
|
|
25
|
+
}
|
|
26
|
+
/** Validates a request completely, before the engine is touched at all. */
|
|
27
|
+
export declare function validateRequest(request: NotificationRequest, resolveTone: (toneId: string) => ResolvedTone | undefined): ResolvedTone;
|
|
28
|
+
export declare function createScheduler(deps: ScheduleDependencies): {
|
|
29
|
+
schedule: (request: NotificationRequest, options?: {
|
|
30
|
+
readonly seriesId?: string;
|
|
31
|
+
readonly pushCreated?: boolean;
|
|
32
|
+
}) => Promise<ScheduleResult>;
|
|
33
|
+
cancel(id: string): Promise<void>;
|
|
34
|
+
cancelByGroup(groupTag: string): Promise<readonly string[]>;
|
|
35
|
+
cancelByOwner(ownerTag: string): Promise<readonly string[]>;
|
|
36
|
+
cancelAll(): Promise<void>;
|
|
37
|
+
getPending(): Promise<readonly PendingEntry[]>;
|
|
38
|
+
};
|
|
39
|
+
export type Scheduler = ReturnType<typeof createScheduler>;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schedule/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA0B,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAmB,CAAC;AAMnE,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,aAAU,CAAC;AAI7D,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,CAAC;IACnE,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAC3B,kFAAkF;IAClF,QAAQ,CAAC,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC3F;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAC9B,OAAO,EAAE,mBAAmB,EAC5B,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,YAAY,GAAG,SAAS,GACvD,YAAY,CA2Cd;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,oBAAoB;wBAM/C,mBAAmB,YACnB;QAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,KACrE,OAAO,CAAC,cAAc,CAAC;eAmDR,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;4BAQT,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;4BASnC,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;iBAS9C,OAAO,CAAC,IAAI,CAAC;kBAIZ,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;EAIrD;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Owner-tag and group-tag partitioning.
|
|
3
|
+
*
|
|
4
|
+
* A tag is an opaque label the caller supplies and the package never
|
|
5
|
+
* interprets. That is deliberate: modelling identity would mean acquiring an
|
|
6
|
+
* opinion about it, and this package is forbidden from knowing anything about
|
|
7
|
+
* accounts, tenants, or users.
|
|
8
|
+
*
|
|
9
|
+
* What the tag buys is one call — "clear this account's notifications" — on a
|
|
10
|
+
* shared device, without the package ever learning what an account is.
|
|
11
|
+
*/
|
|
12
|
+
import type { PendingEntry } from '../contract/notification.js';
|
|
13
|
+
export type PartitionKind = 'owner' | 'group';
|
|
14
|
+
/** Selects entries carrying a tag. Comparison is exact; nothing is normalized. */
|
|
15
|
+
export declare function selectByTag(entries: readonly PendingEntry[], kind: PartitionKind, tag: string): readonly PendingEntry[];
|
|
16
|
+
/** Identifiers to cancel for a tag. */
|
|
17
|
+
export declare function idsForTag(entries: readonly PendingEntry[], kind: PartitionKind, tag: string): readonly string[];
|
|
18
|
+
/**
|
|
19
|
+
* Groups entries by a tag, keeping untagged entries under a distinct bucket.
|
|
20
|
+
*
|
|
21
|
+
* Untagged is not the same as any tag: an entry with no owner belongs to no
|
|
22
|
+
* account, and folding it into one would make a sign-out delete notifications
|
|
23
|
+
* that were never that account's.
|
|
24
|
+
*/
|
|
25
|
+
export declare function partition(entries: readonly PendingEntry[], kind: PartitionKind): {
|
|
26
|
+
readonly tagged: ReadonlyMap<string, readonly PendingEntry[]>;
|
|
27
|
+
readonly untagged: readonly PendingEntry[];
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=partition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../../src/schedule/partition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA0B,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC;AAE9C,kFAAkF;AAClF,wBAAgB,WAAW,CAC1B,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,IAAI,EAAE,aAAa,EACnB,GAAG,EAAE,MAAM,GACT,SAAS,YAAY,EAAE,CAIzB;AAED,uCAAuC;AACvC,wBAAgB,SAAS,CACxB,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,IAAI,EAAE,aAAa,EACnB,GAAG,EAAE,MAAM,GACT,SAAS,MAAM,EAAE,CAEnB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACxB,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,IAAI,EAAE,aAAa,GACjB;IACF,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC,CAAC;IAC9D,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;CAC3C,CAmBA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Delivery moment resolution.
|
|
3
|
+
*
|
|
4
|
+
* Two rules, and they are two sides of one decision rather than a threshold:
|
|
5
|
+
* a moment more than the tolerance in the past is a caller error and is
|
|
6
|
+
* refused; a moment a few seconds in the past is a processing delay and is
|
|
7
|
+
* delivered promptly. Both outcomes are reported, so a caller never has to
|
|
8
|
+
* guess which happened.
|
|
9
|
+
*
|
|
10
|
+
* Sixty seconds is long enough to absorb reconciling a large desired set, cold
|
|
11
|
+
* start work, and clock skew, and short enough that a genuinely stale schedule
|
|
12
|
+
* is still caught rather than fired at the user minutes late with no
|
|
13
|
+
* explanation.
|
|
14
|
+
*/
|
|
15
|
+
import type { DeliveryMoment } from '../contract/notification.js';
|
|
16
|
+
export declare const PAST_TOLERANCE_MS = 60000;
|
|
17
|
+
export type MomentResolution = {
|
|
18
|
+
readonly kind: 'future';
|
|
19
|
+
readonly at: number;
|
|
20
|
+
} | {
|
|
21
|
+
readonly kind: 'immediate';
|
|
22
|
+
readonly at: number;
|
|
23
|
+
readonly lateBy: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Classifies a resolved instant against now.
|
|
27
|
+
*
|
|
28
|
+
* Takes an already-anchored instant: anchoring decides *which* instant a moment
|
|
29
|
+
* means, and this decides whether that instant is usable. Keeping them separate
|
|
30
|
+
* is what lets each be tested without the other.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveMoment(resolvedAt: number, now: number): MomentResolution;
|
|
33
|
+
/** Validates the shape of a caller-supplied moment before anchoring resolves it. */
|
|
34
|
+
export declare function validateMoment(moment: DeliveryMoment): void;
|
|
35
|
+
//# sourceMappingURL=resolve-moment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-moment.d.ts","sourceRoot":"","sources":["../../../../src/schedule/resolve-moment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA0B,CAAC;AAE/D,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC,MAAM,MAAM,gBAAgB,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAyB/E;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAoB3D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content validation.
|
|
3
|
+
*
|
|
4
|
+
* The package passes content through **unchanged** and never truncates it.
|
|
5
|
+
* Display truncation is the platform's decision and differs between them; a
|
|
6
|
+
* library that pre-truncated would be guessing at a rule it does not own, and
|
|
7
|
+
* would corrupt content that would have displayed fine.
|
|
8
|
+
*
|
|
9
|
+
* What it does refuse is content over the platform's hard payload limit, where
|
|
10
|
+
* the alternative is not a shortened notification but a failed or undefined
|
|
11
|
+
* delivery. That is a real error and is reported as one, before any platform
|
|
12
|
+
* call.
|
|
13
|
+
*/
|
|
14
|
+
import type { NotificationContent } from '../contract/notification.js';
|
|
15
|
+
/**
|
|
16
|
+
* Hard payload ceilings.
|
|
17
|
+
*
|
|
18
|
+
* These are *not* display limits. A title longer than a phone shows is fine and
|
|
19
|
+
* is passed through; the README documents where each platform visually
|
|
20
|
+
* truncates so a caller can decide for itself.
|
|
21
|
+
*
|
|
22
|
+
* The total is deliberately lower than the sum of the parts, so it actually
|
|
23
|
+
* binds — a per-field check that can never be exceeded in aggregate would be
|
|
24
|
+
* dead code. It sits under the 4 KB payload budget both platforms enforce,
|
|
25
|
+
* leaving headroom for the routing payload that shares it.
|
|
26
|
+
*/
|
|
27
|
+
export declare const CONTENT_LIMITS: {
|
|
28
|
+
readonly maxTitleBytes: 512;
|
|
29
|
+
readonly maxBodyBytes: 3072;
|
|
30
|
+
readonly maxSubtitleBytes: 512;
|
|
31
|
+
readonly maxTotalBytes: 3584;
|
|
32
|
+
};
|
|
33
|
+
/** UTF-8 byte length — the unit the platforms actually bound. */
|
|
34
|
+
export declare function byteLength(value: string): number;
|
|
35
|
+
/**
|
|
36
|
+
* Validates content and returns it **byte-identical**.
|
|
37
|
+
*
|
|
38
|
+
* The return value is the same object reference where possible, so nothing
|
|
39
|
+
* downstream can mistake this for a transformation step.
|
|
40
|
+
*/
|
|
41
|
+
export declare function validateContent(content: NotificationContent): NotificationContent;
|
|
42
|
+
//# sourceMappingURL=validate-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-content.d.ts","sourceRoot":"","sources":["../../../../src/schedule/validate-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA0B,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUhD;AAaD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,mBAAmB,CA4CjF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifier validation.
|
|
3
|
+
*
|
|
4
|
+
* Identity is the caller's contract: only the caller can derive an identifier
|
|
5
|
+
* reproducibly from its own data, so the package never generates one.
|
|
6
|
+
*
|
|
7
|
+
* The charset is composite-friendly because real derived keys are hierarchical
|
|
8
|
+
* — `task:1234:reminder:2`. A charset that forced encoding of natural keys
|
|
9
|
+
* would work against caller-supplied identity being readable and reproducible,
|
|
10
|
+
* which is most of its value.
|
|
11
|
+
*
|
|
12
|
+
* Nothing is normalized, trimmed, case-folded, or hashed. Two identifiers
|
|
13
|
+
* differing in any character are different identifiers, and the value visible
|
|
14
|
+
* at the platform boundary is exactly what the caller supplied — which is what
|
|
15
|
+
* lets a notification be traced back to the data that produced it.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MAX_IDENTIFIER_LENGTH = 128;
|
|
18
|
+
export type IdentifierKind = 'id' | 'ownerTag' | 'groupTag' | 'seriesId' | 'actionId';
|
|
19
|
+
/**
|
|
20
|
+
* Throws a typed error naming the violated rule.
|
|
21
|
+
*
|
|
22
|
+
* The offending character and its position are reported; the value itself never
|
|
23
|
+
* is, because an identifier can carry user data a caller derived it from.
|
|
24
|
+
*/
|
|
25
|
+
export declare function validateIdentifier(value: unknown, kind?: IdentifierKind): string;
|
|
26
|
+
/** Non-throwing form, for validating a batch without unwinding on the first failure. */
|
|
27
|
+
export declare function isValidIdentifier(value: unknown): value is string;
|
|
28
|
+
/** Validates an optional tag, returning undefined when absent rather than failing. */
|
|
29
|
+
export declare function validateOptionalTag(value: string | undefined, kind: Extract<IdentifierKind, 'ownerTag' | 'groupTag'>): string | undefined;
|
|
30
|
+
//# sourceMappingURL=validate-identifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-identifier.d.ts","sourceRoot":"","sources":["../../../../src/schedule/validate-identifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAgBzC,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AA0BtF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,cAAqB,GAAG,MAAM,CAsCtF;AAED,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CASjE;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,EAAE,OAAO,CAAC,cAAc,EAAE,UAAU,GAAG,UAAU,CAAC,GACpD,MAAM,GAAG,SAAS,CAGpB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one door every consumer notification goes through to reach the engine.
|
|
3
|
+
*
|
|
4
|
+
* Scheduler, reconciler, recurrence, re-anchoring and channel re-homing all
|
|
5
|
+
* write notifications. Each used to call `engine.schedule` itself, and the
|
|
6
|
+
* guarantees attached to a write — a repeating alert gets its stop marker, and
|
|
7
|
+
* that marker moves when the notification moves — existed only on the paths
|
|
8
|
+
* that remembered them. A recurring alarm never stopped, and a re-anchored one
|
|
9
|
+
* stopped at the old instant.
|
|
10
|
+
*
|
|
11
|
+
* Validation stays with each caller, because each has its own failure policy:
|
|
12
|
+
* the scheduler throws, reconciliation rejects one entry and carries on, and
|
|
13
|
+
* recurrence validates its template once at registration.
|
|
14
|
+
*/
|
|
15
|
+
import type { NotificationEngineAdapter, EngineScheduleRequest } from '../engine/adapter.js';
|
|
16
|
+
export interface ScheduleWriter {
|
|
17
|
+
/** Writes one notification and brings its stop marker in line with it. */
|
|
18
|
+
write(input: EngineScheduleRequest): Promise<void>;
|
|
19
|
+
/** Cancels one notification and the marker guarding it. */
|
|
20
|
+
cancel(id: string): Promise<void>;
|
|
21
|
+
/** Drops the marker for a notification already cancelled some other way. */
|
|
22
|
+
releaseStop(targetId: string): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Platform slots consumer notifications can actually use: stop markers hold
|
|
25
|
+
* real capacity, so the usable ceiling is the platform's minus theirs.
|
|
26
|
+
*/
|
|
27
|
+
capacity(): Promise<number>;
|
|
28
|
+
/**
|
|
29
|
+
* A writer for one pass of many writes (NOT-08): it reads the outstanding stop
|
|
30
|
+
* markers once and keeps that view current, instead of a full read of every
|
|
31
|
+
* pending trigger per operation.
|
|
32
|
+
*/
|
|
33
|
+
pass(): ScheduleWriter;
|
|
34
|
+
}
|
|
35
|
+
export declare function createScheduleWriter(engine: NotificationEngineAdapter): ScheduleWriter;
|
|
36
|
+
//# sourceMappingURL=writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../../src/schedule/writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAmB,CAAC;AAG1F,MAAM,WAAW,cAAc;IAC9B,0EAA0E;IAC1E,KAAK,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,2DAA2D;IAC3D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,4EAA4E;IAC5E,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C;;;OAGG;IACH,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B;;;;OAIG;IACH,IAAI,IAAI,cAAc,CAAC;CACvB;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,yBAAyB,GAAG,cAAc,CAEtF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Caps and eviction for the persisted collections.
|
|
3
|
+
*
|
|
4
|
+
* No collection may grow without bound. Eviction is oldest-first and always
|
|
5
|
+
* observable — a silent eviction would turn a bounded guarantee into an
|
|
6
|
+
* unexplained one.
|
|
7
|
+
*/
|
|
8
|
+
/** Every persisted collection with a size or age bound. */
|
|
9
|
+
export declare const COLLECTION_CAPS: {
|
|
10
|
+
readonly dedupLedger: {
|
|
11
|
+
readonly maxEntries: 500;
|
|
12
|
+
readonly retentionMs: number;
|
|
13
|
+
};
|
|
14
|
+
readonly interactionBuffer: {
|
|
15
|
+
readonly maxEntries: 50;
|
|
16
|
+
readonly retentionMs: number;
|
|
17
|
+
};
|
|
18
|
+
readonly migrationLedger: {
|
|
19
|
+
readonly maxEntries: 20;
|
|
20
|
+
readonly retentionMs: number;
|
|
21
|
+
};
|
|
22
|
+
readonly seriesLedger: {
|
|
23
|
+
readonly maxEntries: 32;
|
|
24
|
+
readonly retentionMs: number;
|
|
25
|
+
};
|
|
26
|
+
readonly permissionHistory: {
|
|
27
|
+
readonly maxEntries: 64;
|
|
28
|
+
readonly retentionMs: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type CollectionName = keyof typeof COLLECTION_CAPS;
|
|
32
|
+
/** Anything stored with a timestamp, which is everything that can age out. */
|
|
33
|
+
export interface Timestamped {
|
|
34
|
+
readonly at: number;
|
|
35
|
+
}
|
|
36
|
+
export interface EvictionOutcome<T> {
|
|
37
|
+
readonly kept: readonly T[];
|
|
38
|
+
readonly evicted: readonly T[];
|
|
39
|
+
readonly reason: 'none' | 'cap' | 'retention' | 'cap+retention';
|
|
40
|
+
/** Entries kept beyond the cap because none of them may be evicted (NOT-16). */
|
|
41
|
+
readonly overCap: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Applies retention first, then the size cap.
|
|
45
|
+
*
|
|
46
|
+
* Order matters: expiring stale entries before trimming means a burst of new
|
|
47
|
+
* entries does not evict fresh ones while stale ones sit protected by
|
|
48
|
+
* recency ordering.
|
|
49
|
+
*/
|
|
50
|
+
export declare function evict<T extends Timestamped>(entries: readonly T[], collection: CollectionName, now: number): EvictionOutcome<T>;
|
|
51
|
+
//# sourceMappingURL=caps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caps.d.ts","sourceRoot":"","sources":["../../../../src/state/caps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2DAA2D;AAC3D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;CAMlB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,eAAe,CAAC;AAE1D,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,WAAW,GAAG,eAAe,CAAC;IAChE,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAaD;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAC1C,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,MAAM,GACT,eAAe,CAAC,CAAC,CAAC,CAyCpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The push deduplication ledger.
|
|
3
|
+
*
|
|
4
|
+
* Providers redeliver. The redelivery typically arrives in a **fresh process**,
|
|
5
|
+
* which is precisely why this is persisted rather than held in memory — an
|
|
6
|
+
* in-memory set would forget exactly when it matters.
|
|
7
|
+
*
|
|
8
|
+
* Bounded by cap and retention. A payload redelivered after its entry has aged
|
|
9
|
+
* out is treated as new: that is the documented bound of the guarantee, not a
|
|
10
|
+
* defect.
|
|
11
|
+
*/
|
|
12
|
+
import type { StateManager } from './record.js';
|
|
13
|
+
export declare function isDuplicate(state: StateManager, dedupId: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Records a payload as seen.
|
|
16
|
+
*
|
|
17
|
+
* Returns true when it was already known, so a caller can branch on the same
|
|
18
|
+
* read that records it rather than checking twice.
|
|
19
|
+
*/
|
|
20
|
+
export declare function recordSeen(state: StateManager, dedupId: string, now: number, ownerTag?: string): boolean;
|
|
21
|
+
//# sourceMappingURL=dedup-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dedup-ledger.d.ts","sourceRoot":"","sources":["../../../../src/state/dedup-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAE7C,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,GACf,OAAO,CAKT"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The durable interaction buffer.
|
|
3
|
+
*
|
|
4
|
+
* A cold-start tap arrives before any handler exists. Holding it in memory
|
|
5
|
+
* would be enough if the process always survived — but the process is exactly
|
|
6
|
+
* what does not survive a cold start, so the buffer is persisted.
|
|
7
|
+
*
|
|
8
|
+
* This is the one content-bearing thing the package stores: an interaction
|
|
9
|
+
* cannot be delivered without its routing payload. It is evicted the moment it
|
|
10
|
+
* is delivered, and time-limited regardless, so an event nobody ever collects
|
|
11
|
+
* cannot sit on disk forever.
|
|
12
|
+
*
|
|
13
|
+
* Text the user typed into a reply action is never written to disk (NOT-14): it
|
|
14
|
+
* is free text, and the store is not encrypted. It is held in memory beside the
|
|
15
|
+
* buffer, so a handler registered later in the same process still receives it;
|
|
16
|
+
* if the process dies first, the event is delivered without `inputText`.
|
|
17
|
+
*/
|
|
18
|
+
import type { StateManager } from './record.js';
|
|
19
|
+
import type { InteractionEvent } from '../contract/interaction.js';
|
|
20
|
+
export declare function buffer(state: StateManager, event: InteractionEvent): void;
|
|
21
|
+
/**
|
|
22
|
+
* Takes every buffered event in occurrence order and clears them.
|
|
23
|
+
*
|
|
24
|
+
* Draining and clearing together is deliberate: delivering an event twice is
|
|
25
|
+
* worse than the alternative, because a consumer that acts on an interaction
|
|
26
|
+
* (marking a task done, sending a reply) would act twice.
|
|
27
|
+
*/
|
|
28
|
+
export declare function drain(state: StateManager): readonly InteractionEvent[];
|
|
29
|
+
export declare function bufferedCount(state: StateManager): number;
|
|
30
|
+
//# sourceMappingURL=interaction-buffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-buffer.d.ts","sourceRoot":"","sources":["../../../../src/state/interaction-buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAuB,MAAM,aAAU,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAAyB,CAAC;AAmBhE,wBAAgB,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAoBzE;AAED;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,gBAAgB,EAAE,CAuBtE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAEzD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MMKV-backed state store.
|
|
3
|
+
*
|
|
4
|
+
* Every MMKV import is confined to this file, so the rest of the package stays
|
|
5
|
+
* testable without a native module.
|
|
6
|
+
*
|
|
7
|
+
* Backup exclusion is achieved by *where* the data lives rather than by setting
|
|
8
|
+
* a file attribute: on iOS the instance is rooted under `Library/Caches`, which
|
|
9
|
+
* the platform excludes from iCloud and iTunes backup by design. The OS may
|
|
10
|
+
* purge that directory under storage pressure — acceptable here precisely
|
|
11
|
+
* because discarding and rebuilding this record is already a specified,
|
|
12
|
+
* non-blocking condition.
|
|
13
|
+
*
|
|
14
|
+
* On Android, backup exclusion is declared in the consuming app's
|
|
15
|
+
* `data_extraction_rules.xml` and `full_backup_content`, documented in the
|
|
16
|
+
* README. It is the app's manifest, so it is the app's declaration to make.
|
|
17
|
+
*/
|
|
18
|
+
import type { StateStore } from './store.js';
|
|
19
|
+
export interface MmkvStoreOptions {
|
|
20
|
+
/** Told once, with the reason, when the store falls back to memory. */
|
|
21
|
+
readonly onDegraded?: (cause: unknown) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates the persistent store, falling back to memory when MMKV is absent.
|
|
25
|
+
*
|
|
26
|
+
* The fallback is deliberate: a missing optional native module degrades
|
|
27
|
+
* deduplication and cold-start buffering to session scope, which is a
|
|
28
|
+
* documented degradation. It must never stop notifications being delivered, and
|
|
29
|
+
* it is never silent (NOT-15): it reports `STATE_STORE_DEGRADED` to the app's SDK
|
|
30
|
+
* sinks and to `onDegraded`, and the store reports `durable: false`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createMmkvStore(options?: MmkvStoreOptions): StateStore;
|
|
33
|
+
//# sourceMappingURL=mmkv-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mmkv-store.d.ts","sourceRoot":"","sources":["../../../../src/state/mmkv-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAWH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC;AAiB1C,MAAM,WAAW,gBAAgB;IAChC,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,UAAU,CAiC1E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission-request history.
|
|
3
|
+
*
|
|
4
|
+
* The platform cannot tell you whether you have already asked. On both
|
|
5
|
+
* platforms a second request after a denial is silently a no-op, so an app that
|
|
6
|
+
* does not remember will keep "asking" and keep appearing to be refused.
|
|
7
|
+
*
|
|
8
|
+
* Keyed by owner tag so a multi-account device can clear one account's history
|
|
9
|
+
* on sign-out without forgetting what it asked the others.
|
|
10
|
+
*/
|
|
11
|
+
import type { StateManager } from './record.js';
|
|
12
|
+
import type { PermissionKind } from '../contract/permission.js';
|
|
13
|
+
export declare function hasRequested(state: StateManager, kind: PermissionKind, ownerTag?: string): boolean;
|
|
14
|
+
export declare function recordRequested(state: StateManager, kind: PermissionKind, now: number, ownerTag?: string): void;
|
|
15
|
+
/** How many requests for `kind` the user has refused on this device. */
|
|
16
|
+
export declare function denialCount(state: StateManager, kind: PermissionKind): number;
|
|
17
|
+
export declare function recordDenial(state: StateManager, kind: PermissionKind, now: number): void;
|
|
18
|
+
/** Forgets refusals once the permission is seen granted: the next refusal starts over. */
|
|
19
|
+
export declare function clearDenials(state: StateManager, kind: PermissionKind): void;
|
|
20
|
+
//# sourceMappingURL=permission-history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-history.d.ts","sourceRoot":"","sources":["../../../../src/state/permission-history.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAAwB,CAAC;AAM7D,wBAAgB,YAAY,CAC3B,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,cAAc,EACpB,QAAQ,CAAC,EAAE,MAAM,GACf,OAAO,CAGT;AAED,wBAAgB,eAAe,CAC9B,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,GACf,IAAI,CAQN;AAKD,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAG7E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAOzF;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAI5E"}
|