@curviate/cli 0.40.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/{account-LTXAUBBP.js → account-PFK5YROZ.js} +81 -26
  3. package/dist/{chunk-OTBJATDE.js → chunk-B5NIX4G6.js} +6 -1
  4. package/dist/{chunk-LD5KJSCT.js → chunk-BLJGV6ST.js} +2 -2
  5. package/dist/{chunk-6W7364S3.js → chunk-KJ24DIAJ.js} +1 -1
  6. package/dist/{chunk-T6G5AASF.js → chunk-OUMMWC7G.js} +79 -26
  7. package/dist/{chunk-BGVK73VI.js → chunk-PCZH5QJA.js} +1 -1
  8. package/dist/{chunk-XDQHNUEU.js → chunk-TC4ZPUWI.js} +12 -6
  9. package/dist/{chunk-DCZR4M7G.js → chunk-UJOTQPL6.js} +1 -1
  10. package/dist/cli.js +64 -53
  11. package/dist/{comment-2CSBSBOH.js → comment-G4EXIIAQ.js} +83 -29
  12. package/dist/{company-ZUIUR5UN.js → company-WX5QOASS.js} +104 -50
  13. package/dist/{config-RUBXWFQ3.js → config-K4G3VSBA.js} +44 -9
  14. package/dist/{connect-LSXKNEL2.js → connect-IYTFL7NT.js} +44 -21
  15. package/dist/{doctor-FHOHIQPX.js → doctor-ICAEETCL.js} +8 -4
  16. package/dist/examples-IJL3A6SZ.js +18 -0
  17. package/dist/{feed-UUHB2FXI.js → feed-XC5235UF.js} +16 -14
  18. package/dist/{group-NUCO3P2W.js → group-JDP2HVSV.js} +31 -20
  19. package/dist/{inbox-DEZTGTPO.js → inbox-W3KR65VD.js} +51 -24
  20. package/dist/{inboxes-F3NIQQRK.js → inboxes-XYS3IRT6.js} +23 -17
  21. package/dist/{job-YMGO3WJH.js → job-XW3WM57J.js} +112 -34
  22. package/dist/{login-YTVPIN27.js → login-OHAHNBRW.js} +7 -3
  23. package/dist/{message-RSBUXI64.js → message-5XC7U4JC.js} +5 -5
  24. package/dist/{notification-EJ35OD3Q.js → notification-RIUSYJV6.js} +26 -16
  25. package/dist/{post-VHVQ56A7.js → post-LSEBRQYK.js} +96 -32
  26. package/dist/{profile-3CBNI42H.js → profile-NHTYGX7K.js} +130 -43
  27. package/dist/{recruiter-M7XUFYNR.js → recruiter-4SDAROK4.js} +219 -67
  28. package/dist/{sales-nav-S47OCEUC.js → sales-nav-77NP3UXV.js} +102 -42
  29. package/dist/{search-UWI37MKG.js → search-XDOQZAVG.js} +80 -39
  30. package/dist/{setup-3EQRACT6.js → setup-BPNLAHPC.js} +9 -4
  31. package/dist/{webhook-I4U4C4XE.js → webhook-XOPRW63N.js} +62 -23
  32. package/package.json +3 -2
@@ -3,7 +3,7 @@ import {
3
3
  DEFAULT_FILTER_READERS,
4
4
  assembleFilters,
5
5
  splitCsv
6
- } from "./chunk-6W7364S3.js";
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-LD5KJSCT.js";
17
+ } from "./chunk-BLJGV6ST.js";
18
18
  import {
19
19
  buildPreviewOutput
20
20
  } from "./chunk-TCUYH5GO.js";
@@ -22,6 +22,7 @@ import {
22
22
  pageDelayFromFlags,
23
23
  readCursorFlag,
24
24
  readMaxPagesFlag,
25
+ readableObject,
25
26
  readablePage,
26
27
  rejectPaginationModifiersWithoutAll,
27
28
  renderError,
@@ -30,16 +31,17 @@ import {
30
31
  resolveEffectiveConfig,
31
32
  streamAll,
32
33
  writeNdjsonItem
33
- } from "./chunk-OTBJATDE.js";
34
+ } from "./chunk-B5NIX4G6.js";
34
35
  import "./chunk-XZJQQJBE.js";
35
36
  import {
36
37
  createClient
37
- } from "./chunk-DCZR4M7G.js";
38
+ } from "./chunk-UJOTQPL6.js";
38
39
  import {
39
40
  GLOBAL_FLAGS,
40
41
  READ_SINGLE_FLAGS,
41
- WRITE_FLAGS
42
- } from "./chunk-XDQHNUEU.js";
42
+ WRITE_FLAGS,
43
+ readOnly
44
+ } from "./chunk-TC4ZPUWI.js";
43
45
 
