@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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DEFAULT_FILTER_READERS,
|
|
4
4
|
assembleFilters,
|
|
5
5
|
splitCsv
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KJ24DIAJ.js";
|
|
7
7
|
import {
|
|
8
8
|
AttachError,
|
|
9
9
|
readAttachment,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-UEAX6KUB.js";
|
|
15
15
|
import {
|
|
16
16
|
requireAccount
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BLJGV6ST.js";
|
|
18
18
|
import {
|
|
19
19
|
buildPreviewOutput
|
|
20
20
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -31,16 +31,17 @@ import {
|
|
|
31
31
|
resolveEffectiveConfig,
|
|
32
32
|
streamAll,
|
|
33
33
|
writeNdjsonItem
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-B5NIX4G6.js";
|
|
35
35
|
import "./chunk-XZJQQJBE.js";
|
|
36
36
|
import {
|
|
37
37
|
createClient
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-UJOTQPL6.js";
|
|
39
39
|
import {
|
|
40
40
|
GLOBAL_FLAGS,
|
|
41
41
|
READ_SINGLE_FLAGS,
|
|
42
|
-
WRITE_FLAGS
|
|
43
|
-
|
|
42
|
+
WRITE_FLAGS,
|
|
43
|
+
readOnly
|
|
44
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
44
45
|
|
|
45
46
|
// src/commands/sales-nav.ts
|
|
46
47
|
import { defineCommand } from "citty";
|
|
@@ -50,12 +51,6 @@ function buildOutputStreams() {
|
|
|
50
51
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
|
-
function rejectPreviewOnRead(preview, out) {
|
|
54
|
-
if (preview) {
|
|
55
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
56
|
-
process.exit(2);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
54
|
function resolveOutputOpts(flags) {
|
|
60
55
|
return {
|
|
61
56
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -78,7 +73,6 @@ async function handleSdkError(err, outOpts, out) {
|
|
|
78
73
|
process.exit(1);
|
|
79
74
|
}
|
|
80
75
|
async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
81
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
82
76
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
83
77
|
const accountId = await requireAccount(client, flags, out);
|
|
84
78
|
const ns = client.account(accountId);
|
|
@@ -130,7 +124,6 @@ async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FIL
|
|
|
130
124
|
}
|
|
131
125
|
}
|
|
132
126
|
async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
133
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
134
127
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
135
128
|
const accountId = await requireAccount(client, flags, out);
|
|
136
129
|
const ns = client.account(accountId);
|
|
@@ -178,7 +171,6 @@ async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_
|
|
|
178
171
|
}
|
|
179
172
|
}
|
|
180
173
|
async function runSalesNavGetParameters(client, flags, out) {
|
|
181
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
182
174
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
183
175
|
if (!flags.type) {
|
|
184
176
|
out.stderr.write("error: --type is required.\n");
|
|
@@ -214,7 +206,6 @@ async function runSalesNavGetParameters(client, flags, out) {
|
|
|
214
206
|
}
|
|
215
207
|
}
|
|
216
208
|
async function runSalesNavSearchFromUrl(client, flags, out) {
|
|
217
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
218
209
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
219
210
|
const accountId = await requireAccount(client, flags, out);
|
|
220
211
|
const url = flags.url ?? "";
|
|
@@ -320,7 +311,6 @@ async function runSalesNavMessageNew(client, flags, out) {
|
|
|
320
311
|
}
|
|
321
312
|
}
|
|
322
313
|
async function runSalesNavProfile(client, flags, out) {
|
|
323
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
324
314
|
const accountId = await requireAccount(client, flags, out);
|
|
325
315
|
const rawId = flags.identifier ?? "";
|
|
326
316
|
const resolvedId = resolveIdentifier(rawId);
|
|
@@ -359,7 +349,6 @@ async function runSalesNavSaveLead(client, flags, out) {
|
|
|
359
349
|
}
|
|
360
350
|
}
|
|
361
351
|
async function runSalesNavAccountLists(client, flags, out) {
|
|
362
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
363
352
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
364
353
|
const accountId = await requireAccount(client, flags, out);
|
|
365
354
|
const ns = client.account(accountId);
|
|
@@ -390,7 +379,6 @@ async function runSalesNavAccountLists(client, flags, out) {
|
|
|
390
379
|
}
|
|
391
380
|
}
|
|
392
381
|
async function runSalesNavLeadLists(client, flags, out) {
|
|
393
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
394
382
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
395
383
|
const accountId = await requireAccount(client, flags, out);
|
|
396
384
|
const ns = client.account(accountId);
|
|
@@ -421,7 +409,6 @@ async function runSalesNavLeadLists(client, flags, out) {
|
|
|
421
409
|
}
|
|
422
410
|
}
|
|
423
411
|
async function runSalesNavBrowseAccountList(client, flags, out) {
|
|
424
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
425
412
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
426
413
|
const accountId = await requireAccount(client, flags, out);
|
|
427
414
|
const listId = flags.listId ?? "";
|
|
@@ -457,7 +444,6 @@ async function runSalesNavBrowseAccountList(client, flags, out) {
|
|
|
457
444
|
}
|
|
458
445
|
}
|
|
459
446
|
async function runSalesNavBrowseLeadList(client, flags, out) {
|
|
460
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
461
447
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
462
448
|
const accountId = await requireAccount(client, flags, out);
|
|
463
449
|
const listId = flags.listId ?? "";
|
|
@@ -517,7 +503,13 @@ async function runSalesNavSaveAccount(client, flags, out) {
|
|
|
517
503
|
}
|
|
518
504
|
}
|
|
519
505
|
var salesNavMessageNewCommand = defineCommand({
|
|
520
|
-
meta: {
|
|
506
|
+
meta: {
|
|
507
|
+
name: "new",
|
|
508
|
+
description: "Start a new Sales Navigator chat.",
|
|
509
|
+
examples: [
|
|
510
|
+
`curviate sales-nav message new --to ACwAAA1234567 --subject "Quick question" "Hi Jane, a quick question about your team's tooling."`
|
|
511
|
+
]
|
|
512
|
+
},
|
|
521
513
|
args: {
|
|
522
514
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
523
515
|
...WRITE_FLAGS,
|
|
@@ -561,9 +553,16 @@ var salesNavMessageCommand = defineCommand({
|
|
|
561
553
|
}
|
|
562
554
|
});
|
|
563
555
|
var salesNavSearchPeopleCommand = defineCommand({
|
|
564
|
-
meta: {
|
|
556
|
+
meta: {
|
|
557
|
+
name: "people",
|
|
558
|
+
description: "Search Sales Navigator member profiles.",
|
|
559
|
+
examples: [
|
|
560
|
+
'curviate sales-nav search people --keywords "head of data"',
|
|
561
|
+
"curviate sales-nav search people --filters-file filters.json"
|
|
562
|
+
]
|
|
563
|
+
},
|
|
565
564
|
args: {
|
|
566
|
-
...GLOBAL_FLAGS,
|
|
565
|
+
...readOnly(GLOBAL_FLAGS),
|
|
567
566
|
keywords: { type: "string", description: "Keyword search string." },
|
|
568
567
|
filters: { type: "string", stdinArg: true, description: "Filter body as a JSON object (escape hatch for the full filter surface); '-' reads JSON from stdin." },
|
|
569
568
|
"filters-file": { type: "string", description: "Path to a JSON file with the filter body." },
|
|
@@ -591,9 +590,15 @@ var salesNavSearchPeopleCommand = defineCommand({
|
|
|
591
590
|
}
|
|
592
591
|
});
|
|
593
592
|
var salesNavSearchCompaniesCommand = defineCommand({
|
|
594
|
-
meta: {
|
|
593
|
+
meta: {
|
|
594
|
+
name: "companies",
|
|
595
|
+
description: "Search Sales Navigator companies.",
|
|
596
|
+
examples: [
|
|
597
|
+
"curviate sales-nav search companies --keywords fintech"
|
|
598
|
+
]
|
|
599
|
+
},
|
|
595
600
|
args: {
|
|
596
|
-
...GLOBAL_FLAGS,
|
|
601
|
+
...readOnly(GLOBAL_FLAGS),
|
|
597
602
|
keywords: { type: "string", description: "Keyword search string." },
|
|
598
603
|
filters: { type: "string", stdinArg: true, description: "Filter body as a JSON object (escape hatch for the full filter surface); '-' reads JSON from stdin." },
|
|
599
604
|
"filters-file": { type: "string", description: "Path to a JSON file with the filter body." }
|
|
@@ -619,10 +624,13 @@ var salesNavSearchCompaniesCommand = defineCommand({
|
|
|
619
624
|
var salesNavSearchParametersCommand = defineCommand({
|
|
620
625
|
meta: {
|
|
621
626
|
name: "parameters",
|
|
622
|
-
description: "Resolve Sales Navigator filter parameter IDs. Paginated: --cursor pages manually, --all streams every page as NDJSON."
|
|
627
|
+
description: "Resolve Sales Navigator filter parameter IDs. Paginated: --cursor pages manually, --all streams every page as NDJSON.",
|
|
628
|
+
examples: [
|
|
629
|
+
"curviate sales-nav search parameters --type REGION --keywords Berlin"
|
|
630
|
+
]
|
|
623
631
|
},
|
|
624
632
|
args: {
|
|
625
|
-
...GLOBAL_FLAGS,
|
|
633
|
+
...readOnly(GLOBAL_FLAGS),
|
|
626
634
|
type: {
|
|
627
635
|
type: "string",
|
|
628
636
|
description: "Parameter type to resolve. One of: GROUPS, SALES_INDUSTRY, DEPARTMENT, PERSONA, ACCOUNT_LISTS, LEAD_LISTS, TECHNOLOGIES, SAVED_ACCOUNTS, SAVED_SEARCHES, RECENT_SEARCHES, REGION, POSTAL_CODE.",
|
|
@@ -649,9 +657,15 @@ var salesNavSearchParametersCommand = defineCommand({
|
|
|
649
657
|
}
|
|
650
658
|
});
|
|
651
659
|
var salesNavSearchCommand = defineCommand({
|
|
652
|
-
meta: {
|
|
660
|
+
meta: {
|
|
661
|
+
name: "search",
|
|
662
|
+
description: "Sales Navigator search operations. Also runs a pasted Sales Navigator search/list URL directly.",
|
|
663
|
+
examples: [
|
|
664
|
+
'curviate sales-nav search "https://www.linkedin.com/sales/search/people?query=(keywords%3Aai)"'
|
|
665
|
+
]
|
|
666
|
+
},
|
|
653
667
|
args: {
|
|
654
|
-
...GLOBAL_FLAGS,
|
|
668
|
+
...readOnly(GLOBAL_FLAGS),
|
|
655
669
|
url: {
|
|
656
670
|
type: "positional",
|
|
657
671
|
required: false,
|
|
@@ -688,10 +702,16 @@ var salesNavSearchCommand = defineCommand({
|
|
|
688
702
|
}
|
|
689
703
|
});
|
|
690
704
|
var salesNavProfileCommand = defineCommand({
|
|
691
|
-
meta: {
|
|
705
|
+
meta: {
|
|
706
|
+
name: "profile",
|
|
707
|
+
description: "Get a Sales Navigator enriched member profile.",
|
|
708
|
+
examples: [
|
|
709
|
+
"curviate sales-nav profile https://www.linkedin.com/in/janesmith"
|
|
710
|
+
]
|
|
711
|
+
},
|
|
692
712
|
args: {
|
|
693
713
|
// Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
|
|
694
|
-
...READ_SINGLE_FLAGS,
|
|
714
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
695
715
|
identifier: { type: "positional", description: "LinkedIn URL, slug, or native id." }
|
|
696
716
|
},
|
|
697
717
|
async run({ args }) {
|
|
@@ -713,7 +733,13 @@ var salesNavProfileCommand = defineCommand({
|
|
|
713
733
|
}
|
|
714
734
|
});
|
|
715
735
|
var salesNavSaveLeadCommand = defineCommand({
|
|
716
|
-
meta: {
|
|
736
|
+
meta: {
|
|
737
|
+
name: "save-lead",
|
|
738
|
+
description: "Save a Sales Navigator member into a lead list.",
|
|
739
|
+
examples: [
|
|
740
|
+
"curviate sales-nav save-lead ACwAAA1234567 --list 987654"
|
|
741
|
+
]
|
|
742
|
+
},
|
|
717
743
|
args: {
|
|
718
744
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
719
745
|
...WRITE_FLAGS,
|
|
@@ -739,8 +765,14 @@ var salesNavSaveLeadCommand = defineCommand({
|
|
|
739
765
|
}
|
|
740
766
|
});
|
|
741
767
|
var salesNavAccountListsCommand = defineCommand({
|
|
742
|
-
meta: {
|
|
743
|
-
|
|
768
|
+
meta: {
|
|
769
|
+
name: "account-lists",
|
|
770
|
+
description: "List the saved-account (company) lists on the operator's Sales Navigator seat.",
|
|
771
|
+
examples: [
|
|
772
|
+
"curviate sales-nav account-lists"
|
|
773
|
+
]
|
|
774
|
+
},
|
|
775
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
744
776
|
async run({ args }) {
|
|
745
777
|
const flags = args;
|
|
746
778
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -760,8 +792,14 @@ var salesNavAccountListsCommand = defineCommand({
|
|
|
760
792
|
}
|
|
761
793
|
});
|
|
762
794
|
var salesNavLeadListsCommand = defineCommand({
|
|
763
|
-
meta: {
|
|
764
|
-
|
|
795
|
+
meta: {
|
|
796
|
+
name: "lead-lists",
|
|
797
|
+
description: "List the saved-lead (member) lists on the operator's Sales Navigator seat.",
|
|
798
|
+
examples: [
|
|
799
|
+
"curviate sales-nav lead-lists"
|
|
800
|
+
]
|
|
801
|
+
},
|
|
802
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
765
803
|
async run({ args }) {
|
|
766
804
|
const flags = args;
|
|
767
805
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -781,9 +819,16 @@ var salesNavLeadListsCommand = defineCommand({
|
|
|
781
819
|
}
|
|
782
820
|
});
|
|
783
821
|
var salesNavBrowseAccountListCommand = defineCommand({
|
|
784
|
-
meta: {
|
|
822
|
+
meta: {
|
|
823
|
+
name: "browse-account-list",
|
|
824
|
+
description: "Browse the saved accounts (companies) in one account list.",
|
|
825
|
+
examples: [
|
|
826
|
+
"curviate sales-nav browse-account-list 987654",
|
|
827
|
+
"curviate sales-nav browse-account-list 987654 --sort-by DATE_ADDED --sort-order DESCENDING"
|
|
828
|
+
]
|
|
829
|
+
},
|
|
785
830
|
args: {
|
|
786
|
-
...GLOBAL_FLAGS,
|
|
831
|
+
...readOnly(GLOBAL_FLAGS),
|
|
787
832
|
listId: { type: "positional", description: "The account-list id (from `sales-nav account-lists`)." },
|
|
788
833
|
filter: { type: "string", description: "Restrict to a saved-account subset: STARRED, GROWTH_ALERTS, or RISK_ALERTS." },
|
|
789
834
|
"sort-by": { type: "string", description: "Sort field: DATE_ADDED or NAME. Defaults to NAME." },
|
|
@@ -808,9 +853,16 @@ var salesNavBrowseAccountListCommand = defineCommand({
|
|
|
808
853
|
}
|
|
809
854
|
});
|
|
810
855
|
var salesNavBrowseLeadListCommand = defineCommand({
|
|
811
|
-
meta: {
|
|
856
|
+
meta: {
|
|
857
|
+
name: "browse-lead-list",
|
|
858
|
+
description: "Browse the saved leads (members) in one lead list.",
|
|
859
|
+
examples: [
|
|
860
|
+
"curviate sales-nav browse-lead-list 987654",
|
|
861
|
+
"curviate sales-nav browse-lead-list 987654 --spotlight RECENT_POSITION_CHANGE"
|
|
862
|
+
]
|
|
863
|
+
},
|
|
812
864
|
args: {
|
|
813
|
-
...GLOBAL_FLAGS,
|
|
865
|
+
...readOnly(GLOBAL_FLAGS),
|
|
814
866
|
listId: { type: "positional", description: "The lead-list id (from `sales-nav lead-lists`)." },
|
|
815
867
|
spotlight: { type: "string", description: "Restrict to a spotlighted lead subset: RECENT_POSITION_CHANGE, RECENTLY_POSTED_ON_LINKEDIN, FOLLOW_YOUR_COMPANY, or SHARE_EXPERIENCE." },
|
|
816
868
|
"sort-by": { type: "string", description: "Sort field: DATE_ADDED, ACCOUNT, NAME, or OUTREACH_ACTIVITY. Defaults to DATE_ADDED." },
|
|
@@ -835,7 +887,13 @@ var salesNavBrowseLeadListCommand = defineCommand({
|
|
|
835
887
|
}
|
|
836
888
|
});
|
|
837
889
|
var salesNavSaveAccountCommand = defineCommand({
|
|
838
|
-
meta: {
|
|
890
|
+
meta: {
|
|
891
|
+
name: "save-account",
|
|
892
|
+
description: "Save a LinkedIn company into an account list.",
|
|
893
|
+
examples: [
|
|
894
|
+
"curviate sales-nav save-account 1234567 --list 987654"
|
|
895
|
+
]
|
|
896
|
+
},
|
|
839
897
|
args: {
|
|
840
898
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
841
899
|
...WRITE_FLAGS,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
assembleFilters,
|
|
5
5
|
splitCsv,
|
|
6
6
|
splitCsvNumbers
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KJ24DIAJ.js";
|
|
8
8
|
import {
|
|
9
9
|
slimSearchCompanies,
|
|
10
10
|
slimSearchCompaniesItem,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
slimSearchPeopleItem,
|
|
15
15
|
slimSearchPosts,
|
|
16
16
|
slimSearchPostsItem
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EGDDVF3Q.js";
|
|
18
18
|
import {
|
|
19
19
|
requireAccount
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BLJGV6ST.js";
|
|
21
21
|
import {
|
|
22
22
|
pageDelayFromFlags,
|
|
23
23
|
readCursorFlag,
|
|
@@ -30,14 +30,15 @@ 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
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-UJOTQPL6.js";
|
|
38
38
|
import {
|
|
39
|
-
GLOBAL_FLAGS
|
|
40
|
-
|
|
39
|
+
GLOBAL_FLAGS,
|
|
40
|
+
readOnly
|
|
41
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
41
42
|
|
|
42
43
|
// src/commands/search.ts
|
|
43
44
|
import { defineCommand } from "citty";
|
|
@@ -68,12 +69,6 @@ function buildOutputStreams() {
|
|
|
68
69
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
|
-
function rejectPreviewOnRead(preview, out) {
|
|
72
|
-
if (preview) {
|
|
73
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
74
|
-
process.exit(2);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
72
|
function resolveOutputOpts(flags) {
|
|
78
73
|
return {
|
|
79
74
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -177,7 +172,6 @@ async function buildSearchBody(kind, flags, readers, out) {
|
|
|
177
172
|
return { body };
|
|
178
173
|
}
|
|
179
174
|
async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
180
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
181
175
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
182
176
|
for (const f of PEOPLE_INVALID_FLAGS) {
|
|
183
177
|
if (flags[f]) {
|
|
@@ -229,7 +223,6 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
|
|
|
229
223
|
}
|
|
230
224
|
}
|
|
231
225
|
async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
232
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
233
226
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
234
227
|
const accountId = await requireAccount(client, flags, out);
|
|
235
228
|
const ns = client.account(accountId);
|
|
@@ -272,7 +265,6 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
|
|
|
272
265
|
}
|
|
273
266
|
}
|
|
274
267
|
async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
275
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
276
268
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
277
269
|
const accountId = await requireAccount(client, flags, out);
|
|
278
270
|
const ns = client.account(accountId);
|
|
@@ -315,7 +307,6 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
|
|
|
315
307
|
}
|
|
316
308
|
}
|
|
317
309
|
async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
318
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
319
310
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
320
311
|
const accountId = await requireAccount(client, flags, out);
|
|
321
312
|
const ns = client.account(accountId);
|
|
@@ -358,7 +349,6 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
|
|
|
358
349
|
}
|
|
359
350
|
}
|
|
360
351
|
async function runSearchParameters(client, flags, out) {
|
|
361
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
362
352
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
363
353
|
if (!flags.type) {
|
|
364
354
|
out.stderr.write("error: --type is required.\n");
|
|
@@ -407,7 +397,6 @@ async function runSearchParameters(client, flags, out) {
|
|
|
407
397
|
}
|
|
408
398
|
}
|
|
409
399
|
async function runSearchGroups(client, flags, out) {
|
|
410
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
411
400
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
412
401
|
const keywords = flags.query ?? "";
|
|
413
402
|
if (!keywords) {
|
|
@@ -450,7 +439,6 @@ async function runSearchGroups(client, flags, out) {
|
|
|
450
439
|
}
|
|
451
440
|
}
|
|
452
441
|
async function runSearchServices(client, flags, out) {
|
|
453
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
454
442
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
455
443
|
const accountId = await requireAccount(client, flags, out);
|
|
456
444
|
const ns = client.account(accountId);
|
|
@@ -495,7 +483,6 @@ async function runSearchServices(client, flags, out) {
|
|
|
495
483
|
}
|
|
496
484
|
}
|
|
497
485
|
async function runSearchServiceParameters(client, flags, out) {
|
|
498
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
499
486
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
500
487
|
if (!flags.keywords) {
|
|
501
488
|
out.stderr.write("error: --keywords is required.\n");
|
|
@@ -538,7 +525,6 @@ async function runSearchServiceParameters(client, flags, out) {
|
|
|
538
525
|
}
|
|
539
526
|
}
|
|
540
527
|
async function runSearchFromUrl(client, flags, out) {
|
|
541
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
542
528
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
543
529
|
const accountId = await requireAccount(client, flags, out);
|
|
544
530
|
const url = flags.url ?? "";
|
|
@@ -578,9 +564,17 @@ async function runSearchFromUrl(client, flags, out) {
|
|
|
578
564
|
}
|
|
579
565
|
}
|
|
580
566
|
var searchPeopleCommand = defineCommand({
|
|
581
|
-
meta: {
|
|
567
|
+
meta: {
|
|
568
|
+
name: "people",
|
|
569
|
+
description: "Search members with structured filters.",
|
|
570
|
+
examples: [
|
|
571
|
+
'curviate search people --keywords "AI engineer"',
|
|
572
|
+
'curviate search people --keywords "AI engineer" --location 106967730',
|
|
573
|
+
"curviate search people --filters-file filters.json"
|
|
574
|
+
]
|
|
575
|
+
},
|
|
582
576
|
args: {
|
|
583
|
-
...GLOBAL_FLAGS,
|
|
577
|
+
...readOnly(GLOBAL_FLAGS),
|
|
584
578
|
keywords: { type: "string", description: "Full-text keyword search." },
|
|
585
579
|
...FILTER_FLAGS,
|
|
586
580
|
industry: { type: "string", description: "Industry ids (comma-separated)." },
|
|
@@ -614,9 +608,16 @@ var searchPeopleCommand = defineCommand({
|
|
|
614
608
|
}
|
|
615
609
|
});
|
|
616
610
|
var searchCompaniesCommand = defineCommand({
|
|
617
|
-
meta: {
|
|
611
|
+
meta: {
|
|
612
|
+
name: "companies",
|
|
613
|
+
description: "Search companies.",
|
|
614
|
+
examples: [
|
|
615
|
+
'curviate search companies --keywords "developer tools"',
|
|
616
|
+
"curviate search companies --keywords robotics --headcount 11-50,51-200"
|
|
617
|
+
]
|
|
618
|
+
},
|
|
618
619
|
args: {
|
|
619
|
-
...GLOBAL_FLAGS,
|
|
620
|
+
...readOnly(GLOBAL_FLAGS),
|
|
620
621
|
keywords: { type: "string", description: "Full-text keyword search." },
|
|
621
622
|
...FILTER_FLAGS,
|
|
622
623
|
industry: { type: "string", description: "Industry ids (comma-separated)." },
|
|
@@ -646,9 +647,16 @@ var searchCompaniesCommand = defineCommand({
|
|
|
646
647
|
}
|
|
647
648
|
});
|
|
648
649
|
var searchPostsCommand = defineCommand({
|
|
649
|
-
meta: {
|
|
650
|
+
meta: {
|
|
651
|
+
name: "posts",
|
|
652
|
+
description: "Search posts.",
|
|
653
|
+
examples: [
|
|
654
|
+
'curviate search posts --keywords "agent infrastructure"',
|
|
655
|
+
'curviate search posts --keywords "agent infrastructure" --date-posted past_week'
|
|
656
|
+
]
|
|
657
|
+
},
|
|
650
658
|
args: {
|
|
651
|
-
...GLOBAL_FLAGS,
|
|
659
|
+
...readOnly(GLOBAL_FLAGS),
|
|
652
660
|
keywords: { type: "string", description: "Full-text keyword search." },
|
|
653
661
|
...FILTER_FLAGS,
|
|
654
662
|
"sort-by": { type: "string", description: "Sort order (e.g. relevance, date)." },
|
|
@@ -682,9 +690,16 @@ var searchPostsCommand = defineCommand({
|
|
|
682
690
|
}
|
|
683
691
|
});
|
|
684
692
|
var searchJobsCommand = defineCommand({
|
|
685
|
-
meta: {
|
|
693
|
+
meta: {
|
|
694
|
+
name: "jobs",
|
|
695
|
+
description: "Search jobs.",
|
|
696
|
+
examples: [
|
|
697
|
+
'curviate search jobs --keywords "AI engineer"',
|
|
698
|
+
'curviate search jobs --keywords "AI engineer" --location 106967730 --presence remote'
|
|
699
|
+
]
|
|
700
|
+
},
|
|
686
701
|
args: {
|
|
687
|
-
...GLOBAL_FLAGS,
|
|
702
|
+
...readOnly(GLOBAL_FLAGS),
|
|
688
703
|
keywords: { type: "string", description: "Full-text keyword search." },
|
|
689
704
|
...FILTER_FLAGS,
|
|
690
705
|
// On jobs, --location maps to the geo region filter (not a location array, different API shape for jobs vs people)
|
|
@@ -734,10 +749,14 @@ var searchJobsCommand = defineCommand({
|
|
|
734
749
|
var searchParametersCommand = defineCommand({
|
|
735
750
|
meta: {
|
|
736
751
|
name: "parameters",
|
|
737
|
-
description: "Resolve human-readable terms to opaque filter IDs. Paginated: --cursor pages manually, --all streams every page as NDJSON."
|
|
752
|
+
description: "Resolve human-readable terms to opaque filter IDs. Paginated: --cursor pages manually, --all streams every page as NDJSON.",
|
|
753
|
+
examples: [
|
|
754
|
+
"curviate search parameters --type LOCATION --keywords Berlin",
|
|
755
|
+
"curviate search parameters --type COMPANY --keywords Acme"
|
|
756
|
+
]
|
|
738
757
|
},
|
|
739
758
|
args: {
|
|
740
|
-
...GLOBAL_FLAGS,
|
|
759
|
+
...readOnly(GLOBAL_FLAGS),
|
|
741
760
|
type: {
|
|
742
761
|
type: "string",
|
|
743
762
|
description: "Parameter type: LOCATION, PEOPLE, RELATION, COMPANY, SCHOOL, INDUSTRY, SERVICE, JOB_FUNCTION, JOB_TITLE, EMPLOYMENT_TYPE, SKILL.",
|
|
@@ -764,9 +783,15 @@ var searchParametersCommand = defineCommand({
|
|
|
764
783
|
}
|
|
765
784
|
});
|
|
766
785
|
var searchGroupsCommand = defineCommand({
|
|
767
|
-
meta: {
|
|
786
|
+
meta: {
|
|
787
|
+
name: "groups",
|
|
788
|
+
description: "Keyword search for LinkedIn groups. A no-match search returns an empty list, not an error.",
|
|
789
|
+
examples: [
|
|
790
|
+
'curviate search groups "gtm engineering"'
|
|
791
|
+
]
|
|
792
|
+
},
|
|
768
793
|
args: {
|
|
769
|
-
...GLOBAL_FLAGS,
|
|
794
|
+
...readOnly(GLOBAL_FLAGS),
|
|
770
795
|
query: { type: "positional", description: "Search terms (multi-word supported, e.g. 'gtm engineering')." }
|
|
771
796
|
},
|
|
772
797
|
async run({ args }) {
|
|
@@ -790,10 +815,17 @@ var searchGroupsCommand = defineCommand({
|
|
|
790
815
|
var searchServicesCommand = defineCommand({
|
|
791
816
|
meta: {
|
|
792
817
|
name: "services",
|
|
793
|
-
description: "Search Services Marketplace providers with structured filters. At least one of --keywords, --service-category, or --location is required. Resolve --service-category/--location values with 'search service-parameters' first, both take opaque ids, not free text."
|
|
818
|
+
description: "Search Services Marketplace providers with structured filters. At least one of --keywords, --service-category, or --location is required. Resolve --service-category/--location values with 'search service-parameters' first, both take opaque ids, not free text.",
|
|
819
|
+
examples: [
|
|
820
|
+
"curviate search services --keywords marketing",
|
|
821
|
+
"curviate search services --service-category 100 --location 106967730"
|
|
822
|
+
],
|
|
823
|
+
requires: [
|
|
824
|
+
"At least one of --keywords, --service-category or --location."
|
|
825
|
+
]
|
|
794
826
|
},
|
|
795
827
|
args: {
|
|
796
|
-
...GLOBAL_FLAGS,
|
|
828
|
+
...readOnly(GLOBAL_FLAGS),
|
|
797
829
|
keywords: { type: "string", description: "Free-text keyword match." },
|
|
798
830
|
"service-category": { type: "string", description: "Opaque service-category ids (comma-separated; resolve via `curviate search service-parameters --type service_category`)." },
|
|
799
831
|
location: { type: "string", description: "Opaque location ids (comma-separated; resolve via `curviate search service-parameters --type location`)." },
|
|
@@ -821,10 +853,13 @@ var searchServicesCommand = defineCommand({
|
|
|
821
853
|
var searchServiceParametersCommand = defineCommand({
|
|
822
854
|
meta: {
|
|
823
855
|
name: "service-parameters",
|
|
824
|
-
description: "Resolve human-readable service-filter terms into the opaque ids 'search services' accepts. Paginated: --cursor pages manually, --all streams every page as NDJSON."
|
|
856
|
+
description: "Resolve human-readable service-filter terms into the opaque ids 'search services' accepts. Paginated: --cursor pages manually, --all streams every page as NDJSON.",
|
|
857
|
+
examples: [
|
|
858
|
+
"curviate search service-parameters --type service_category --keywords marketing"
|
|
859
|
+
]
|
|
825
860
|
},
|
|
826
861
|
args: {
|
|
827
|
-
...GLOBAL_FLAGS,
|
|
862
|
+
...readOnly(GLOBAL_FLAGS),
|
|
828
863
|
type: {
|
|
829
864
|
type: "string",
|
|
830
865
|
description: "Filter type to resolve: service_category (default) or location."
|
|
@@ -850,9 +885,15 @@ var searchServiceParametersCommand = defineCommand({
|
|
|
850
885
|
}
|
|
851
886
|
});
|
|
852
887
|
var searchCommand = defineCommand({
|
|
853
|
-
meta: {
|
|
888
|
+
meta: {
|
|
889
|
+
name: "search",
|
|
890
|
+
description: "Search people, companies, posts, and jobs. Also runs a pasted search URL directly.",
|
|
891
|
+
examples: [
|
|
892
|
+
'curviate search "https://www.linkedin.com/search/results/people/?keywords=ai%20engineer"'
|
|
893
|
+
]
|
|
894
|
+
},
|
|
854
895
|
args: {
|
|
855
|
-
...GLOBAL_FLAGS,
|
|
896
|
+
...readOnly(GLOBAL_FLAGS),
|
|
856
897
|
url: {
|
|
857
898
|
type: "positional",
|
|
858
899
|
required: false,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
readablePage,
|
|
7
7
|
resolveEffectiveConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-B5NIX4G6.js";
|
|
9
9
|
import {
|
|
10
10
|
getExitCode
|
|
11
11
|
} from "./chunk-XZJQQJBE.js";
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
createClient,
|
|
14
14
|
getConfigPath,
|
|
15
15
|
writeProfile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UJOTQPL6.js";
|
|
17
17
|
import {
|
|
18
18
|
GLOBAL_FLAGS,
|
|
19
19
|
defaultReadStdin,
|
|
20
20
|
isStdinToken,
|
|
21
21
|
resolveTextOrStdin
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/setup.ts
|
|
25
25
|
import { defineCommand } from "citty";
|
|
@@ -381,7 +381,12 @@ async function finishExchange(baseUrl, material, code, profileName, opts, io) {
|
|
|
381
381
|
var setupCommand = defineCommand({
|
|
382
382
|
meta: {
|
|
383
383
|
name: "setup",
|
|
384
|
-
description: "Connect this machine to your workspace: opens the dashboard, takes the code it shows you, and saves an API key."
|
|
384
|
+
description: "Connect this machine to your workspace: opens the dashboard, takes the code it shows you, and saves an API key.",
|
|
385
|
+
examples: [
|
|
386
|
+
"curviate setup",
|
|
387
|
+
"curviate setup --json",
|
|
388
|
+
"curviate setup --code -"
|
|
389
|
+
]
|
|
385
390
|
},
|
|
386
391
|
args: {
|
|
387
392
|
profile: GLOBAL_FLAGS.profile,
|