@curviate/cli 0.49.0 → 0.50.0-next.1
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 +26 -0
- package/README.md +12 -5
- package/dist/{account-2BH2Q6VG.js → account-U7UJIE3H.js} +784 -116
- package/dist/analytics-MZU2WKON.js +27 -0
- package/dist/beta-consent-67IDUV3K.js +81 -0
- package/dist/billing-QAW75YE7.js +124 -0
- package/dist/{chunk-RXWODUWA.js → chunk-2W4RN5ON.js} +18 -2
- package/dist/{chunk-MGB6FE4A.js → chunk-3Z6PXS6N.js} +6 -6
- package/dist/chunk-5S3MJVI5.js +22 -0
- package/dist/{chunk-V7FJWTZW.js → chunk-6LBOGIVE.js} +4 -4
- package/dist/{chunk-Z7OQSWBD.js → chunk-6PLDAEMO.js} +85 -10
- package/dist/chunk-73DJ3KNE.js +54 -0
- package/dist/{chunk-3RCW7URJ.js → chunk-A57ZILRU.js} +1 -1
- package/dist/chunk-AVI7J47S.js +52 -0
- package/dist/{chunk-JYKYD57J.js → chunk-CKVCBGQX.js} +1 -1
- package/dist/chunk-EIA66ESN.js +339 -0
- package/dist/{chunk-YLSJ4HKU.js → chunk-ENBIMEKS.js} +26 -1
- package/dist/{chunk-LCGXJGPB.js → chunk-GHMRPX5H.js} +7 -1
- package/dist/chunk-GOICALYQ.js +28 -0
- package/dist/{chunk-PQWDDSV7.js → chunk-L7JH3W56.js} +1 -1
- package/dist/chunk-LCPPXOPN.js +528 -0
- package/dist/chunk-LRMPS4UQ.js +144 -0
- package/dist/{chunk-5ZGTU4VD.js → chunk-LULN3II2.js} +78 -5
- package/dist/chunk-PPGKQJKU.js +38 -0
- package/dist/chunk-Q3ZPRFUX.js +20 -0
- package/dist/{chunk-SA2QHAXG.js → chunk-QM57YDJE.js} +13 -201
- package/dist/{chunk-Y7MZZRYR.js → chunk-RYWWSZUH.js} +14 -2
- package/dist/{chunk-TEAWYLPO.js → chunk-TYNVJDYK.js} +49 -18
- package/dist/cli.js +34 -18
- package/dist/{comment-MRDPDA33.js → comment-6NRZILAS.js} +90 -11
- package/dist/{company-2AEHSGHA.js → company-VXE7IEPT.js} +65 -15
- package/dist/{config-NRBKHXES.js → config-3WP7OD35.js} +53 -4
- package/dist/{connect-4XEBV5V3.js → connect-FBK6UWZP.js} +63 -18
- package/dist/contact-HFPZ3KGL.js +32 -0
- package/dist/contact-groups-AI4MLGQS.js +399 -0
- package/dist/contact-import-54Y7EMU2.js +336 -0
- package/dist/core-RLMWMQEI.js +46 -0
- package/dist/do-not-contact-LQ5V6SPE.js +200 -0
- package/dist/{doctor-BZ4DA7DV.js → doctor-KKRL7TEF.js} +65 -11
- package/dist/{document-RKHRWXNT.js → document-GFRWPQFV.js} +1 -1
- package/dist/{draft-C5N6EOO5.js → draft-VSWZOCDR.js} +60 -14
- package/dist/{enrollment-BNQOUKI7.js → enrollment-OACCSBM5.js} +31 -19
- package/dist/{examples-NIMSIXMV.js → examples-JJB4DZKK.js} +2 -2
- package/dist/{exit-codes-TLMKTLRI.js → exit-codes-7DBETBDT.js} +1 -1
- package/dist/export-AQHAFVAB.js +96 -0
- package/dist/{feed-DFUU7SUJ.js → feed-HY4HT75U.js} +13 -10
- package/dist/{group-CSD2OWOZ.js → group-A3SMBFU5.js} +18 -10
- package/dist/{inbox-SNSPWI7J.js → inbox-YHUO2RPI.js} +31 -12
- package/dist/{inboxes-RIRHPS4H.js → inboxes-GKLMHPDR.js} +14 -10
- package/dist/incoming-NHROOOIZ.js +218 -0
- package/dist/{job-6PNXXZNF.js → job-QBW3PGWL.js} +65 -13
- package/dist/{login-Y7JBAHCW.js → login-GWIYHKYO.js} +13 -4
- package/dist/{message-2IK4MBBG.js → message-BFLN2VHS.js} +9 -7
- package/dist/{motion-7ATUXO6R.js → motion-LTWU2GPC.js} +39 -117
- package/dist/network-CNSBX2SR.js +235 -0
- package/dist/{notification-VYK5NDEB.js → notification-DCCFJPXU.js} +38 -11
- package/dist/notifications-AQBXBK4K.js +231 -0
- package/dist/{post-AN6T2OJF.js → post-PINZHSPS.js} +92 -12
- package/dist/{profile-UQY64642.js → profile-MJQJSNYR.js} +76 -20
- package/dist/{recruiter-OY4RN5HH.js → recruiter-X6GX4A2G.js} +133 -22
- package/dist/{sales-nav-KLODLYMW.js → sales-nav-44GYWDYE.js} +74 -19
- package/dist/{search-NWP5S6CF.js → search-SULIN6TB.js} +55 -23
- package/dist/{setup-YPPFLH2N.js → setup-ZQRHMRMB.js} +69 -17
- package/dist/team-TM6LRUY5.js +450 -0
- package/dist/tier-Z3U6AT7H.js +61 -0
- package/dist/unibox-BIMI2KY5.js +402 -0
- package/dist/{webhook-OHKBL3YS.js → webhook-EHXRTHBG.js} +257 -27
- package/package.json +2 -2
- package/dist/chunk-D2S5OCYU.js +0 -38
- package/dist/core-RGU2SCBN.js +0 -46
package/dist/cli.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
intFlag
|
|
4
|
-
} from "./chunk-NNV2OYEF.js";
|
|
5
2
|
import {
|
|
6
3
|
SECRET_FLAGS
|
|
7
4
|
} from "./chunk-TCUYH5GO.js";
|
|
5
|
+
import {
|
|
6
|
+
intFlag
|
|
7
|
+
} from "./chunk-NNV2OYEF.js";
|
|
8
8
|
import {
|
|
9
9
|
GLOBAL_FLAGS,
|
|
10
10
|
STATE_WRITES,
|
|
11
11
|
parseBetaFlag,
|
|
12
12
|
setBetaOverride,
|
|
13
|
+
setTeamFlag,
|
|
13
14
|
setWriteKind
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RYWWSZUH.js";
|
|
15
16
|
import {
|
|
16
17
|
lazy
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-73DJ3KNE.js";
|
|
18
19
|
import {
|
|
19
20
|
editDistance
|
|
20
21
|
} from "./chunk-FDJMAF7D.js";
|
|
@@ -44,21 +45,33 @@ var main = defineCommand({
|
|
|
44
45
|
// Subcommand registry, names and descriptions are static for help rendering;
|
|
45
46
|
// the handler implementation is loaded lazily on first invocation.
|
|
46
47
|
subCommands: {
|
|
47
|
-
setup: lazy("setup", () => import("./setup-
|
|
48
|
-
doctor: lazy("doctor", () => import("./doctor-
|
|
49
|
-
login: lazy("login", () => import("./login-
|
|
50
|
-
config: lazy("config", () => import("./config-
|
|
51
|
-
account: lazy("account", () => import("./account-
|
|
52
|
-
motion: lazy("motion", () => import("./motion-
|
|
53
|
-
enrollment: lazy("enrollment", () => import("./enrollment-
|
|
54
|
-
|
|
48
|
+
setup: lazy("setup", () => import("./setup-ZQRHMRMB.js").then((m) => m.setupCommand)),
|
|
49
|
+
doctor: lazy("doctor", () => import("./doctor-KKRL7TEF.js").then((m) => m.doctorCommand)),
|
|
50
|
+
login: lazy("login", () => import("./login-GWIYHKYO.js").then((m) => m.loginCommand)),
|
|
51
|
+
config: lazy("config", () => import("./config-3WP7OD35.js").then((m) => m.configCommand)),
|
|
52
|
+
account: lazy("account", () => import("./account-U7UJIE3H.js").then((m) => m.accountCommand)),
|
|
53
|
+
motion: lazy("motion", () => import("./motion-LTWU2GPC.js").then((m) => m.motionCommand)),
|
|
54
|
+
enrollment: lazy("enrollment", () => import("./enrollment-OACCSBM5.js").then((m) => m.enrollmentCommand)),
|
|
55
|
+
contact: lazy("contact", () => import("./contact-HFPZ3KGL.js").then((m) => m.contactCommand)),
|
|
56
|
+
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-LQ5V6SPE.js").then((m) => m.doNotContactCommand)),
|
|
57
|
+
unibox: lazy("unibox", () => import("./unibox-BIMI2KY5.js").then((m) => m.uniboxCommand)),
|
|
58
|
+
network: lazy("network", () => import("./network-CNSBX2SR.js").then((m) => m.networkCommand)),
|
|
59
|
+
analytics: lazy("analytics", () => import("./analytics-MZU2WKON.js").then((m) => m.analyticsCommand)),
|
|
60
|
+
notification: lazy("notification", () => import("./notifications-AQBXBK4K.js").then((m) => m.notificationsCommand)),
|
|
61
|
+
export: lazy("export", () => import("./export-AQHAFVAB.js").then((m) => m.exportCommand)),
|
|
62
|
+
billing: lazy("billing", () => import("./billing-QAW75YE7.js").then((m) => m.billingCommand)),
|
|
63
|
+
tier: lazy("tier", () => import("./tier-Z3U6AT7H.js").then((m) => m.tierCommand)),
|
|
64
|
+
team: lazy("team", () => import("./team-TM6LRUY5.js").then((m) => m.teamCommand)),
|
|
65
|
+
incoming: lazy("incoming", () => import("./incoming-NHROOOIZ.js").then((m) => m.incomingCommand)),
|
|
66
|
+
beta: lazy("beta", () => import("./beta-consent-67IDUV3K.js").then((m) => m.betaCommand)),
|
|
67
|
+
webhook: lazy("webhook", () => import("./webhook-EHXRTHBG.js").then((m) => m.webhookCommand)),
|
|
55
68
|
// The LinkedIn building blocks. Reserved product groups
|
|
56
|
-
// (
|
|
69
|
+
// (unibox, network, analytics, team) land
|
|
57
70
|
// between `enrollment` and `webhook` with their owning specs.
|
|
58
|
-
core: lazy("core", () => import("./core-
|
|
71
|
+
core: lazy("core", () => import("./core-RLMWMQEI.js").then((m) => m.coreCommand))
|
|
59
72
|
},
|
|
60
73
|
async run() {
|
|
61
|
-
const { showHelp } = await import("./examples-
|
|
74
|
+
const { showHelp } = await import("./examples-JJB4DZKK.js");
|
|
62
75
|
await showHelp(main, ["curviate"]);
|
|
63
76
|
}
|
|
64
77
|
});
|
|
@@ -203,6 +216,8 @@ function arityPhrase(count) {
|
|
|
203
216
|
return `${count} positional arguments`;
|
|
204
217
|
}
|
|
205
218
|
async function extraPositionals(cmd, rawArgs) {
|
|
219
|
+
const argsDef = await resolveValue(cmd.args ?? {});
|
|
220
|
+
if (Object.values(argsDef).some((def) => def?.type === "positional" && def.variadic)) return [];
|
|
206
221
|
const booleanFlags = await routingBooleanFlagNames(cmd);
|
|
207
222
|
const declaredFlags = await routingDeclaredFlagNames(cmd);
|
|
208
223
|
const { positionals } = walkTokens(rawArgs, booleanFlags, declaredFlags);
|
|
@@ -348,7 +363,7 @@ async function dispatch(root, rawArgs) {
|
|
|
348
363
|
helpFor = "curviate";
|
|
349
364
|
if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
|
|
350
365
|
const { leaf, path } = await resolveLeaf(root, rawArgs.filter((a) => a !== "--help" && a !== "-h"));
|
|
351
|
-
const { showHelp } = await import("./examples-
|
|
366
|
+
const { showHelp } = await import("./examples-JJB4DZKK.js");
|
|
352
367
|
await showHelp(leaf, path);
|
|
353
368
|
await new Promise((done) => process.stdout.write("", () => done()));
|
|
354
369
|
process.exit(0);
|
|
@@ -409,6 +424,7 @@ async function dispatch(root, rawArgs) {
|
|
|
409
424
|
);
|
|
410
425
|
const limit = ctx.args["limit"];
|
|
411
426
|
if (typeof limit === "string") intFlag("limit", limit);
|
|
427
|
+
setTeamFlag(ctx.args["team"]);
|
|
412
428
|
return originalRun(ctx);
|
|
413
429
|
}
|
|
414
430
|
} : {}
|
|
@@ -429,7 +445,7 @@ async function dispatch(root, rawArgs) {
|
|
|
429
445
|
if (code === "EARG") process.stderr.write(helpPointer());
|
|
430
446
|
const { CurviateError } = await import("@curviate/sdk");
|
|
431
447
|
if (err instanceof CurviateError) {
|
|
432
|
-
const { getExitCode } = await import("./exit-codes-
|
|
448
|
+
const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
|
|
433
449
|
process.exit(getExitCode(err));
|
|
434
450
|
}
|
|
435
451
|
process.exit(code === "EARG" ? 2 : 1);
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CKVCBGQX.js";
|
|
5
5
|
import {
|
|
6
6
|
AttachError,
|
|
7
7
|
describeAttachment,
|
|
8
8
|
readAttachment,
|
|
9
9
|
toAttachmentPayload
|
|
10
10
|
} from "./chunk-5I6JJJIV.js";
|
|
11
|
+
import {
|
|
12
|
+
AS_ACCOUNT,
|
|
13
|
+
BUDGET,
|
|
14
|
+
TARGET
|
|
15
|
+
} from "./chunk-Q3ZPRFUX.js";
|
|
11
16
|
import "./chunk-UEAX6KUB.js";
|
|
12
17
|
import {
|
|
13
18
|
requireAccount
|
|
14
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6LBOGIVE.js";
|
|
15
20
|
import {
|
|
16
21
|
buildPreviewOutput
|
|
17
22
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -21,28 +26,30 @@ import {
|
|
|
21
26
|
readMaxPagesFlag,
|
|
22
27
|
readablePage,
|
|
23
28
|
rejectPaginationModifiersWithoutAll,
|
|
29
|
+
streamAll
|
|
30
|
+
} from "./chunk-LRMPS4UQ.js";
|
|
31
|
+
import {
|
|
24
32
|
renderError,
|
|
25
33
|
renderSuccess,
|
|
26
34
|
renderUnexpectedError,
|
|
27
|
-
resolveEffectiveConfig,
|
|
28
|
-
streamAll,
|
|
29
35
|
writeNdjsonItem
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-RXWODUWA.js";
|
|
36
|
+
} from "./chunk-QM57YDJE.js";
|
|
32
37
|
import {
|
|
33
|
-
createClient
|
|
34
|
-
|
|
38
|
+
createClient,
|
|
39
|
+
resolveEffectiveConfig
|
|
40
|
+
} from "./chunk-LULN3II2.js";
|
|
35
41
|
import {
|
|
36
42
|
GLOBAL_FLAGS,
|
|
37
43
|
WRITE_SINGLE_FLAGS,
|
|
38
44
|
readOnly
|
|
39
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-RYWWSZUH.js";
|
|
40
46
|
import {
|
|
41
47
|
DESCRIPTIONS
|
|
42
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-73DJ3KNE.js";
|
|
43
49
|
import {
|
|
44
50
|
resolveTextOrStdin
|
|
45
51
|
} from "./chunk-ZYURL5VK.js";
|
|
52
|
+
import "./chunk-2W4RN5ON.js";
|
|
46
53
|
|
|
47
54
|
// src/commands/comment.ts
|
|
48
55
|
import { defineCommand } from "citty";
|
|
@@ -71,7 +78,7 @@ function buildListQuery(flags, out) {
|
|
|
71
78
|
async function handleSdkError(err, outOpts, out) {
|
|
72
79
|
const { CurviateError } = await import("@curviate/sdk");
|
|
73
80
|
if (err instanceof CurviateError) {
|
|
74
|
-
const { getExitCode } = await import("./exit-codes-
|
|
81
|
+
const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
|
|
75
82
|
renderError(err, outOpts, out);
|
|
76
83
|
process.exit(getExitCode(err));
|
|
77
84
|
}
|
|
@@ -413,6 +420,10 @@ var commentListCommand = defineCommand({
|
|
|
413
420
|
meta: {
|
|
414
421
|
name: "list",
|
|
415
422
|
description: "List the comments on a post. A very recent add/delete may take a few minutes to appear or clear here (LinkedIn-side indexing).",
|
|
423
|
+
risk: "read",
|
|
424
|
+
rules: {
|
|
425
|
+
budget_rows: ["content_poll", "profile_views"]
|
|
426
|
+
},
|
|
416
427
|
examples: [
|
|
417
428
|
"curviate core comment list 7290000000000000000",
|
|
418
429
|
"curviate core comment list 7290000000000000000 --all"
|
|
@@ -430,6 +441,10 @@ var commentRepliesCommand = defineCommand({
|
|
|
430
441
|
meta: {
|
|
431
442
|
name: "replies",
|
|
432
443
|
description: "List the replies to a comment.",
|
|
444
|
+
risk: "read",
|
|
445
|
+
rules: {
|
|
446
|
+
budget_rows: ["content_poll", "profile_views"]
|
|
447
|
+
},
|
|
433
448
|
examples: [
|
|
434
449
|
"curviate core comment replies 7290000000000000000 COMMENT_ID",
|
|
435
450
|
"curviate core comment replies 7290000000000000000 COMMENT_ID --all"
|
|
@@ -448,6 +463,10 @@ var commentReactionsCommand = defineCommand({
|
|
|
448
463
|
meta: {
|
|
449
464
|
name: "reactions",
|
|
450
465
|
description: "List the reactions on a comment.",
|
|
466
|
+
risk: "read",
|
|
467
|
+
rules: {
|
|
468
|
+
budget_rows: ["content_poll", "profile_views"]
|
|
469
|
+
},
|
|
451
470
|
examples: [
|
|
452
471
|
"curviate core comment reactions 7290000000000000000 COMMENT_ID"
|
|
453
472
|
]
|
|
@@ -465,6 +484,10 @@ var commentUserCommand = defineCommand({
|
|
|
465
484
|
meta: {
|
|
466
485
|
name: "user",
|
|
467
486
|
description: "List the comments authored by a user (accepts 'me').",
|
|
487
|
+
risk: "read",
|
|
488
|
+
rules: {
|
|
489
|
+
budget_rows: ["content_poll", "profile_views"]
|
|
490
|
+
},
|
|
468
491
|
examples: [
|
|
469
492
|
"curviate core comment user me",
|
|
470
493
|
"curviate core comment user janesmith --limit 10"
|
|
@@ -482,6 +505,15 @@ var commentAddCommand = defineCommand({
|
|
|
482
505
|
meta: {
|
|
483
506
|
name: "add",
|
|
484
507
|
description: "Publish a comment on a post.",
|
|
508
|
+
risk: "write",
|
|
509
|
+
rules: {
|
|
510
|
+
changes: "Publishes your comment on the post.",
|
|
511
|
+
visible_to: "The post's author and everyone who can see its comments.",
|
|
512
|
+
budget_rows: ["comments"],
|
|
513
|
+
retry: "Not safe: requests carry no idempotency key, so a retry after a timeout can repeat it. Read `curviate core comment list <post_id>` first.",
|
|
514
|
+
undo: "`curviate core comment delete <post_id> <comment_id>`."
|
|
515
|
+
},
|
|
516
|
+
errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET },
|
|
485
517
|
examples: [
|
|
486
518
|
'curviate core comment add 7290000000000000000 "Useful breakdown, thanks for sharing."'
|
|
487
519
|
]
|
|
@@ -500,6 +532,15 @@ var commentReplyCommand = defineCommand({
|
|
|
500
532
|
meta: {
|
|
501
533
|
name: "reply",
|
|
502
534
|
description: "Reply to a comment.",
|
|
535
|
+
risk: "write",
|
|
536
|
+
rules: {
|
|
537
|
+
changes: "Publishes your reply to the comment.",
|
|
538
|
+
visible_to: "The comment's author and everyone who can see the thread.",
|
|
539
|
+
budget_rows: ["comments"],
|
|
540
|
+
retry: "Not safe: requests carry no idempotency key, so a retry after a timeout can repeat it. Read `curviate core comment replies <post_id> <comment_id>` first.",
|
|
541
|
+
undo: "`curviate core comment delete <post_id> <comment_id>`."
|
|
542
|
+
},
|
|
543
|
+
errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET },
|
|
503
544
|
examples: [
|
|
504
545
|
'curviate core comment reply 7290000000000000000 COMMENT_ID "Agreed, that matches what we saw."'
|
|
505
546
|
]
|
|
@@ -519,6 +560,15 @@ var commentEditCommand = defineCommand({
|
|
|
519
560
|
meta: {
|
|
520
561
|
name: "edit",
|
|
521
562
|
description: "Edit your own comment.",
|
|
563
|
+
risk: "write",
|
|
564
|
+
rules: {
|
|
565
|
+
changes: "Replaces the text of your comment.",
|
|
566
|
+
visible_to: "Everyone who can see the comment.",
|
|
567
|
+
budget_rows: [],
|
|
568
|
+
retry: "Safe: the same text written again leaves the comment the same.",
|
|
569
|
+
undo: "Edit it again with the previous text."
|
|
570
|
+
},
|
|
571
|
+
errors: { ...AS_ACCOUNT, ...TARGET },
|
|
522
572
|
examples: [
|
|
523
573
|
'curviate core comment edit 7290000000000000000 COMMENT_ID "Useful breakdown, thanks for writing it up."'
|
|
524
574
|
]
|
|
@@ -537,6 +587,17 @@ var commentDeleteCommand = defineCommand({
|
|
|
537
587
|
meta: {
|
|
538
588
|
name: "delete",
|
|
539
589
|
description: "Delete your own comment.",
|
|
590
|
+
risk: "high",
|
|
591
|
+
rules: {
|
|
592
|
+
changes: "Deletes one of your comments.",
|
|
593
|
+
visible_to: "Everyone: the comment disappears from the post.",
|
|
594
|
+
budget_rows: [],
|
|
595
|
+
retry: "Safe: a deleted comment is gone, so a repeat has nothing to delete.",
|
|
596
|
+
undo: "Cannot be undone.",
|
|
597
|
+
blast_radius: "One comment, with its replies and reactions."
|
|
598
|
+
},
|
|
599
|
+
errors: { ...AS_ACCOUNT, ...TARGET },
|
|
600
|
+
seeAlso: ["curviate core comment list"],
|
|
540
601
|
examples: [
|
|
541
602
|
"curviate core comment delete 7290000000000000000 COMMENT_ID"
|
|
542
603
|
]
|
|
@@ -554,6 +615,15 @@ var commentReactCommand = defineCommand({
|
|
|
554
615
|
meta: {
|
|
555
616
|
name: "react",
|
|
556
617
|
description: "React to a comment (like|celebrate|support|love|insightful|funny).",
|
|
618
|
+
risk: "write",
|
|
619
|
+
rules: {
|
|
620
|
+
changes: "Adds your reaction to the comment.",
|
|
621
|
+
visible_to: "The comment's author and anyone who can see its reactions.",
|
|
622
|
+
budget_rows: ["post_likes"],
|
|
623
|
+
retry: "Reacting again replaces your reaction; it never adds a second.",
|
|
624
|
+
undo: "`curviate core comment unreact <post_id> <comment_id>`."
|
|
625
|
+
},
|
|
626
|
+
errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET },
|
|
557
627
|
examples: [
|
|
558
628
|
"curviate core comment react 7290000000000000000 COMMENT_ID insightful"
|
|
559
629
|
]
|
|
@@ -572,6 +642,15 @@ var commentUnreactCommand = defineCommand({
|
|
|
572
642
|
meta: {
|
|
573
643
|
name: "unreact",
|
|
574
644
|
description: "Remove your reaction from a comment.",
|
|
645
|
+
risk: "write",
|
|
646
|
+
rules: {
|
|
647
|
+
changes: "Removes your reaction from the comment.",
|
|
648
|
+
visible_to: "The comment's author and anyone who can see its reactions.",
|
|
649
|
+
budget_rows: [],
|
|
650
|
+
retry: "A second call answers REACTION_NOT_FOUND and changes nothing.",
|
|
651
|
+
undo: "`curviate core comment react <post_id> <comment_id>`."
|
|
652
|
+
},
|
|
653
|
+
errors: { ...AS_ACCOUNT, ...TARGET, REACTION_NOT_FOUND: "you have no reaction on the comment." },
|
|
575
654
|
examples: [
|
|
576
655
|
"curviate core comment unreact 7290000000000000000 COMMENT_ID insightful"
|
|
577
656
|
]
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sentAsNotice
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6PLDAEMO.js";
|
|
5
5
|
import {
|
|
6
6
|
AttachError,
|
|
7
7
|
readAttachment,
|
|
8
8
|
toAttachmentPayload
|
|
9
9
|
} from "./chunk-5I6JJJIV.js";
|
|
10
10
|
import "./chunk-UWO2D4HW.js";
|
|
11
|
+
import {
|
|
12
|
+
AS_ACCOUNT,
|
|
13
|
+
TARGET
|
|
14
|
+
} from "./chunk-Q3ZPRFUX.js";
|
|
11
15
|
import {
|
|
12
16
|
resolveIdentifier
|
|
13
17
|
} from "./chunk-UEAX6KUB.js";
|
|
14
|
-
import {
|
|
15
|
-
requireAccount
|
|
16
|
-
} from "./chunk-V7FJWTZW.js";
|
|
17
18
|
import {
|
|
18
19
|
reencodeInvitableFollowers,
|
|
19
20
|
reencodeInviteTokenItem,
|
|
@@ -22,7 +23,10 @@ import {
|
|
|
22
23
|
slimSearchJobs,
|
|
23
24
|
slimSearchPeople,
|
|
24
25
|
slimSearchPosts
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GHMRPX5H.js";
|
|
27
|
+
import {
|
|
28
|
+
requireAccount
|
|
29
|
+
} from "./chunk-6LBOGIVE.js";
|
|
26
30
|
import {
|
|
27
31
|
buildPreviewOutput
|
|
28
32
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -34,30 +38,32 @@ import {
|
|
|
34
38
|
readableObject,
|
|
35
39
|
readablePage,
|
|
36
40
|
rejectPaginationModifiersWithoutAll,
|
|
41
|
+
streamAll
|
|
42
|
+
} from "./chunk-LRMPS4UQ.js";
|
|
43
|
+
import {
|
|
37
44
|
renderError,
|
|
38
45
|
renderSuccess,
|
|
39
46
|
renderUnexpectedError,
|
|
40
|
-
resolveEffectiveConfig,
|
|
41
|
-
streamAll,
|
|
42
47
|
writeNdjsonItem
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-RXWODUWA.js";
|
|
48
|
+
} from "./chunk-QM57YDJE.js";
|
|
45
49
|
import {
|
|
46
|
-
createClient
|
|
47
|
-
|
|
50
|
+
createClient,
|
|
51
|
+
resolveEffectiveConfig
|
|
52
|
+
} from "./chunk-LULN3II2.js";
|
|
48
53
|
import {
|
|
49
54
|
GLOBAL_FLAGS,
|
|
50
55
|
READ_SINGLE_FLAGS,
|
|
51
56
|
WRITE_FLAGS,
|
|
52
57
|
readOnly
|
|
53
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-RYWWSZUH.js";
|
|
54
59
|
import {
|
|
55
60
|
DESCRIPTIONS
|
|
56
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-73DJ3KNE.js";
|
|
57
62
|
import "./chunk-FDJMAF7D.js";
|
|
58
63
|
import {
|
|
59
64
|
resolveTextOrStdin
|
|
60
65
|
} from "./chunk-ZYURL5VK.js";
|
|
66
|
+
import "./chunk-2W4RN5ON.js";
|
|
61
67
|
|
|
62
68
|
// src/commands/company.ts
|
|
63
69
|
import { defineCommand } from "citty";
|
|
@@ -91,7 +97,7 @@ async function resolveCompanyId(ns, raw) {
|
|
|
91
97
|
async function handleSdkError(err, outOpts, out) {
|
|
92
98
|
const { CurviateError } = await import("@curviate/sdk");
|
|
93
99
|
if (err instanceof CurviateError) {
|
|
94
|
-
const { getExitCode } = await import("./exit-codes-
|
|
100
|
+
const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
|
|
95
101
|
renderError(err, outOpts, out);
|
|
96
102
|
process.exit(getExitCode(err));
|
|
97
103
|
}
|
|
@@ -516,6 +522,7 @@ var companyEmployeesCommand = defineCommand({
|
|
|
516
522
|
meta: {
|
|
517
523
|
name: "employees",
|
|
518
524
|
description: "List people who currently work at the company.",
|
|
525
|
+
risk: "read",
|
|
519
526
|
examples: [
|
|
520
527
|
"curviate core company employees acmecorp",
|
|
521
528
|
'curviate core company employees 1234567 --keywords "machine learning"'
|
|
@@ -549,6 +556,7 @@ var companyPostsCommand = defineCommand({
|
|
|
549
556
|
meta: {
|
|
550
557
|
name: "posts",
|
|
551
558
|
description: "List the company's posts.",
|
|
559
|
+
risk: "read",
|
|
552
560
|
examples: [
|
|
553
561
|
"curviate core company posts acmecorp",
|
|
554
562
|
"curviate core company posts 1234567 --limit 5"
|
|
@@ -580,6 +588,7 @@ var companyJobsCommand = defineCommand({
|
|
|
580
588
|
meta: {
|
|
581
589
|
name: "jobs",
|
|
582
590
|
description: "List the company's open job postings.",
|
|
591
|
+
risk: "read",
|
|
583
592
|
examples: [
|
|
584
593
|
"curviate core company jobs acmecorp",
|
|
585
594
|
"curviate core company jobs 1234567 --keywords engineer"
|
|
@@ -612,6 +621,10 @@ var companyInvitableFollowersCommand = defineCommand({
|
|
|
612
621
|
meta: {
|
|
613
622
|
name: "invitable-followers",
|
|
614
623
|
description: "List the account's 1st-degree connections who are eligible to be invited to follow the company page. This is the read that seeds `curviate core company follow-invite`. Items carry no name or headline (a wire limitation), so hydrate a candidate via `curviate core profile <id>` before deciding who to invite. `invite_token` is always returned as base64 (the raw value can carry binary bytes unsafe to print).",
|
|
624
|
+
risk: "read",
|
|
625
|
+
rules: {
|
|
626
|
+
budget_rows: ["content_poll"]
|
|
627
|
+
},
|
|
615
628
|
examples: [
|
|
616
629
|
"curviate core company invitable-followers 1234567"
|
|
617
630
|
]
|
|
@@ -642,6 +655,17 @@ var companyFollowInviteCommand = defineCommand({
|
|
|
642
655
|
meta: {
|
|
643
656
|
name: "follow-invite",
|
|
644
657
|
description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC... member ids from `curviate core company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate).",
|
|
658
|
+
risk: "high",
|
|
659
|
+
rules: {
|
|
660
|
+
changes: "Invites the chosen connections to follow the company page you administer.",
|
|
661
|
+
visible_to: "Each invitee, who gets the invitation from LinkedIn.",
|
|
662
|
+
budget_rows: [],
|
|
663
|
+
retry: "Safe: re-inviting a member who is already invited returns the same invitation and sends no second one.",
|
|
664
|
+
undo: "An invitation cannot be withdrawn from the CLI.",
|
|
665
|
+
blast_radius: "One invitation per --invitee, all from your Account in one call."
|
|
666
|
+
},
|
|
667
|
+
errors: { ...AS_ACCOUNT, ...TARGET, RESOURCE_ACCESS_RESTRICTED: "the Account does not administer the page." },
|
|
668
|
+
seeAlso: ["curviate core company invitable-followers", "curviate core company managed"],
|
|
645
669
|
examples: [
|
|
646
670
|
"curviate core company follow-invite 1234567 --invitee ACoAAB1cDeFgHiJkLmNoP"
|
|
647
671
|
]
|
|
@@ -651,7 +675,7 @@ var companyFollowInviteCommand = defineCommand({
|
|
|
651
675
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first, including under --preview." },
|
|
652
676
|
invitee: {
|
|
653
677
|
type: "string",
|
|
654
|
-
description: "AC... member id to invite (from `curviate core company invitable-followers`). Repeatable, at least one required
|
|
678
|
+
description: "AC... member id to invite (from `curviate core company invitable-followers`). Repeatable, at least one required.",
|
|
655
679
|
required: true
|
|
656
680
|
}
|
|
657
681
|
},
|
|
@@ -677,6 +701,7 @@ var companyManagedCommand = defineCommand({
|
|
|
677
701
|
meta: {
|
|
678
702
|
name: "managed",
|
|
679
703
|
description: "List the company pages the connected account administers. An empty result is valid, the account administers no pages.",
|
|
704
|
+
risk: "read",
|
|
680
705
|
examples: [
|
|
681
706
|
"curviate core company managed"
|
|
682
707
|
]
|
|
@@ -704,6 +729,10 @@ var companyFollowersCommand = defineCommand({
|
|
|
704
729
|
meta: {
|
|
705
730
|
name: "followers",
|
|
706
731
|
description: "List a company page's followers, newest first. Admin-gated: the account must administer the page (see `curviate core company managed`).",
|
|
732
|
+
risk: "read",
|
|
733
|
+
rules: {
|
|
734
|
+
budget_rows: ["content_poll"]
|
|
735
|
+
},
|
|
707
736
|
examples: [
|
|
708
737
|
"curviate core company followers 1234567",
|
|
709
738
|
"curviate core company followers 1234567 --all"
|
|
@@ -735,6 +764,7 @@ var companyChatsCommand = defineCommand({
|
|
|
735
764
|
meta: {
|
|
736
765
|
name: "chats",
|
|
737
766
|
description: "List the conversations in a company page's admin message inbox, newest-activity-first. Admin-gated. Beta.",
|
|
767
|
+
risk: "read",
|
|
738
768
|
examples: [
|
|
739
769
|
"curviate core company chats 1234567"
|
|
740
770
|
]
|
|
@@ -765,6 +795,7 @@ var companyChatCommand = defineCommand({
|
|
|
765
795
|
meta: {
|
|
766
796
|
name: "chat",
|
|
767
797
|
description: "Retrieve one conversation from a company page's admin inbox. Admin-gated.",
|
|
798
|
+
risk: "read",
|
|
768
799
|
examples: [
|
|
769
800
|
"curviate core company chat 1234567 2-YTQ3ODU3Njgt"
|
|
770
801
|
]
|
|
@@ -796,6 +827,7 @@ var companyMessagesCommand = defineCommand({
|
|
|
796
827
|
meta: {
|
|
797
828
|
name: "messages",
|
|
798
829
|
description: "List a company-inbox conversation's messages, newest first. Admin-gated.",
|
|
830
|
+
risk: "read",
|
|
799
831
|
examples: [
|
|
800
832
|
"curviate core company messages 1234567 2-YTQ3ODU3Njgt"
|
|
801
833
|
]
|
|
@@ -827,6 +859,7 @@ var companyMessageCommand = defineCommand({
|
|
|
827
859
|
meta: {
|
|
828
860
|
name: "message",
|
|
829
861
|
description: "Retrieve one message from a company-inbox conversation. Admin-gated. See also: `curviate core company reply` (send).",
|
|
862
|
+
risk: "read",
|
|
830
863
|
examples: [
|
|
831
864
|
"curviate core company message 1234567 2-YTQ3ODU3Njgt MSG_ID"
|
|
832
865
|
]
|
|
@@ -859,6 +892,10 @@ var companySearchChatsCommand = defineCommand({
|
|
|
859
892
|
meta: {
|
|
860
893
|
name: "search-chats",
|
|
861
894
|
description: "Search or filter a company page's admin inbox. Exactly one mode per call: free-text <query>, --topic, or --unread; mutually exclusive, enforced server-side. Admin-gated. Beta.",
|
|
895
|
+
risk: "read",
|
|
896
|
+
rules: {
|
|
897
|
+
budget_rows: ["search"]
|
|
898
|
+
},
|
|
862
899
|
examples: [
|
|
863
900
|
"curviate core company search-chats 1234567 sophie",
|
|
864
901
|
"curviate core company search-chats 1234567 sophie --unread"
|
|
@@ -893,6 +930,15 @@ var companyReplyCommand = defineCommand({
|
|
|
893
930
|
meta: {
|
|
894
931
|
name: "reply",
|
|
895
932
|
description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2-... chat id from `curviate core company chats`; the endpoint resolves the page mailbox internally from the company id. Reply-only, this cannot start a new conversation on the page's behalf. See also: `curviate core company chats` (the read that returns the chat id) and `curviate core message send` (the personal equivalent).",
|
|
933
|
+
risk: "write",
|
|
934
|
+
rules: {
|
|
935
|
+
changes: "Sends a reply in a company-inbox conversation, as the page.",
|
|
936
|
+
visible_to: "The person in the conversation, as the page.",
|
|
937
|
+
budget_rows: [],
|
|
938
|
+
retry: "Not safe: requests carry no idempotency key, so a retry after a timeout can repeat it. Read `curviate core company messages <company_id> <chat_id>` first.",
|
|
939
|
+
undo: "Cannot be undone from the CLI: delete the message on LinkedIn."
|
|
940
|
+
},
|
|
941
|
+
errors: { ...AS_ACCOUNT, ...TARGET, RESOURCE_ACCESS_RESTRICTED: "the Account does not administer the page." },
|
|
896
942
|
examples: [
|
|
897
943
|
'curviate core company reply 1234567 2-YTQ3ODU3Njgt "Thanks for reaching out, happy to help."'
|
|
898
944
|
]
|
|
@@ -929,6 +975,10 @@ var companyCommand = defineCommand({
|
|
|
929
975
|
meta: {
|
|
930
976
|
name: "company",
|
|
931
977
|
description: DESCRIPTIONS.company,
|
|
978
|
+
risk: "read",
|
|
979
|
+
rules: {
|
|
980
|
+
budget_rows: ["content_poll"]
|
|
981
|
+
},
|
|
932
982
|
examples: [
|
|
933
983
|
"curviate core company acmecorp",
|
|
934
984
|
"curviate core company https://www.linkedin.com/company/acmecorp"
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
setActiveProfile,
|
|
13
13
|
updateProfileField,
|
|
14
14
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LULN3II2.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RYWWSZUH.js";
|
|
19
19
|
import {
|
|
20
20
|
DESCRIPTIONS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-73DJ3KNE.js";
|
|
22
22
|
import "./chunk-ZYURL5VK.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/config.ts
|
|
@@ -42,6 +42,7 @@ var configCommand = defineCommand({
|
|
|
42
42
|
meta: {
|
|
43
43
|
name: "list",
|
|
44
44
|
description: "List all profiles (keys redacted).",
|
|
45
|
+
risk: "read",
|
|
45
46
|
examples: [
|
|
46
47
|
"curviate config list"
|
|
47
48
|
]
|
|
@@ -102,7 +103,7 @@ var configCommand = defineCommand({
|
|
|
102
103
|
}
|
|
103
104
|
process.stdout.write(` apiKey: ${d["apiKey"]}
|
|
104
105
|
`);
|
|
105
|
-
for (const field of ["account", "baseUrl", "timeout"]) {
|
|
106
|
+
for (const field of ["account", "team", "baseUrl", "timeout"]) {
|
|
106
107
|
if (d[field]) process.stdout.write(` ${field}: ${d[field]}
|
|
107
108
|
`);
|
|
108
109
|
}
|
|
@@ -114,6 +115,7 @@ var configCommand = defineCommand({
|
|
|
114
115
|
meta: {
|
|
115
116
|
name: "path",
|
|
116
117
|
description: "Print the config file path.",
|
|
118
|
+
risk: "read",
|
|
117
119
|
examples: [
|
|
118
120
|
"curviate config path"
|
|
119
121
|
]
|
|
@@ -128,6 +130,15 @@ var configCommand = defineCommand({
|
|
|
128
130
|
meta: {
|
|
129
131
|
name: "use",
|
|
130
132
|
description: "Set the active profile.",
|
|
133
|
+
risk: "write",
|
|
134
|
+
rules: {
|
|
135
|
+
changes: "Makes the named profile the active one in the config file.",
|
|
136
|
+
visible_to: "Nobody else: the file stays on this machine.",
|
|
137
|
+
budget_rows: [],
|
|
138
|
+
retry: "Safe: the same result every time.",
|
|
139
|
+
undo: "Run it again with the previous profile name (`curviate config list`)."
|
|
140
|
+
},
|
|
141
|
+
errors: { INVALID_REQUEST: "no profile has that name." },
|
|
131
142
|
examples: [
|
|
132
143
|
"curviate config use work"
|
|
133
144
|
]
|
|
@@ -155,6 +166,15 @@ var configCommand = defineCommand({
|
|
|
155
166
|
meta: {
|
|
156
167
|
name: "rename",
|
|
157
168
|
description: "Rename a profile.",
|
|
169
|
+
risk: "write",
|
|
170
|
+
rules: {
|
|
171
|
+
changes: "Renames a profile in the config file; its key is unchanged.",
|
|
172
|
+
visible_to: "Nobody else: the file stays on this machine.",
|
|
173
|
+
budget_rows: [],
|
|
174
|
+
retry: "A second call fails: the old name is gone.",
|
|
175
|
+
undo: "Rename it back."
|
|
176
|
+
},
|
|
177
|
+
errors: { INVALID_REQUEST: "the old name does not exist, or the new one is taken." },
|
|
158
178
|
examples: [
|
|
159
179
|
"curviate config rename default personal"
|
|
160
180
|
]
|
|
@@ -184,6 +204,15 @@ var configCommand = defineCommand({
|
|
|
184
204
|
meta: {
|
|
185
205
|
name: "set-account",
|
|
186
206
|
description: "Set the default account on a profile.",
|
|
207
|
+
risk: "write",
|
|
208
|
+
rules: {
|
|
209
|
+
changes: "Sets the Account that commands use when you pass no --account.",
|
|
210
|
+
visible_to: "Nobody else: the file stays on this machine.",
|
|
211
|
+
budget_rows: [],
|
|
212
|
+
retry: "Safe: the same result every time.",
|
|
213
|
+
undo: "Run it again with the previous Account id."
|
|
214
|
+
},
|
|
215
|
+
errors: { INVALID_REQUEST: "there is no config file or no such profile." },
|
|
187
216
|
examples: [
|
|
188
217
|
"curviate config set-account acc_YOUR_ACCOUNT_ID"
|
|
189
218
|
]
|
|
@@ -221,6 +250,15 @@ var configCommand = defineCommand({
|
|
|
221
250
|
meta: {
|
|
222
251
|
name: "set-base-url",
|
|
223
252
|
description: "Set or clear the base URL on a profile.",
|
|
253
|
+
risk: "write",
|
|
254
|
+
rules: {
|
|
255
|
+
changes: "Sets or clears the API base URL on a profile.",
|
|
256
|
+
visible_to: "Nobody else: the file stays on this machine.",
|
|
257
|
+
budget_rows: [],
|
|
258
|
+
retry: "Safe: the same result every time.",
|
|
259
|
+
undo: "Run it again with the previous URL, or --reset."
|
|
260
|
+
},
|
|
261
|
+
errors: { INVALID_REQUEST: "there is no config file, no such profile, or the URL is not valid." },
|
|
224
262
|
examples: [
|
|
225
263
|
"curviate config set-base-url https://api.curviate.com",
|
|
226
264
|
"curviate config set-base-url --reset"
|
|
@@ -285,6 +323,17 @@ var configCommand = defineCommand({
|
|
|
285
323
|
meta: {
|
|
286
324
|
name: "reset",
|
|
287
325
|
description: "Remove the config file (or a single profile).",
|
|
326
|
+
risk: "high",
|
|
327
|
+
rules: {
|
|
328
|
+
changes: "Deletes the config file, or with --profile one profile, with the API keys stored there.",
|
|
329
|
+
visible_to: "Nobody else: the file stays on this machine.",
|
|
330
|
+
budget_rows: [],
|
|
331
|
+
retry: "Safe: with nothing left to remove it changes nothing.",
|
|
332
|
+
undo: "Cannot be undone: a removed key is gone; create a new one with `curviate setup`.",
|
|
333
|
+
blast_radius: "Every profile in the file, or the one named by --profile."
|
|
334
|
+
},
|
|
335
|
+
errors: { INVALID_REQUEST: "no profile has that name." },
|
|
336
|
+
seeAlso: ["curviate config list", "curviate setup"],
|
|
288
337
|
examples: [
|
|
289
338
|
"curviate config reset --profile work --yes",
|
|
290
339
|
"curviate config reset --yes"
|