@aglyn/plugins-crm 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 +69 -6
  2. package/package.json +13 -13
package/README.md CHANGED
@@ -1,7 +1,70 @@
1
- # @aglyn/plugins-ui-data
1
+ # @aglyn/plugins-crm
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 CRM plugin for Aglyn: leads, contacts, companies, deals, tasks and reports, managed in the Aglyn console. Install it if you are running or building on the Aglyn platform and want its CRM.
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-crm@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-crm/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 CRM is console-only. Its records live in Firestore and it has no canvas component, so it adds nothing to a published page and declares no `site` registrar.
27
+
28
+ ### In the console
29
+
30
+ `registerCrmConsole()` registers:
31
+
32
+ - A **CRM** nav item and hub at `/crm`, with the sections Contacts, Leads, Companies, Deals, Tasks, Reports, Fields and Settings as routes beneath it. The old `/contacts` address redirects to the hub. The hub is code-split, requires the `data.manage` permission, and sits behind the `crm` feature flag.
33
+ - Dashboard widgets "Tasks due" and "CRM at a glance" in both the `hostDashboard` (one site) and `orgDashboard` (whole organization) slots.
34
+ - A "Saves to contact fields" widget in the `formContactFields` slot, a zone the forms plugin hosts on a form's page.
35
+ - Two zones the CRM hosts for other plugins to draw in: one for booking a meeting from a record, and one that says which campaign or link a record came from.
36
+ - The CRM's record routes, so other surfaces can link to a record.
37
+
38
+ ### On the server
39
+
40
+ `registerCrmConsoleApi()` from `@aglyn/plugins-crm/server` (the `consoleApi` surface) registers routes under the `crm` prefix for contact stage and field updates, contact creation and merge, lead conversion, deal stages, tasks, CSV imports of contacts, companies, deals, tasks and leads, one-to-one email and a contact's email history, erasing a person, organization-level activity, recipes, and the workspace's inbound email capture address. It also registers the CRM on two core seams, so another plugin can read a record's facts or file an item on a record's timeline without importing this package.
41
+
42
+ ### Entry points
43
+
44
+ | import | contents |
45
+ | -- | -- |
46
+ | `@aglyn/plugins-crm` | `BUNDLE_ID`, `registerCrmConsole`, `CRM_CONSOLE_SECTIONS`, `crmRoutes(basePath)` for building links into the hub, and the `useContactFieldDefinitions` hook |
47
+ | `@aglyn/plugins-crm/server` | `registerCrmConsoleApi` and the route handlers |
48
+ | `@aglyn/plugins-crm/*` | any module under `src/lib/` |
49
+
50
+ ## Usage
51
+
52
+ The registrars are normally called by Aglyn's generated plugin loaders. Called directly:
53
+
54
+ ```ts
55
+ // Console app
56
+ import { registerCrmConsole } from '@aglyn/plugins-crm'
57
+ registerCrmConsole()
58
+
59
+ // Server-only API dispatcher
60
+ import { registerCrmConsoleApi } from '@aglyn/plugins-crm/server'
61
+ registerCrmConsoleApi()
62
+ ```
63
+
64
+ ## How it fits
65
+
66
+ 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 CRM depends on `@aglyn/aglyn`, the tenant packages (`@aglyn/tenant-runtime`, `@aglyn/tenant-data-admin`, `@aglyn/tenant-feature-instance`) and several `@aglyn/shared-*` packages. Where it meets bookings, forms or campaigns it does so through zones and core seams: one plugin hosts a zone, another registers a widget in it, and the core carries the contract.
67
+
68
+ ## License
69
+
70
+ Apache-2.0. Source: https://github.com/aglyn/aglyn/tree/main/libs/plugins/crm
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-crm",
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,18 +25,18 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.143",
29
- "@aglyn/shared-data-enums": "1.0.0-beta.143",
30
- "@aglyn/shared-data-mdi": "1.0.0-beta.143",
31
- "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.143",
32
- "@aglyn/shared-ui-jsx": "1.0.0-beta.143",
33
- "@aglyn/shared-ui-next": "1.0.0-beta.143",
34
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.143",
35
- "@aglyn/shared-util-email": "1.0.0-beta.143",
36
- "@aglyn/shared-util-http": "1.0.0-beta.143",
37
- "@aglyn/tenant-data-admin": "1.0.0-beta.143",
38
- "@aglyn/tenant-feature-instance": "1.0.0-beta.143",
39
- "@aglyn/tenant-runtime": "1.0.0-beta.143",
28
+ "@aglyn/aglyn": "1.0.0-beta.144",
29
+ "@aglyn/shared-data-enums": "1.0.0-beta.144",
30
+ "@aglyn/shared-data-mdi": "1.0.0-beta.144",
31
+ "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.144",
32
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.144",
33
+ "@aglyn/shared-ui-next": "1.0.0-beta.144",
34
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.144",
35
+ "@aglyn/shared-util-email": "1.0.0-beta.144",
36
+ "@aglyn/shared-util-http": "1.0.0-beta.144",
37
+ "@aglyn/tenant-data-admin": "1.0.0-beta.144",
38
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.144",
39
+ "@aglyn/tenant-runtime": "1.0.0-beta.144",
40
40
  "@dnd-kit/core": "^6.3.1",
41
41
  "@dnd-kit/utilities": "^3.2.2",
42
42
  "@swc/helpers": "0.5.23",