@aglyn/plugins-crm 1.0.0-beta.143 → 1.0.0-beta.145
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/README.md +69 -6
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -1,7 +1,70 @@
|
|
|
1
|
-
# @aglyn/plugins-
|
|
1
|
+
# @aglyn/plugins-crm
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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.
|
|
3
|
+
"version": "1.0.0-beta.145",
|
|
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.
|
|
29
|
-
"@aglyn/shared-data-enums": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-ui-email-campaigns": "1.0.0-beta.
|
|
32
|
-
"@aglyn/shared-ui-jsx": "1.0.0-beta.
|
|
33
|
-
"@aglyn/shared-ui-next": "1.0.0-beta.
|
|
34
|
-
"@aglyn/shared-ui-snackstack": "1.0.0-beta.
|
|
35
|
-
"@aglyn/shared-util-email": "1.0.0-beta.
|
|
36
|
-
"@aglyn/shared-util-http": "1.0.0-beta.
|
|
37
|
-
"@aglyn/tenant-data-admin": "1.0.0-beta.
|
|
38
|
-
"@aglyn/tenant-feature-instance": "1.0.0-beta.
|
|
39
|
-
"@aglyn/tenant-runtime": "1.0.0-beta.
|
|
28
|
+
"@aglyn/aglyn": "1.0.0-beta.145",
|
|
29
|
+
"@aglyn/shared-data-enums": "1.0.0-beta.145",
|
|
30
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.145",
|
|
31
|
+
"@aglyn/shared-ui-email-campaigns": "1.0.0-beta.145",
|
|
32
|
+
"@aglyn/shared-ui-jsx": "1.0.0-beta.145",
|
|
33
|
+
"@aglyn/shared-ui-next": "1.0.0-beta.145",
|
|
34
|
+
"@aglyn/shared-ui-snackstack": "1.0.0-beta.145",
|
|
35
|
+
"@aglyn/shared-util-email": "1.0.0-beta.145",
|
|
36
|
+
"@aglyn/shared-util-http": "1.0.0-beta.145",
|
|
37
|
+
"@aglyn/tenant-data-admin": "1.0.0-beta.145",
|
|
38
|
+
"@aglyn/tenant-feature-instance": "1.0.0-beta.145",
|
|
39
|
+
"@aglyn/tenant-runtime": "1.0.0-beta.145",
|
|
40
40
|
"@dnd-kit/core": "^6.3.1",
|
|
41
41
|
"@dnd-kit/utilities": "^3.2.2",
|
|
42
42
|
"@swc/helpers": "0.5.23",
|