@curviate/cli 0.42.0 → 0.44.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 +67 -1
- package/dist/{account-PFK5YROZ.js → account-FDPUPVFB.js} +49 -7
- package/dist/{chunk-XP2LN6F6.js → chunk-EGDDVF3Q.js} +3 -1
- package/dist/{chunk-OUMMWC7G.js → chunk-FD4AANAA.js} +16 -1
- package/dist/cli.js +11 -11
- package/dist/{company-WX5QOASS.js → company-IOSYYCXY.js} +6 -6
- package/dist/{connect-IYTFL7NT.js → connect-GHABKXB2.js} +1 -1
- package/dist/{job-XW3WM57J.js → job-OJB4VSI2.js} +1 -1
- package/dist/{message-5XC7U4JC.js → message-VZHXBKTO.js} +1 -1
- package/dist/{post-LSEBRQYK.js → post-ZQIYCN7A.js} +2 -2
- package/dist/{profile-NHTYGX7K.js → profile-COLBPBGO.js} +2 -3
- package/dist/{recruiter-4SDAROK4.js → recruiter-4KFVMKZQ.js} +15 -8
- package/dist/{search-XDOQZAVG.js → search-3MRQE6VC.js} +1 -1
- package/dist/{webhook-XOPRW63N.js → webhook-ND7XZ7FW.js} +28 -15
- package/package.json +2 -2
- package/dist/{sales-nav-77NP3UXV.js → sales-nav-IOBEJ4OP.js} +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,73 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
6
6
|
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
|
|
7
7
|
a new command or flag is a minor; a breaking command/flag/exit-code change is a major (before 1.0.0, a minor); a fix is a patch.
|
|
8
8
|
|
|
9
|
-
## [
|
|
9
|
+
## [0.44.0] - 2026-09-28
|
|
10
|
+
|
|
11
|
+
Requires `@curviate/sdk` 0.39.0.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **`message inmail --subject ""` now fails as a usage error before any
|
|
16
|
+
request**, matching `message new`'s ruling. It previously reached the
|
|
17
|
+
wire (after resolving `--to`, itself a network call) and cost a
|
|
18
|
+
guaranteed 400: the served contract requires `subject` at 1-200 chars.
|
|
19
|
+
An over-200-char subject is refused the same way.
|
|
20
|
+
- **`sales-nav message new --subject ""` and `recruiter message new
|
|
21
|
+
--subject ""`/`--signature ""` now fail before the account lookup**,
|
|
22
|
+
not after. Both already refused an empty value with exit 2, but the
|
|
23
|
+
check ran after `requireAccount`, which issues `GET /v1/accounts` when
|
|
24
|
+
`--account` is omitted, a lost required flag cost that request too.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **`--cursor` and `--limit` removed from `--help` on 10 commands whose
|
|
29
|
+
served endpoint accepts neither**: `company`, `company chat`,
|
|
30
|
+
`company message`, `post get`, `profile endorse`, `webhook create`,
|
|
31
|
+
`webhook delete`, `webhook events`, `webhook get`, `webhook update`. Both
|
|
32
|
+
flags were accepted and silently produced a request the server could not
|
|
33
|
+
page. `recruiter search parameters` is the one asymmetric case: its
|
|
34
|
+
endpoint takes `limit` but no `cursor`, so `--limit` stays and only
|
|
35
|
+
`--cursor` is refused (exit 2, unknown flag). `recruiter applicants` keeps
|
|
36
|
+
both; its endpoint genuinely takes `cursor` and `limit`, just never
|
|
37
|
+
`--all` streaming.
|
|
38
|
+
- **`@curviate/sdk` bumped to 0.39.0.** The SDK's retry decision now honours
|
|
39
|
+
an explicit `retry_likely_to_succeed: false` on a retryable code (`INTERNAL`,
|
|
40
|
+
`PLATFORM_ERROR`, `PLATFORM_RATE_LIMIT`, `RATE_LIMIT_ACCOUNT`,
|
|
41
|
+
`RATE_LIMIT_TENANT`) and stops retrying that request instead of retrying
|
|
42
|
+
once more. No CLI-surfaced flag or output changed; commands that hit one of
|
|
43
|
+
those codes with the server's `retry_likely_to_succeed: false` now fail
|
|
44
|
+
faster instead of after one wasted retry.
|
|
45
|
+
|
|
46
|
+
## [0.43.0] - 2026-09-25
|
|
47
|
+
|
|
48
|
+
Programmatic connect at scale: tag accounts with your own end-user id, one
|
|
49
|
+
account-status webhook for every account, and the verification-method choice
|
|
50
|
+
on checkpoints. Requires `@curviate/sdk` 0.38.0.
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **`account link --external-id <id> --timezone <zone> --products <list>`.**
|
|
55
|
+
`--external-id` stores your own id for the account's end user; it comes back
|
|
56
|
+
on the account and on every account webhook. `--timezone` is an IANA zone
|
|
57
|
+
(`Europe/Berlin`). `--products` narrows the premium products asked for
|
|
58
|
+
(`sales_navigator`, `recruiter`, comma-separated); an empty or unknown value
|
|
59
|
+
exits 2.
|
|
60
|
+
- **`account list --external-id <id>`** lists only that end user's accounts.
|
|
61
|
+
`account list` and `account get` show `external_id` in their default view.
|
|
62
|
+
- **`account checkpoint request <account_id> --challenge <id>`** answers a
|
|
63
|
+
`challenge_selection` checkpoint (LinkedIn asking which method to verify
|
|
64
|
+
with: `email`, `sms` or `whatsapp`). It prints the next checkpoint and
|
|
65
|
+
exits 12; finish with `account checkpoint solve`.
|
|
66
|
+
- **`webhook create --source account_status` without `--account-ids`** covers
|
|
67
|
+
every current and future account. `messaging` and `user` still require
|
|
68
|
+
`--account-ids`, and an empty `--account-ids` value exits 2 instead of
|
|
69
|
+
widening to every account.
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
|
|
73
|
+
- **`account link` on a terminal no longer prompts for a code at a
|
|
74
|
+
`challenge_selection` checkpoint.** It prints the choices, names the
|
|
75
|
+
`checkpoint request --challenge` command, and exits 12.
|
|
10
76
|
|
|
11
77
|
## [0.42.0] - 2026-09-23
|
|
12
78
|
|
|
@@ -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";
|
|
@@ -216,6 +216,7 @@ async function runAccountList(client, flags, out) {
|
|
|
216
216
|
const params = {};
|
|
217
217
|
if (limit !== void 0) params["limit"] = limit;
|
|
218
218
|
if (cursor) params["cursor"] = cursor;
|
|
219
|
+
if (flags["external-id"] !== void 0) params["external_id"] = flags["external-id"];
|
|
219
220
|
try {
|
|
220
221
|
if (all) {
|
|
221
222
|
const fn = (p) => client.accounts.list(p);
|
|
@@ -302,6 +303,20 @@ async function buildAuthBody(flags, ctx) {
|
|
|
302
303
|
body["linkedin_premium"] = value;
|
|
303
304
|
}
|
|
304
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
|
+
}
|
|
305
320
|
if (flags["auth-method"] === "credentials") {
|
|
306
321
|
const password = await resolveSecret({
|
|
307
322
|
flagValue: flags.password,
|
|
@@ -437,6 +452,16 @@ async function runInteractiveCheckpointLoop(client, initial, ctx) {
|
|
|
437
452
|
for (; ; ) {
|
|
438
453
|
const challengeType = current.challenge_type;
|
|
439
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
|
+
}
|
|
440
465
|
printChallengeCopy(challengeType, ctx.out);
|
|
441
466
|
printResendHintIfApplicable(challengeType, accountId, ctx.out);
|
|
442
467
|
if (challengeType === "mobile_app_approval") {
|
|
@@ -841,21 +866,26 @@ async function runAccountCheckpointRequest(client, flags, out) {
|
|
|
841
866
|
}
|
|
842
867
|
const accountId = flags["account-id"] ?? "";
|
|
843
868
|
const outOpts = resolveOutputOpts(flags);
|
|
869
|
+
const body = flags.challenge !== void 0 ? { challenge: flags.challenge } : void 0;
|
|
844
870
|
if (flags.preview) {
|
|
845
871
|
const preview = buildPreviewOutput({
|
|
846
872
|
method: "auth.requestCheckpoint",
|
|
847
873
|
args: { accountId },
|
|
848
|
-
body: {}
|
|
874
|
+
body: body ?? {}
|
|
849
875
|
});
|
|
850
876
|
out.stdout.write(JSON.stringify(preview) + "\n");
|
|
851
877
|
return;
|
|
852
878
|
}
|
|
879
|
+
let chained = false;
|
|
853
880
|
try {
|
|
854
|
-
const result = await client.auth.requestCheckpoint(accountId);
|
|
881
|
+
const result = body ? await client.auth.requestCheckpoint(accountId, body) : await client.auth.requestCheckpoint(accountId);
|
|
855
882
|
renderSuccess(result, outOpts, out);
|
|
883
|
+
chained = result.status === "checkpoint_required";
|
|
856
884
|
} catch (err) {
|
|
857
885
|
await handleError(err, outOpts, out);
|
|
886
|
+
return;
|
|
858
887
|
}
|
|
888
|
+
if (chained) process.exit(AUTH_NEEDED);
|
|
859
889
|
}
|
|
860
890
|
function formatRemaining(ms) {
|
|
861
891
|
const totalSec = Math.max(0, Math.ceil(ms / 1e3));
|
|
@@ -962,10 +992,14 @@ var accountListCommand = defineCommand({
|
|
|
962
992
|
description: "List connected LinkedIn accounts.",
|
|
963
993
|
examples: [
|
|
964
994
|
"curviate account list",
|
|
965
|
-
"curviate account list --json --fields items.account_id,items.status"
|
|
995
|
+
"curviate account list --json --fields items.account_id,items.status",
|
|
996
|
+
"curviate account list --external-id usr_42"
|
|
966
997
|
]
|
|
967
998
|
},
|
|
968
|
-
args: {
|
|
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
|
+
},
|
|
969
1003
|
async run({ args }) {
|
|
970
1004
|
const flags = args;
|
|
971
1005
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -1073,6 +1107,9 @@ var accountLinkCommand = defineCommand({
|
|
|
1073
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." },
|
|
1074
1108
|
"recruiter-contract-id": { type: "string", description: "Recruiter contract to bind to. Only meaningful when the LinkedIn account holds a Recruiter subscription." },
|
|
1075
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." },
|
|
1076
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." },
|
|
1077
1114
|
"no-interactive": {
|
|
1078
1115
|
type: "boolean",
|
|
@@ -1303,9 +1340,10 @@ var accountCheckpointPollCommand = defineCommand({
|
|
|
1303
1340
|
var accountCheckpointRequestCommand = defineCommand({
|
|
1304
1341
|
meta: {
|
|
1305
1342
|
name: "request",
|
|
1306
|
-
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.",
|
|
1307
1344
|
examples: [
|
|
1308
|
-
"curviate account checkpoint request acc_YOUR_ACCOUNT_ID"
|
|
1345
|
+
"curviate account checkpoint request acc_YOUR_ACCOUNT_ID",
|
|
1346
|
+
"curviate account checkpoint request acc_YOUR_ACCOUNT_ID --challenge sms"
|
|
1309
1347
|
]
|
|
1310
1348
|
},
|
|
1311
1349
|
args: {
|
|
@@ -1313,6 +1351,10 @@ var accountCheckpointRequestCommand = defineCommand({
|
|
|
1313
1351
|
"account-id": {
|
|
1314
1352
|
type: "positional",
|
|
1315
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."
|
|
1316
1358
|
}
|
|
1317
1359
|
},
|
|
1318
1360
|
async run({ args }) {
|
|
@@ -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"] ?? []
|
|
@@ -74,6 +74,21 @@ function readChatSubjectFlag(flags, out) {
|
|
|
74
74
|
}
|
|
75
75
|
return raw;
|
|
76
76
|
}
|
|
77
|
+
function readInMailSubjectFlag(flags, out) {
|
|
78
|
+
const raw = flags.subject ?? "";
|
|
79
|
+
if (raw.trim() === "") {
|
|
80
|
+
out.stderr.write("error: --subject was given an empty value. Pass the subject line.\n");
|
|
81
|
+
process.exit(2);
|
|
82
|
+
}
|
|
83
|
+
if (raw.length > CHAT_SUBJECT_MAX_CHARS) {
|
|
84
|
+
out.stderr.write(
|
|
85
|
+
`error: --subject is ${raw.length} characters; the maximum is ${CHAT_SUBJECT_MAX_CHARS}.
|
|
86
|
+
`
|
|
87
|
+
);
|
|
88
|
+
process.exit(2);
|
|
89
|
+
}
|
|
90
|
+
return raw;
|
|
91
|
+
}
|
|
77
92
|
function resolveOutputOpts(flags) {
|
|
78
93
|
return {
|
|
79
94
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -334,6 +349,7 @@ async function runMessageAttachment(client, flags, out, isTTY) {
|
|
|
334
349
|
}
|
|
335
350
|
}
|
|
336
351
|
async function runMessageInMail(client, flags, out, _readStdin) {
|
|
352
|
+
const subject = readInMailSubjectFlag(flags, out);
|
|
337
353
|
const accountId = await requireAccount(client, flags, out);
|
|
338
354
|
const rawTo = flags.to ?? "";
|
|
339
355
|
if (!rawTo) {
|
|
@@ -359,7 +375,6 @@ async function runMessageInMail(client, flags, out, _readStdin) {
|
|
|
359
375
|
return;
|
|
360
376
|
}
|
|
361
377
|
}
|
|
362
|
-
const subject = flags.subject ?? "";
|
|
363
378
|
const rawText = flags.text ?? "";
|
|
364
379
|
const text = await resolveTextOrStdin(rawText, out, _readStdin);
|
|
365
380
|
const body = {
|
package/dist/cli.js
CHANGED
|
@@ -34,20 +34,20 @@ var main = defineCommand({
|
|
|
34
34
|
// ---------------------------------------------------------------------------
|
|
35
35
|
// Noun groups, lazy-loaded on first invocation.
|
|
36
36
|
// ---------------------------------------------------------------------------
|
|
37
|
-
profile: () => import("./profile-
|
|
38
|
-
company: () => import("./company-
|
|
39
|
-
job: () => import("./job-
|
|
40
|
-
connect: () => import("./connect-
|
|
41
|
-
search: () => import("./search-
|
|
37
|
+
profile: () => import("./profile-COLBPBGO.js").then((m) => m.profileCommand),
|
|
38
|
+
company: () => import("./company-IOSYYCXY.js").then((m) => m.companyCommand),
|
|
39
|
+
job: () => import("./job-OJB4VSI2.js").then((m) => m.jobCommand),
|
|
40
|
+
connect: () => import("./connect-GHABKXB2.js").then((m) => m.connectCommand),
|
|
41
|
+
search: () => import("./search-3MRQE6VC.js").then((m) => m.searchCommand),
|
|
42
42
|
inbox: () => import("./inbox-W3KR65VD.js").then((m) => m.inboxCommand),
|
|
43
43
|
inboxes: () => import("./inboxes-XYS3IRT6.js").then((m) => m.inboxesCommand),
|
|
44
|
-
message: () => import("./message-
|
|
45
|
-
post: () => import("./post-
|
|
44
|
+
message: () => import("./message-VZHXBKTO.js").then((m) => m.messageCommand),
|
|
45
|
+
post: () => import("./post-ZQIYCN7A.js").then((m) => m.postCommand),
|
|
46
46
|
comment: () => import("./comment-G4EXIIAQ.js").then((m) => m.commentCommand),
|
|
47
|
-
account: () => import("./account-
|
|
48
|
-
webhook: () => import("./webhook-
|
|
49
|
-
"sales-nav": () => import("./sales-nav-
|
|
50
|
-
recruiter: () => import("./recruiter-
|
|
47
|
+
account: () => import("./account-FDPUPVFB.js").then((m) => m.accountCommand),
|
|
48
|
+
webhook: () => import("./webhook-ND7XZ7FW.js").then((m) => m.webhookCommand),
|
|
49
|
+
"sales-nav": () => import("./sales-nav-IOBEJ4OP.js").then((m) => m.salesNavCommand),
|
|
50
|
+
recruiter: () => import("./recruiter-4KFVMKZQ.js").then((m) => m.recruiterCommand),
|
|
51
51
|
group: () => import("./group-JDP2HVSV.js").then((m) => m.groupCommand),
|
|
52
52
|
feed: () => import("./feed-XC5235UF.js").then((m) => m.feedCommand),
|
|
53
53
|
notification: () => import("./notification-RIUSYJV6.js").then((m) => m.notificationCommand)
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
slimSearchJobs,
|
|
8
8
|
slimSearchPeople,
|
|
9
9
|
slimSearchPosts
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EGDDVF3Q.js";
|
|
11
11
|
import {
|
|
12
12
|
sentAsNotice
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FD4AANAA.js";
|
|
14
14
|
import "./chunk-UWO2D4HW.js";
|
|
15
15
|
import "./chunk-HOQ7EUHJ.js";
|
|
16
16
|
import {
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
} from "./chunk-UJOTQPL6.js";
|
|
49
49
|
import {
|
|
50
50
|
GLOBAL_FLAGS,
|
|
51
|
-
|
|
51
|
+
READ_SINGLE_FLAGS,
|
|
52
52
|
WRITE_FLAGS,
|
|
53
53
|
readOnly,
|
|
54
54
|
resolveTextOrStdin
|
|
@@ -765,7 +765,7 @@ var companyChatCommand = defineCommand({
|
|
|
765
765
|
]
|
|
766
766
|
},
|
|
767
767
|
args: {
|
|
768
|
-
...readOnly(
|
|
768
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
769
769
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
770
770
|
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
|
|
771
771
|
},
|
|
@@ -827,7 +827,7 @@ var companyMessageCommand = defineCommand({
|
|
|
827
827
|
]
|
|
828
828
|
},
|
|
829
829
|
args: {
|
|
830
|
-
...readOnly(
|
|
830
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
831
831
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
832
832
|
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." },
|
|
833
833
|
messageId: { type: "positional", description: "The message id from `company messages`, passed through verbatim." }
|
|
@@ -930,7 +930,7 @@ var companyCommand = defineCommand({
|
|
|
930
930
|
]
|
|
931
931
|
},
|
|
932
932
|
args: {
|
|
933
|
-
...readOnly(
|
|
933
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
934
934
|
id: { type: "positional", description: "Company identifier (URL, slug, or native id)." },
|
|
935
935
|
sections: { type: "string", description: "Not supported on company commands; a usage error (exit 2) if supplied." }
|
|
936
936
|
},
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./chunk-UJOTQPL6.js";
|
|
35
35
|
import {
|
|
36
36
|
GLOBAL_FLAGS,
|
|
37
|
-
|
|
37
|
+
READ_SINGLE_FLAGS,
|
|
38
38
|
WRITE_FLAGS,
|
|
39
39
|
WRITE_SINGLE_FLAGS,
|
|
40
40
|
readOnly,
|
|
@@ -392,7 +392,7 @@ var postGetCommand = defineCommand({
|
|
|
392
392
|
]
|
|
393
393
|
},
|
|
394
394
|
args: {
|
|
395
|
-
...readOnly(
|
|
395
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
396
396
|
postId: {
|
|
397
397
|
type: "positional",
|
|
398
398
|
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id. To list comments on a post, use 'comment list <post_id>'."
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
slimProfile,
|
|
5
5
|
slimProfileMe,
|
|
6
6
|
withRequestedSections
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EGDDVF3Q.js";
|
|
8
8
|
import {
|
|
9
9
|
RETRIEVAL_FLAGS,
|
|
10
10
|
hasRetrievalFlags,
|
|
@@ -49,7 +49,6 @@ import {
|
|
|
49
49
|
} from "./chunk-UJOTQPL6.js";
|
|
50
50
|
import {
|
|
51
51
|
GLOBAL_FLAGS,
|
|
52
|
-
NON_STREAM_FLAGS,
|
|
53
52
|
READ_SINGLE_FLAGS,
|
|
54
53
|
WRITE_SINGLE_FLAGS,
|
|
55
54
|
readOnly
|
|
@@ -746,7 +745,7 @@ var profileEndorseCommand = defineCommand({
|
|
|
746
745
|
]
|
|
747
746
|
},
|
|
748
747
|
args: {
|
|
749
|
-
...
|
|
748
|
+
...WRITE_SINGLE_FLAGS,
|
|
750
749
|
id: { type: "positional", description: "Member identifier (URL, slug, or provider id). A URL/slug is resolved to the provider id automatically (a slug is not accepted directly by the endorse endpoint)." },
|
|
751
750
|
"endorsement-id": {
|
|
752
751
|
type: "string",
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-KJ24DIAJ.js";
|
|
7
7
|
import {
|
|
8
8
|
slimJob
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EGDDVF3Q.js";
|
|
10
10
|
import {
|
|
11
11
|
BinaryOutputError,
|
|
12
12
|
writeBinaryOutput
|
|
@@ -181,14 +181,8 @@ function requireRecruiterJobFields(body, extra, out) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
async function runRecruiterMessageNew(client, flags, out) {
|
|
184
|
-
const accountId = await requireAccount(client, flags, out);
|
|
185
|
-
const to = flags.to ?? "";
|
|
186
|
-
const text = flags.text ?? "";
|
|
187
184
|
const subject = flags.subject ?? "";
|
|
188
185
|
const signature = flags.signature ?? "";
|
|
189
|
-
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
190
|
-
const voicePath = flags.voice;
|
|
191
|
-
const videoPath = flags.video;
|
|
192
186
|
if (!subject) {
|
|
193
187
|
out.stderr.write("error: --subject is required (v2: REQUIRED for Recruiter messaging).\n");
|
|
194
188
|
process.exit(2);
|
|
@@ -197,6 +191,12 @@ async function runRecruiterMessageNew(client, flags, out) {
|
|
|
197
191
|
out.stderr.write("error: --signature is required (v2: REQUIRED for Recruiter messaging).\n");
|
|
198
192
|
process.exit(2);
|
|
199
193
|
}
|
|
194
|
+
const accountId = await requireAccount(client, flags, out);
|
|
195
|
+
const to = flags.to ?? "";
|
|
196
|
+
const text = flags.text ?? "";
|
|
197
|
+
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
198
|
+
const voicePath = flags.voice;
|
|
199
|
+
const videoPath = flags.video;
|
|
200
200
|
let attachBuffers = [];
|
|
201
201
|
let voiceBuffer;
|
|
202
202
|
let videoBuffer;
|
|
@@ -1023,7 +1023,12 @@ var recruiterSearchParametersCommand = defineCommand({
|
|
|
1023
1023
|
]
|
|
1024
1024
|
},
|
|
1025
1025
|
args: {
|
|
1026
|
-
...readOnly(
|
|
1026
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
1027
|
+
// The served endpoint takes `limit` (1-100) but no `cursor` at all
|
|
1028
|
+
// (`POST .../recruiter/search/parameters`, query params are
|
|
1029
|
+
// `offset`/`limit`); the one asymmetric case in this set, so `--limit`
|
|
1030
|
+
// is added back explicitly rather than pulled in via a flag bundle.
|
|
1031
|
+
limit: GLOBAL_FLAGS.limit,
|
|
1027
1032
|
source: {
|
|
1028
1033
|
type: "string",
|
|
1029
1034
|
description: "Filter family to resolve within: APPLICANTS or PIPELINE (both require --project-id), SEARCH, JOB_POSTING, or JOBS.",
|
|
@@ -1406,6 +1411,8 @@ var recruiterApplicantsCommand = defineCommand({
|
|
|
1406
1411
|
]
|
|
1407
1412
|
},
|
|
1408
1413
|
args: {
|
|
1414
|
+
// Genuinely paginated (operation-level query: cursor?, limit?) but never
|
|
1415
|
+
// streamed with --all; manual --cursor paging only. See NON_STREAM_FLAGS.
|
|
1409
1416
|
...readOnly(NON_STREAM_FLAGS),
|
|
1410
1417
|
projectId: { type: "positional", description: "Recruiter project ID." },
|
|
1411
1418
|
"channel-id": { type: "string", description: "The project's JOB_POSTING talent-pool channel ID (required).", required: true }
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
} from "./chunk-UJOTQPL6.js";
|
|
22
22
|
import {
|
|
23
23
|
GLOBAL_FLAGS,
|
|
24
|
-
|
|
24
|
+
READ_SINGLE_FLAGS,
|
|
25
|
+
WRITE_SINGLE_FLAGS,
|
|
25
26
|
defaultReadStdin,
|
|
26
27
|
isStdinToken,
|
|
27
28
|
readOnly
|
|
@@ -68,16 +69,25 @@ async function runWebhookCreate(client, flags, out) {
|
|
|
68
69
|
out.stderr.write("error: --request-url is required (HTTPS URL for webhook deliveries).\n");
|
|
69
70
|
process.exit(2);
|
|
70
71
|
}
|
|
71
|
-
if (!flags["account-ids"]) {
|
|
72
|
-
out.stderr.write("error: --account-ids is required (comma-separated list of acc_... ids).\n");
|
|
73
|
-
process.exit(2);
|
|
74
|
-
}
|
|
75
|
-
const accountIds = flags["account-ids"].split(",").map((s) => s.trim()).filter(Boolean);
|
|
76
72
|
const body = {
|
|
77
73
|
source: flags.source,
|
|
78
|
-
request_url: flags["request-url"]
|
|
79
|
-
account_ids: accountIds
|
|
74
|
+
request_url: flags["request-url"]
|
|
80
75
|
};
|
|
76
|
+
if (flags["account-ids"] !== void 0) {
|
|
77
|
+
const accountIds = flags["account-ids"].split(",").map((s) => s.trim()).filter(Boolean);
|
|
78
|
+
if (accountIds.length === 0) {
|
|
79
|
+
out.stderr.write(
|
|
80
|
+
"error: --account-ids was given an empty value. Pass acc_... ids, or omit the flag on an account_status webhook to cover every account.\n"
|
|
81
|
+
);
|
|
82
|
+
process.exit(2);
|
|
83
|
+
}
|
|
84
|
+
body["account_ids"] = accountIds;
|
|
85
|
+
} else if (flags.source !== "account_status") {
|
|
86
|
+
out.stderr.write(
|
|
87
|
+
"error: --account-ids is required when --source is messaging or user (comma-separated acc_... ids). Only an account_status webhook may omit it.\n"
|
|
88
|
+
);
|
|
89
|
+
process.exit(2);
|
|
90
|
+
}
|
|
81
91
|
if (flags.name) body["name"] = flags.name;
|
|
82
92
|
if (flags.enabled !== void 0) body["enabled"] = flags.enabled;
|
|
83
93
|
if (flags.events) {
|
|
@@ -271,14 +281,17 @@ var webhookCreateCommand = defineCommand({
|
|
|
271
281
|
description: "Register a new webhook endpoint.",
|
|
272
282
|
examples: [
|
|
273
283
|
"curviate webhook create --source messaging --request-url https://example.com/hooks/curviate --account-ids acc_YOUR_ACCOUNT_ID",
|
|
274
|
-
"curviate webhook create --source account_status --request-url https://example.com/hooks/curviate --
|
|
284
|
+
"curviate webhook create --source account_status --request-url https://example.com/hooks/curviate --name status"
|
|
285
|
+
],
|
|
286
|
+
requires: [
|
|
287
|
+
"--account-ids for --source messaging and user; omit it with --source account_status to cover every current and future account."
|
|
275
288
|
]
|
|
276
289
|
},
|
|
277
290
|
args: {
|
|
278
|
-
...
|
|
291
|
+
...WRITE_SINGLE_FLAGS,
|
|
279
292
|
source: { type: "string", description: "Event source: messaging | user | account_status.", required: true },
|
|
280
293
|
"request-url": { type: "string", description: "HTTPS URL to receive webhook deliveries.", required: true },
|
|
281
|
-
"account-ids": { type: "string", description: "Comma-separated account ids to target
|
|
294
|
+
"account-ids": { type: "string", description: "Comma-separated account ids to target. Required for messaging and user; omit on account_status to cover every current and future account." },
|
|
282
295
|
name: { type: "string", description: "Human-readable name (1-100 chars)." },
|
|
283
296
|
enabled: { type: "boolean", description: "Create as enabled (default: true).", default: true },
|
|
284
297
|
events: { type: "string", description: "Comma-separated event names to subscribe to." },
|
|
@@ -335,7 +348,7 @@ var webhookEventsCommand = defineCommand({
|
|
|
335
348
|
"curviate webhook events"
|
|
336
349
|
]
|
|
337
350
|
},
|
|
338
|
-
args: { ...readOnly(
|
|
351
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
339
352
|
async run({ args }) {
|
|
340
353
|
const flags = args;
|
|
341
354
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -362,7 +375,7 @@ var webhookGetCommand = defineCommand({
|
|
|
362
375
|
]
|
|
363
376
|
},
|
|
364
377
|
args: {
|
|
365
|
-
...readOnly(
|
|
378
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
366
379
|
id: { type: "positional", description: "Webhook id (wh_...)." }
|
|
367
380
|
},
|
|
368
381
|
async run({ args }) {
|
|
@@ -392,7 +405,7 @@ var webhookUpdateCommand = defineCommand({
|
|
|
392
405
|
]
|
|
393
406
|
},
|
|
394
407
|
args: {
|
|
395
|
-
...
|
|
408
|
+
...WRITE_SINGLE_FLAGS,
|
|
396
409
|
id: { type: "positional", description: "Webhook id (wh_...)." },
|
|
397
410
|
"request-url": { type: "string", description: "Replace the delivery URL." },
|
|
398
411
|
name: { type: "string", description: "Replace the name (or clear with empty string)." },
|
|
@@ -427,7 +440,7 @@ var webhookDeleteCommand = defineCommand({
|
|
|
427
440
|
]
|
|
428
441
|
},
|
|
429
442
|
args: {
|
|
430
|
-
...
|
|
443
|
+
...WRITE_SINGLE_FLAGS,
|
|
431
444
|
id: { type: "positional", description: "Webhook id (wh_...)." }
|
|
432
445
|
},
|
|
433
446
|
async run({ args }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curviate/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Official command-line interface for the Curviate API.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@curviate/sdk": "0.
|
|
50
|
+
"@curviate/sdk": "0.39.0",
|
|
51
51
|
"citty": "^0.1.6",
|
|
52
52
|
"open": "^10.1.0"
|
|
53
53
|
},
|
|
@@ -246,17 +246,17 @@ async function runSalesNavSearchFromUrl(client, flags, out) {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
async function runSalesNavMessageNew(client, flags, out) {
|
|
249
|
+
const subject = flags.subject ?? "";
|
|
250
|
+
if (!subject) {
|
|
251
|
+
out.stderr.write("error: --subject is required (v2: REQUIRED for Sales Navigator messaging).\n");
|
|
252
|
+
process.exit(2);
|
|
253
|
+
}
|
|
249
254
|
const accountId = await requireAccount(client, flags, out);
|
|
250
255
|
const to = flags.to ?? "";
|
|
251
256
|
const text = flags.text ?? "";
|
|
252
|
-
const subject = flags.subject ?? "";
|
|
253
257
|
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
254
258
|
const voicePath = flags.voice;
|
|
255
259
|
const videoPath = flags.video;
|
|
256
|
-
if (!subject) {
|
|
257
|
-
out.stderr.write("error: --subject is required (v2: REQUIRED for Sales Navigator messaging).\n");
|
|
258
|
-
process.exit(2);
|
|
259
|
-
}
|
|
260
260
|
let attachBuffers = [];
|
|
261
261
|
let voiceBuffer;
|
|
262
262
|
let videoBuffer;
|