@aglyn/plugins-inbox 1.0.0-beta.143 → 1.0.0-beta.144

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.
Files changed (2) hide show
  1. package/README.md +73 -6
  2. package/package.json +10 -10
package/README.md CHANGED
@@ -1,7 +1,74 @@
1
- # @aglyn/plugins-ui-data
1
+ # @aglyn/plugins-inbox
2
2
 
3
- The Data feature plugin (AGL-313) the reference
4
- implementation of the console+UI feature-plugin pair (AGL-277). The
5
- `event-list` component moved here from `plugins-ui-mui`; legacy screen
6
- nodes persisted with pluginId `mui` keep rendering because resolution is
7
- by componentId.
3
+ The Inbox plugin for Aglyn: a console surface for reading a site's form submissions, replying to the people who sent them, and seeing the site's members and leads. Install it if you are running or building on the Aglyn platform and want its inbox.
4
+
5
+ > Beta. Published from the Aglyn monorepo under the `beta` dist-tag; APIs can change between beta releases.
6
+
7
+ ## Install
8
+
9
+ npm install @aglyn/plugins-inbox@beta
10
+
11
+ Peer dependencies:
12
+
13
+ - `@mui/material`
14
+ - `@mui/x-data-grid`
15
+ - `firebase`
16
+ - `firebase-admin`
17
+ - `next`
18
+ - `react`
19
+
20
+ None is optional. `firebase-admin` and `next` are used by the server half (`@aglyn/plugins-inbox/server`).
21
+
22
+ ## What's in it
23
+
24
+ This package is a first-party Aglyn plugin. It is loaded through Aglyn's plugin manager: the apps read its entry in the monorepo's `plugins.config.json`, import the module each surface names, and call the registrar declared for that surface. It is not a standalone library; installing it on its own loads nothing.
25
+
26
+ The Inbox is console-only. Submissions, members and leads live in Firestore and have no canvas component, so it adds nothing to a published page and declares no `site` registrar. It is not a mailbox: nothing in it receives mail. A submission arrives as a form post, and a reply is sent with `Reply-To` set to the sender's own console account address, so answers go to a real mailbox.
27
+
28
+ ### In the console
29
+
30
+ `registerInboxConsole()` registers:
31
+
32
+ - An **Inbox** nav item and page at `/inbox`, with the sections Submissions, Members & leads, and Campaigns as routes. The page is code-split.
33
+ - An "Inbox" glance widget in the `hostDashboard` slot.
34
+ - A "Submissions" widget in the `formSubmissions` slot, a zone the forms plugin hosts on a form's page. It is the Inbox's own table narrowed to that form.
35
+ - Two zones the Inbox hosts for other plugins: the body of its Campaigns section, and a "where this came from" attribution area on a lead or submission. The plugin that owns campaigns draws in both.
36
+
37
+ ### On the server
38
+
39
+ `registerInboxConsoleApi()` from `@aglyn/plugins-inbox/server` (the `consoleApi` surface) registers:
40
+
41
+ - `inbox/reply`: send one reply to the person who made a submission. A reply is transactional, so no marketing consent is read, but the suppression lists still apply.
42
+ - `inbox/list-options` and `inbox/assign-list`: show which marketing lists a submitter may be put on, and enroll them. Replying enrolls nobody, and enrolling sends nothing.
43
+
44
+ Routes are served by the host app's API dispatcher under `/api/`.
45
+
46
+ ### Entry points
47
+
48
+ | import | contents |
49
+ | -- | -- |
50
+ | `@aglyn/plugins-inbox` | `BUNDLE_ID` and `registerInboxConsole` |
51
+ | `@aglyn/plugins-inbox/server` | `registerInboxConsoleApi`, `inboxReplyHandler`, `inboxListOptionsHandler`, `inboxAssignListHandler` |
52
+ | `@aglyn/plugins-inbox/*` | any module under `src/lib/` |
53
+
54
+ ## Usage
55
+
56
+ The registrars are normally called by Aglyn's generated plugin loaders. Called directly:
57
+
58
+ ```ts
59
+ // Console app
60
+ import { registerInboxConsole } from '@aglyn/plugins-inbox'
61
+ registerInboxConsole()
62
+
63
+ // Server-only API dispatcher
64
+ import { registerInboxConsoleApi } from '@aglyn/plugins-inbox/server'
65
+ registerInboxConsoleApi()
66
+ ```
67
+
68
+ ## How it fits
69
+
70
+ A plugin may import the tenant runtime, the renderer, the Besigner logic, the core and the shared packages. It never imports another plugin, and the core never imports a plugin. The Inbox depends on `@aglyn/aglyn`, `@aglyn/tenant-data-admin`, `@aglyn/tenant-feature-instance` and several `@aglyn/shared-*` packages, including `@aglyn/shared-util-email` for sending. It meets the forms and campaign plugins only through zones and widget slots registered with the core.
71
+
72
+ ## License
73
+
74
+ Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/plugins/inbox
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-inbox",
3
- "version": "1.0.0-beta.143",
3
+ "version": "1.0.0-beta.144",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,15 +25,15 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.143",
29
- "@aglyn/shared-data-mdi": "1.0.0-beta.143",
30
- "@aglyn/shared-ui-jsx": "1.0.0-beta.143",
31
- "@aglyn/shared-ui-next": "1.0.0-beta.143",
32
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.143",
33
- "@aglyn/shared-util-email": "1.0.0-beta.143",
34
- "@aglyn/shared-util-http": "1.0.0-beta.143",
35
- "@aglyn/tenant-data-admin": "1.0.0-beta.143",
36
- "@aglyn/tenant-feature-instance": "1.0.0-beta.143",
28
+ "@aglyn/aglyn": "1.0.0-beta.144",
29
+ "@aglyn/shared-data-mdi": "1.0.0-beta.144",
30
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.144",
31
+ "@aglyn/shared-ui-next": "1.0.0-beta.144",
32
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.144",
33
+ "@aglyn/shared-util-email": "1.0.0-beta.144",
34
+ "@aglyn/shared-util-http": "1.0.0-beta.144",
35
+ "@aglyn/tenant-data-admin": "1.0.0-beta.144",
36
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.144",
37
37
  "@swc/helpers": "0.5.23"
38
38
  },
39
39
  "peerDependencies": {