@wavyx/pdcli 0.7.0 → 0.9.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 CHANGED
@@ -4,6 +4,77 @@ 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
+ ## [0.9.0] - 2026-06-05
8
+
9
+ ### Changed
10
+
11
+ - **BREAKING:** `--jq` now receives single records as the bare object
12
+ instead of a one-element array. `pdcli deal get 1 --jq '.id'` works
13
+ directly; scripts using the old `--jq '.[0].id'` form must drop the
14
+ `.[0]`. List output is unchanged (still an array).
15
+ - `--resolve-fields` now also applies to the core list commands (`deal`,
16
+ `person`, `org`, `activity`, `product`) in json/yaml/csv output — one
17
+ field-definitions fetch covers the whole list. (Supersedes the 0.8.0
18
+ note that scoped the flag to single-record gets.)
19
+
20
+ ### Fixed
21
+
22
+ - File uploads, downloads, and form posts now go through the same
23
+ transport pipeline as every other request: 429 backoff honoring
24
+ `x-ratelimit-reset`/`Retry-After`, `--no-retry`, the 429-to-403
25
+ escalation hard stop, 5xx retry, and automatic OAuth token refresh.
26
+ Note: this also means transient 5xx during an upload is retried —
27
+ pass `--no-retry` if duplicate-creation on retry is a concern.
28
+ - Alias mutations take an advisory lock, so concurrent pdcli processes
29
+ no longer overwrite each other's alias changes (last-write-wins data
30
+ loss). Contention exits 75; an unwritable config directory reports a
31
+ clear configuration error (exit 78).
32
+ - A failing command can no longer pass its own happy-path test suite —
33
+ the test harness surfaces command errors instead of swallowing them.
34
+
35
+ ## [0.8.0] - 2026-06-05
36
+
37
+ ### Added
38
+
39
+ - `person merge <id> --into <survivor>` and `org merge <id> --into <survivor>`
40
+ — fold duplicate records via Pipedrive's native merge. The positional id is
41
+ the losing record (deleted); the confirmation names both records and
42
+ defaults to No. `--yes` skips the prompt for scripts.
43
+ - `funnel --exact` — mines real stage transitions from each deal's changelog
44
+ instead of approximating from final stages. Stage entry is derived from the
45
+ transition graph, so deals created mid-funnel count only the stages they
46
+ actually entered. Failed changelog fetches are skipped with a warning.
47
+ Machine output is `{ rows, won }`.
48
+ - `metrics coverage` — open pipeline vs the revenue still needed for quota.
49
+ The classic 3x rule drives the verdict on raw pipeline value; a
50
+ probability-weighted coverage ratio is reported alongside. Quota comes from
51
+ active revenue goals (Goals API) or `--target`. Goals in mixed currencies
52
+ refuse to sum (exit 64).
53
+ - `alias set/list/unset` — user-defined command shortcuts, expanded by the
54
+ command-not-found hook. Cycles, self-references, topic shadowing, and
55
+ dotted names are rejected at write time; runtime expansion is guarded
56
+ against cycles and runaway depth. Destructive payloads warn at set time.
57
+ - `--resolve-fields` — opt-in resolution of custom-field hash keys to names
58
+ (and option ids to labels) in JSON/yaml/csv output of single-record get
59
+ commands. Duplicate field names disambiguate instead of clobbering.
60
+ - `audit` duplicate-orgs now also reports fuzzy near-matches
61
+ (Jaro-Winkler 0.92+) with original org names and a score, tagged
62
+ `kind: "fuzzy"`.
63
+ - `config unset <key>`; `config set default_output` validates its value.
64
+ - `lead label list` and `file remote-link` (link a Google Drive file to a
65
+ deal, person, or organization).
66
+ - Animated terminal demo in the README; CONTRIBUTING guide (repo + docs site).
67
+
68
+ ### Changed
69
+
70
+ - **audit output contract:** duplicate-orgs items now carry a `kind` field
71
+ (`exact` | `fuzzy` | `note`); fuzzy items use `names` (plural) and `score`.
72
+ The per-check `count` counts findings only (informational notes excluded)
73
+ and now includes fuzzy matches — consumers gating on duplicate-orgs counts
74
+ should account for the new kinds.
75
+ - Aborting a confirmation prompt with Ctrl-C or a closed stdin now exits
76
+ cleanly as "Aborted" instead of an internal error.
77
+
7
78
  ## [0.7.0] - 2026-06-05
8
79
 
9
80
  ### Added
package/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
  [![codecov](https://codecov.io/gh/wavyx/pdcli/branch/main/graph/badge.svg)](https://codecov.io/gh/wavyx/pdcli)
5
5
  [![npm](https://img.shields.io/npm/v/%40wavyx%2Fpdcli)](https://www.npmjs.com/package/@wavyx/pdcli)
6
6
 
7
+ <p align="center">
8
+ <img src="https://raw.githubusercontent.com/wavyx/pdcli/main/docs/demo.svg" alt="pdcli demo — running pipeline health and a winning deal update" width="720">
9
+ </p>
10
+
7
11
  Command-line interface for [Pipedrive](https://www.pipedrive.com/) — fast, scriptable, built for terminals, CI pipelines, and AI agents.
8
12
 
9
13
  > Not affiliated with or endorsed by Pipedrive.
@@ -74,9 +78,12 @@ pdcli person import people.csv # custom fields by name
74
78
  ```bash
75
79
  pdcli metrics velocity --period 90d # the Sales Velocity Equation, in your terminal
76
80
  pdcli funnel --pipeline 1 # stage-to-stage conversion
81
+ pdcli funnel --exact # mine real stage transitions per deal (one call each)
82
+ pdcli metrics coverage --target 500000 # weighted pipeline vs quota — the 3x coverage rule
77
83
  pdcli pipeline health # per-stage value, weighted value, stale, no-next-step
78
84
  pdcli audit # 11 data-hygiene checks (duplicates, stale, gaps)
79
85
  pdcli audit --strict # exit 1 on must-severity findings — wire into CI
86
+ pdcli person merge 123 --into 456 # fold a duplicate into the survivor (deletes 123)
80
87
  ```
81
88
 
82
89
  ## Files, webhooks, backup
@@ -93,6 +100,7 @@ pdcli backup --dir ./pipedrive-backup # full account → JSON tree, --resume
93
100
  ```bash
94
101
  pdcli api GET /api/v2/pipelines # raw, host-locked to YOUR domain
95
102
  pdcli api POST /api/v2/deals --body '{"title":"Raw deal"}'
103
+ pdcli alias set wd "deal list --status won" # save a shortcut, then run: pdcli wd
96
104
  pdcli doctor # diagnose auth/keychain/connectivity
97
105
  ```
98
106