@curviate/cli 0.41.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 +39 -0
- package/dist/{account-QZ5RYKIT.js → account-PFK5YROZ.js} +73 -26
- package/dist/{chunk-CBHL3QQJ.js → chunk-B5NIX4G6.js} +1 -1
- package/dist/{chunk-BLFGJIJJ.js → chunk-BLJGV6ST.js} +2 -2
- 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-WX5QOASS.js} +100 -50
- package/dist/{config-RUBXWFQ3.js → config-K4G3VSBA.js} +44 -9
- package/dist/{connect-TTA2X3KO.js → connect-IYTFL7NT.js} +44 -21
- 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-XW3WM57J.js} +108 -34
- 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-NHTYGX7K.js} +124 -43
- package/dist/{recruiter-OBKS4ZVL.js → recruiter-4SDAROK4.js} +210 -67
- package/dist/{sales-nav-WPTMS6QF.js → sales-nav-77NP3UXV.js} +100 -42
- package/dist/{search-YAKZKK74.js → search-XDOQZAVG.js} +80 -39
- package/dist/{setup-NZQUWJYC.js → setup-BPNLAHPC.js} +9 -4
- package/dist/{webhook-PXSLDB2F.js → webhook-XOPRW63N.js} +59 -23
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,45 @@ 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
|
+
|
|
11
50
|
## [0.41.0] - 2026-09-23
|
|
12
51
|
|
|
13
52
|
Follows `@curviate/sdk` to `0.37.1` and re-vendors the OpenAPI fixture from the
|
|
@@ -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;
|
|
@@ -243,7 +237,6 @@ async function runAccountList(client, flags, out) {
|
|
|
243
237
|
}
|
|
244
238
|
}
|
|
245
239
|
async function runAccountGet(client, flags, out) {
|
|
246
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
247
240
|
rejectAllOnNonPaginated(flags.all, out);
|
|
248
241
|
const accountId = flags["account-id"] ?? "";
|
|
249
242
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -265,7 +258,6 @@ function renderSeatLineHuman(item) {
|
|
|
265
258
|
return `${seatId}: free`;
|
|
266
259
|
}
|
|
267
260
|
async function runAccountSeats(client, flags, out) {
|
|
268
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
269
261
|
const outOpts = resolveOutputOpts(flags);
|
|
270
262
|
let result;
|
|
271
263
|
try {
|
|
@@ -965,8 +957,15 @@ async function runAccountCheckpointPoll(client, flags, out, io = {}) {
|
|
|
965
957
|
process.exit(AUTH_NEEDED);
|
|
966
958
|
}
|
|
967
959
|
var accountListCommand = defineCommand({
|
|
968
|
-
meta: {
|
|
969
|
-
|
|
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) },
|
|
970
969
|
async run({ args }) {
|
|
971
970
|
const flags = args;
|
|
972
971
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -985,10 +984,16 @@ var accountListCommand = defineCommand({
|
|
|
985
984
|
}
|
|
986
985
|
});
|
|
987
986
|
var accountGetCommand = defineCommand({
|
|
988
|
-
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
|
+
},
|
|
989
994
|
args: {
|
|
990
995
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
991
|
-
...READ_SINGLE_FLAGS,
|
|
996
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
992
997
|
"account-id": { type: "positional", description: "Account id (acc_...)." }
|
|
993
998
|
},
|
|
994
999
|
async run({ args }) {
|
|
@@ -1011,9 +1016,12 @@ var accountGetCommand = defineCommand({
|
|
|
1011
1016
|
var accountSeatsCommand = defineCommand({
|
|
1012
1017
|
meta: {
|
|
1013
1018
|
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."
|
|
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
|
+
]
|
|
1015
1023
|
},
|
|
1016
|
-
args: { ...READ_SINGLE_FLAGS },
|
|
1024
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
1017
1025
|
async run({ args }) {
|
|
1018
1026
|
const flags = args;
|
|
1019
1027
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -1034,7 +1042,16 @@ var accountSeatsCommand = defineCommand({
|
|
|
1034
1042
|
var accountLinkCommand = defineCommand({
|
|
1035
1043
|
meta: {
|
|
1036
1044
|
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`."
|
|
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
|
+
]
|
|
1038
1055
|
},
|
|
1039
1056
|
args: {
|
|
1040
1057
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1083,7 +1100,11 @@ var accountLinkCommand = defineCommand({
|
|
|
1083
1100
|
var accountConnectSessionPollCommand = defineCommand({
|
|
1084
1101
|
meta: {
|
|
1085
1102
|
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."
|
|
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
|
+
]
|
|
1087
1108
|
},
|
|
1088
1109
|
args: {
|
|
1089
1110
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1132,7 +1153,14 @@ var accountConnectSessionCommand = defineCommand({
|
|
|
1132
1153
|
}
|
|
1133
1154
|
});
|
|
1134
1155
|
var accountUpdateCommand = defineCommand({
|
|
1135
|
-
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
|
+
},
|
|
1136
1164
|
args: {
|
|
1137
1165
|
...WRITE_SINGLE_FLAGS,
|
|
1138
1166
|
"account-id": { type: "positional", description: "Account id (acc_...)." },
|
|
@@ -1162,7 +1190,13 @@ var accountUpdateCommand = defineCommand({
|
|
|
1162
1190
|
}
|
|
1163
1191
|
});
|
|
1164
1192
|
var accountDisconnectCommand = defineCommand({
|
|
1165
|
-
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
|
+
},
|
|
1166
1200
|
args: {
|
|
1167
1201
|
...WRITE_SINGLE_FLAGS,
|
|
1168
1202
|
"account-id": { type: "positional", description: "Account id (acc_...)." }
|
|
@@ -1185,7 +1219,13 @@ var accountDisconnectCommand = defineCommand({
|
|
|
1185
1219
|
}
|
|
1186
1220
|
});
|
|
1187
1221
|
var accountCheckpointSolveCommand = defineCommand({
|
|
1188
|
-
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
|
+
},
|
|
1189
1229
|
args: {
|
|
1190
1230
|
...WRITE_SINGLE_FLAGS,
|
|
1191
1231
|
"account-id": {
|
|
@@ -1218,7 +1258,11 @@ var accountCheckpointSolveCommand = defineCommand({
|
|
|
1218
1258
|
var accountCheckpointPollCommand = defineCommand({
|
|
1219
1259
|
meta: {
|
|
1220
1260
|
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."
|
|
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
|
+
]
|
|
1222
1266
|
},
|
|
1223
1267
|
args: {
|
|
1224
1268
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -1259,7 +1303,10 @@ var accountCheckpointPollCommand = defineCommand({
|
|
|
1259
1303
|
var accountCheckpointRequestCommand = defineCommand({
|
|
1260
1304
|
meta: {
|
|
1261
1305
|
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."
|
|
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
|
+
]
|
|
1263
1310
|
},
|
|
1264
1311
|
args: {
|
|
1265
1312
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -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,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
|
|
@@ -86,7 +86,7 @@ var GLOBAL_FLAGS = {
|
|
|
86
86
|
},
|
|
87
87
|
account: {
|
|
88
88
|
type: "string",
|
|
89
|
-
description: "Account id for account-scoped commands. Optional when exactly one account is connected."
|
|
89
|
+
description: "Account id for account-scoped commands. Optional when exactly one account is connected, and required with --preview."
|
|
90
90
|
},
|
|
91
91
|
"base-url": {
|
|
92
92
|
type: "string",
|
|
@@ -121,11 +121,11 @@ var GLOBAL_FLAGS = {
|
|
|
121
121
|
},
|
|
122
122
|
"max-pages": {
|
|
123
123
|
type: "string",
|
|
124
|
-
description: "Maximum number of pages to fetch when --all is used."
|
|
124
|
+
description: "Maximum number of pages to fetch when --all is used. Refused (exit 2) without --all."
|
|
125
125
|
},
|
|
126
126
|
"page-delay": {
|
|
127
127
|
type: "string",
|
|
128
|
-
description: "Milliseconds to pause between pages when --all is used (default 400; pass 0 to disable). A modest delay keeps a long stream under the platform rate gate."
|
|
128
|
+
description: "Milliseconds to pause between pages when --all is used (default 400; pass 0 to disable). A modest delay keeps a long stream under the platform rate gate. Refused (exit 2) without --all."
|
|
129
129
|
},
|
|
130
130
|
preview: {
|
|
131
131
|
type: "boolean",
|
|
@@ -184,6 +184,11 @@ var READ_SINGLE_FLAGS = {
|
|
|
184
184
|
beta: GLOBAL_FLAGS.beta
|
|
185
185
|
};
|
|
186
186
|
var WRITE_SINGLE_FLAGS = READ_SINGLE_FLAGS;
|
|
187
|
+
function readOnly(flags) {
|
|
188
|
+
const rest = { ...flags };
|
|
189
|
+
delete rest.preview;
|
|
190
|
+
return rest;
|
|
191
|
+
}
|
|
187
192
|
|
|
188
193
|
// src/lib/beta.ts
|
|
189
194
|
var BETA_CONSENT_HEADER = "X-Curviate-Beta";
|
|
@@ -258,12 +263,13 @@ export {
|
|
|
258
263
|
restoreLiteralDashes,
|
|
259
264
|
assertNoStdinPlaceholder,
|
|
260
265
|
resolveTextOrStdin,
|
|
266
|
+
parseBetaFlag,
|
|
267
|
+
setBetaOverride,
|
|
268
|
+
betaOverrideHeader,
|
|
261
269
|
GLOBAL_FLAGS,
|
|
262
270
|
NON_STREAM_FLAGS,
|
|
263
271
|
WRITE_FLAGS,
|
|
264
272
|
READ_SINGLE_FLAGS,
|
|
265
273
|
WRITE_SINGLE_FLAGS,
|
|
266
|
-
|
|
267
|
-
setBetaOverride,
|
|
268
|
-
betaOverrideHeader
|
|
274
|
+
readOnly
|
|
269
275
|
};
|