@antelopejs/interface-dms 0.7.1 → 0.7.3
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 +86 -0
- package/README.md +70 -68
- package/dist/auth/db/models/sessions.model.d.ts +1 -0
- package/dist/auth/db/models/userExternalIdentities.model.d.ts +1 -0
- package/dist/auth/db/models/users.model.d.ts +1 -0
- package/dist/base/block-registry/index.d.ts +1 -0
- package/dist/base/block-registry/index.js +1 -0
- package/dist/base/block-registry/index.js.map +1 -1
- package/dist/base/block-registry/presentation.d.ts +21 -0
- package/dist/base/block-registry/presentation.js +108 -0
- package/dist/base/block-registry/presentation.js.map +1 -0
- package/dist/base/block-types.d.ts +1 -0
- package/dist/base/block-types.js +1 -0
- package/dist/base/block-types.js.map +1 -1
- package/dist/base/live-toggle.d.ts +2 -2
- package/dist/base/period-selector.d.ts +2 -2
- package/dist/base/placeholder.js +2 -2
- package/dist/base/placeholder.js.map +1 -1
- package/dist/base/table-view/schema.d.ts +4 -4
- package/dist/db/internal/exportJobs.model.d.ts +1 -0
- package/dist/db/internal/inviteResolutions.model.d.ts +1 -0
- package/dist/db/internal/tenantLifecycle.model.d.ts +1 -0
- package/dist/db/models/roles.model.d.ts +1 -0
- package/dist/db/models/tenantMembers.model.d.ts +1 -0
- package/dist/db/models/tenants.model.d.ts +1 -0
- package/dist/db/models/user_invites.model.d.ts +1 -0
- package/docs/.navigation.yml +2 -0
- package/docs/1.core/.navigation.yml +2 -0
- package/docs/1.core/1.introduction.md +169 -0
- package/docs/1.core/10.layout-banners.md +133 -0
- package/docs/1.core/2.pages-and-modules.md +649 -0
- package/docs/1.core/3.components.md +287 -0
- package/docs/1.core/4.permissions.md +279 -0
- package/docs/1.core/5.tenancy.md +358 -0
- package/docs/1.core/6.invites.md +239 -0
- package/docs/1.core/7.hooks.md +354 -0
- package/docs/1.core/8.realtime.md +147 -0
- package/docs/1.core/9.quick-actions.md +115 -0
- package/docs/2.auth/.navigation.yml +2 -0
- package/docs/2.auth/1.introduction.md +75 -0
- package/docs/2.auth/2.authentication.md +222 -0
- package/docs/2.auth/3.tokens-and-sessions.md +352 -0
- package/docs/2.auth/4.users.md +256 -0
- package/docs/2.auth/5.external-identities.md +122 -0
- package/docs/3.base/.navigation.yml +2 -0
- package/docs/3.base/1.introduction.md +202 -0
- package/docs/3.base/10.display-blocks.md +136 -0
- package/docs/3.base/2.types.md +402 -0
- package/docs/3.base/3.forms.md +349 -0
- package/docs/3.base/4.tables.md +608 -0
- package/docs/3.base/5.charts-and-widgets.md +466 -0
- package/docs/3.base/6.layout.md +437 -0
- package/docs/3.base/8.data-types.md +361 -0
- package/docs/3.base/9.helpers.md +414 -0
- package/docs/4.notifications/.navigation.yml +2 -0
- package/docs/4.notifications/1.introduction.md +81 -0
- package/docs/4.notifications/2.categories-and-subjects.md +214 -0
- package/docs/4.notifications/3.sending.md +285 -0
- package/docs/5.html-render/.navigation.yml +2 -0
- package/docs/5.html-render/1.introduction.md +386 -0
- package/docs/5.html-render/2.built-in-emails.md +157 -0
- 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/docs/index.md +109 -0
- package/docs/tsconfig.json +11 -0
- package/package.json +25 -18
package/docs/index.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "The DMS interface"
|
|
3
|
+
description: "One public package, @antelopejs/interface-dms, holds every contract a module uses — its subpaths, domain by domain."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# The DMS interface
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
The DMS ships one public AntelopeJS interface package, `@antelopejs/interface-dms`. Everything a module needs to declare pages, build components, authenticate a request, send a notification or render an HTML template comes from that single package, through a subpath named after the domain it belongs to. Never reach the surface through the runtime package `@antelopejs/dms`.
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@antelopejs/interface-dms": ">=0.0.1 <1.0.0"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This section is the contract reference: the exact symbol names, options and return types, grouped by domain. The DMS guide covers the same ground task by task, organised around what you are building.
|
|
21
|
+
|
|
22
|
+
If you are learning the DMS, start with the [Quickstart](/docs/getting-started/quickstart) and [Pages & components](/docs/building/pages-and-components). Return here when you need an import path, a signature, or the exact behavior of an option; you do not need to read every domain before building a page.
|
|
23
|
+
|
|
24
|
+
| Task | Guide with examples | Contract reference |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| Build a page and choose its layout | [Pages & components](/docs/building/pages-and-components) | [Pages and modules](/docs/interfaces/core/pages-and-modules), [Layout](/docs/interfaces/base/layout) |
|
|
27
|
+
| Add workspace settings | [Settings pages](/docs/building/settings-pages) | [Page access](/docs/interfaces/core/pages-and-modules#page-access) |
|
|
28
|
+
| Protect a route and scope its data | [Auth & tenancy](/docs/auth-and-tenancy/overview) | [Authentication](/docs/interfaces/auth/authentication), [Tenancy](/docs/interfaces/core/tenancy) |
|
|
29
|
+
| Extend another module's screen | [Page extensions](/docs/building/pages-and-components#extending-another-modules-page) | [Extend a page](/docs/interfaces/core/pages-and-modules#extend-a-page-from-another-module) |
|
|
30
|
+
|
|
31
|
+
Separately published extension interfaces have their own [module interface references](/docs/modules#interface-references), including Builder. This page covers `@antelopejs/interface-dms` itself.
|
|
32
|
+
|
|
33
|
+
## One installed copy
|
|
34
|
+
|
|
35
|
+
The host and every module must resolve **the same installed copy** of `@antelopejs/interface-dms`. The package holds live state, not just types: the page, category and extension registries, the permission tree, the hook registry, the data-type and block registries and the component slot resolvers. A second copy gets its own empty registries: pages register into a tree nobody reads, permissions never reach the roles form, and hooks never fire, without any error. `@antelopejs/core` checks this before constructing modules and fails with `Incompatible interface package resolution` when a module resolves another copy.
|
|
36
|
+
|
|
37
|
+
Depend on the package with a wide range, raising the lower bound to the version you need rather than pinning an upper one, so package managers can deduplicate, and never vendor or bundle it into a module. `@antelopejs/dms`, which implements the interface, is the exception: it caps its range below the next minor, so a breaking minor never reaches an older DMS.
|
|
38
|
+
|
|
39
|
+
The runtime also hands a module a per-context view of the values it receives through an interface, so reference equality does not survive the round trip. Compare registrations on a field, never with `===`, and compare plain data rather than the views themselves: `isDeepStrictEqual` and `assert.deepStrictEqual` refuse two views that hold equal values.
|
|
40
|
+
|
|
41
|
+
## The Domains
|
|
42
|
+
|
|
43
|
+
| Domain | What it is for | Import prefix |
|
|
44
|
+
| ------ | -------------- | ------------- |
|
|
45
|
+
| [Core](/docs/interfaces/core/introduction) | Pages, modules, components, permissions, tenancy, invites, hooks, realtime, quick actions and layout banners. | `@antelopejs/interface-dms` and its root-level subpaths |
|
|
46
|
+
| [Auth](/docs/interfaces/auth/introduction) | Authentication decorators, token and session handling, and the user and session tables. | `@antelopejs/interface-dms/auth` |
|
|
47
|
+
| [Base](/docs/interfaces/base/introduction) | The component vocabulary: forms, tables, charts, layout, trees, data types and the shared prop types. | `@antelopejs/interface-dms/base` |
|
|
48
|
+
| [Notifications](/docs/interfaces/notifications/introduction) | Declaring notification categories and subjects, and building and sending notifications. | `@antelopejs/interface-dms/notifications` |
|
|
49
|
+
| [HTML Render](/docs/interfaces/html-render/introduction) | Registering HTML templates and rendering them server-side. | `@antelopejs/interface-dms/html-render` |
|
|
50
|
+
|
|
51
|
+
Start with [Core](/docs/interfaces/core/introduction) and [Base](/docs/interfaces/base/introduction): the first declares pages and the components they carry as serializable data, the second is the concrete set of components you fill those pages with. [Auth](/docs/interfaces/auth/introduction) resolves a request to a user, which the permission and tenant guards build on. The remaining two stand on their own and are used where you need them.
|
|
52
|
+
|
|
53
|
+
## Subpath Map
|
|
54
|
+
|
|
55
|
+
Each subpath is its own entry point: importing one does not pull the others in, and the modules that register schemas or controllers as they evaluate are deliberately kept off the root barrel. Every domain's introduction carries the detailed map of its own subpaths; this is the whole set at a glance.
|
|
56
|
+
|
|
57
|
+
| Subpath | Holds | Domain |
|
|
58
|
+
| ------- | ----- | ------ |
|
|
59
|
+
| `@antelopejs/interface-dms` | The root barrel over the core surface below | [Core](/docs/interfaces/core/introduction) |
|
|
60
|
+
| `/page` | Pages, categories, modules, layouts, page extensions, dynamic menus, frontend modules | [Core](/docs/interfaces/core/pages-and-modules) |
|
|
61
|
+
| `/component` | `Component`, `ComponentBuilder`, actions, watches | [Core](/docs/interfaces/core/components) |
|
|
62
|
+
| `/component-slots` | `RegisterComponentSlot`, `ComponentSlotResolver`, `SlotOptions` | [Core](/docs/interfaces/core/components#registercomponentslot) |
|
|
63
|
+
| `/attachments` | `SaveComponentFiles` and its request, field and result types | [Core](/docs/interfaces/core/pages-and-modules#savecomponentfiles) |
|
|
64
|
+
| `/permission-gate` | Shared `PermissionGate` fields for permission-filtered UI | [Base](/docs/interfaces/base/types#permissiongate) |
|
|
65
|
+
| `/permissions` | The permission registry and the permission computation | [Core](/docs/interfaces/core/permissions) |
|
|
66
|
+
| `/permissions-resolver` | Registering and running permission resolvers | [Core](/docs/interfaces/core/permissions) |
|
|
67
|
+
| `/guards` | `AuthUserWithPermission`, `AuthTenantOwner`, `AuthTenantMember` | [Core](/docs/interfaces/core/permissions) |
|
|
68
|
+
| `/constants` | Schema names and the default tenant | [Core](/docs/interfaces/core/tenancy) |
|
|
69
|
+
| `/db`, `/db/models`, `/db/tables` | The `Tenant`, `TenantMember`, `Role` and `UserInvite` tables and models | [Core](/docs/interfaces/core/tenancy) |
|
|
70
|
+
| `/request-tenant` | `getRequestTenantId` | [Core](/docs/interfaces/core/tenancy) |
|
|
71
|
+
| `/tenant-scoped-model` | `TenantScopedModel` | [Core](/docs/interfaces/core/tenancy) |
|
|
72
|
+
| `/tenant-access` | Tenant access gates | [Core](/docs/interfaces/core/tenancy) |
|
|
73
|
+
| `/tenant-ownership` | Membership and ownership writes | [Core](/docs/interfaces/core/tenancy) |
|
|
74
|
+
| `/tenant-lifecycle` | Producer admission and permanent closure before tenant deletion | [Core](/docs/interfaces/core/tenancy#tenant-lifecycle-admission) |
|
|
75
|
+
| `/data-controllers` | The built-in members and roles data controllers | [Core](/docs/interfaces/core/tenancy) |
|
|
76
|
+
| `/invites` | Inviting a user into a tenant | [Core](/docs/interfaces/core/invites) |
|
|
77
|
+
| `/invite-extensions` | Invite form contributions, validation, delivery and availability | [Core](/docs/interfaces/core/invites#registerinviteextension) |
|
|
78
|
+
| `/invite-resolution` | Durable terminal decisions and retryable invite effects | [Core](/docs/interfaces/core/invites#durable-invite-resolution) |
|
|
79
|
+
| `/hooks` | The `Hook` enum, handlers and dispatch | [Core](/docs/interfaces/core/hooks) |
|
|
80
|
+
| `/tenant-export` | The tenant export archive, contribution and manifest types | [Core](/docs/interfaces/core/hooks) |
|
|
81
|
+
| `/realtime` | Page topics, publishing and backend subscription | [Core](/docs/interfaces/core/realtime) |
|
|
82
|
+
| `/quick-actions` | Command-palette entries | [Core](/docs/interfaces/core/quick-actions) |
|
|
83
|
+
| `/layout-banners` | Global banners under the dashboard header | [Core](/docs/interfaces/core/layout-banners) |
|
|
84
|
+
| `/uploads` | Signed upload tokens for the file and image fields of a serialized component | [Core](/docs/interfaces/core/pages-and-modules) |
|
|
85
|
+
| `/types` | `MaybePromise`, the one shared type alias | [Core](/docs/interfaces/core/pages-and-modules) |
|
|
86
|
+
| `/api-base-url`, `/client-base-url` | `GetApiBaseUrl`, `GetClientBaseUrl`: the public origins of the API and the dashboard | [Core](/docs/interfaces/core/pages-and-modules#public-urls) |
|
|
87
|
+
| `/client-ip` | `getClientIp`, `ResolveClientIp`: a request's client address behind the trusted proxies | [Core](/docs/interfaces/core/pages-and-modules#client-address) |
|
|
88
|
+
| `/auth` | Authentication decorators, tokens, sessions, external identities, account mail | [Auth](/docs/interfaces/auth/introduction) |
|
|
89
|
+
| `/auth/db`, `/auth/db/models`, `/auth/db/tables` | The `User`, `Session` and `UserExternalIdentity` tables and models | [Auth](/docs/interfaces/auth/users) |
|
|
90
|
+
| `/base` | The component barrel: forms, tables, charts, cards, layout, trees | [Base](/docs/interfaces/base/introduction) |
|
|
91
|
+
| `/base/types` | Base props, colours, sizes, buttons, action targets, row-action rules, guards | [Base](/docs/interfaces/base/types) |
|
|
92
|
+
| `/base/form` | `Form`, the field and group shapes, `FormComponents`, `FormEvents`, the schema helpers | [Base](/docs/interfaces/base/forms) |
|
|
93
|
+
| `/base/table-view` | `TableView`, `@Column`, `TableViewRoutes`, guards, row actions | [Base](/docs/interfaces/base/tables) |
|
|
94
|
+
| `/base/data-types` | `DataType`, the registration decorators, `DefaultDataTypes`, `DefaultDataCompareTypes`, `StatusType` | [Base](/docs/interfaces/base/data-types) |
|
|
95
|
+
| `/base/…` | The per-component subpaths — `chart`, `grid`, `stack`, `tab`, `tree`, `custom`, `layouts`, `helpers/…` | [Base](/docs/interfaces/base/introduction) |
|
|
96
|
+
| `/notifications`, `/notifications/types` | Categories, subjects, the notification builder and its dispatch targets | [Notifications](/docs/interfaces/notifications/introduction) |
|
|
97
|
+
| `/html-render` | `RegisterHtmlTemplate`, `GenerateHtml` and the template reference types | [HTML Render](/docs/interfaces/html-render/introduction) |
|
|
98
|
+
|
|
99
|
+
Beyond these entry points, built files are importable through the `./*` export (`@antelopejs/interface-dms/base/form-types`). Moving or renaming a public path is a breaking change, like removing an export.
|
|
100
|
+
|
|
101
|
+
Importability does not make a declaration public. Paths under `internal/`, symbols tagged `@internal`, and `internal` namespaces are wiring between the interface and its implementation, not supported consumer APIs. This includes compatibility exports retained at old paths. Public types named by a supported signature remain part of its contract; use the documented entry points rather than calling internal proxies or raw writer helpers.
|
|
102
|
+
|
|
103
|
+
## How to Read a Domain
|
|
104
|
+
|
|
105
|
+
Every domain folder opens with `1.introduction.md`. It gives you the overview, the key features, the AntelopeJS packages the domain depends on, one runnable quick-start example, and the list of the folder's other pages.
|
|
106
|
+
|
|
107
|
+
The numbered pages after it are topic pages, ordered so that reading them front to back builds up. Each one starts with an overview, then works through the surface task by task with a code example per section and a table for anything that takes options. Every topic page ends with a link to the next one, so you can also follow a folder straight through from its introduction.
|
|
108
|
+
|
|
109
|
+
Read a topic page on its own when you already know which surface you need.
|
package/package.json
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/interface-dms",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Public AntelopeJS interfaces of the DMS: pages, components, permissions, tenancy, auth, notifications and HTML rendering.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
7
7
|
"dms",
|
|
8
8
|
"interface"
|
|
9
9
|
],
|
|
10
|
+
"homepage": "https://dms.antelopejs.com/docs/interfaces",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/AntelopeJS/dms/issues"
|
|
13
|
+
},
|
|
10
14
|
"license": "Apache-2.0",
|
|
11
15
|
"repository": {
|
|
12
16
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/AntelopeJS/dms.git"
|
|
17
|
+
"url": "git+https://github.com/AntelopeJS/dms.git",
|
|
18
|
+
"directory": "packages/interface-dms"
|
|
14
19
|
},
|
|
15
20
|
"files": [
|
|
16
21
|
"dist",
|
|
17
22
|
"!dist/.tsbuildinfo",
|
|
23
|
+
"docs",
|
|
18
24
|
"package.json",
|
|
19
25
|
"README.md",
|
|
20
26
|
"CHANGELOG.md",
|
|
@@ -27,6 +33,7 @@
|
|
|
27
33
|
"scripts": {
|
|
28
34
|
"build": "rimraf dist && tsc",
|
|
29
35
|
"typecheck": "tsc --noEmit",
|
|
36
|
+
"test": "pnpm run build && node --test tests/*.test.cjs",
|
|
30
37
|
"lint": "oxlint && oxfmt --check .",
|
|
31
38
|
"lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt .",
|
|
32
39
|
"format": "oxfmt .",
|
|
@@ -44,24 +51,24 @@
|
|
|
44
51
|
"zod-to-json-schema": "~3.24.6"
|
|
45
52
|
},
|
|
46
53
|
"peerDependencies": {
|
|
47
|
-
"@antelopejs/interface-api": ">=0.0.
|
|
48
|
-
"@antelopejs/interface-api-util": ">=0.1.
|
|
49
|
-
"@antelopejs/interface-auth": ">=0.0.
|
|
50
|
-
"@antelopejs/interface-core": ">=0.2.
|
|
51
|
-
"@antelopejs/interface-data-api": ">=0.2.
|
|
52
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
53
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
54
|
-
"@antelopejs/interface-file-storage": ">=0.1.
|
|
54
|
+
"@antelopejs/interface-api": ">=0.0.15 <1.0.0",
|
|
55
|
+
"@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
|
|
56
|
+
"@antelopejs/interface-auth": ">=0.0.7 <1.0.0",
|
|
57
|
+
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
58
|
+
"@antelopejs/interface-data-api": ">=0.2.2 <1.0.0",
|
|
59
|
+
"@antelopejs/interface-database": ">=0.1.10 <1.0.0",
|
|
60
|
+
"@antelopejs/interface-database-decorators": ">=0.1.9 <1.0.0",
|
|
61
|
+
"@antelopejs/interface-file-storage": ">=0.1.4 <1.0.0"
|
|
55
62
|
},
|
|
56
63
|
"devDependencies": {
|
|
57
|
-
"@antelopejs/interface-api": ">=0.0.
|
|
58
|
-
"@antelopejs/interface-api-util": ">=0.1.
|
|
59
|
-
"@antelopejs/interface-auth": ">=0.0.
|
|
60
|
-
"@antelopejs/interface-core": ">=0.2.
|
|
61
|
-
"@antelopejs/interface-data-api": ">=0.2.
|
|
62
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
63
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
64
|
-
"@antelopejs/interface-file-storage": ">=0.1.
|
|
64
|
+
"@antelopejs/interface-api": ">=0.0.15 <1.0.0",
|
|
65
|
+
"@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
|
|
66
|
+
"@antelopejs/interface-auth": ">=0.0.7 <1.0.0",
|
|
67
|
+
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
68
|
+
"@antelopejs/interface-data-api": ">=0.2.2 <1.0.0",
|
|
69
|
+
"@antelopejs/interface-database": ">=0.1.10 <1.0.0",
|
|
70
|
+
"@antelopejs/interface-database-decorators": ">=0.1.9 <1.0.0",
|
|
71
|
+
"@antelopejs/interface-file-storage": ">=0.1.4 <1.0.0",
|
|
65
72
|
"@types/jsonwebtoken": "^9.0.10",
|
|
66
73
|
"@types/node": "^24.0.0",
|
|
67
74
|
"@types/randomstring": "^1.3.0",
|