@curviate/cli 0.40.0 → 0.42.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 -0
- package/dist/{account-LTXAUBBP.js → account-PFK5YROZ.js} +81 -26
- package/dist/{chunk-OTBJATDE.js → chunk-B5NIX4G6.js} +6 -1
- package/dist/{chunk-LD5KJSCT.js → chunk-BLJGV6ST.js} +2 -2
- package/dist/{chunk-6W7364S3.js → chunk-KJ24DIAJ.js} +1 -1
- package/dist/{chunk-T6G5AASF.js → chunk-OUMMWC7G.js} +79 -26
- package/dist/{chunk-BGVK73VI.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-2CSBSBOH.js → comment-G4EXIIAQ.js} +83 -29
- package/dist/{company-ZUIUR5UN.js → company-WX5QOASS.js} +104 -50
- package/dist/{config-RUBXWFQ3.js → config-K4G3VSBA.js} +44 -9
- package/dist/{connect-LSXKNEL2.js → connect-IYTFL7NT.js} +44 -21
- package/dist/{doctor-FHOHIQPX.js → doctor-ICAEETCL.js} +8 -4
- package/dist/examples-IJL3A6SZ.js +18 -0
- package/dist/{feed-UUHB2FXI.js → feed-XC5235UF.js} +16 -14
- package/dist/{group-NUCO3P2W.js → group-JDP2HVSV.js} +31 -20
- package/dist/{inbox-DEZTGTPO.js → inbox-W3KR65VD.js} +51 -24
- package/dist/{inboxes-F3NIQQRK.js → inboxes-XYS3IRT6.js} +23 -17
- package/dist/{job-YMGO3WJH.js → job-XW3WM57J.js} +112 -34
- package/dist/{login-YTVPIN27.js → login-OHAHNBRW.js} +7 -3
- package/dist/{message-RSBUXI64.js → message-5XC7U4JC.js} +5 -5
- package/dist/{notification-EJ35OD3Q.js → notification-RIUSYJV6.js} +26 -16
- package/dist/{post-VHVQ56A7.js → post-LSEBRQYK.js} +96 -32
- package/dist/{profile-3CBNI42H.js → profile-NHTYGX7K.js} +130 -43
- package/dist/{recruiter-M7XUFYNR.js → recruiter-4SDAROK4.js} +219 -67
- package/dist/{sales-nav-S47OCEUC.js → sales-nav-77NP3UXV.js} +102 -42
- package/dist/{search-UWI37MKG.js → search-XDOQZAVG.js} +80 -39
- package/dist/{setup-3EQRACT6.js → setup-BPNLAHPC.js} +9 -4
- package/dist/{webhook-I4U4C4XE.js → webhook-XOPRW63N.js} +62 -23
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,73 @@ 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.42.0] - 2026-09-23
|
|
12
|
+
|
|
13
|
+
Adds examples to every command's help and the manifest the docs site
|
|
14
|
+
generates its CLI reference from. No exit code changes.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **Examples in `--help`.** Every command you can run now prints one to three
|
|
19
|
+
example invocations under an `EXAMPLES` heading in its `--help`. The same
|
|
20
|
+
lines appear on the command's page on docs.curviate.com.
|
|
21
|
+
- **`commands.json`**, the command surface as data (each command's
|
|
22
|
+
description, arguments, accepted global flags, examples and requires), which the docs
|
|
23
|
+
site generates its CLI reference from. Not shipped in the package;
|
|
24
|
+
regenerate it with `pnpm manifest`.
|
|
25
|
+
- **`requires` in `--help`.** A command with conditional requirements (one
|
|
26
|
+
of two flags, a `--body-file` alternative, at least one of several, a flag
|
|
27
|
+
that only applies with another) lists them under `REQUIRES`, and the docs
|
|
28
|
+
page shows them under the usage line.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- **Read commands no longer declare `--preview`.** A truthy `--preview` on
|
|
33
|
+
a read was refused before and still is (exit 2, same message, now followed
|
|
34
|
+
by "Run `curviate --help` for usage."); the refusal now comes from the
|
|
35
|
+
flag declaration, so `--help` and the docs stop listing it on reads. An
|
|
36
|
+
explicit false still runs the read, as before: exactly the spellings a
|
|
37
|
+
write reads as false (`--preview=false`, `--no-preview`). Any other value
|
|
38
|
+
(`--preview=FALSE`, `=0`, `=no`) previews a write, so a read refuses it.
|
|
39
|
+
- **`job create` declares its required flags** (`--workplace-type`,
|
|
40
|
+
`--location`, `--employment-status`, `--description`, `--apply-method`),
|
|
41
|
+
and `company follow-invite` declares `--invitee`. Still exit 2 when one is
|
|
42
|
+
missing; `--help` now marks them required and the message reads
|
|
43
|
+
`Missing required argument: --<flag>`.
|
|
44
|
+
- `post save`, `post unsave`, `notification delete`, `notification show-less`
|
|
45
|
+
and `profile unfollow` describe what a repeat does in plain words.
|
|
46
|
+
- `account get`, `feed home`, `notification delete` and `webhook verify`
|
|
47
|
+
descriptions state their status values, the null text on the recent feed,
|
|
48
|
+
re-injected promotional cards and the verify exit codes.
|
|
49
|
+
|
|
50
|
+
## [0.41.0] - 2026-09-23
|
|
51
|
+
|
|
52
|
+
Follows `@curviate/sdk` to `0.37.1` and re-vendors the OpenAPI fixture from the
|
|
53
|
+
deployed production document. A minor, not a patch: the fix below changes an
|
|
54
|
+
exit code (0 to 7) for inputs that previously succeeded silently.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- **SDK pin moves `0.37.0` to exactly `0.37.1`**, as `check:sdk-pin` requires.
|
|
59
|
+
That SDK release honours `retry_hint.kind: "never"` in its GET retry decision
|
|
60
|
+
and treats an empty `Retry-After` as unparseable; its type changes are
|
|
61
|
+
description-only.
|
|
62
|
+
- **`test/fixtures/openapi.json` re-vendored** from `@curviate/sdk@0.37.1`'s
|
|
63
|
+
`fixtures/openapi.json`, generated against production at
|
|
64
|
+
`0b33680536a45681ed5ffe420006cb05c85fe683`. `test/fixtures/VENDORED_FROM.json`
|
|
65
|
+
records the new `sdkVersion`, its salted `sha256` and that `sourceServerGitSha`.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- **A single-object read's 2xx must be a readable object, or it's a platform
|
|
70
|
+
fault (exit 7), never a silent exit 0.** `null`, a scalar, a bare array, an
|
|
71
|
+
empty body, or a `{}` body previously rendered as if it were the resource.
|
|
72
|
+
`company <id>` against a `null`, empty or `{}` body fabricated an all-null
|
|
73
|
+
object (`{"id":null,"name":null,...}`) and exited 0. All of these now exit 7
|
|
74
|
+
(`PLATFORM_ERROR`) on every affected single-object read command, matching
|
|
75
|
+
the existing list-read and id-resolver contract. Writes are unaffected: a
|
|
76
|
+
genuine `204`/empty/`{}` body on a write still exits 0.
|
|
77
|
+
|
|
11
78
|
## [0.40.0] - 2026-09-22
|
|
12
79
|
|
|
13
80
|
Follows `@curviate/sdk` to `0.37.0` and re-vendors the OpenAPI fixture from the
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
pageDelayFromFlags,
|
|
16
16
|
readCursorFlag,
|
|
17
17
|
readMaxPagesFlag,
|
|
18
|
+
readableObject,
|
|
18
19
|
readablePage,
|
|
19
20
|
rejectPaginationModifiersWithoutAll,
|
|
20
21
|
renderError,
|
|
@@ -24,19 +25,20 @@ import {
|
|
|
24
25
|
resolveEffectiveConfig,
|
|
25
26
|
streamAll,
|
|
26
27
|
writeNdjsonItem
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-B5NIX4G6.js";
|
|
28
29
|
import {
|
|
29
30
|
AUTH_NEEDED
|
|
30
31
|
} from "./chunk-XZJQQJBE.js";
|
|
31
32
|
import {
|
|
32
33
|
createClient
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-UJOTQPL6.js";
|
|
34
35
|
import {
|
|
35
36
|
GLOBAL_FLAGS,
|
|
36
37
|
READ_SINGLE_FLAGS,
|
|
37
38
|
WRITE_SINGLE_FLAGS,
|
|
38
|
-
defaultReadStdin
|
|
39
|
-
|
|
39
|
+
defaultReadStdin,
|
|
40
|
+
readOnly
|
|
41
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
40
42
|
|
|
41
43
|
// src/commands/account.ts
|
|
42
44
|
import { defineCommand } from "citty";
|
|
@@ -174,12 +176,6 @@ function nextCheckpointPollDelayMs(elapsedMs) {
|
|
|
174
176
|
// src/commands/account.ts
|
|
175
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.`;
|
|
176
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.`;
|
|
177
|
-
function rejectPreviewOnRead(preview, out) {
|
|
178
|
-
if (preview) {
|
|
179
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
180
|
-
process.exit(2);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
179
|
function rejectAllOnNonPaginated(all, out) {
|
|
184
180
|
if (all) {
|
|
185
181
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
@@ -211,7 +207,6 @@ async function handleError(err, outOpts, out) {
|
|
|
211
207
|
process.exit(1);
|
|
212
208
|
}
|
|
213
209
|
async function runAccountList(client, flags, out) {
|
|
214
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
215
210
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
216
211
|
const outOpts = resolveOutputOpts(flags);
|
|
217
212
|
const all = flags.all ?? false;
|
|
@@ -242,12 +237,12 @@ async function runAccountList(client, flags, out) {
|
|
|
242
237
|
}
|
|
243
238
|
}
|
|
244
239
|
async function runAccountGet(client, flags, out) {
|
|
245
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
246
240
|
rejectAllOnNonPaginated(flags.all, out);
|
|
247
241
|
const accountId = flags["account-id"] ?? "";
|
|
248
242
|
const outOpts = resolveOutputOpts(flags);
|
|
249
243
|
try {
|
|
250
244
|
const result = await client.accounts.get(accountId);
|
|
245
|
+
readableObject(result);
|
|
251
246
|
renderSuccess(result, { ...outOpts, slim: slimAccountGet }, out);
|
|
252
247
|
} catch (err) {
|
|
253
248
|
await handleError(err, outOpts, out);
|
|
@@ -263,7 +258,6 @@ function renderSeatLineHuman(item) {
|
|
|
263
258
|
return `${seatId}: free`;
|
|
264
259
|
}
|
|
265
260
|
async function runAccountSeats(client, flags, out) {
|
|
266
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
267
261
|
const outOpts = resolveOutputOpts(flags);
|
|
268
262
|
let result;
|
|
269
263
|
try {
|
|
@@ -423,6 +417,7 @@ async function waitForMobileApproval(client, accountId, expiresAt, ctx) {
|
|
|
423
417
|
let result;
|
|
424
418
|
try {
|
|
425
419
|
result = await client.auth.pollCheckpoint(accountId);
|
|
420
|
+
readableObject(result);
|
|
426
421
|
} catch (err) {
|
|
427
422
|
return await handleError(err, ctx.outOpts, ctx.out);
|
|
428
423
|
}
|
|
@@ -636,6 +631,7 @@ async function runConnectSessionWaitLoop(client, sessionId, ctx) {
|
|
|
636
631
|
await ctx.sleep(CHECKPOINT_POLL_FIRST_DELAY_MS);
|
|
637
632
|
for (; ; ) {
|
|
638
633
|
const result = await client.auth.getSession(sessionId);
|
|
634
|
+
readableObject(result);
|
|
639
635
|
const r = result;
|
|
640
636
|
if (r.status === "resolved") return { kind: "resolved", result };
|
|
641
637
|
if (r.status === "expired" || r.status === "failed") {
|
|
@@ -683,6 +679,7 @@ async function runAccountConnectSessionPoll(client, flags, out, io = {}) {
|
|
|
683
679
|
if (!flags.wait) {
|
|
684
680
|
try {
|
|
685
681
|
const result = await client.auth.getSession(sessionId);
|
|
682
|
+
readableObject(result);
|
|
686
683
|
renderSuccess(result, outOpts, out);
|
|
687
684
|
} catch (err) {
|
|
688
685
|
await handleError(err, outOpts, out);
|
|
@@ -825,6 +822,7 @@ async function runAccountCheckpointSolve(client, flags, out) {
|
|
|
825
822
|
let chained = false;
|
|
826
823
|
try {
|
|
827
824
|
const result = await client.auth.solveCheckpoint(accountId, body);
|
|
825
|
+
readableObject(result);
|
|
828
826
|
const r = result;
|
|
829
827
|
renderSuccess(result, outOpts, out);
|
|
830
828
|
chained = r.status === "checkpoint_required";
|
|
@@ -871,6 +869,7 @@ async function runCheckpointPollWaitLoop(client, accountId, ctx) {
|
|
|
871
869
|
await ctx.sleep(CHECKPOINT_POLL_FIRST_DELAY_MS);
|
|
872
870
|
for (; ; ) {
|
|
873
871
|
const result = await client.auth.pollCheckpoint(accountId);
|
|
872
|
+
readableObject(result);
|
|
874
873
|
const r = result;
|
|
875
874
|
if (r.status === "active") return { kind: "active", result };
|
|
876
875
|
if (r.status === "expired" || r.status === "failed") {
|
|
@@ -907,6 +906,7 @@ async function runAccountCheckpointPoll(client, flags, out, io = {}) {
|
|
|
907
906
|
if (!flags.wait) {
|
|
908
907
|
try {
|
|
909
908
|
const result = await client.auth.pollCheckpoint(accountId);
|
|
909
|
+
readableObject(result);
|
|
910
910
|
renderSuccess(result, outOpts, out);
|
|
911
911
|
} catch (err) {
|
|
912
912
|
await handleError(err, outOpts, out);
|
|
@@ -957,8 +957,15 @@ async function runAccountCheckpointPoll(client, flags, out, io = {}) {
|
|
|
957
957
|
process.exit(AUTH_NEEDED);
|
|
958
958
|
}
|
|
959
959
|
var accountListCommand = defineCommand({
|
|
960
|
-
meta: {
|
|
961
|
-
|
|
960
|
+
meta: {
|
|
961
|
+
name: "list",
|
|
962
|
+
description: "List connected LinkedIn accounts.",
|
|
963
|
+
examples: [
|
|
964
|
+
"curviate account list",
|
|
965
|
+
"curviate account list --json --fields items.account_id,items.status"
|
|
966
|
+
]
|
|
967
|
+
},
|
|
968
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
962
969
|
async run({ args }) {
|
|
963
970
|
const flags = args;
|
|
964
971
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -977,10 +984,16 @@ var accountListCommand = defineCommand({
|
|
|
977
984
|
}
|
|
978
985
|
});
|
|
979
986
|
var accountGetCommand = defineCommand({
|
|
980
|
-
meta: {
|
|
987
|
+
meta: {
|
|
988
|
+
name: "get",
|
|
989
|
+
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.",
|
|
990
|
+
examples: [
|
|
991
|
+
"curviate account get acc_YOUR_ACCOUNT_ID"
|
|
992
|
+
]
|
|
993
|
+
},
|
|
981
994
|
args: {
|
|
982
995
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
983
|
-
...READ_SINGLE_FLAGS,
|
|
996
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
984
997
|
"account-id": { type: "positional", description: "Account id (acc_...)." }
|
|
985
998
|
},
|
|
986
999
|
async run({ args }) {
|
|
@@ -1003,9 +1016,12 @@ var accountGetCommand = defineCommand({
|
|
|
1003
1016
|
var accountSeatsCommand = defineCommand({
|
|
1004
1017
|
meta: {
|
|
1005
1018
|
name: "seats",
|
|
1006
|
-
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."
|
|
1019
|
+
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.",
|
|
1020
|
+
examples: [
|
|
1021
|
+
"curviate account seats"
|
|
1022
|
+
]
|
|
1007
1023
|
},
|
|
1008
|
-
args: { ...READ_SINGLE_FLAGS },
|
|
1024
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
1009
1025
|
async run({ args }) {
|
|
1010
1026
|
const flags = args;
|
|
1011
1027
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -1026,7 +1042,16 @@ var accountSeatsCommand = defineCommand({
|
|
|
1026
1042
|
var accountLinkCommand = defineCommand({
|
|
1027
1043
|
meta: {
|
|
1028
1044
|
name: "link",
|
|
1029
|
-
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`."
|
|
1045
|
+
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`.",
|
|
1046
|
+
examples: [
|
|
1047
|
+
"curviate account link --auth-method credentials --email jane@example.com --password-stdin",
|
|
1048
|
+
"curviate account link --auth-method credentials --email jane@example.com --password-stdin --account-id acc_YOUR_ACCOUNT_ID --seat-id SEAT_ID"
|
|
1049
|
+
],
|
|
1050
|
+
requires: [
|
|
1051
|
+
"--user-agent with --auth-method cookie.",
|
|
1052
|
+
"--seat-id with --preview or --account-id, and when zero or several seats are free.",
|
|
1053
|
+
"--password-stdin only with --auth-method credentials; --li-at-stdin only with --auth-method cookie."
|
|
1054
|
+
]
|
|
1030
1055
|
},
|
|
1031
1056
|
args: {
|
|
1032
1057
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1075,7 +1100,11 @@ var accountLinkCommand = defineCommand({
|
|
|
1075
1100
|
var accountConnectSessionPollCommand = defineCommand({
|
|
1076
1101
|
meta: {
|
|
1077
1102
|
name: "poll",
|
|
1078
|
-
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."
|
|
1103
|
+
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.",
|
|
1104
|
+
examples: [
|
|
1105
|
+
"curviate account connect-session poll --session acc_YOUR_ACCOUNT_ID",
|
|
1106
|
+
"curviate account connect-session poll --session acc_YOUR_ACCOUNT_ID --wait"
|
|
1107
|
+
]
|
|
1079
1108
|
},
|
|
1080
1109
|
args: {
|
|
1081
1110
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1124,7 +1153,14 @@ var accountConnectSessionCommand = defineCommand({
|
|
|
1124
1153
|
}
|
|
1125
1154
|
});
|
|
1126
1155
|
var accountUpdateCommand = defineCommand({
|
|
1127
|
-
meta: {
|
|
1156
|
+
meta: {
|
|
1157
|
+
name: "update",
|
|
1158
|
+
description: "Update an account's metadata and/or custom-proxy configuration.",
|
|
1159
|
+
examples: [
|
|
1160
|
+
`curviate account update acc_YOUR_ACCOUNT_ID --metadata '{"team":"growth"}'`,
|
|
1161
|
+
"curviate account update acc_YOUR_ACCOUNT_ID --clear-proxy"
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1128
1164
|
args: {
|
|
1129
1165
|
...WRITE_SINGLE_FLAGS,
|
|
1130
1166
|
"account-id": { type: "positional", description: "Account id (acc_...)." },
|
|
@@ -1154,7 +1190,13 @@ var accountUpdateCommand = defineCommand({
|
|
|
1154
1190
|
}
|
|
1155
1191
|
});
|
|
1156
1192
|
var accountDisconnectCommand = defineCommand({
|
|
1157
|
-
meta: {
|
|
1193
|
+
meta: {
|
|
1194
|
+
name: "disconnect",
|
|
1195
|
+
description: "Hard-disconnect a LinkedIn account and release its seat.",
|
|
1196
|
+
examples: [
|
|
1197
|
+
"curviate account disconnect acc_YOUR_ACCOUNT_ID"
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1158
1200
|
args: {
|
|
1159
1201
|
...WRITE_SINGLE_FLAGS,
|
|
1160
1202
|
"account-id": { type: "positional", description: "Account id (acc_...)." }
|
|
@@ -1177,7 +1219,13 @@ var accountDisconnectCommand = defineCommand({
|
|
|
1177
1219
|
}
|
|
1178
1220
|
});
|
|
1179
1221
|
var accountCheckpointSolveCommand = defineCommand({
|
|
1180
|
-
meta: {
|
|
1222
|
+
meta: {
|
|
1223
|
+
name: "solve",
|
|
1224
|
+
description: "Solve a checkpoint challenge with an OTP / 2FA code.",
|
|
1225
|
+
examples: [
|
|
1226
|
+
"curviate account checkpoint solve acc_YOUR_ACCOUNT_ID --code 123456"
|
|
1227
|
+
]
|
|
1228
|
+
},
|
|
1181
1229
|
args: {
|
|
1182
1230
|
...WRITE_SINGLE_FLAGS,
|
|
1183
1231
|
"account-id": {
|
|
@@ -1210,7 +1258,11 @@ var accountCheckpointSolveCommand = defineCommand({
|
|
|
1210
1258
|
var accountCheckpointPollCommand = defineCommand({
|
|
1211
1259
|
meta: {
|
|
1212
1260
|
name: "poll",
|
|
1213
|
-
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."
|
|
1261
|
+
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.",
|
|
1262
|
+
examples: [
|
|
1263
|
+
"curviate account checkpoint poll acc_YOUR_ACCOUNT_ID",
|
|
1264
|
+
"curviate account checkpoint poll acc_YOUR_ACCOUNT_ID --wait"
|
|
1265
|
+
]
|
|
1214
1266
|
},
|
|
1215
1267
|
args: {
|
|
1216
1268
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1251,7 +1303,10 @@ var accountCheckpointPollCommand = defineCommand({
|
|
|
1251
1303
|
var accountCheckpointRequestCommand = defineCommand({
|
|
1252
1304
|
meta: {
|
|
1253
1305
|
name: "request",
|
|
1254
|
-
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."
|
|
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.",
|
|
1307
|
+
examples: [
|
|
1308
|
+
"curviate account checkpoint request acc_YOUR_ACCOUNT_ID"
|
|
1309
|
+
]
|
|
1255
1310
|
},
|
|
1256
1311
|
args: {
|
|
1257
1312
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
isPlainObject,
|
|
4
4
|
profileValue,
|
|
5
5
|
readConfigFile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UJOTQPL6.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/output.ts
|
|
9
9
|
function isJsonMode(opts) {
|
|
@@ -251,6 +251,10 @@ function readableId(entity) {
|
|
|
251
251
|
if ((typeof id !== "string" || id === "") && !(typeof id === "number" && Number.isFinite(id))) throw unreadable("id");
|
|
252
252
|
return String(id);
|
|
253
253
|
}
|
|
254
|
+
function readableObject(data) {
|
|
255
|
+
if (!isPlainObject(data) || Object.keys(data).length === 0) throw unreadable("object");
|
|
256
|
+
return data;
|
|
257
|
+
}
|
|
254
258
|
function rejectPaginationModifiersWithoutAll(flags, out) {
|
|
255
259
|
if (flags.all) return;
|
|
256
260
|
const offender = flags["max-pages"] !== void 0 ? "--max-pages" : flags["page-delay"] !== void 0 ? "--page-delay" : null;
|
|
@@ -410,6 +414,7 @@ export {
|
|
|
410
414
|
renderUnexpectedError,
|
|
411
415
|
readablePage,
|
|
412
416
|
readableId,
|
|
417
|
+
readableObject,
|
|
413
418
|
rejectPaginationModifiersWithoutAll,
|
|
414
419
|
readCursorFlag,
|
|
415
420
|
readMaxPagesFlag,
|
|
@@ -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/\\?#%]/;
|
|
@@ -18,26 +18,28 @@ 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";
|
|
25
25
|
import {
|
|
26
26
|
readableId,
|
|
27
|
+
readableObject,
|
|
27
28
|
renderError,
|
|
28
29
|
renderSuccess,
|
|
29
30
|
renderUnexpectedError,
|
|
30
31
|
resolveEffectiveConfig
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-B5NIX4G6.js";
|
|
32
33
|
import {
|
|
33
34
|
createClient,
|
|
34
35
|
downloadBinary
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UJOTQPL6.js";
|
|
36
37
|
import {
|
|
37
38
|
READ_SINGLE_FLAGS,
|
|
38
39
|
WRITE_FLAGS,
|
|
40
|
+
readOnly,
|
|
39
41
|
resolveTextOrStdin
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
41
43
|
|
|
42
44
|
// src/commands/message.ts
|
|
43
45
|
import { defineCommand } from "citty";
|
|
@@ -47,12 +49,6 @@ function buildOutputStreams() {
|
|
|
47
49
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
|
-
function rejectPreviewOnRead(preview, out) {
|
|
51
|
-
if (preview) {
|
|
52
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
53
|
-
process.exit(2);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
52
|
function rejectAllOnNonPaginated(all, out) {
|
|
57
53
|
if (all) {
|
|
58
54
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
@@ -223,7 +219,6 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
223
219
|
}
|
|
224
220
|
}
|
|
225
221
|
async function runMessageGet(client, flags, out) {
|
|
226
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
227
222
|
rejectAllOnNonPaginated(flags.all, out);
|
|
228
223
|
const accountId = await requireAccount(client, flags, out);
|
|
229
224
|
const chatId = normalizeChatId(flags.chatId ?? "");
|
|
@@ -232,6 +227,7 @@ async function runMessageGet(client, flags, out) {
|
|
|
232
227
|
const outOpts = resolveOutputOpts(flags);
|
|
233
228
|
try {
|
|
234
229
|
const result = await ns.messaging.getMessage(chatId, messageId);
|
|
230
|
+
readableObject(result);
|
|
235
231
|
renderSuccess(result, outOpts, out);
|
|
236
232
|
} catch (err) {
|
|
237
233
|
await handleSdkError(err, outOpts, out);
|
|
@@ -315,7 +311,6 @@ async function runMessageReact(client, flags, out) {
|
|
|
315
311
|
}
|
|
316
312
|
}
|
|
317
313
|
async function runMessageAttachment(client, flags, out, isTTY) {
|
|
318
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
319
314
|
const accountId = await requireAccount(client, flags, out);
|
|
320
315
|
const chatId = normalizeChatId(flags.chatId ?? "");
|
|
321
316
|
const messageId = flags.messageId ?? "";
|
|
@@ -390,20 +385,26 @@ async function runMessageInMail(client, flags, out, _readStdin) {
|
|
|
390
385
|
}
|
|
391
386
|
}
|
|
392
387
|
async function runMessageInMailBalance(client, flags, out) {
|
|
393
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
394
388
|
rejectAllOnNonPaginated(flags.all, out);
|
|
395
389
|
const accountId = await requireAccount(client, flags, out);
|
|
396
390
|
const ns = client.account(accountId);
|
|
397
391
|
const outOpts = resolveOutputOpts(flags);
|
|
398
392
|
try {
|
|
399
393
|
const result = await ns.users.getInMailCredits();
|
|
394
|
+
readableObject(result);
|
|
400
395
|
renderSuccess(result, outOpts, out);
|
|
401
396
|
} catch (err) {
|
|
402
397
|
await handleSdkError(err, outOpts, out);
|
|
403
398
|
}
|
|
404
399
|
}
|
|
405
400
|
var messageNewCommand = defineCommand({
|
|
406
|
-
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
|
+
},
|
|
407
408
|
args: {
|
|
408
409
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
409
410
|
...WRITE_FLAGS,
|
|
@@ -438,10 +439,16 @@ var messageNewCommand = defineCommand({
|
|
|
438
439
|
}
|
|
439
440
|
});
|
|
440
441
|
var messageGetCommand = defineCommand({
|
|
441
|
-
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
|
+
},
|
|
442
449
|
args: {
|
|
443
450
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
444
|
-
...READ_SINGLE_FLAGS,
|
|
451
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
445
452
|
chatId: { type: "positional", description: "Chat ID or LinkedIn messaging thread URL." },
|
|
446
453
|
messageId: { type: "positional", description: "Message ID." }
|
|
447
454
|
},
|
|
@@ -464,7 +471,13 @@ var messageGetCommand = defineCommand({
|
|
|
464
471
|
}
|
|
465
472
|
});
|
|
466
473
|
var messageEditCommand = defineCommand({
|
|
467
|
-
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
|
+
},
|
|
468
481
|
args: {
|
|
469
482
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
470
483
|
...WRITE_FLAGS,
|
|
@@ -491,7 +504,13 @@ var messageEditCommand = defineCommand({
|
|
|
491
504
|
}
|
|
492
505
|
});
|
|
493
506
|
var messageDeleteCommand = defineCommand({
|
|
494
|
-
meta: {
|
|
507
|
+
meta: {
|
|
508
|
+
name: "delete",
|
|
509
|
+
description: "Delete a message.",
|
|
510
|
+
examples: [
|
|
511
|
+
"curviate message delete 2-YTQ3ODU3Njgt MSG_ID"
|
|
512
|
+
]
|
|
513
|
+
},
|
|
495
514
|
args: {
|
|
496
515
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
497
516
|
...WRITE_FLAGS,
|
|
@@ -517,7 +536,16 @@ var messageDeleteCommand = defineCommand({
|
|
|
517
536
|
}
|
|
518
537
|
});
|
|
519
538
|
var messageReactCommand = defineCommand({
|
|
520
|
-
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
|
+
},
|
|
521
549
|
args: {
|
|
522
550
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
523
551
|
...WRITE_FLAGS,
|
|
@@ -549,10 +577,16 @@ var messageReactCommand = defineCommand({
|
|
|
549
577
|
}
|
|
550
578
|
});
|
|
551
579
|
var messageAttachmentCommand = defineCommand({
|
|
552
|
-
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
|
+
},
|
|
553
587
|
args: {
|
|
554
588
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
555
|
-
...READ_SINGLE_FLAGS,
|
|
589
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
556
590
|
chatId: { type: "positional", description: "Chat ID or LinkedIn messaging thread URL." },
|
|
557
591
|
messageId: { type: "positional", description: "Message ID." },
|
|
558
592
|
attachmentId: { type: "positional", description: "Attachment ID." },
|
|
@@ -582,7 +616,13 @@ var messageAttachmentCommand = defineCommand({
|
|
|
582
616
|
}
|
|
583
617
|
});
|
|
584
618
|
var messageInMailCommand = defineCommand({
|
|
585
|
-
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
|
+
},
|
|
586
626
|
args: {
|
|
587
627
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
588
628
|
...WRITE_FLAGS,
|
|
@@ -615,7 +655,10 @@ var messageInMailCommand = defineCommand({
|
|
|
615
655
|
var messageSendCommand = defineCommand({
|
|
616
656
|
meta: {
|
|
617
657
|
name: "send",
|
|
618
|
-
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
|
+
]
|
|
619
662
|
},
|
|
620
663
|
args: {
|
|
621
664
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
@@ -646,10 +689,16 @@ var messageSendCommand = defineCommand({
|
|
|
646
689
|
}
|
|
647
690
|
});
|
|
648
691
|
var messageInMailBalanceCommand = defineCommand({
|
|
649
|
-
meta: {
|
|
692
|
+
meta: {
|
|
693
|
+
name: "inmail-balance",
|
|
694
|
+
description: "Get InMail credit balance.",
|
|
695
|
+
examples: [
|
|
696
|
+
"curviate message inmail-balance"
|
|
697
|
+
]
|
|
698
|
+
},
|
|
650
699
|
args: {
|
|
651
700
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
652
|
-
...READ_SINGLE_FLAGS
|
|
701
|
+
...readOnly(READ_SINGLE_FLAGS)
|
|
653
702
|
},
|
|
654
703
|
async run({ args }) {
|
|
655
704
|
const flags = args;
|
|
@@ -704,7 +753,11 @@ function guardBareMessageForm(chatId, out) {
|
|
|
704
753
|
var messageCommand = defineCommand({
|
|
705
754
|
meta: {
|
|
706
755
|
name: "message",
|
|
707
|
-
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
|
+
]
|
|
708
761
|
},
|
|
709
762
|
args: {
|
|
710
763
|
// Write command (message send): WRITE_FLAGS omits pagination/projection flags
|