@curviate/cli 0.47.0 → 0.48.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 +174 -1
- package/README.md +101 -87
- package/dist/{account-RFJ63QYL.js → account-WKQHMM7P.js} +39 -29
- package/dist/chunk-AYKKXGTR.js +1141 -0
- package/dist/{chunk-TC4ZPUWI.js → chunk-CVMSQ3OF.js} +19 -80
- package/dist/{chunk-HOQ7EUHJ.js → chunk-FDJMAF7D.js} +1 -0
- package/dist/chunk-GQKC6E5K.js +36 -0
- package/dist/{chunk-V3MVOVQT.js → chunk-MKGVNDMJ.js} +8 -1
- package/dist/chunk-NNV2OYEF.js +23 -0
- package/dist/{chunk-UJOTQPL6.js → chunk-OHXYFICP.js} +47 -14
- package/dist/{chunk-PD2I5TYC.js → chunk-Q63IIPL2.js} +2 -2
- package/dist/chunk-TSOIZBBU.js +41 -0
- package/dist/{chunk-ERBYEC5P.js → chunk-Y7K4UBFC.js} +1 -1
- package/dist/{chunk-FXYK2GTO.js → chunk-YFXLXION.js} +37 -32
- package/dist/chunk-ZYURL5VK.js +83 -0
- package/dist/cli.js +76 -97
- package/dist/{comment-MCXE7B7V.js → comment-7IQ6ZOJF.js} +27 -22
- package/dist/{company-EUUN372H.js → company-RD7RDGSA.js} +55 -50
- package/dist/{config-K4G3VSBA.js → config-EYBNYRGK.js} +13 -5
- package/dist/{connect-2AL7XVJO.js → connect-HVXT67A6.js} +35 -31
- package/dist/core-6XYGUNAY.js +46 -0
- package/dist/{doctor-WPYI7X2T.js → doctor-HUXQERLQ.js} +8 -4
- package/dist/document-AUUCGST2.js +27 -0
- package/dist/{draft-G65DVXT7.js → draft-DFO22K6Q.js} +26 -21
- package/dist/examples-64YT5V5K.js +53 -0
- package/dist/{feed-HV24WME4.js → feed-JWP6ANPI.js} +13 -9
- package/dist/{group-HADXNVJW.js → group-SIQFJEZV.js} +15 -11
- package/dist/{inbox-G3EE54OB.js → inbox-MMIMCA5O.js} +21 -17
- package/dist/{inboxes-237XOBTP.js → inboxes-RND3D4C7.js} +16 -12
- package/dist/{job-LIN6RWD7.js → job-ACFKBLFK.js} +29 -25
- package/dist/{login-OHAHNBRW.js → login-ZOB5KVKQ.js} +10 -5
- package/dist/{message-U2O2JQSW.js → message-OFK6UVXR.js} +9 -7
- package/dist/{notification-3VG32LWM.js → notification-KKGAZU7M.js} +17 -13
- package/dist/{post-ECDK2KJL.js → post-A5SBCFB2.js} +33 -28
- package/dist/{profile-JOHS6SDW.js → profile-4SOOQZ4K.js} +45 -41
- package/dist/{recruiter-7VXEIXN3.js → recruiter-YN73STDP.js} +123 -120
- package/dist/{sales-nav-K4BMBH7R.js → sales-nav-JXF5RY2K.js} +38 -32
- package/dist/{search-C2UYO6PI.js → search-JAL242A2.js} +58 -48
- package/dist/{setup-GYEZFDEN.js → setup-WICWH4JG.js} +13 -8
- package/dist/{webhook-KCOQOH7D.js → webhook-UGKVYWBC.js} +34 -36
- package/package.json +1 -1
- package/dist/chunk-KJ24DIAJ.js +0 -60
- package/dist/examples-IJL3A6SZ.js +0 -18
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
readlineSync
|
|
4
|
-
} from "./chunk-YLSJ4HKU.js";
|
|
5
2
|
import {
|
|
6
3
|
slimAccountGet,
|
|
7
4
|
slimAccountList,
|
|
8
5
|
slimAccountListItem
|
|
9
6
|
} from "./chunk-LCGXJGPB.js";
|
|
7
|
+
import {
|
|
8
|
+
intFlag
|
|
9
|
+
} from "./chunk-NNV2OYEF.js";
|
|
10
10
|
import {
|
|
11
11
|
buildPreviewOutput
|
|
12
12
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -25,20 +25,28 @@ import {
|
|
|
25
25
|
resolveEffectiveConfig,
|
|
26
26
|
streamAll,
|
|
27
27
|
writeNdjsonItem
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MKGVNDMJ.js";
|
|
29
29
|
import {
|
|
30
30
|
AUTH_NEEDED
|
|
31
31
|
} from "./chunk-76SWLAZ6.js";
|
|
32
|
+
import {
|
|
33
|
+
readlineSync
|
|
34
|
+
} from "./chunk-YLSJ4HKU.js";
|
|
32
35
|
import {
|
|
33
36
|
createClient
|
|
34
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OHXYFICP.js";
|
|
35
38
|
import {
|
|
36
39
|
GLOBAL_FLAGS,
|
|
37
40
|
READ_SINGLE_FLAGS,
|
|
38
41
|
WRITE_SINGLE_FLAGS,
|
|
39
|
-
defaultReadStdin,
|
|
40
42
|
readOnly
|
|
41
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-CVMSQ3OF.js";
|
|
44
|
+
import {
|
|
45
|
+
DESCRIPTIONS
|
|
46
|
+
} from "./chunk-GQKC6E5K.js";
|
|
47
|
+
import {
|
|
48
|
+
defaultReadStdin
|
|
49
|
+
} from "./chunk-ZYURL5VK.js";
|
|
42
50
|
|
|
43
51
|
// src/commands/account.ts
|
|
44
52
|
import { defineCommand } from "citty";
|
|
@@ -429,7 +437,7 @@ async function buildAuthBody(flags, ctx) {
|
|
|
429
437
|
body["proxy"] = {
|
|
430
438
|
protocol: flags["proxy-protocol"] ?? "http",
|
|
431
439
|
host: flags["proxy-host"],
|
|
432
|
-
port: flags["proxy-port"] ?
|
|
440
|
+
port: flags["proxy-port"] === void 0 ? 80 : intFlag("proxy-port", flags["proxy-port"], 1, 65535),
|
|
433
441
|
...flags["proxy-username"] ? { username: flags["proxy-username"] } : {},
|
|
434
442
|
...proxyPassword !== void 0 ? { password: proxyPassword } : {}
|
|
435
443
|
};
|
|
@@ -559,7 +567,7 @@ async function runInteractiveCheckpointLoop(client, initial, ctx) {
|
|
|
559
567
|
}
|
|
560
568
|
async function handleAccountConnectResult(client, result, ctx) {
|
|
561
569
|
const envelope = result;
|
|
562
|
-
if (envelope
|
|
570
|
+
if (envelope?.status !== "checkpoint_required") {
|
|
563
571
|
renderSuccess(result, ctx.outOpts, ctx.out);
|
|
564
572
|
return;
|
|
565
573
|
}
|
|
@@ -735,16 +743,15 @@ function printConnectSessionResolved(result, ctx) {
|
|
|
735
743
|
}
|
|
736
744
|
function resolveWaitTimeoutOverrideMs(flags, out) {
|
|
737
745
|
if (flags.timeout === void 0) return void 0;
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
out.stderr.write("error: --timeout must be a number of milliseconds.\n");
|
|
746
|
+
if (!/^[1-9]\d*$/.test(flags.timeout) || Number(flags.timeout) > 2147483647) {
|
|
747
|
+
out.stderr.write("error: --timeout must be a whole number of milliseconds, from 1 to 2147483647.\n");
|
|
741
748
|
process.exit(2);
|
|
742
749
|
}
|
|
743
|
-
return
|
|
750
|
+
return Number(flags.timeout);
|
|
744
751
|
}
|
|
745
752
|
async function runAccountConnectSessionPoll(client, flags, out, io = {}) {
|
|
746
753
|
if (!flags.session) {
|
|
747
|
-
out.stderr.write("error: --session is required (the account's acc_... id from `account link` or a checkpoint response).\n");
|
|
754
|
+
out.stderr.write("error: --session is required (the account's acc_... id from `curviate account link` or a checkpoint response).\n");
|
|
748
755
|
process.exit(2);
|
|
749
756
|
}
|
|
750
757
|
const sessionId = flags.session;
|
|
@@ -843,7 +850,7 @@ async function runAccountUpdate(client, flags, out) {
|
|
|
843
850
|
body["proxy"] = {
|
|
844
851
|
protocol: flags["proxy-protocol"] ?? "http",
|
|
845
852
|
host: flags["proxy-host"],
|
|
846
|
-
port: flags["proxy-port"] ?
|
|
853
|
+
port: flags["proxy-port"] === void 0 ? 80 : intFlag("proxy-port", flags["proxy-port"], 1, 65535),
|
|
847
854
|
...flags["proxy-username"] ? { username: flags["proxy-username"] } : {},
|
|
848
855
|
...proxyPassword !== void 0 ? { password: proxyPassword } : {}
|
|
849
856
|
};
|
|
@@ -992,15 +999,7 @@ async function runAccountCheckpointPoll(client, flags, out, io = {}) {
|
|
|
992
999
|
}
|
|
993
1000
|
return;
|
|
994
1001
|
}
|
|
995
|
-
|
|
996
|
-
if (flags.timeout !== void 0) {
|
|
997
|
-
const parsed = Number(flags.timeout);
|
|
998
|
-
if (Number.isNaN(parsed)) {
|
|
999
|
-
out.stderr.write("error: --timeout must be a number of milliseconds.\n");
|
|
1000
|
-
process.exit(2);
|
|
1001
|
-
}
|
|
1002
|
-
timeoutOverrideMs = parsed;
|
|
1003
|
-
}
|
|
1002
|
+
const timeoutOverrideMs = resolveWaitTimeoutOverrideMs(flags, out);
|
|
1004
1003
|
const resolvedIo = resolveCredentialIO(io);
|
|
1005
1004
|
const showTicker = resolvedIo.isOutputTTY && !(flags.json ?? false);
|
|
1006
1005
|
printResendHintIfApplicable("mobile_app_approval", accountId, out);
|
|
@@ -1159,7 +1158,7 @@ var accountLinkCommand = defineCommand({
|
|
|
1159
1158
|
"recruiter-contract-id": { type: "string", description: "Recruiter contract to bind to. Only meaningful when the LinkedIn account holds a Recruiter subscription." },
|
|
1160
1159
|
"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." },
|
|
1161
1160
|
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." },
|
|
1162
|
-
"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." },
|
|
1161
|
+
"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 `curviate account list --external-id`. Use an opaque id, not an email." },
|
|
1163
1162
|
timezone: { type: "string", description: "IANA time zone for the account, e.g. Europe/Berlin. A UTC offset is refused." },
|
|
1164
1163
|
"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." },
|
|
1165
1164
|
"no-interactive": {
|
|
@@ -1188,7 +1187,7 @@ var accountLinkCommand = defineCommand({
|
|
|
1188
1187
|
var accountConnectSessionPollCommand = defineCommand({
|
|
1189
1188
|
meta: {
|
|
1190
1189
|
name: "poll",
|
|
1191
|
-
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.",
|
|
1190
|
+
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 `curviate account link` until a terminal state.",
|
|
1192
1191
|
examples: [
|
|
1193
1192
|
"curviate account connect-session poll --session acc_YOUR_ACCOUNT_ID",
|
|
1194
1193
|
"curviate account connect-session poll --session acc_YOUR_ACCOUNT_ID --wait"
|
|
@@ -1198,7 +1197,7 @@ var accountConnectSessionPollCommand = defineCommand({
|
|
|
1198
1197
|
...WRITE_SINGLE_FLAGS,
|
|
1199
1198
|
session: {
|
|
1200
1199
|
type: "string",
|
|
1201
|
-
description: "The account's acc_... id, returned by `account link` or a checkpoint response.",
|
|
1200
|
+
description: "The account's acc_... id, returned by `curviate account link` or a checkpoint response.",
|
|
1202
1201
|
required: true
|
|
1203
1202
|
},
|
|
1204
1203
|
wait: {
|
|
@@ -1284,6 +1283,17 @@ var accountDisconnectCommand = defineCommand({
|
|
|
1284
1283
|
meta: {
|
|
1285
1284
|
name: "disconnect",
|
|
1286
1285
|
description: "Hard-disconnect a LinkedIn account and release its seat.",
|
|
1286
|
+
risk: "high",
|
|
1287
|
+
rules: {
|
|
1288
|
+
changes: "The Account is disconnected and deleted from Curviate, its seat is released, and its stored data goes with it.",
|
|
1289
|
+
visible_to: "Everyone using this workspace's key: the Account disappears from `curviate account list`. Nothing is posted on LinkedIn.",
|
|
1290
|
+
budget_rows: [],
|
|
1291
|
+
retry: "A retry after success answers ACCOUNT_NOT_FOUND; read `curviate account list` first.",
|
|
1292
|
+
undo: "Cannot be undone. Link the LinkedIn account again with `curviate account link`; history does not come back.",
|
|
1293
|
+
blast_radius: "One Account and everything stored for it."
|
|
1294
|
+
},
|
|
1295
|
+
errors: { ACCOUNT_NOT_FOUND: "no Account with this id (already disconnected, or another workspace's)." },
|
|
1296
|
+
seeAlso: ["curviate account list", "curviate account link"],
|
|
1287
1297
|
examples: [
|
|
1288
1298
|
"curviate account disconnect acc_YOUR_ACCOUNT_ID"
|
|
1289
1299
|
]
|
|
@@ -1408,7 +1418,7 @@ var accountCheckpointRequestCommand = defineCommand({
|
|
|
1408
1418
|
},
|
|
1409
1419
|
challenge: {
|
|
1410
1420
|
type: "string",
|
|
1411
|
-
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."
|
|
1421
|
+
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 `curviate account checkpoint solve`. Omit to re-send the current code."
|
|
1412
1422
|
}
|
|
1413
1423
|
},
|
|
1414
1424
|
async run({ args }) {
|
|
@@ -1443,7 +1453,7 @@ var accountCheckpointCommand = defineCommand({
|
|
|
1443
1453
|
}
|
|
1444
1454
|
});
|
|
1445
1455
|
var accountCommand = defineCommand({
|
|
1446
|
-
meta: { name: "account", description:
|
|
1456
|
+
meta: { name: "account", description: DESCRIPTIONS.account },
|
|
1447
1457
|
subCommands: {
|
|
1448
1458
|
list: accountListCommand,
|
|
1449
1459
|
get: accountGetCommand,
|