@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PCZH5QJA.js";
|
|
5
5
|
import {
|
|
6
6
|
AttachError,
|
|
7
7
|
readAttachment,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import "./chunk-UEAX6KUB.js";
|
|
11
11
|
import {
|
|
12
12
|
requireAccount
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BLJGV6ST.js";
|
|
14
14
|
import {
|
|
15
15
|
buildPreviewOutput
|
|
16
16
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -27,18 +27,19 @@ import {
|
|
|
27
27
|
resolveEffectiveConfig,
|
|
28
28
|
streamAll,
|
|
29
29
|
writeNdjsonItem
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-B5NIX4G6.js";
|
|
31
31
|
import "./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
|
NON_STREAM_FLAGS,
|
|
38
38
|
WRITE_FLAGS,
|
|
39
39
|
WRITE_SINGLE_FLAGS,
|
|
40
|
+
readOnly,
|
|
40
41
|
resolveTextOrStdin
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
42
43
|
|
|
43
44
|
// src/commands/post.ts
|
|
44
45
|
import { defineCommand } from "citty";
|
|
@@ -49,12 +50,6 @@ function buildOutputStreams() {
|
|
|
49
50
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
function rejectPreviewOnRead(preview, out) {
|
|
53
|
-
if (preview) {
|
|
54
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
55
|
-
process.exit(2);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
53
|
function rejectAllOnNonPaginated(all, out) {
|
|
59
54
|
if (all) {
|
|
60
55
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
@@ -90,7 +85,6 @@ async function handleSdkError(err, outOpts, out) {
|
|
|
90
85
|
process.exit(1);
|
|
91
86
|
}
|
|
92
87
|
async function runPostGet(client, flags, out) {
|
|
93
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
94
88
|
rejectAllOnNonPaginated(flags.all, out);
|
|
95
89
|
const accountId = await requireAccount(client, flags, out);
|
|
96
90
|
const postId = flags.postId ?? "";
|
|
@@ -186,7 +180,6 @@ async function runPostReact(client, flags, out) {
|
|
|
186
180
|
}
|
|
187
181
|
}
|
|
188
182
|
async function runPostReactions(client, flags, out) {
|
|
189
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
190
183
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
191
184
|
const accountId = await requireAccount(client, flags, out);
|
|
192
185
|
const postId = flags.postId ?? "";
|
|
@@ -215,7 +208,6 @@ async function runPostReactions(client, flags, out) {
|
|
|
215
208
|
}
|
|
216
209
|
}
|
|
217
210
|
async function runPostSaved(client, flags, out) {
|
|
218
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
219
211
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
220
212
|
const accountId = await requireAccount(client, flags, out);
|
|
221
213
|
const ns = client.account(accountId);
|
|
@@ -323,7 +315,6 @@ async function runPostUnreact(client, flags, out) {
|
|
|
323
315
|
}
|
|
324
316
|
}
|
|
325
317
|
async function runPostUserPosts(client, flags, out) {
|
|
326
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
327
318
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
328
319
|
const accountId = await requireAccount(client, flags, out);
|
|
329
320
|
const ns = client.account(accountId);
|
|
@@ -358,7 +349,6 @@ async function runPostUserPosts(client, flags, out) {
|
|
|
358
349
|
}
|
|
359
350
|
}
|
|
360
351
|
async function runPostUserReactions(client, flags, out) {
|
|
361
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
362
352
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
363
353
|
const accountId = await requireAccount(client, flags, out);
|
|
364
354
|
const ns = client.account(accountId);
|
|
@@ -393,9 +383,16 @@ async function runPostUserReactions(client, flags, out) {
|
|
|
393
383
|
}
|
|
394
384
|
}
|
|
395
385
|
var postGetCommand = defineCommand({
|
|
396
|
-
meta: {
|
|
386
|
+
meta: {
|
|
387
|
+
name: "get",
|
|
388
|
+
description: "Get a post by id.",
|
|
389
|
+
examples: [
|
|
390
|
+
"curviate post get 7290000000000000000",
|
|
391
|
+
"curviate post get urn:li:activity:7290000000000000000"
|
|
392
|
+
]
|
|
393
|
+
},
|
|
397
394
|
args: {
|
|
398
|
-
...NON_STREAM_FLAGS,
|
|
395
|
+
...readOnly(NON_STREAM_FLAGS),
|
|
399
396
|
postId: {
|
|
400
397
|
type: "positional",
|
|
401
398
|
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id. To list comments on a post, use 'comment list <post_id>'."
|
|
@@ -420,7 +417,14 @@ var postGetCommand = defineCommand({
|
|
|
420
417
|
}
|
|
421
418
|
});
|
|
422
419
|
var postCreateCommand = defineCommand({
|
|
423
|
-
meta: {
|
|
420
|
+
meta: {
|
|
421
|
+
name: "create",
|
|
422
|
+
description: "Create a new post.",
|
|
423
|
+
examples: [
|
|
424
|
+
'curviate post create "We just shipped webhooks for inbox events."',
|
|
425
|
+
'curviate post create "Our latest product update." --attach screenshot.png'
|
|
426
|
+
]
|
|
427
|
+
},
|
|
424
428
|
args: {
|
|
425
429
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
426
430
|
...WRITE_FLAGS,
|
|
@@ -449,7 +453,14 @@ var postCreateCommand = defineCommand({
|
|
|
449
453
|
}
|
|
450
454
|
});
|
|
451
455
|
var postReactCommand = defineCommand({
|
|
452
|
-
meta: {
|
|
456
|
+
meta: {
|
|
457
|
+
name: "react",
|
|
458
|
+
description: "React to a post.",
|
|
459
|
+
examples: [
|
|
460
|
+
"curviate post react 7290000000000000000 like",
|
|
461
|
+
"curviate post react 7290000000000000000 celebrate --as-organization 1234567"
|
|
462
|
+
]
|
|
463
|
+
},
|
|
453
464
|
args: {
|
|
454
465
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
455
466
|
...WRITE_FLAGS,
|
|
@@ -491,9 +502,16 @@ var postReactCommand = defineCommand({
|
|
|
491
502
|
}
|
|
492
503
|
});
|
|
493
504
|
var postReactionsCommand = defineCommand({
|
|
494
|
-
meta: {
|
|
505
|
+
meta: {
|
|
506
|
+
name: "reactions",
|
|
507
|
+
description: "List reactions on a post.",
|
|
508
|
+
examples: [
|
|
509
|
+
"curviate post reactions 7290000000000000000",
|
|
510
|
+
"curviate post reactions 7290000000000000000 --all"
|
|
511
|
+
]
|
|
512
|
+
},
|
|
495
513
|
args: {
|
|
496
|
-
...GLOBAL_FLAGS,
|
|
514
|
+
...readOnly(GLOBAL_FLAGS),
|
|
497
515
|
postId: {
|
|
498
516
|
type: "positional",
|
|
499
517
|
description: "Numeric post id, urn:li:activity:N, or full LinkedIn share URL (activity-<N>- extracted). POSTID is always the post's id."
|
|
@@ -534,7 +552,13 @@ async function withClient(flags, fn) {
|
|
|
534
552
|
await fn(client, { ...flags, account: flags.account ?? cfg.account }, out);
|
|
535
553
|
}
|
|
536
554
|
var postDeleteCommand = defineCommand({
|
|
537
|
-
meta: {
|
|
555
|
+
meta: {
|
|
556
|
+
name: "delete",
|
|
557
|
+
description: "Delete a post you own.",
|
|
558
|
+
examples: [
|
|
559
|
+
"curviate post delete 7290000000000000000"
|
|
560
|
+
]
|
|
561
|
+
},
|
|
538
562
|
args: {
|
|
539
563
|
...WRITE_SINGLE_FLAGS,
|
|
540
564
|
postId: { type: "positional", description: "Post id, urn:li:activity:N, or full share URL." }
|
|
@@ -544,7 +568,13 @@ var postDeleteCommand = defineCommand({
|
|
|
544
568
|
}
|
|
545
569
|
});
|
|
546
570
|
var postUnreactCommand = defineCommand({
|
|
547
|
-
meta: {
|
|
571
|
+
meta: {
|
|
572
|
+
name: "unreact",
|
|
573
|
+
description: "Remove your reaction from a post.",
|
|
574
|
+
examples: [
|
|
575
|
+
"curviate post unreact 7290000000000000000 like"
|
|
576
|
+
]
|
|
577
|
+
},
|
|
548
578
|
args: {
|
|
549
579
|
...WRITE_SINGLE_FLAGS,
|
|
550
580
|
postId: { type: "positional", description: "Post id, urn:li:activity:N, or full share URL." },
|
|
@@ -555,14 +585,26 @@ var postUnreactCommand = defineCommand({
|
|
|
555
585
|
}
|
|
556
586
|
});
|
|
557
587
|
var postSavedCommand = defineCommand({
|
|
558
|
-
meta: {
|
|
559
|
-
|
|
588
|
+
meta: {
|
|
589
|
+
name: "saved",
|
|
590
|
+
description: "List your own saved posts (a private bookmark list, newest-saved-first). Each item is a preview (snippet capped at 140 chars).",
|
|
591
|
+
examples: [
|
|
592
|
+
"curviate post saved"
|
|
593
|
+
]
|
|
594
|
+
},
|
|
595
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
560
596
|
async run({ args }) {
|
|
561
597
|
await withClient(args, runPostSaved);
|
|
562
598
|
}
|
|
563
599
|
});
|
|
564
600
|
var postSaveCommand = defineCommand({
|
|
565
|
-
meta: {
|
|
601
|
+
meta: {
|
|
602
|
+
name: "save",
|
|
603
|
+
description: "Save a post to your private bookmark list. Never notifies the author, never visible to third parties. Saving a saved post changes nothing.",
|
|
604
|
+
examples: [
|
|
605
|
+
"curviate post save 7290000000000000000"
|
|
606
|
+
]
|
|
607
|
+
},
|
|
566
608
|
args: {
|
|
567
609
|
...WRITE_SINGLE_FLAGS,
|
|
568
610
|
postId: { type: "positional", description: "Post id (urn:li:activity:N or a bare numeric id)." }
|
|
@@ -572,7 +614,13 @@ var postSaveCommand = defineCommand({
|
|
|
572
614
|
}
|
|
573
615
|
});
|
|
574
616
|
var postUnsaveCommand = defineCommand({
|
|
575
|
-
meta: {
|
|
617
|
+
meta: {
|
|
618
|
+
name: "unsave",
|
|
619
|
+
description: "Remove a post from your saved-posts bookmark list. Unsaving a post that is not saved changes nothing.",
|
|
620
|
+
examples: [
|
|
621
|
+
"curviate post unsave 7290000000000000000"
|
|
622
|
+
]
|
|
623
|
+
},
|
|
576
624
|
args: {
|
|
577
625
|
...WRITE_SINGLE_FLAGS,
|
|
578
626
|
postId: { type: "positional", description: "Post id (urn:li:activity:N or a bare numeric id)." }
|
|
@@ -582,9 +630,16 @@ var postUnsaveCommand = defineCommand({
|
|
|
582
630
|
}
|
|
583
631
|
});
|
|
584
632
|
var postUserPostsCommand = defineCommand({
|
|
585
|
-
meta: {
|
|
633
|
+
meta: {
|
|
634
|
+
name: "user-posts",
|
|
635
|
+
description: "List a member's own posts (accepts 'me'). A very recent create/delete may take a few minutes to appear or clear here (LinkedIn-side indexing); `post get <post_id>` reflects it immediately.",
|
|
636
|
+
examples: [
|
|
637
|
+
"curviate post user-posts me",
|
|
638
|
+
"curviate post user-posts janesmith --limit 10"
|
|
639
|
+
]
|
|
640
|
+
},
|
|
586
641
|
args: {
|
|
587
|
-
...GLOBAL_FLAGS,
|
|
642
|
+
...readOnly(GLOBAL_FLAGS),
|
|
588
643
|
userId: { type: "positional", description: "Member identifier (URL, slug, provider id, or 'me')." }
|
|
589
644
|
},
|
|
590
645
|
async run({ args }) {
|
|
@@ -592,9 +647,16 @@ var postUserPostsCommand = defineCommand({
|
|
|
592
647
|
}
|
|
593
648
|
});
|
|
594
649
|
var postUserReactionsCommand = defineCommand({
|
|
595
|
-
meta: {
|
|
650
|
+
meta: {
|
|
651
|
+
name: "user-reactions",
|
|
652
|
+
description: "List a member's own reactions (accepts 'me'). Items carry no time of the reaction: `parent_post.created_at` is when the post was created, not when it was reacted to, so the listing cannot be filtered by date; without `--all`, `--limit` caps the read at one page.",
|
|
653
|
+
examples: [
|
|
654
|
+
"curviate post user-reactions me",
|
|
655
|
+
"curviate post user-reactions me --all"
|
|
656
|
+
]
|
|
657
|
+
},
|
|
596
658
|
args: {
|
|
597
|
-
...GLOBAL_FLAGS,
|
|
659
|
+
...readOnly(GLOBAL_FLAGS),
|
|
598
660
|
userId: { type: "positional", description: "Member identifier (URL, slug, provider id, or 'me')." }
|
|
599
661
|
},
|
|
600
662
|
async run({ args }) {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
resolveMemberOrMeProviderId,
|
|
15
15
|
resolveMemberProviderId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PCZH5QJA.js";
|
|
17
17
|
import {
|
|
18
18
|
AttachError,
|
|
19
19
|
readAttachment,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-UEAX6KUB.js";
|
|
25
25
|
import {
|
|
26
26
|
requireAccount
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BLJGV6ST.js";
|
|
28
28
|
import {
|
|
29
29
|
buildPreviewOutput
|
|
30
30
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -42,26 +42,21 @@ import {
|
|
|
42
42
|
resolveEffectiveConfig,
|
|
43
43
|
streamAll,
|
|
44
44
|
writeNdjsonItem
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-B5NIX4G6.js";
|
|
46
46
|
import "./chunk-XZJQQJBE.js";
|
|
47
47
|
import {
|
|
48
48
|
createClient
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-UJOTQPL6.js";
|
|
50
50
|
import {
|
|
51
51
|
GLOBAL_FLAGS,
|
|
52
52
|
NON_STREAM_FLAGS,
|
|
53
53
|
READ_SINGLE_FLAGS,
|
|
54
|
-
WRITE_SINGLE_FLAGS
|
|
55
|
-
|
|
54
|
+
WRITE_SINGLE_FLAGS,
|
|
55
|
+
readOnly
|
|
56
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
56
57
|
|
|
57
58
|
// src/commands/profile.ts
|
|
58
59
|
import { defineCommand } from "citty";
|
|
59
|
-
function rejectPreviewOnRead(preview, out) {
|
|
60
|
-
if (preview) {
|
|
61
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
62
|
-
process.exit(2);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
60
|
function rejectAllOnNonPaginated(all, out) {
|
|
66
61
|
if (all) {
|
|
67
62
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
@@ -99,7 +94,6 @@ function resolveOutputOpts(flags) {
|
|
|
99
94
|
};
|
|
100
95
|
}
|
|
101
96
|
async function runProfileMe(client, flags, out) {
|
|
102
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
103
97
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
104
98
|
const hasActivityFlag = !!(flags.posts || flags.comments || flags.reactions || flags.followers);
|
|
105
99
|
if (!hasActivityFlag) {
|
|
@@ -223,7 +217,6 @@ async function runProfileMe(client, flags, out) {
|
|
|
223
217
|
}
|
|
224
218
|
}
|
|
225
219
|
async function runProfileGet(client, flags, out) {
|
|
226
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
227
220
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
228
221
|
const isListCommand = flags.posts || flags.comments || flags.reactions || flags.followers;
|
|
229
222
|
if (!isListCommand && flags.sections === "") {
|
|
@@ -356,7 +349,6 @@ async function runProfileGet(client, flags, out) {
|
|
|
356
349
|
}
|
|
357
350
|
}
|
|
358
351
|
async function runProfileRelations(client, flags, out) {
|
|
359
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
360
352
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
361
353
|
const accountId = await requireAccount(client, flags, out);
|
|
362
354
|
const ns = client.account(accountId);
|
|
@@ -434,7 +426,6 @@ async function handleSdkError(err, outOpts, out) {
|
|
|
434
426
|
process.exit(1);
|
|
435
427
|
}
|
|
436
428
|
async function runProfileSubscription(client, flags, out) {
|
|
437
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
438
429
|
rejectAllOnNonPaginated(flags.all, out);
|
|
439
430
|
const accountId = await requireAccount(client, flags, out);
|
|
440
431
|
const ns = client.account(accountId);
|
|
@@ -448,7 +439,6 @@ async function runProfileSubscription(client, flags, out) {
|
|
|
448
439
|
}
|
|
449
440
|
}
|
|
450
441
|
async function runProfileAnalytics(client, flags, out) {
|
|
451
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
452
442
|
rejectAllOnNonPaginated(flags.all, out);
|
|
453
443
|
const accountId = await requireAccount(client, flags, out);
|
|
454
444
|
const ns = client.account(accountId);
|
|
@@ -462,7 +452,6 @@ async function runProfileAnalytics(client, flags, out) {
|
|
|
462
452
|
}
|
|
463
453
|
}
|
|
464
454
|
async function runProfileVisitors(client, flags, out) {
|
|
465
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
466
455
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
467
456
|
const accountId = await requireAccount(client, flags, out);
|
|
468
457
|
const ns = client.account(accountId);
|
|
@@ -494,7 +483,6 @@ async function runProfileVisitors(client, flags, out) {
|
|
|
494
483
|
}
|
|
495
484
|
}
|
|
496
485
|
async function runProfileSsi(client, flags, out) {
|
|
497
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
498
486
|
rejectAllOnNonPaginated(flags.all, out);
|
|
499
487
|
const accountId = await requireAccount(client, flags, out);
|
|
500
488
|
const ns = client.account(accountId);
|
|
@@ -602,7 +590,6 @@ async function runProfileUnfollow(client, flags, out) {
|
|
|
602
590
|
}
|
|
603
591
|
}
|
|
604
592
|
async function runProfileFollowers(client, flags, out) {
|
|
605
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
606
593
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
607
594
|
const accountId = await requireAccount(client, flags, out);
|
|
608
595
|
const resolvedId = resolveIdentifier(flags.id ?? "");
|
|
@@ -634,7 +621,6 @@ async function runProfileFollowers(client, flags, out) {
|
|
|
634
621
|
}
|
|
635
622
|
}
|
|
636
623
|
async function runProfileFollowing(client, flags, out) {
|
|
637
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
638
624
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
639
625
|
const accountId = await requireAccount(client, flags, out);
|
|
640
626
|
const resolvedId = resolveIdentifier(flags.id ?? "");
|
|
@@ -666,9 +652,19 @@ async function runProfileFollowing(client, flags, out) {
|
|
|
666
652
|
}
|
|
667
653
|
}
|
|
668
654
|
var profileMeCommand = defineCommand({
|
|
669
|
-
meta: {
|
|
655
|
+
meta: {
|
|
656
|
+
name: "me",
|
|
657
|
+
description: "Get your own profile, or list own activity with --posts/--comments/--reactions/--followers.",
|
|
658
|
+
examples: [
|
|
659
|
+
"curviate profile me",
|
|
660
|
+
"curviate profile me --posts"
|
|
661
|
+
],
|
|
662
|
+
requires: [
|
|
663
|
+
"--all, --max-pages and --page-delay only with a list flag: --posts, --comments, --reactions or --followers."
|
|
664
|
+
]
|
|
665
|
+
},
|
|
670
666
|
args: {
|
|
671
|
-
...GLOBAL_FLAGS,
|
|
667
|
+
...readOnly(GLOBAL_FLAGS),
|
|
672
668
|
...RETRIEVAL_FLAGS,
|
|
673
669
|
sections: {
|
|
674
670
|
type: "string",
|
|
@@ -714,8 +710,15 @@ var profileMeCommand = defineCommand({
|
|
|
714
710
|
}
|
|
715
711
|
});
|
|
716
712
|
var profileRelationsCommand = defineCommand({
|
|
717
|
-
meta: {
|
|
718
|
-
|
|
713
|
+
meta: {
|
|
714
|
+
name: "relations",
|
|
715
|
+
description: "List your 1st-degree connections.",
|
|
716
|
+
examples: [
|
|
717
|
+
"curviate profile relations",
|
|
718
|
+
"curviate profile relations --all"
|
|
719
|
+
]
|
|
720
|
+
},
|
|
721
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
719
722
|
async run({ args }) {
|
|
720
723
|
const flags = args;
|
|
721
724
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -735,7 +738,13 @@ var profileRelationsCommand = defineCommand({
|
|
|
735
738
|
}
|
|
736
739
|
});
|
|
737
740
|
var profileEndorseCommand = defineCommand({
|
|
738
|
-
meta: {
|
|
741
|
+
meta: {
|
|
742
|
+
name: "endorse",
|
|
743
|
+
description: "Endorse a skill on a member's profile.",
|
|
744
|
+
examples: [
|
|
745
|
+
"curviate profile endorse janesmith --endorsement-id 12345"
|
|
746
|
+
]
|
|
747
|
+
},
|
|
739
748
|
args: {
|
|
740
749
|
...NON_STREAM_FLAGS,
|
|
741
750
|
id: { type: "positional", description: "Member identifier (URL, slug, or provider id). A URL/slug is resolved to the provider id automatically (a slug is not accepted directly by the endorse endpoint)." },
|
|
@@ -780,7 +789,17 @@ async function withClient(flags, fn) {
|
|
|
780
789
|
await fn(client, { ...flags, account: flags.account ?? cfg.account }, out);
|
|
781
790
|
}
|
|
782
791
|
var profileUpdateCommand = defineCommand({
|
|
783
|
-
meta: {
|
|
792
|
+
meta: {
|
|
793
|
+
name: "update",
|
|
794
|
+
description: "Update your own profile (headline, bio, name, skills, photos).",
|
|
795
|
+
examples: [
|
|
796
|
+
'curviate profile update --headline "Building agent infrastructure"',
|
|
797
|
+
'curviate profile update --skills "TypeScript,Agents"'
|
|
798
|
+
],
|
|
799
|
+
requires: [
|
|
800
|
+
"At least one of --first-name, --last-name, --headline, --bio, --skills, --picture, --background-picture."
|
|
801
|
+
]
|
|
802
|
+
},
|
|
784
803
|
args: {
|
|
785
804
|
...WRITE_SINGLE_FLAGS,
|
|
786
805
|
headline: { type: "string", description: "New headline." },
|
|
@@ -796,7 +815,13 @@ var profileUpdateCommand = defineCommand({
|
|
|
796
815
|
}
|
|
797
816
|
});
|
|
798
817
|
var profileFollowCommand = defineCommand({
|
|
799
|
-
meta: {
|
|
818
|
+
meta: {
|
|
819
|
+
name: "follow",
|
|
820
|
+
description: "Follow a member (sends a connect request if their profile is private).",
|
|
821
|
+
examples: [
|
|
822
|
+
"curviate profile follow janesmith"
|
|
823
|
+
]
|
|
824
|
+
},
|
|
800
825
|
args: {
|
|
801
826
|
...WRITE_SINGLE_FLAGS,
|
|
802
827
|
id: { type: "positional", description: "Member identifier (URL, slug, provider id)." }
|
|
@@ -806,7 +831,13 @@ var profileFollowCommand = defineCommand({
|
|
|
806
831
|
}
|
|
807
832
|
});
|
|
808
833
|
var profileUnfollowCommand = defineCommand({
|
|
809
|
-
meta: {
|
|
834
|
+
meta: {
|
|
835
|
+
name: "unfollow",
|
|
836
|
+
description: "Unfollow a member. Unfollowing someone you do not follow changes nothing.",
|
|
837
|
+
examples: [
|
|
838
|
+
"curviate profile unfollow janesmith"
|
|
839
|
+
]
|
|
840
|
+
},
|
|
810
841
|
args: {
|
|
811
842
|
...WRITE_SINGLE_FLAGS,
|
|
812
843
|
id: { type: "positional", description: "Member identifier (URL, slug, provider id)." }
|
|
@@ -816,9 +847,16 @@ var profileUnfollowCommand = defineCommand({
|
|
|
816
847
|
}
|
|
817
848
|
});
|
|
818
849
|
var profileFollowersCommand = defineCommand({
|
|
819
|
-
meta: {
|
|
850
|
+
meta: {
|
|
851
|
+
name: "followers",
|
|
852
|
+
description: "List a member's followers (accepts 'me').",
|
|
853
|
+
examples: [
|
|
854
|
+
"curviate profile followers me",
|
|
855
|
+
"curviate profile followers janesmith --limit 20"
|
|
856
|
+
]
|
|
857
|
+
},
|
|
820
858
|
args: {
|
|
821
|
-
...GLOBAL_FLAGS,
|
|
859
|
+
...readOnly(GLOBAL_FLAGS),
|
|
822
860
|
id: { type: "positional", description: "Member identifier (URL, slug, provider id, or 'me')." }
|
|
823
861
|
},
|
|
824
862
|
async run({ args }) {
|
|
@@ -826,9 +864,16 @@ var profileFollowersCommand = defineCommand({
|
|
|
826
864
|
}
|
|
827
865
|
});
|
|
828
866
|
var profileFollowingCommand = defineCommand({
|
|
829
|
-
meta: {
|
|
867
|
+
meta: {
|
|
868
|
+
name: "following",
|
|
869
|
+
description: "List who a member follows (accepts 'me').",
|
|
870
|
+
examples: [
|
|
871
|
+
"curviate profile following me",
|
|
872
|
+
"curviate profile following me --all"
|
|
873
|
+
]
|
|
874
|
+
},
|
|
830
875
|
args: {
|
|
831
|
-
...GLOBAL_FLAGS,
|
|
876
|
+
...readOnly(GLOBAL_FLAGS),
|
|
832
877
|
id: { type: "positional", description: "Member identifier (URL, slug, provider id, or 'me')." }
|
|
833
878
|
},
|
|
834
879
|
async run({ args }) {
|
|
@@ -836,37 +881,73 @@ var profileFollowingCommand = defineCommand({
|
|
|
836
881
|
}
|
|
837
882
|
});
|
|
838
883
|
var profileSubscriptionCommand = defineCommand({
|
|
839
|
-
meta: {
|
|
840
|
-
|
|
884
|
+
meta: {
|
|
885
|
+
name: "subscription",
|
|
886
|
+
description: "Read your premium subscription: entitlements, primary plan, and LinkedIn management links. A free account is a valid result (has_premium:false).",
|
|
887
|
+
examples: [
|
|
888
|
+
"curviate profile subscription"
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
841
892
|
async run({ args }) {
|
|
842
893
|
await withClient(args, runProfileSubscription);
|
|
843
894
|
}
|
|
844
895
|
});
|
|
845
896
|
var profileAnalyticsCommand = defineCommand({
|
|
846
|
-
meta: {
|
|
847
|
-
|
|
897
|
+
meta: {
|
|
898
|
+
name: "analytics",
|
|
899
|
+
description: "Read your performance headline metrics: profile viewers, followers, post impressions, and search appearances (fixed LinkedIn reporting windows, no window selector).",
|
|
900
|
+
examples: [
|
|
901
|
+
"curviate profile analytics"
|
|
902
|
+
]
|
|
903
|
+
},
|
|
904
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
848
905
|
async run({ args }) {
|
|
849
906
|
await withClient(args, runProfileAnalytics);
|
|
850
907
|
}
|
|
851
908
|
});
|
|
852
909
|
var profileVisitorsCommand = defineCommand({
|
|
853
|
-
meta: {
|
|
854
|
-
|
|
910
|
+
meta: {
|
|
911
|
+
name: "visitors",
|
|
912
|
+
description: "List people who recently viewed your profile, classified by disclosure fidelity (identified, semi-anonymous, or aggregate; Premium sees more identified viewers).",
|
|
913
|
+
examples: [
|
|
914
|
+
"curviate profile visitors",
|
|
915
|
+
"curviate profile visitors --limit 20"
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
855
919
|
async run({ args }) {
|
|
856
920
|
await withClient(args, runProfileVisitors);
|
|
857
921
|
}
|
|
858
922
|
});
|
|
859
923
|
var profileSsiCommand = defineCommand({
|
|
860
|
-
meta: {
|
|
861
|
-
|
|
924
|
+
meta: {
|
|
925
|
+
name: "ssi",
|
|
926
|
+
description: "Read your Social Selling Index: the overall score, its four pillar breakdowns, and industry/network percentile ranks.",
|
|
927
|
+
examples: [
|
|
928
|
+
"curviate profile ssi"
|
|
929
|
+
]
|
|
930
|
+
},
|
|
931
|
+
args: { ...readOnly(READ_SINGLE_FLAGS) },
|
|
862
932
|
async run({ args }) {
|
|
863
933
|
await withClient(args, runProfileSsi);
|
|
864
934
|
}
|
|
865
935
|
});
|
|
866
936
|
var profileCommand = defineCommand({
|
|
867
|
-
meta: {
|
|
937
|
+
meta: {
|
|
938
|
+
name: "profile",
|
|
939
|
+
description: "LinkedIn profile operations.",
|
|
940
|
+
examples: [
|
|
941
|
+
"curviate profile janesmith",
|
|
942
|
+
"curviate profile https://www.linkedin.com/in/janesmith --posts",
|
|
943
|
+
"curviate profile janesmith --sections experience,skills"
|
|
944
|
+
],
|
|
945
|
+
requires: [
|
|
946
|
+
"--all, --max-pages and --page-delay only with a list flag: --posts, --comments, --reactions or --followers."
|
|
947
|
+
]
|
|
948
|
+
},
|
|
868
949
|
args: {
|
|
869
|
-
...GLOBAL_FLAGS,
|
|
950
|
+
...readOnly(GLOBAL_FLAGS),
|
|
870
951
|
id: { type: "positional", description: "Member identifier (URL, slug, or URN). Optional for subcommands.", required: false },
|
|
871
952
|
posts: { type: "boolean", description: "List the profile's posts.", default: false },
|
|
872
953
|
comments: { type: "boolean", description: "List the profile's comments.", default: false },
|