kenso 0.1.58 → 0.1.59

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/docs/crm.md CHANGED
@@ -93,6 +93,20 @@ accountId,stage,ownerMemberId,overwritePinned
93
93
 
94
94
  A row that changes a field someone pinned in the app fails as a whole (`409 conflict`, `pinned_by_user`: nothing on that record changes, the other fields of the row included), unless the row sets `overwritePinned` to `true` (or you pass `--overwrite-pinned`, only with the person's OK). Every flag of an update command: `kenso accounts update --help`.
95
95
 
96
+ ## Search opportunities
97
+
98
+ `kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.
99
+
100
+ ```bash
101
+ kenso opportunities search --data '{"filters": [{"field": "stageCategory", "operator": "is", "values": ["open"]}]}' --all
102
+ kenso opportunities search --data '{"filters": [{"field": "ownerMemberId", "operator": "is", "values": ["none"]}, {"field": "closeDate", "operator": "is", "values": ["past_due", "next_30_days"]}]}'
103
+ kenso opportunities search --limit 1 --data '{"countBy": ["stage", "ownerMemberId"]}' # how many opportunities hold each value
104
+ ```
105
+
106
+ - **`filters`** is a list of `{field, operator, values}`, all of which must hold. Fields: `stage` (a stage key), `stageCategory` (`open`, `won`, `lost`), `ownerMemberId`, `closeDate` (`past_due`, `next_30_days`, `later`, `none`) and `sourceCampaignId`. `operator` is `is` or `is_not`; the values of one condition are OR. `none` in `values` matches an opportunity with no owner, no source campaign or no close date.
107
+ - **`countBy`** takes the same field names and adds `counts` to the output: per field, every value with the number of matching opportunities that hold it.
108
+ - `--account-id` keeps the search to one account. `closeDate` counts days in the member's app time zone.
109
+
96
110
  ## Write research you gathered
97
111
 
98
112
  `accounts write-research` and `people write-research` store research you gathered outside Kenso as the record's latest research (`PUT /v1/accounts/{accountId}/research`, `PUT /v1/people/{personId}/research`). The Research tab shows it like a Ken run, with `trigger: agent` and `researchedAt` now. Nothing is charged, and no account or person field changes: set an account's own `fitScore`, `whyNow` or `angle` with `accounts update`. They need the `accounts_research` flag and accounts edit.
package/docs/reference.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Kenso CLI command reference
2
2
 
3
- Generated from kenso 0.1.58 (API contracts 6d745735ab97) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
3
+ Generated from kenso 0.1.59 (API contracts 2452b9fbc8b9) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
4
4
 
5
- 1629 commands, one entry each: summary, API route, feature gate and flag names. Beta commands work only on workspaces with their feature flag; `kenso describe` hides the ones yours cannot use. Every command also takes the global flags below. A command's notes, flag descriptions, body schema and examples: `kenso <resource> <action> --help`, or `kenso describe <resource> <action>` as JSON.
5
+ 1630 commands, one entry each: summary, API route, feature gate and flag names. Beta commands work only on workspaces with their feature flag; `kenso describe` hides the ones yours cannot use. Every command also takes the global flags below. A command's notes, flag descriptions, body schema and examples: `kenso <resource> <action> --help`, or `kenso describe <resource> <action>` as JSON.
6
6
 
7
7
  ## Global flags
8
8
 
@@ -302,7 +302,7 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
302
302
  - [onboarding-builds](#onboarding-builds) (3)
303
303
  - [onboarding-connect-plan](#onboarding-connect-plan) (1)
304
304
  - [onboarding-next-step](#onboarding-next-step) (1)
305
- - [opportunities](#opportunities) (9)
305
+ - [opportunities](#opportunities) (10)
306
306
  - [opportunity-people](#opportunity-people) (4)
307
307
  - [opportunity-settings](#opportunity-settings) (3)
308
308
  - [opportunity-stages](#opportunity-stages) (2)
@@ -7234,6 +7234,12 @@ List opportunities in the current workspace. `GET /v1/opportunities` (a list). B
7234
7234
 
7235
7235
  Flags: `--account-id`, `--close-date-after`, `--close-date-before`, `--cursor`, `--limit`, `--owner-member-id`, `--search`, `--sort`, `--source-campaign-id`, `--stage`, `--stage-category`, `--stale-days`, `--all`, `--each`, `--concurrency`.
7236
7236
 
7237
+ ### kenso opportunities search
7238
+
7239
+ Search opportunities in the current workspace with filter conditions, and count them per value. `POST /v1/opportunities/search` (a list). Beta: needs `opportunities`.
7240
+
7241
+ Flags: `--account-id`, `--search`, `--time-zone`, `--sort`, `--limit`, `--cursor`, `--include-total`, `--no-include-total`, `--data`, `--all`, `--each`, `--concurrency`.
7242
+
7237
7243
  ### kenso opportunities stage-history
7238
7244
 
7239
7245
  Show a deal's stage history: each stage, when, who moved it and how long it sat there. `GET /v1/opportunities/{opportunityId}/stage-history`. Beta: needs `opportunities`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kenso",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "The Kenso CLI: bulk lead, CRM and Studio work for people and coding agents",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -49,5 +49,5 @@
49
49
  "typescript-eslint": "8.71.1",
50
50
  "vitest": "5.0.3"
51
51
  },
52
- "gitHead": "5d65cde64a660ac4b908e3063f72f3e407b6de73"
52
+ "gitHead": "aebfc2805ded41f30cb175766d388b8a370ac0ee"
53
53
  }