kenso 0.1.94 → 0.1.95

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
@@ -7,6 +7,9 @@ The CRM commands work on Kenso's Accounts lane: accounts (companies), the people
7
7
  | `accounts import` | Create accounts from a CSV or JSONL file. Research is charged per created account |
8
8
  | `people import` | Create or match people from a file, optionally onto accounts |
9
9
  | `accounts update --each`, `people update --each`, `opportunities update --each` | Edit many records from a file, one call per row |
10
+ | `accounts bulk-update`, `people bulk-update`, `opportunities bulk-update` | Set the same fields on many records at once, by ids or by a filter, with a preview first. Needs `bulk_edit` too |
11
+ | `accounts bulk-delete`, `people bulk-delete`, `opportunities bulk-delete` | Delete many records at once, by ids or by a filter, with a preview first. Not undone. Needs `bulk_edit` too |
12
+ | `changes list`, `get`, `rows`, `apply`, `cancel`, `undo` | Follow a bulk change, read what each record got, stop it, or put the old values back for 30 days |
10
13
  | `accounts write-research`, `people write-research` | Store research you gathered as a record's latest research, free. `--each` writes many |
11
14
  | `opportunities move <id> --stage <key> [--reason <key>]` | Move a deal, with its won or lost reason; a field the stage asks for never stops it |
12
15
  | `opportunities stage-history <id>` | A deal's stage history: each stage, when, who moved it and how long it sat there |
@@ -96,7 +99,7 @@ An account's timeline pages the same way. `kenso accounts activity 812` returns
96
99
 
97
100
  ## Edit accounts, people and opportunities
98
101
 
99
- Apart from `accounts bulk-update`, which sets one `accountType` on up to 500 accounts, there is no bulk edit route, so run the generated `update` command once per row with `--each`. Columns are the command's flags by API name or flag name, and the id column fills the route:
102
+ To set the same fields on many records, use `bulk-update` (below; it needs the `bulk_edit` flag). When every row gets its own values, or the workspace has no `bulk_edit`, run the generated `update` command once per row with `--each`. Columns are the command's flags by API name or flag name, and the id column fills the route:
100
103
 
101
104
  ```bash
102
105
  kenso accounts update --each accounts-edit.csv --dry-run # then the same with --yes
@@ -112,6 +115,49 @@ accountId,stage,ownerMemberId,overwritePinned
112
115
 
113
116
  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`.
114
117
 