44
46
  // src/commands/sales-nav.ts
45
47
  import { defineCommand } from "citty";
@@ -49,12 +51,6 @@ function buildOutputStreams() {
49
51
  stderr: { write: (s) => process.stderr.write(s) }
50
52
  };
51
53
  }
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
54
  function resolveOutputOpts(flags) {
59
55
  return {
60
56
  json: (flags.json ?? false) || !process.stdout.isTTY,
@@ -77,7 +73,6 @@ async function handleSdkError(err, outOpts, out) {
77
73
  process.exit(1);
78
74
  }
79
75
  async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
80
- rejectPreviewOnRead(flags.preview, out);
81
76
  rejectPaginationModifiersWithoutAll(flags, out);
82
77
  const accountId = await requireAccount(client, flags, out);
83
78
  const ns = client.account(accountId);
@@ -129,7 +124,6 @@ async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FIL
129
124
  }
130
125
  }
131
126
  async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
132
- rejectPreviewOnRead(flags.preview, out);
133
127
  rejectPaginationModifiersWithoutAll(flags, out);
134
128
  const accountId = await requireAccount(client, flags, out);
135
129
  const ns = client.account(accountId);
@@ -177,7 +171,6 @@ async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_
177
171
  }
178
172
  }
179
173
  async function runSalesNavGetParameters(client, flags, out) {
180
- rejectPreviewOnRead(flags.preview, out);
181
174
  rejectPaginationModifiersWithoutAll(flags, out);
182
175
  if (!flags.type) {
183
176
  out.stderr.write("error: --type is required.\n");
@@ -213,7 +206,6 @@ async function runSalesNavGetParameters(client, flags, out) {
213
206
  }
214
207
  }
215
208
  async function runSalesNavSearchFromUrl(client, flags, out) {
216
- rejectPreviewOnRead(flags.preview, out);
217
209
  rejectPaginationModifiersWithoutAll(flags, out);
218
210
  const accountId = await requireAccount(client, flags, out);
219
211
  const url = flags.url ?? "";
@@ -319,7 +311,6 @@ async function runSalesNavMessageNew(client, flags, out) {
319
311
  }
320
312
  }
321
313
  async function runSalesNavProfile(client, flags, out) {
322
- rejectPreviewOnRead(flags.preview, out);
323
314
  const accountId = await requireAccount(client, flags, out);
324
315
  const rawId = flags.identifier ?? "";
325
316
  const resolvedId = resolveIdentifier(rawId);
@@ -327,6 +318,7 @@ async function runSalesNavProfile(client, flags, out) {
327
318
  const outOpts = resolveOutputOpts(flags);
328
319
  try {
329
320
  const result = await ns.salesNavigator.getProfile(resolvedId, {});
321
+ readableObject(result);
330
322
  renderSuccess(result, outOpts, out);
331
323
  } catch (err) {
332
324
  await handleSdkError(err, outOpts, out);
@@ -357,7 +349,6 @@ async function runSalesNavSaveLead(client, flags, out) {
357
349
  }
358
350
  }
359
351
  async function runSalesNavAccountLists(client, flags, out) {
360
- rejectPreviewOnRead(flags.preview, out);
361
352
  rejectPaginationModifiersWithoutAll(flags, out);
362
353
  const accountId = await requireAccount(client, flags, out);
363
354
  const ns = client.account(accountId);
@@ -388,7 +379,6 @@ async function runSalesNavAccountLists(client, flags, out) {
388
379
  }
389
380
  }
390
381
  async function runSalesNavLeadLists(client, flags, out) {
391
- rejectPreviewOnRead(flags.preview, out);
392
382
  rejectPaginationModifiersWithoutAll(flags, out);
393
383
  const accountId = await requireAccount(client, flags, out);
394
384
  const ns = client.account(accountId);
@@ -419,7 +409,6 @@ async function runSalesNavLeadLists(client, flags, out) {
419
409
  }
420
410
  }
421
411
  async function runSalesNavBrowseAccountList(client, flags, out) {
422
- rejectPreviewOnRead(flags.preview, out);
423
412
  rejectPaginationModifiersWithoutAll(flags, out);
424
413
  const accountId = await requireAccount(client, flags, out);
425
414
  const listId = flags.listId ?? "";
@@ -455,7 +444,6 @@ async function runSalesNavBrowseAccountList(client, flags, out) {
455
444
  }
456
445
  }
457
446
  async function runSalesNavBrowseLeadList(client, flags, out) {
458
- rejectPreviewOnRead(flags.preview, out);
459
447
  rejectPaginationModifiersWithoutAll(flags, out);
460
448
  const accountId = await requireAccount(client, flags, out);
461
449
  const listId = flags.listId ?? "";
@@ -515,7 +503,13 @@ async function runSalesNavSaveAccount(client, flags, out) {
515
503
  }
516
504
  }
517
505
  var salesNavMessageNewCommand = defineCommand({
518
- meta: { name: "new", description: "Start a new Sales Navigator chat." },
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
+ },
519
513
  args: {
520
514
  // Write command: WRITE_FLAGS omits pagination/projection flags
521
515
  ...WRITE_FLAGS,
@@ -559,9 +553,16 @@ var salesNavMessageCommand = defineCommand({
559
553
  }
560
554
  });
561
555
  var salesNavSearchPeopleCommand = defineCommand({
562
- meta: { name: "people", description: "Search Sales Navigator member profiles." },
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
+ },
563
564
  args: {
564
- ...GLOBAL_FLAGS,
565
+ ...readOnly(GLOBAL_FLAGS),
565
566
  keywords: { type: "string", description: "Keyword search string." },
566
567
  filters: { type: "string", stdinArg: true, description: "Filter body as a JSON object (escape hatch for the full filter surface); '-' reads JSON from stdin." },
567
568
  "filters-file": { type: "string", description: "Path to a JSON file with the filter body." },
@@ -589,9 +590,15 @@ var salesNavSearchPeopleCommand = defineCommand({
589
590
  }
590
591
  });
591
592
  var salesNavSearchCompaniesCommand = defineCommand({
592
- meta: { name: "companies", description: "Search Sales Navigator companies." },
593
+ meta: {
594
+ name: "companies",
595
+ description: "Search Sales Navigator companies.",
596
+ examples: [
597
+ "curviate sales-nav search companies --keywords fintech"
598
+ ]
599
+ },
593
600
  args: {
594
- ...GLOBAL_FLAGS,
601
+ ...readOnly(GLOBAL_FLAGS),
595
602
  keywords: { type: "string", description: "Keyword search string." },
596
603
  filters: { type: "string", stdinArg: true, description: "Filter body as a JSON object (escape hatch for the full filter surface); '-' reads JSON from stdin." },
597
604
  "filters-file": { type: "string", description: "Path to a JSON file with the filter body." }
@@ -617,10 +624,13 @@ var salesNavSearchCompaniesCommand = defineCommand({
617
624
  var salesNavSearchParametersCommand = defineCommand({
618
625
  meta: {
619
626
  name: "parameters",
620
- 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
+ ]
621
631
  },
622
632
  args: {
623
- ...GLOBAL_FLAGS,
633
+ ...readOnly(GLOBAL_FLAGS),
624
634
  type: {
625
635
  type: "string",
626
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.",
@@ -647,9 +657,15 @@ var salesNavSearchParametersCommand = defineCommand({
647
657
  }
648
658
  });
649
659
  var salesNavSearchCommand = defineCommand({
650
- meta: { name: "search", description: "Sales Navigator search operations. Also runs a pasted Sales Navigator search/list URL directly." },
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
+ },
651
667
  args: {
652
- ...GLOBAL_FLAGS,
668
+ ...readOnly(GLOBAL_FLAGS),
653
669
  url: {
654
670
  type: "positional",
655
671
  required: false,
@@ -686,10 +702,16 @@ var salesNavSearchCommand = defineCommand({
686
702
  }
687
703
  });
688
704
  var salesNavProfileCommand = defineCommand({
689
- meta: { name: "profile", description: "Get a Sales Navigator enriched member profile." },
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
+ },
690
712
  args: {
691
713
  // Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
692
- ...READ_SINGLE_FLAGS,
714
+ ...readOnly(READ_SINGLE_FLAGS),
693
715
  identifier: { type: "positional", description: "LinkedIn URL, slug, or native id." }
694
716
  },
695
717
  async run({ args }) {
@@ -711,7 +733,13 @@ var salesNavProfileCommand = defineCommand({
711
733
  }
712
734
  });
713
735
  var salesNavSaveLeadCommand = defineCommand({
714
- meta: { name: "save-lead", description: "Save a Sales Navigator member into a lead list." },
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
+ },
715
743
  args: {
716
744
  // Write command: WRITE_FLAGS omits pagination/projection flags
717
745
  ...WRITE_FLAGS,
@@ -737,8 +765,14 @@ var salesNavSaveLeadCommand = defineCommand({
737
765
  }
738
766
  });
739
767
  var salesNavAccountListsCommand = defineCommand({
740
- meta: { name: "account-lists", description: "List the saved-account (company) lists on the operator's Sales Navigator seat." },
741
- args: { ...GLOBAL_FLAGS },
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) },
742
776
  async run({ args }) {
743
777
  const flags = args;
744
778
  const cfg = await resolveEffectiveConfig({
@@ -758,8 +792,14 @@ var salesNavAccountListsCommand = defineCommand({
758
792
  }
759
793
  });
760
794
  var salesNavLeadListsCommand = defineCommand({
761
- meta: { name: "lead-lists", description: "List the saved-lead (member) lists on the operator's Sales Navigator seat." },
762
- args: { ...GLOBAL_FLAGS },
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) },
763
803
  async run({ args }) {
764
804
  const flags = args;
765
805
  const cfg = await resolveEffectiveConfig({
@@ -779,9 +819,16 @@ var salesNavLeadListsCommand = defineCommand({
779
819
  }
780
820
  });
781
821
  var salesNavBrowseAccountListCommand = defineCommand({
782
- meta: { name: "browse-account-list", description: "Browse the saved accounts (companies) in one account list." },
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
+ },
783
830
  args: {
784
- ...GLOBAL_FLAGS,
831
+ ...readOnly(GLOBAL_FLAGS),
785
832
  listId: { type: "positional", description: "The account-list id (from `sales-nav account-lists`)." },
786
833
  filter: { type: "string", description: "Restrict to a saved-account subset: STARRED, GROWTH_ALERTS, or RISK_ALERTS." },
787
834
  "sort-by": { type: "string", description: "Sort field: DATE_ADDED or NAME. Defaults to NAME." },
@@ -806,9 +853,16 @@ var salesNavBrowseAccountListCommand = defineCommand({
806
853
  }
807
854
  });
808
855
  var salesNavBrowseLeadListCommand = defineCommand({
809
- meta: { name: "browse-lead-list", description: "Browse the saved leads (members) in one lead list." },
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
+ },
810
864
  args: {
811
- ...GLOBAL_FLAGS,
865
+ ...readOnly(GLOBAL_FLAGS),
812
866
  listId: { type: "positional", description: "The lead-list id (from `sales-nav lead-lists`)." },
813
867
  spotlight: { type: "string", description: "Restrict to a spotlighted lead subset: RECENT_POSITION_CHANGE, RECENTLY_POSTED_ON_LINKEDIN, FOLLOW_YOUR_COMPANY, or SHARE_EXPERIENCE." },
814
868
  "sort-by": { type: "string", description: "Sort field: DATE_ADDED, ACCOUNT, NAME, or OUTREACH_ACTIVITY. Defaults to DATE_ADDED." },
@@ -833,7 +887,13 @@ var salesNavBrowseLeadListCommand = defineCommand({
833
887
  }
834
888
  });
835
889
  var salesNavSaveAccountCommand = defineCommand({
836
- meta: { name: "save-account", description: "Save a LinkedIn company into an account list." },
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
+ },
837
897
  args: {
838
898
  // Write command: WRITE_FLAGS omits pagination/projection flags
839
899
  ...WRITE_FLAGS,
@@ -4,7 +4,7 @@ import {
4
4
  assembleFilters,
5
5
  splitCsv,
6
6
  splitCsvNumbers
7
- } from "./chunk-6W7364S3.js";
7
+ } from "./chunk-KJ24DIAJ.js";
8
8
  import {
9
9
  slimSearchCompanies,
10
10
  slimSearchCompaniesItem,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-XP2LN6F6.js";
18
18
  import {
19
19
  requireAccount
20
- } from "./chunk-LD5KJSCT.js";
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-OTBJATDE.js";
33
+ } from "./chunk-B5NIX4G6.js";
34
34
  import "./chunk-XZJQQJBE.js";
35
35
  import {
36
36
  createClient
37
- } from "./chunk-DCZR4M7G.js";
37
+ } from "./chunk-UJOTQPL6.js";
38
38
  import {
39
- GLOBAL_FLAGS
40
- } from "./chunk-XDQHNUEU.js";
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: { name: "people", description: "Search members with structured filters." },
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: { name: "companies", description: "Search companies." },
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: { name: "posts", description: "Search posts." },
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: { name: "jobs", description: "Search jobs." },
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: { name: "groups", description: "Keyword search for LinkedIn groups. A no-match search returns an empty list, not an error." },
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: { name: "search", description: "Search people, companies, posts, and jobs. Also runs a pasted search URL directly." },
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-OTBJATDE.js";
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-DCZR4M7G.js";
16
+ } from "./chunk-UJOTQPL6.js";
17
17
  import {
18
18
  GLOBAL_FLAGS,
19
19
  defaultReadStdin,
20
20
  isStdinToken,
21
21
  resolveTextOrStdin
22
- } from "./chunk-XDQHNUEU.js";
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,