@antelopejs/interface-dms 0.10.4 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +126 -0
- package/README.md +21 -10
- package/dist/attachments.d.ts +15 -2
- package/dist/attachments.js +14 -1
- package/dist/attachments.js.map +1 -1
- package/dist/auth/db/models/sessions.model.d.ts +7 -5
- package/dist/auth/db/models/sessions.model.js +2 -9
- package/dist/auth/db/models/sessions.model.js.map +1 -1
- package/dist/auth/db/models/userExternalIdentities.model.d.ts +7 -5
- package/dist/auth/db/models/users.model.d.ts +7 -5
- package/dist/auth/db/tables/users.table.d.ts +2 -2
- package/dist/auth/db/tables/users.table.js.map +1 -1
- package/dist/auth/index.d.ts +4 -4
- package/dist/auth/internal/jwt-auth-decorator.d.ts +1 -1
- package/dist/auth/internal/jwt-auth-decorator.js +6 -3
- package/dist/auth/internal/jwt-auth-decorator.js.map +1 -1
- package/dist/auth/internal/request-authenticators.d.ts +12 -0
- package/dist/auth/internal/request-authenticators.js +53 -10
- package/dist/auth/internal/request-authenticators.js.map +1 -1
- package/dist/base/activity-feed.d.ts +34 -32
- package/dist/base/activity-feed.js +2 -0
- package/dist/base/activity-feed.js.map +1 -1
- package/dist/base/banner.d.ts +12 -10
- package/dist/base/banner.js +2 -0
- package/dist/base/banner.js.map +1 -1
- package/dist/base/block-registry/internal/describe.js +4 -12
- package/dist/base/block-registry/internal/describe.js.map +1 -1
- package/dist/base/block-registry/internal/ui.js +1 -1
- package/dist/base/block-registry/internal/ui.js.map +1 -1
- package/dist/base/card.d.ts +11 -9
- package/dist/base/card.js +2 -0
- package/dist/base/card.js.map +1 -1
- package/dist/base/chart-card.d.ts +4 -2
- package/dist/base/chart-card.js +2 -0
- package/dist/base/chart-card.js.map +1 -1
- package/dist/base/chart-schemas.d.ts +148 -148
- package/dist/base/chart.d.ts +65 -0
- package/dist/base/chart.js +65 -0
- package/dist/base/chart.js.map +1 -1
- package/dist/base/code-block.d.ts +5 -3
- package/dist/base/code-block.js +2 -0
- package/dist/base/code-block.js.map +1 -1
- package/dist/base/custom.d.ts +5 -0
- package/dist/base/custom.js +5 -0
- package/dist/base/custom.js.map +1 -1
- package/dist/base/data-types/default/address.d.ts +5 -0
- package/dist/base/data-types/default/address.js +5 -0
- package/dist/base/data-types/default/address.js.map +1 -1
- package/dist/base/data-types/default/choices.d.ts +20 -0
- package/dist/base/data-types/default/choices.js +20 -0
- package/dist/base/data-types/default/choices.js.map +1 -1
- package/dist/base/data-types/default/files.d.ts +22 -5
- package/dist/base/data-types/default/files.js +20 -0
- package/dist/base/data-types/default/files.js.map +1 -1
- package/dist/base/data-types/default/numbers.d.ts +15 -0
- package/dist/base/data-types/default/numbers.js +25 -9
- package/dist/base/data-types/default/numbers.js.map +1 -1
- package/dist/base/data-types/default/relations.d.ts +10 -2
- package/dist/base/data-types/default/relations.js +9 -6
- package/dist/base/data-types/default/relations.js.map +1 -1
- package/dist/base/data-types/default/strings.d.ts +25 -0
- package/dist/base/data-types/default/strings.js +25 -0
- package/dist/base/data-types/default/strings.js.map +1 -1
- package/dist/base/data-types/default-types.d.ts +1 -1
- package/dist/base/data-types/field-types.d.ts +10 -0
- package/dist/base/data-types/field-types.js +10 -0
- package/dist/base/data-types/field-types.js.map +1 -1
- package/dist/base/data-types/internal/relation-endpoints.js +1 -0
- package/dist/base/data-types/internal/relation-endpoints.js.map +1 -1
- package/dist/base/data-types/status-type.d.ts +5 -0
- package/dist/base/data-types/status-type.js +5 -0
- package/dist/base/data-types/status-type.js.map +1 -1
- package/dist/base/display.d.ts +6 -6
- package/dist/base/empty-state.d.ts +15 -13
- package/dist/base/empty-state.js +2 -0
- package/dist/base/empty-state.js.map +1 -1
- package/dist/base/form-block-schema.d.ts +50 -50
- package/dist/base/form-schema.d.ts +2 -0
- package/dist/base/form-schema.js +2 -0
- package/dist/base/form-schema.js.map +1 -1
- package/dist/base/grid.d.ts +4 -0
- package/dist/base/grid.js +4 -0
- package/dist/base/grid.js.map +1 -1
- package/dist/base/guard.d.ts +30 -28
- package/dist/base/guard.js +2 -0
- package/dist/base/guard.js.map +1 -1
- package/dist/base/helpers/archive-mode-helpers.d.ts +1 -1
- package/dist/base/helpers/file-refs.js +15 -15
- package/dist/base/helpers/file-refs.js.map +1 -1
- package/dist/base/internal/form-schema-validation.js +7 -1
- package/dist/base/internal/form-schema-validation.js.map +1 -1
- package/dist/base/internal/realtime-topics.js.map +1 -1
- package/dist/base/internal/searchable.d.ts +2 -1
- package/dist/base/internal/searchable.js +1 -3
- package/dist/base/internal/searchable.js.map +1 -1
- package/dist/base/key-value-list.d.ts +21 -19
- package/dist/base/key-value-list.js +2 -0
- package/dist/base/key-value-list.js.map +1 -1
- package/dist/base/kpi-card.d.ts +4 -2
- package/dist/base/kpi-card.js +2 -0
- package/dist/base/kpi-card.js.map +1 -1
- package/dist/base/live-toggle.d.ts +2 -0
- package/dist/base/live-toggle.js +2 -0
- package/dist/base/live-toggle.js.map +1 -1
- package/dist/base/meter.d.ts +23 -21
- package/dist/base/meter.js +2 -0
- package/dist/base/meter.js.map +1 -1
- package/dist/base/nav-card-grid.d.ts +24 -19
- package/dist/base/nav-card-grid.js +5 -0
- package/dist/base/nav-card-grid.js.map +1 -1
- package/dist/base/page-toolbar.d.ts +2 -0
- package/dist/base/page-toolbar.js +2 -0
- package/dist/base/page-toolbar.js.map +1 -1
- package/dist/base/period-selector.d.ts +3 -1
- package/dist/base/period-selector.js +2 -0
- package/dist/base/period-selector.js.map +1 -1
- package/dist/base/placeholder.d.ts +2 -0
- package/dist/base/placeholder.js +2 -0
- package/dist/base/placeholder.js.map +1 -1
- package/dist/base/resource-form-schema.d.ts +2 -2
- package/dist/base/searchable.d.ts +3 -2
- package/dist/base/searchable.js +2 -2
- package/dist/base/searchable.js.map +1 -1
- package/dist/base/section.d.ts +6 -2
- package/dist/base/section.js +4 -0
- package/dist/base/section.js.map +1 -1
- package/dist/base/stack.d.ts +6 -0
- package/dist/base/stack.js +6 -0
- package/dist/base/stack.js.map +1 -1
- package/dist/base/stat-group.d.ts +16 -14
- package/dist/base/stat-group.js +2 -0
- package/dist/base/stat-group.js.map +1 -1
- package/dist/base/tab.d.ts +10 -8
- package/dist/base/tab.js +2 -0
- package/dist/base/tab.js.map +1 -1
- package/dist/base/table-view/column-display.d.ts +1 -1
- package/dist/base/table-view/column-display.js.map +1 -1
- package/dist/base/table-view/data-functions.d.ts +10 -4
- package/dist/base/table-view/data-functions.js.map +1 -1
- package/dist/base/table-view/factory.d.ts +5 -0
- package/dist/base/table-view/factory.js +8 -4
- package/dist/base/table-view/factory.js.map +1 -1
- package/dist/base/table-view/internal/auth.d.ts +17 -3
- package/dist/base/table-view/internal/auth.js +26 -5
- package/dist/base/table-view/internal/auth.js.map +1 -1
- package/dist/base/table-view/internal/column-conditions.d.ts +8 -1
- package/dist/base/table-view/internal/column-conditions.js +25 -13
- package/dist/base/table-view/internal/column-conditions.js.map +1 -1
- package/dist/base/table-view/internal/column-display.d.ts +1 -2
- package/dist/base/table-view/internal/column-display.js +3 -9
- package/dist/base/table-view/internal/column-display.js.map +1 -1
- package/dist/base/table-view/internal/factory-helpers.d.ts +1 -1
- package/dist/base/table-view/internal/factory-helpers.js +17 -14
- package/dist/base/table-view/internal/factory-helpers.js.map +1 -1
- package/dist/base/table-view/internal/factory-lifecycle-created.d.ts +2 -3
- package/dist/base/table-view/internal/factory-lifecycle-created.js +5 -5
- package/dist/base/table-view/internal/factory-lifecycle-created.js.map +1 -1
- package/dist/base/table-view/internal/factory-lifecycle-filter.d.ts +2 -2
- package/dist/base/table-view/internal/factory-private-actions.d.ts +2 -2
- package/dist/base/table-view/internal/files.d.ts +2 -1
- package/dist/base/table-view/internal/files.js +14 -5
- package/dist/base/table-view/internal/files.js.map +1 -1
- package/dist/base/table-view/internal/footer.d.ts +3 -3
- package/dist/base/table-view/internal/footer.js +16 -15
- package/dist/base/table-view/internal/footer.js.map +1 -1
- package/dist/base/table-view/internal/guards.d.ts +27 -5
- package/dist/base/table-view/internal/guards.js +133 -49
- package/dist/base/table-view/internal/guards.js.map +1 -1
- package/dist/base/table-view/internal/meta-helpers.d.ts +1 -1
- package/dist/base/table-view/internal/meta-helpers.js +3 -4
- package/dist/base/table-view/internal/meta-helpers.js.map +1 -1
- package/dist/base/table-view/internal/meta.js +2 -3
- package/dist/base/table-view/internal/meta.js.map +1 -1
- package/dist/base/table-view/internal/option-contract.d.ts +9 -1
- package/dist/base/table-view/internal/option-footer.d.ts +2 -2
- package/dist/base/table-view/internal/option-row-actions.d.ts +1 -1
- package/dist/base/table-view/internal/realtime.d.ts +52 -11
- package/dist/base/table-view/internal/realtime.js +23 -16
- package/dist/base/table-view/internal/realtime.js.map +1 -1
- package/dist/base/table-view/internal/resource-form.d.ts +1 -1
- package/dist/base/table-view/internal/resource-form.js +1 -1
- package/dist/base/table-view/internal/resource-form.js.map +1 -1
- package/dist/base/table-view/internal/row-actions-schema.d.ts +12 -12
- package/dist/base/table-view/internal/row-rule-shape.d.ts +11 -5
- package/dist/base/table-view/internal/row-rule-shape.js +60 -30
- package/dist/base/table-view/internal/row-rule-shape.js.map +1 -1
- package/dist/base/table-view/internal/row-rules.d.ts +28 -1
- package/dist/base/table-view/internal/row-rules.js +8 -19
- package/dist/base/table-view/internal/row-rules.js.map +1 -1
- package/dist/base/table-view/internal/tabs.d.ts +1 -1
- package/dist/base/table-view/internal/tabs.js +1 -4
- package/dist/base/table-view/internal/tabs.js.map +1 -1
- package/dist/base/table-view/internal/validation.d.ts +2 -2
- package/dist/base/table-view/internal/validation.js +7 -7
- package/dist/base/table-view/internal/validation.js.map +1 -1
- package/dist/base/table-view/meta.d.ts +7 -6
- package/dist/base/table-view/meta.js +12 -7
- package/dist/base/table-view/meta.js.map +1 -1
- package/dist/base/table-view/resource-form.d.ts +3 -1
- package/dist/base/table-view/resource-form.js +2 -0
- package/dist/base/table-view/resource-form.js.map +1 -1
- package/dist/base/table-view/routes.d.ts +73 -21
- package/dist/base/table-view/routes.js +13 -10
- package/dist/base/table-view/routes.js.map +1 -1
- package/dist/base/table-view/schema.d.ts +157 -152
- package/dist/base/table-view/schema.js +2 -1
- package/dist/base/table-view/schema.js.map +1 -1
- package/dist/base/table-view/source.js +4 -1
- package/dist/base/table-view/source.js.map +1 -1
- package/dist/base/table-view.d.ts +1 -1
- package/dist/base/table-view.js.map +1 -1
- package/dist/base/top-list-card.d.ts +35 -33
- package/dist/base/top-list-card.js +2 -0
- package/dist/base/top-list-card.js.map +1 -1
- package/dist/base/types/error.js +5 -2
- package/dist/base/types/error.js.map +1 -1
- package/dist/base/types/guards.d.ts +4 -4
- package/dist/base/types/json.d.ts +1 -10
- package/dist/base/types/row-action.d.ts +7 -7
- package/dist/component-options/confirm-dialog.d.ts +2 -0
- package/dist/component-options/confirm-dialog.js.map +1 -1
- package/dist/component-options/data-type.d.ts +2 -2
- package/dist/component-options/data-type.js +7 -7
- package/dist/component-options/data-type.js.map +1 -1
- package/dist/component-options/page-layout.d.ts +3 -2
- package/dist/component-options/page-layout.js.map +1 -1
- package/dist/component-options/row-action.d.ts +14 -9
- package/dist/component-slots.d.ts +11 -2
- package/dist/component-slots.js +1 -0
- package/dist/component-slots.js.map +1 -1
- package/dist/component.d.ts +7 -8
- package/dist/component.js +17 -25
- package/dist/component.js.map +1 -1
- package/dist/data-controllers/members.d.ts +11 -7
- package/dist/data-controllers/members.js +1 -1
- package/dist/data-controllers/members.js.map +1 -1
- package/dist/data-controllers/roles.d.ts +32 -10
- package/dist/db/internal/exportJobs.model.d.ts +7 -5
- package/dist/db/internal/inviteResolutions.model.d.ts +7 -5
- package/dist/db/internal/tenantLifecycle.model.d.ts +15 -7
- package/dist/db/internal/tenantLifecycle.model.js +16 -7
- package/dist/db/internal/tenantLifecycle.model.js.map +1 -1
- package/dist/db/models/roles.model.d.ts +7 -5
- package/dist/db/models/tenantMembers.model.d.ts +7 -5
- package/dist/db/models/tenants.model.d.ts +7 -5
- package/dist/db/models/user_invites.model.d.ts +7 -5
- package/dist/guards.d.ts +1 -1
- package/dist/hooks.d.ts +1 -2
- package/dist/hooks.js +33 -26
- package/dist/hooks.js.map +1 -1
- package/dist/internal/attachments.d.ts +2 -2
- package/dist/internal/component-builder.js +2 -1
- package/dist/internal/component-builder.js.map +1 -1
- package/dist/internal/component-serialization.d.ts +2 -4
- package/dist/internal/component-serialization.js +4 -3
- package/dist/internal/component-serialization.js.map +1 -1
- package/dist/internal/component-slots.d.ts +19 -2
- package/dist/internal/component-slots.js +35 -12
- package/dist/internal/component-slots.js.map +1 -1
- package/dist/internal/component-watch-filter.d.ts +11 -0
- package/dist/internal/component-watch-filter.js +22 -0
- package/dist/internal/component-watch-filter.js.map +1 -0
- package/dist/internal/component-watches.js +0 -1
- package/dist/internal/component-watches.js.map +1 -1
- package/dist/internal/own-entry.d.ts +7 -0
- package/dist/internal/own-entry.js +13 -0
- package/dist/internal/own-entry.js.map +1 -0
- package/dist/internal/uploads.d.ts +30 -0
- package/dist/internal/uploads.js +19 -0
- package/dist/internal/uploads.js.map +1 -1
- package/dist/invite-extension-payloads.d.ts +14 -2
- package/dist/invite-extensions/internal/delivery.js +1 -2
- package/dist/invite-extensions/internal/delivery.js.map +1 -1
- package/dist/invite-extensions/internal/edit.d.ts +2 -1
- package/dist/invite-extensions/internal/edit.js +8 -9
- package/dist/invite-extensions/internal/edit.js.map +1 -1
- package/dist/invite-extensions/internal/form-slot.js +8 -15
- package/dist/invite-extensions/internal/form-slot.js.map +1 -1
- package/dist/invite-extensions/internal/payload-slices.d.ts +33 -3
- package/dist/invite-extensions/internal/payload-slices.js +84 -19
- package/dist/invite-extensions/internal/payload-slices.js.map +1 -1
- package/dist/invite-extensions/internal/types.d.ts +10 -1
- package/dist/invite-resolution.js +6 -4
- package/dist/invite-resolution.js.map +1 -1
- package/dist/json.d.ts +10 -0
- package/dist/json.js +3 -0
- package/dist/json.js.map +1 -0
- package/dist/layout-banners.d.ts +5 -2
- package/dist/layout-banners.js.map +1 -1
- package/dist/page/controllers.d.ts +2 -2
- package/dist/page/internal/extension-validation.js +3 -2
- package/dist/page/internal/extension-validation.js.map +1 -1
- package/dist/page/internal/metadata-layout.js +1 -1
- package/dist/page/internal/metadata-layout.js.map +1 -1
- package/dist/page/internal/metadata-publish.js +3 -2
- package/dist/page/internal/metadata-publish.js.map +1 -1
- package/dist/page/internal/metadata-registration.js +5 -4
- package/dist/page/internal/metadata-registration.js.map +1 -1
- package/dist/page/internal/metadata-upload-registration.d.ts +4 -2
- package/dist/page/internal/metadata-upload-registration.js +13 -4
- package/dist/page/internal/metadata-upload-registration.js.map +1 -1
- package/dist/page/internal/metadata-uploads.d.ts +5 -5
- package/dist/page/internal/metadata-uploads.js +4 -8
- package/dist/page/internal/metadata-uploads.js.map +1 -1
- package/dist/page/internal/page-record.d.ts +2 -3
- package/dist/page/internal/page-record.js +23 -16
- package/dist/page/internal/page-record.js.map +1 -1
- package/dist/page/layout-filter.js +17 -6
- package/dist/page/layout-filter.js.map +1 -1
- package/dist/page/metadata.js +5 -7
- package/dist/page/metadata.js.map +1 -1
- package/dist/request-tenant.d.ts +10 -4
- package/dist/request-tenant.js +16 -34
- package/dist/request-tenant.js.map +1 -1
- package/dist/tenant-export.d.ts +2 -1
- package/dist/tenant-lifecycle.d.ts +43 -4
- package/dist/tenant-lifecycle.js +97 -18
- package/dist/tenant-lifecycle.js.map +1 -1
- package/dist/types.d.ts +20 -0
- package/dist/uploads.d.ts +1 -1
- package/dist/uploads.js +39 -60
- package/dist/uploads.js.map +1 -1
- package/dist/utils/fire-and-forget.js.map +1 -1
- package/dist/utils/internal/decorated-class.d.ts +14 -0
- package/dist/utils/internal/decorated-class.js +37 -0
- package/dist/utils/internal/decorated-class.js.map +1 -0
- package/dist/utils/internal/type-check.d.ts +9 -0
- package/dist/utils/internal/type-check.js +13 -5
- package/dist/utils/internal/type-check.js.map +1 -1
- package/dist/utils/internal/value-parser.d.ts +1 -1
- package/dist/utils/internal/value-parser.js +22 -9
- package/dist/utils/internal/value-parser.js.map +1 -1
- package/dist/watch-actions.d.ts +1 -1
- package/docs/1.core/1.introduction.md +82 -77
- package/docs/1.core/10.layout-banners.md +57 -45
- package/docs/1.core/11.modules-and-dynamic-menus.md +178 -0
- package/docs/1.core/12.frontend-modules-and-request-helpers.md +155 -0
- package/docs/1.core/13.tenant-data-export.md +120 -0
- package/docs/1.core/2.pages-and-modules.md +140 -367
- package/docs/1.core/3.components.md +21 -22
- package/docs/1.core/4.permissions.md +92 -71
- package/docs/1.core/5.tenancy.md +150 -86
- package/docs/1.core/6.invites.md +90 -65
- package/docs/1.core/7.hooks.md +96 -166
- package/docs/1.core/8.realtime.md +44 -45
- package/docs/1.core/9.quick-actions.md +37 -30
- package/docs/2.auth/1.introduction.md +33 -35
- package/docs/2.auth/2.authentication.md +60 -38
- package/docs/2.auth/3.tokens-and-sessions.md +56 -55
- package/docs/2.auth/4.users.md +79 -51
- package/docs/2.auth/5.external-identities.md +25 -26
- package/docs/3.base/1.introduction.md +64 -60
- package/docs/3.base/10.display-blocks.md +15 -16
- package/docs/3.base/11.page-layouts.md +270 -0
- package/docs/3.base/12.table-row-actions.md +122 -0
- package/docs/3.base/13.table-filters-and-forms.md +104 -0
- package/docs/3.base/14.table-events-and-helpers.md +114 -0
- package/docs/3.base/15.table-sources-and-gates.md +24 -0
- package/docs/3.base/2.types.md +44 -41
- package/docs/3.base/3.forms.md +27 -28
- package/docs/3.base/4.tables.md +35 -368
- package/docs/3.base/5.charts-and-widgets.md +28 -29
- package/docs/3.base/6.layout.md +21 -270
- package/docs/3.base/8.data-types.md +39 -40
- package/docs/3.base/9.helpers.md +36 -38
- package/docs/4.notifications/1.introduction.md +22 -26
- package/docs/4.notifications/2.categories-and-subjects.md +58 -55
- package/docs/4.notifications/3.sending.md +72 -68
- package/docs/5.html-render/1.introduction.md +119 -81
- package/docs/5.html-render/2.built-in-emails.md +71 -51
- package/docs/index.md +18 -29
- package/docs/tsconfig.json +4 -0
- package/package.json +11 -11
- package/docs/images/emails-admin-invite.png +0 -0
- package/docs/images/emails-change-notice.png +0 -0
- package/docs/images/emails-change-verification.png +0 -0
- package/docs/images/emails-digest-logo-dark.png +0 -0
- package/docs/images/emails-digest-logo-light.png +0 -0
- package/docs/images/emails-digest.png +0 -0
- package/docs/images/emails-export-partial.png +0 -0
- package/docs/images/emails-export-ready.png +0 -0
- package/docs/images/emails-reset-password.png +0 -0
- package/docs/images/emails-two-factor.png +0 -0
- package/docs/images/emails-user-validation.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,131 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.13.0
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/interface-v0.12.0...v0.13.0)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **header:** Let a header action draw a module component as its icon ([#772](https://github.com/AntelopeJS/dms/pull/772))
|
|
10
|
+
- **dms:** Read the sign-in country without a bundled database ([#776](https://github.com/AntelopeJS/dms/pull/776))
|
|
11
|
+
- **verify-dms:** Run every feature when a shared file changes ([#783](https://github.com/AntelopeJS/dms/pull/783))
|
|
12
|
+
- **dms-control:** Record per-phase timings of a verify run ([#784](https://github.com/AntelopeJS/dms/pull/784))
|
|
13
|
+
- **dms-control:** Serve the dashboard with ajs dms dev under up --dev-frontend ([#829](https://github.com/AntelopeJS/dms/pull/829))
|
|
14
|
+
- **table-view:** Add liveHold.whileOnScreen to let a live table follow its feed on screen ([#808](https://github.com/AntelopeJS/dms/pull/808))
|
|
15
|
+
|
|
16
|
+
### 🔥 Performance
|
|
17
|
+
|
|
18
|
+
- **store:** Let the modules listing read stale registry answers ([#768](https://github.com/AntelopeJS/dms/pull/768))
|
|
19
|
+
- **dms-control:** Stop the previous journey's backend at once ([#785](https://github.com/AntelopeJS/dms/pull/785))
|
|
20
|
+
- **ci:** Scan the playground import fixtures together ([#791](https://github.com/AntelopeJS/dms/pull/791))
|
|
21
|
+
- **dms-control:** Start the next journey's backend while the current one runs ([#788](https://github.com/AntelopeJS/dms/pull/788))
|
|
22
|
+
- **docs:** Capture the documentation screenshots in parallel ([#792](https://github.com/AntelopeJS/dms/pull/792))
|
|
23
|
+
- **dms-control:** Reuse the frontend build of unchanged sources ([#787](https://github.com/AntelopeJS/dms/pull/787))
|
|
24
|
+
- **dms-control:** Take screenshots on checks and failures only ([#786](https://github.com/AntelopeJS/dms/pull/786))
|
|
25
|
+
|
|
26
|
+
### 🩹 Fixes
|
|
27
|
+
|
|
28
|
+
- **layout:** Keep the platform title in the document title after sign-in ([#767](https://github.com/AntelopeJS/dms/pull/767))
|
|
29
|
+
- **layout:** Keep a closing toast inside the collapsed stack ([#771](https://github.com/AntelopeJS/dms/pull/771))
|
|
30
|
+
- **auth:** List each person once in the account switcher ([#770](https://github.com/AntelopeJS/dms/pull/770))
|
|
31
|
+
- **dms-dev:** Run dev servers side by side across worktrees ([#769](https://github.com/AntelopeJS/dms/pull/769))
|
|
32
|
+
- **dms-layout:** Re-export usePageHeaderActions by relative path so unimport scans it ([#777](https://github.com/AntelopeJS/dms/pull/777))
|
|
33
|
+
- **dms-control:** Refuse to signal a pid that is not a whole number above 1 ([#789](https://github.com/AntelopeJS/dms/pull/789))
|
|
34
|
+
- **ci:** Check the scanner exit status per diagnostic kind in the import test ([#793](https://github.com/AntelopeJS/dms/pull/793))
|
|
35
|
+
- **verify-dms:** Expect the assistant ask item in the palette no-match journey ([#799](https://github.com/AntelopeJS/dms/pull/799))
|
|
36
|
+
- **notifications:** Undo mark-all-read in one bulk update ([#826](https://github.com/AntelopeJS/dms/pull/826))
|
|
37
|
+
- **dms:** Auto-import isReducedMotionActive for frontend modules ([#823](https://github.com/AntelopeJS/dms/pull/823))
|
|
38
|
+
- **dms-control:** Resolve moduleRoot to the module above a skill playground ([#827](https://github.com/AntelopeJS/dms/pull/827))
|
|
39
|
+
- **preview:** Draw a serialized resource form that reads any path of the site ([#820](https://github.com/AntelopeJS/dms/pull/820))
|
|
40
|
+
- **dms-control:** Key a non-literal module specifier by its structure in the emit fingerprint ([#816](https://github.com/AntelopeJS/dms/pull/816))
|
|
41
|
+
- **dms:** Keep the newest row read when two table row updates answer out of order ([#812](https://github.com/AntelopeJS/dms/pull/812))
|
|
42
|
+
- **dms-ui:** Keep query-only block action links in the browser ([#832](https://github.com/AntelopeJS/dms/pull/832))
|
|
43
|
+
- **chart:** Stop a donut redrawing itself through its parent resize observer ([#835](https://github.com/AntelopeJS/dms/pull/835))
|
|
44
|
+
- **release:** Decide the interface range check as semver does ([#813](https://github.com/AntelopeJS/dms/pull/813))
|
|
45
|
+
- **dms-control:** Let journeys stop and restart the run's mongod ([#831](https://github.com/AntelopeJS/dms/pull/831))
|
|
46
|
+
- **dms-control:** Start the base backend when the base ref has no playground ([#818](https://github.com/AntelopeJS/dms/pull/818))
|
|
47
|
+
- **dms-control:** Start the run's mongod as a single-node replica set ([#830](https://github.com/AntelopeJS/dms/pull/830))
|
|
48
|
+
- **realtime:** Read a page's data again once its subscription is in place ([#810](https://github.com/AntelopeJS/dms/pull/810))
|
|
49
|
+
- **dms-control:** Ship playwright-core as an optional dependency of @antelopejs/dms ([#817](https://github.com/AntelopeJS/dms/pull/817))
|
|
50
|
+
- **auth:** Show a no-workspace screen when no module serves /auth/no-workspace ([#800](https://github.com/AntelopeJS/dms/pull/800))
|
|
51
|
+
- **dms-control:** Fail a formal finding dropped by a check edit instead of counting it fixed ([#821](https://github.com/AntelopeJS/dms/pull/821))
|
|
52
|
+
- **playground:** Load an api that reads RouteHandler.controller ([#819](https://github.com/AntelopeJS/dms/pull/819))
|
|
53
|
+
- **dms-ui:** Build a module drawer's provides from the raw caller provides ([#809](https://github.com/AntelopeJS/dms/pull/809))
|
|
54
|
+
- **dms-control:** Identify each process from the read that finds it, and check it again before each signal ([#801](https://github.com/AntelopeJS/dms/pull/801))
|
|
55
|
+
- **interface-dms:** Answer 400 to a guarded confirmation body that is not a JSON object ([#828](https://github.com/AntelopeJS/dms/pull/828))
|
|
56
|
+
- **interface-dms:** Accept a model row or a PromiseLike from PageRecordLoader ([#815](https://github.com/AntelopeJS/dms/pull/815))
|
|
57
|
+
- **interface-dms:** Refuse upload field options that are not an object ([#825](https://github.com/AntelopeJS/dms/pull/825))
|
|
58
|
+
- **oauth:** Create no account before the platform has its owner ([#807](https://github.com/AntelopeJS/dms/pull/807))
|
|
59
|
+
- **dms:** Stop without waiting for a default tenant provisioning run in progress ([#804](https://github.com/AntelopeJS/dms/pull/804))
|
|
60
|
+
- **tenant-lifecycle:** Name a blocked release and give operators a way to retire it ([#822](https://github.com/AntelopeJS/dms/pull/822))
|
|
61
|
+
- **onboarding:** Keep the register as the one writer of has_onboarded ([#806](https://github.com/AntelopeJS/dms/pull/806))
|
|
62
|
+
|
|
63
|
+
### 💅 Refactors
|
|
64
|
+
|
|
65
|
+
- **dms-control:** Remove publish, its evidence branch, comment and status ([#838](https://github.com/AntelopeJS/dms/pull/838))
|
|
66
|
+
- **iface:** Drop the shape-name suppressions in block-registry describe ([#803](https://github.com/AntelopeJS/dms/pull/803))
|
|
67
|
+
|
|
68
|
+
### 📖 Documentation
|
|
69
|
+
|
|
70
|
+
- **dms:** Explain what the AntelopeJS agent plugin unlocks, External database included ([#773](https://github.com/AntelopeJS/dms/pull/773))
|
|
71
|
+
- **dms:** Mark the ResourceForm mode and the source tables in the docs examples ([#780](https://github.com/AntelopeJS/dms/pull/780))
|
|
72
|
+
- **dms:** Start the quickstart with the dms-starter template ([#782](https://github.com/AntelopeJS/dms/pull/782))
|
|
73
|
+
- **readme:** Lead with the problem and add animated section banners ([#833](https://github.com/AntelopeJS/dms/pull/833))
|
|
74
|
+
- **readme:** Open on the Helio tour and explain the Connect flow ([#834](https://github.com/AntelopeJS/dms/pull/834))
|
|
75
|
+
- **getting-started:** Title the starter guide "Quickstart" ([#837](https://github.com/AntelopeJS/dms/pull/837))
|
|
76
|
+
- Refresh the stale block screenshots ([#802](https://github.com/AntelopeJS/dms/pull/802))
|
|
77
|
+
|
|
78
|
+
### 📦 Build
|
|
79
|
+
|
|
80
|
+
- **deps:** Move to @antelopejs/core 1.20 and drop the interface-core override ([#765](https://github.com/AntelopeJS/dms/pull/765))
|
|
81
|
+
- **deps:** Bump @antelopejs packages to the 2026-11-06 releases ([#781](https://github.com/AntelopeJS/dms/pull/781))
|
|
82
|
+
|
|
83
|
+
### 🏡 Chore
|
|
84
|
+
|
|
85
|
+
- **release:** @antelopejs/dms v0.16.0 ([f438f68f](https://github.com/AntelopeJS/dms/commit/f438f68f))
|
|
86
|
+
- Land the cleanup campaign on main ([#764](https://github.com/AntelopeJS/dms/pull/764))
|
|
87
|
+
- **release:** @antelopejs/dms v0.16.1 ([15b8db45](https://github.com/AntelopeJS/dms/commit/15b8db45))
|
|
88
|
+
- Remove the .amp directory ([#766](https://github.com/AntelopeJS/dms/pull/766))
|
|
89
|
+
- **release:** @antelopejs/dms v0.16.2 ([a623158c](https://github.com/AntelopeJS/dms/commit/a623158c))
|
|
90
|
+
- **dms-control:** Remove seeded runs and containment journeys from verification ([#774](https://github.com/AntelopeJS/dms/pull/774))
|
|
91
|
+
- **release:** @antelopejs/dms v0.17.0 ([b6f3224e](https://github.com/AntelopeJS/dms/commit/b6f3224e))
|
|
92
|
+
- **dms:** Commit the module locks the test runs record ([#775](https://github.com/AntelopeJS/dms/pull/775))
|
|
93
|
+
- **ci:** Remove the weekly mutation caller ([#778](https://github.com/AntelopeJS/dms/pull/778))
|
|
94
|
+
- **release:** @antelopejs/dms v0.18.0 ([95115920](https://github.com/AntelopeJS/dms/commit/95115920))
|
|
95
|
+
- **release:** @antelopejs/dms v0.18.1 ([07d0e757](https://github.com/AntelopeJS/dms/commit/07d0e757))
|
|
96
|
+
- **release:** @antelopejs/dms v0.18.2 ([1834895e](https://github.com/AntelopeJS/dms/commit/1834895e))
|
|
97
|
+
|
|
98
|
+
### ✅ Tests
|
|
99
|
+
|
|
100
|
+
- **frontend:** Import the table row actions subject at file load ([#805](https://github.com/AntelopeJS/dms/pull/805))
|
|
101
|
+
|
|
102
|
+
### 🤖 CI
|
|
103
|
+
|
|
104
|
+
- Call ci-node.yml@v1 ([#779](https://github.com/AntelopeJS/dms/pull/779))
|
|
105
|
+
|
|
106
|
+
### ❤️ Contributors
|
|
107
|
+
|
|
108
|
+
- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))
|
|
109
|
+
|
|
110
|
+
## v0.12.0
|
|
111
|
+
|
|
112
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/interface-v0.10.4...v0.12.0)
|
|
113
|
+
|
|
114
|
+
### 📖 Documentation
|
|
115
|
+
|
|
116
|
+
- **readme:** Start the demos with npx @antelopejs/core ([#753](https://github.com/AntelopeJS/dms/pull/753))
|
|
117
|
+
- **readme:** Show the Meet and DMS films, with new GIFs ([1e3f7694](https://github.com/AntelopeJS/dms/commit/1e3f7694))
|
|
118
|
+
- **readme:** Link the read-only live demo ([#665](https://github.com/AntelopeJS/dms/pull/665))
|
|
119
|
+
|
|
120
|
+
### 🏡 Chore
|
|
121
|
+
|
|
122
|
+
- **release:** @antelopejs/dms v0.15.1 ([c8651b86](https://github.com/AntelopeJS/dms/commit/c8651b86))
|
|
123
|
+
- Land the cleanup campaign on main ([#761](https://github.com/AntelopeJS/dms/pull/761))
|
|
124
|
+
|
|
125
|
+
### ❤️ Contributors
|
|
126
|
+
|
|
127
|
+
- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))
|
|
128
|
+
|
|
3
129
|
## v0.10.4
|
|
4
130
|
|
|
5
131
|
[compare changes](https://github.com/AntelopeJS/dms/compare/interface-v0.10.3...v0.10.4)
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# `@antelopejs/interface-dms`
|
|
4
4
|
|
|
5
|
-
<a href="https://www.npmjs.com/package/@antelopejs/interface-dms"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/interface-dms?style=for-the-badge&labelColor=000000&color=000000"></a>
|
|
6
|
-
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/interface-dms?style=for-the-badge&labelColor=000000&color=000000"></a>
|
|
7
|
-
<a href="https://discord.gg/g4pFt6eXqu"><img alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000"></a>
|
|
8
|
-
<a href="https://dms.antelopejs.com/docs/interfaces"><img alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000"></a>
|
|
5
|
+
<a href="https://www.npmjs.com/package/@antelopejs/interface-dms"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/interface-dms?style=for-the-badge&labelColor=000000&color=000000" data-illustration></a>
|
|
6
|
+
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/interface-dms?style=for-the-badge&labelColor=000000&color=000000" data-illustration></a>
|
|
7
|
+
<a href="https://discord.gg/g4pFt6eXqu"><img alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000" data-illustration></a>
|
|
8
|
+
<a href="https://dms.antelopejs.com/docs/interfaces"><img alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" data-illustration></a>
|
|
9
9
|
|
|
10
10
|
The public contracts of the AntelopeJS DMS: pages and components, permissions and tenancy, authentication, notifications and HTML rendering.
|
|
11
11
|
|
|
@@ -27,7 +27,7 @@ Add the interface to the module that extends the DMS:
|
|
|
27
27
|
pnpm add @antelopejs/interface-dms
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Depend on it with a wide
|
|
30
|
+
Depend on it with a range wide enough that every module shares one installed copy, and never bundle or vendor it: the host and every module must resolve the same installed copy, since the package holds live registries. `@antelopejs/core` fails at startup with `Incompatible interface package resolution` when a module resolves another copy.
|
|
31
31
|
|
|
32
32
|
## Quick start
|
|
33
33
|
|
|
@@ -56,10 +56,21 @@ export class SalesPage extends PageController("sales", {
|
|
|
56
56
|
|
|
57
57
|
## Compatibility
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
|
59
|
+
<!-- antelopejs-docs-compat:start -->
|
|
60
|
+
|
|
61
|
+
| Package | Supported | Tested with |
|
|
62
|
+
| ------------------------------------------- | ----------------- | ----------- |
|
|
63
|
+
| `@antelopejs/interface-api` | `>=0.3.0 <1.0.0` | `0.2.0` |
|
|
64
|
+
| `@antelopejs/interface-api-util` | `>=0.1.3 <1.0.0` | `0.3.0` |
|
|
65
|
+
| `@antelopejs/interface-core` | `>=0.4.0 <1.0.0` | `0.4.0` |
|
|
66
|
+
| `@antelopejs/interface-data-api` | `>=0.6.0 <1.0.0` | `0.6.0` |
|
|
67
|
+
| `@antelopejs/interface-database` | `>=0.1.11 <1.0.0` | `0.3.1` |
|
|
68
|
+
| `@antelopejs/interface-database-decorators` | `>=0.1.12 <1.0.0` | `0.2.1` |
|
|
69
|
+
| `@antelopejs/interface-file-storage` | `>=0.1.4 <1.0.0` | `0.1.4` |
|
|
70
|
+
|
|
71
|
+
<!-- antelopejs-docs-compat:end -->
|
|
72
|
+
|
|
73
|
+
A `@antelopejs/dms` release implements the `@antelopejs/interface-dms` range listed in the compatibility block of the [`dms` README](../dms/README.md#compatibility).
|
|
63
74
|
|
|
64
75
|
## Documentation
|
|
65
76
|
|
package/dist/attachments.d.ts
CHANGED
|
@@ -23,9 +23,19 @@ export interface AttachmentSaveRequest {
|
|
|
23
23
|
submitted: Record<string, unknown>;
|
|
24
24
|
before: Record<string, unknown>;
|
|
25
25
|
}
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Table-view proxy that promotes the files of a `new`, `edit` or `delete` route.
|
|
28
|
+
* It answers nothing: the wrapper returns the wrapped route's own answer.
|
|
29
|
+
* A declared attachment field that nests more than 64 levels deep (the body is
|
|
30
|
+
* level 1) is refused with a 400 "The JSON body nests more than 64 levels deep."
|
|
31
|
+
* at every depth. The attachment save path checks it, and the guard decoder
|
|
32
|
+
* counts depth iteratively before any schema parse. Measured on a table-view
|
|
33
|
+
* `new`, arrays and objects answered 400 from 65 levels up to 100,000.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
27
37
|
export declare namespace internal {
|
|
28
|
-
const SaveTableViewAttachments: (request: TableViewAttachmentSaveRequest) => Promise<
|
|
38
|
+
const SaveTableViewAttachments: (request: TableViewAttachmentSaveRequest) => Promise<void>;
|
|
29
39
|
}
|
|
30
40
|
type AttachmentSaver = <T>(request: AttachmentSaveRequest, save: (promoted: Record<string, unknown>) => Promise<AttachmentSaveResult<T>>) => Promise<T>;
|
|
31
41
|
/**
|
|
@@ -36,6 +46,9 @@ type AttachmentSaver = <T>(request: AttachmentSaveRequest, save: (promoted: Reco
|
|
|
36
46
|
* another save may reference them. Retained objects keep their declared visibility.
|
|
37
47
|
* Removed files are deleted after successful persistence; cleanup errors are logged.
|
|
38
48
|
* This is not reference-counted cleanup: callers own the risk of shared keys.
|
|
49
|
+
* A declared attachment field that nests more than 64 levels deep (the body is
|
|
50
|
+
* level 1) is refused with a 400 "The JSON body nests more than 64 levels deep."
|
|
51
|
+
* before any file is touched.
|
|
39
52
|
*/
|
|
40
53
|
export declare const SaveComponentFiles: AttachmentSaver;
|
|
41
54
|
/**
|
package/dist/attachments.js
CHANGED
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetAttachmentValidationMetadata = exports.SaveComponentFiles = exports.internal = void 0;
|
|
4
4
|
const interface_core_1 = require("@antelopejs/interface-core");
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Table-view proxy that promotes the files of a `new`, `edit` or `delete` route.
|
|
7
|
+
* It answers nothing: the wrapper returns the wrapped route's own answer.
|
|
8
|
+
* A declared attachment field that nests more than 64 levels deep (the body is
|
|
9
|
+
* level 1) is refused with a 400 "The JSON body nests more than 64 levels deep."
|
|
10
|
+
* at every depth. The attachment save path checks it, and the guard decoder
|
|
11
|
+
* counts depth iteratively before any schema parse. Measured on a table-view
|
|
12
|
+
* `new`, arrays and objects answered 400 from 65 levels up to 100,000.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
6
16
|
var internal;
|
|
7
17
|
(function (internal) {
|
|
8
18
|
internal.SaveTableViewAttachments = (0, interface_core_1.InterfaceFunction)();
|
|
@@ -15,6 +25,9 @@ var internal;
|
|
|
15
25
|
* another save may reference them. Retained objects keep their declared visibility.
|
|
16
26
|
* Removed files are deleted after successful persistence; cleanup errors are logged.
|
|
17
27
|
* This is not reference-counted cleanup: callers own the risk of shared keys.
|
|
28
|
+
* A declared attachment field that nests more than 64 levels deep (the body is
|
|
29
|
+
* level 1) is refused with a 400 "The JSON body nests more than 64 levels deep."
|
|
30
|
+
* before any file is touched.
|
|
18
31
|
*/
|
|
19
32
|
exports.SaveComponentFiles =
|
|
20
33
|
// oxlint-disable-next-line anti-slop/require-safety-comment-for-type-assertion -- InterfaceFunction erases the callback/result generic correlation; the published proxy must retain AttachmentSaver's generic call signature.
|
package/dist/attachments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":";;;AACA,+DAA+D;AAmC/D
|
|
1
|
+
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../src/attachments.ts"],"names":[],"mappings":";;;AACA,+DAA+D;AAmC/D;;;;;;;;;;GAUG;AACH,IAAiB,QAAQ,CAKxB;AALD,WAAiB,QAAQ;IACV,iCAAwB,GACnC,IAAA,kCAAiB,GAEd,CAAC;AACR,CAAC,EALgB,QAAQ,wBAAR,QAAQ,QAKxB;AAQD;;;;;;;;;;;GAWG;AACU,QAAA,kBAAkB;AAC7B,8NAA8N;AAC9N,IAAA,kCAAiB,GAAsC,CAAC;AAE1D;;;;GAIG;AACU,QAAA,+BAA+B,GAC1C,IAAA,kCAAiB,GAEd,CAAC"}
|
|
@@ -12,18 +12,20 @@ declare const SessionModel_base: {
|
|
|
12
12
|
readonly table: import("@antelopejs/interface-database").Table<Session>;
|
|
13
13
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
14
14
|
get(id: string): PromiseLike<Session | undefined>;
|
|
15
|
-
getBy(index: keyof Session, ...keys:
|
|
15
|
+
getBy(index: keyof Session, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<Session[]>;
|
|
16
16
|
getAll(): PromiseLike<Session[]>;
|
|
17
17
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Session> | import("@antelopejs/interface-database-decorators").DeepPartial<Session>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
18
18
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Session>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
19
|
-
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Session
|
|
19
|
+
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Session> & {
|
|
20
|
+
_id: string;
|
|
21
|
+
}, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
20
22
|
delete(id: string): Promise<number>;
|
|
21
23
|
};
|
|
22
|
-
readonly schemaName: string;
|
|
24
|
+
readonly schemaName: string | undefined;
|
|
23
25
|
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Session>;
|
|
24
|
-
fromPlainData(obj:
|
|
26
|
+
fromPlainData(obj: Session | import("@antelopejs/interface-database-decorators").PlainData<Session>): Session;
|
|
25
27
|
fromDatabase(obj: any): Session | undefined;
|
|
26
|
-
toDatabase(obj:
|
|
28
|
+
toDatabase(obj: Session | import("@antelopejs/interface-database-decorators").PlainData<Session>): import("@antelopejs/interface-database-decorators").StoredRow<Session>;
|
|
27
29
|
validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
|
|
28
30
|
};
|
|
29
31
|
export declare class SessionModel extends SessionModel_base {
|
|
@@ -6,13 +6,6 @@ const node_crypto_1 = require("node:crypto");
|
|
|
6
6
|
const interface_database_decorators_1 = require("@antelopejs/interface-database-decorators");
|
|
7
7
|
const sessions_table_1 = require("../tables/sessions.table");
|
|
8
8
|
const sessions_model_1 = require("../internal/sessions.model");
|
|
9
|
-
function updatedRows(result) {
|
|
10
|
-
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- Database adapters return either a numeric count or a write result; preserve both accepted result representations.
|
|
11
|
-
if (typeof result === "number")
|
|
12
|
-
return result;
|
|
13
|
-
const counts = result;
|
|
14
|
-
return Number(counts?.replaced ?? counts?.modifiedCount ?? 0);
|
|
15
|
-
}
|
|
16
9
|
const SEAL_ALGORITHM = "aes-256-gcm";
|
|
17
10
|
const SEAL_IV_BYTES = 12;
|
|
18
11
|
const SEAL_ENCODING = "base64";
|
|
@@ -70,7 +63,7 @@ function recoverSuccessor(session, presentedToken) {
|
|
|
70
63
|
class SessionModel extends (0, interface_database_decorators_1.BasicDataModel)(sessions_table_1.Session, sessions_table_1.SESSIONS_TABLE_NAME) {
|
|
71
64
|
/** Atomically rotates a token or resolves its immediate predecessor. */
|
|
72
65
|
async rotateRefreshToken(sessionId, presentedToken, refreshToken, rotatedAt = new Date()) {
|
|
73
|
-
const
|
|
66
|
+
const modified = await this.table
|
|
74
67
|
.getAll(sessionId)
|
|
75
68
|
.filter((row) => row.key("refreshTokenHash").eq((0, sessions_model_1.hashRefreshToken)(presentedToken)))
|
|
76
69
|
.update({
|
|
@@ -81,7 +74,7 @@ class SessionModel extends (0, interface_database_decorators_1.BasicDataModel)(s
|
|
|
81
74
|
lastActiveAt: rotatedAt,
|
|
82
75
|
})
|
|
83
76
|
.run();
|
|
84
|
-
if (
|
|
77
|
+
if (modified > 0)
|
|
85
78
|
return refreshToken;
|
|
86
79
|
const session = await this.get(sessionId);
|
|
87
80
|
if (!session ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.model.js","sourceRoot":"","sources":["../../../../src/auth/db/models/sessions.model.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sessions.model.js","sourceRoot":"","sources":["../../../../src/auth/db/models/sessions.model.ts"],"names":[],"mappings":";;;AA6DA,sDAQC;AArED,6CAKqB;AACrB,6FAA2E;AAC3E,6DAAwE;AACxE,+DAIoC;AAEpC,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,eAAe,GAAG,wBAAwB,CAAC;AACjD,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAC5C,MAAM,iBAAiB,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;AAEtC,SAAS,OAAO,CAAC,WAAmB;IAClC,OAAO,IAAA,wBAAU,EAAC,QAAQ,CAAC;SACxB,MAAM,CAAC,eAAe,GAAG,WAAW,CAAC;SACrC,MAAM,EAAE,CAAC;AACd,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,WAAmB;IAC1D,MAAM,EAAE,GAAG,IAAA,yBAAW,EAAC,aAAa,CAAC,CAAC;IACtC,MAAM,MAAM,GAAG,IAAA,4BAAc,EAAC,cAAc,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC;SACrC,GAAG,CAAC,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AAC,YAAY,CAAC;YAChD,kBAAkB,EAAE,IAAI;YACxB,wBAAwB,EAAE,IAAI;YAC9B,qBAAqB,EAAE,IAAI;SAC5B,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,mBAAmB,CAAC,SAAe;QACvC,MAAM,IAAI,CAAC,KAAK;aACb,OAAO,CAAC,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,CAAC;aAC3D,MAAM,EAAE;aACR,GAAG,EAAE,CAAC;IACX,CAAC;IAED,WAAW,CAAC,MAAc;QACxB,OAAO,IAAI,CAAC,KAAK;aACd,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;aACxB,GAAG,EAAE;aACL,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CACZ,GAAG;aACA,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;aACxC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAClC,CAAC;IACN,CAAC;IAED,cAAc,CAAC,MAAc;QAC3B,OAAO,IAAI,CAAC,KAAK;aACd,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;aACxB,MAAM,EAAE;aACR,GAAG,EAAE;aACL,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;CACF;AA9ED,oCA8EC"}
|
|
@@ -9,18 +9,20 @@ declare const UserExternalIdentityModel_base: {
|
|
|
9
9
|
readonly table: import("@antelopejs/interface-database").Table<UserExternalIdentity>;
|
|
10
10
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
11
11
|
get(id: string): PromiseLike<UserExternalIdentity | undefined>;
|
|
12
|
-
getBy(index: keyof UserExternalIdentity, ...keys:
|
|
12
|
+
getBy(index: keyof UserExternalIdentity, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<UserExternalIdentity[]>;
|
|
13
13
|
getAll(): PromiseLike<UserExternalIdentity[]>;
|
|
14
14
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserExternalIdentity> | import("@antelopejs/interface-database-decorators").DeepPartial<UserExternalIdentity>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
15
15
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserExternalIdentity>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
16
|
-
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserExternalIdentity
|
|
16
|
+
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<UserExternalIdentity> & {
|
|
17
|
+
_id: string;
|
|
18
|
+
}, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
17
19
|
delete(id: string): Promise<number>;
|
|
18
20
|
};
|
|
19
|
-
readonly schemaName: string;
|
|
21
|
+
readonly schemaName: string | undefined;
|
|
20
22
|
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<UserExternalIdentity>;
|
|
21
|
-
fromPlainData(obj:
|
|
23
|
+
fromPlainData(obj: UserExternalIdentity | import("@antelopejs/interface-database-decorators").PlainData<UserExternalIdentity>): UserExternalIdentity;
|
|
22
24
|
fromDatabase(obj: any): UserExternalIdentity | undefined;
|
|
23
|
-
toDatabase(obj:
|
|
25
|
+
toDatabase(obj: UserExternalIdentity | import("@antelopejs/interface-database-decorators").PlainData<UserExternalIdentity>): import("@antelopejs/interface-database-decorators").StoredRow<UserExternalIdentity>;
|
|
24
26
|
validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
|
|
25
27
|
};
|
|
26
28
|
export declare class UserExternalIdentityModel extends UserExternalIdentityModel_base {
|
|
@@ -12,18 +12,20 @@ declare const UserModel_base: {
|
|
|
12
12
|
readonly table: import("@antelopejs/interface-database").Table<User>;
|
|
13
13
|
readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
|
|
14
14
|
get(id: string): PromiseLike<User | undefined>;
|
|
15
|
-
getBy(index:
|
|
15
|
+
getBy(index: "_id" | "createdAt" | "updatedAt" | "email" | "name" | "avatar" | "language" | "timeZone" | "weekStart" | "timeFormat" | "dateFormat" | "password" | "passwordChangedAt" | "authKey" | "isValidated" | "validationToken" | "validationRequestedAt" | "forgotPasswordToken" | "forgotPasswordRequestedAt" | "owner" | "lastActiveAt" | "twoFactorMethods" | "twoFactorSecret" | "twoFactorPendingSecret" | "twoFactorTotpLastStep" | "twoFactorBackupCodes" | "twoFactorBackupCodesGeneratedAt" | "twoFactorBackupCodesSavedAt" | "twoFactorEmailCode" | "twoFactorEmailCodeRequestedAt" | "testHash" | "testHashAsync" | "isHashOutdated", ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<User[]>;
|
|
16
16
|
getAll(): PromiseLike<User[]>;
|
|
17
17
|
insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<User> | import("@antelopejs/interface-database-decorators").DeepPartial<User>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
|
|
18
18
|
update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<User>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
19
|
-
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<User
|
|
19
|
+
update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<User> & {
|
|
20
|
+
_id: string;
|
|
21
|
+
}, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
|
|
20
22
|
delete(id: string): Promise<number>;
|
|
21
23
|
};
|
|
22
|
-
readonly schemaName: string;
|
|
24
|
+
readonly schemaName: string | undefined;
|
|
23
25
|
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<User>;
|
|
24
|
-
fromPlainData(obj:
|
|
26
|
+
fromPlainData(obj: User | import("@antelopejs/interface-database-decorators").PlainData<User>): User;
|
|
25
27
|
fromDatabase(obj: any): User | undefined;
|
|
26
|
-
toDatabase(obj:
|
|
28
|
+
toDatabase(obj: User | import("@antelopejs/interface-database-decorators").PlainData<User>): import("@antelopejs/interface-database-decorators").StoredRow<User>;
|
|
27
29
|
validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
|
|
28
30
|
};
|
|
29
31
|
export declare class UserModel extends UserModel_base {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Table } from "@antelopejs/interface-database-decorators";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ImageValue } from "../../../types";
|
|
3
3
|
export declare const USERS_TABLE_NAME = "users";
|
|
4
4
|
/** First day of the week: 0 Sunday, 1 Monday, 6 Saturday. */
|
|
5
5
|
export type UserWeekStart = 0 | 1 | 6;
|
|
@@ -22,7 +22,7 @@ export declare class User extends User_base {
|
|
|
22
22
|
* Profile picture as an image value ({ key, alt? }) in the default storage,
|
|
23
23
|
* downscaled client-side to a square of at most 100x100 pixels.
|
|
24
24
|
*/
|
|
25
|
-
avatar:
|
|
25
|
+
avatar: ImageValue | null;
|
|
26
26
|
/**
|
|
27
27
|
* User's preferred language/locale (e.g., 'en', 'fr')
|
|
28
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.table.js","sourceRoot":"","sources":["../../../../src/auth/db/tables/users.table.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6FASmD;AACnD,kDAAsD;AAGzC,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAYjC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qCAAK,CAAC,IAAI,CAAC,4CAAY,CAAC;CAwJjD,CAAA;AAxJY,oBAAI;AAEP;IADP,IAAA,qCAAK,EAAC,QAAQ,CAAC;;iCACI;AAKZ;IAHP,IAAA,qCAAK,GAAE;IACP,IAAA,4CAAY,GAAE;IACd,IAAA,qCAAK,E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;eAvJxC,IAAI;IADhB,IAAA,6CAAa,EAAC,wBAAgB,EAAE,4BAAgB,CAAC;GACrC,IAAI,CAwJhB"}
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -40,17 +40,17 @@ export declare namespace internal {
|
|
|
40
40
|
/**
|
|
41
41
|
* Authentication decorator that returns raw user data, ignoring email validation.
|
|
42
42
|
*/
|
|
43
|
-
export declare const AuthRawUser: (validator?: ((data: TenantTokenInput) => boolean | User | Promise<boolean | User>) | undefined) => import("@antelopejs/interface-core/decorators").
|
|
43
|
+
export declare const AuthRawUser: (validator?: ((data: TenantTokenInput) => boolean | User | Promise<boolean | User>) | undefined) => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").ClassDecorator<import("@antelopejs/interface-core/decorators").Class<object, any[]>> & import("@antelopejs/interface-core/decorators").ParameterDecorator;
|
|
44
44
|
/**
|
|
45
45
|
* Authentication decorator that provides the `User` instance and enforces email validation
|
|
46
46
|
* if required by the configuration.
|
|
47
47
|
*/
|
|
48
|
-
export declare const AuthUser: (validator?: ((data: TenantTokenInput) => boolean | User | Promise<boolean | User>) | undefined) => import("@antelopejs/interface-core/decorators").
|
|
48
|
+
export declare const AuthUser: (validator?: ((data: TenantTokenInput) => boolean | User | Promise<boolean | User>) | undefined) => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").ClassDecorator<import("@antelopejs/interface-core/decorators").Class<object, any[]>> & import("@antelopejs/interface-core/decorators").ParameterDecorator;
|
|
49
49
|
/**
|
|
50
50
|
* Optional authentication decorator that returns User | undefined without throwing 401
|
|
51
51
|
* Use this for routes that work both when authenticated and unauthenticated
|
|
52
52
|
*/
|
|
53
|
-
export declare const IfAuthUser: (validator?: ((data: TenantTokenInput | undefined) => User | Promise<User | undefined> | undefined) | undefined) => import("@antelopejs/interface-core/decorators").
|
|
53
|
+
export declare const IfAuthUser: (validator?: ((data: TenantTokenInput | undefined) => User | Promise<User | undefined> | undefined) | undefined) => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").ClassDecorator<import("@antelopejs/interface-core/decorators").Class<object, any[]>> & import("@antelopejs/interface-core/decorators").ParameterDecorator;
|
|
54
54
|
/**
|
|
55
55
|
* Authentication decorator that requires the authenticated user to be a platform
|
|
56
56
|
* owner (`User.owner === true`). Throws 401 when no token is provided and 403
|
|
@@ -61,7 +61,7 @@ export declare const IfAuthUser: (validator?: ((data: TenantTokenInput | undefin
|
|
|
61
61
|
*
|
|
62
62
|
* @returns Authentication decorator
|
|
63
63
|
*/
|
|
64
|
-
export declare const AuthOwnerOnly: () => import("@antelopejs/interface-core/decorators").
|
|
64
|
+
export declare const AuthOwnerOnly: () => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").ClassDecorator<import("@antelopejs/interface-core/decorators").Class<object, any[]>> & import("@antelopejs/interface-core/decorators").ParameterDecorator;
|
|
65
65
|
/**
|
|
66
66
|
* Generate an access token for a user
|
|
67
67
|
* @param tenantId
|
|
@@ -16,5 +16,5 @@ type Validator<T, R> = (data: T) => R | Promise<R>;
|
|
|
16
16
|
export declare function CreateJwtAuthDecorator<T extends VerifiedToken | undefined, R>(callbacks: {
|
|
17
17
|
authenticator: Authenticator<T>;
|
|
18
18
|
validator: Validator<T, R>;
|
|
19
|
-
}): (validator?: Validator<T, R> | undefined) => import("@antelopejs/interface-core/decorators").
|
|
19
|
+
}): (validator?: Validator<T, R> | undefined) => import("@antelopejs/interface-core/decorators").PropertyDecorator & import("@antelopejs/interface-core/decorators").ClassDecorator<import("@antelopejs/interface-core/decorators").Class<object, any[]>> & import("@antelopejs/interface-core/decorators").ParameterDecorator;
|
|
20
20
|
export {};
|
|
@@ -4,6 +4,8 @@ exports.CreateJwtAuthDecorator = CreateJwtAuthDecorator;
|
|
|
4
4
|
const interface_api_1 = require("@antelopejs/interface-api");
|
|
5
5
|
const decorators_1 = require("@antelopejs/interface-core/decorators");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
+
const decorated_class_1 = require("../../utils/internal/decorated-class");
|
|
8
|
+
const type_check_1 = require("../../utils/internal/type-check");
|
|
7
9
|
const request_authenticators_1 = require("./request-authenticators");
|
|
8
10
|
const CLASS_PROVIDER_DESCRIPTION = "authentication-class-provider";
|
|
9
11
|
function bearerToken(ctx) {
|
|
@@ -12,11 +14,9 @@ function bearerToken(ctx) {
|
|
|
12
14
|
return typeof header === "string" ? header.split(" ")[1] : undefined;
|
|
13
15
|
}
|
|
14
16
|
function isVerifiedUser(value) {
|
|
15
|
-
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- A custom authenticator validator can return any value; only an object with a string id binds a principal.
|
|
16
17
|
if (typeof value !== "object" || value === null)
|
|
17
18
|
return false;
|
|
18
19
|
const { _id } = value;
|
|
19
|
-
// oxlint-disable-next-line anti-slop/no-runtime-typeof -- The verified principal requires a string id rather than an arbitrary validator result.
|
|
20
20
|
return typeof _id === "string";
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -44,7 +44,10 @@ function CreateJwtAuthDecorator(callbacks) {
|
|
|
44
44
|
return result;
|
|
45
45
|
};
|
|
46
46
|
if (key === undefined) {
|
|
47
|
-
(0,
|
|
47
|
+
if (!(0, type_check_1.isClass)(target)) {
|
|
48
|
+
throw new TypeError("A class decorator applies to a class.");
|
|
49
|
+
}
|
|
50
|
+
(0, interface_api_1.SetParameterProvider)((0, decorated_class_1.prototypeOf)(target), Symbol(CLASS_PROVIDER_DESCRIPTION), undefined, provider);
|
|
48
51
|
return;
|
|
49
52
|
}
|
|
50
53
|
(0, interface_api_1.SetParameterProvider)(target, key, index, provider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt-auth-decorator.js","sourceRoot":"","sources":["../../../src/auth/internal/jwt-auth-decorator.ts"],"names":[],"mappings":";;AAuCA,
|
|
1
|
+
{"version":3,"file":"jwt-auth-decorator.js","sourceRoot":"","sources":["../../../src/auth/intern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,CAAC,GAAG;oBAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,6BAAiB;iBAC7C,CAAC,CAAC;YACL,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;QACF,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,IAAI,CAAC,IAAA,oBAAO,EAAC,MAAM,CAAC,EAAE,CAAC;gBACrB,MAAM,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAC;YAC/D,CAAC;YACD,IAAA,oCAAoB,EAClB,IAAA,6BAAW,EAAC,MAAM,CAAC,EACnB,MAAM,CAAC,0BAA0B,CAAC,EAClC,SAAS,EACT,QAAQ,CACT,CAAC;YACF,OAAO;QACT,CAAC;QACD,IAAA,oCAAoB,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,18 @@ interface RequestIdentity {
|
|
|
8
8
|
export declare function getAuthenticatedRequestTenantId(ctx: RequestContext): string | undefined;
|
|
9
9
|
/** @internal Revalidate on every call; failures poison tenant resolution for this request. */
|
|
10
10
|
export declare function resolveRequestPrincipal(ctx: RequestContext, authenticators: readonly RequestAuthenticator[], authenticateJwt: (token: string) => Promise<RequestPrincipal>): Promise<RequestPrincipal>;
|
|
11
|
+
/**
|
|
12
|
+
* @internal The tenant of the request's credential, for a provider resolved
|
|
13
|
+
* alongside the route's guards. It waits for the authentications the
|
|
14
|
+
* request's other providers start in the same pass, then answers the tenant
|
|
15
|
+
* they bound. Without one it verifies the bearer token with `verifyToken` and
|
|
16
|
+
* binds its identity; a token it cannot verify reads as anonymous, and any
|
|
17
|
+
* identity bound to the request afterwards is refused.
|
|
18
|
+
*
|
|
19
|
+
* @throws HTTPResult 401 when the request's authentication failed, its
|
|
20
|
+
* credential changed, or a verified identity conflicts with the bound one
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveRequestTenant(ctx: RequestContext, verifyToken: (token: string) => Promise<RequestIdentity | undefined>): Promise<string | undefined>;
|
|
11
23
|
/**
|
|
12
24
|
* @internal Records the identity a JWT auth decorator has just verified, so
|
|
13
25
|
* `getRequestTenantId` reads the tenant of a checked credential. A request
|