118
+ ## Change many accounts at once
119
+
120
+ ```bash
121
+ kenso accounts bulk-update --filter '{"filters":[{"field":"stage","operator":"is","values":["new"]}]}' --set owner=42 --dry-run
122
+ kenso changes apply --change-id 31
123
+ kenso accounts bulk-update --ids 812,813 --set stage=engaged --set tier=2 --yes
124
+ kenso changes get --change-id 31
125
+ ```
126
+
127
+ `accounts bulk-update` sets the same fields on every account you name: `--ids` (up to 1,000), everything a `--filter` matches (the body `kenso accounts search --data` takes: `filters`, `where`, `q`; up to 50,000), or `--all`. `--exclude-ids` leaves some of a filter's accounts out. `--set field=value` takes `ownerMemberId` (or `owner`), `stage`, `tierOverride` (or `tier`), `industry`, `fundingRound`, `employeeCount`, `hqLocation` and `cadenceDays`; a value of `null` clears the field. Use `accounts update --each` when every row gets its own values.
128
+
129
+ It makes a change set: the accounts it names and, for each, the field, its value before and its value after. Without `--yes` (or with `--dry-run`) it previews: it prints `count` and a `sample`, writes nothing, and `next` is the `kenso changes apply` command that writes exactly those accounts. With `--yes` it writes in the background and waits (`--timeout`, default 10m), then prints the change with its `counts`: `applied`, `unchanged` (already had the value), `conflict` (the account changed after the preview, so it was left alone) and `failed` (for example `pinned`: a person set the field by hand; `--overwrite-pinned` replaces it). Exit 5 when some accounts failed or conflicted. It needs the `bulk_edit` flag as well as `accounts`.
130
+
131
+ `kenso accounts bulk-update` used to be the generated command for the route's older one-field body, which sets one `accountType` on up to 500 accounts and needs only `accounts`. The route still takes that body, but this command no longer sends it: use `kenso accounts update --each` with an `accountType` column, or `kenso api POST /v1/accounts/bulk-update --data '{"accountIds":[812,813],"accountType":"lost"}'`.
132
+
133
+ `people bulk-update` and `opportunities bulk-update` work the same way. People take `--set` for `ownerMemberId` (or `owner`), `leadStatus`, `title`, `seniority`, `department` and `location`, and a `--filter` of `kenso people search --data` fields (`leadStatus`, `roles`, `tagIds`, `q` and the rest). Deals take `stage` (a live stage key), `ownerMemberId` (or `owner`), `closeDate` (or `close`), `amount`, `dealType` and `nextStep`, and a `--filter` of `kenso opportunities search --data` fields (`filters`, `accountId`, `q`):
134
+
135
+ ```bash
136
+ kenso opportunities bulk-update --filter '{"filters":[{"field":"stageCategory","operator":"is","values":["open"]}]}' --set stage=proposal --dry-run
137
+ kenso people bulk-update --ids 501,502 --set owner=42 --yes
138
+ ```
139
+
140
+ ### Delete many records at once
141
+
142
+ ```bash
143
+ kenso people bulk-delete --filter '{"onAccount":"none","leadStatus":["disqualified"]}' --dry-run
144
+ kenso changes apply --change-id 32
145
+ kenso opportunities bulk-delete --ids 71,72,73 --yes
146
+ ```
147
+
148
+ `accounts bulk-delete`, `people bulk-delete` and `opportunities bulk-delete` name their records the way `bulk-update` does (`--ids`, `--filter`, `--all`, `--exclude-ids`) and take no `--set`. Without `--yes` they preview: `count`, a `sample`, and `next` is the `kenso changes apply` command that deletes exactly those records. The API itself previews a delete whose body leaves `dryRun` out, so `--yes` sends `dryRun: false`. Each record is deleted as its own `delete` command deletes it, so one that cannot be deleted (a person still on an account) is counted as `failed` and the rest go on. A delete is not undone with `kenso changes undo`.
149
+
150
+ ### Follow, stop and undo a change
151
+
152
+ ```bash
153
+ kenso changes list --object accounts
154
+ kenso changes rows --change-id 31 --status conflict,failed
155
+ kenso changes cancel --change-id 31
156
+ kenso changes undo --change-id 31
157
+ ```
158
+
159
+ `changes list` shows the workspace's bulk changes, newest first, whoever made them. `changes rows` lists a change's records with the value before (`from`) and after (`to`) and a `status`; `--status conflict,failed` reads what a change missed. `changes cancel` drops a preview or stops a change that is still writing; what it already wrote stays. `changes undo` puts the old value back on every record that still holds the value the change wrote, for 30 days after it was applied (`undoUntil`). A record someone changed again since keeps its newer value: `counts.undone` is how many went back, `counts.applied` how many still hold the change. Undo answers `409 invalid_state` with `undo_expired`, `still_running`, `nothing_applied` or `not_undoable` when there is nothing it can put back.
160
+
115
161
  ## Search opportunities
116
162
 
117
163
  `kenso opportunities search` works as `accounts search` does: it takes `--search`, `--sort`, `--limit`, `--cursor`, `--all`, and its lists in `--data`.
package/docs/reference.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Kenso CLI command reference
2
2
 
3
- Generated from kenso 0.1.94 (API contracts 387c79f74424) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
3
+ Generated from kenso 0.1.95 (API contracts af030735f485) by `scripts/build-reference.ts`. Do not edit it: `pnpm build` writes it again.
4
4
 
