feat(oo): catalog scan/match/apply for CRM clients and contacts
Add filesystem inventory (VCF, contact folders, project trees) into a reviewable YAML catalog, match against live OnlyOffice, and upsert only rows with approve:true. Includes FindPersonByEmail for email-keyed persons.
This commit is contained in:
@@ -635,6 +635,7 @@ oo tasks files detach 208 12345
|
||||
| `cases` | `list`, `create`, `delete`, `member-add` |
|
||||
| `crm-tasks` | `list`, `create`, `delete`, `categories` |
|
||||
| `applications` | `sync` |
|
||||
| `catalog` | `scan-contacts`, `scan-projects`, `merge`, `match`, `apply` |
|
||||
|
||||
The CLI reads only `.env` from the current working directory (godotenv is a
|
||||
CLI-only concern — the library itself never loads dotfiles).
|
||||
@@ -733,6 +734,26 @@ oo contacts get 857 -o json
|
||||
oo crm cleanup -o json
|
||||
```
|
||||
|
||||
### Clients/contacts inventory (`catalog`)
|
||||
|
||||
**Problem:** Contacts live as VCF/folders on disk and project trees under
|
||||
`~/work` / ops-host; OnlyOffice CRM is the SSOT for persons/companies but
|
||||
starts sparse. You need a reviewable inventory before writes.
|
||||
|
||||
```bash
|
||||
oo catalog scan-contacts --root /path/to/contacts -O /tmp/contacts.yaml
|
||||
oo catalog scan-projects --root ~/work -O /tmp/projects.yaml
|
||||
oo catalog merge -i /tmp/contacts.yaml -i /tmp/projects.yaml -O clients-contacts.yaml
|
||||
oo catalog match -i clients-contacts.yaml
|
||||
# set approve: true on pilot rows in the YAML
|
||||
oo catalog apply --dry-run -i clients-contacts.yaml
|
||||
oo catalog apply --apply -i clients-contacts.yaml
|
||||
oo crm cleanup
|
||||
```
|
||||
|
||||
YAML schema and ops runbook live in the inventar repo under `docs/catalog/` and
|
||||
`docs/ops/oo-clients-contacts-sync.md`. Library helper: `FindPersonByEmail`.
|
||||
|
||||
### Job applications → CRM (`applications sync`)
|
||||
|
||||
**Problem:** You keep CVs in a folder tree (`applications/2026/Acme/README.md`)
|
||||
|
||||
Reference in New Issue
Block a user