@curviate/cli 0.41.0 → 0.43.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 +70 -0
- package/dist/{account-QZ5RYKIT.js → account-FDPUPVFB.js} +118 -29
- package/dist/{chunk-CBHL3QQJ.js → chunk-B5NIX4G6.js} +1 -1
- package/dist/{chunk-BLFGJIJJ.js → chunk-BLJGV6ST.js} +2 -2
- package/dist/{chunk-XP2LN6F6.js → chunk-EGDDVF3Q.js} +3 -1
- 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-2WKYM34T.js} +101 -51
- package/dist/{config-RUBXWFQ3.js → config-K4G3VSBA.js} +44 -9
- package/dist/{connect-TTA2X3KO.js → connect-GHABKXB2.js} +45 -22
- 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-OJB4VSI2.js} +109 -35
- 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-BHZPRUFU.js} +125 -44
- package/dist/{recruiter-OBKS4ZVL.js → recruiter-JUA4BZIC.js} +211 -68
- package/dist/{sales-nav-WPTMS6QF.js → sales-nav-77NP3UXV.js} +100 -42
- package/dist/{search-YAKZKK74.js → search-3MRQE6VC.js} +81 -40
- package/dist/{setup-NZQUWJYC.js → setup-BPNLAHPC.js} +9 -4
- package/dist/{webhook-PXSLDB2F.js → webhook-TOQUQPT4.js} +79 -31
- package/package.json +3 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
slimJob
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EGDDVF3Q.js";
|
|
5
5
|
import {
|
|
6
6
|
BinaryOutputError,
|
|
7
7
|
writeBinaryOutput
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-UEAX6KUB.js";
|
|
12
12
|
import {
|
|
13
13
|
requireAccount
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BLJGV6ST.js";
|
|
15
15
|
import {
|
|
16
16
|
buildPreviewOutput
|
|
17
17
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -30,17 +30,18 @@ import {
|
|
|
30
30
|
resolveEffectiveConfig,
|
|
31
31
|
streamAll,
|
|
32
32
|
writeNdjsonItem
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-B5NIX4G6.js";
|
|
34
34
|
import "./chunk-XZJQQJBE.js";
|
|
35
35
|
import {
|
|
36
36
|
createClient,
|
|
37
37
|
downloadBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-UJOTQPL6.js";
|
|
39
39
|
import {
|
|
40
40
|
GLOBAL_FLAGS,
|
|
41
41
|
READ_SINGLE_FLAGS,
|
|
42
|
-
WRITE_SINGLE_FLAGS
|
|
43
|
-
|
|
42
|
+
WRITE_SINGLE_FLAGS,
|
|
43
|
+
readOnly
|
|
44
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
44
45
|
|
|
45
46
|
// src/commands/job.ts
|
|
46
47
|
import { defineCommand } from "citty";
|
|
@@ -70,12 +71,6 @@ function buildOutputStreams() {
|
|
|
70
71
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
function rejectPreviewOnRead(preview, out) {
|
|
74
|
-
if (preview) {
|
|
75
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
76
|
-
process.exit(2);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
74
|
function resolveOutputOpts(flags) {
|
|
80
75
|
return {
|
|
81
76
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -125,7 +120,6 @@ function buildApplyMethod(flags, out) {
|
|
|
125
120
|
return { method, website_url: url };
|
|
126
121
|
}
|
|
127
122
|
async function runJobGet(client, flags, out) {
|
|
128
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
129
123
|
const accountId = await requireAccount(client, flags, out);
|
|
130
124
|
const resolvedId = resolveJobIdentifier(flags.id ?? "");
|
|
131
125
|
const ns = client.account(accountId);
|
|
@@ -139,7 +133,6 @@ async function runJobGet(client, flags, out) {
|
|
|
139
133
|
}
|
|
140
134
|
}
|
|
141
135
|
async function runJobList(client, flags, out) {
|
|
142
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
143
136
|
const state = requireFlag(flags.state, "--state", out);
|
|
144
137
|
if (state === "ALL") {
|
|
145
138
|
if (!flags.all && flags["max-pages"] !== void 0) {
|
|
@@ -257,7 +250,6 @@ async function runJobListAllStates(ns, flags, out, outOpts, opts) {
|
|
|
257
250
|
}
|
|
258
251
|
}
|
|
259
252
|
async function runJobBudget(client, flags, out) {
|
|
260
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
261
253
|
const accountId = await requireAccount(client, flags, out);
|
|
262
254
|
const jobId = resolveJobIdentifier(flags.id ?? "");
|
|
263
255
|
const ns = client.account(accountId);
|
|
@@ -271,7 +263,6 @@ async function runJobBudget(client, flags, out) {
|
|
|
271
263
|
}
|
|
272
264
|
}
|
|
273
265
|
async function runJobApplicants(client, flags, out) {
|
|
274
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
275
266
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
276
267
|
const accountId = await requireAccount(client, flags, out);
|
|
277
268
|
const jobId = resolveJobIdentifier(flags.id ?? "");
|
|
@@ -308,7 +299,6 @@ async function runJobApplicants(client, flags, out) {
|
|
|
308
299
|
}
|
|
309
300
|
}
|
|
310
301
|
async function runJobApplicantGet(client, flags, out) {
|
|
311
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
312
302
|
const accountId = await requireAccount(client, flags, out);
|
|
313
303
|
const jobId = resolveJobIdentifier(flags.id ?? "");
|
|
314
304
|
const applicantId = flags.applicantId ?? "";
|
|
@@ -323,7 +313,6 @@ async function runJobApplicantGet(client, flags, out) {
|
|
|
323
313
|
}
|
|
324
314
|
}
|
|
325
315
|
async function runJobApplicantResume(client, flags, out, isTTY) {
|
|
326
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
327
316
|
const accountId = await requireAccount(client, flags, out);
|
|
328
317
|
const jobId = resolveJobIdentifier(flags.id ?? "");
|
|
329
318
|
const applicantId = flags.applicantId ?? "";
|
|
@@ -498,9 +487,16 @@ var JOB_BODY_FLAGS = {
|
|
|
498
487
|
skills: { type: "string", description: "Comma-separated skill parameter ids (optional)." }
|
|
499
488
|
};
|
|
500
489
|
var jobGetCommand = defineCommand({
|
|
501
|
-
meta: {
|
|
490
|
+
meta: {
|
|
491
|
+
name: "get",
|
|
492
|
+
description: "Retrieve one public LinkedIn job posting's full detail.",
|
|
493
|
+
examples: [
|
|
494
|
+
"curviate job get 4100000000",
|
|
495
|
+
"curviate job get https://www.linkedin.com/jobs/view/4100000000"
|
|
496
|
+
]
|
|
497
|
+
},
|
|
502
498
|
args: {
|
|
503
|
-
...READ_SINGLE_FLAGS,
|
|
499
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
504
500
|
id: { type: "positional", description: "Job URL or a bare numeric job id." }
|
|
505
501
|
},
|
|
506
502
|
async run({ args }) {
|
|
@@ -508,9 +504,19 @@ var jobGetCommand = defineCommand({
|
|
|
508
504
|
}
|
|
509
505
|
});
|
|
510
506
|
var jobListCommand = defineCommand({
|
|
511
|
-
meta: {
|
|
507
|
+
meta: {
|
|
508
|
+
name: "list",
|
|
509
|
+
description: "List your own classic job postings by state.",
|
|
510
|
+
examples: [
|
|
511
|
+
"curviate job list --state OPEN",
|
|
512
|
+
"curviate job list --state DRAFT --all"
|
|
513
|
+
],
|
|
514
|
+
requires: [
|
|
515
|
+
"--max-pages and --page-delay only with --all."
|
|
516
|
+
]
|
|
517
|
+
},
|
|
512
518
|
args: {
|
|
513
|
-
...GLOBAL_FLAGS,
|
|
519
|
+
...readOnly(GLOBAL_FLAGS),
|
|
514
520
|
state: { type: "string", description: "Filter by state (required): DRAFT|OPEN|CLOSED|REVIEW|SUSPENDED, or ALL for a best-effort client-side union across every state (each state queried, re-filtered, merged and de-duplicated by id; no unified cursor). Best-effort on LinkedIn's side -- verify item.state. The CLI re-filters returned items against their own state (dropped items are noted on stderr), but the upstream page walk itself is unfiltered, so --all may fetch more pages than the filtered item count implies.", required: true }
|
|
515
521
|
},
|
|
516
522
|
async run({ args }) {
|
|
@@ -518,17 +524,45 @@ var jobListCommand = defineCommand({
|
|
|
518
524
|
}
|
|
519
525
|
});
|
|
520
526
|
var jobCreateCommand = defineCommand({
|
|
521
|
-
meta: {
|
|
527
|
+
meta: {
|
|
528
|
+
name: "create",
|
|
529
|
+
description: "Create a classic job-posting draft (never publishes, never spends).",
|
|
530
|
+
examples: [
|
|
531
|
+
'curviate job create --job-title "Staff Engineer" --company "Acme" --workplace-type REMOTE --location 106967730 --employment-status FULL_TIME --apply-method external --website-url https://acme.example/jobs/1 --description "$(cat description.txt)"'
|
|
532
|
+
],
|
|
533
|
+
requires: [
|
|
534
|
+
"--job-title or --job-title-id.",
|
|
535
|
+
"--company or --company-id.",
|
|
536
|
+
"--notification-email with --apply-method linkedin; --website-url with --apply-method external."
|
|
537
|
+
]
|
|
538
|
+
},
|
|
522
539
|
args: {
|
|
523
540
|
...WRITE_SINGLE_FLAGS,
|
|
524
|
-
...JOB_BODY_FLAGS
|
|
541
|
+
...JOB_BODY_FLAGS,
|
|
542
|
+
// Required on create (update takes any subset). The declaration is what
|
|
543
|
+
// the parser enforces and what --help and the docs print.
|
|
544
|
+
"workplace-type": { ...JOB_BODY_FLAGS["workplace-type"], required: true },
|
|
545
|
+
location: { ...JOB_BODY_FLAGS.location, required: true },
|
|
546
|
+
"employment-status": { ...JOB_BODY_FLAGS["employment-status"], required: true },
|
|
547
|
+
description: { ...JOB_BODY_FLAGS.description, required: true },
|
|
548
|
+
"apply-method": { ...JOB_BODY_FLAGS["apply-method"], required: true }
|
|
525
549
|
},
|
|
526
550
|
async run({ args }) {
|
|
527
551
|
await withClient(args, runJobCreate);
|
|
528
552
|
}
|
|
529
553
|
});
|
|
530
554
|
var jobUpdateCommand = defineCommand({
|
|
531
|
-
meta: {
|
|
555
|
+
meta: {
|
|
556
|
+
name: "update",
|
|
557
|
+
description: "Apply a partial update to a job posting you own.",
|
|
558
|
+
examples: [
|
|
559
|
+
"curviate job update 4100000000 --workplace-type HYBRID",
|
|
560
|
+
'curviate job update 4100000000 --description "$(cat description.txt)"'
|
|
561
|
+
],
|
|
562
|
+
requires: [
|
|
563
|
+
"--notification-email with --apply-method linkedin; --website-url with --apply-method external."
|
|
564
|
+
]
|
|
565
|
+
},
|
|
532
566
|
args: {
|
|
533
567
|
...WRITE_SINGLE_FLAGS,
|
|
534
568
|
id: { type: "positional", description: "Job id to update." },
|
|
@@ -539,9 +573,15 @@ var jobUpdateCommand = defineCommand({
|
|
|
539
573
|
}
|
|
540
574
|
});
|
|
541
575
|
var jobBudgetCommand = defineCommand({
|
|
542
|
-
meta: {
|
|
576
|
+
meta: {
|
|
577
|
+
name: "budget",
|
|
578
|
+
description: "Price a publish before committing any money.",
|
|
579
|
+
examples: [
|
|
580
|
+
"curviate job budget 4100000000"
|
|
581
|
+
]
|
|
582
|
+
},
|
|
543
583
|
args: {
|
|
544
|
-
...READ_SINGLE_FLAGS,
|
|
584
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
545
585
|
id: { type: "positional", description: "Job id to price." }
|
|
546
586
|
},
|
|
547
587
|
async run({ args }) {
|
|
@@ -549,7 +589,16 @@ var jobBudgetCommand = defineCommand({
|
|
|
549
589
|
}
|
|
550
590
|
});
|
|
551
591
|
var jobPublishCommand = defineCommand({
|
|
552
|
-
meta: {
|
|
592
|
+
meta: {
|
|
593
|
+
name: "publish",
|
|
594
|
+
description: "Publish a draft. PROMOTED/PROMOTED_PLUS spend real money and require --budget-amount, --budget-currency, and --budget-scope.",
|
|
595
|
+
examples: [
|
|
596
|
+
"curviate job publish 4100000000 --mode FREE"
|
|
597
|
+
],
|
|
598
|
+
requires: [
|
|
599
|
+
"--budget-currency, --budget-amount and --budget-scope with --mode PROMOTED or PROMOTED_PLUS."
|
|
600
|
+
]
|
|
601
|
+
},
|
|
553
602
|
args: {
|
|
554
603
|
...WRITE_SINGLE_FLAGS,
|
|
555
604
|
id: { type: "positional", description: "Job id to publish." },
|
|
@@ -563,7 +612,13 @@ var jobPublishCommand = defineCommand({
|
|
|
563
612
|
}
|
|
564
613
|
});
|
|
565
614
|
var jobCloseCommand = defineCommand({
|
|
566
|
-
meta: {
|
|
615
|
+
meta: {
|
|
616
|
+
name: "close",
|
|
617
|
+
description: "Stop a posting from accepting applications (irreversible once LISTED).",
|
|
618
|
+
examples: [
|
|
619
|
+
"curviate job close 4100000000"
|
|
620
|
+
]
|
|
621
|
+
},
|
|
567
622
|
args: {
|
|
568
623
|
...WRITE_SINGLE_FLAGS,
|
|
569
624
|
id: { type: "positional", description: "Job id to close." }
|
|
@@ -573,9 +628,16 @@ var jobCloseCommand = defineCommand({
|
|
|
573
628
|
}
|
|
574
629
|
});
|
|
575
630
|
var jobApplicantsCommand = defineCommand({
|
|
576
|
-
meta: {
|
|
631
|
+
meta: {
|
|
632
|
+
name: "applicants",
|
|
633
|
+
description: "List applicants to a posting you own (POST-as-search).",
|
|
634
|
+
examples: [
|
|
635
|
+
"curviate job applicants 4100000000",
|
|
636
|
+
"curviate job applicants 4100000000 --ratings GOOD_FIT,MAYBE"
|
|
637
|
+
]
|
|
638
|
+
},
|
|
577
639
|
args: {
|
|
578
|
-
...GLOBAL_FLAGS,
|
|
640
|
+
...readOnly(GLOBAL_FLAGS),
|
|
579
641
|
id: { type: "positional", description: "Job id to list applicants for." },
|
|
580
642
|
ratings: { type: "string", description: "Comma-separated rating filter: UNRATED|NOT_A_FIT|MAYBE|GOOD_FIT. Omit for the full funnel." }
|
|
581
643
|
},
|
|
@@ -584,9 +646,15 @@ var jobApplicantsCommand = defineCommand({
|
|
|
584
646
|
}
|
|
585
647
|
});
|
|
586
648
|
var jobApplicantGetCommand = defineCommand({
|
|
587
|
-
meta: {
|
|
649
|
+
meta: {
|
|
650
|
+
name: "get",
|
|
651
|
+
description: "Get one applicant's full detail, including contact info.",
|
|
652
|
+
examples: [
|
|
653
|
+
"curviate job applicant get 4100000000 APPLICANT_ID"
|
|
654
|
+
]
|
|
655
|
+
},
|
|
588
656
|
args: {
|
|
589
|
-
...READ_SINGLE_FLAGS,
|
|
657
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
590
658
|
id: { type: "positional", description: "Job id the applicant applied to." },
|
|
591
659
|
applicantId: { type: "positional", description: "Applicant id." }
|
|
592
660
|
},
|
|
@@ -595,9 +663,15 @@ var jobApplicantGetCommand = defineCommand({
|
|
|
595
663
|
}
|
|
596
664
|
});
|
|
597
665
|
var jobApplicantResumeCommand = defineCommand({
|
|
598
|
-
meta: {
|
|
666
|
+
meta: {
|
|
667
|
+
name: "resume",
|
|
668
|
+
description: "Download an applicant's r\xE9sum\xE9 (binary).",
|
|
669
|
+
examples: [
|
|
670
|
+
"curviate job applicant resume 4100000000 APPLICANT_ID -o resume.pdf"
|
|
671
|
+
]
|
|
672
|
+
},
|
|
599
673
|
args: {
|
|
600
|
-
...READ_SINGLE_FLAGS,
|
|
674
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
601
675
|
id: { type: "positional", description: "Job id the applicant applied to." },
|
|
602
676
|
applicantId: { type: "positional", description: "Applicant id." },
|
|
603
677
|
output: { type: "string", alias: "o", description: "Path to write the r\xE9sum\xE9 file to." }
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
baseUrlProblem,
|
|
7
7
|
writeProfile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UJOTQPL6.js";
|
|
9
9
|
import {
|
|
10
10
|
GLOBAL_FLAGS,
|
|
11
11
|
defaultReadStdin,
|
|
12
12
|
resolveTextOrStdin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
14
14
|
|
|
15
15
|
// src/commands/login.ts
|
|
16
16
|
import { defineCommand } from "citty";
|
|
@@ -49,7 +49,11 @@ async function runLogin(args, out) {
|
|
|
49
49
|
var loginCommand = defineCommand({
|
|
50
50
|
meta: {
|
|
51
51
|
name: "login",
|
|
52
|
-
description: "Save an API key to a local profile. Run `curviate profile me` to verify."
|
|
52
|
+
description: "Save an API key to a local profile. Run `curviate profile me` to verify.",
|
|
53
|
+
examples: [
|
|
54
|
+
"curviate login",
|
|
55
|
+
"curviate login --api-key - --profile work"
|
|
56
|
+
]
|
|
53
57
|
},
|
|
54
58
|
// Only what login acts on: it makes no request, so pagination, projection,
|
|
55
59
|
// preview and transport flags would be accepted and do nothing. `--json` is
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
runMessageSend,
|
|
14
14
|
sentAsNotice,
|
|
15
15
|
willSendAsNotice
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OUMMWC7G.js";
|
|
17
17
|
import "./chunk-UWO2D4HW.js";
|
|
18
18
|
import "./chunk-HOQ7EUHJ.js";
|
|
19
19
|
import "./chunk-BGZW6B7G.js";
|
|
20
20
|
import "./chunk-UEAX6KUB.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-BLJGV6ST.js";
|
|
22
22
|
import "./chunk-TCUYH5GO.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-B5NIX4G6.js";
|
|
24
24
|
import "./chunk-XZJQQJBE.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-UJOTQPL6.js";
|
|
26
|
+
import "./chunk-TC4ZPUWI.js";
|
|
27
27
|
export {
|
|
28
28
|
guardBareMessageForm,
|
|
29
29
|
messageCommand,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
requireAccount
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BLJGV6ST.js";
|
|
5
5
|
import {
|
|
6
6
|
buildPreviewOutput
|
|
7
7
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -17,15 +17,16 @@ import {
|
|
|
17
17
|
resolveEffectiveConfig,
|
|
18
18
|
streamAll,
|
|
19
19
|
writeNdjsonItem
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-B5NIX4G6.js";
|
|
21
21
|
import "./chunk-XZJQQJBE.js";
|
|
22
22
|
import {
|
|
23
23
|
createClient
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-UJOTQPL6.js";
|
|
25
25
|
import {
|
|
26
26
|
GLOBAL_FLAGS,
|
|
27
|
-
WRITE_SINGLE_FLAGS
|
|
28
|
-
|
|
27
|
+
WRITE_SINGLE_FLAGS,
|
|
28
|
+
readOnly
|
|
29
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
29
30
|
|
|
30
31
|
// src/commands/notification.ts
|
|
31
32
|
import { defineCommand } from "citty";
|
|
@@ -35,12 +36,6 @@ function buildOutputStreams() {
|
|
|
35
36
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
|
-
function rejectPreviewOnRead(preview, out) {
|
|
39
|
-
if (preview) {
|
|
40
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
41
|
-
process.exit(2);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
39
|
function resolveOutputOpts(flags) {
|
|
45
40
|
return {
|
|
46
41
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -60,7 +55,6 @@ async function handleSdkError(err, outOpts, out) {
|
|
|
60
55
|
process.exit(1);
|
|
61
56
|
}
|
|
62
57
|
async function runNotificationList(client, flags, out) {
|
|
63
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
64
58
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
65
59
|
const accountId = await requireAccount(client, flags, out);
|
|
66
60
|
const ns = client.account(accountId);
|
|
@@ -126,9 +120,16 @@ async function runNotificationShowLess(client, flags, out) {
|
|
|
126
120
|
}
|
|
127
121
|
}
|
|
128
122
|
var notificationListCommand = defineCommand({
|
|
129
|
-
meta: {
|
|
123
|
+
meta: {
|
|
124
|
+
name: "list",
|
|
125
|
+
description: "List the connected account's notification cards, newest first, plus the unread badge and a poll watermark.",
|
|
126
|
+
examples: [
|
|
127
|
+
"curviate notification list",
|
|
128
|
+
"curviate notification list --filter mentions"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
130
131
|
args: {
|
|
131
|
-
...GLOBAL_FLAGS,
|
|
132
|
+
...readOnly(GLOBAL_FLAGS),
|
|
132
133
|
filter: {
|
|
133
134
|
type: "string",
|
|
134
135
|
description: "Which notification stream to read (default all): all | jobs | mentions | my_posts | my_posts_comments | my_posts_reactions | my_posts_reposts."
|
|
@@ -153,7 +154,13 @@ var notificationListCommand = defineCommand({
|
|
|
153
154
|
}
|
|
154
155
|
});
|
|
155
156
|
var notificationDeleteCommand = defineCommand({
|
|
156
|
-
meta: {
|
|
157
|
+
meta: {
|
|
158
|
+
name: "delete",
|
|
159
|
+
description: "Delete one of your notification cards by its card urn. Self-action, safe to repeat, cannot be undone. An injected card (injected: true) has no card urn and cannot be deleted. LinkedIn may bring editorial and promotional cards back after a delete; `show-less` is the reliable way to suppress those.",
|
|
160
|
+
examples: [
|
|
161
|
+
'curviate notification delete "urn:li:fsd_notificationCard:(urn:li:fsd_notification:9999,ALL)"'
|
|
162
|
+
]
|
|
163
|
+
},
|
|
157
164
|
args: {
|
|
158
165
|
...WRITE_SINGLE_FLAGS,
|
|
159
166
|
cardUrn: { type: "positional", description: "The card_urn field of a `notification list` item (not object_urn)." }
|
|
@@ -179,7 +186,10 @@ var notificationDeleteCommand = defineCommand({
|
|
|
179
186
|
var notificationShowLessCommand = defineCommand({
|
|
180
187
|
meta: {
|
|
181
188
|
name: "show-less",
|
|
182
|
-
description: "Apply 'show less like this' to the source of one of your notification cards. For network-activity cards this removes the card, same as delete. Self-action,
|
|
189
|
+
description: "Apply 'show less like this' to the source of one of your notification cards. For network-activity cards this removes the card, same as delete. Self-action, safe to repeat, cannot be undone.",
|
|
190
|
+
examples: [
|
|
191
|
+
'curviate notification show-less "urn:li:fsd_notificationCard:(urn:li:fsd_notification:9999,ALL)"'
|
|
192
|
+
]
|
|
183
193
|
},
|
|
184
194
|
args: {
|
|
185
195
|
...WRITE_SINGLE_FLAGS,
|