5
- 1762 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
+ 1771 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
 
@@ -28,6 +28,7 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
28
28
 
29
29
  - [access-requests](#access-requests) (5)
30
30
  - [account-domains](#account-domains) (2)
31
+ - [account-merges](#account-merges) (2)
31
32
  - [account-metrics](#account-metrics) (1)
32
33
  - [account-plans](#account-plans) (5)
33
34
  - [account-scoring](#account-scoring) (2)
@@ -292,7 +293,7 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
292
293
  - [meeting-public-links](#meeting-public-links) (3)
293
294
  - [meeting-recordings](#meeting-recordings) (1)
294
295
  - [meeting-result-hints](#meeting-result-hints) (3)
295
- - [meeting-results](#meeting-results) (7)
296
+ - [meeting-results](#meeting-results) (8)
296
297
  - [meeting-shares](#meeting-shares) (3)
297
298
  - [meeting-types](#meeting-types) (6)
298
299
  - [meeting-workspace-share](#meeting-workspace-share) (2)
@@ -350,6 +351,8 @@ Exit codes: 0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 some rows failed, 6 r
350
351
  - [public-referrals](#public-referrals) (1)
351
352
  - [public-saved-list-invites](#public-saved-list-invites) (1)
352
353
  - [public-shares](#public-shares) (9)
354
+ - [record-import-rows](#record-import-rows) (1)
355
+ - [record-imports](#record-imports) (5)
353
356
  - [record-layouts](#record-layouts) (3)
354
357
  - [referral-codes](#referral-codes) (3)
355
358
  - [referral-redemptions](#referral-redemptions) (1)
@@ -515,6 +518,20 @@ Remove a domain from its account. Returns the account. `DELETE /v1/account-domai
515
518
 
516
519
  Flags: `--account-domain-id` (required), `--each`, `--concurrency`.
517
520
 
521
+ ## account-merges
522
+
523
+ ### kenso account-merges get
524
+
525
+ Get one account merge with the merged-away account's values. `GET /v1/account-merges/{mergeId}`. Beta: needs `accounts` and `crm_import_export`.
526
+
527
+ Flags: `--merge-id` (required), `--each`, `--concurrency`.
528
+
529
+ ### kenso account-merges list
530
+
531
+ List account merges, newest first. `GET /v1/account-merges` (a list). Beta: needs `accounts` and `crm_import_export`.
532
+
533
+ Flags: `--cursor`, `--limit`, `--merged-by`, `--all`, `--each`, `--concurrency`.
534
+
518
535
  ## account-metrics
519
536
 
520
537
  ### kenso account-metrics get
@@ -669,15 +686,15 @@ Flags: `--data`, `--each`, `--concurrency`.
669
686
 
670
687
  ### kenso accounts bulk-delete
671
688
 
672
- Delete a selection of accounts in one call, as a change set. `POST /v1/accounts/bulk-delete`. Beta: needs `accounts` and `bulk_edit`.
689
+ Delete many accounts at once: by --ids, or everything a --filter matches. API operations: `accounts.bulk-delete`, `changes.get`. Beta: needs `accounts` and `bulk_edit`.
673
690
 
674
- Flags: `--all`, `--body-dry-run`, `--label`, `--source`, `--no-all`, `--no-body-dry-run`, `--data`, `--each`, `--concurrency`.
691
+ Flags: `--all`, `--exclude-ids`, `--filter`, `--ids`, `--label`, `--timeout`.
675
692
 
676
693
  ### kenso accounts bulk-update
677
694
 
678
- Change a selection of accounts in one call: a change set, or one account type on up to 500 accounts. `POST /v1/accounts/bulk-update`. Beta: needs `accounts`.
695
+ Change fields on many accounts at once: by --ids, or everything a --filter matches. API operations: `accounts.bulk-update`, `changes.get`. Beta: needs `accounts` and `bulk_edit`.
679
696
 
680
- Flags: `--all`, `--body-dry-run`, `--label`, `--source`, `--overwrite-pinned`, `--account-type`, `--no-all`, `--no-body-dry-run`, `--no-overwrite-pinned`, `--data`, `--each`, `--concurrency`.
697
+ Flags: `--all`, `--exclude-ids`, `--filter`, `--ids`, `--label`, `--overwrite-pinned`, `--set`, `--timeout`.
681
698
 
682
699
  ### kenso accounts clear-why-not-now
683
700
 
@@ -6933,6 +6950,12 @@ Flags: `--limit`, `--status`, `--each`, `--concurrency`.
6933
6950
 
6934
6951
  ## meeting-results
6935
6952
 
6953
+ ### kenso meeting-results answer
6954
+
6955
+ Answer whether a tracked meeting happened. `POST /v1/meeting-results/{meetingResultId}/answers`. Beta: needs `meeting_attribution`.
6956
+
6957
+ Flags: `--meeting-result-id` (required), `--answer`, `--data`, `--each`, `--concurrency`.
6958
+
6936
6959
  ### kenso meeting-results create
6937
6960
 
6938
6961
  Add a meeting Kenso could not see. `POST /v1/meeting-results`. Beta: needs `meeting_results`.
@@ -7703,15 +7726,15 @@ Flags: `--each`, `--concurrency`.
7703
7726
 
7704
7727
  ### kenso opportunities bulk-delete
7705
7728
 
7706
- Delete a selection of opportunities in one call, as a change set. `POST /v1/opportunities/bulk-delete`. Beta: needs `bulk_edit` and `opportunities`.
7729
+ Delete many deals at once: by --ids, or everything a --filter matches. API operations: `opportunities.bulk-delete`, `changes.get`. Beta: needs `opportunities` and `bulk_edit`.
7707
7730
 
7708
- Flags: `--all`, `--body-dry-run`, `--label`, `--source`, `--no-all`, `--no-body-dry-run`, `--data`, `--each`, `--concurrency`.
7731
+ Flags: `--all`, `--exclude-ids`, `--filter`, `--ids`, `--label`, `--timeout`.
7709
7732
 
7710
7733
  ### kenso opportunities bulk-update
7711
7734
 
7712
- Change fields on a selection of opportunities in one call, as a change set. `POST /v1/opportunities/bulk-update`. Beta: needs `bulk_edit` and `opportunities`.
7735
+ Change fields on many deals at once: by --ids, or everything a --filter matches. API operations: `opportunities.bulk-update`, `changes.get`. Beta: needs `opportunities` and `bulk_edit`.
7713
7736
 
7714
- Flags: `--all`, `--body-dry-run`, `--label`, `--source`, `--overwrite-pinned`, `--no-all`, `--no-body-dry-run`, `--no-overwrite-pinned`, `--data`, `--each`, `--concurrency`.
7737
+ Flags: `--all`, `--exclude-ids`, `--filter`, `--ids`, `--label`, `--overwrite-pinned`, `--set`, `--timeout`.
7715
7738
 
7716
7739
  ### kenso opportunities create
7717
7740
 
@@ -8091,15 +8114,15 @@ Flags: `--find-emails`, `--no-find-emails`, `--data`, `--each`, `--concurrency`.
8091
8114
 
8092
8115
  ### kenso people bulk-delete
8093
8116
 
8094
- Delete a selection of people in one call, as a change set. `POST /v1/people/bulk-delete`. Beta: needs `accounts` and `bulk_edit`.
8117
+ Delete many people at once: by --ids, or everything a --filter matches. API operations: `people.bulk-delete`, `changes.get`. Beta: needs `accounts` and `bulk_edit`.
8095
8118
 
8096
- Flags: `--all`, `--body-dry-run`, `--label`, `--source`, `--no-all`, `--no-body-dry-run`, `--data`, `--each`, `--concurrency`.
8119
+ Flags: `--all`, `--exclude-ids`, `--filter`, `--ids`, `--label`, `--timeout`.
8097
8120
 
8098
8121
  ### kenso people bulk-update
8099
8122
 
8100
- Change fields on a selection of people in one call, as a change set. `POST /v1/people/bulk-update`. Beta: needs `accounts` and `bulk_edit`.
8123
+ Change fields on many people at once: by --ids, or everything a --filter matches. API operations: `people.bulk-update`, `changes.get`. Beta: needs `accounts` and `bulk_edit`.
8101
8124
 
8102
- Flags: `--all`, `--body-dry-run`, `--label`, `--source`, `--overwrite-pinned`, `--no-all`, `--no-body-dry-run`, `--no-overwrite-pinned`, `--data`, `--each`, `--concurrency`.
8125
+ Flags: `--all`, `--exclude-ids`, `--filter`, `--ids`, `--label`, `--overwrite-pinned`, `--set`, `--timeout`.
8103
8126
 
8104
8127
  ### kenso people clear-instagram
8105
8128
 
@@ -8757,6 +8780,46 @@ Unsubscribe from a workspace's share emails. `POST /v1/public/shares/{token}/uns
8757
8780
 
8758
8781
  Flags: `--token` (required), `--recipient`, `--data`, `--each`, `--concurrency`.
8759
8782
 
8783
+ ## record-import-rows
8784
+
8785
+ ### kenso record-import-rows list
8786
+
8787
+ List what an import did with each row. `GET /v1/record-imports/{importId}/rows` (a list). Beta: needs `accounts` and `crm_import_export`.
8788
+
8789
+ Flags: `--import-id` (required), `--cursor`, `--limit`, `--outcome`, `--all`, `--each`, `--concurrency`.
8790
+
8791
+ ## record-imports
8792
+
8793
+ ### kenso record-imports create
8794
+
8795
+ Upload a CSV file and get Kenso's plan for importing it. `POST /v1/record-imports`. Beta: needs `accounts` and `crm_import_export`.
8796
+
8797
+ Flags: `--file`, `--object`, `--data`, `--each`, `--concurrency`.
8798
+
8799
+ ### kenso record-imports get
8800
+
8801
+ Get one record import with its plan and counts. `GET /v1/record-imports/{importId}`. Beta: needs `accounts` and `crm_import_export`.
8802
+
8803
+ Flags: `--import-id` (required), `--each`, `--concurrency`.
8804
+
8805
+ ### kenso record-imports list
8806
+
8807
+ List the workspace's record imports, newest first. `GET /v1/record-imports` (a list). Beta: needs `accounts` and `crm_import_export`.
8808
+
8809
+ Flags: `--cursor`, `--limit`, `--all`, `--each`, `--concurrency`.
8810
+
8811
+ ### kenso record-imports start
8812
+
8813
+ Start a planned import. `POST /v1/record-imports/{importId}/start`. Beta: needs `accounts` and `crm_import_export`.
8814
+
8815
+ Flags: `--import-id` (required), `--each`, `--concurrency`.
8816
+
8817
+ ### kenso record-imports update
8818
+
8819
+ Change a planned import's plan. `PATCH /v1/record-imports/{importId}`. Beta: needs `accounts` and `crm_import_export`.
8820
+
8821
+ Flags: `--import-id` (required), `--research`, `--no-research`, `--data`, `--each`, `--concurrency`.
8822
+
8760
8823
  ## record-layouts
8761
8824
 
8762
8825
  ### kenso record-layouts get
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kenso",
3
- "version": "0.1.94",
3
+ "version": "0.1.95",
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": "e81d7c0e4fe05dafe1b46ced322c0f99f100850a"
52
+ "gitHead": "f9d24b3813c6d924a972d53ce42813110c37a309"
53
53
  }