@wavyx/pdcli 0.1.0 → 0.2.0
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 +21 -1
- package/README.md +46 -11
- package/oclif.manifest.json +2523 -240
- package/package.json +2 -1
- package/src/base-command.js +35 -5
- package/src/commands/activity/create.js +63 -0
- package/src/commands/activity/delete.js +39 -0
- package/src/commands/activity/get.js +2 -17
- package/src/commands/activity/update.js +89 -0
- package/src/commands/auth/login.js +102 -7
- package/src/commands/auth/logout.js +2 -1
- package/src/commands/auth/status.js +61 -13
- package/src/commands/deal/create.js +65 -0
- package/src/commands/deal/delete.js +39 -0
- package/src/commands/deal/get.js +2 -19
- package/src/commands/deal/update.js +79 -0
- package/src/commands/org/create.js +42 -0
- package/src/commands/org/delete.js +39 -0
- package/src/commands/org/get.js +2 -17
- package/src/commands/org/update.js +57 -0
- package/src/commands/person/create.js +54 -0
- package/src/commands/person/delete.js +39 -0
- package/src/commands/person/get.js +2 -17
- package/src/commands/person/update.js +69 -0
- package/src/commands/product/create.js +62 -0
- package/src/commands/product/delete.js +39 -0
- package/src/commands/product/get.js +26 -0
- package/src/commands/product/list.js +45 -0
- package/src/commands/product/update.js +77 -0
- package/src/lib/auth.js +227 -3
- package/src/lib/client.js +29 -6
- package/src/lib/confirm.js +10 -0
- package/src/lib/entity-view.js +37 -0
- package/src/lib/input.js +110 -0
- package/src/lib/keychain.js +47 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,27 @@ All notable changes to `pdcli` are documented here. Format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/); versions follow
|
|
5
5
|
[SemVer](https://semver.org/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [0.2.0] - 2026-06-04
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Write paths for core CRM: `deal|person|org|activity create/update/delete`
|
|
12
|
+
(v2 PATCH semantics — only provided fields change). Destructive deletes
|
|
13
|
+
prompt unless `--yes`.
|
|
14
|
+
- Custom-field input resolution: repeatable `--field "Name=Value"` resolves
|
|
15
|
+
human field names to hash keys and option labels to IDs (enum, set, and
|
|
16
|
+
numeric coercion); `--body` accepts raw JSON (typed flags win).
|
|
17
|
+
- `product` topic: `list/get/create/update/delete` with `--price`/`--currency`
|
|
18
|
+
pairs.
|
|
19
|
+
- OAuth 2.0: `auth login --oauth` (browser authorization-code flow against
|
|
20
|
+
your own Developer Hub app). Access/refresh tokens, `api_domain`, and the
|
|
21
|
+
client secret are stored only in the OS keychain; access tokens refresh
|
|
22
|
+
automatically on expiry and on 401. `auth status` shows mode and expiry;
|
|
23
|
+
`auth logout` clears both auth modes.
|
|
24
|
+
- `activity create/update --person` maps to a primary participant
|
|
25
|
+
(`person_id` is read-only on v2 activity writes).
|
|
26
|
+
|
|
27
|
+
## [0.1.0] - 2026-06-03
|
|
8
28
|
|
|
9
29
|
### Added
|
|
10
30
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Command-line interface for [Pipedrive](https://www.pipedrive.com/) — fast, scriptable, built for terminals, CI pipelines, and AI agents.
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> Not affiliated with or endorsed by Pipedrive.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -10,22 +10,57 @@ Command-line interface for [Pipedrive](https://www.pipedrive.com/) — fast, scr
|
|
|
10
10
|
npm install -g @wavyx/pdcli
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Authenticate
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
pdcli auth login
|
|
17
|
-
pdcli
|
|
18
|
-
pdcli
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
pdcli auth login # personal API token (app.pipedrive.com/settings/api)
|
|
17
|
+
pdcli auth login --oauth # OAuth 2.0 via your own Developer Hub app
|
|
18
|
+
pdcli auth status
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Credentials live **only in your OS keychain** — never in plaintext on disk. OAuth
|
|
22
|
+
access tokens refresh automatically. CI/scripts can use env vars instead:
|
|
23
|
+
`PDCLI_COMPANY_DOMAIN=acme PDCLI_API_TOKEN=... pdcli deal list`
|
|
24
|
+
|
|
25
|
+
## Read
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pdcli deal list --status open --limit 20
|
|
29
|
+
pdcli deal get 42
|
|
30
|
+
pdcli person list --org 7 --output json | jq '.[].id'
|
|
31
|
+
pdcli activity list --todo
|
|
21
32
|
pdcli search "acme"
|
|
22
|
-
pdcli
|
|
33
|
+
pdcli field list deal # custom fields with their hash keys
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Write
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pdcli deal create --title "Acme renewal" --value 5000 --currency EUR --stage 3
|
|
40
|
+
pdcli deal update 42 --status won
|
|
41
|
+
pdcli activity create --subject "Follow up" --type call --due-date 2026-06-10 --deal 42
|
|
42
|
+
pdcli product create --name "Consulting" --price 150 --currency EUR
|
|
43
|
+
pdcli deal delete 42 # asks first; --yes to skip
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Custom fields by **human name** — labels and option IDs resolve automatically:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pdcli deal create --title "Sized" --field "Deal Size=Large" --field "Score=4.5"
|
|
50
|
+
pdcli deal update 42 --body '{"probability":75}' # raw JSON escape hatch
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Anything else
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pdcli api GET /api/v2/pipelines # raw, host-locked to YOUR domain
|
|
57
|
+
pdcli api POST /api/v2/deals --body '{"title":"Raw deal"}'
|
|
58
|
+
pdcli doctor # diagnose auth/keychain/connectivity
|
|
23
59
|
```
|
|
24
60
|
|
|
25
|
-
-
|
|
26
|
-
- `--output table|json` on every command; table in a TTY, JSON when piped.
|
|
61
|
+
- `--output table|json` everywhere; table in a TTY, JSON when piped.
|
|
27
62
|
- Deterministic [sysexits](https://man.freebsd.org/cgi/man.cgi?query=sysexits) exit codes for scripting.
|
|
28
|
-
-
|
|
63
|
+
- Full reference: [docs/commands.md](docs/commands.md) (generated from the CLI manifest).
|
|
29
64
|
|
|
30
65
|
## License
|
|
31
66
|
|