@marinoscar/platform-contract 0.1.0-next.3 → 0.1.0-next.5
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 +175 -0
- package/README.md +23 -1
- package/dist/cjs/ai/capabilities.d.ts +85 -0
- package/dist/cjs/ai/capabilities.d.ts.map +1 -0
- package/dist/cjs/ai/capabilities.js +93 -0
- package/dist/cjs/ai/capabilities.js.map +1 -0
- package/dist/cjs/ai/constants.d.ts +239 -0
- package/dist/cjs/ai/constants.d.ts.map +1 -0
- package/dist/cjs/ai/constants.js +233 -0
- package/dist/cjs/ai/constants.js.map +1 -0
- package/dist/cjs/ai/features.d.ts +24 -0
- package/dist/cjs/ai/features.d.ts.map +1 -0
- package/dist/cjs/ai/features.js +33 -0
- package/dist/cjs/ai/features.js.map +1 -0
- package/dist/cjs/ai/index.d.ts +11 -0
- package/dist/cjs/ai/index.d.ts.map +1 -0
- package/dist/cjs/ai/index.js +81 -0
- package/dist/cjs/ai/index.js.map +1 -0
- package/dist/cjs/ai/org-keys.d.ts +50 -0
- package/dist/cjs/ai/org-keys.d.ts.map +1 -0
- package/dist/cjs/ai/org-keys.js +43 -0
- package/dist/cjs/ai/org-keys.js.map +1 -0
- package/dist/cjs/ai/schemas.d.ts +642 -0
- package/dist/cjs/ai/schemas.d.ts.map +1 -0
- package/dist/cjs/ai/schemas.js +894 -0
- package/dist/cjs/ai/schemas.js.map +1 -0
- package/dist/cjs/android-app/constants.d.ts +337 -0
- package/dist/cjs/android-app/constants.d.ts.map +1 -0
- package/dist/cjs/android-app/constants.js +312 -0
- package/dist/cjs/android-app/constants.js.map +1 -0
- package/dist/cjs/android-app/index.d.ts +5 -0
- package/dist/cjs/android-app/index.d.ts.map +1 -0
- package/dist/cjs/android-app/index.js +57 -0
- package/dist/cjs/android-app/index.js.map +1 -0
- package/dist/cjs/android-app/schemas.d.ts +358 -0
- package/dist/cjs/android-app/schemas.d.ts.map +1 -0
- package/dist/cjs/android-app/schemas.js +310 -0
- package/dist/cjs/android-app/schemas.js.map +1 -0
- package/dist/cjs/credentials/constants.d.ts +35 -0
- package/dist/cjs/credentials/constants.d.ts.map +1 -0
- package/dist/cjs/credentials/constants.js +39 -0
- package/dist/cjs/credentials/constants.js.map +1 -0
- package/dist/cjs/credentials/index.d.ts +5 -0
- package/dist/cjs/credentials/index.d.ts.map +1 -0
- package/dist/cjs/credentials/index.js +17 -0
- package/dist/cjs/credentials/index.js.map +1 -0
- package/dist/cjs/credentials/schemas.d.ts +64 -0
- package/dist/cjs/credentials/schemas.d.ts.map +1 -0
- package/dist/cjs/credentials/schemas.js +82 -0
- package/dist/cjs/credentials/schemas.js.map +1 -0
- package/dist/cjs/db-backup/config.d.ts +76 -0
- package/dist/cjs/db-backup/config.d.ts.map +1 -0
- package/dist/cjs/db-backup/config.js +115 -0
- package/dist/cjs/db-backup/config.js.map +1 -0
- package/dist/cjs/db-backup/constants.d.ts +314 -0
- package/dist/cjs/db-backup/constants.d.ts.map +1 -0
- package/dist/cjs/db-backup/constants.js +243 -0
- package/dist/cjs/db-backup/constants.js.map +1 -0
- package/dist/cjs/db-backup/index.d.ts +19 -0
- package/dist/cjs/db-backup/index.d.ts.map +1 -0
- package/dist/cjs/db-backup/index.js +81 -0
- package/dist/cjs/db-backup/index.js.map +1 -0
- package/dist/cjs/db-backup/node-credential.d.ts +37 -0
- package/dist/cjs/db-backup/node-credential.d.ts.map +1 -0
- package/dist/cjs/db-backup/node-credential.js +107 -0
- package/dist/cjs/db-backup/node-credential.js.map +1 -0
- package/dist/cjs/db-backup/node-result.d.ts +34 -0
- package/dist/cjs/db-backup/node-result.d.ts.map +1 -0
- package/dist/cjs/db-backup/node-result.js +168 -0
- package/dist/cjs/db-backup/node-result.js.map +1 -0
- package/dist/cjs/db-backup/restore.d.ts +405 -0
- package/dist/cjs/db-backup/restore.d.ts.map +1 -0
- package/dist/cjs/db-backup/restore.js +497 -0
- package/dist/cjs/db-backup/restore.js.map +1 -0
- package/dist/cjs/db-backup/run-actions.d.ts +49 -0
- package/dist/cjs/db-backup/run-actions.d.ts.map +1 -0
- package/dist/cjs/db-backup/run-actions.js +121 -0
- package/dist/cjs/db-backup/run-actions.js.map +1 -0
- package/dist/cjs/db-backup/runs-list-query.d.ts +20 -0
- package/dist/cjs/db-backup/runs-list-query.d.ts.map +1 -0
- package/dist/cjs/db-backup/runs-list-query.js +53 -0
- package/dist/cjs/db-backup/runs-list-query.js.map +1 -0
- package/dist/cjs/db-backup/runs.d.ts +46 -0
- package/dist/cjs/db-backup/runs.d.ts.map +1 -0
- package/dist/cjs/db-backup/runs.js +232 -0
- package/dist/cjs/db-backup/runs.js.map +1 -0
- package/dist/cjs/db-backup/schemas.d.ts +9 -0
- package/dist/cjs/db-backup/schemas.d.ts.map +1 -0
- package/dist/cjs/db-backup/schemas.js +31 -0
- package/dist/cjs/db-backup/schemas.js.map +1 -0
- package/dist/cjs/db-backup/settings-schemas.d.ts +217 -0
- package/dist/cjs/db-backup/settings-schemas.d.ts.map +1 -0
- package/dist/cjs/db-backup/settings-schemas.js +319 -0
- package/dist/cjs/db-backup/settings-schemas.js.map +1 -0
- package/dist/cjs/email/constants.d.ts +82 -0
- package/dist/cjs/email/constants.d.ts.map +1 -0
- package/dist/cjs/email/constants.js +82 -0
- package/dist/cjs/email/constants.js.map +1 -0
- package/dist/cjs/email/index.d.ts +5 -0
- package/dist/cjs/email/index.d.ts.map +1 -0
- package/dist/cjs/email/index.js +30 -0
- package/dist/cjs/email/index.js.map +1 -0
- package/dist/cjs/email/schemas.d.ts +276 -0
- package/dist/cjs/email/schemas.d.ts.map +1 -0
- package/dist/cjs/email/schemas.js +280 -0
- package/dist/cjs/email/schemas.js.map +1 -0
- package/dist/cjs/exports/constants.d.ts +123 -0
- package/dist/cjs/exports/constants.d.ts.map +1 -0
- package/dist/cjs/exports/constants.js +109 -0
- package/dist/cjs/exports/constants.js.map +1 -0
- package/dist/cjs/exports/index.d.ts +5 -0
- package/dist/cjs/exports/index.d.ts.map +1 -0
- package/dist/cjs/exports/index.js +42 -0
- package/dist/cjs/exports/index.js.map +1 -0
- package/dist/cjs/exports/schemas.d.ts +386 -0
- package/dist/cjs/exports/schemas.d.ts.map +1 -0
- package/dist/cjs/exports/schemas.js +288 -0
- package/dist/cjs/exports/schemas.js.map +1 -0
- package/dist/cjs/identity/constants.d.ts +273 -0
- package/dist/cjs/identity/constants.d.ts.map +1 -0
- package/dist/cjs/identity/constants.js +248 -0
- package/dist/cjs/identity/constants.js.map +1 -0
- package/dist/cjs/identity/index.d.ts +5 -0
- package/dist/cjs/identity/index.d.ts.map +1 -0
- package/dist/cjs/identity/index.js +73 -0
- package/dist/cjs/identity/index.js.map +1 -0
- package/dist/cjs/identity/schemas.d.ts +784 -0
- package/dist/cjs/identity/schemas.d.ts.map +1 -0
- package/dist/cjs/identity/schemas.js +684 -0
- package/dist/cjs/identity/schemas.js.map +1 -0
- package/dist/cjs/jobs/constants.d.ts +135 -0
- package/dist/cjs/jobs/constants.d.ts.map +1 -0
- package/dist/cjs/jobs/constants.js +130 -0
- package/dist/cjs/jobs/constants.js.map +1 -0
- package/dist/cjs/jobs/index.d.ts +9 -0
- package/dist/cjs/jobs/index.d.ts.map +1 -0
- package/dist/cjs/jobs/index.js +59 -0
- package/dist/cjs/jobs/index.js.map +1 -0
- package/dist/cjs/jobs/retention-schemas.d.ts +252 -0
- package/dist/cjs/jobs/retention-schemas.d.ts.map +1 -0
- package/dist/cjs/jobs/retention-schemas.js +233 -0
- package/dist/cjs/jobs/retention-schemas.js.map +1 -0
- package/dist/cjs/jobs/schemas.d.ts +361 -0
- package/dist/cjs/jobs/schemas.d.ts.map +1 -0
- package/dist/cjs/jobs/schemas.js +706 -0
- package/dist/cjs/jobs/schemas.js.map +1 -0
- package/dist/cjs/jobs/settings-schemas.d.ts +84 -0
- package/dist/cjs/jobs/settings-schemas.d.ts.map +1 -0
- package/dist/cjs/jobs/settings-schemas.js +116 -0
- package/dist/cjs/jobs/settings-schemas.js.map +1 -0
- package/dist/cjs/nodes/admin-schemas.d.ts +204 -0
- package/dist/cjs/nodes/admin-schemas.d.ts.map +1 -0
- package/dist/cjs/nodes/admin-schemas.js +153 -0
- package/dist/cjs/nodes/admin-schemas.js.map +1 -0
- package/dist/cjs/nodes/constants.d.ts +86 -0
- package/dist/cjs/nodes/constants.d.ts.map +1 -0
- package/dist/cjs/nodes/constants.js +102 -0
- package/dist/cjs/nodes/constants.js.map +1 -0
- package/dist/cjs/nodes/index.d.ts +8 -0
- package/dist/cjs/nodes/index.d.ts.map +1 -0
- package/dist/cjs/nodes/index.js +50 -0
- package/dist/cjs/nodes/index.js.map +1 -0
- package/dist/cjs/nodes/schemas.d.ts +332 -0
- package/dist/cjs/nodes/schemas.d.ts.map +1 -0
- package/dist/cjs/nodes/schemas.js +937 -0
- package/dist/cjs/nodes/schemas.js.map +1 -0
- package/dist/cjs/nodes/settings-schemas.d.ts +82 -0
- package/dist/cjs/nodes/settings-schemas.d.ts.map +1 -0
- package/dist/cjs/nodes/settings-schemas.js +106 -0
- package/dist/cjs/nodes/settings-schemas.js.map +1 -0
- package/dist/cjs/notifications/constants.d.ts +197 -0
- package/dist/cjs/notifications/constants.d.ts.map +1 -0
- package/dist/cjs/notifications/constants.js +181 -0
- package/dist/cjs/notifications/constants.js.map +1 -0
- package/dist/cjs/notifications/index.d.ts +5 -0
- package/dist/cjs/notifications/index.d.ts.map +1 -0
- package/dist/cjs/notifications/index.js +86 -0
- package/dist/cjs/notifications/index.js.map +1 -0
- package/dist/cjs/notifications/schemas.d.ts +1016 -0
- package/dist/cjs/notifications/schemas.d.ts.map +1 -0
- package/dist/cjs/notifications/schemas.js +851 -0
- package/dist/cjs/notifications/schemas.js.map +1 -0
- package/dist/cjs/onboarding/constants.d.ts +138 -0
- package/dist/cjs/onboarding/constants.d.ts.map +1 -0
- package/dist/cjs/onboarding/constants.js +123 -0
- package/dist/cjs/onboarding/constants.js.map +1 -0
- package/dist/cjs/onboarding/index.d.ts +5 -0
- package/dist/cjs/onboarding/index.d.ts.map +1 -0
- package/dist/cjs/onboarding/index.js +42 -0
- package/dist/cjs/onboarding/index.js.map +1 -0
- package/dist/cjs/onboarding/schemas.d.ts +360 -0
- package/dist/cjs/onboarding/schemas.d.ts.map +1 -0
- package/dist/cjs/onboarding/schemas.js +260 -0
- package/dist/cjs/onboarding/schemas.js.map +1 -0
- package/dist/cjs/settings/constants.d.ts +206 -0
- package/dist/cjs/settings/constants.d.ts.map +1 -0
- package/dist/cjs/settings/constants.js +200 -0
- package/dist/cjs/settings/constants.js.map +1 -0
- package/dist/cjs/settings/index.d.ts +6 -0
- package/dist/cjs/settings/index.d.ts.map +1 -0
- package/dist/cjs/settings/index.js +62 -0
- package/dist/cjs/settings/index.js.map +1 -0
- package/dist/cjs/settings/schemas.d.ts +574 -0
- package/dist/cjs/settings/schemas.d.ts.map +1 -0
- package/dist/cjs/settings/schemas.js +437 -0
- package/dist/cjs/settings/schemas.js.map +1 -0
- package/dist/cjs/settings/types.d.ts +79 -0
- package/dist/cjs/settings/types.d.ts.map +1 -0
- package/dist/cjs/settings/types.js +6 -0
- package/dist/cjs/settings/types.js.map +1 -0
- package/dist/cjs/sharing/constants.d.ts +216 -0
- package/dist/cjs/sharing/constants.d.ts.map +1 -0
- package/dist/cjs/sharing/constants.js +163 -0
- package/dist/cjs/sharing/constants.js.map +1 -0
- package/dist/cjs/sharing/enum.d.ts +5 -0
- package/dist/cjs/sharing/enum.d.ts.map +1 -0
- package/dist/cjs/sharing/enum.js +9 -0
- package/dist/cjs/sharing/enum.js.map +1 -0
- package/dist/cjs/sharing/grants.d.ts +490 -0
- package/dist/cjs/sharing/grants.d.ts.map +1 -0
- package/dist/cjs/sharing/grants.js +447 -0
- package/dist/cjs/sharing/grants.js.map +1 -0
- package/dist/cjs/sharing/groups.d.ts +410 -0
- package/dist/cjs/sharing/groups.d.ts.map +1 -0
- package/dist/cjs/sharing/groups.js +375 -0
- package/dist/cjs/sharing/groups.js.map +1 -0
- package/dist/cjs/sharing/index.d.ts +5 -0
- package/dist/cjs/sharing/index.d.ts.map +1 -0
- package/dist/cjs/sharing/index.js +77 -0
- package/dist/cjs/sharing/index.js.map +1 -0
- package/dist/cjs/sharing/schemas.d.ts +3 -0
- package/dist/cjs/sharing/schemas.d.ts.map +1 -0
- package/dist/cjs/sharing/schemas.js +21 -0
- package/dist/cjs/sharing/schemas.js.map +1 -0
- package/dist/cjs/storage/constants.d.ts +111 -0
- package/dist/cjs/storage/constants.d.ts.map +1 -0
- package/dist/cjs/storage/constants.js +107 -0
- package/dist/cjs/storage/constants.js.map +1 -0
- package/dist/cjs/storage/index.d.ts +27 -0
- package/dist/cjs/storage/index.d.ts.map +1 -0
- package/dist/cjs/storage/index.js +69 -0
- package/dist/cjs/storage/index.js.map +1 -0
- package/dist/cjs/storage/objects-complete-upload.d.ts +19 -0
- package/dist/cjs/storage/objects-complete-upload.d.ts.map +1 -0
- package/dist/cjs/storage/objects-complete-upload.js +19 -0
- package/dist/cjs/storage/objects-complete-upload.js.map +1 -0
- package/dist/cjs/storage/objects-download-url.d.ts +17 -0
- package/dist/cjs/storage/objects-download-url.d.ts.map +1 -0
- package/dist/cjs/storage/objects-download-url.js +16 -0
- package/dist/cjs/storage/objects-download-url.js.map +1 -0
- package/dist/cjs/storage/objects-init-upload.d.ts +39 -0
- package/dist/cjs/storage/objects-init-upload.d.ts.map +1 -0
- package/dist/cjs/storage/objects-init-upload.js +40 -0
- package/dist/cjs/storage/objects-init-upload.js.map +1 -0
- package/dist/cjs/storage/objects-list-query.d.ts +50 -0
- package/dist/cjs/storage/objects-list-query.d.ts.map +1 -0
- package/dist/cjs/storage/objects-list-query.js +23 -0
- package/dist/cjs/storage/objects-list-query.js.map +1 -0
- package/dist/cjs/storage/objects-object-response.d.ts +49 -0
- package/dist/cjs/storage/objects-object-response.d.ts.map +1 -0
- package/dist/cjs/storage/objects-object-response.js +54 -0
- package/dist/cjs/storage/objects-object-response.js.map +1 -0
- package/dist/cjs/storage/objects-update-metadata.d.ts +16 -0
- package/dist/cjs/storage/objects-update-metadata.d.ts.map +1 -0
- package/dist/cjs/storage/objects-update-metadata.js +14 -0
- package/dist/cjs/storage/objects-update-metadata.js.map +1 -0
- package/dist/cjs/storage/schemas.d.ts +13 -0
- package/dist/cjs/storage/schemas.d.ts.map +1 -0
- package/dist/cjs/storage/schemas.js +35 -0
- package/dist/cjs/storage/schemas.js.map +1 -0
- package/dist/cjs/storage/settings-schemas.d.ts +188 -0
- package/dist/cjs/storage/settings-schemas.d.ts.map +1 -0
- package/dist/cjs/storage/settings-schemas.js +223 -0
- package/dist/cjs/storage/settings-schemas.js.map +1 -0
- package/dist/cjs/storage/storage-bucket-provision.d.ts +152 -0
- package/dist/cjs/storage/storage-bucket-provision.d.ts.map +1 -0
- package/dist/cjs/storage/storage-bucket-provision.js +216 -0
- package/dist/cjs/storage/storage-bucket-provision.js.map +1 -0
- package/dist/cjs/storage/storage-config-response.d.ts +99 -0
- package/dist/cjs/storage/storage-config-response.d.ts.map +1 -0
- package/dist/cjs/storage/storage-config-response.js +173 -0
- package/dist/cjs/storage/storage-config-response.js.map +1 -0
- package/dist/cjs/storage/storage-config-update.d.ts +46 -0
- package/dist/cjs/storage/storage-config-update.d.ts.map +1 -0
- package/dist/cjs/storage/storage-config-update.js +133 -0
- package/dist/cjs/storage/storage-config-update.js.map +1 -0
- package/dist/cjs/storage/storage-connection-test.d.ts +129 -0
- package/dist/cjs/storage/storage-connection-test.d.ts.map +1 -0
- package/dist/cjs/storage/storage-connection-test.js +244 -0
- package/dist/cjs/storage/storage-connection-test.js.map +1 -0
- package/dist/cjs/storage/storage-status.d.ts +16 -0
- package/dist/cjs/storage/storage-status.d.ts.map +1 -0
- package/dist/cjs/storage/storage-status.js +23 -0
- package/dist/cjs/storage/storage-status.js.map +1 -0
- package/dist/cjs/telemetry/config.d.ts +4 -0
- package/dist/cjs/telemetry/config.d.ts.map +1 -1
- package/dist/cjs/telemetry/config.js +16 -2
- package/dist/cjs/telemetry/config.js.map +1 -1
- package/dist/cjs/telemetry/connection.d.ts +1 -1
- package/dist/cjs/telemetry/constants.d.ts +378 -6
- package/dist/cjs/telemetry/constants.d.ts.map +1 -1
- package/dist/cjs/telemetry/constants.js +290 -5
- package/dist/cjs/telemetry/constants.js.map +1 -1
- package/dist/cjs/telemetry/dashboard.d.ts +188 -17
- package/dist/cjs/telemetry/dashboard.d.ts.map +1 -1
- package/dist/cjs/telemetry/dashboard.js +61 -3
- package/dist/cjs/telemetry/dashboard.js.map +1 -1
- package/dist/cjs/telemetry/index.d.ts +4 -4
- package/dist/cjs/telemetry/index.d.ts.map +1 -1
- package/dist/cjs/telemetry/index.js +35 -3
- package/dist/cjs/telemetry/index.js.map +1 -1
- package/dist/cjs/telemetry/presentation.d.ts +243 -0
- package/dist/cjs/telemetry/presentation.d.ts.map +1 -0
- package/dist/cjs/telemetry/presentation.js +300 -0
- package/dist/cjs/telemetry/presentation.js.map +1 -0
- package/dist/cjs/telemetry/query.d.ts +2 -2
- package/dist/cjs/telemetry/schemas.d.ts +5 -2
- package/dist/cjs/telemetry/schemas.d.ts.map +1 -1
- package/dist/cjs/telemetry/schemas.js +21 -1
- package/dist/cjs/telemetry/schemas.js.map +1 -1
- package/dist/cjs/telemetry/stack.d.ts +5 -5
- package/dist/cjs/telemetry/store.d.ts +111 -0
- package/dist/cjs/telemetry/store.d.ts.map +1 -0
- package/dist/cjs/telemetry/store.js +83 -0
- package/dist/cjs/telemetry/store.js.map +1 -0
- package/dist/cjs/user-data/constants.d.ts +157 -0
- package/dist/cjs/user-data/constants.d.ts.map +1 -0
- package/dist/cjs/user-data/constants.js +137 -0
- package/dist/cjs/user-data/constants.js.map +1 -0
- package/dist/cjs/user-data/index.d.ts +5 -0
- package/dist/cjs/user-data/index.d.ts.map +1 -0
- package/dist/cjs/user-data/index.js +46 -0
- package/dist/cjs/user-data/index.js.map +1 -0
- package/dist/cjs/user-data/schemas.d.ts +306 -0
- package/dist/cjs/user-data/schemas.d.ts.map +1 -0
- package/dist/cjs/user-data/schemas.js +333 -0
- package/dist/cjs/user-data/schemas.js.map +1 -0
- package/dist/esm/ai/capabilities.d.ts +85 -0
- package/dist/esm/ai/capabilities.d.ts.map +1 -0
- package/dist/esm/ai/capabilities.js +90 -0
- package/dist/esm/ai/capabilities.js.map +1 -0
- package/dist/esm/ai/constants.d.ts +239 -0
- package/dist/esm/ai/constants.d.ts.map +1 -0
- package/dist/esm/ai/constants.js +229 -0
- package/dist/esm/ai/constants.js.map +1 -0
- package/dist/esm/ai/features.d.ts +24 -0
- package/dist/esm/ai/features.d.ts.map +1 -0
- package/dist/esm/ai/features.js +30 -0
- package/dist/esm/ai/features.js.map +1 -0
- package/dist/esm/ai/index.d.ts +11 -0
- package/dist/esm/ai/index.d.ts.map +1 -0
- package/dist/esm/ai/index.js +16 -0
- package/dist/esm/ai/index.js.map +1 -0
- package/dist/esm/ai/org-keys.d.ts +50 -0
- package/dist/esm/ai/org-keys.d.ts.map +1 -0
- package/dist/esm/ai/org-keys.js +40 -0
- package/dist/esm/ai/org-keys.js.map +1 -0
- package/dist/esm/ai/schemas.d.ts +642 -0
- package/dist/esm/ai/schemas.d.ts.map +1 -0
- package/dist/esm/ai/schemas.js +889 -0
- package/dist/esm/ai/schemas.js.map +1 -0
- package/dist/esm/android-app/constants.d.ts +337 -0
- package/dist/esm/android-app/constants.d.ts.map +1 -0
- package/dist/esm/android-app/constants.js +306 -0
- package/dist/esm/android-app/constants.js.map +1 -0
- package/dist/esm/android-app/index.d.ts +5 -0
- package/dist/esm/android-app/index.d.ts.map +1 -0
- package/dist/esm/android-app/index.js +8 -0
- package/dist/esm/android-app/index.js.map +1 -0
- package/dist/esm/android-app/schemas.d.ts +358 -0
- package/dist/esm/android-app/schemas.d.ts.map +1 -0
- package/dist/esm/android-app/schemas.js +306 -0
- package/dist/esm/android-app/schemas.js.map +1 -0
- package/dist/esm/credentials/constants.d.ts +35 -0
- package/dist/esm/credentials/constants.d.ts.map +1 -0
- package/dist/esm/credentials/constants.js +36 -0
- package/dist/esm/credentials/constants.js.map +1 -0
- package/dist/esm/credentials/index.d.ts +5 -0
- package/dist/esm/credentials/index.d.ts.map +1 -0
- package/dist/esm/credentials/index.js +8 -0
- package/dist/esm/credentials/index.js.map +1 -0
- package/dist/esm/credentials/schemas.d.ts +64 -0
- package/dist/esm/credentials/schemas.d.ts.map +1 -0
- package/dist/esm/credentials/schemas.js +79 -0
- package/dist/esm/credentials/schemas.js.map +1 -0
- package/dist/esm/db-backup/config.d.ts +76 -0
- package/dist/esm/db-backup/config.d.ts.map +1 -0
- package/dist/esm/db-backup/config.js +112 -0
- package/dist/esm/db-backup/config.js.map +1 -0
- package/dist/esm/db-backup/constants.d.ts +314 -0
- package/dist/esm/db-backup/constants.d.ts.map +1 -0
- package/dist/esm/db-backup/constants.js +240 -0
- package/dist/esm/db-backup/constants.js.map +1 -0
- package/dist/esm/db-backup/index.d.ts +19 -0
- package/dist/esm/db-backup/index.d.ts.map +1 -0
- package/dist/esm/db-backup/index.js +25 -0
- package/dist/esm/db-backup/index.js.map +1 -0
- package/dist/esm/db-backup/node-credential.d.ts +37 -0
- package/dist/esm/db-backup/node-credential.d.ts.map +1 -0
- package/dist/esm/db-backup/node-credential.js +104 -0
- package/dist/esm/db-backup/node-credential.js.map +1 -0
- package/dist/esm/db-backup/node-result.d.ts +34 -0
- package/dist/esm/db-backup/node-result.d.ts.map +1 -0
- package/dist/esm/db-backup/node-result.js +165 -0
- package/dist/esm/db-backup/node-result.js.map +1 -0
- package/dist/esm/db-backup/restore.d.ts +405 -0
- package/dist/esm/db-backup/restore.d.ts.map +1 -0
- package/dist/esm/db-backup/restore.js +494 -0
- package/dist/esm/db-backup/restore.js.map +1 -0
- package/dist/esm/db-backup/run-actions.d.ts +49 -0
- package/dist/esm/db-backup/run-actions.d.ts.map +1 -0
- package/dist/esm/db-backup/run-actions.js +118 -0
- package/dist/esm/db-backup/run-actions.js.map +1 -0
- package/dist/esm/db-backup/runs-list-query.d.ts +20 -0
- package/dist/esm/db-backup/runs-list-query.d.ts.map +1 -0
- package/dist/esm/db-backup/runs-list-query.js +50 -0
- package/dist/esm/db-backup/runs-list-query.js.map +1 -0
- package/dist/esm/db-backup/runs.d.ts +46 -0
- package/dist/esm/db-backup/runs.d.ts.map +1 -0
- package/dist/esm/db-backup/runs.js +229 -0
- package/dist/esm/db-backup/runs.js.map +1 -0
- package/dist/esm/db-backup/schemas.d.ts +9 -0
- package/dist/esm/db-backup/schemas.d.ts.map +1 -0
- package/dist/esm/db-backup/schemas.js +15 -0
- package/dist/esm/db-backup/schemas.js.map +1 -0
- package/dist/esm/db-backup/settings-schemas.d.ts +217 -0
- package/dist/esm/db-backup/settings-schemas.d.ts.map +1 -0
- package/dist/esm/db-backup/settings-schemas.js +316 -0
- package/dist/esm/db-backup/settings-schemas.js.map +1 -0
- package/dist/esm/email/constants.d.ts +82 -0
- package/dist/esm/email/constants.d.ts.map +1 -0
- package/dist/esm/email/constants.js +79 -0
- package/dist/esm/email/constants.js.map +1 -0
- package/dist/esm/email/index.d.ts +5 -0
- package/dist/esm/email/index.d.ts.map +1 -0
- package/dist/esm/email/index.js +8 -0
- package/dist/esm/email/index.js.map +1 -0
- package/dist/esm/email/schemas.d.ts +276 -0
- package/dist/esm/email/schemas.d.ts.map +1 -0
- package/dist/esm/email/schemas.js +277 -0
- package/dist/esm/email/schemas.js.map +1 -0
- package/dist/esm/exports/constants.d.ts +123 -0
- package/dist/esm/exports/constants.d.ts.map +1 -0
- package/dist/esm/exports/constants.js +106 -0
- package/dist/esm/exports/constants.js.map +1 -0
- package/dist/esm/exports/index.d.ts +5 -0
- package/dist/esm/exports/index.d.ts.map +1 -0
- package/dist/esm/exports/index.js +7 -0
- package/dist/esm/exports/index.js.map +1 -0
- package/dist/esm/exports/schemas.d.ts +386 -0
- package/dist/esm/exports/schemas.d.ts.map +1 -0
- package/dist/esm/exports/schemas.js +285 -0
- package/dist/esm/exports/schemas.js.map +1 -0
- package/dist/esm/identity/constants.d.ts +273 -0
- package/dist/esm/identity/constants.d.ts.map +1 -0
- package/dist/esm/identity/constants.js +244 -0
- package/dist/esm/identity/constants.js.map +1 -0
- package/dist/esm/identity/index.d.ts +5 -0
- package/dist/esm/identity/index.d.ts.map +1 -0
- package/dist/esm/identity/index.js +10 -0
- package/dist/esm/identity/index.js.map +1 -0
- package/dist/esm/identity/schemas.d.ts +784 -0
- package/dist/esm/identity/schemas.d.ts.map +1 -0
- package/dist/esm/identity/schemas.js +681 -0
- package/dist/esm/identity/schemas.js.map +1 -0
- package/dist/esm/jobs/constants.d.ts +135 -0
- package/dist/esm/jobs/constants.d.ts.map +1 -0
- package/dist/esm/jobs/constants.js +127 -0
- package/dist/esm/jobs/constants.js.map +1 -0
- package/dist/esm/jobs/index.d.ts +9 -0
- package/dist/esm/jobs/index.d.ts.map +1 -0
- package/dist/esm/jobs/index.js +11 -0
- package/dist/esm/jobs/index.js.map +1 -0
- package/dist/esm/jobs/retention-schemas.d.ts +252 -0
- package/dist/esm/jobs/retention-schemas.d.ts.map +1 -0
- package/dist/esm/jobs/retention-schemas.js +229 -0
- package/dist/esm/jobs/retention-schemas.js.map +1 -0
- package/dist/esm/jobs/schemas.d.ts +361 -0
- package/dist/esm/jobs/schemas.d.ts.map +1 -0
- package/dist/esm/jobs/schemas.js +703 -0
- package/dist/esm/jobs/schemas.js.map +1 -0
- package/dist/esm/jobs/settings-schemas.d.ts +84 -0
- package/dist/esm/jobs/settings-schemas.d.ts.map +1 -0
- package/dist/esm/jobs/settings-schemas.js +113 -0
- package/dist/esm/jobs/settings-schemas.js.map +1 -0
- package/dist/esm/nodes/admin-schemas.d.ts +204 -0
- package/dist/esm/nodes/admin-schemas.d.ts.map +1 -0
- package/dist/esm/nodes/admin-schemas.js +150 -0
- package/dist/esm/nodes/admin-schemas.js.map +1 -0
- package/dist/esm/nodes/constants.d.ts +86 -0
- package/dist/esm/nodes/constants.d.ts.map +1 -0
- package/dist/esm/nodes/constants.js +99 -0
- package/dist/esm/nodes/constants.js.map +1 -0
- package/dist/esm/nodes/index.d.ts +8 -0
- package/dist/esm/nodes/index.d.ts.map +1 -0
- package/dist/esm/nodes/index.js +11 -0
- package/dist/esm/nodes/index.js.map +1 -0
- package/dist/esm/nodes/schemas.d.ts +332 -0
- package/dist/esm/nodes/schemas.d.ts.map +1 -0
- package/dist/esm/nodes/schemas.js +934 -0
- package/dist/esm/nodes/schemas.js.map +1 -0
- package/dist/esm/nodes/settings-schemas.d.ts +82 -0
- package/dist/esm/nodes/settings-schemas.d.ts.map +1 -0
- package/dist/esm/nodes/settings-schemas.js +103 -0
- package/dist/esm/nodes/settings-schemas.js.map +1 -0
- package/dist/esm/notifications/constants.d.ts +197 -0
- package/dist/esm/notifications/constants.d.ts.map +1 -0
- package/dist/esm/notifications/constants.js +178 -0
- package/dist/esm/notifications/constants.js.map +1 -0
- package/dist/esm/notifications/index.d.ts +5 -0
- package/dist/esm/notifications/index.d.ts.map +1 -0
- package/dist/esm/notifications/index.js +9 -0
- package/dist/esm/notifications/index.js.map +1 -0
- package/dist/esm/notifications/schemas.d.ts +1016 -0
- package/dist/esm/notifications/schemas.d.ts.map +1 -0
- package/dist/esm/notifications/schemas.js +848 -0
- package/dist/esm/notifications/schemas.js.map +1 -0
- package/dist/esm/onboarding/constants.d.ts +138 -0
- package/dist/esm/onboarding/constants.d.ts.map +1 -0
- package/dist/esm/onboarding/constants.js +120 -0
- package/dist/esm/onboarding/constants.js.map +1 -0
- package/dist/esm/onboarding/index.d.ts +5 -0
- package/dist/esm/onboarding/index.d.ts.map +1 -0
- package/dist/esm/onboarding/index.js +7 -0
- package/dist/esm/onboarding/index.js.map +1 -0
- package/dist/esm/onboarding/schemas.d.ts +360 -0
- package/dist/esm/onboarding/schemas.d.ts.map +1 -0
- package/dist/esm/onboarding/schemas.js +257 -0
- package/dist/esm/onboarding/schemas.js.map +1 -0
- package/dist/esm/settings/constants.d.ts +206 -0
- package/dist/esm/settings/constants.d.ts.map +1 -0
- package/dist/esm/settings/constants.js +197 -0
- package/dist/esm/settings/constants.js.map +1 -0
- package/dist/esm/settings/index.d.ts +6 -0
- package/dist/esm/settings/index.d.ts.map +1 -0
- package/dist/esm/settings/index.js +11 -0
- package/dist/esm/settings/index.js.map +1 -0
- package/dist/esm/settings/schemas.d.ts +574 -0
- package/dist/esm/settings/schemas.d.ts.map +1 -0
- package/dist/esm/settings/schemas.js +434 -0
- package/dist/esm/settings/schemas.js.map +1 -0
- package/dist/esm/settings/types.d.ts +79 -0
- package/dist/esm/settings/types.d.ts.map +1 -0
- package/dist/esm/settings/types.js +5 -0
- package/dist/esm/settings/types.js.map +1 -0
- package/dist/esm/sharing/constants.d.ts +216 -0
- package/dist/esm/sharing/constants.d.ts.map +1 -0
- package/dist/esm/sharing/constants.js +159 -0
- package/dist/esm/sharing/constants.js.map +1 -0
- package/dist/esm/sharing/enum.d.ts +5 -0
- package/dist/esm/sharing/enum.d.ts.map +1 -0
- package/dist/esm/sharing/enum.js +6 -0
- package/dist/esm/sharing/enum.js.map +1 -0
- package/dist/esm/sharing/grants.d.ts +490 -0
- package/dist/esm/sharing/grants.d.ts.map +1 -0
- package/dist/esm/sharing/grants.js +444 -0
- package/dist/esm/sharing/grants.js.map +1 -0
- package/dist/esm/sharing/groups.d.ts +410 -0
- package/dist/esm/sharing/groups.d.ts.map +1 -0
- package/dist/esm/sharing/groups.js +372 -0
- package/dist/esm/sharing/groups.js.map +1 -0
- package/dist/esm/sharing/index.d.ts +5 -0
- package/dist/esm/sharing/index.d.ts.map +1 -0
- package/dist/esm/sharing/index.js +11 -0
- package/dist/esm/sharing/index.js.map +1 -0
- package/dist/esm/sharing/schemas.d.ts +3 -0
- package/dist/esm/sharing/schemas.d.ts.map +1 -0
- package/dist/esm/sharing/schemas.js +5 -0
- package/dist/esm/sharing/schemas.js.map +1 -0
- package/dist/esm/storage/constants.d.ts +111 -0
- package/dist/esm/storage/constants.d.ts.map +1 -0
- package/dist/esm/storage/constants.js +104 -0
- package/dist/esm/storage/constants.js.map +1 -0
- package/dist/esm/storage/index.d.ts +27 -0
- package/dist/esm/storage/index.d.ts.map +1 -0
- package/dist/esm/storage/index.js +23 -0
- package/dist/esm/storage/index.js.map +1 -0
- package/dist/esm/storage/objects-complete-upload.d.ts +19 -0
- package/dist/esm/storage/objects-complete-upload.d.ts.map +1 -0
- package/dist/esm/storage/objects-complete-upload.js +16 -0
- package/dist/esm/storage/objects-complete-upload.js.map +1 -0
- package/dist/esm/storage/objects-download-url.d.ts +17 -0
- package/dist/esm/storage/objects-download-url.d.ts.map +1 -0
- package/dist/esm/storage/objects-download-url.js +13 -0
- package/dist/esm/storage/objects-download-url.js.map +1 -0
- package/dist/esm/storage/objects-init-upload.d.ts +39 -0
- package/dist/esm/storage/objects-init-upload.d.ts.map +1 -0
- package/dist/esm/storage/objects-init-upload.js +37 -0
- package/dist/esm/storage/objects-init-upload.js.map +1 -0
- package/dist/esm/storage/objects-list-query.d.ts +50 -0
- package/dist/esm/storage/objects-list-query.d.ts.map +1 -0
- package/dist/esm/storage/objects-list-query.js +20 -0
- package/dist/esm/storage/objects-list-query.js.map +1 -0
- package/dist/esm/storage/objects-object-response.d.ts +49 -0
- package/dist/esm/storage/objects-object-response.d.ts.map +1 -0
- package/dist/esm/storage/objects-object-response.js +51 -0
- package/dist/esm/storage/objects-object-response.js.map +1 -0
- package/dist/esm/storage/objects-update-metadata.d.ts +16 -0
- package/dist/esm/storage/objects-update-metadata.d.ts.map +1 -0
- package/dist/esm/storage/objects-update-metadata.js +11 -0
- package/dist/esm/storage/objects-update-metadata.js.map +1 -0
- package/dist/esm/storage/schemas.d.ts +13 -0
- package/dist/esm/storage/schemas.d.ts.map +1 -0
- package/dist/esm/storage/schemas.js +19 -0
- package/dist/esm/storage/schemas.js.map +1 -0
- package/dist/esm/storage/settings-schemas.d.ts +188 -0
- package/dist/esm/storage/settings-schemas.d.ts.map +1 -0
- package/dist/esm/storage/settings-schemas.js +220 -0
- package/dist/esm/storage/settings-schemas.js.map +1 -0
- package/dist/esm/storage/storage-bucket-provision.d.ts +152 -0
- package/dist/esm/storage/storage-bucket-provision.d.ts.map +1 -0
- package/dist/esm/storage/storage-bucket-provision.js +213 -0
- package/dist/esm/storage/storage-bucket-provision.js.map +1 -0
- package/dist/esm/storage/storage-config-response.d.ts +99 -0
- package/dist/esm/storage/storage-config-response.d.ts.map +1 -0
- package/dist/esm/storage/storage-config-response.js +170 -0
- package/dist/esm/storage/storage-config-response.js.map +1 -0
- package/dist/esm/storage/storage-config-update.d.ts +46 -0
- package/dist/esm/storage/storage-config-update.d.ts.map +1 -0
- package/dist/esm/storage/storage-config-update.js +130 -0
- package/dist/esm/storage/storage-config-update.js.map +1 -0
- package/dist/esm/storage/storage-connection-test.d.ts +129 -0
- package/dist/esm/storage/storage-connection-test.d.ts.map +1 -0
- package/dist/esm/storage/storage-connection-test.js +241 -0
- package/dist/esm/storage/storage-connection-test.js.map +1 -0
- package/dist/esm/storage/storage-status.d.ts +16 -0
- package/dist/esm/storage/storage-status.d.ts.map +1 -0
- package/dist/esm/storage/storage-status.js +20 -0
- package/dist/esm/storage/storage-status.js.map +1 -0
- package/dist/esm/telemetry/config.d.ts +4 -0
- package/dist/esm/telemetry/config.d.ts.map +1 -1
- package/dist/esm/telemetry/config.js +16 -2
- package/dist/esm/telemetry/config.js.map +1 -1
- package/dist/esm/telemetry/connection.d.ts +1 -1
- package/dist/esm/telemetry/constants.d.ts +378 -6
- package/dist/esm/telemetry/constants.d.ts.map +1 -1
- package/dist/esm/telemetry/constants.js +288 -4
- package/dist/esm/telemetry/constants.js.map +1 -1
- package/dist/esm/telemetry/dashboard.d.ts +188 -17
- package/dist/esm/telemetry/dashboard.d.ts.map +1 -1
- package/dist/esm/telemetry/dashboard.js +61 -3
- package/dist/esm/telemetry/dashboard.js.map +1 -1
- package/dist/esm/telemetry/index.d.ts +4 -4
- package/dist/esm/telemetry/index.d.ts.map +1 -1
- package/dist/esm/telemetry/index.js +2 -2
- package/dist/esm/telemetry/index.js.map +1 -1
- package/dist/esm/telemetry/presentation.d.ts +243 -0
- package/dist/esm/telemetry/presentation.d.ts.map +1 -0
- package/dist/esm/telemetry/presentation.js +297 -0
- package/dist/esm/telemetry/presentation.js.map +1 -0
- package/dist/esm/telemetry/query.d.ts +2 -2
- package/dist/esm/telemetry/schemas.d.ts +5 -2
- package/dist/esm/telemetry/schemas.d.ts.map +1 -1
- package/dist/esm/telemetry/schemas.js +3 -1
- package/dist/esm/telemetry/schemas.js.map +1 -1
- package/dist/esm/telemetry/stack.d.ts +5 -5
- package/dist/esm/telemetry/store.d.ts +111 -0
- package/dist/esm/telemetry/store.d.ts.map +1 -0
- package/dist/esm/telemetry/store.js +80 -0
- package/dist/esm/telemetry/store.js.map +1 -0
- package/dist/esm/user-data/constants.d.ts +157 -0
- package/dist/esm/user-data/constants.d.ts.map +1 -0
- package/dist/esm/user-data/constants.js +134 -0
- package/dist/esm/user-data/constants.js.map +1 -0
- package/dist/esm/user-data/index.d.ts +5 -0
- package/dist/esm/user-data/index.d.ts.map +1 -0
- package/dist/esm/user-data/index.js +7 -0
- package/dist/esm/user-data/index.js.map +1 -0
- package/dist/esm/user-data/schemas.d.ts +306 -0
- package/dist/esm/user-data/schemas.d.ts.map +1 -0
- package/dist/esm/user-data/schemas.js +330 -0
- package/dist/esm/user-data/schemas.js.map +1 -0
- package/package.json +151 -1
|
@@ -0,0 +1,851 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// =============================================================================
|
|
3
|
+
// Notifications: the wire contract of `/api/notifications`, the
|
|
4
|
+
// `notifications` settings namespaces, `/api/admin/push-config` and
|
|
5
|
+
// `/api/admin/broadcasts` (issue #738, PP-8.5; shapes from #121 to #618)
|
|
6
|
+
// =============================================================================
|
|
7
|
+
//
|
|
8
|
+
// The API slice (`@marinoscar/platform-api/notifications`) wraps each with
|
|
9
|
+
// `createZodDto` (and, for a request body naming channels, refines the open
|
|
10
|
+
// channel ids against its registry at run time); the web slice reads the
|
|
11
|
+
// inferred types. Moved from the API slice's dto files and the reference
|
|
12
|
+
// app's settings schemas with their meaning unchanged, except one thing:
|
|
13
|
+
// CHANNEL IDS ARE OPEN (`notificationChannelIdSchema`), so an app's channel
|
|
14
|
+
// needs no edit here and a preference for an unregistered channel is stored,
|
|
15
|
+
// not rejected or dropped.
|
|
16
|
+
//
|
|
17
|
+
// NO SECRET CROSSES THIS CONTRACT. The VAPID private key lives in the
|
|
18
|
+
// encrypted credential store and is never part of a stored value or a
|
|
19
|
+
// response; the compile-time proofs at the bottom fail the build the moment a
|
|
20
|
+
// secret-named field is added.
|
|
21
|
+
// =============================================================================
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.PUSH_CONTRACT_CARRIES_NO_SECRET = exports.broadcastListQuerySchema = exports.broadcastTestResultSchema = exports.broadcastAudienceSchema = exports.broadcastAudienceQuerySchema = exports.broadcastCreateResultSchema = exports.broadcastDetailSchema = exports.broadcastDeliveryCountSchema = exports.broadcastSchema = exports.createBroadcastSchema = exports.pushTestResponseSchema = exports.pushTestSubscriptionResultSchema = exports.pushTestSendResultSchema = exports.pushTestEventDiagnosticsSchema = exports.pushTestBrowserDiagnosticsSchema = exports.pushTestConfigDiagnosticsSchema = exports.pushTestRequestSchema = exports.pushConfigResponseSchema = exports.privateKeyStatusSchema = exports.removePushConfigSchema = exports.rotatePushConfigSchema = exports.updatePushConfigSchema = exports.generatePushConfigSchema = exports.pushConfigSchema = exports.vapidSubjectSchema = exports.pushUnsubscribeSchema = exports.pushSubscriptionResponseSchema = exports.pushSubscribeSchema = exports.notificationStreamEventSchema = exports.unreadCountSchema = exports.notificationListQuerySchema = exports.notificationSchema = exports.notificationConfigSchema = exports.notificationChannelsResponseSchema = exports.notificationChannelDescriptorSchema = exports.notificationEventSchema = exports.orgNotificationsSchema = exports.notificationsResponseSchema = exports.notificationsSettingsPatchSchema = exports.notificationsSettingsSchema = exports.systemNotificationsPatchSchema = exports.systemNotificationsSchema = exports.notificationChannelPoliciesSchema = exports.notificationChannelPolicySchema = exports.notificationsPatchSchema = exports.notificationChannelPreferencesPatchSchema = exports.notificationsSchema = exports.notificationChannelPreferencesSchema = exports.notificationEventKeySchema = exports.notificationChannelIdSchema = void 0;
|
|
24
|
+
const zod_1 = require("zod");
|
|
25
|
+
const constants_js_1 = require("./constants.js");
|
|
26
|
+
// ---- keys ---------------------------------------------------------------------------
|
|
27
|
+
/**
|
|
28
|
+
* A channel id: any id matching `NOTIFICATION_CHANNEL_ID_PATTERN`. Open: the
|
|
29
|
+
* API checks membership in its channel registry where it matters (a request
|
|
30
|
+
* that writes a NEW preference or names a broadcast channel), never on a
|
|
31
|
+
* stored value.
|
|
32
|
+
*
|
|
33
|
+
* @stability stable
|
|
34
|
+
*/
|
|
35
|
+
exports.notificationChannelIdSchema = zod_1.z
|
|
36
|
+
.string()
|
|
37
|
+
.min(1)
|
|
38
|
+
.max(constants_js_1.NOTIFICATION_CHANNEL_ID_MAX_LENGTH)
|
|
39
|
+
.regex(constants_js_1.NOTIFICATION_CHANNEL_ID_PATTERN);
|
|
40
|
+
/**
|
|
41
|
+
* An event key as a stored preference or a `disabledEvents` entry: a
|
|
42
|
+
* syntactic bound, NOT a registry check (an entry naming an event this build
|
|
43
|
+
* does not declare is stored and simply never matches).
|
|
44
|
+
*
|
|
45
|
+
* @stability stable
|
|
46
|
+
*/
|
|
47
|
+
exports.notificationEventKeySchema = zod_1.z
|
|
48
|
+
.string()
|
|
49
|
+
.min(1)
|
|
50
|
+
.max(constants_js_1.NOTIFICATION_MAX_EVENT_KEY_LENGTH)
|
|
51
|
+
.regex(constants_js_1.NOTIFICATION_EVENT_KEY_PATTERN);
|
|
52
|
+
// ---- user settings: `notifications` ----------------------------------------------------
|
|
53
|
+
/**
|
|
54
|
+
* One channel's preferences: event key to the user's explicit choice.
|
|
55
|
+
* `boolean` only; an absent key means "use the event's default".
|
|
56
|
+
*
|
|
57
|
+
* @stability stable
|
|
58
|
+
*/
|
|
59
|
+
exports.notificationChannelPreferencesSchema = zod_1.z.record(exports.notificationEventKeySchema, zod_1.z.boolean());
|
|
60
|
+
/**
|
|
61
|
+
* The `notifications` user settings namespace: channel to that channel's
|
|
62
|
+
* preferences, sparse at every level. Keyed by an OPEN channel id; the count
|
|
63
|
+
* of channels and of events per channel is bounded on the merged value by the
|
|
64
|
+
* API (`NOTIFICATION_MAX_CHANNELS`, `NOTIFICATION_MAX_EVENTS_PER_CHANNEL`).
|
|
65
|
+
*
|
|
66
|
+
* @stability stable
|
|
67
|
+
*/
|
|
68
|
+
exports.notificationsSchema = zod_1.z.record(exports.notificationChannelIdSchema, exports.notificationChannelPreferencesSchema);
|
|
69
|
+
/**
|
|
70
|
+
* PATCH form of one channel's preferences: `null` deletes one event key,
|
|
71
|
+
* restoring the default.
|
|
72
|
+
*
|
|
73
|
+
* @stability stable
|
|
74
|
+
*/
|
|
75
|
+
exports.notificationChannelPreferencesPatchSchema = zod_1.z.record(exports.notificationEventKeySchema, zod_1.z.boolean().nullable());
|
|
76
|
+
/**
|
|
77
|
+
* PATCH form of the `notifications` namespace. Three levels of delete: a
|
|
78
|
+
* `null` namespace clears it, a `null` channel (`email: null`) clears one
|
|
79
|
+
* channel, a `null` event key clears one event. A non-null channel object
|
|
80
|
+
* deep-merges per event.
|
|
81
|
+
*
|
|
82
|
+
* @stability stable
|
|
83
|
+
*/
|
|
84
|
+
exports.notificationsPatchSchema = zod_1.z.record(exports.notificationChannelIdSchema, exports.notificationChannelPreferencesPatchSchema.nullable());
|
|
85
|
+
// ---- system settings: `notifications` --------------------------------------------------
|
|
86
|
+
/**
|
|
87
|
+
* One channel's deployment-wide switch (the value of one `channels` entry of
|
|
88
|
+
* the `notifications` system namespace).
|
|
89
|
+
*
|
|
90
|
+
* @stability experimental
|
|
91
|
+
*/
|
|
92
|
+
exports.notificationChannelPolicySchema = zod_1.z.object({
|
|
93
|
+
/** Whether the channel delivers at all. `false` drops it from every dispatch (a `mandatory` event keeps its in-app row). */
|
|
94
|
+
enabled: zod_1.z.boolean(),
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* The `channels` record of the `notifications` system namespace: channel id to
|
|
98
|
+
* that channel's switch, sparse. An absent channel is ENABLED (an operator opts
|
|
99
|
+
* a channel out, never in), which is also what makes a channel an app registers
|
|
100
|
+
* later deliver without anyone saving anything first. The id is open and is not
|
|
101
|
+
* checked against the registry here: an entry for a channel this build does not
|
|
102
|
+
* register is kept and never matches. `browser` is also written as the legacy
|
|
103
|
+
* `browserEnabled` boolean, kept in step with `channels.browser.enabled`.
|
|
104
|
+
*
|
|
105
|
+
* @extensionPoint schema
|
|
106
|
+
* @stability experimental
|
|
107
|
+
*/
|
|
108
|
+
exports.notificationChannelPoliciesSchema = zod_1.z.record(exports.notificationChannelIdSchema, exports.notificationChannelPolicySchema);
|
|
109
|
+
/**
|
|
110
|
+
* The deployment-wide notification policy (`system_settings`
|
|
111
|
+
* `notifications`): whether the browser channel is on, which events are
|
|
112
|
+
* suppressed for everyone, and (`channels`) a switch per channel. A
|
|
113
|
+
* `mandatory` event's inbox row survives all of them.
|
|
114
|
+
*
|
|
115
|
+
* `browserEnabled` is the original switch and stays the spelling of the browser
|
|
116
|
+
* channel's; `channels.browser.enabled` is its alias (a write of either sets
|
|
117
|
+
* both). `channels` is absent on a row written before it existed, which reads
|
|
118
|
+
* as every channel enabled.
|
|
119
|
+
*
|
|
120
|
+
* @stability stable
|
|
121
|
+
*/
|
|
122
|
+
exports.systemNotificationsSchema = zod_1.z.object({
|
|
123
|
+
/** Whether the browser channel is on (alias of `channels.browser.enabled`). */
|
|
124
|
+
browserEnabled: zod_1.z.boolean(),
|
|
125
|
+
/** Event keys whose browser delivery is suppressed. */
|
|
126
|
+
disabledEvents: zod_1.z.array(exports.notificationEventKeySchema).max(constants_js_1.MAX_DISABLED_NOTIFICATION_EVENTS),
|
|
127
|
+
/** A switch per channel; an absent channel is enabled. */
|
|
128
|
+
channels: exports.notificationChannelPoliciesSchema.optional(),
|
|
129
|
+
});
|
|
130
|
+
/**
|
|
131
|
+
* PATCH counterpart: `disabledEvents` REPLACES wholesale (RFC 7396's rule for
|
|
132
|
+
* arrays: a merge could never re-enable an event); `channels` merges per
|
|
133
|
+
* channel.
|
|
134
|
+
*
|
|
135
|
+
* @stability stable
|
|
136
|
+
*/
|
|
137
|
+
exports.systemNotificationsPatchSchema = zod_1.z.object({
|
|
138
|
+
/** Whether the browser channel is on. */
|
|
139
|
+
browserEnabled: zod_1.z.boolean().optional(),
|
|
140
|
+
/** Event keys whose browser delivery is suppressed. */
|
|
141
|
+
disabledEvents: zod_1.z.array(exports.notificationEventKeySchema).max(constants_js_1.MAX_DISABLED_NOTIFICATION_EVENTS).optional(),
|
|
142
|
+
/** Per-channel switches, merged into the stored record. */
|
|
143
|
+
channels: exports.notificationChannelPoliciesSchema.optional(),
|
|
144
|
+
});
|
|
145
|
+
/**
|
|
146
|
+
* The `notifications` block of the `PUT /api/system-settings` body.
|
|
147
|
+
*
|
|
148
|
+
* @stability stable
|
|
149
|
+
*/
|
|
150
|
+
exports.notificationsSettingsSchema = zod_1.z.object({
|
|
151
|
+
/** Whether the browser channel is on. */
|
|
152
|
+
browserEnabled: zod_1.z.boolean(),
|
|
153
|
+
/** Event keys whose browser delivery is suppressed. */
|
|
154
|
+
disabledEvents: zod_1.z.array(exports.notificationEventKeySchema).max(constants_js_1.MAX_DISABLED_NOTIFICATION_EVENTS),
|
|
155
|
+
/** A switch per channel; omitted means every channel enabled. */
|
|
156
|
+
channels: exports.notificationChannelPoliciesSchema.optional(),
|
|
157
|
+
});
|
|
158
|
+
/**
|
|
159
|
+
* The `notifications` block of the `PATCH /api/system-settings` body.
|
|
160
|
+
*
|
|
161
|
+
* @stability stable
|
|
162
|
+
*/
|
|
163
|
+
exports.notificationsSettingsPatchSchema = zod_1.z.object({
|
|
164
|
+
/** Whether the browser channel is on. */
|
|
165
|
+
browserEnabled: zod_1.z.boolean().optional(),
|
|
166
|
+
/** Event keys whose browser delivery is suppressed. */
|
|
167
|
+
disabledEvents: zod_1.z.array(exports.notificationEventKeySchema).max(constants_js_1.MAX_DISABLED_NOTIFICATION_EVENTS).optional(),
|
|
168
|
+
/** Per-channel switches, merged into the stored record. */
|
|
169
|
+
channels: exports.notificationChannelPoliciesSchema.optional(),
|
|
170
|
+
});
|
|
171
|
+
/**
|
|
172
|
+
* The `notifications` block of the system settings response.
|
|
173
|
+
*
|
|
174
|
+
* @stability stable
|
|
175
|
+
*/
|
|
176
|
+
exports.notificationsResponseSchema = zod_1.z.object({
|
|
177
|
+
/** Whether the browser channel is on. */
|
|
178
|
+
browserEnabled: zod_1.z.boolean(),
|
|
179
|
+
/** Event keys whose browser delivery is suppressed. */
|
|
180
|
+
disabledEvents: zod_1.z.array(zod_1.z.string()),
|
|
181
|
+
/** A switch per channel; absent when none was ever saved (every channel enabled). */
|
|
182
|
+
channels: zod_1.z.record(zod_1.z.string(), exports.notificationChannelPolicySchema).optional(),
|
|
183
|
+
});
|
|
184
|
+
/**
|
|
185
|
+
* The ORG LAYER of the `notifications` namespace (#738, through #733's
|
|
186
|
+
* `/api/org-settings`): what one organization may set for its own members. It
|
|
187
|
+
* may only TIGHTEN: `browserEnabled: false` turns browser delivery off for
|
|
188
|
+
* the org (the effective value is system AND org), `channels` turns other
|
|
189
|
+
* channels off for it (system AND org, per channel), and `disabledEvents`
|
|
190
|
+
* suppresses more events (the effective list is the union). Every field is
|
|
191
|
+
* optional: an org stores only what it overrides.
|
|
192
|
+
*
|
|
193
|
+
* @extensionPoint schema
|
|
194
|
+
* @stability experimental
|
|
195
|
+
*/
|
|
196
|
+
exports.orgNotificationsSchema = zod_1.z.object({
|
|
197
|
+
/** Whether the browser channel is on. */
|
|
198
|
+
browserEnabled: zod_1.z.boolean().optional(),
|
|
199
|
+
/** Event keys whose browser delivery is suppressed. */
|
|
200
|
+
disabledEvents: zod_1.z.array(exports.notificationEventKeySchema).max(constants_js_1.MAX_DISABLED_NOTIFICATION_EVENTS).optional(),
|
|
201
|
+
/** Channels the organization turns off for its members (an `enabled: true` entry never loosens the system policy). */
|
|
202
|
+
channels: exports.notificationChannelPoliciesSchema.optional(),
|
|
203
|
+
});
|
|
204
|
+
const broadcastStatusSchema = zod_1.z.enum(constants_js_1.BROADCAST_STATUSES);
|
|
205
|
+
const pushTestOverallSchema = zod_1.z.enum(constants_js_1.PUSH_TEST_OVERALL);
|
|
206
|
+
const pushTestConfigSourceSchema = zod_1.z.enum(constants_js_1.PUSH_TEST_CONFIG_SOURCES);
|
|
207
|
+
const pushTestSendStatusSchema = zod_1.z.enum(constants_js_1.PUSH_TEST_SEND_STATUSES);
|
|
208
|
+
const booleanQuerySchema = zod_1.z.enum(['true', 'false']);
|
|
209
|
+
const pushSubscriptionPlatformSchema = zod_1.z.enum(constants_js_1.PUSH_SUBSCRIPTION_PLATFORMS);
|
|
210
|
+
// ---- /api/notifications --------------------------------------------------------------
|
|
211
|
+
/**
|
|
212
|
+
* One event as `GET /api/notifications/events` serves it: `channels` is
|
|
213
|
+
* capability narrowed by the policy in force (what the preferences matrix may
|
|
214
|
+
* offer), `declaredChannels` the registry's capability unfiltered.
|
|
215
|
+
*
|
|
216
|
+
* @stability stable
|
|
217
|
+
*/
|
|
218
|
+
exports.notificationEventSchema = zod_1.z.object({
|
|
219
|
+
/** The event key, `<area>.<event>`; permanent. */
|
|
220
|
+
key: zod_1.z.string(),
|
|
221
|
+
/** The user-facing name. */
|
|
222
|
+
label: zod_1.z.string(),
|
|
223
|
+
/** The user-facing description. */
|
|
224
|
+
description: zod_1.z.string(),
|
|
225
|
+
/** The channels the preferences matrix may offer: declared, narrowed by the policy in force. */
|
|
226
|
+
channels: zod_1.z.array(exports.notificationChannelIdSchema),
|
|
227
|
+
/** Every channel the event declares, unfiltered by policy. */
|
|
228
|
+
declaredChannels: zod_1.z.array(exports.notificationChannelIdSchema),
|
|
229
|
+
/** What an account with no stored preference gets. */
|
|
230
|
+
defaultEnabled: zod_1.z.boolean(),
|
|
231
|
+
/** Whether a user may not opt out. */
|
|
232
|
+
mandatory: zod_1.z.boolean(),
|
|
233
|
+
});
|
|
234
|
+
/**
|
|
235
|
+
* One delivery channel as `GET /api/notifications/channels` serves it: what a
|
|
236
|
+
* client needs to draw the channel (its label, where it sits) and to apply the
|
|
237
|
+
* rules that depend on it (which channels a critical broadcast may rely on,
|
|
238
|
+
* which a user may toggle, which a fresh broadcast starts with). The registry
|
|
239
|
+
* is the only source: a client holds no list of channels.
|
|
240
|
+
*
|
|
241
|
+
* @extensionPoint schema
|
|
242
|
+
* @stability experimental
|
|
243
|
+
*/
|
|
244
|
+
exports.notificationChannelDescriptorSchema = zod_1.z.object({
|
|
245
|
+
/** The channel id; permanent. */
|
|
246
|
+
id: exports.notificationChannelIdSchema,
|
|
247
|
+
/** The label an administrator or a user reads (`Email`, `Browser`). */
|
|
248
|
+
label: zod_1.z.string(),
|
|
249
|
+
/** One sentence on what the channel delivers to. */
|
|
250
|
+
description: zod_1.z.string(),
|
|
251
|
+
/** Whether a user may toggle the channel in their preferences. */
|
|
252
|
+
userConfigurable: zod_1.z.boolean(),
|
|
253
|
+
/** Whether a critical broadcast may rely on this channel (it leaves a durable record a recipient can go back and read; `browser`). */
|
|
254
|
+
criticalCapable: zod_1.z.boolean(),
|
|
255
|
+
/** Whether the broadcast events declare this channel, so a broadcast can be sent over it. */
|
|
256
|
+
broadcastCapable: zod_1.z.boolean(),
|
|
257
|
+
/** Whether a new broadcast starts with this channel selected. */
|
|
258
|
+
broadcastDefault: zod_1.z.boolean(),
|
|
259
|
+
/** Registration order, from 0: the order every client lists channels in. */
|
|
260
|
+
order: zod_1.z.number().int().nonnegative(),
|
|
261
|
+
});
|
|
262
|
+
/**
|
|
263
|
+
* `GET /api/notifications/channels`: every registered delivery channel, in
|
|
264
|
+
* registration order.
|
|
265
|
+
*
|
|
266
|
+
* @stability experimental
|
|
267
|
+
*/
|
|
268
|
+
exports.notificationChannelsResponseSchema = zod_1.z.array(exports.notificationChannelDescriptorSchema);
|
|
269
|
+
/**
|
|
270
|
+
* `GET /api/notifications/config`: what a non-admin client needs to know
|
|
271
|
+
* about the capability (the policy in force for the caller, and Web Push).
|
|
272
|
+
*
|
|
273
|
+
* @stability stable
|
|
274
|
+
*/
|
|
275
|
+
exports.notificationConfigSchema = zod_1.z.object({
|
|
276
|
+
/** Whether the browser channel is on. */
|
|
277
|
+
browserEnabled: zod_1.z.boolean(),
|
|
278
|
+
/** Whether Web Push is configured and enabled. */
|
|
279
|
+
pushEnabled: zod_1.z.boolean(),
|
|
280
|
+
/** The VAPID application server key (URL-safe base64), or null. */
|
|
281
|
+
vapidPublicKey: zod_1.z.string().nullable(),
|
|
282
|
+
});
|
|
283
|
+
/**
|
|
284
|
+
* One inbox row.
|
|
285
|
+
*
|
|
286
|
+
* @stability stable
|
|
287
|
+
*/
|
|
288
|
+
exports.notificationSchema = zod_1.z.object({
|
|
289
|
+
/** The id. */
|
|
290
|
+
id: zod_1.z.uuid(),
|
|
291
|
+
/** The event key. */
|
|
292
|
+
eventKey: zod_1.z.string(),
|
|
293
|
+
/** The title. */
|
|
294
|
+
title: zod_1.z.string(),
|
|
295
|
+
/** The body text. */
|
|
296
|
+
body: zod_1.z.string(),
|
|
297
|
+
/** A root-relative link, or null. */
|
|
298
|
+
link: zod_1.z.string().nullable(),
|
|
299
|
+
/** When the user read it (ISO 8601), or null. */
|
|
300
|
+
readAt: zod_1.z.iso.datetime().nullable(),
|
|
301
|
+
/** Creation time (ISO 8601). */
|
|
302
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
303
|
+
});
|
|
304
|
+
/**
|
|
305
|
+
* `GET /api/notifications` query: page, page size, unread only.
|
|
306
|
+
*
|
|
307
|
+
* @stability stable
|
|
308
|
+
*/
|
|
309
|
+
exports.notificationListQuerySchema = zod_1.z.object({
|
|
310
|
+
/** The page number, from 1. */
|
|
311
|
+
page: zod_1.z.coerce.number().int().min(1).default(1),
|
|
312
|
+
/** Rows per page (at most 100). */
|
|
313
|
+
pageSize: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
314
|
+
/** `true` for unread rows only. */
|
|
315
|
+
unreadOnly: booleanQuerySchema
|
|
316
|
+
.default('false')
|
|
317
|
+
.transform((value) => value === 'true'),
|
|
318
|
+
});
|
|
319
|
+
/**
|
|
320
|
+
* `GET /api/notifications/unread-count`.
|
|
321
|
+
*
|
|
322
|
+
* @stability stable
|
|
323
|
+
*/
|
|
324
|
+
exports.unreadCountSchema = zod_1.z.object({
|
|
325
|
+
/** Unread notifications. */
|
|
326
|
+
unreadCount: zod_1.z.number().int().min(0),
|
|
327
|
+
});
|
|
328
|
+
/**
|
|
329
|
+
* One frame of `GET /api/notifications/stream` (`event: notification`).
|
|
330
|
+
* `toast` says whether the tab may show an OS toast (the policy in force),
|
|
331
|
+
* `pushed` whether this dispatch also sent Web Push (so the tab can skip its
|
|
332
|
+
* own toast).
|
|
333
|
+
*
|
|
334
|
+
* @stability stable
|
|
335
|
+
*/
|
|
336
|
+
exports.notificationStreamEventSchema = zod_1.z.object({
|
|
337
|
+
/** The id. */
|
|
338
|
+
id: zod_1.z.string(),
|
|
339
|
+
/** The event key. */
|
|
340
|
+
eventKey: zod_1.z.string(),
|
|
341
|
+
/** The title. */
|
|
342
|
+
title: zod_1.z.string(),
|
|
343
|
+
/** The body text. */
|
|
344
|
+
body: zod_1.z.string(),
|
|
345
|
+
/** A root-relative link, or null. */
|
|
346
|
+
link: zod_1.z.string().nullable(),
|
|
347
|
+
/** Creation time (ISO 8601). */
|
|
348
|
+
createdAt: zod_1.z.string(),
|
|
349
|
+
/** Whether the tab may raise an OS toast (the policy in force). */
|
|
350
|
+
toast: zod_1.z.boolean(),
|
|
351
|
+
/** Whether this dispatch also sent Web Push. */
|
|
352
|
+
pushed: zod_1.z.boolean(),
|
|
353
|
+
});
|
|
354
|
+
// ---- push subscriptions -----------------------------------------------------------------
|
|
355
|
+
/**
|
|
356
|
+
* `POST /api/notifications/push/subscriptions`: a browser's
|
|
357
|
+
* `PushSubscription.toJSON()`.
|
|
358
|
+
*
|
|
359
|
+
* @stability stable
|
|
360
|
+
*/
|
|
361
|
+
exports.pushSubscribeSchema = zod_1.z.object({
|
|
362
|
+
/** The push service endpoint (a capability URL). */
|
|
363
|
+
endpoint: zod_1.z.string().min(1),
|
|
364
|
+
/** The subscription's keys. */
|
|
365
|
+
keys: zod_1.z.object({
|
|
366
|
+
/** The client's P-256 public key. */
|
|
367
|
+
p256dh: zod_1.z.string().min(1),
|
|
368
|
+
/** The client's auth secret. */
|
|
369
|
+
auth: zod_1.z.string().min(1),
|
|
370
|
+
}),
|
|
371
|
+
/** When the browser says it expires (epoch ms), or null. */
|
|
372
|
+
expirationTime: zod_1.z.number().nullable().optional(),
|
|
373
|
+
/**
|
|
374
|
+
* The surface subscribing (#746): `browser` (default) or `android_app` (the
|
|
375
|
+
* Android companion). An `android_app` post re-tags an existing `browser`
|
|
376
|
+
* row of the same endpoint; a `browser` post never downgrades an
|
|
377
|
+
* `android_app` row.
|
|
378
|
+
*/
|
|
379
|
+
platform: pushSubscriptionPlatformSchema.optional(),
|
|
380
|
+
});
|
|
381
|
+
/**
|
|
382
|
+
* The subscribe response.
|
|
383
|
+
*
|
|
384
|
+
* @stability stable
|
|
385
|
+
*/
|
|
386
|
+
exports.pushSubscriptionResponseSchema = zod_1.z.object({
|
|
387
|
+
/** The id. */
|
|
388
|
+
id: zod_1.z.uuid(),
|
|
389
|
+
/** The registered endpoint. */
|
|
390
|
+
endpoint: zod_1.z.string(),
|
|
391
|
+
/** The stored platform (#746): what the row is tagged after this call. */
|
|
392
|
+
platform: pushSubscriptionPlatformSchema,
|
|
393
|
+
/** Creation time (ISO 8601). */
|
|
394
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
395
|
+
});
|
|
396
|
+
/**
|
|
397
|
+
* `DELETE /api/notifications/push/subscriptions` body.
|
|
398
|
+
*
|
|
399
|
+
* @stability stable
|
|
400
|
+
*/
|
|
401
|
+
exports.pushUnsubscribeSchema = zod_1.z.object({
|
|
402
|
+
/** The endpoint to remove. */
|
|
403
|
+
endpoint: zod_1.z.string().min(1),
|
|
404
|
+
});
|
|
405
|
+
// ---- /api/admin/push-config -------------------------------------------------------------
|
|
406
|
+
/**
|
|
407
|
+
* A VAPID subject: a `mailto:` address or an `http(s)://` URL.
|
|
408
|
+
*
|
|
409
|
+
* @stability stable
|
|
410
|
+
*/
|
|
411
|
+
exports.vapidSubjectSchema = zod_1.z
|
|
412
|
+
.string()
|
|
413
|
+
.trim()
|
|
414
|
+
.min(1)
|
|
415
|
+
.max(255)
|
|
416
|
+
.refine((value) => value.startsWith('mailto:') || value.startsWith('https://') || value.startsWith('http://'), {
|
|
417
|
+
message: 'VAPID subject must be a mailto: address or an http(s):// URL',
|
|
418
|
+
});
|
|
419
|
+
/**
|
|
420
|
+
* The stored Web Push settings row (`system_settings` key `webPush`). The
|
|
421
|
+
* private key is NOT here: it lives in the credential store.
|
|
422
|
+
*
|
|
423
|
+
* @stability stable
|
|
424
|
+
*/
|
|
425
|
+
exports.pushConfigSchema = zod_1.z.object({
|
|
426
|
+
/** Whether Web Push is switched on. */
|
|
427
|
+
enabled: zod_1.z.boolean(),
|
|
428
|
+
/** The VAPID public key, or null. */
|
|
429
|
+
publicKey: zod_1.z.string().min(1).nullable(),
|
|
430
|
+
/** The VAPID subject (`mailto:` or `https://`), or null for the default. */
|
|
431
|
+
subject: exports.vapidSubjectSchema.nullable(),
|
|
432
|
+
});
|
|
433
|
+
/**
|
|
434
|
+
* `POST /api/admin/push-config/generate` body.
|
|
435
|
+
*
|
|
436
|
+
* @stability stable
|
|
437
|
+
*/
|
|
438
|
+
exports.generatePushConfigSchema = zod_1.z.object({
|
|
439
|
+
/** The VAPID subject; absent or null uses the default. */
|
|
440
|
+
subject: exports.vapidSubjectSchema.nullable().optional(),
|
|
441
|
+
});
|
|
442
|
+
/**
|
|
443
|
+
* `PUT /api/admin/push-config` body (with `If-Match`).
|
|
444
|
+
*
|
|
445
|
+
* @stability stable
|
|
446
|
+
*/
|
|
447
|
+
exports.updatePushConfigSchema = zod_1.z.object({
|
|
448
|
+
/** Whether Web Push is switched on. */
|
|
449
|
+
enabled: zod_1.z.boolean(),
|
|
450
|
+
/** The VAPID subject, or null for the default. */
|
|
451
|
+
subject: exports.vapidSubjectSchema.nullable(),
|
|
452
|
+
});
|
|
453
|
+
/**
|
|
454
|
+
* `POST /api/admin/push-config/rotate` body.
|
|
455
|
+
*
|
|
456
|
+
* @stability stable
|
|
457
|
+
*/
|
|
458
|
+
exports.rotatePushConfigSchema = zod_1.z.object({
|
|
459
|
+
/** The literal confirmation word. */
|
|
460
|
+
confirmation: zod_1.z.literal(constants_js_1.ROTATE_CONFIRMATION),
|
|
461
|
+
/** A new VAPID subject; absent keeps the current one. */
|
|
462
|
+
subject: exports.vapidSubjectSchema.nullable().optional(),
|
|
463
|
+
});
|
|
464
|
+
/**
|
|
465
|
+
* `DELETE /api/admin/push-config` body.
|
|
466
|
+
*
|
|
467
|
+
* @stability stable
|
|
468
|
+
*/
|
|
469
|
+
exports.removePushConfigSchema = zod_1.z.object({
|
|
470
|
+
/** The literal confirmation word. */
|
|
471
|
+
confirmation: zod_1.z.literal(constants_js_1.REMOVE_CONFIRMATION),
|
|
472
|
+
});
|
|
473
|
+
/**
|
|
474
|
+
* The private key's masked status: never the key.
|
|
475
|
+
*
|
|
476
|
+
* @stability stable
|
|
477
|
+
*/
|
|
478
|
+
exports.privateKeyStatusSchema = zod_1.z.object({
|
|
479
|
+
/** Whether a value is stored. */
|
|
480
|
+
configured: zod_1.z.boolean(),
|
|
481
|
+
/** A short, non-secret hint of the stored value, or null. */
|
|
482
|
+
hint: zod_1.z.string().nullable(),
|
|
483
|
+
/** When it was stored (ISO 8601), or null. */
|
|
484
|
+
updatedAt: zod_1.z.iso.datetime().nullable(),
|
|
485
|
+
/** Who stored it, or null. */
|
|
486
|
+
updatedByUserId: zod_1.z.uuid().nullable(),
|
|
487
|
+
});
|
|
488
|
+
/**
|
|
489
|
+
* The admin view of the Web Push configuration.
|
|
490
|
+
*
|
|
491
|
+
* @stability stable
|
|
492
|
+
*/
|
|
493
|
+
exports.pushConfigResponseSchema = exports.pushConfigSchema.extend({
|
|
494
|
+
/** Whether a key pair is stored. */
|
|
495
|
+
configured: zod_1.z.boolean(),
|
|
496
|
+
/** The VAPID private key's status (never its value). */
|
|
497
|
+
privateKeyStatus: exports.privateKeyStatusSchema,
|
|
498
|
+
/** Why the stored row failed validation, or null. */
|
|
499
|
+
settingsError: zod_1.z.string().nullable(),
|
|
500
|
+
/** The row version, sent back as `If-Match`. */
|
|
501
|
+
version: zod_1.z.number().int(),
|
|
502
|
+
/** Last update (ISO 8601), or null. */
|
|
503
|
+
updatedAt: zod_1.z.iso.datetime().nullable(),
|
|
504
|
+
/** Who saved last, or null. */
|
|
505
|
+
updatedBy: zod_1.z
|
|
506
|
+
.object({
|
|
507
|
+
/** The id. */
|
|
508
|
+
id: zod_1.z.uuid(),
|
|
509
|
+
/** Their address. */
|
|
510
|
+
email: zod_1.z.email(),
|
|
511
|
+
})
|
|
512
|
+
.nullable(),
|
|
513
|
+
});
|
|
514
|
+
const BASE64URL_PATTERN = /^[A-Za-z0-9_-]+={0,2}$/;
|
|
515
|
+
/**
|
|
516
|
+
* `POST /api/admin/push-config/test` body: optionally this browser's endpoint
|
|
517
|
+
* and the server key it subscribed with, to diagnose the pair.
|
|
518
|
+
*
|
|
519
|
+
* @stability stable
|
|
520
|
+
*/
|
|
521
|
+
exports.pushTestRequestSchema = zod_1.z
|
|
522
|
+
.object({
|
|
523
|
+
/** This browser's endpoint, to check it is registered. */
|
|
524
|
+
endpoint: zod_1.z.url().max(2048).optional(),
|
|
525
|
+
/** This browser's subscription key (base64url), to compare with the server's. */
|
|
526
|
+
applicationServerKey: zod_1.z
|
|
527
|
+
.string()
|
|
528
|
+
.max(200)
|
|
529
|
+
.regex(BASE64URL_PATTERN, 'applicationServerKey must be base64url-encoded')
|
|
530
|
+
.optional(),
|
|
531
|
+
})
|
|
532
|
+
.strict();
|
|
533
|
+
/**
|
|
534
|
+
* The push test's verdicts on the active configuration.
|
|
535
|
+
*
|
|
536
|
+
* @stability stable
|
|
537
|
+
*/
|
|
538
|
+
exports.pushTestConfigDiagnosticsSchema = zod_1.z.object({
|
|
539
|
+
/** Where the configuration was read from. */
|
|
540
|
+
source: pushTestConfigSourceSchema,
|
|
541
|
+
/** The stored switch, or null without a configuration. */
|
|
542
|
+
enabled: zod_1.z.boolean().nullable(),
|
|
543
|
+
/** Whether push would send right now. */
|
|
544
|
+
active: zod_1.z.boolean(),
|
|
545
|
+
/** The public key in force, or null. */
|
|
546
|
+
publicKey: zod_1.z.string().nullable(),
|
|
547
|
+
/** Whether the public key is a valid P-256 point. */
|
|
548
|
+
publicKeyValid: zod_1.z.boolean(),
|
|
549
|
+
/** Whether the stored private key matches the public key, or null when either is missing. */
|
|
550
|
+
privateKeyMatchesPublicKey: zod_1.z.boolean().nullable(),
|
|
551
|
+
/** The subject in force, or null. */
|
|
552
|
+
subject: zod_1.z.string().nullable(),
|
|
553
|
+
/** Whether the subject is a valid `mailto:` or `http(s)` URL. */
|
|
554
|
+
subjectValid: zod_1.z.boolean(),
|
|
555
|
+
/** What is wrong, in words. */
|
|
556
|
+
problems: zod_1.z.array(zod_1.z.string()),
|
|
557
|
+
});
|
|
558
|
+
/**
|
|
559
|
+
* The push test's verdicts on the calling browser.
|
|
560
|
+
*
|
|
561
|
+
* @stability stable
|
|
562
|
+
*/
|
|
563
|
+
exports.pushTestBrowserDiagnosticsSchema = zod_1.z.object({
|
|
564
|
+
/** Whether the caller sent its own endpoint. */
|
|
565
|
+
endpointProvided: zod_1.z.boolean(),
|
|
566
|
+
/** Whether that endpoint is registered for the caller, or null. */
|
|
567
|
+
endpointRegistered: zod_1.z.boolean().nullable(),
|
|
568
|
+
/** Whether this browser's key matches the server's, or null. */
|
|
569
|
+
keyMatchesServer: zod_1.z.boolean().nullable(),
|
|
570
|
+
});
|
|
571
|
+
/**
|
|
572
|
+
* Whether each push-capable event would reach the caller.
|
|
573
|
+
*
|
|
574
|
+
* @stability stable
|
|
575
|
+
*/
|
|
576
|
+
exports.pushTestEventDiagnosticsSchema = zod_1.z.object({
|
|
577
|
+
/** The event key. */
|
|
578
|
+
eventKey: zod_1.z.string(),
|
|
579
|
+
/** The user-facing name. */
|
|
580
|
+
label: zod_1.z.string(),
|
|
581
|
+
/** Whether a user may not opt out. */
|
|
582
|
+
mandatory: zod_1.z.boolean(),
|
|
583
|
+
/** Whether the deployment policy allows push for it. */
|
|
584
|
+
policyAllows: zod_1.z.boolean(),
|
|
585
|
+
/** Whether the caller's preference allows push for it. */
|
|
586
|
+
preferenceAllows: zod_1.z.boolean(),
|
|
587
|
+
});
|
|
588
|
+
/**
|
|
589
|
+
* One test send's result.
|
|
590
|
+
*
|
|
591
|
+
* @stability stable
|
|
592
|
+
*/
|
|
593
|
+
exports.pushTestSendResultSchema = zod_1.z.object({
|
|
594
|
+
/** How the send ended. */
|
|
595
|
+
status: pushTestSendStatusSchema,
|
|
596
|
+
/** The push service's HTTP status, or null. */
|
|
597
|
+
statusCode: zod_1.z.number().int().nullable(),
|
|
598
|
+
/** A short explanation, or null. */
|
|
599
|
+
message: zod_1.z.string().nullable(),
|
|
600
|
+
/** The push service's response body (capped), or null. */
|
|
601
|
+
responseBody: zod_1.z.string().nullable(),
|
|
602
|
+
/** How long it took, in milliseconds. */
|
|
603
|
+
durationMs: zod_1.z.number(),
|
|
604
|
+
});
|
|
605
|
+
/**
|
|
606
|
+
* One of the caller's subscriptions and its test send. The endpoint appears
|
|
607
|
+
* only as a preview and its push service host.
|
|
608
|
+
*
|
|
609
|
+
* @stability stable
|
|
610
|
+
*/
|
|
611
|
+
exports.pushTestSubscriptionResultSchema = zod_1.z.object({
|
|
612
|
+
/** The subscription id. */
|
|
613
|
+
id: zod_1.z.string(),
|
|
614
|
+
/** The push service's host. */
|
|
615
|
+
pushService: zod_1.z.string(),
|
|
616
|
+
/** A shortened, non-capability form of the endpoint. */
|
|
617
|
+
endpointPreview: zod_1.z.string(),
|
|
618
|
+
/** Whether it is the calling browser's subscription. */
|
|
619
|
+
isThisBrowser: zod_1.z.boolean(),
|
|
620
|
+
/** The subscribing browser, or null. */
|
|
621
|
+
userAgent: zod_1.z.string().nullable(),
|
|
622
|
+
/** When it subscribed (ISO 8601). */
|
|
623
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
624
|
+
/** The last successful delivery (ISO 8601), or null. */
|
|
625
|
+
lastSuccessAt: zod_1.z.iso.datetime().nullable(),
|
|
626
|
+
/** Consecutive delivery failures. */
|
|
627
|
+
failureCount: zod_1.z.number().int(),
|
|
628
|
+
/** The test send to it. */
|
|
629
|
+
result: exports.pushTestSendResultSchema,
|
|
630
|
+
});
|
|
631
|
+
/**
|
|
632
|
+
* `POST /api/admin/push-config/test` response.
|
|
633
|
+
*
|
|
634
|
+
* @stability stable
|
|
635
|
+
*/
|
|
636
|
+
exports.pushTestResponseSchema = zod_1.z.object({
|
|
637
|
+
/** When the test ran (ISO 8601). */
|
|
638
|
+
ranAt: zod_1.z.iso.datetime(),
|
|
639
|
+
/** How long the whole test took, in milliseconds. */
|
|
640
|
+
durationMs: zod_1.z.number(),
|
|
641
|
+
/** The verdict. */
|
|
642
|
+
overall: pushTestOverallSchema,
|
|
643
|
+
/** The id the service worker acknowledges. */
|
|
644
|
+
testId: zod_1.z.string(),
|
|
645
|
+
/** The configuration diagnostics. */
|
|
646
|
+
config: exports.pushTestConfigDiagnosticsSchema,
|
|
647
|
+
/** The calling browser's diagnostics. */
|
|
648
|
+
browser: exports.pushTestBrowserDiagnosticsSchema,
|
|
649
|
+
/** The events that may push, and whether each would. */
|
|
650
|
+
events: zod_1.z.array(exports.pushTestEventDiagnosticsSchema),
|
|
651
|
+
/** The caller's subscriptions and each one's send result. */
|
|
652
|
+
subscriptions: zod_1.z.array(exports.pushTestSubscriptionResultSchema),
|
|
653
|
+
/** What to do next, in words. */
|
|
654
|
+
hints: zod_1.z.array(zod_1.z.string()),
|
|
655
|
+
});
|
|
656
|
+
// ---- /api/admin/broadcasts --------------------------------------------------------------
|
|
657
|
+
const FORBIDDEN_LINK_CHARS = /[\u0000- \u007F]/;
|
|
658
|
+
const rootRelativeLink = zod_1.z
|
|
659
|
+
.string()
|
|
660
|
+
.trim()
|
|
661
|
+
.min(1, 'link must not be empty')
|
|
662
|
+
.max(constants_js_1.BROADCAST_LINK_MAX)
|
|
663
|
+
.refine((value) => !FORBIDDEN_LINK_CHARS.test(value), {
|
|
664
|
+
message: 'link must not contain spaces or control characters',
|
|
665
|
+
})
|
|
666
|
+
.refine((value) => value.startsWith('/'), {
|
|
667
|
+
message: 'link must be root-relative and start with "/"',
|
|
668
|
+
})
|
|
669
|
+
.refine((value) => !value.startsWith('//'), {
|
|
670
|
+
message: 'link must not be protocol-relative ("//…")',
|
|
671
|
+
})
|
|
672
|
+
.refine((value) => !value.startsWith('/\\'), {
|
|
673
|
+
message: 'link must not start with "/\\"',
|
|
674
|
+
});
|
|
675
|
+
/**
|
|
676
|
+
* `POST /api/admin/broadcasts` (and `/test`) body. `channels` are open ids
|
|
677
|
+
* (the API refuses an unregistered one); `targetOrgId` (#738) addresses one
|
|
678
|
+
* organization's active members instead of every active user, and only a
|
|
679
|
+
* system `broadcasts:write` holder may name one (an `org_broadcasts:write`
|
|
680
|
+
* holder's target is forced to their active organization).
|
|
681
|
+
*
|
|
682
|
+
* @extensionPoint schema
|
|
683
|
+
* @stability stable
|
|
684
|
+
*/
|
|
685
|
+
exports.createBroadcastSchema = zod_1.z
|
|
686
|
+
.object({
|
|
687
|
+
/** The title. */
|
|
688
|
+
title: zod_1.z.string().trim().min(1, 'title must not be empty').max(constants_js_1.BROADCAST_TITLE_MAX),
|
|
689
|
+
/** The body text. */
|
|
690
|
+
body: zod_1.z.string().trim().min(1, 'body must not be empty').max(constants_js_1.BROADCAST_BODY_MAX),
|
|
691
|
+
/** A root-relative link (`/...`; never `//` or another origin). */
|
|
692
|
+
link: rootRelativeLink.optional(),
|
|
693
|
+
/** The email call-to-action label; needs `link`. */
|
|
694
|
+
ctaLabel: zod_1.z.string().trim().min(1).max(constants_js_1.BROADCAST_CTA_LABEL_MAX).optional(),
|
|
695
|
+
/** The channels (open channel ids). */
|
|
696
|
+
channels: zod_1.z
|
|
697
|
+
.array(exports.notificationChannelIdSchema)
|
|
698
|
+
.min(1, 'select at least one channel')
|
|
699
|
+
.refine((value) => new Set(value).size === value.length, {
|
|
700
|
+
message: 'channels must not contain duplicates',
|
|
701
|
+
}),
|
|
702
|
+
/** When to send (ISO 8601 with offset, in the future); absent sends now. */
|
|
703
|
+
scheduledFor: zod_1.z.iso
|
|
704
|
+
.datetime({ offset: true })
|
|
705
|
+
.transform((value) => new Date(value))
|
|
706
|
+
.refine((value) => value.getTime() > Date.now(), {
|
|
707
|
+
message: 'scheduledFor must be in the future',
|
|
708
|
+
})
|
|
709
|
+
.optional(),
|
|
710
|
+
/** A critical broadcast cannot be muted (needs a channel flagged `criticalCapable`, `browser`). */
|
|
711
|
+
critical: zod_1.z.boolean().default(false),
|
|
712
|
+
/** Target one organization's active members. A system administrator may name any organization or omit it (every active user); an organization administrator's broadcast always targets their active organization. */
|
|
713
|
+
targetOrgId: zod_1.z.uuid().optional(),
|
|
714
|
+
})
|
|
715
|
+
.superRefine((value, ctx) => {
|
|
716
|
+
if (value.ctaLabel && !value.link) {
|
|
717
|
+
ctx.addIssue({ code: 'custom', path: ['ctaLabel'], message: 'ctaLabel requires link' });
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
/**
|
|
721
|
+
* One broadcast.
|
|
722
|
+
*
|
|
723
|
+
* @stability stable
|
|
724
|
+
*/
|
|
725
|
+
exports.broadcastSchema = zod_1.z.object({
|
|
726
|
+
/** The id. */
|
|
727
|
+
id: zod_1.z.uuid(),
|
|
728
|
+
/** The title. */
|
|
729
|
+
title: zod_1.z.string(),
|
|
730
|
+
/** The body text. */
|
|
731
|
+
body: zod_1.z.string(),
|
|
732
|
+
/** A root-relative link, or null. */
|
|
733
|
+
link: zod_1.z.string().nullable(),
|
|
734
|
+
/** The email call-to-action label (needs `link`), or null. */
|
|
735
|
+
ctaLabel: zod_1.z.string().nullable(),
|
|
736
|
+
/** The event key. */
|
|
737
|
+
eventKey: zod_1.z.string(),
|
|
738
|
+
/** The channels (open channel ids). */
|
|
739
|
+
channels: zod_1.z.array(zod_1.z.string()),
|
|
740
|
+
/** The lifecycle status. */
|
|
741
|
+
status: broadcastStatusSchema,
|
|
742
|
+
/** When it is due (ISO 8601), or null for now. */
|
|
743
|
+
scheduledFor: zod_1.z.iso.datetime().nullable(),
|
|
744
|
+
/** When the start job froze the audience, or null. */
|
|
745
|
+
startedAt: zod_1.z.iso.datetime().nullable(),
|
|
746
|
+
/** When it settled, or null. */
|
|
747
|
+
finishedAt: zod_1.z.iso.datetime().nullable(),
|
|
748
|
+
/** When it was canceled, or null. */
|
|
749
|
+
canceledAt: zod_1.z.iso.datetime().nullable(),
|
|
750
|
+
/** The frozen audience cutoff, or null before it starts. */
|
|
751
|
+
audienceCutoff: zod_1.z.iso.datetime().nullable(),
|
|
752
|
+
/** The frozen audience size, or null before it is counted (never 0 for unknown). */
|
|
753
|
+
recipientsTargeted: zod_1.z.number().int().nullable(),
|
|
754
|
+
/** Recipients dispatched so far. */
|
|
755
|
+
recipientsDispatched: zod_1.z.number().int(),
|
|
756
|
+
/** The last failure, or null. */
|
|
757
|
+
lastError: zod_1.z.string().nullable(),
|
|
758
|
+
/** The author, or null once deleted. */
|
|
759
|
+
createdById: zod_1.z.uuid().nullable(),
|
|
760
|
+
/** Creation time (ISO 8601). */
|
|
761
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
762
|
+
/** Last update (ISO 8601), or null. */
|
|
763
|
+
updatedAt: zod_1.z.iso.datetime(),
|
|
764
|
+
/** The organization targeted (its active members only), or null for every active user. */
|
|
765
|
+
targetOrgId: zod_1.z.uuid().nullable(),
|
|
766
|
+
});
|
|
767
|
+
/**
|
|
768
|
+
* One (channel, status) delivery count of a broadcast.
|
|
769
|
+
*
|
|
770
|
+
* @stability stable
|
|
771
|
+
*/
|
|
772
|
+
exports.broadcastDeliveryCountSchema = zod_1.z.object({
|
|
773
|
+
/** The channel id. */
|
|
774
|
+
channel: zod_1.z.string(),
|
|
775
|
+
/** The delivery status. */
|
|
776
|
+
status: zod_1.z.string(),
|
|
777
|
+
/** Delivery attempts. */
|
|
778
|
+
count: zod_1.z.number().int(),
|
|
779
|
+
});
|
|
780
|
+
/**
|
|
781
|
+
* A broadcast with its approximate delivery counts.
|
|
782
|
+
*
|
|
783
|
+
* @stability stable
|
|
784
|
+
*/
|
|
785
|
+
exports.broadcastDetailSchema = exports.broadcastSchema.extend({
|
|
786
|
+
/** Delivery attempts by channel and status, approximate (attributed by event key and time window). */
|
|
787
|
+
approximateDeliveryAttempts: zod_1.z.array(exports.broadcastDeliveryCountSchema),
|
|
788
|
+
});
|
|
789
|
+
/**
|
|
790
|
+
* The create result: the row and any warnings (an unconfigured channel).
|
|
791
|
+
*
|
|
792
|
+
* @stability stable
|
|
793
|
+
*/
|
|
794
|
+
exports.broadcastCreateResultSchema = zod_1.z.object({
|
|
795
|
+
/** The broadcast row. */
|
|
796
|
+
broadcast: exports.broadcastSchema,
|
|
797
|
+
/** Non-fatal warnings to show (for example, browser notifications are off). */
|
|
798
|
+
warnings: zod_1.z.array(zod_1.z.string()),
|
|
799
|
+
});
|
|
800
|
+
/**
|
|
801
|
+
* `GET /api/admin/broadcasts/audience` query (#738): the target to count;
|
|
802
|
+
* absent counts every active user.
|
|
803
|
+
*
|
|
804
|
+
* @stability stable
|
|
805
|
+
*/
|
|
806
|
+
exports.broadcastAudienceQuerySchema = zod_1.z.object({
|
|
807
|
+
/** Count one organization's active members instead of every active user. */
|
|
808
|
+
targetOrgId: zod_1.z.uuid().optional(),
|
|
809
|
+
});
|
|
810
|
+
/**
|
|
811
|
+
* The audience size a broadcast sent now would reach.
|
|
812
|
+
*
|
|
813
|
+
* @stability stable
|
|
814
|
+
*/
|
|
815
|
+
exports.broadcastAudienceSchema = zod_1.z.object({
|
|
816
|
+
/** Active users the broadcast would reach now. */
|
|
817
|
+
activeUsers: zod_1.z.number().int(),
|
|
818
|
+
});
|
|
819
|
+
/**
|
|
820
|
+
* `POST /api/admin/broadcasts/test` result: sent to the caller only.
|
|
821
|
+
*
|
|
822
|
+
* @stability stable
|
|
823
|
+
*/
|
|
824
|
+
exports.broadcastTestResultSchema = zod_1.z.object({
|
|
825
|
+
/** The event the test raised. */
|
|
826
|
+
eventKey: zod_1.z.string(),
|
|
827
|
+
/** The channels the test went to. */
|
|
828
|
+
channels: zod_1.z.array(zod_1.z.string()),
|
|
829
|
+
/** The caller, the only recipient of a test. */
|
|
830
|
+
sentToUserId: zod_1.z.uuid(),
|
|
831
|
+
});
|
|
832
|
+
/**
|
|
833
|
+
* `GET /api/admin/broadcasts` query.
|
|
834
|
+
*
|
|
835
|
+
* @stability stable
|
|
836
|
+
*/
|
|
837
|
+
exports.broadcastListQuerySchema = zod_1.z.object({
|
|
838
|
+
/** The page number, from 1. */
|
|
839
|
+
page: zod_1.z.coerce.number().int().min(1).default(1),
|
|
840
|
+
/** Rows per page (at most 100). */
|
|
841
|
+
pageSize: zod_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
842
|
+
/** Only broadcasts in this status. */
|
|
843
|
+
status: broadcastStatusSchema.optional(),
|
|
844
|
+
});
|
|
845
|
+
/**
|
|
846
|
+
* The proof, as a value: fails to compile when {@link PushContractCarriesNoSecret} is `never`.
|
|
847
|
+
*
|
|
848
|
+
* @stability stable
|
|
849
|
+
*/
|
|
850
|
+
exports.PUSH_CONTRACT_CARRIES_NO_SECRET = true;
|
|
851
|
+
//# sourceMappingURL=schemas.js.map
|