@curviate/cli 0.41.0 → 0.43.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 +70 -0
- package/dist/{account-QZ5RYKIT.js → account-FDPUPVFB.js} +118 -29
- package/dist/{chunk-CBHL3QQJ.js → chunk-B5NIX4G6.js} +1 -1
- package/dist/{chunk-BLFGJIJJ.js → chunk-BLJGV6ST.js} +2 -2
- package/dist/{chunk-XP2LN6F6.js → chunk-EGDDVF3Q.js} +3 -1
- package/dist/{chunk-6W7364S3.js → chunk-KJ24DIAJ.js} +1 -1
- package/dist/{chunk-4AAKZPOM.js → chunk-OUMMWC7G.js} +76 -26
- package/dist/{chunk-WAE7YLO5.js → chunk-PCZH5QJA.js} +1 -1
- package/dist/{chunk-XDQHNUEU.js → chunk-TC4ZPUWI.js} +12 -6
- package/dist/{chunk-DCZR4M7G.js → chunk-UJOTQPL6.js} +1 -1
- package/dist/cli.js +64 -53
- package/dist/{comment-SYA6OKEY.js → comment-G4EXIIAQ.js} +83 -29
- package/dist/{company-IXQ4OFU3.js → company-2WKYM34T.js} +101 -51
- package/dist/{config-RUBXWFQ3.js → config-K4G3VSBA.js} +44 -9
- package/dist/{connect-TTA2X3KO.js → connect-GHABKXB2.js} +45 -22
- package/dist/{doctor-ET7XQ22E.js → doctor-ICAEETCL.js} +8 -4
- package/dist/examples-IJL3A6SZ.js +18 -0
- package/dist/{feed-556LS3CN.js → feed-XC5235UF.js} +16 -14
- package/dist/{group-DIIG4XQT.js → group-JDP2HVSV.js} +29 -20
- package/dist/{inbox-SRVTUTE6.js → inbox-W3KR65VD.js} +49 -24
- package/dist/{inboxes-XHZTAUQ7.js → inboxes-XYS3IRT6.js} +21 -17
- package/dist/{job-QNVGEM4J.js → job-OJB4VSI2.js} +109 -35
- package/dist/{login-YTVPIN27.js → login-OHAHNBRW.js} +7 -3
- package/dist/{message-2JEL6P7E.js → message-5XC7U4JC.js} +5 -5
- package/dist/{notification-T4SRAIJ3.js → notification-RIUSYJV6.js} +26 -16
- package/dist/{post-PV4UQVPO.js → post-LSEBRQYK.js} +94 -32
- package/dist/{profile-K5BZNGX5.js → profile-BHZPRUFU.js} +125 -44
- package/dist/{recruiter-OBKS4ZVL.js → recruiter-JUA4BZIC.js} +211 -68
- package/dist/{sales-nav-WPTMS6QF.js → sales-nav-77NP3UXV.js} +100 -42
- package/dist/{search-YAKZKK74.js → search-3MRQE6VC.js} +81 -40
- package/dist/{setup-NZQUWJYC.js → setup-BPNLAHPC.js} +9 -4
- package/dist/{webhook-PXSLDB2F.js → webhook-TOQUQPT4.js} +79 -31
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,76 @@ a new command or flag is a minor; a breaking command/flag/exit-code change is a
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.43.0] - 2026-09-25
|
|
12
|
+
|
|
13
|
+
Programmatic connect at scale: tag accounts with your own end-user id, one
|
|
14
|
+
account-status webhook for every account, and the verification-method choice
|
|
15
|
+
on checkpoints. Requires `@curviate/sdk` 0.38.0.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`account link --external-id <id> --timezone <zone> --products <list>`.**
|
|
20
|
+
`--external-id` stores your own id for the account's end user; it comes back
|
|
21
|
+
on the account and on every account webhook. `--timezone` is an IANA zone
|
|
22
|
+
(`Europe/Berlin`). `--products` narrows the premium products asked for
|
|
23
|
+
(`sales_navigator`, `recruiter`, comma-separated); an empty or unknown value
|
|
24
|
+
exits 2.
|
|
25
|
+
- **`account list --external-id <id>`** lists only that end user's accounts.
|
|
26
|
+
`account list` and `account get` show `external_id` in their default view.
|
|
27
|
+
- **`account checkpoint request <account_id> --challenge <id>`** answers a
|
|
28
|
+
`challenge_selection` checkpoint (LinkedIn asking which method to verify
|
|
29
|
+
with: `email`, `sms` or `whatsapp`). It prints the next checkpoint and
|
|
30
|
+
exits 12; finish with `account checkpoint solve`.
|
|
31
|
+
- **`webhook create --source account_status` without `--account-ids`** covers
|
|
32
|
+
every current and future account. `messaging` and `user` still require
|
|
33
|
+
`--account-ids`, and an empty `--account-ids` value exits 2 instead of
|
|
34
|
+
widening to every account.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **`account link` on a terminal no longer prompts for a code at a
|
|
39
|
+
`challenge_selection` checkpoint.** It prints the choices, names the
|
|
40
|
+
`checkpoint request --challenge` command, and exits 12.
|
|
41
|
+
|
|
42
|
+
## [0.42.0] - 2026-09-23
|
|
43
|
+
|
|
44
|
+
Adds examples to every command's help and the manifest the docs site
|
|
45
|
+
generates its CLI reference from. No exit code changes.
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- **Examples in `--help`.** Every command you can run now prints one to three
|
|
50
|
+
example invocations under an `EXAMPLES` heading in its `--help`. The same
|
|
51
|
+
lines appear on the command's page on docs.curviate.com.
|
|
52
|
+
- **`commands.json`**, the command surface as data (each command's
|
|
53
|
+
description, arguments, accepted global flags, examples and requires), which the docs
|
|
54
|
+
site generates its CLI reference from. Not shipped in the package;
|
|
55
|
+
regenerate it with `pnpm manifest`.
|
|
56
|
+
- **`requires` in `--help`.** A command with conditional requirements (one
|
|
57
|
+
of two flags, a `--body-file` alternative, at least one of several, a flag
|
|
58
|
+
that only applies with another) lists them under `REQUIRES`, and the docs
|
|
59
|
+
page shows them under the usage line.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- **Read commands no longer declare `--preview`.** A truthy `--preview` on
|
|
64
|
+
a read was refused before and still is (exit 2, same message, now followed
|
|
65
|
+
by "Run `curviate --help` for usage."); the refusal now comes from the
|
|
66
|
+
flag declaration, so `--help` and the docs stop listing it on reads. An
|
|
67
|
+
explicit false still runs the read, as before: exactly the spellings a
|
|
68
|
+
write reads as false (`--preview=false`, `--no-preview`). Any other value
|
|
69
|
+
(`--preview=FALSE`, `=0`, `=no`) previews a write, so a read refuses it.
|
|
70
|
+
- **`job create` declares its required flags** (`--workplace-type`,
|
|
71
|
+
`--location`, `--employment-status`, `--description`, `--apply-method`),
|
|
72
|
+
and `company follow-invite` declares `--invitee`. Still exit 2 when one is
|
|
73
|
+
missing; `--help` now marks them required and the message reads
|
|
74
|
+
`Missing required argument: --<flag>`.
|
|
75
|
+
- `post save`, `post unsave`, `notification delete`, `notification show-less`
|
|
76
|
+
and `profile unfollow` describe what a repeat does in plain words.
|
|
77
|
+
- `account get`, `feed home`, `notification delete` and `webhook verify`
|
|
78
|
+
descriptions state their status values, the null text on the recent feed,
|
|
79
|
+
re-injected promotional cards and the verify exit codes.
|
|
80
|
+
|
|
11
81
|
## [0.41.0] - 2026-09-23
|
|
12
82
|
|
|
13
83
|
Follows `@curviate/sdk` to `0.37.1` and re-vendors the OpenAPI fixture from the
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
slimAccountGet,
|
|
7
7
|
slimAccountList,
|
|
8
8
|
slimAccountListItem
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EGDDVF3Q.js";
|
|
10
10
|
import {
|
|
11
11
|
buildPreviewOutput
|
|
12
12
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -25,19 +25,20 @@ import {
|
|
|
25
25
|
resolveEffectiveConfig,
|
|
26
26
|
streamAll,
|
|
27
27
|
writeNdjsonItem
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-B5NIX4G6.js";
|
|
29
29
|
import {
|
|
30
30
|
AUTH_NEEDED
|
|
31
31
|
} from "./chunk-XZJQQJBE.js";
|
|
32
32
|
import {
|
|
33
33
|
createClient
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-UJOTQPL6.js";
|
|
35
35
|
import {
|
|
36
36
|
GLOBAL_FLAGS,
|
|
37
37
|
READ_SINGLE_FLAGS,
|
|
38
38
|
WRITE_SINGLE_FLAGS,
|
|
39
|
-
defaultReadStdin
|
|
40
|
-
|
|
39
|
+
defaultReadStdin,
|
|
40
|
+
readOnly
|
|
41
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
41
42
|
|
|
42
43
|
// src/commands/account.ts
|
|
43
44
|
import { defineCommand } from "citty";
|
|
@@ -175,12 +176,6 @@ function nextCheckpointPollDelayMs(elapsedMs) {
|
|
|
175
176
|
// src/commands/account.ts
|
|
176
177
|
var PW_WARNING = (stdinFlag, envVar) => `Note: a value on the command line is visible to other processes via \`ps\` and saved in shell history; prefer \`${stdinFlag}\` or the ${envVar} env var.`;
|
|
177
178
|
var OPTIONAL_SECRET_WARNING = (envVar) => `Note: a value on the command line is visible to other processes via \`ps\` and saved in shell history; prefer the ${envVar} env var.`;
|
|
178
|
-
function rejectPreviewOnRead(preview, out) {
|
|
179
|
-
if (preview) {
|
|
180
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
181
|
-
process.exit(2);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
179
|
function rejectAllOnNonPaginated(all, out) {
|
|
185
180
|
if (all) {
|
|
186
181
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
@@ -212,7 +207,6 @@ async function handleError(err, outOpts, out) {
|
|
|
212
207
|
process.exit(1);
|
|
213
208
|
}
|
|
214
209
|
async function runAccountList(client, flags, out) {
|
|
215
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
216
210
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
217
211
|
const outOpts = resolveOutputOpts(flags);
|
|
218
212
|
const all = flags.all ?? false;
|
|
@@ -222,6 +216,7 @@ async function runAccountList(client, flags, out) {
|
|
|
222
216
|
const params = {};
|
|
223
217
|
if (limit !== void 0) params["limit"] = limit;
|
|
224
218
|
if (cursor) params["cursor"] = cursor;
|
|
219
|
+
if (flags["external-id"] !== void 0) params["external_id"] = flags["external-id"];
|
|
225
220
|
try {
|
|
226
221
|
if (all) {
|
|
227
222
|
const fn = (p) => client.accounts.list(p);
|
|
@@ -243,7 +238,6 @@ async function runAccountList(client, flags, out) {
|
|
|
243
238
|
}
|
|
244
239
|
}
|
|
245
240
|
async function runAccountGet(client, flags, out) {
|
|
246
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
247
241
|
rejectAllOnNonPaginated(flags.all, out);
|
|
248
242
|
const accountId = flags["account-id"] ?? "";
|
|
249
243
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -265,7 +259,6 @@ function renderSeatLineHuman(item) {
|
|
|
265
259
|
return `${seatId}: free`;
|
|
266
260
|
}
|
|
267
261
|
async function runAccountSeats(client, flags, out) {
|
|
268
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
269
262
|
const outOpts = resolveOutputOpts(flags);
|
|
270
263
|
let result;
|
|
271
264
|
try {
|
|
@@ -310,6 +303,20 @@ async function buildAuthBody(flags, ctx) {
|
|
|
310
303
|
body["linkedin_premium"] = value;
|
|
311
304
|
}
|
|
312
305
|
}
|
|
306
|
+
if (flags["external-id"] !== void 0) body["external_id"] = flags["external-id"];
|
|
307
|
+
if (flags.timezone !== void 0) body["timezone"] = flags.timezone;
|
|
308
|
+
if (flags.products !== void 0) {
|
|
309
|
+
const products = flags.products.split(",").map((p) => p.trim()).filter(Boolean);
|
|
310
|
+
if (products.length === 0 || products.some((p) => p !== "sales_navigator" && p !== "recruiter")) {
|
|
311
|
+
ctx.out.stderr.write(
|
|
312
|
+
`error: --products takes a comma-separated list of: sales_navigator, recruiter. Got "${flags.products}".
|
|
313
|
+
`
|
|
314
|
+
);
|
|
315
|
+
if (!ctx.previewMode) process.exit(2);
|
|
316
|
+
} else {
|
|
317
|
+
body["products"] = products;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
313
320
|
if (flags["auth-method"] === "credentials") {
|
|
314
321
|
const password = await resolveSecret({
|
|
315
322
|
flagValue: flags.password,
|
|
@@ -445,6 +452,16 @@ async function runInteractiveCheckpointLoop(client, initial, ctx) {
|
|
|
445
452
|
for (; ; ) {
|
|
446
453
|
const challengeType = current.challenge_type;
|
|
447
454
|
const accountId = current.account_id ?? "";
|
|
455
|
+
if (current.challenge_type === "challenge_selection") {
|
|
456
|
+
readableObject(current);
|
|
457
|
+
renderSuccess(current, ctx.outOpts, ctx.out);
|
|
458
|
+
ctx.out.stderr.write(
|
|
459
|
+
`Choose how LinkedIn verifies this sign-in: curviate account checkpoint request ${accountId} --challenge <id> (an id from challenges).
|
|
460
|
+
`
|
|
461
|
+
);
|
|
462
|
+
process.exit(AUTH_NEEDED);
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
448
465
|
printChallengeCopy(challengeType, ctx.out);
|
|
449
466
|
printResendHintIfApplicable(challengeType, accountId, ctx.out);
|
|
450
467
|
if (challengeType === "mobile_app_approval") {
|
|
@@ -849,21 +866,26 @@ async function runAccountCheckpointRequest(client, flags, out) {
|
|
|
849
866
|
}
|
|
850
867
|
const accountId = flags["account-id"] ?? "";
|
|
851
868
|
const outOpts = resolveOutputOpts(flags);
|
|
869
|
+
const body = flags.challenge !== void 0 ? { challenge: flags.challenge } : void 0;
|
|
852
870
|
if (flags.preview) {
|
|
853
871
|
const preview = buildPreviewOutput({
|
|
854
872
|
method: "auth.requestCheckpoint",
|
|
855
873
|
args: { accountId },
|
|
856
|
-
body: {}
|
|
874
|
+
body: body ?? {}
|
|
857
875
|
});
|
|
858
876
|
out.stdout.write(JSON.stringify(preview) + "\n");
|
|
859
877
|
return;
|
|
860
878
|
}
|
|
879
|
+
let chained = false;
|
|
861
880
|
try {
|
|
862
|
-
const result = await client.auth.requestCheckpoint(accountId);
|
|
881
|
+
const result = body ? await client.auth.requestCheckpoint(accountId, body) : await client.auth.requestCheckpoint(accountId);
|
|
863
882
|
renderSuccess(result, outOpts, out);
|
|
883
|
+
chained = result.status === "checkpoint_required";
|
|
864
884
|
} catch (err) {
|
|
865
885
|
await handleError(err, outOpts, out);
|
|
886
|
+
return;
|
|
866
887
|
}
|
|
888
|
+
if (chained) process.exit(AUTH_NEEDED);
|
|
867
889
|
}
|
|
868
890
|
function formatRemaining(ms) {
|
|
869
891
|
const totalSec = Math.max(0, Math.ceil(ms / 1e3));
|
|
@@ -965,8 +987,19 @@ async function runAccountCheckpointPoll(client, flags, out, io = {}) {
|
|
|
965
987
|
process.exit(AUTH_NEEDED);
|
|
966
988
|
}
|
|
967
989
|
var accountListCommand = defineCommand({
|
|
968
|
-
meta: {
|
|
969
|
-
|
|
990
|
+
meta: {
|
|
991
|
+
name: "list",
|
|
992
|
+
description: "List connected LinkedIn accounts.",
|
|
993
|
+
examples: [
|
|
994
|
+
"curviate account list",
|
|
995
|
+
"curviate account list --json --fields items.account_id,items.status",
|
|
996
|
+
"curviate account list --external-id usr_42"
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
args: {
|
|
1000
|
+
...readOnly(GLOBAL_FLAGS),
|
|
1001
|
+
"external-id": { type: "string", description: "Only accounts whose external_id (your own end-user id, set on link) equals this value exactly." }
|
|
1002
|
+
},
|
|
970
1003
|
async run({ args }) {
|
|
971
1004
|
const flags = args;
|
|
972
1005
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -985,10 +1018,16 @@ var accountListCommand = defineCommand({
|
|
|
985
1018
|
}
|
|
986
1019
|
});
|
|
987
1020
|
var accountGetCommand = defineCommand({
|
|
988
|
-
meta: {
|
|
1021
|
+
meta: {
|
|
1022
|
+
name: "get",
|
|
1023
|
+
description: "Get a connected LinkedIn account: its status (active, reconnect_needed, restricted, connecting or disconnected) and its per-action quotas. --verbose adds cached profile fields, which may be null.",
|
|
1024
|
+
examples: [
|
|
1025
|
+
"curviate account get acc_YOUR_ACCOUNT_ID"
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
989
1028
|
args: {
|
|
990
1029
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
991
|
-
...READ_SINGLE_FLAGS,
|
|
1030
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
992
1031
|
"account-id": { type: "positional", description: "Account id (acc_...)." }
|
|
993
1032
|
},
|
|
994
1033
|
async run({ args }) {
|
|
@@ -1011,9 +1050,12 @@ var accountGetCommand = defineCommand({
|
|
|
1011
1050
|
var accountSeatsCommand = defineCommand({
|
|
1012
1051
|
meta: {
|
|
1013
1052
|
name: "seats",
|
|
1014
|
-
description: "List the workspace's live seats and whether each is free or bound to an account. A seat with occupied:false (free) is a seat_id `curviate account link --seat-id` accepts right now. Not paginated (bounded by purchased seats), --all is not supported. An empty result can mean the workspace has no seats, or that billing needs attention."
|
|
1053
|
+
description: "List the workspace's live seats and whether each is free or bound to an account. A seat with occupied:false (free) is a seat_id `curviate account link --seat-id` accepts right now. Not paginated (bounded by purchased seats), --all is not supported. An empty result can mean the workspace has no seats, or that billing needs attention.",
|
|
1054
|
+
examples: [
|
|
1055
|
+
"curviate account seats"
|
|
1056
|
+
]
|
|
1015
1057
|
},
|
|
1016
|
-
args: { ...READ_SINGLE_FLAGS },
|
|
1058
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
1017
1059
|
async run({ args }) {
|
|
1018
1060
|
const flags = args;
|
|
1019
1061
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -1034,7 +1076,16 @@ var accountSeatsCommand = defineCommand({
|
|
|
1034
1076
|
var accountLinkCommand = defineCommand({
|
|
1035
1077
|
meta: {
|
|
1036
1078
|
name: "link",
|
|
1037
|
-
description: "Connect a LinkedIn account to an empty seat. If LinkedIn requires verification you'll be prompted for the code interactively. Given --auth-method and its credentials, a non-interactive shell exits 12 at that step and you finish with `curviate account checkpoint solve <account_id> --code`."
|
|
1079
|
+
description: "Connect a LinkedIn account to an empty seat. If LinkedIn requires verification you'll be prompted for the code interactively. Given --auth-method and its credentials, a non-interactive shell exits 12 at that step and you finish with `curviate account checkpoint solve <account_id> --code`.",
|
|
1080
|
+
examples: [
|
|
1081
|
+
"curviate account link --auth-method credentials --email jane@example.com --password-stdin",
|
|
1082
|
+
"curviate account link --auth-method credentials --email jane@example.com --password-stdin --account-id acc_YOUR_ACCOUNT_ID --seat-id SEAT_ID"
|
|
1083
|
+
],
|
|
1084
|
+
requires: [
|
|
1085
|
+
"--user-agent with --auth-method cookie.",
|
|
1086
|
+
"--seat-id with --preview or --account-id, and when zero or several seats are free.",
|
|
1087
|
+
"--password-stdin only with --auth-method credentials; --li-at-stdin only with --auth-method cookie."
|
|
1088
|
+
]
|
|
1038
1089
|
},
|
|
1039
1090
|
args: {
|
|
1040
1091
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1056,6 +1107,9 @@ var accountLinkCommand = defineCommand({
|
|
|
1056
1107
|
"user-agent": { type: "string", description: "Browser User-Agent to pin for this account. Required with --auth-method cookie: a session cookie only works paired with the User-Agent of the browser it was copied from, and the command exits 2 without it. Optional with --auth-method credentials, where it is still pinned for the account when given." },
|
|
1057
1108
|
"recruiter-contract-id": { type: "string", description: "Recruiter contract to bind to. Only meaningful when the LinkedIn account holds a Recruiter subscription." },
|
|
1058
1109
|
"linkedin-premium": { type: "string", description: "Narrow this connection to one LinkedIn premium surface: sales_navigator | recruiter. Omit it and the connect asks for every product and LinkedIn activates what the account holds. Applies to THIS call only and is never remembered, so restate it on every connect and reconnect where Recruiter must win." },
|
|
1110
|
+
products: { type: "string", description: "Comma-separated premium products to ask for: sales_navigator, recruiter. Omit to ask for both (--linkedin-premium still narrows). Classic LinkedIn and company pages are always included." },
|
|
1111
|
+
"external-id": { type: "string", description: "Your own id for this account's end user (1-255 chars, not unique). Returned on the account and every account webhook; filter with `account list --external-id`. Use an opaque id, not an email." },
|
|
1112
|
+
timezone: { type: "string", description: "IANA time zone for the account, e.g. Europe/Berlin. A UTC offset is refused." },
|
|
1059
1113
|
"account-id": { type: "string", description: "Existing account id (acc_...) to re-authenticate IN PLACE. Passing it makes this an in-place reconnect of that account. Omit to connect a NEW account into --seat-id." },
|
|
1060
1114
|
"no-interactive": {
|
|
1061
1115
|
type: "boolean",
|
|
@@ -1083,7 +1137,11 @@ var accountLinkCommand = defineCommand({
|
|
|
1083
1137
|
var accountConnectSessionPollCommand = defineCommand({
|
|
1084
1138
|
meta: {
|
|
1085
1139
|
name: "poll",
|
|
1086
|
-
description: "Poll the status of an in-progress connect (auth intent) for completion. Without --wait: a single poll. The JSON `status` field (pending | resolved | expired | failed) tells you what to do next. With --wait: block on the same adaptive cadence as `account link` until a terminal state."
|
|
1140
|
+
description: "Poll the status of an in-progress connect (auth intent) for completion. Without --wait: a single poll. The JSON `status` field (pending | resolved | expired | failed) tells you what to do next. With --wait: block on the same adaptive cadence as `account link` until a terminal state.",
|
|
1141
|
+
examples: [
|
|
1142
|
+
"curviate account connect-session poll --session acc_YOUR_ACCOUNT_ID",
|
|
1143
|
+
"curviate account connect-session poll --session acc_YOUR_ACCOUNT_ID --wait"
|
|
1144
|
+
]
|
|
1087
1145
|
},
|
|
1088
1146
|
args: {
|
|
1089
1147
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1132,7 +1190,14 @@ var accountConnectSessionCommand = defineCommand({
|
|
|
1132
1190
|
}
|
|
1133
1191
|
});
|
|
1134
1192
|
var accountUpdateCommand = defineCommand({
|
|
1135
|
-
meta: {
|
|
1193
|
+
meta: {
|
|
1194
|
+
name: "update",
|
|
1195
|
+
description: "Update an account's metadata and/or custom-proxy configuration.",
|
|
1196
|
+
examples: [
|
|
1197
|
+
`curviate account update acc_YOUR_ACCOUNT_ID --metadata '{"team":"growth"}'`,
|
|
1198
|
+
"curviate account update acc_YOUR_ACCOUNT_ID --clear-proxy"
|
|
1199
|
+
]
|
|
1200
|
+
},
|
|
1136
1201
|
args: {
|
|
1137
1202
|
...WRITE_SINGLE_FLAGS,
|
|
1138
1203
|
"account-id": { type: "positional", description: "Account id (acc_...)." },
|
|
@@ -1162,7 +1227,13 @@ var accountUpdateCommand = defineCommand({
|
|
|
1162
1227
|
}
|
|
1163
1228
|
});
|
|
1164
1229
|
var accountDisconnectCommand = defineCommand({
|
|
1165
|
-
meta: {
|
|
1230
|
+
meta: {
|
|
1231
|
+
name: "disconnect",
|
|
1232
|
+
description: "Hard-disconnect a LinkedIn account and release its seat.",
|
|
1233
|
+
examples: [
|
|
1234
|
+
"curviate account disconnect acc_YOUR_ACCOUNT_ID"
|
|
1235
|
+
]
|
|
1236
|
+
},
|
|
1166
1237
|
args: {
|
|
1167
1238
|
...WRITE_SINGLE_FLAGS,
|
|
1168
1239
|
"account-id": { type: "positional", description: "Account id (acc_...)." }
|
|
@@ -1185,7 +1256,13 @@ var accountDisconnectCommand = defineCommand({
|
|
|
1185
1256
|
}
|
|
1186
1257
|
});
|
|
1187
1258
|
var accountCheckpointSolveCommand = defineCommand({
|
|
1188
|
-
meta: {
|
|
1259
|
+
meta: {
|
|
1260
|
+
name: "solve",
|
|
1261
|
+
description: "Solve a checkpoint challenge with an OTP / 2FA code.",
|
|
1262
|
+
examples: [
|
|
1263
|
+
"curviate account checkpoint solve acc_YOUR_ACCOUNT_ID --code 123456"
|
|
1264
|
+
]
|
|
1265
|
+
},
|
|
1189
1266
|
args: {
|
|
1190
1267
|
...WRITE_SINGLE_FLAGS,
|
|
1191
1268
|
"account-id": {
|
|
@@ -1218,7 +1295,11 @@ var accountCheckpointSolveCommand = defineCommand({
|
|
|
1218
1295
|
var accountCheckpointPollCommand = defineCommand({
|
|
1219
1296
|
meta: {
|
|
1220
1297
|
name: "poll",
|
|
1221
|
-
description: "Poll for mobile-app approval of a pending checkpoint challenge. With --wait, blocks on an adaptive cadence until a terminal state (or --timeout elapses) instead of a single poll."
|
|
1298
|
+
description: "Poll for mobile-app approval of a pending checkpoint challenge. With --wait, blocks on an adaptive cadence until a terminal state (or --timeout elapses) instead of a single poll.",
|
|
1299
|
+
examples: [
|
|
1300
|
+
"curviate account checkpoint poll acc_YOUR_ACCOUNT_ID",
|
|
1301
|
+
"curviate account checkpoint poll acc_YOUR_ACCOUNT_ID --wait"
|
|
1302
|
+
]
|
|
1222
1303
|
},
|
|
1223
1304
|
args: {
|
|
1224
1305
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1259,13 +1340,21 @@ var accountCheckpointPollCommand = defineCommand({
|
|
|
1259
1340
|
var accountCheckpointRequestCommand = defineCommand({
|
|
1260
1341
|
meta: {
|
|
1261
1342
|
name: "request",
|
|
1262
|
-
description: "Re-request the challenge notification for a pending checkpoint (e.g. re-send an OTP email, SMS code, or mobile-app approval push). Not every challenge type supports it; an authenticator- app code has nothing to re-send. The response's `resent` boolean tells you honestly whether a new notification actually went out; the command still exits 0 either way."
|
|
1343
|
+
description: "Re-request the challenge notification for a pending checkpoint (e.g. re-send an OTP email, SMS code, or mobile-app approval push). Not every challenge type supports it; an authenticator- app code has nothing to re-send. The response's `resent` boolean tells you honestly whether a new notification actually went out; the command still exits 0 either way. With --challenge it instead answers a challenge_selection checkpoint by picking the verification method.",
|
|
1344
|
+
examples: [
|
|
1345
|
+
"curviate account checkpoint request acc_YOUR_ACCOUNT_ID",
|
|
1346
|
+
"curviate account checkpoint request acc_YOUR_ACCOUNT_ID --challenge sms"
|
|
1347
|
+
]
|
|
1263
1348
|
},
|
|
1264
1349
|
args: {
|
|
1265
1350
|
...WRITE_SINGLE_FLAGS,
|
|
1266
1351
|
"account-id": {
|
|
1267
1352
|
type: "positional",
|
|
1268
1353
|
description: "The provisional account_id (acc_...) from the 202 checkpoint_required response."
|
|
1354
|
+
},
|
|
1355
|
+
challenge: {
|
|
1356
|
+
type: "string",
|
|
1357
|
+
description: "Answer a challenge_selection checkpoint: an id from its challenges list (email | sms | whatsapp). Prints the next checkpoint and exits 12; solve it with `checkpoint solve`. Omit to re-send the current code."
|
|
1269
1358
|
}
|
|
1270
1359
|
},
|
|
1271
1360
|
async run({ args }) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readablePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-B5NIX4G6.js";
|
|
5
5
|
import {
|
|
6
6
|
getExitCode
|
|
7
7
|
} from "./chunk-XZJQQJBE.js";
|
|
8
8
|
import {
|
|
9
9
|
assertNoStdinPlaceholder
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/path-safety.ts
|
|
13
13
|
var UNSAFE_CHARS = /[\u0000-\u0020\u007F/\\?#%]/;
|
|
@@ -248,7 +248,8 @@ function slimAccountListItem(item) {
|
|
|
248
248
|
full_name: item["full_name"] ?? null,
|
|
249
249
|
headline: item["headline"] ?? null,
|
|
250
250
|
seat_id: item["seat_id"] ?? null,
|
|
251
|
-
connected_at: item["connected_at"] ?? null
|
|
251
|
+
connected_at: item["connected_at"] ?? null,
|
|
252
|
+
external_id: item["external_id"] ?? null
|
|
252
253
|
};
|
|
253
254
|
}
|
|
254
255
|
function slimAccountList(data) {
|
|
@@ -266,6 +267,7 @@ function slimAccountGet(data) {
|
|
|
266
267
|
headline: d["headline"] ?? null,
|
|
267
268
|
seat_id: d["seat_id"] ?? null,
|
|
268
269
|
connected_at: d["connected_at"] ?? null,
|
|
270
|
+
external_id: d["external_id"] ?? null,
|
|
269
271
|
last_checked_at: d["last_checked_at"] ?? null,
|
|
270
272
|
quotas: d["quotas"] ?? [],
|
|
271
273
|
account_states: d["account_states"] ?? []
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-UEAX6KUB.js";
|
|
19
19
|
import {
|
|
20
20
|
requireAccount
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BLJGV6ST.js";
|
|
22
22
|
import {
|
|
23
23
|
buildPreviewOutput
|
|
24
24
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -29,16 +29,17 @@ import {
|
|
|
29
29
|
renderSuccess,
|
|
30
30
|
renderUnexpectedError,
|
|
31
31
|
resolveEffectiveConfig
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-B5NIX4G6.js";
|
|
33
33
|
import {
|
|
34
34
|
createClient,
|
|
35
35
|
downloadBinary
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UJOTQPL6.js";
|
|
37
37
|
import {
|
|
38
38
|
READ_SINGLE_FLAGS,
|
|
39
39
|
WRITE_FLAGS,
|
|
40
|
+
readOnly,
|
|
40
41
|
resolveTextOrStdin
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
42
43
|
|
|
43
44
|
// src/commands/message.ts
|
|
44
45
|
import { defineCommand } from "citty";
|
|
@@ -48,12 +49,6 @@ function buildOutputStreams() {
|
|
|
48
49
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
function rejectPreviewOnRead(preview, out) {
|
|
52
|
-
if (preview) {
|
|
53
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
54
|
-
process.exit(2);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
52
|
function rejectAllOnNonPaginated(all, out) {
|
|
58
53
|
if (all) {
|
|
59
54
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
@@ -224,7 +219,6 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
224
219
|
}
|
|
225
220
|
}
|
|
226
221
|
async function runMessageGet(client, flags, out) {
|
|
227
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
228
222
|
rejectAllOnNonPaginated(flags.all, out);
|
|
229
223
|
const accountId = await requireAccount(client, flags, out);
|
|
230
224
|
const chatId = normalizeChatId(flags.chatId ?? "");
|
|
@@ -317,7 +311,6 @@ async function runMessageReact(client, flags, out) {
|
|
|
317
311
|
}
|
|
318
312
|
}
|
|
319
313
|
async function runMessageAttachment(client, flags, out, isTTY) {
|
|
320
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
321
314
|
const accountId = await requireAccount(client, flags, out);
|
|
322
315
|
const chatId = normalizeChatId(flags.chatId ?? "");
|
|
323
316
|
const messageId = flags.messageId ?? "";
|
|
@@ -392,7 +385,6 @@ async function runMessageInMail(client, flags, out, _readStdin) {
|
|
|
392
385
|
}
|
|
393
386
|
}
|
|
394
387
|
async function runMessageInMailBalance(client, flags, out) {
|
|
395
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
396
388
|
rejectAllOnNonPaginated(flags.all, out);
|
|
397
389
|
const accountId = await requireAccount(client, flags, out);
|
|
398
390
|
const ns = client.account(accountId);
|
|
@@ -406,7 +398,13 @@ async function runMessageInMailBalance(client, flags, out) {
|
|
|
406
398
|
}
|
|
407
399
|
}
|
|
408
400
|
var messageNewCommand = defineCommand({
|
|
409
|
-
meta: {
|
|
401
|
+
meta: {
|
|
402
|
+
name: "new",
|
|
403
|
+
description: "Start a new chat with one or more members.",
|
|
404
|
+
examples: [
|
|
405
|
+
'curviate message new --to janesmith "Hi Jane, enjoyed your post on agent evals."'
|
|
406
|
+
]
|
|
407
|
+
},
|
|
410
408
|
args: {
|
|
411
409
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
412
410
|
...WRITE_FLAGS,
|
|
@@ -441,10 +439,16 @@ var messageNewCommand = defineCommand({
|
|
|
441
439
|
}
|
|
442
440
|
});
|
|
443
441
|
var messageGetCommand = defineCommand({
|
|
444
|
-
meta: {
|
|
442
|
+
meta: {
|
|
443
|
+
name: "get",
|
|
444
|
+
description: "Get a message by ID.",
|
|
445
|
+
examples: [
|
|
446
|
+
"curviate message get 2-YTQ3ODU3Njgt MSG_ID"
|
|
447
|
+
]
|
|
448
|
+
},
|
|
445
449
|
args: {
|
|
446
450
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
447
|
-
...READ_SINGLE_FLAGS,
|
|
451
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
448
452
|
chatId: { type: "positional", description: "Chat ID or LinkedIn messaging thread URL." },
|
|
449
453
|
messageId: { type: "positional", description: "Message ID." }
|
|
450
454
|
},
|
|
@@ -467,7 +471,13 @@ var messageGetCommand = defineCommand({
|
|
|
467
471
|
}
|
|
468
472
|
});
|
|
469
473
|
var messageEditCommand = defineCommand({
|
|
470
|
-
meta: {
|
|
474
|
+
meta: {
|
|
475
|
+
name: "edit",
|
|
476
|
+
description: "Edit a message (within the allowed window).",
|
|
477
|
+
examples: [
|
|
478
|
+
'curviate message edit 2-YTQ3ODU3Njgt MSG_ID "Thanks, that makes sense to me."'
|
|
479
|
+
]
|
|
480
|
+
},
|
|
471
481
|
args: {
|
|
472
482
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
473
483
|
...WRITE_FLAGS,
|
|
@@ -494,7 +504,13 @@ var messageEditCommand = defineCommand({
|
|
|
494
504
|
}
|
|
495
505
|
});
|
|
496
506
|
var messageDeleteCommand = defineCommand({
|
|
497
|
-
meta: {
|
|
507
|
+
meta: {
|
|
508
|
+
name: "delete",
|
|
509
|
+
description: "Delete a message.",
|
|
510
|
+
examples: [
|
|
511
|
+
"curviate message delete 2-YTQ3ODU3Njgt MSG_ID"
|
|
512
|
+
]
|
|
513
|
+
},
|
|
498
514
|
args: {
|
|
499
515
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
500
516
|
...WRITE_FLAGS,
|
|
@@ -520,7 +536,16 @@ var messageDeleteCommand = defineCommand({
|
|
|
520
536
|
}
|
|
521
537
|
});
|
|
522
538
|
var messageReactCommand = defineCommand({
|
|
523
|
-
meta: {
|
|
539
|
+
meta: {
|
|
540
|
+
name: "react",
|
|
541
|
+
description: "Add an emoji reaction to a message.",
|
|
542
|
+
examples: [
|
|
543
|
+
"curviate message react 2-YTQ3ODU3Njgt MSG_ID \u{1F44D}"
|
|
544
|
+
],
|
|
545
|
+
requires: [
|
|
546
|
+
"The reaction: the <emoji> argument or --emoji."
|
|
547
|
+
]
|
|
548
|
+
},
|
|
524
549
|
args: {
|
|
525
550
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
526
551
|
...WRITE_FLAGS,
|
|
@@ -552,10 +577,16 @@ var messageReactCommand = defineCommand({
|
|
|
552
577
|
}
|
|
553
578
|
});
|
|
554
579
|
var messageAttachmentCommand = defineCommand({
|
|
555
|
-
meta: {
|
|
580
|
+
meta: {
|
|
581
|
+
name: "attachment",
|
|
582
|
+
description: "Download a message attachment.",
|
|
583
|
+
examples: [
|
|
584
|
+
"curviate message attachment 2-YTQ3ODU3Njgt MSG_ID ATTACHMENT_ID -o attachment.pdf"
|
|
585
|
+
]
|
|
586
|
+
},
|
|
556
587
|
args: {
|
|
557
588
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
558
|
-
...READ_SINGLE_FLAGS,
|
|
589
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
559
590
|
chatId: { type: "positional", description: "Chat ID or LinkedIn messaging thread URL." },
|
|
560
591
|
messageId: { type: "positional", description: "Message ID." },
|
|
561
592
|
attachmentId: { type: "positional", description: "Attachment ID." },
|
|
@@ -585,7 +616,13 @@ var messageAttachmentCommand = defineCommand({
|
|
|
585
616
|
}
|
|
586
617
|
});
|
|
587
618
|
var messageInMailCommand = defineCommand({
|
|
588
|
-
meta: {
|
|
619
|
+
meta: {
|
|
620
|
+
name: "inmail",
|
|
621
|
+
description: "Send an InMail to a member.",
|
|
622
|
+
examples: [
|
|
623
|
+
'curviate message inmail --to janesmith --subject "Agent tooling" "Hi Jane, a quick question about your eval setup."'
|
|
624
|
+
]
|
|
625
|
+
},
|
|
589
626
|
args: {
|
|
590
627
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
591
628
|
...WRITE_FLAGS,
|
|
@@ -618,7 +655,10 @@ var messageInMailCommand = defineCommand({
|
|
|
618
655
|
var messageSendCommand = defineCommand({
|
|
619
656
|
meta: {
|
|
620
657
|
name: "send",
|
|
621
|
-
description: 'Send a message to an existing chat. Pass a COMPANY_ chat id (from `inboxes chats`) to send as that company page instead of yourself, no separate flag needed. The output shows the acting identity: a company-page send prints "Sent as <name> (company page)", a personal send prints nothing new. See also: `inboxes chats` (discover a COMPANY_ chat id) and the Reply as a company page guide.'
|
|
658
|
+
description: 'Send a message to an existing chat. Pass a COMPANY_ chat id (from `inboxes chats`) to send as that company page instead of yourself, no separate flag needed. The output shows the acting identity: a company-page send prints "Sent as <name> (company page)", a personal send prints nothing new. See also: `inboxes chats` (discover a COMPANY_ chat id) and the Reply as a company page guide.',
|
|
659
|
+
examples: [
|
|
660
|
+
'curviate message send 2-YTQ3ODU3Njgt "Thanks, that makes sense."'
|
|
661
|
+
]
|
|
622
662
|
},
|
|
623
663
|
args: {
|
|
624
664
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
@@ -649,10 +689,16 @@ var messageSendCommand = defineCommand({
|
|
|
649
689
|
}
|
|
650
690
|
});
|
|
651
691
|
var messageInMailBalanceCommand = defineCommand({
|
|
652
|
-
meta: {
|
|
692
|
+
meta: {
|
|
693
|
+
name: "inmail-balance",
|
|
694
|
+
description: "Get InMail credit balance.",
|
|
695
|
+
examples: [
|
|
696
|
+
"curviate message inmail-balance"
|
|
697
|
+
]
|
|
698
|
+
},
|
|
653
699
|
args: {
|
|
654
700
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
655
|
-
...READ_SINGLE_FLAGS
|
|
701
|
+
...readOnly(READ_SINGLE_FLAGS)
|
|
656
702
|
},
|
|
657
703
|
async run({ args }) {
|
|
658
704
|
const flags = args;
|
|
@@ -707,7 +753,11 @@ function guardBareMessageForm(chatId, out) {
|
|
|
707
753
|
var messageCommand = defineCommand({
|
|
708
754
|
meta: {
|
|
709
755
|
name: "message",
|
|
710
|
-
description: "Send and manage LinkedIn messages. A COMPANY_ chat id (from `inboxes chats`) sends as that company page instead of yourself; see `message send --help`."
|
|
756
|
+
description: "Send and manage LinkedIn messages. A COMPANY_ chat id (from `inboxes chats`) sends as that company page instead of yourself; see `message send --help`.",
|
|
757
|
+
examples: [
|
|
758
|
+
'curviate message 2-YTQ3ODU3Njgt "Thanks, that makes sense."',
|
|
759
|
+
'curviate message 2-YTQ3ODU3Njgt "See the attached brief." --attach brief.pdf'
|
|
760
|
+
]
|
|
711
761
|
},
|
|
712
762
|
args: {
|
|
713
763
|
// Write command (message send): WRITE_FLAGS omits pagination/projection flags
|