@antelopejs/dms 0.0.1
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 +1 -0
- package/LICENSE +190 -0
- package/README.md +48 -0
- package/dist/attachments/access.d.ts +9 -0
- package/dist/attachments/access.js +66 -0
- package/dist/attachments/access.js.map +1 -0
- package/dist/attachments/bindings.d.ts +3 -0
- package/dist/attachments/bindings.js +25 -0
- package/dist/attachments/bindings.js.map +1 -0
- package/dist/attachments/fields.d.ts +7 -0
- package/dist/attachments/fields.js +25 -0
- package/dist/attachments/fields.js.map +1 -0
- package/dist/attachments/read.d.ts +11 -0
- package/dist/attachments/read.js +36 -0
- package/dist/attachments/read.js.map +1 -0
- package/dist/attachments/registry.d.ts +6 -0
- package/dist/attachments/registry.js +36 -0
- package/dist/attachments/registry.js.map +1 -0
- package/dist/attachments/save.d.ts +2 -0
- package/dist/attachments/save.js +86 -0
- package/dist/attachments/save.js.map +1 -0
- package/dist/attachments/table-view.d.ts +2 -0
- package/dist/attachments/table-view.js +71 -0
- package/dist/attachments/table-view.js.map +1 -0
- package/dist/attachments/uploads.d.ts +5 -0
- package/dist/attachments/uploads.js +29 -0
- package/dist/attachments/uploads.js.map +1 -0
- package/dist/automation/actions.d.ts +2 -0
- package/dist/automation/actions.js +150 -0
- package/dist/automation/actions.js.map +1 -0
- package/dist/automation/events.d.ts +49 -0
- package/dist/automation/events.js +23 -0
- package/dist/automation/events.js.map +1 -0
- package/dist/automation/index.d.ts +3 -0
- package/dist/automation/index.js +123 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/registration-lifecycle.d.ts +7 -0
- package/dist/automation/registration-lifecycle.js +24 -0
- package/dist/automation/registration-lifecycle.js.map +1 -0
- package/dist/automation/sources.d.ts +2 -0
- package/dist/automation/sources.js +81 -0
- package/dist/automation/sources.js.map +1 -0
- package/dist/automation/triggers.d.ts +2 -0
- package/dist/automation/triggers.js +139 -0
- package/dist/automation/triggers.js.map +1 -0
- package/dist/config.d.ts +58 -0
- package/dist/config.js +83 -0
- package/dist/config.js.map +1 -0
- package/dist/crons/cleanup-user-invites.d.ts +4 -0
- package/dist/crons/cleanup-user-invites.js +94 -0
- package/dist/crons/cleanup-user-invites.js.map +1 -0
- package/dist/crons/index.d.ts +4 -0
- package/dist/crons/index.js +25 -0
- package/dist/crons/index.js.map +1 -0
- package/dist/crons/sweep-stale-exports.d.ts +4 -0
- package/dist/crons/sweep-stale-exports.js +24 -0
- package/dist/crons/sweep-stale-exports.js.map +1 -0
- package/dist/db/index.d.ts +2 -0
- package/dist/db/index.js +19 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/models/attachments.model.d.ts +22 -0
- package/dist/db/models/attachments.model.js +9 -0
- package/dist/db/models/attachments.model.js.map +1 -0
- package/dist/db/models/index.d.ts +4 -0
- package/dist/db/models/index.js +21 -0
- package/dist/db/models/index.js.map +1 -0
- package/dist/db/models/systemState.model.d.ts +24 -0
- package/dist/db/models/systemState.model.js +19 -0
- package/dist/db/models/systemState.model.js.map +1 -0
- package/dist/db/models/userNotificationPreferences.model.d.ts +26 -0
- package/dist/db/models/userNotificationPreferences.model.js +71 -0
- package/dist/db/models/userNotificationPreferences.model.js.map +1 -0
- package/dist/db/models/userNotifications.model.d.ts +49 -0
- package/dist/db/models/userNotifications.model.js +217 -0
- package/dist/db/models/userNotifications.model.js.map +1 -0
- package/dist/db/tables/attachments.table.d.ts +9 -0
- package/dist/db/tables/attachments.table.js +43 -0
- package/dist/db/tables/attachments.table.js.map +1 -0
- package/dist/db/tables/index.d.ts +4 -0
- package/dist/db/tables/index.js +21 -0
- package/dist/db/tables/index.js.map +1 -0
- package/dist/db/tables/systemState.table.d.ts +8 -0
- package/dist/db/tables/systemState.table.js +48 -0
- package/dist/db/tables/systemState.table.js.map +1 -0
- package/dist/db/tables/userNotificationPreferences.table.d.ts +9 -0
- package/dist/db/tables/userNotificationPreferences.table.js +49 -0
- package/dist/db/tables/userNotificationPreferences.table.js.map +1 -0
- package/dist/db/tables/userNotifications.table.d.ts +19 -0
- package/dist/db/tables/userNotifications.table.js +93 -0
- package/dist/db/tables/userNotifications.table.js.map +1 -0
- package/dist/dev/module-update-notifications.d.ts +10 -0
- package/dist/dev/module-update-notifications.js +146 -0
- package/dist/dev/module-update-notifications.js.map +1 -0
- package/dist/hooks/invite-extensions.d.ts +1 -0
- package/dist/hooks/invite-extensions.js +43 -0
- package/dist/hooks/invite-extensions.js.map +1 -0
- package/dist/hooks/tenant-deleted.d.ts +1 -0
- package/dist/hooks/tenant-deleted.js +33 -0
- package/dist/hooks/tenant-deleted.js.map +1 -0
- package/dist/implementations/dms/attachments.d.ts +6 -0
- package/dist/implementations/dms/attachments.js +10 -0
- package/dist/implementations/dms/attachments.js.map +1 -0
- package/dist/implementations/dms/client-base-url.d.ts +1 -0
- package/dist/implementations/dms/client-base-url.js +6 -0
- package/dist/implementations/dms/client-base-url.js.map +1 -0
- package/dist/implementations/dms/dev-handshake.d.ts +1 -0
- package/dist/implementations/dms/dev-handshake.js +41 -0
- package/dist/implementations/dms/dev-handshake.js.map +1 -0
- package/dist/implementations/dms/dev-reload.d.ts +10 -0
- package/dist/implementations/dms/dev-reload.js +93 -0
- package/dist/implementations/dms/dev-reload.js.map +1 -0
- package/dist/implementations/dms/frontend-bootstrap.d.ts +7 -0
- package/dist/implementations/dms/frontend-bootstrap.js +39 -0
- package/dist/implementations/dms/frontend-bootstrap.js.map +1 -0
- package/dist/implementations/dms/frontend-modules.d.ts +23 -0
- package/dist/implementations/dms/frontend-modules.js +215 -0
- package/dist/implementations/dms/frontend-modules.js.map +1 -0
- package/dist/implementations/dms/guards.d.ts +7 -0
- package/dist/implementations/dms/guards.js +45 -0
- package/dist/implementations/dms/guards.js.map +1 -0
- package/dist/implementations/dms/invite-extensions.d.ts +7 -0
- package/dist/implementations/dms/invite-extensions.js +19 -0
- package/dist/implementations/dms/invite-extensions.js.map +1 -0
- package/dist/implementations/dms/manifest.d.ts +27 -0
- package/dist/implementations/dms/manifest.js +96 -0
- package/dist/implementations/dms/manifest.js.map +1 -0
- package/dist/implementations/dms/page.d.ts +93 -0
- package/dist/implementations/dms/page.js +894 -0
- package/dist/implementations/dms/page.js.map +1 -0
- package/dist/implementations/dms/permissions-resolver.d.ts +8 -0
- package/dist/implementations/dms/permissions-resolver.js +33 -0
- package/dist/implementations/dms/permissions-resolver.js.map +1 -0
- package/dist/implementations/dms/permissions.d.ts +9 -0
- package/dist/implementations/dms/permissions.js +64 -0
- package/dist/implementations/dms/permissions.js.map +1 -0
- package/dist/implementations/dms/quick-actions.d.ts +33 -0
- package/dist/implementations/dms/quick-actions.js +52 -0
- package/dist/implementations/dms/quick-actions.js.map +1 -0
- package/dist/implementations/dms/realtime.d.ts +12 -0
- package/dist/implementations/dms/realtime.js +37 -0
- package/dist/implementations/dms/realtime.js.map +1 -0
- package/dist/implementations/dms/route-params.d.ts +2 -0
- package/dist/implementations/dms/route-params.js +24 -0
- package/dist/implementations/dms/route-params.js.map +1 -0
- package/dist/implementations/dms/tenant-access.d.ts +8 -0
- package/dist/implementations/dms/tenant-access.js +34 -0
- package/dist/implementations/dms/tenant-access.js.map +1 -0
- package/dist/implementations/dms/uploads.d.ts +8 -0
- package/dist/implementations/dms/uploads.js +11 -0
- package/dist/implementations/dms/uploads.js.map +1 -0
- package/dist/implementations/dms/warn-once.d.ts +1 -0
- package/dist/implementations/dms/warn-once.js +17 -0
- package/dist/implementations/dms/warn-once.js.map +1 -0
- package/dist/implementations/dms-auth/index.d.ts +55 -0
- package/dist/implementations/dms-auth/index.js +349 -0
- package/dist/implementations/dms-auth/index.js.map +1 -0
- package/dist/implementations/dms-base/export-jobs.d.ts +2 -0
- package/dist/implementations/dms-base/export-jobs.js +12 -0
- package/dist/implementations/dms-base/export-jobs.js.map +1 -0
- package/dist/implementations/dms-base/search-route.d.ts +29 -0
- package/dist/implementations/dms-base/search-route.js +168 -0
- package/dist/implementations/dms-base/search-route.js.map +1 -0
- package/dist/implementations/dms-base/table-view.d.ts +43 -0
- package/dist/implementations/dms-base/table-view.js +232 -0
- package/dist/implementations/dms-base/table-view.js.map +1 -0
- package/dist/implementations/dms-base/tenant-export-archive.d.ts +1 -0
- package/dist/implementations/dms-base/tenant-export-archive.js +7 -0
- package/dist/implementations/dms-base/tenant-export-archive.js.map +1 -0
- package/dist/implementations/dms-html-render/constants.d.ts +2 -0
- package/dist/implementations/dms-html-render/constants.js +6 -0
- package/dist/implementations/dms-html-render/constants.js.map +1 -0
- package/dist/implementations/dms-html-render/index.d.ts +4 -0
- package/dist/implementations/dms-html-render/index.js +50 -0
- package/dist/implementations/dms-html-render/index.js.map +1 -0
- package/dist/implementations/dms-html-render/service-jwt.d.ts +1 -0
- package/dist/implementations/dms-html-render/service-jwt.js +17 -0
- package/dist/implementations/dms-html-render/service-jwt.js.map +1 -0
- package/dist/implementations/dms-html-render/template-registry.d.ts +9 -0
- package/dist/implementations/dms-html-render/template-registry.js +28 -0
- package/dist/implementations/dms-html-render/template-registry.js.map +1 -0
- package/dist/implementations/dms-notifications/index.d.ts +19 -0
- package/dist/implementations/dms-notifications/index.js +193 -0
- package/dist/implementations/dms-notifications/index.js.map +1 -0
- package/dist/implementations/dms-notifications/registry.d.ts +6 -0
- package/dist/implementations/dms-notifications/registry.js +18 -0
- package/dist/implementations/dms-notifications/registry.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +195 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/index.d.ts +3 -0
- package/dist/pages/index.js +20 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/modules/index.d.ts +1 -0
- package/dist/pages/modules/index.js +18 -0
- package/dist/pages/modules/index.js.map +1 -0
- package/dist/pages/modules/modules-index.d.ts +4 -0
- package/dist/pages/modules/modules-index.js +22 -0
- package/dist/pages/modules/modules-index.js.map +1 -0
- package/dist/pages/public/auth/2fa.d.ts +9 -0
- package/dist/pages/public/auth/2fa.js +26 -0
- package/dist/pages/public/auth/2fa.js.map +1 -0
- package/dist/pages/public/auth/accounts.d.ts +9 -0
- package/dist/pages/public/auth/accounts.js +27 -0
- package/dist/pages/public/auth/accounts.js.map +1 -0
- package/dist/pages/public/auth/backup.d.ts +9 -0
- package/dist/pages/public/auth/backup.js +26 -0
- package/dist/pages/public/auth/backup.js.map +1 -0
- package/dist/pages/public/auth/forgot-validation.d.ts +9 -0
- package/dist/pages/public/auth/forgot-validation.js +26 -0
- package/dist/pages/public/auth/forgot-validation.js.map +1 -0
- package/dist/pages/public/auth/forgot.d.ts +9 -0
- package/dist/pages/public/auth/forgot.js +26 -0
- package/dist/pages/public/auth/forgot.js.map +1 -0
- package/dist/pages/public/auth/login.d.ts +9 -0
- package/dist/pages/public/auth/login.js +26 -0
- package/dist/pages/public/auth/login.js.map +1 -0
- package/dist/pages/public/auth/oauth-complete.d.ts +9 -0
- package/dist/pages/public/auth/oauth-complete.js +26 -0
- package/dist/pages/public/auth/oauth-complete.js.map +1 -0
- package/dist/pages/public/auth/recover-success.d.ts +9 -0
- package/dist/pages/public/auth/recover-success.js +26 -0
- package/dist/pages/public/auth/recover-success.js.map +1 -0
- package/dist/pages/public/auth/recover.d.ts +9 -0
- package/dist/pages/public/auth/recover.js +26 -0
- package/dist/pages/public/auth/recover.js.map +1 -0
- package/dist/pages/public/auth/signup.d.ts +9 -0
- package/dist/pages/public/auth/signup.js +26 -0
- package/dist/pages/public/auth/signup.js.map +1 -0
- package/dist/pages/public/auth/validate.d.ts +9 -0
- package/dist/pages/public/auth/validate.js +26 -0
- package/dist/pages/public/auth/validate.js.map +1 -0
- package/dist/pages/public/index.d.ts +12 -0
- package/dist/pages/public/index.js +15 -0
- package/dist/pages/public/index.js.map +1 -0
- package/dist/pages/public/onboarding/index.d.ts +9 -0
- package/dist/pages/public/onboarding/index.js +26 -0
- package/dist/pages/public/onboarding/index.js.map +1 -0
- package/dist/pages/settings/index.d.ts +2 -0
- package/dist/pages/settings/index.js +19 -0
- package/dist/pages/settings/index.js.map +1 -0
- package/dist/pages/settings/settings-index.d.ts +4 -0
- package/dist/pages/settings/settings-index.js +22 -0
- package/dist/pages/settings/settings-index.js.map +1 -0
- package/dist/pages/settings/users/appearance.d.ts +9 -0
- package/dist/pages/settings/users/appearance.js +30 -0
- package/dist/pages/settings/users/appearance.js.map +1 -0
- package/dist/pages/settings/users/category.d.ts +1 -0
- package/dist/pages/settings/users/category.js +12 -0
- package/dist/pages/settings/users/category.js.map +1 -0
- package/dist/pages/settings/users/index.d.ts +8 -0
- package/dist/pages/settings/users/index.js +27 -0
- package/dist/pages/settings/users/index.js.map +1 -0
- package/dist/pages/settings/users/invites.d.ts +37 -0
- package/dist/pages/settings/users/invites.js +307 -0
- package/dist/pages/settings/users/invites.js.map +1 -0
- package/dist/pages/settings/users/member-invite-form.d.ts +5 -0
- package/dist/pages/settings/users/member-invite-form.js +125 -0
- package/dist/pages/settings/users/member-invite-form.js.map +1 -0
- package/dist/pages/settings/users/members.d.ts +18 -0
- package/dist/pages/settings/users/members.js +222 -0
- package/dist/pages/settings/users/members.js.map +1 -0
- package/dist/pages/settings/users/notifications.d.ts +39 -0
- package/dist/pages/settings/users/notifications.js +177 -0
- package/dist/pages/settings/users/notifications.js.map +1 -0
- package/dist/pages/settings/users/profile-helpers.d.ts +56 -0
- package/dist/pages/settings/users/profile-helpers.js +141 -0
- package/dist/pages/settings/users/profile-helpers.js.map +1 -0
- package/dist/pages/settings/users/profile.d.ts +63 -0
- package/dist/pages/settings/users/profile.js +414 -0
- package/dist/pages/settings/users/profile.js.map +1 -0
- package/dist/pages/settings/users/roles.d.ts +11 -0
- package/dist/pages/settings/users/roles.js +71 -0
- package/dist/pages/settings/users/roles.js.map +1 -0
- package/dist/pages/settings/users/shortcuts.d.ts +9 -0
- package/dist/pages/settings/users/shortcuts.js +30 -0
- package/dist/pages/settings/users/shortcuts.js.map +1 -0
- package/dist/realtime/broker.d.ts +31 -0
- package/dist/realtime/broker.js +34 -0
- package/dist/realtime/broker.js.map +1 -0
- package/dist/realtime/current.d.ts +5 -0
- package/dist/realtime/current.js +20 -0
- package/dist/realtime/current.js.map +1 -0
- package/dist/realtime/heartbeat.d.ts +5 -0
- package/dist/realtime/heartbeat.js +35 -0
- package/dist/realtime/heartbeat.js.map +1 -0
- package/dist/realtime/index.d.ts +16 -0
- package/dist/realtime/index.js +143 -0
- package/dist/realtime/index.js.map +1 -0
- package/dist/realtime/instance.d.ts +1 -0
- package/dist/realtime/instance.js +6 -0
- package/dist/realtime/instance.js.map +1 -0
- package/dist/realtime/presence.d.ts +38 -0
- package/dist/realtime/presence.js +241 -0
- package/dist/realtime/presence.js.map +1 -0
- package/dist/realtime/redis-broker.d.ts +14 -0
- package/dist/realtime/redis-broker.js +127 -0
- package/dist/realtime/redis-broker.js.map +1 -0
- package/dist/realtime/registry.d.ts +7 -0
- package/dist/realtime/registry.js +34 -0
- package/dist/realtime/registry.js.map +1 -0
- package/dist/realtime/sessions.d.ts +14 -0
- package/dist/realtime/sessions.js +30 -0
- package/dist/realtime/sessions.js.map +1 -0
- package/dist/realtime/sse.d.ts +7 -0
- package/dist/realtime/sse.js +55 -0
- package/dist/realtime/sse.js.map +1 -0
- package/dist/realtime/tableview-bridge.d.ts +1 -0
- package/dist/realtime/tableview-bridge.js +38 -0
- package/dist/realtime/tableview-bridge.js.map +1 -0
- package/dist/routes/auth/constants.d.ts +3 -0
- package/dist/routes/auth/constants.js +7 -0
- package/dist/routes/auth/constants.js.map +1 -0
- package/dist/routes/auth/forgot-password.d.ts +2 -0
- package/dist/routes/auth/forgot-password.js +33 -0
- package/dist/routes/auth/forgot-password.js.map +1 -0
- package/dist/routes/auth/index.d.ts +16 -0
- package/dist/routes/auth/index.js +33 -0
- package/dist/routes/auth/index.js.map +1 -0
- package/dist/routes/auth/invite.d.ts +8 -0
- package/dist/routes/auth/invite.js +30 -0
- package/dist/routes/auth/invite.js.map +1 -0
- package/dist/routes/auth/login.d.ts +3 -0
- package/dist/routes/auth/login.js +16 -0
- package/dist/routes/auth/login.js.map +1 -0
- package/dist/routes/auth/logout.d.ts +3 -0
- package/dist/routes/auth/logout.js +22 -0
- package/dist/routes/auth/logout.js.map +1 -0
- package/dist/routes/auth/me.d.ts +2 -0
- package/dist/routes/auth/me.js +8 -0
- package/dist/routes/auth/me.js.map +1 -0
- package/dist/routes/auth/oauth/authorize-url.d.ts +5 -0
- package/dist/routes/auth/oauth/authorize-url.js +18 -0
- package/dist/routes/auth/oauth/authorize-url.js.map +1 -0
- package/dist/routes/auth/oauth/callback.d.ts +11 -0
- package/dist/routes/auth/oauth/callback.js +51 -0
- package/dist/routes/auth/oauth/callback.js.map +1 -0
- package/dist/routes/auth/oauth/config.d.ts +21 -0
- package/dist/routes/auth/oauth/config.js +55 -0
- package/dist/routes/auth/oauth/config.js.map +1 -0
- package/dist/routes/auth/oauth/identity-resolution.d.ts +16 -0
- package/dist/routes/auth/oauth/identity-resolution.js +108 -0
- package/dist/routes/auth/oauth/identity-resolution.js.map +1 -0
- package/dist/routes/auth/oauth/index.d.ts +9 -0
- package/dist/routes/auth/oauth/index.js +26 -0
- package/dist/routes/auth/oauth/index.js.map +1 -0
- package/dist/routes/auth/oauth/linking-policy.d.ts +11 -0
- package/dist/routes/auth/oauth/linking-policy.js +28 -0
- package/dist/routes/auth/oauth/linking-policy.js.map +1 -0
- package/dist/routes/auth/oauth/providers.d.ts +15 -0
- package/dist/routes/auth/oauth/providers.js +80 -0
- package/dist/routes/auth/oauth/providers.js.map +1 -0
- package/dist/routes/auth/oauth/relay.d.ts +2 -0
- package/dist/routes/auth/oauth/relay.js +25 -0
- package/dist/routes/auth/oauth/relay.js.map +1 -0
- package/dist/routes/auth/oauth/state.d.ts +2 -0
- package/dist/routes/auth/oauth/state.js +71 -0
- package/dist/routes/auth/oauth/state.js.map +1 -0
- package/dist/routes/auth/oauth/token-exchange.d.ts +2 -0
- package/dist/routes/auth/oauth/token-exchange.js +34 -0
- package/dist/routes/auth/oauth/token-exchange.js.map +1 -0
- package/dist/routes/auth/pick-tenant.d.ts +1 -0
- package/dist/routes/auth/pick-tenant.js +12 -0
- package/dist/routes/auth/pick-tenant.js.map +1 -0
- package/dist/routes/auth/refresh.d.ts +4 -0
- package/dist/routes/auth/refresh.js +61 -0
- package/dist/routes/auth/refresh.js.map +1 -0
- package/dist/routes/auth/request-2fa-email.d.ts +6 -0
- package/dist/routes/auth/request-2fa-email.js +30 -0
- package/dist/routes/auth/request-2fa-email.js.map +1 -0
- package/dist/routes/auth/request-email-verification.d.ts +2 -0
- package/dist/routes/auth/request-email-verification.js +28 -0
- package/dist/routes/auth/request-email-verification.js.map +1 -0
- package/dist/routes/auth/reset-password.d.ts +2 -0
- package/dist/routes/auth/reset-password.js +23 -0
- package/dist/routes/auth/reset-password.js.map +1 -0
- package/dist/routes/auth/session-response.d.ts +5 -0
- package/dist/routes/auth/session-response.js +42 -0
- package/dist/routes/auth/session-response.js.map +1 -0
- package/dist/routes/auth/signup.d.ts +3 -0
- package/dist/routes/auth/signup.js +103 -0
- package/dist/routes/auth/signup.js.map +1 -0
- package/dist/routes/auth/switch-tenant.d.ts +3 -0
- package/dist/routes/auth/switch-tenant.js +46 -0
- package/dist/routes/auth/switch-tenant.js.map +1 -0
- package/dist/routes/auth/types.d.ts +18 -0
- package/dist/routes/auth/types.js +3 -0
- package/dist/routes/auth/types.js.map +1 -0
- package/dist/routes/auth/validate-forgot-password-token.d.ts +2 -0
- package/dist/routes/auth/validate-forgot-password-token.js +17 -0
- package/dist/routes/auth/validate-forgot-password-token.js.map +1 -0
- package/dist/routes/auth/verify-2fa.d.ts +3 -0
- package/dist/routes/auth/verify-2fa.js +62 -0
- package/dist/routes/auth/verify-2fa.js.map +1 -0
- package/dist/routes/auth/verify-email.d.ts +2 -0
- package/dist/routes/auth/verify-email.js +21 -0
- package/dist/routes/auth/verify-email.js.map +1 -0
- package/dist/routes/auth.d.ts +30 -0
- package/dist/routes/auth.js +239 -0
- package/dist/routes/auth.js.map +1 -0
- package/dist/routes/files.d.ts +18 -0
- package/dist/routes/files.js +76 -0
- package/dist/routes/files.js.map +1 -0
- package/dist/routes/index.d.ts +5 -0
- package/dist/routes/index.js +22 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/onboarding.d.ts +12 -0
- package/dist/routes/onboarding.js +90 -0
- package/dist/routes/onboarding.js.map +1 -0
- package/dist/routes/realtime.d.ts +15 -0
- package/dist/routes/realtime.js +226 -0
- package/dist/routes/realtime.js.map +1 -0
- package/dist/routes/system-state.d.ts +16 -0
- package/dist/routes/system-state.js +43 -0
- package/dist/routes/system-state.js.map +1 -0
- package/dist/test/antelope.test.d.ts +2 -0
- package/dist/test/antelope.test.js +130 -0
- package/dist/test/antelope.test.js.map +1 -0
- package/dist/test/attachment-host/index.d.ts +1 -0
- package/dist/test/attachment-host/index.js +4 -0
- package/dist/test/attachment-host/index.js.map +1 -0
- package/dist/test/attachment-host/native.d.ts +14 -0
- package/dist/test/attachment-host/native.js +158 -0
- package/dist/test/attachment-host/native.js.map +1 -0
- package/dist/test/helpers/attachments.d.ts +18 -0
- package/dist/test/helpers/attachments.js +57 -0
- package/dist/test/helpers/attachments.js.map +1 -0
- package/dist/test/helpers/auth.d.ts +23 -0
- package/dist/test/helpers/auth.js +58 -0
- package/dist/test/helpers/auth.js.map +1 -0
- package/dist/test/helpers/db.d.ts +2 -0
- package/dist/test/helpers/db.js +47 -0
- package/dist/test/helpers/db.js.map +1 -0
- package/dist/test/helpers/fixtures.d.ts +23 -0
- package/dist/test/helpers/fixtures.js +62 -0
- package/dist/test/helpers/fixtures.js.map +1 -0
- package/dist/test/helpers/http.d.ts +3 -0
- package/dist/test/helpers/http.js +22 -0
- package/dist/test/helpers/http.js.map +1 -0
- package/dist/test/helpers/logging.d.ts +5 -0
- package/dist/test/helpers/logging.js +18 -0
- package/dist/test/helpers/logging.js.map +1 -0
- package/dist/test/helpers/page-access.d.ts +16 -0
- package/dist/test/helpers/page-access.js +44 -0
- package/dist/test/helpers/page-access.js.map +1 -0
- package/dist/test/integration/auth/login.test.d.ts +1 -0
- package/dist/test/integration/auth/login.test.js +57 -0
- package/dist/test/integration/auth/login.test.js.map +1 -0
- package/dist/test/integration/auth/refresh.test.d.ts +1 -0
- package/dist/test/integration/auth/refresh.test.js +59 -0
- package/dist/test/integration/auth/refresh.test.js.map +1 -0
- package/dist/test/integration/auth/sessions.test.d.ts +1 -0
- package/dist/test/integration/auth/sessions.test.js +58 -0
- package/dist/test/integration/auth/sessions.test.js.map +1 -0
- package/dist/test/integration/auth/signup.test.d.ts +1 -0
- package/dist/test/integration/auth/signup.test.js +99 -0
- package/dist/test/integration/auth/signup.test.js.map +1 -0
- package/dist/test/integration/export-cleanup.test.d.ts +1 -0
- package/dist/test/integration/export-cleanup.test.js +144 -0
- package/dist/test/integration/export-cleanup.test.js.map +1 -0
- package/dist/test/integration/files/component-file-retries.test.d.ts +1 -0
- package/dist/test/integration/files/component-file-retries.test.js +219 -0
- package/dist/test/integration/files/component-file-retries.test.js.map +1 -0
- package/dist/test/integration/files/component-files.test.d.ts +1 -0
- package/dist/test/integration/files/component-files.test.js +264 -0
- package/dist/test/integration/files/component-files.test.js.map +1 -0
- package/dist/test/integration/files/sign-upload-token.test.d.ts +1 -0
- package/dist/test/integration/files/sign-upload-token.test.js +16 -0
- package/dist/test/integration/files/sign-upload-token.test.js.map +1 -0
- package/dist/test/integration/files/upload.test.d.ts +1 -0
- package/dist/test/integration/files/upload.test.js +114 -0
- package/dist/test/integration/files/upload.test.js.map +1 -0
- package/dist/test/integration/frontend-endpoints.test.d.ts +1 -0
- package/dist/test/integration/frontend-endpoints.test.js +84 -0
- package/dist/test/integration/frontend-endpoints.test.js.map +1 -0
- package/dist/test/integration/invite-resolution.test.d.ts +1 -0
- package/dist/test/integration/invite-resolution.test.js +438 -0
- package/dist/test/integration/invite-resolution.test.js.map +1 -0
- package/dist/test/integration/notifications.test.d.ts +1 -0
- package/dist/test/integration/notifications.test.js +263 -0
- package/dist/test/integration/notifications.test.js.map +1 -0
- package/dist/test/integration/setup.test.d.ts +1 -0
- package/dist/test/integration/setup.test.js +45 -0
- package/dist/test/integration/setup.test.js.map +1 -0
- package/dist/test/integration/tenant-lifecycle.test.d.ts +1 -0
- package/dist/test/integration/tenant-lifecycle.test.js +244 -0
- package/dist/test/integration/tenant-lifecycle.test.js.map +1 -0
- package/dist/test/unit/auth-token-purpose.test.d.ts +1 -0
- package/dist/test/unit/auth-token-purpose.test.js +84 -0
- package/dist/test/unit/auth-token-purpose.test.js.map +1 -0
- package/dist/test/unit/automation-registration-lifecycle.test.d.ts +1 -0
- package/dist/test/unit/automation-registration-lifecycle.test.js +23 -0
- package/dist/test/unit/automation-registration-lifecycle.test.js.map +1 -0
- package/dist/test/unit/db/system-state.model.test.d.ts +1 -0
- package/dist/test/unit/db/system-state.model.test.js +55 -0
- package/dist/test/unit/db/system-state.model.test.js.map +1 -0
- package/dist/test/unit/dev/module-update-notifications.test.d.ts +1 -0
- package/dist/test/unit/dev/module-update-notifications.test.js +43 -0
- package/dist/test/unit/dev/module-update-notifications.test.js.map +1 -0
- package/dist/test/unit/dist-self-imports.test.d.ts +1 -0
- package/dist/test/unit/dist-self-imports.test.js +25 -0
- package/dist/test/unit/dist-self-imports.test.js.map +1 -0
- package/dist/test/unit/frontend-bootstrap.test.d.ts +1 -0
- package/dist/test/unit/frontend-bootstrap.test.js +55 -0
- package/dist/test/unit/frontend-bootstrap.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/archive-filter.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/archive-filter.test.js +63 -0
- package/dist/test/unit/implementations/dms/archive-filter.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/category-slug-registry.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/category-slug-registry.test.js +187 -0
- package/dist/test/unit/implementations/dms/category-slug-registry.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.js +168 -0
- package/dist/test/unit/implementations/dms/dynamic-menu-hardening.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/dynamic-menu.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/dynamic-menu.test.js +478 -0
- package/dist/test/unit/implementations/dms/dynamic-menu.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/frontend-module-metadata.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/frontend-module-metadata.test.js +38 -0
- package/dist/test/unit/implementations/dms/frontend-module-metadata.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/gate-consistency.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/gate-consistency.test.js +112 -0
- package/dist/test/unit/implementations/dms/gate-consistency.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.js +91 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/notify-menu-changed.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/notify-menu-changed.test.js +47 -0
- package/dist/test/unit/implementations/dms/notify-menu-changed.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/page-tenant-gate.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/page-tenant-gate.test.js +189 -0
- package/dist/test/unit/implementations/dms/page-tenant-gate.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/permission-teardown.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/permission-teardown.test.js +105 -0
- package/dist/test/unit/implementations/dms/permission-teardown.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/quick-actions-access.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/quick-actions-access.test.js +159 -0
- package/dist/test/unit/implementations/dms/quick-actions-access.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/quick-actions-openform.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/quick-actions-openform.test.js +184 -0
- package/dist/test/unit/implementations/dms/quick-actions-openform.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/subscribe-message.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/subscribe-message.test.js +68 -0
- package/dist/test/unit/implementations/dms/subscribe-message.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/surface-redaction.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/surface-redaction.test.js +171 -0
- package/dist/test/unit/implementations/dms/surface-redaction.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/user-can-access-page.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/user-can-access-page.test.js +113 -0
- package/dist/test/unit/implementations/dms/user-can-access-page.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/user-permissions-gate.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/user-permissions-gate.test.js +158 -0
- package/dist/test/unit/implementations/dms/user-permissions-gate.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/warn-once.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/warn-once.test.js +179 -0
- package/dist/test/unit/implementations/dms/warn-once.test.js.map +1 -0
- package/dist/test/unit/implementations/dms-base/archive-mode-helpers.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms-base/archive-mode-helpers.test.js +121 -0
- package/dist/test/unit/implementations/dms-base/archive-mode-helpers.test.js.map +1 -0
- package/dist/test/unit/implementations/dms-base/table-view-export-batching.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms-base/table-view-export-batching.test.js +120 -0
- package/dist/test/unit/implementations/dms-base/table-view-export-batching.test.js.map +1 -0
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.js +44 -0
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/component-children-permissions.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/component-children-permissions.test.js +357 -0
- package/dist/test/unit/interfaces/dms/component-children-permissions.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/component-transform.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/component-transform.test.js +45 -0
- package/dist/test/unit/interfaces/dms/component-transform.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/has-permission-module-scope.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/has-permission-module-scope.test.js +70 -0
- package/dist/test/unit/interfaces/dms/has-permission-module-scope.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/invite-extension.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/invite-extension.test.js +371 -0
- package/dist/test/unit/interfaces/dms/invite-extension.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/module-permission-registration.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/module-permission-registration.test.js +96 -0
- package/dist/test/unit/interfaces/dms/module-permission-registration.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/module-scoped-permissions.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/module-scoped-permissions.test.js +28 -0
- package/dist/test/unit/interfaces/dms/module-scoped-permissions.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/native-file-registration.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/native-file-registration.test.js +135 -0
- package/dist/test/unit/interfaces/dms/native-file-registration.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/page-extension.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/page-extension.test.js +599 -0
- package/dist/test/unit/interfaces/dms/page-extension.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/page-layout-gate.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/page-layout-gate.test.js +143 -0
- package/dist/test/unit/interfaces/dms/page-layout-gate.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/page-permission-teardown.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/page-permission-teardown.test.js +75 -0
- package/dist/test/unit/interfaces/dms/page-permission-teardown.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/page-registration-identity.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/page-registration-identity.test.js +203 -0
- package/dist/test/unit/interfaces/dms/page-registration-identity.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/page-teardown.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/page-teardown.test.js +290 -0
- package/dist/test/unit/interfaces/dms/page-teardown.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms/tenant-being-provisioned-hook.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms/tenant-being-provisioned-hook.test.js +92 -0
- package/dist/test/unit/interfaces/dms/tenant-being-provisioned-hook.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-auth/refresh-token-rotation.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-auth/refresh-token-rotation.test.js +88 -0
- package/dist/test/unit/interfaces/dms-auth/refresh-token-rotation.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/chart-value-precision.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/chart-value-precision.test.js +29 -0
- package/dist/test/unit/interfaces/dms-base/chart-value-precision.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/data-types/default-types.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/data-types/default-types.test.js +254 -0
- package/dist/test/unit/interfaces/dms-base/data-types/default-types.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/data-types/status-type.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/data-types/status-type.test.js +56 -0
- package/dist/test/unit/interfaces/dms-base/data-types/status-type.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/form-upload-tokens.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/form-upload-tokens.test.js +175 -0
- package/dist/test/unit/interfaces/dms-base/form-upload-tokens.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/layouts.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/layouts.test.js +33 -0
- package/dist/test/unit/interfaces/dms-base/layouts.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/nested-chart-card.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/nested-chart-card.test.js +85 -0
- package/dist/test/unit/interfaces/dms-base/nested-chart-card.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/table-cell-wrap.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/table-cell-wrap.test.js +29 -0
- package/dist/test/unit/interfaces/dms-base/table-cell-wrap.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/table-view-get-guard.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/table-view-get-guard.test.js +205 -0
- package/dist/test/unit/interfaces/dms-base/table-view-get-guard.test.js.map +1 -0
- package/dist/test/unit/interfaces/dms-base/table-view-tenant-gate.test.d.ts +1 -0
- package/dist/test/unit/interfaces/dms-base/table-view-tenant-gate.test.js +208 -0
- package/dist/test/unit/interfaces/dms-base/table-view-tenant-gate.test.js.map +1 -0
- package/dist/test/unit/oauth-account-guard.test.d.ts +1 -0
- package/dist/test/unit/oauth-account-guard.test.js +96 -0
- package/dist/test/unit/oauth-account-guard.test.js.map +1 -0
- package/dist/test/unit/oauth-claim-account.test.d.ts +1 -0
- package/dist/test/unit/oauth-claim-account.test.js +90 -0
- package/dist/test/unit/oauth-claim-account.test.js.map +1 -0
- package/dist/test/unit/oauth-config.test.d.ts +1 -0
- package/dist/test/unit/oauth-config.test.js +112 -0
- package/dist/test/unit/oauth-config.test.js.map +1 -0
- package/dist/test/unit/oauth-linking-policy.test.d.ts +1 -0
- package/dist/test/unit/oauth-linking-policy.test.js +114 -0
- package/dist/test/unit/oauth-linking-policy.test.js.map +1 -0
- package/dist/test/unit/oauth-provider-identity.test.d.ts +1 -0
- package/dist/test/unit/oauth-provider-identity.test.js +126 -0
- package/dist/test/unit/oauth-provider-identity.test.js.map +1 -0
- package/dist/test/unit/oauth-relay.test.d.ts +1 -0
- package/dist/test/unit/oauth-relay.test.js +40 -0
- package/dist/test/unit/oauth-relay.test.js.map +1 -0
- package/dist/test/unit/oauth-state.test.d.ts +1 -0
- package/dist/test/unit/oauth-state.test.js +61 -0
- package/dist/test/unit/oauth-state.test.js.map +1 -0
- package/dist/test/unit/request-authenticators.test.d.ts +1 -0
- package/dist/test/unit/request-authenticators.test.js +153 -0
- package/dist/test/unit/request-authenticators.test.js.map +1 -0
- package/dist/test/unit/request-tenant-guards.test.d.ts +1 -0
- package/dist/test/unit/request-tenant-guards.test.js +161 -0
- package/dist/test/unit/request-tenant-guards.test.js.map +1 -0
- package/dist/test/unit/signup-account-guard.test.d.ts +1 -0
- package/dist/test/unit/signup-account-guard.test.js +123 -0
- package/dist/test/unit/signup-account-guard.test.js.map +1 -0
- package/dist/test/unit/upload-constraints.test.d.ts +1 -0
- package/dist/test/unit/upload-constraints.test.js +43 -0
- package/dist/test/unit/upload-constraints.test.js.map +1 -0
- package/dist/test/unit/upload-token.test.d.ts +1 -0
- package/dist/test/unit/upload-token.test.js +46 -0
- package/dist/test/unit/upload-token.test.js.map +1 -0
- package/dist/test/unit/utils/row-action-rule-evaluator.test.d.ts +1 -0
- package/dist/test/unit/utils/row-action-rule-evaluator.test.js +143 -0
- package/dist/test/unit/utils/row-action-rule-evaluator.test.js.map +1 -0
- package/dist/test/unit/utils/tenant-export-archive.test.d.ts +1 -0
- package/dist/test/unit/utils/tenant-export-archive.test.js +138 -0
- package/dist/test/unit/utils/tenant-export-archive.test.js.map +1 -0
- package/dist/test/unit/utils/type-check.test.d.ts +1 -0
- package/dist/test/unit/utils/type-check.test.js +143 -0
- package/dist/test/unit/utils/type-check.test.js.map +1 -0
- package/dist/test/unit/utils/value-parser.test.d.ts +1 -0
- package/dist/test/unit/utils/value-parser.test.js +166 -0
- package/dist/test/unit/utils/value-parser.test.js.map +1 -0
- package/dist/test/unit/validation/auth.schema.test.d.ts +1 -0
- package/dist/test/unit/validation/auth.schema.test.js +77 -0
- package/dist/test/unit/validation/auth.schema.test.js.map +1 -0
- package/dist/test/unit/validation/file.schema.test.d.ts +1 -0
- package/dist/test/unit/validation/file.schema.test.js +140 -0
- package/dist/test/unit/validation/file.schema.test.js.map +1 -0
- package/dist/test/unit/validation/member-invite.schema.test.d.ts +1 -0
- package/dist/test/unit/validation/member-invite.schema.test.js +117 -0
- package/dist/test/unit/validation/member-invite.schema.test.js.map +1 -0
- package/dist/test/unit/validation/onboarding/register-admin.schema.test.d.ts +1 -0
- package/dist/test/unit/validation/onboarding/register-admin.schema.test.js +69 -0
- package/dist/test/unit/validation/onboarding/register-admin.schema.test.js.map +1 -0
- package/dist/test/unit/validation/user-notification-preferences.schema.test.d.ts +1 -0
- package/dist/test/unit/validation/user-notification-preferences.schema.test.js +29 -0
- package/dist/test/unit/validation/user-notification-preferences.schema.test.js.map +1 -0
- package/dist/utils/account-notifications.d.ts +10 -0
- package/dist/utils/account-notifications.js +147 -0
- package/dist/utils/account-notifications.js.map +1 -0
- package/dist/utils/auth-key.d.ts +1 -0
- package/dist/utils/auth-key.js +12 -0
- package/dist/utils/auth-key.js.map +1 -0
- package/dist/utils/ensure-default-tenant.d.ts +1 -0
- package/dist/utils/ensure-default-tenant.js +27 -0
- package/dist/utils/ensure-default-tenant.js.map +1 -0
- package/dist/utils/export-jobs-run.d.ts +17 -0
- package/dist/utils/export-jobs-run.js +212 -0
- package/dist/utils/export-jobs-run.js.map +1 -0
- package/dist/utils/export-jobs.d.ts +14 -0
- package/dist/utils/export-jobs.js +241 -0
- package/dist/utils/export-jobs.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/row-action-rule-evaluator.d.ts +4 -0
- package/dist/utils/row-action-rule-evaluator.js +47 -0
- package/dist/utils/row-action-rule-evaluator.js.map +1 -0
- package/dist/utils/run-in-batches.d.ts +1 -0
- package/dist/utils/run-in-batches.js +17 -0
- package/dist/utils/run-in-batches.js.map +1 -0
- package/dist/utils/tenant-export-archive.d.ts +6 -0
- package/dist/utils/tenant-export-archive.js +271 -0
- package/dist/utils/tenant-export-archive.js.map +1 -0
- package/dist/utils/upload-constraints.d.ts +4 -0
- package/dist/utils/upload-constraints.js +19 -0
- package/dist/utils/upload-constraints.js.map +1 -0
- package/dist/utils/upload-token.d.ts +11 -0
- package/dist/utils/upload-token.js +75 -0
- package/dist/utils/upload-token.js.map +1 -0
- package/dist/utils/user-agent.d.ts +3 -0
- package/dist/utils/user-agent.js +22 -0
- package/dist/utils/user-agent.js.map +1 -0
- package/dist/validation/auth.schema.d.ts +149 -0
- package/dist/validation/auth.schema.js +102 -0
- package/dist/validation/auth.schema.js.map +1 -0
- package/dist/validation/file.schema.d.ts +27 -0
- package/dist/validation/file.schema.js +50 -0
- package/dist/validation/file.schema.js.map +1 -0
- package/dist/validation/member-invite.schema.d.ts +59 -0
- package/dist/validation/member-invite.schema.js +38 -0
- package/dist/validation/member-invite.schema.js.map +1 -0
- package/dist/validation/onboarding/index.d.ts +1 -0
- package/dist/validation/onboarding/index.js +18 -0
- package/dist/validation/onboarding/index.js.map +1 -0
- package/dist/validation/onboarding/register-admin.schema.d.ts +22 -0
- package/dist/validation/onboarding/register-admin.schema.js +54 -0
- package/dist/validation/onboarding/register-admin.schema.js.map +1 -0
- package/dist/validation/password.d.ts +3 -0
- package/dist/validation/password.js +40 -0
- package/dist/validation/password.js.map +1 -0
- package/dist/validation/user-notification-preferences.schema.d.ts +2 -0
- package/dist/validation/user-notification-preferences.schema.js +39 -0
- package/dist/validation/user-notification-preferences.schema.js.map +1 -0
- package/frontend-vue/.prettierrc +10 -0
- package/frontend-vue/.vscode/settings.json +42 -0
- package/frontend-vue/antelope.config.json +5 -0
- package/frontend-vue/deferred-plugins.ts +29 -0
- package/frontend-vue/dms.email.ts +13 -0
- package/frontend-vue/dms.frontend.ts +190 -0
- package/frontend-vue/eslint.config.mjs +50 -0
- package/frontend-vue/i18n.config.ts +3 -0
- package/frontend-vue/layers/dms-auth/app/components/OAuthButtons.vue +58 -0
- package/frontend-vue/layers/dms-auth/app/composables/useAuthLinks.ts +33 -0
- package/frontend-vue/layers/dms-auth/app/composables/useCooldown.ts +23 -0
- package/frontend-vue/layers/dms-auth/app/composables/useLogout.ts +32 -0
- package/frontend-vue/layers/dms-auth/app/composables/useOAuthErrorToast.ts +39 -0
- package/frontend-vue/layers/dms-auth/app/composables/usePostLoginRedirect.ts +28 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +168 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/accounts.vue +168 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +98 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +158 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot.vue +82 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/login.vue +201 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/oauth-complete.vue +80 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover-success.vue +15 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +124 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +140 -0
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +151 -0
- package/frontend-vue/layers/dms-auth/app/middleware/auth.ts +91 -0
- package/frontend-vue/layers/dms-auth/app/utils/accountsFlow.ts +22 -0
- package/frontend-vue/layers/dms-auth/i18n/locales/auth-en-GB.json +174 -0
- package/frontend-vue/layers/dms-auth/i18n/locales/auth-fr-FR.json +174 -0
- package/frontend-vue/layers/dms-auth/shared/oauth.ts +48 -0
- package/frontend-vue/layers/dms-core/app/components/PermissionGate.vue +13 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +134 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useCurrentUser.ts +23 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useMultiAccount.ts +250 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/usePermissions.ts +73 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useSessionRecovery.ts +50 -0
- package/frontend-vue/layers/dms-core/app/composables/components/useComponentEvent.ts +29 -0
- package/frontend-vue/layers/dms-core/app/composables/data-types/useDataType.ts +39 -0
- package/frontend-vue/layers/dms-core/app/composables/functions/useDefinedFunction.ts +23 -0
- package/frontend-vue/layers/dms-core/app/composables/leave-guard/index.ts +2 -0
- package/frontend-vue/layers/dms-core/app/composables/leave-guard/types.ts +19 -0
- package/frontend-vue/layers/dms-core/app/composables/leave-guard/useLeaveGuard.ts +105 -0
- package/frontend-vue/layers/dms-core/app/composables/period/compareResolvers.ts +44 -0
- package/frontend-vue/layers/dms-core/app/composables/period/presetResolvers.ts +142 -0
- package/frontend-vue/layers/dms-core/app/composables/period/types.ts +59 -0
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriod.ts +173 -0
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriodScope.ts +86 -0
- package/frontend-vue/layers/dms-core/app/composables/realtime/usePageRealtime.ts +46 -0
- package/frontend-vue/layers/dms-core/app/composables/realtime/useRealtimeTopic.ts +25 -0
- package/frontend-vue/layers/dms-core/app/composables/realtime/useSseStream.ts +173 -0
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +286 -0
- package/frontend-vue/layers/dms-core/app/composables/translation/useTranslation.ts +104 -0
- package/frontend-vue/layers/dms-core/app/composables/translation/useUniqueLocales.ts +18 -0
- package/frontend-vue/layers/dms-core/app/composables/useApiError.ts +57 -0
- package/frontend-vue/layers/dms-core/app/composables/useEventedAction.ts +53 -0
- package/frontend-vue/layers/dms-core/app/composables/useHomepage.ts +6 -0
- package/frontend-vue/layers/dms-core/app/composables/useTrailingDeduper.ts +24 -0
- package/frontend-vue/layers/dms-core/app/composables/user/usePreferences.ts +98 -0
- package/frontend-vue/layers/dms-core/app/composables/watch/useWatch.ts +132 -0
- package/frontend-vue/layers/dms-core/app/types/auth-types.ts +2 -0
- package/frontend-vue/layers/dms-core/app/types/auth.ts +31 -0
- package/frontend-vue/layers/dms-core/app/types/button.ts +7 -0
- package/frontend-vue/layers/dms-core/app/types/color.ts +11 -0
- package/frontend-vue/layers/dms-core/app/types/component.ts +23 -0
- package/frontend-vue/layers/dms-core/app/types/data-type.ts +11 -0
- package/frontend-vue/layers/dms-core/app/types/http.ts +18 -0
- package/frontend-vue/layers/dms-core/app/types/image.ts +5 -0
- package/frontend-vue/layers/dms-core/app/types/json.ts +6 -0
- package/frontend-vue/layers/dms-core/app/types/menu.ts +36 -0
- package/frontend-vue/layers/dms-core/app/types/orientation.ts +4 -0
- package/frontend-vue/layers/dms-core/app/types/row-action-operators.ts +60 -0
- package/frontend-vue/layers/dms-core/app/types/row-action.ts +51 -0
- package/frontend-vue/layers/dms-core/app/types/size.ts +7 -0
- package/frontend-vue/layers/dms-core/app/types/user.ts +9 -0
- package/frontend-vue/layers/dms-core/app/types/utils.ts +1 -0
- package/frontend-vue/layers/dms-core/app/types/watch.ts +25 -0
- package/frontend-vue/layers/dms-core/app/utils/dedupedRefresh.ts +33 -0
- package/frontend-vue/layers/dms-core/app/utils/downloadFile.ts +8 -0
- package/frontend-vue/layers/dms-core/app/utils/formatter.ts +280 -0
- package/frontend-vue/layers/dms-core/app/utils/http-status.ts +8 -0
- package/frontend-vue/layers/dms-core/app/utils/menu.ts +187 -0
- package/frontend-vue/layers/dms-core/app/utils/query-validation.ts +37 -0
- package/frontend-vue/layers/dms-core/app/utils/routePath.ts +11 -0
- package/frontend-vue/layers/dms-core/app/utils/row-action-rule-evaluator.ts +90 -0
- package/frontend-vue/layers/dms-core/app/utils/stringTypeParser.ts +80 -0
- package/frontend-vue/layers/dms-core/app/utils/trailingDeduper.ts +42 -0
- package/frontend-vue/layers/dms-core/app/utils/type-check.ts +32 -0
- package/frontend-vue/layers/dms-core/app/utils/url-interpolation.ts +16 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +441 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +441 -0
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +37 -0
- package/frontend-vue/layers/dms-core/shared/types/runtime-config.d.ts +73 -0
- package/frontend-vue/layers/dms-core/types.d.ts +15 -0
- package/frontend-vue/layers/dms-layout/app/app.config.ts +258 -0
- package/frontend-vue/layers/dms-layout/app/assets/css/main.css +268 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/Container.vue +13 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardHeader.vue +271 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +341 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/Footer.vue +48 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeader.vue +67 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/QuickActionsPopover.vue +68 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/sidebarState.ts +17 -0
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationCard.vue +99 -0
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +231 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +291 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationsList.vue +226 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/shortcut/KeyboardShortcut.vue +19 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/CssVariablesList.vue +209 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/ScalePreview.vue +43 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/theme/ThemePreview.vue +78 -0
- package/frontend-vue/layers/dms-layout/app/components/AppWidgetsDock.vue +81 -0
- package/frontend-vue/layers/dms-layout/app/components/layout/AppLogo.vue +11 -0
- package/frontend-vue/layers/dms-layout/app/components/layout/DashboardSearch.vue +17 -0
- package/frontend-vue/layers/dms-layout/app/components/layout/HStack.vue +36 -0
- package/frontend-vue/layers/dms-layout/app/components/layout/Spacer.vue +28 -0
- package/frontend-vue/layers/dms-layout/app/components/layout/VStack.vue +33 -0
- package/frontend-vue/layers/dms-layout/app/components/navigation/AccordionItemSync.vue +45 -0
- package/frontend-vue/layers/dms-layout/app/components/navigation/CollapsedMenuItem.vue +187 -0
- package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +224 -0
- package/frontend-vue/layers/dms-layout/app/components/profile/ProfileLanguage.vue +71 -0
- package/frontend-vue/layers/dms-layout/app/components/profile/ProfileSessions.vue +321 -0
- package/frontend-vue/layers/dms-layout/app/components/profile/ProfileTwoFactor.vue +501 -0
- package/frontend-vue/layers/dms-layout/app/composables/favorites/useFavoritePages.ts +87 -0
- package/frontend-vue/layers/dms-layout/app/composables/general/types/index.ts +20 -0
- package/frontend-vue/layers/dms-layout/app/composables/general/useInterfaceScale.ts +12 -0
- package/frontend-vue/layers/dms-layout/app/composables/general/useSystemState.ts +43 -0
- package/frontend-vue/layers/dms-layout/app/composables/layout/stack-types.ts +24 -0
- package/frontend-vue/layers/dms-layout/app/composables/layout/useInfiniteScroll.ts +45 -0
- package/frontend-vue/layers/dms-layout/app/composables/notification/types/events.ts +6 -0
- package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +223 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useCurrentModule.ts +33 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useFirstAccessiblePage.ts +91 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useIsOwner.ts +6 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleHistory.ts +42 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useModulesListing.ts +88 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageComponentPreload.ts +67 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageLayout.ts +27 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageLeaveGuard.ts +14 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/usePrefetch.ts +21 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useQuickActions.ts +95 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useSiteLayout.ts +408 -0
- package/frontend-vue/layers/dms-layout/app/composables/useAppOverlay.ts +31 -0
- package/frontend-vue/layers/dms-layout/app/composables/useAppWidgets.ts +58 -0
- package/frontend-vue/layers/dms-layout/app/composables/useCommandPaletteSources.ts +171 -0
- package/frontend-vue/layers/dms-layout/app/composables/useDevReload.ts +401 -0
- package/frontend-vue/layers/dms-layout/app/composables/useFooterLinks.ts +32 -0
- package/frontend-vue/layers/dms-layout/app/composables/useHeaderActions.ts +72 -0
- package/frontend-vue/layers/dms-layout/app/composables/useSidebarWidgets.ts +144 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/DefaultLayout.vue +55 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/EmptyLayout.vue +23 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +114 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/settings/appearance.vue +174 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/settings/index.vue +164 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/settings/notifications.vue +15 -0
- package/frontend-vue/layers/dms-layout/app/custom-pages/settings/shortcuts.vue +136 -0
- package/frontend-vue/layers/dms-layout/app/emails/EmailAdminInvite.vue +32 -0
- package/frontend-vue/layers/dms-layout/app/emails/EmailExportReady.vue +45 -0
- package/frontend-vue/layers/dms-layout/app/emails/EmailResetPassword.vue +31 -0
- package/frontend-vue/layers/dms-layout/app/emails/EmailTwoFactor.vue +18 -0
- package/frontend-vue/layers/dms-layout/app/emails/EmailUserValidation.vue +30 -0
- package/frontend-vue/layers/dms-layout/app/emails/components/EmailButton.vue +21 -0
- package/frontend-vue/layers/dms-layout/app/emails/components/EmailLayout.vue +52 -0
- package/frontend-vue/layers/dms-layout/app/emails/components/EmailOTP.vue +22 -0
- package/frontend-vue/layers/dms-layout/app/emails/components/index.ts +93 -0
- package/frontend-vue/layers/dms-layout/app/error.vue +148 -0
- package/frontend-vue/layers/dms-layout/app/middleware/homepage-redirect.global.ts +11 -0
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +136 -0
- package/frontend-vue/layers/dms-layout/app/middleware/page-leave-guard.global.ts +14 -0
- package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +475 -0
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-navigation.client.ts +76 -0
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-personal-pages.client.ts +97 -0
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-quick-actions.client.ts +44 -0
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-session.client.ts +96 -0
- package/frontend-vue/layers/dms-layout/app/plugins/dms-dev-reload.client.ts +45 -0
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +45 -0
- package/frontend-vue/layers/dms-layout/app/plugins/interface-scale.ts +9 -0
- package/frontend-vue/layers/dms-layout/app/plugins/language-sync.ts +10 -0
- package/frontend-vue/layers/dms-layout/app/plugins/notification-stream.client.ts +61 -0
- package/frontend-vue/layers/dms-layout/app/plugins/profile-sync.client.ts +24 -0
- package/frontend-vue/layers/dms-layout/app/plugins/seo.ts +29 -0
- package/frontend-vue/layers/dms-layout/app/types/page-setup.ts +31 -0
- package/frontend-vue/layers/dms-layout/app/types/page.ts +129 -0
- package/frontend-vue/layers/dms-layout/app/utils/account-menu.ts +28 -0
- package/frontend-vue/layers/dms-layout/app/utils/dms-icons.ts +1 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +272 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +276 -0
- package/frontend-vue/layers/dms-layout/public/fonts/Geist-Italic-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/public/fonts/Geist-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/public/fonts/GeistMono-Italic-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/public/fonts/GeistMono-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/public/fonts/LICENSE.txt +92 -0
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/dark.svg +46 -0
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/icon.svg +29 -0
- package/frontend-vue/layers/dms-layout/public/images/antelope-logo/light.svg +46 -0
- package/frontend-vue/layers/dms-onboarding/app/components/onboarding/steps/register.vue +172 -0
- package/frontend-vue/layers/dms-onboarding/app/composables/onboarding/index.ts +1 -0
- package/frontend-vue/layers/dms-onboarding/app/composables/onboarding/useOnboardingMiddleware.ts +51 -0
- package/frontend-vue/layers/dms-onboarding/app/custom-pages/onboarding.vue +9 -0
- package/frontend-vue/layers/dms-onboarding/app/middleware/onboarding.global.ts +21 -0
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-en-GB.json +22 -0
- package/frontend-vue/layers/dms-onboarding/i18n/locales/onboarding-fr-FR.json +22 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/drawer/DynamicDrawer.vue +117 -0
- package/frontend-vue/layers/dms-ui/app/build/components/containers/modal/DynamicModal.vue +131 -0
- package/frontend-vue/layers/dms-ui/app/build/components/form/PermissionsTreeNode.vue +148 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/Actions.vue +258 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/Empty.vue +143 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/FiltersRow.vue +197 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/Menu.vue +133 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuColumns.vue +163 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuFilter.vue +371 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuImport.vue +71 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuPage.vue +60 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuRoot.vue +140 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuSort.vue +107 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/MenuViewMode.vue +115 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/Pagination.vue +111 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/RowSelection.vue +89 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/Table.vue +814 -0
- package/frontend-vue/layers/dms-ui/app/build/components/table/Tabs.vue +94 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerDefaults.ts +573 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/registerFormFunctions.ts +43 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/shortcuts/useShortcutRegistry.ts +31 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/constants.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/types.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTable.ts +181 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableColumns.ts +566 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableConfigClipboard.ts +124 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableContext.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useTableStates.ts +113 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/formatFilterValue.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table/utils/menuItemFactory.ts +25 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/registerDefaultFunctions.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/types.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewConfig.ts +130 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewRowActions.ts +826 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/tableQuery.ts +75 -0
- package/frontend-vue/layers/dms-ui/app/build/types/tree.ts +172 -0
- package/frontend-vue/layers/dms-ui/app/components/PasswordStrength.vue +62 -0
- package/frontend-vue/layers/dms-ui/app/components/Placeholder.vue +49 -0
- package/frontend-vue/layers/dms-ui/app/components/RecursiveComponent.vue +85 -0
- package/frontend-vue/layers/dms-ui/app/components/activity/ActivityItem.vue +64 -0
- package/frontend-vue/layers/dms-ui/app/components/banner/Banner.vue +90 -0
- package/frontend-vue/layers/dms-ui/app/components/card/Card.vue +37 -0
- package/frontend-vue/layers/dms-ui/app/components/card/NavCard.vue +45 -0
- package/frontend-vue/layers/dms-ui/app/components/chart/ApexChartHost.vue +84 -0
- package/frontend-vue/layers/dms-ui/app/components/chart/Chart.vue +325 -0
- package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +196 -0
- package/frontend-vue/layers/dms-ui/app/components/chart/internal/Sparkline.vue +119 -0
- package/frontend-vue/layers/dms-ui/app/components/chart/internal/TrendBadge.vue +57 -0
- package/frontend-vue/layers/dms-ui/app/components/confirm/ConfirmModal.vue +58 -0
- package/frontend-vue/layers/dms-ui/app/components/copy/CopyButton.vue +38 -0
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +501 -0
- package/frontend-vue/layers/dms-ui/app/components/form/Form.vue +533 -0
- package/frontend-vue/layers/dms-ui/app/components/form/LocalizedField.vue +151 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Calendar.vue +121 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Cascader.vue +482 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Checkbox.vue +18 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePicker.vue +151 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DatePickerRange.vue +61 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Display.vue +59 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayColor.vue +31 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayFile.vue +35 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayImage.vue +54 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayPassword.vue +28 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/DisplayRichText.vue +31 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/File.vue +433 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Image.vue +946 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputAddress.vue +525 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputColor.vue +57 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputEmail.vue +14 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputNumber.vue +22 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPassword.vue +110 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPercentage.vue +48 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputPhone.vue +18 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputText.vue +18 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputTime.vue +64 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputTree.vue +98 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/PermissionsTree.vue +133 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/RadioGroup.vue +24 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Relation.vue +424 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/RichText.vue +286 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Select.vue +118 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Slider.vue +13 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Switch.vue +18 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Textarea.vue +18 -0
- package/frontend-vue/layers/dms-ui/app/components/grid/Grid.vue +42 -0
- package/frontend-vue/layers/dms-ui/app/components/grid/GridRow.vue +28 -0
- package/frontend-vue/layers/dms-ui/app/components/grid/constants.ts +7 -0
- package/frontend-vue/layers/dms-ui/app/components/kpi/KpiCard.vue +163 -0
- package/frontend-vue/layers/dms-ui/app/components/master-detail/MasterDetail.vue +75 -0
- package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +308 -0
- package/frontend-vue/layers/dms-ui/app/components/segmented/Segmented.vue +106 -0
- package/frontend-vue/layers/dms-ui/app/components/status/StatusSummary.vue +118 -0
- package/frontend-vue/layers/dms-ui/app/components/tab/Tab.vue +82 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/CascaderPath.vue +78 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/ExportToastContent.vue +24 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/FilePreview.vue +57 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/ImagePreview.vue +78 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +486 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanDisplay.vue +70 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/PresenceEditModal.vue +142 -0
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +1143 -0
- package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +235 -0
- package/frontend-vue/layers/dms-ui/app/components/top-list/internal/TopListRow.vue +96 -0
- package/frontend-vue/layers/dms-ui/app/components/tree/Tree.vue +195 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexAnnotations.ts +74 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexLocales.ts +42 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexPlotOptions.ts +100 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/apexTypeConfigs.ts +109 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/events.ts +44 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/formatValue.ts +156 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/resolveSparklineAccent.ts +56 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/types.ts +145 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.ts +709 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/useApexChart.types.ts +80 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/useChartFetch.ts +204 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/useChartTheme.ts +119 -0
- package/frontend-vue/layers/dms-ui/app/composables/chart/useThemeRevision.ts +59 -0
- package/frontend-vue/layers/dms-ui/app/composables/confirm/index.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/composables/confirm/useConfirm.ts +24 -0
- package/frontend-vue/layers/dms-ui/app/composables/confirm/usePresenceEditWarning.ts +19 -0
- package/frontend-vue/layers/dms-ui/app/composables/containers/index.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/composables/containers/openDynamicContainer.ts +99 -0
- package/frontend-vue/layers/dms-ui/app/composables/containers/types.ts +43 -0
- package/frontend-vue/layers/dms-ui/app/composables/containers/useDrawer.ts +27 -0
- package/frontend-vue/layers/dms-ui/app/composables/containers/useModal.ts +27 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/api.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/content-language.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/events.ts +7 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/field-loading.ts +6 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/field.ts +28 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/functions.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/index.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/props.ts +29 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/validation.ts +7 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/types/value.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +543 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/useUploadWithProgress.ts +40 -0
- package/frontend-vue/layers/dms-ui/app/composables/resolveDmsComponent.ts +61 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/shortcuts/index.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/shortcuts/tabBuildShortcuts.ts +16 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/shortcuts/tabShortcuts.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/shortcuts/useTabShortcuts.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/types/composable.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/types/events.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/types/index.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/types/item.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/types/props.ts +25 -0
- package/frontend-vue/layers/dms-ui/app/composables/tab/useTab.ts +122 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/kanban.ts +151 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/index.ts +61 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewDelete.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewEscape.ts +24 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewMetaR.ts +9 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewShiftA.ts +41 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewShiftF.ts +18 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/shortcuts/tableViewShiftN.ts +22 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/action-target.ts +48 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/column.ts +39 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/config.ts +94 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/custom-button.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/display.ts +160 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/events.ts +23 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/functions.ts +3 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/types/index.ts +5 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/useTableViewDisplays.ts +66 -0
- package/frontend-vue/layers/dms-ui/app/composables/table-view/useTableViewExport.ts +49 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/index.ts +50 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeArrowDown.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeArrowUp.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeEnd.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeEnter.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeEscape.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeHome.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeShiftA.ts +32 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/shortcuts/treeSpace.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/types/events.ts +8 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/types/index.ts +4 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/types/navigation.ts +7 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/types/node.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/types/props.ts +34 -0
- package/frontend-vue/layers/dms-ui/app/composables/tree/useTree.ts +336 -0
- package/frontend-vue/layers/dms-ui/app/composables/useExportJob.ts +356 -0
- package/frontend-vue/layers/dms-ui/app/composables/useFileReadUrls.ts +105 -0
- package/frontend-vue/layers/dms-ui/app/composables/usePasswordStrength.ts +71 -0
- package/frontend-vue/layers/dms-ui/app/config/shortcuts-registry.ts +19 -0
- package/frontend-vue/layers/dms-ui/app/plugins/register.ts +9 -0
- package/frontend-vue/layers/dms-ui/app/plugins/shortcuts.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/plugins/table-view-displays.client.ts +31 -0
- package/frontend-vue/layers/dms-ui/app/types/modal.ts +9 -0
- package/frontend-vue/layers/dms-ui/app/types/quick-actions.ts +11 -0
- package/frontend-vue/layers/dms-ui/app/types/row-action.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/types/shortcuts.ts +16 -0
- package/frontend-vue/layers/dms-ui/app/types/table/base.ts +10 -0
- package/frontend-vue/layers/dms-ui/app/types/table/index.ts +2 -0
- package/frontend-vue/layers/dms-ui/app/types/table/query.ts +14 -0
- package/frontend-vue/layers/dms-ui/app/utils/cascader.ts +203 -0
- package/frontend-vue/layers/dms-ui/app/utils/fileConstraints.ts +47 -0
- package/frontend-vue/layers/dms-ui/app/utils/imageResize.ts +100 -0
- package/frontend-vue/layers/dms-ui/app/utils/rowClickAction.ts +48 -0
- package/frontend-vue/layers/dms-ui/app/utils/semanticTint.ts +21 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +460 -0
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +461 -0
- package/frontend-vue/package.json +93 -0
- package/frontend-vue/pnpm-lock.yaml +7008 -0
- package/frontend-vue/pnpm-workspace.yaml +9 -0
- package/frontend-vue/tests/api-message-i18n.test.ts +46 -0
- package/frontend-vue/tests/async-data-key-owners.test.ts +74 -0
- package/frontend-vue/tests/cascader.test.ts +189 -0
- package/frontend-vue/tests/chart-auto-y-range.test.ts +115 -0
- package/frontend-vue/tests/chart-click-payload.test.ts +34 -0
- package/frontend-vue/tests/chart-colors.browser.html +157 -0
- package/frontend-vue/tests/chart-colors.test.ts +177 -0
- package/frontend-vue/tests/chart-options.test.ts +281 -0
- package/frontend-vue/tests/chart-series-styles.test.ts +131 -0
- package/frontend-vue/tests/chart-value-precision.test.ts +54 -0
- package/frontend-vue/tests/chart-value-propagation.test.ts +156 -0
- package/frontend-vue/tests/command-palette-search-text.test.ts +118 -0
- package/frontend-vue/tests/dev-reload.test.ts +252 -0
- package/frontend-vue/tests/file-constraints.test.ts +72 -0
- package/frontend-vue/tests/file-read-urls.test.ts +135 -0
- package/frontend-vue/tests/fixtures/TableCellLayout.vue +73 -0
- package/frontend-vue/tests/fixtures/chart-axes.html +39 -0
- package/frontend-vue/tests/fixtures/chart-axes.ts +67 -0
- package/frontend-vue/tests/fixtures/chart-precision.html +37 -0
- package/frontend-vue/tests/fixtures/chart-precision.ts +118 -0
- package/frontend-vue/tests/fixtures/theming/app/app.vue +49 -0
- package/frontend-vue/tests/fixtures/theming/base/app/app.config.ts +1 -0
- package/frontend-vue/tests/fixtures/theming/config.ts +7 -0
- package/frontend-vue/tests/fixtures/theming/consumer/app/app.config.ts +15 -0
- package/frontend-vue/tests/fixtures/theming/consumer/public/brand/dark.svg +1 -0
- package/frontend-vue/tests/fixtures/theming/consumer/public/brand/icon.svg +1 -0
- package/frontend-vue/tests/fixtures/theming/consumer/public/brand/light.svg +1 -0
- package/frontend-vue/tests/fixtures/theming/consumer.css +19 -0
- package/frontend-vue/tests/fixtures/theming/index.html +11 -0
- package/frontend-vue/tests/fixtures/theming/main.ts +36 -0
- package/frontend-vue/tests/fixtures/theming/runtime.ts +12 -0
- package/frontend-vue/tests/fixtures/theming/vite.config.ts +36 -0
- package/frontend-vue/tests/form-required-fields.test.ts +88 -0
- package/frontend-vue/tests/form-reset.test.ts +66 -0
- package/frontend-vue/tests/image-reference-preservation.test.ts +234 -0
- package/frontend-vue/tests/menu-navigation.test.ts +106 -0
- package/frontend-vue/tests/multi-account-validate.test.ts +99 -0
- package/frontend-vue/tests/onboarding-register.test.ts +128 -0
- package/frontend-vue/tests/page-layout-background-refresh.test.ts +321 -0
- package/frontend-vue/tests/page-layout-registration.test.ts +70 -0
- package/frontend-vue/tests/period-presets.test.ts +96 -0
- package/frontend-vue/tests/period-relative-refresh.test.ts +61 -0
- package/frontend-vue/tests/period-scope-first-fetch.test.ts +276 -0
- package/frontend-vue/tests/post-login-redirect.test.ts +87 -0
- package/frontend-vue/tests/quick-actions.test.ts +32 -0
- package/frontend-vue/tests/realtime-auth-recovery.test.ts +146 -0
- package/frontend-vue/tests/sidebar-footer-navigation.test.ts +128 -0
- package/frontend-vue/tests/sidebar-widget-position.test.ts +117 -0
- package/frontend-vue/tests/site-layout-hydration.test.ts +82 -0
- package/frontend-vue/tests/site-layout-refresh.test.ts +131 -0
- package/frontend-vue/tests/sse-stream.test.ts +268 -0
- package/frontend-vue/tests/string-type-parser.test.ts +50 -0
- package/frontend-vue/tests/table-async-data-key.test.ts +33 -0
- package/frontend-vue/tests/table-cell-wrap.test.ts +44 -0
- package/frontend-vue/tests/table-row-hover.test.ts +153 -0
- package/frontend-vue/tests/theming-browser.mjs +130 -0
- package/frontend-vue/tests/trailing-deduper.test.ts +74 -0
- package/frontend-vue/tests/trend-delta-format.test.ts +24 -0
- package/frontend-vue/tests/vue-inventory.test.ts +92 -0
- package/frontend-vue/tests/widget-label-i18n.test.ts +179 -0
- package/frontend-vue/vitest.config.ts +20 -0
- package/package.json +127 -0
- package/skills/dms/REFERENCE.md +39 -0
- package/skills/dms/SKILL.md +98 -0
- package/skills/dms-auth/SKILL.md +105 -0
- package/skills/dms-dev/SKILL.md +107 -0
- package/skills/dms-dev/scripts/dms-dev.sh +198 -0
- package/skills/dms-module/REFERENCE.md +84 -0
- package/skills/dms-module/SKILL.md +104 -0
- package/skills/dms-pages/REFERENCE.md +27 -0
- package/skills/dms-pages/SKILL.md +110 -0
- package/skills/dms-project/REFERENCE.md +24 -0
- package/skills/dms-project/SKILL.md +122 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+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C,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,aAAa,CAAC,GAAG,EAAE,CAAC,IAAA,wBAAgB,EAAC,SAAS,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,aAAa,CAAC,GAAG,EAAE,CAAC,IAAA,wBAAgB,EAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,aAAa,CAAC,GAAG,EAAE,CAAC,IAAA,wBAAgB,EAAC,sBAAsB,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,IAAA,aAAM,EAAC,IAAA,8BAAsB,GAAE,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
4
|
+
const chai_1 = require("chai");
|
|
5
|
+
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
6
|
+
const index_1 = require("../../index");
|
|
7
|
+
const state_1 = require("../../routes/auth/oauth/state");
|
|
8
|
+
const HTTP_BAD_REQUEST = 400;
|
|
9
|
+
const INVALID_STATE_MESSAGE = "error.oauth.invalid_state";
|
|
10
|
+
function expectRejection(run) {
|
|
11
|
+
try {
|
|
12
|
+
run();
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
(0, chai_1.expect)(error).to.be.instanceOf(interface_api_1.HTTPResult);
|
|
16
|
+
(0, chai_1.expect)(error.getStatus()).to.equal(HTTP_BAD_REQUEST);
|
|
17
|
+
(0, chai_1.expect)(error.getBody()).to.equal(INVALID_STATE_MESSAGE);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
chai_1.expect.fail("expected the state to be rejected");
|
|
21
|
+
}
|
|
22
|
+
describe("[unit] oauth state", () => {
|
|
23
|
+
it("accepts the state the browser handed back untouched", () => {
|
|
24
|
+
const state = (0, state_1.signOAuthState)("github");
|
|
25
|
+
(0, chai_1.expect)(() => (0, state_1.assertValidOAuthState)(state, state, "github")).to.not.throw();
|
|
26
|
+
});
|
|
27
|
+
it("mints a distinct state per flow", () => {
|
|
28
|
+
(0, chai_1.expect)((0, state_1.signOAuthState)("github")).to.not.equal((0, state_1.signOAuthState)("github"));
|
|
29
|
+
});
|
|
30
|
+
it("consumes the state: the same state cannot complete two logins", () => {
|
|
31
|
+
const state = (0, state_1.signOAuthState)("github");
|
|
32
|
+
(0, state_1.assertValidOAuthState)(state, state, "github");
|
|
33
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(state, state, "github"));
|
|
34
|
+
});
|
|
35
|
+
it("rejects a state the browser never stored", () => {
|
|
36
|
+
const state = (0, state_1.signOAuthState)("github");
|
|
37
|
+
const otherState = (0, state_1.signOAuthState)("github");
|
|
38
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(state, otherState, "github"));
|
|
39
|
+
});
|
|
40
|
+
it("rejects a missing browser state", () => {
|
|
41
|
+
const state = (0, state_1.signOAuthState)("github");
|
|
42
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(state, "", "github"));
|
|
43
|
+
});
|
|
44
|
+
it("rejects a state minted for another provider", () => {
|
|
45
|
+
const state = (0, state_1.signOAuthState)("google");
|
|
46
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(state, state, "github"));
|
|
47
|
+
});
|
|
48
|
+
it("rejects a tampered state", () => {
|
|
49
|
+
const state = `${(0, state_1.signOAuthState)("github")}tampered`;
|
|
50
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(state, state, "github"));
|
|
51
|
+
});
|
|
52
|
+
it("rejects a state signed with the plain instance secret", () => {
|
|
53
|
+
const forged = (0, jsonwebtoken_1.sign)({ provider: "github", nonce: "1", purpose: "oauth-state" }, (0, index_1.getAuthConfig)().jwtSecret);
|
|
54
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(forged, forged, "github"));
|
|
55
|
+
});
|
|
56
|
+
it("rejects a token signed for another purpose", () => {
|
|
57
|
+
const forged = (0, jsonwebtoken_1.sign)({ provider: "github", nonce: "1", purpose: "2fa" }, `oauth-state:${(0, index_1.getAuthConfig)().jwtSecret}`);
|
|
58
|
+
expectRejection(() => (0, state_1.assertValidOAuthState)(forged, forged, "github"));
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=oauth-state.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-state.test.js","sourceRoot":"","sources":["../../../src/test/unit/oauth-state.test.ts"],"names":[],"mappings":";;AAAA,6DAAuD;AACvD,+BAA8B;AAC9B,+CAAoC;AACpC,uCAA4C;AAC5C,yDAGuC;AAEvC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAE1D,SAAS,eAAe,CAAC,GAAkB;IACzC,IAAI,CAAC;QACH,GAAG,EAAE,CAAC;IACR,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,0BAAU,CAAC,CAAC;QAC3C,IAAA,aAAM,EAAE,KAAoB,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACrE,IAAA,aAAM,EAAE,KAAoB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CA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E,OAAO,EAAE,KAAK,EAAE,EAClD,eAAe,IAAA,qBAAa,GAAE,CAAC,SAAS,EAAE,CAC3C,CAAC;QACF,eAAe,CAAC,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
4
|
+
const chai_1 = require("chai");
|
|
5
|
+
const request_tenant_1 = require("@antelopejs/interface-dms/request-tenant");
|
|
6
|
+
const request_authenticators_1 = require("@antelopejs/interface-dms/auth/request-authenticators");
|
|
7
|
+
const UNAUTHORIZED = 401;
|
|
8
|
+
const TENANT = "credential-tenant";
|
|
9
|
+
const USER_ID = "credential-user";
|
|
10
|
+
function context(authorization = "Bearer opaque.secret") {
|
|
11
|
+
return { rawRequest: { headers: { authorization } } };
|
|
12
|
+
}
|
|
13
|
+
function principal(tenantId = TENANT, userId = USER_ID) {
|
|
14
|
+
return { tenantId, user: { _id: userId } };
|
|
15
|
+
}
|
|
16
|
+
function handler(authenticate = async () => principal()) {
|
|
17
|
+
return { recognizes: (token) => token.startsWith("opaque."), authenticate };
|
|
18
|
+
}
|
|
19
|
+
async function expectUnauthorized(action) {
|
|
20
|
+
try {
|
|
21
|
+
await action();
|
|
22
|
+
chai_1.expect.fail("Expected authentication failure");
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
(0, chai_1.expect)(error).to.be.instanceOf(interface_api_1.HTTPResult);
|
|
26
|
+
(0, chai_1.expect)(error.getStatus()).to.equal(UNAUTHORIZED);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
describe("[unit] request authenticators", () => {
|
|
30
|
+
let jwtCalls = 0;
|
|
31
|
+
const jwt = async () => {
|
|
32
|
+
jwtCalls++;
|
|
33
|
+
return principal("jwt-tenant");
|
|
34
|
+
};
|
|
35
|
+
beforeEach(() => {
|
|
36
|
+
jwtCalls = 0;
|
|
37
|
+
});
|
|
38
|
+
it("binds tenant to the verified credential across context wrappers", async () => {
|
|
39
|
+
const ctx = context();
|
|
40
|
+
const result = await (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [handler()], jwt);
|
|
41
|
+
result.tenantId = "tampered";
|
|
42
|
+
(0, chai_1.expect)((0, request_tenant_1.getRequestTenantId)({ ...ctx })).to.equal(TENANT);
|
|
43
|
+
(0, chai_1.expect)(jwtCalls).to.equal(0);
|
|
44
|
+
});
|
|
45
|
+
it("uses JWT only when no handler recognizes the credential", async () => {
|
|
46
|
+
const ctx = context("Bearer jwt");
|
|
47
|
+
await (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [handler()], jwt);
|
|
48
|
+
(0, chai_1.expect)((0, request_tenant_1.getRequestTenantId)(ctx)).to.equal("jwt-tenant");
|
|
49
|
+
(0, chai_1.expect)(jwtCalls).to.equal(1);
|
|
50
|
+
});
|
|
51
|
+
it("serializes concurrent validations without caching their result", async () => {
|
|
52
|
+
const ctx = context();
|
|
53
|
+
let attempts = 0;
|
|
54
|
+
const candidate = handler(async () => {
|
|
55
|
+
attempts++;
|
|
56
|
+
return principal();
|
|
57
|
+
});
|
|
58
|
+
await Promise.all([
|
|
59
|
+
(0, request_authenticators_1.resolveRequestPrincipal)(ctx, [candidate], jwt),
|
|
60
|
+
(0, request_authenticators_1.resolveRequestPrincipal)(ctx, [candidate], jwt),
|
|
61
|
+
]);
|
|
62
|
+
(0, chai_1.expect)(attempts).to.equal(2);
|
|
63
|
+
(0, chai_1.expect)((0, request_tenant_1.getRequestTenantId)(ctx)).to.equal(TENANT);
|
|
64
|
+
});
|
|
65
|
+
it("propagates a concurrent recognized failure without JWT downgrade", async () => {
|
|
66
|
+
const ctx = context();
|
|
67
|
+
const candidate = handler(async () => {
|
|
68
|
+
throw new interface_api_1.HTTPResult(UNAUTHORIZED);
|
|
69
|
+
});
|
|
70
|
+
await Promise.all([
|
|
71
|
+
expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [candidate], jwt)),
|
|
72
|
+
expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [], jwt)),
|
|
73
|
+
]);
|
|
74
|
+
(0, chai_1.expect)(jwtCalls).to.equal(0);
|
|
75
|
+
(0, chai_1.expect)(() => (0, request_tenant_1.getRequestTenantId)(ctx)).to.throw();
|
|
76
|
+
});
|
|
77
|
+
it("never falls back after recognized malformed, revoked or failed credentials", async () => {
|
|
78
|
+
const ctx = context("Bearer opaque.malformed");
|
|
79
|
+
const rejected = handler(async () => {
|
|
80
|
+
throw new interface_api_1.HTTPResult(UNAUTHORIZED);
|
|
81
|
+
});
|
|
82
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [rejected], jwt));
|
|
83
|
+
(0, chai_1.expect)(() => (0, request_tenant_1.getRequestTenantId)(ctx)).to.throw();
|
|
84
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [], jwt));
|
|
85
|
+
(0, chai_1.expect)(jwtCalls).to.equal(0);
|
|
86
|
+
});
|
|
87
|
+
it("rejects ambiguous handlers without attempting either authentication", async () => {
|
|
88
|
+
let attempts = 0;
|
|
89
|
+
const candidate = handler(async () => {
|
|
90
|
+
attempts++;
|
|
91
|
+
return principal();
|
|
92
|
+
});
|
|
93
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(context(), [candidate, candidate], jwt));
|
|
94
|
+
(0, chai_1.expect)(attempts).to.equal(0);
|
|
95
|
+
(0, chai_1.expect)(jwtCalls).to.equal(0);
|
|
96
|
+
});
|
|
97
|
+
for (const authorization of [
|
|
98
|
+
"",
|
|
99
|
+
"Basic opaque.secret",
|
|
100
|
+
"Bearer opaque.secret extra",
|
|
101
|
+
]) {
|
|
102
|
+
it(`rejects malformed authorization: ${authorization}`, async () => {
|
|
103
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(context(authorization), [handler()], jwt));
|
|
104
|
+
(0, chai_1.expect)(jwtCalls).to.equal(0);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
it("rejects a missing authenticated tenant rather than selecting the default tenant", async () => {
|
|
108
|
+
const ctx = context();
|
|
109
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [handler(async () => principal(""))], jwt));
|
|
110
|
+
(0, chai_1.expect)(() => (0, request_tenant_1.getRequestTenantId)(ctx)).to.throw();
|
|
111
|
+
});
|
|
112
|
+
it("revalidates long-lived requests and makes revocation terminal", async () => {
|
|
113
|
+
const ctx = context();
|
|
114
|
+
let revoked = false;
|
|
115
|
+
let attempts = 0;
|
|
116
|
+
const candidate = handler(async () => {
|
|
117
|
+
attempts++;
|
|
118
|
+
if (revoked)
|
|
119
|
+
throw new interface_api_1.HTTPResult(UNAUTHORIZED);
|
|
120
|
+
return principal();
|
|
121
|
+
});
|
|
122
|
+
await (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [candidate], jwt);
|
|
123
|
+
await (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [candidate], jwt);
|
|
124
|
+
revoked = true;
|
|
125
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [candidate], jwt));
|
|
126
|
+
(0, chai_1.expect)(attempts).to.equal(3);
|
|
127
|
+
(0, chai_1.expect)(() => (0, request_tenant_1.getRequestTenantId)(ctx)).to.throw();
|
|
128
|
+
(0, chai_1.expect)(jwtCalls).to.equal(0);
|
|
129
|
+
});
|
|
130
|
+
for (const changed of [
|
|
131
|
+
principal("other-tenant"),
|
|
132
|
+
principal(TENANT, "other-user"),
|
|
133
|
+
]) {
|
|
134
|
+
it(`rejects principal reassignment to ${changed.tenantId}/${changed.user._id}`, async () => {
|
|
135
|
+
const ctx = context();
|
|
136
|
+
await (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [handler()], jwt);
|
|
137
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [handler(async () => changed)], jwt));
|
|
138
|
+
(0, chai_1.expect)(() => (0, request_tenant_1.getRequestTenantId)(ctx)).to.throw();
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
it("does not reuse another request's identity or a changed header", async () => {
|
|
142
|
+
const ctx = context();
|
|
143
|
+
await (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [handler()], jwt);
|
|
144
|
+
const unrelated = context("Bearer jwt");
|
|
145
|
+
await (0, request_authenticators_1.resolveRequestPrincipal)(unrelated, [], jwt);
|
|
146
|
+
(0, chai_1.expect)((0, request_tenant_1.getRequestTenantId)(unrelated)).to.equal("jwt-tenant");
|
|
147
|
+
ctx.rawRequest.headers.authorization = "Bearer jwt";
|
|
148
|
+
(0, chai_1.expect)(() => (0, request_tenant_1.getRequestTenantId)(ctx)).to.throw();
|
|
149
|
+
await expectUnauthorized(() => (0, request_authenticators_1.resolveRequestPrincipal)(ctx, [], jwt));
|
|
150
|
+
(0, chai_1.expect)(jwtCalls).to.equal(1);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
//# sourceMappingURL=request-authenticators.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-authenticators.test.js","sourceRoot":"","sources":["../../../src/test/unit/request-authenticators.test.ts"],"names":[],"mappings":";;AACA,6DAAuD;AACvD,+BAA8B;AAC9B,6EAA8E;AAE9E,kGAI+D;AAE/D,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,MAAM,GAAG,mBAAmB,CAAC;AACnC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAElC,SAAS,OAAO,CAAC,aAAa,GAAG,sBAAsB;IACrD,OAAO,EAAE,UAAU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AO,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;QACrD,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;QACxC,MAAM,IAAA,gDAAuB,EAAC,SAAS,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QAClD,IAAA,aAAM,EAAC,IAAA,mCAAkB,EAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC7D,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,aAAa,GAAG,YAAY,CAAC;QACpD,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,IAAA,mCAAkB,EAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;QACjD,MAAM,kBAAkB,CAAC,GAAG,EAAE,CAAC,IAAA,gDAAuB,EAAC,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;QACtE,IAAA,aAAM,EAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
4
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
5
|
+
const chai_1 = require("chai");
|
|
6
|
+
const dms_auth_1 = require("../../implementations/dms-auth");
|
|
7
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
8
|
+
const guards_1 = require("@antelopejs/interface-dms/guards");
|
|
9
|
+
const request_tenant_1 = require("@antelopejs/interface-dms/request-tenant");
|
|
10
|
+
const tenant_access_1 = require("@antelopejs/interface-dms/tenant-access");
|
|
11
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
12
|
+
const db_2 = require("@antelopejs/interface-dms/auth/db");
|
|
13
|
+
const page_access_1 = require("../helpers/page-access");
|
|
14
|
+
const TENANT = "request-guard-tenant";
|
|
15
|
+
const OTHER_TENANT = "request-guard-other";
|
|
16
|
+
const USER_ID = "request-guard-user";
|
|
17
|
+
const MEMBER_ID = "request-guard-member";
|
|
18
|
+
const AUTH_KEY = "request-guard-key";
|
|
19
|
+
const HTTP_UNAUTHORIZED = 401;
|
|
20
|
+
const HTTP_FORBIDDEN = 403;
|
|
21
|
+
const gate = (0, page_access_1.denyingTenantGate)("request-guard-gate", TENANT);
|
|
22
|
+
function context(token) {
|
|
23
|
+
return {
|
|
24
|
+
rawRequest: { headers: { authorization: `Bearer ${token}` } },
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
async function expectStatus(action, status) {
|
|
28
|
+
try {
|
|
29
|
+
await action();
|
|
30
|
+
chai_1.expect.fail("Expected guard rejection");
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
(0, chai_1.expect)(error).to.be.instanceOf(interface_api_1.HTTPResult);
|
|
34
|
+
(0, chai_1.expect)(error.getStatus()).to.equal(status);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
describe("[unit] request tenant guards — JWT and custom credentials", () => {
|
|
38
|
+
let user;
|
|
39
|
+
let jwt;
|
|
40
|
+
const authenticator = {
|
|
41
|
+
recognizes: (token) => token.startsWith("opaque."),
|
|
42
|
+
authenticate: async () => ({ user, tenantId: TENANT }),
|
|
43
|
+
};
|
|
44
|
+
const options = { authenticators: [authenticator] };
|
|
45
|
+
before(async () => {
|
|
46
|
+
await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).insert({
|
|
47
|
+
_id: USER_ID,
|
|
48
|
+
email: "request-guard@test.local",
|
|
49
|
+
name: "Request guard",
|
|
50
|
+
authKey: AUTH_KEY,
|
|
51
|
+
isValidated: true,
|
|
52
|
+
language: "en",
|
|
53
|
+
password: null,
|
|
54
|
+
});
|
|
55
|
+
const stored = await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).get(USER_ID);
|
|
56
|
+
if (!stored)
|
|
57
|
+
throw new Error("Missing guard test user");
|
|
58
|
+
user = stored;
|
|
59
|
+
jwt = (0, dms_auth_1.generateAccessToken)(TENANT, user).token;
|
|
60
|
+
await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, TENANT).insert({
|
|
61
|
+
_id: MEMBER_ID,
|
|
62
|
+
userId: USER_ID,
|
|
63
|
+
roleIds: [],
|
|
64
|
+
isTenantOwner: false,
|
|
65
|
+
joinedAt: new Date(),
|
|
66
|
+
invitedBy: null,
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
afterEach(() => {
|
|
70
|
+
tenant_access_1.internal.RegisterTenantAccessGate.unregister(gate);
|
|
71
|
+
});
|
|
72
|
+
it("preserves JWT authentication and binds its verified tenant", async () => {
|
|
73
|
+
(0, chai_1.expect)((await (0, auth_1.authenticateRequestUser)(context(jwt)))._id).to.equal(USER_ID);
|
|
74
|
+
const ctx = context(jwt);
|
|
75
|
+
(0, chai_1.expect)((await (0, guards_1.authenticateTenantRequest)(ctx))._id).to.equal(USER_ID);
|
|
76
|
+
(0, chai_1.expect)((0, request_tenant_1.getRequestTenantId)(ctx)).to.equal(TENANT);
|
|
77
|
+
(0, chai_1.expect)((await (0, guards_1.authenticateTenantRequest)(context(jwt), options))._id).to.equal(USER_ID);
|
|
78
|
+
});
|
|
79
|
+
it("rejects tampered JWT signatures and auth-key revocation", async () => {
|
|
80
|
+
const parts = jwt.split(".");
|
|
81
|
+
parts[2] = "invalid";
|
|
82
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(context(parts.join("."))), HTTP_UNAUTHORIZED);
|
|
83
|
+
await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).update(USER_ID, { authKey: "rotated" });
|
|
84
|
+
try {
|
|
85
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(context(jwt)), HTTP_UNAUTHORIZED);
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
await (0, interface_database_decorators_1.GetModel)(db_2.UserModel).update(USER_ID, { authKey: AUTH_KEY });
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
it("does not enable opaque credentials on JWT-only routes", async () => {
|
|
92
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(context("opaque.secret")), HTTP_UNAUTHORIZED);
|
|
93
|
+
});
|
|
94
|
+
it("does not turn successful authentication into tenant membership", async () => {
|
|
95
|
+
const foreign = {
|
|
96
|
+
...authenticator,
|
|
97
|
+
authenticate: async () => ({ user, tenantId: OTHER_TENANT }),
|
|
98
|
+
};
|
|
99
|
+
(0, chai_1.expect)((await (0, auth_1.authenticateRequestPrincipal)(context("opaque.secret"), [foreign]))
|
|
100
|
+
.user._id).to.equal(USER_ID);
|
|
101
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(context("opaque.secret"), {
|
|
102
|
+
authenticators: [foreign],
|
|
103
|
+
}), HTTP_FORBIDDEN);
|
|
104
|
+
});
|
|
105
|
+
it("requires current ownership for both credential paths", async () => {
|
|
106
|
+
for (const token of [jwt, "opaque.secret"]) {
|
|
107
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(context(token), {
|
|
108
|
+
...options,
|
|
109
|
+
requireOwner: true,
|
|
110
|
+
}), HTTP_FORBIDDEN);
|
|
111
|
+
}
|
|
112
|
+
await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, TENANT).update(MEMBER_ID, {
|
|
113
|
+
isTenantOwner: true,
|
|
114
|
+
});
|
|
115
|
+
try {
|
|
116
|
+
(0, chai_1.expect)((await (0, guards_1.authenticateTenantRequest)(context(jwt), { requireOwner: true }))
|
|
117
|
+
._id).to.equal(USER_ID);
|
|
118
|
+
(0, chai_1.expect)((await (0, guards_1.authenticateTenantRequest)(context("opaque.secret"), {
|
|
119
|
+
...options,
|
|
120
|
+
requireOwner: true,
|
|
121
|
+
}))._id).to.equal(USER_ID);
|
|
122
|
+
}
|
|
123
|
+
finally {
|
|
124
|
+
await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, TENANT).update(MEMBER_ID, {
|
|
125
|
+
isTenantOwner: false,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
it("rechecks tenant gates on long-lived requests; bypass does not bypass ownership", async () => {
|
|
130
|
+
const ctx = context("opaque.secret");
|
|
131
|
+
await (0, guards_1.authenticateTenantRequest)(ctx, options);
|
|
132
|
+
(0, tenant_access_1.RegisterTenantAccessGate)(gate);
|
|
133
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(ctx, options), HTTP_FORBIDDEN);
|
|
134
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(context(jwt)), HTTP_FORBIDDEN);
|
|
135
|
+
(0, chai_1.expect)((await (0, guards_1.authenticateTenantRequest)(ctx, {
|
|
136
|
+
...options,
|
|
137
|
+
bypassTenantAccessGate: true,
|
|
138
|
+
}))._id).to.equal(USER_ID);
|
|
139
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(ctx, {
|
|
140
|
+
...options,
|
|
141
|
+
requireOwner: true,
|
|
142
|
+
bypassTenantAccessGate: true,
|
|
143
|
+
}), HTTP_FORBIDDEN);
|
|
144
|
+
});
|
|
145
|
+
it("rechecks removed membership on long-lived requests", async () => {
|
|
146
|
+
const ctx = context("opaque.secret");
|
|
147
|
+
await (0, guards_1.authenticateTenantRequest)(ctx, options);
|
|
148
|
+
await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, TENANT).update(MEMBER_ID, {
|
|
149
|
+
userId: "removed-user",
|
|
150
|
+
});
|
|
151
|
+
try {
|
|
152
|
+
await expectStatus(() => (0, guards_1.authenticateTenantRequest)(ctx, options), HTTP_FORBIDDEN);
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, TENANT).update(MEMBER_ID, {
|
|
156
|
+
userId: USER_ID,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=request-tenant-guards.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-tenant-guards.test.js","sourceRoot":"","sources":["../../../src/test/unit/request-tenant-guards.test.ts"],"names":[],"mappings":";;AAAA,6DAA4E;AAC5E,6FAAqE;AACrE,+BAA8B;AAC9B,6DAAqE;AACrE,qDAAiE;AACjE,6DAA6E;AAC7E,6EAA8E;AAC9E,2EAGiD;AACjD,yDAIwC;AACxC,0DAAyE;AACzE,wDAA2D;AAE3D,MAAM,MAAM,GAAG,sBAAsB,CAAC;AACtC,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAC3C,MAAM,OAAO,GAAG,oBAAoB,CAAC;AACrC,MAAM,SAAS,GAAG,sBAAsB,CAAC;AACzC,MAAM,QAAQ,GAAG,mBAAmB,CAAC;AACrC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,IAAI,GAAG,IAAA,+BAAiB,EAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;AAE7D,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO;QACL,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,KAAK,EAAE,EAAE,EAAE;KAC5C,CAAC;AACtB,CAAC;AAED,KAAK,UAAU,YAAY,CACzB,MAA8B,EAC9B,MAAc;IAEd,IAAI,CAAC;QACH,MAAM,MAAM,EAAE,CAAC;QACf,aAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAA,aAAM,EAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,0BAAU,CAAC,CAAC;QAC3C,I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AChB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
4
|
+
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
5
|
+
const chai_1 = require("chai");
|
|
6
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
7
|
+
const signup_1 = require("../../routes/auth/signup");
|
|
8
|
+
const fixtures_1 = require("../helpers/fixtures");
|
|
9
|
+
const HTTP_BAD_REQUEST = 400;
|
|
10
|
+
const EMAIL_TAKEN = "error.email_already_used";
|
|
11
|
+
const INVALID_TOKEN = "error.invalid_token";
|
|
12
|
+
const WORKSPACE_ID = "signup-guard-workspace";
|
|
13
|
+
const UNKNOWN_INVITE_TOKEN = "00000000-0000-0000-0000-000000000000";
|
|
14
|
+
const INVITEE_NAME = "Invitee";
|
|
15
|
+
const INVITEE_PASSWORD = "InviteePassw0rd!";
|
|
16
|
+
const HOLDER_NAME = "Rightful Holder";
|
|
17
|
+
const HOLDER_PASSWORD = "holder-password-hash";
|
|
18
|
+
const HOLDER_AUTH_KEY = "holder-auth-key";
|
|
19
|
+
const USER_AGENT = "signup-guard-test";
|
|
20
|
+
const IP = "127.0.0.1";
|
|
21
|
+
function buildAccount(id, email, isValidated) {
|
|
22
|
+
return {
|
|
23
|
+
_id: id,
|
|
24
|
+
email,
|
|
25
|
+
name: HOLDER_NAME,
|
|
26
|
+
password: HOLDER_PASSWORD,
|
|
27
|
+
authKey: HOLDER_AUTH_KEY,
|
|
28
|
+
isValidated,
|
|
29
|
+
language: "en",
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
async function joinWorkspace(userId) {
|
|
33
|
+
await (0, interface_database_decorators_1.GetModel)(db_1.TenantMemberModel, WORKSPACE_ID).insert({
|
|
34
|
+
_id: `${WORKSPACE_ID}:${userId}`,
|
|
35
|
+
userId,
|
|
36
|
+
roleIds: [],
|
|
37
|
+
isTenantOwner: false,
|
|
38
|
+
joinedAt: new Date(),
|
|
39
|
+
invitedBy: null,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async function attemptSignup(existingUser, token, claimedEmail = existingUser.email) {
|
|
43
|
+
const updatedUsers = [];
|
|
44
|
+
const userModel = {
|
|
45
|
+
getByEmail: async (lookup) => lookup === existingUser.email ? existingUser : undefined,
|
|
46
|
+
get: async () => existingUser,
|
|
47
|
+
getOwners: async () => [],
|
|
48
|
+
update: async (user) => {
|
|
49
|
+
updatedUsers.push(user);
|
|
50
|
+
},
|
|
51
|
+
insert: async () => {
|
|
52
|
+
throw new Error("signup must not create a second account");
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
try {
|
|
56
|
+
await (0, signup_1.signup)(userModel, {}, {
|
|
57
|
+
name: INVITEE_NAME,
|
|
58
|
+
email: claimedEmail,
|
|
59
|
+
password: INVITEE_PASSWORD,
|
|
60
|
+
lang: "en",
|
|
61
|
+
token,
|
|
62
|
+
}, USER_AGENT, IP);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
return { error, updatedUsers };
|
|
66
|
+
}
|
|
67
|
+
return { error: undefined, updatedUsers };
|
|
68
|
+
}
|
|
69
|
+
function expectRefusal(attempt, message) {
|
|
70
|
+
(0, chai_1.expect)(attempt.error).to.be.instanceOf(interface_api_1.HTTPResult);
|
|
71
|
+
const refusal = attempt.error;
|
|
72
|
+
(0, chai_1.expect)(refusal.getStatus()).to.equal(HTTP_BAD_REQUEST);
|
|
73
|
+
(0, chai_1.expect)(refusal.getBody()).to.equal(message);
|
|
74
|
+
}
|
|
75
|
+
describe("[unit] auth/signup — overwriting an existing account", () => {
|
|
76
|
+
it("refuses an unvalidated account that already belongs to a workspace", async () => {
|
|
77
|
+
const provisioned = buildAccount("signup-guard-provisioned", "provisioned@acme.dev", false);
|
|
78
|
+
await joinWorkspace(provisioned._id);
|
|
79
|
+
const { token } = await (0, fixtures_1.seedUserInvite)({ email: provisioned.email });
|
|
80
|
+
const attempt = await attemptSignup(provisioned, token);
|
|
81
|
+
expectRefusal(attempt, EMAIL_TAKEN);
|
|
82
|
+
(0, chai_1.expect)(attempt.updatedUsers).to.deep.equal([]);
|
|
83
|
+
(0, chai_1.expect)(provisioned.name).to.equal(HOLDER_NAME);
|
|
84
|
+
(0, chai_1.expect)(provisioned.password).to.equal(HOLDER_PASSWORD);
|
|
85
|
+
(0, chai_1.expect)(provisioned.authKey).to.equal(HOLDER_AUTH_KEY);
|
|
86
|
+
});
|
|
87
|
+
it("refuses the same address claimed in another case", async () => {
|
|
88
|
+
const provisioned = buildAccount("signup-guard-mixed-case", "mixed-case@acme.dev", false);
|
|
89
|
+
await joinWorkspace(provisioned._id);
|
|
90
|
+
const { token } = await (0, fixtures_1.seedUserInvite)({ email: provisioned.email });
|
|
91
|
+
const attempt = await attemptSignup(provisioned, token, "Mixed-Case@Acme.dev");
|
|
92
|
+
expectRefusal(attempt, EMAIL_TAKEN);
|
|
93
|
+
(0, chai_1.expect)(attempt.updatedUsers).to.deep.equal([]);
|
|
94
|
+
});
|
|
95
|
+
it("keeps refusing a validated account", async () => {
|
|
96
|
+
const validated = buildAccount("signup-guard-validated", "validated@acme.dev", true);
|
|
97
|
+
const { token } = await (0, fixtures_1.seedUserInvite)({ email: validated.email });
|
|
98
|
+
const attempt = await attemptSignup(validated, token);
|
|
99
|
+
expectRefusal(attempt, EMAIL_TAKEN);
|
|
100
|
+
(0, chai_1.expect)(attempt.updatedUsers).to.deep.equal([]);
|
|
101
|
+
});
|
|
102
|
+
it("still takes over a genuine draft: unvalidated and in no workspace", async () => {
|
|
103
|
+
const draft = buildAccount("signup-guard-draft", "draft@acme.dev", false);
|
|
104
|
+
const { token } = await (0, fixtures_1.seedUserInvite)({ email: draft.email });
|
|
105
|
+
const attempt = await attemptSignup(draft, token);
|
|
106
|
+
(0, chai_1.expect)(attempt.error).to.not.be.instanceOf(interface_api_1.HTTPResult);
|
|
107
|
+
(0, chai_1.expect)(attempt.updatedUsers.map((user) => user.name)).to.include(INVITEE_NAME);
|
|
108
|
+
(0, chai_1.expect)(draft.authKey).to.not.equal(HOLDER_AUTH_KEY);
|
|
109
|
+
});
|
|
110
|
+
it("stores the taken-over draft under the canonical address", async () => {
|
|
111
|
+
const draft = buildAccount("signup-guard-draft-case", "draft-case@acme.dev", false);
|
|
112
|
+
const { token } = await (0, fixtures_1.seedUserInvite)({ email: draft.email });
|
|
113
|
+
await attemptSignup(draft, token, "Draft-Case@Acme.dev");
|
|
114
|
+
(0, chai_1.expect)(draft.email).to.equal("draft-case@acme.dev");
|
|
115
|
+
});
|
|
116
|
+
it("settles the invitation before disclosing that the address is taken", async () => {
|
|
117
|
+
const provisioned = buildAccount("signup-guard-probed", "probed@acme.dev", false);
|
|
118
|
+
await joinWorkspace(provisioned._id);
|
|
119
|
+
const attempt = await attemptSignup(provisioned, UNKNOWN_INVITE_TOKEN);
|
|
120
|
+
expectRefusal(attempt, INVALID_TOKEN);
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=signup-account-guard.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup-account-guard.test.js","sourceRoot":"","sources":["../../../src/test/unit/signup-account-guard.test.ts"],"names":[],"mappings":";;AAAA,6DAAuD;AACvD,6FAAqE;AACrE,+BAA8B;AAC9B,qDAAiE;AAMjE,qDAAkD;AAClD,kDAAqD;AAErD,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAC/C,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAI5C,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAC9C,MAAM,oBAAoB,GAAG,sCAAsC,CAAC;AACpE,MAAM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EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;QACvE,MAAM,KAAK,GAAG,YAAY,CACxB,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,CACN,CAAC;QACF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAA,yBAAc,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QAE/D,MAAM,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC;QAEzD,IAAA,aAAM,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAIH,EAAE,CAAC,oEAAoE,EAAE,KAAK,IAAI,EAAE;QAClF,MAAM,WAAW,GAAG,YAAY,CAC9B,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,CACN,CAAC;QACF,MAAM,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAErC,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;QAEvE,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chai_1 = require("chai");
|
|
4
|
+
const upload_constraints_1 = require("../../utils/upload-constraints");
|
|
5
|
+
describe("[unit] upload-constraints", () => {
|
|
6
|
+
describe("buildUploadConstraints", () => {
|
|
7
|
+
it("caps size and restricts mimetypes when both are configured", () => {
|
|
8
|
+
const constraints = (0, upload_constraints_1.buildUploadConstraints)({
|
|
9
|
+
maxSize: 1024,
|
|
10
|
+
allowedMimetypes: ["image/png"],
|
|
11
|
+
});
|
|
12
|
+
(0, chai_1.expect)(constraints.maxSize).to.equal(1024);
|
|
13
|
+
(0, chai_1.expect)(constraints.allowedMimetypes).to.deep.equal(["image/png"]);
|
|
14
|
+
});
|
|
15
|
+
it("omits maxSize when it is 0 (unlimited opt-out)", () => {
|
|
16
|
+
const constraints = (0, upload_constraints_1.buildUploadConstraints)({
|
|
17
|
+
maxSize: 0,
|
|
18
|
+
allowedMimetypes: [],
|
|
19
|
+
});
|
|
20
|
+
(0, chai_1.expect)(constraints.maxSize).to.equal(undefined);
|
|
21
|
+
});
|
|
22
|
+
it("omits allowedMimetypes when the list is empty", () => {
|
|
23
|
+
const constraints = (0, upload_constraints_1.buildUploadConstraints)({
|
|
24
|
+
maxSize: 1024,
|
|
25
|
+
allowedMimetypes: [],
|
|
26
|
+
});
|
|
27
|
+
(0, chai_1.expect)(constraints.allowedMimetypes).to.equal(undefined);
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
describe("isUploadValidationError", () => {
|
|
31
|
+
it("matches an error by its name across module copies", () => {
|
|
32
|
+
const error = new Error("too big");
|
|
33
|
+
error.name = "UploadValidationError";
|
|
34
|
+
(0, chai_1.expect)((0, upload_constraints_1.isUploadValidationError)(error)).to.equal(true);
|
|
35
|
+
});
|
|
36
|
+
it("rejects unrelated errors and non-errors", () => {
|
|
37
|
+
(0, chai_1.expect)((0, upload_constraints_1.isUploadValidationError)(new Error("nope"))).to.equal(false);
|
|
38
|
+
(0, chai_1.expect)((0, upload_constraints_1.isUploadValidationError)("not an error")).to.equal(false);
|
|
39
|
+
(0, chai_1.expect)((0, upload_constraints_1.isUploadValidationError)(undefined)).to.equal(false);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=upload-constraints.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-constraints.test.js","sourceRoot":"","sources":["../../../src/test/unit/upload-constraints.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B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